[iMX6UL_EVK] No MMC device available after enabling DFU and UMS.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

[iMX6UL_EVK] No MMC device available after enabling DFU and UMS.

Jump to solution
2,238 Views
jimhuangtw
Contributor II

Hi iMX6 experts,

I have a problem on iMX6UL BSP.
When I enabled the "ums" and "dfu" in u-boot-imx, I got the error message at system boot.
Hope someone can correct me if I did wrong.
 

U-Boot 2017.03-nxp/imx_v2017.03_4.9.11_1.0.0_ga+ga2fea67 (Mar 12 2018 - 15:33:44 +0800)

CPU: Freescale i.MX6UL rev1.1 528 MHz (running at 396 MHz)
CPU: Industrial temperature grade (-40C to 105C) at 45C
Reset cause: WDOG
Board: MX6UL 14x14 EVK
DRAM: 512 MiB
MMC:
MMC Device 1 not found
*** Warning - No MMC card found, using default environment

The modifications are as below.
diff --git a/configs/mx6ul_14x14_evk_defconfig b/configs/mx6ul_14x14_evk_defconfig
index 3d75b07..8e22052 100644
--- a/configs/mx6ul_14x14_evk_defconfig
+++ b/configs/mx6ul_14x14_evk_defconfig
@@ -10,9 +10,11 @@ CONFIG_HUSH_PARSER=y
CONFIG_CMD_BOOTZ=y
# CONFIG_CMD_IMLS is not set
CONFIG_CMD_MEMTEST=y
+CONFIG_CMD_DFU=y
CONFIG_CMD_MMC=y
CONFIG_CMD_SF=y
CONFIG_CMD_USB=y
+CONFIG_CMD_USB_MASS_STORAGE=y
CONFIG_CMD_I2C=y
CONFIG_CMD_GPIO=y
CONFIG_CMD_DHCP=y
@@ -41,7 +43,14 @@ CONFIG_PINCTRL_IMX6=y
CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_DFU_MMC=y
CONFIG_USB=y
+CONFIG_USB_GADGET=y
+CONFIG_G_DNL_MANUFACTURER="FSL"
+CONFIG_G_DNL_VENDOR_NUM=0x0525
+CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
+CONFIG_CI_UDC=y
+CONFIG_USB_GADGET_DOWNLOAD=y
CONFIG_DM_USB=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_STORAGE=y
diff --git a/include/configs/mx6ul_14x14_evk.h b/include/configs/mx6ul_14x14_evk.h
index fcac8a0..35837a5 100644
--- a/include/configs/mx6ul_14x14_evk.h
+++ b/include/configs/mx6ul_14x14_evk.h
@@ -289,6 +289,20 @@
#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
#endif

+/*
+ * USB Gadget (DFU, UMS)
+ */
+#if defined(CONFIG_CMD_DFU) || defined(CONFIG_CMD_USB_MASS_STORAGE)
+#define CONFIG_USB_FUNCTION_MASS_STORAGE
+
+#define CONFIG_SYS_DFU_DATA_BUF_SIZE (16 * 1024 * 1024)
+#define DFU_DEFAULT_POLL_TIMEOUT 300
+
+/* USB IDs */
+#define CONFIG_G_DNL_UMS_VENDOR_NUM 0x0525
+#define CONFIG_G_DNL_UMS_PRODUCT_NUM 0xA4A5
+#endif

I certainly sure that the mmc device is OK before updating new u-boot-imx.

U-Boot 2017.03-nxp/imx_v2017.03_4.9.11_1.0.0_ga+ga2fea67 (Feb 01 2018 - 17:28:13 +0800)

CPU: Freescale i.MX6UL rev1.1 528 MHz (running at 396 MHz)
CPU: Industrial temperature grade (-40C to 105C) at 37C
Reset cause: POR
Model: Freescale i.MX6 UltraLite 14x14 EVK Board
Board: MX6UL 14x14 EVK
DRAM: 512 MiB
MMC: FSL_SDHC: 0, FSL_SDHC: 1
*** Warning - bad CRC, using default environment

Display: TFT43AB (480x272)
Video: 480x272x24
In: serial
Out: serial
Err: serial
switch to partitions #0, OK
mmc1 is current device
Net:
Warning: ethernet@020b4000 using MAC address from ROM
eth1: ethernet@020b4000 [PRIME]
Warning: ethernet@02188000 using MAC address from ROM
, eth0: ethernet@02188000
Normal Boot
Hit any key to stop autoboot: 0
=>
=> setenv serverip 192.168.1.103
=> setenv ethaddr 00:01:02:03:04:05
=> setenv ipaddr 192.168.1.150
=> saveenv
Saving Environment to MMC...
Writing to MMC(1)... done
=> mmc dev 1 0
switch to partitions #0, OK
mmc1 is current device
=> tftpboot 0x80800000 u-boot-imx6ulevk.imx-sd
Using ethernet@020b4000 device
TFTP from server 192.168.1.103; our IP address is 192.168.1.150
Filename 'u-boot-imx6ulevk.imx-sd'.
Load address: 0x80800000
Loading: ######################################
1.2 MiB/s
done
Bytes transferred = 556032 (87c00 hex)
=> mmc write 0x80800000 0x2 0x400

MMC write: dev # 1, block # 2, count 1024 ... 1024 blocks written: OK
=> reset
resetting ...

 

Thanks,
Jim

Labels (3)
0 Kudos
1 Solution
1,492 Views
igorpadykov
NXP Employee
NXP Employee

Hi Jim

as noted in uboot documentation eMMC devices may be exposed via DFU

GitHub - u-boot/u-boot: "Das U-Boot" Source Tree 

[U-Boot] [PATCH v3 5/7] dfu:cmd: Support for DFU u-boot command 

also this may be posted on uboot mail list

U-Boot Info Page 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
1 Reply
1,493 Views
igorpadykov
NXP Employee
NXP Employee

Hi Jim

as noted in uboot documentation eMMC devices may be exposed via DFU

GitHub - u-boot/u-boot: "Das U-Boot" Source Tree 

[U-Boot] [PATCH v3 5/7] dfu:cmd: Support for DFU u-boot command 

also this may be posted on uboot mail list

U-Boot Info Page 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos