All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jagan Teki <jagan@amarulasolutions.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 5/7] configs: imx6dl-mamoj: Add DFU support
Date: Wed, 11 Apr 2018 18:06:13 +0530	[thread overview]
Message-ID: <20180411123615.15130-6-jagan@amarulasolutions.com> (raw)
In-Reply-To: <20180411123615.15130-1-jagan@amarulasolutions.com>

Add DFU support for BTicino Mamoj board and update
the same steps in README.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: Simone CIANNI <simone.cianni@bticino.it>
Signed-off-by: Raffaele RECALCATI <raffaele.recalcati@bticino.it>
---
 board/bticino/mamoj/README     | 37 +++++++++++++++++++++++++++++++++++++
 configs/imx6dl_mamoj_defconfig |  2 ++
 include/configs/imx6dl-mamoj.h |  4 +++-
 3 files changed, 42 insertions(+), 1 deletion(-)

diff --git a/board/bticino/mamoj/README b/board/bticino/mamoj/README
index eda9e45ed1..8b0e9c3e0c 100644
--- a/board/bticino/mamoj/README
+++ b/board/bticino/mamoj/README
@@ -13,6 +13,8 @@ The following methods can be used for booting Mamoj boards:
 
 1. USB SDP boot
 
+2. eMMC boot (via DFU)
+
 1. USB SDP boot:
 ---------------
 
@@ -55,6 +57,41 @@ The following methods can be used for booting Mamoj boards:
 
   We can see U-Boot boot from USB SDP on minicom
 
+2. eMMC boot via DFU:
+--------------------
+
+  Once booted from USB SDP, program the eMMC as below(make sure to connect USB OTG)
+
+  - Change eMMC partition config
+
+     => mmc partconf 2 1 0 0
+
+  - Partition eMMC on host
+
+     => ums 0 mmc 2
+
+    Host will able to detect the eMMC disk as UMS, partition the same.
+
+  - Program SPL
+
+     => setenv dfu_alt_info $dfu_alt_info_spl
+     => dfu 0 mmc 2
+
+     At Host
+
+     # dfu-util -D SPL -a spl
+
+  - Program u-boot-dtb.img
+
+     => setenv dfu_alt_info $dfu_alt_info_uboot
+     => dfu 0 mmc 2
+
+     At Host
+
+     # dfu-util -D u-boot-dtb.img -a u-boot
+
+  Poweroff and Poweron the board and see U-Boot booting from eMMC.
+
 --
 Jagan Teki <jagan@amarulasolutions.com>
 03/12/18
diff --git a/configs/imx6dl_mamoj_defconfig b/configs/imx6dl_mamoj_defconfig
index 08272077d2..e34c2d9be3 100644
--- a/configs/imx6dl_mamoj_defconfig
+++ b/configs/imx6dl_mamoj_defconfig
@@ -15,6 +15,7 @@ CONFIG_FASTBOOT_FLASH=y
 CONFIG_FASTBOOT_FLASH_MMC_DEV=2
 CONFIG_SYS_PROMPT="=> "
 CONFIG_CRC32_VERIFY=y
+CONFIG_CMD_DFU=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
@@ -44,5 +45,6 @@ CONFIG_USB_GADGET_MANUFACTURER="FSL"
 CONFIG_USB_GADGET_VENDOR_NUM=0x0525
 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
 CONFIG_CI_UDC=y
+CONFIG_DFU_MMC=y
 CONFIG_IMX_THERMAL=y
 CONFIG_SYS_I2C_MXC=y
diff --git a/include/configs/imx6dl-mamoj.h b/include/configs/imx6dl-mamoj.h
index 929365af79..0ac238b82d 100644
--- a/include/configs/imx6dl-mamoj.h
+++ b/include/configs/imx6dl-mamoj.h
@@ -15,7 +15,7 @@
 #include "mx6_common.h"
 
 /* Size of malloc() pool */
-#define CONFIG_SYS_MALLOC_LEN		(16 * SZ_1M)
+#define CONFIG_SYS_MALLOC_LEN		(35 * SZ_1M)
 
 /* Total Size of Environment Sector */
 #define CONFIG_ENV_SIZE			SZ_128K
@@ -37,6 +37,8 @@
 	"fdt_addr_r=0x13000000\0"	\
 	"kernel_addr_r=0x10008000\0"	\
 	"fdt_high=0xffffffff\0"		\
+	"dfu_alt_info_spl=spl raw 0x2 0x400\0" \
+	"dfu_alt_info_uboot=u-boot raw 0x8a 0x11400\0" \
 	BOOTENV
 
 #define BOOT_TARGET_DEVICES(func) \
-- 
2.14.3

  parent reply	other threads:[~2018-04-11 12:36 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-11 12:36 [U-Boot] [PATCH v2 0/7] i.MX6DL: Add BTicino Mamoj board support Jagan Teki
2018-04-11 12:36 ` [U-Boot] [PATCH v2 1/7] i.MX6: board: Add BTicino i.MX6DL Mamoj initial support Jagan Teki
2018-04-26  7:17   ` Stefano Babic
2018-04-26  7:33     ` Jagan Teki
2018-04-26  7:46       ` Stefano Babic
2018-04-26 10:43         ` Jagan Teki
2018-05-02 12:41         ` Jagan Teki
2018-05-03  8:38           ` Stefano Babic
2018-04-11 12:36 ` [U-Boot] [PATCH v2 2/7] i.MX6DL: mamoj: Add I2C support Jagan Teki
2018-04-26  7:18   ` Stefano Babic
2018-04-11 12:36 ` [U-Boot] [PATCH v2 3/7] i.MX6DL: mamoj: Add PFUZE100 support Jagan Teki
2018-04-26  7:18   ` Stefano Babic
2018-04-11 12:36 ` [U-Boot] [PATCH v2 4/7] configs: imx6dl_mamoj: Enable fastboot and ums Jagan Teki
2018-04-11 12:36 ` Jagan Teki [this message]
2018-04-11 12:36 ` [U-Boot] [PATCH v2 6/7] configs: imx6dl-mamoj: Add Falcon mode support Jagan Teki
2018-04-11 12:36 ` [U-Boot] [PATCH v2 7/7] configs: imx6dl-mamoj: Enable HAB Jagan Teki
2018-04-19 11:34 ` [U-Boot] [PATCH v2 0/7] i.MX6DL: Add BTicino Mamoj board support Jagan Teki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180411123615.15130-6-jagan@amarulasolutions.com \
    --to=jagan@amarulasolutions.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.