[meta-freescale] uBoot Support for eMMC with microSOM imx6

Colin Wernham CWernham at Airspan.com
Thu Jan 14 01:10:48 PST 2016


I am attempting to add support for eMMC on a custom board, using the microSOM iMX6, but in uBoot, communications with the eMMC device fail with a timeout. This uBoot is based on the repository https://github.com/SolidRun/u-boot-imx6.git, commit e509dd30e97bf2cbce21502e4462d9d7c1d85daa "x6: solidrun: Add support for HummingBoard v2" 2015-06-30 09:20:11.

I am using the uBoot config mx6_cubox-i.h/c, with the addition of the eMMC pad settings:


     MX6QDL_SET_PAD(PAD_SD3_CLK__USDHC3_CLK   , MUX_PAD_CTRL(USDHC_PAD_CTRL));

     MX6QDL_SET_PAD(PAD_SD3_CMD__USDHC3_CMD   , MUX_PAD_CTRL(USDHC_PAD_CTRL));

     MX6QDL_SET_PAD(PAD_SD3_DAT0__USDHC3_DAT0 , MUX_PAD_CTRL(USDHC_PAD_CTRL));

     MX6QDL_SET_PAD(PAD_SD3_DAT1__USDHC3_DAT1 , MUX_PAD_CTRL(USDHC_PAD_CTRL));

     MX6QDL_SET_PAD(PAD_SD3_DAT2__USDHC3_DAT2 , MUX_PAD_CTRL(USDHC_PAD_CTRL));

     MX6QDL_SET_PAD(PAD_SD3_DAT3__USDHC3_DAT3 , MUX_PAD_CTRL(USDHC_PAD_CTRL));

     MX6QDL_SET_PAD(PAD_SD3_DAT4__USDHC3_DAT4 , MUX_PAD_CTRL(USDHC_PAD_CTRL));

     MX6QDL_SET_PAD(PAD_SD3_DAT5__USDHC3_DAT5 , MUX_PAD_CTRL(USDHC_PAD_CTRL));

     MX6QDL_SET_PAD(PAD_SD3_DAT6__USDHC3_DAT6 , MUX_PAD_CTRL(USDHC_PAD_CTRL));

     MX6QDL_SET_PAD(PAD_SD3_DAT7__USDHC3_DAT7 , MUX_PAD_CTRL(USDHC_PAD_CTRL));

     MX6QDL_SET_PAD(PAD_SD3_RST__USDHC3_RST   , MUX_PAD_CTRL(USDHC_PAD_CTRL));

     usdhc3_cfg.max_bus_width = 8;

     usdhc3_cfg.sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK);

     status |= fsl_esdhc_initialize(bis, &usdhc3_cfg);

     /* Assert eMMC SD3_RST (GPIO7_IO08) (active low)# */

     gpio_direction_output(IMX_GPIO_NR(7, 8), 1);

The device is present when using the uboot 'mmc list' command, but when attempting to change to the device, with 'mmc dev 1' it hangs. I've enabled the existing debug trace CONFIG_MMC_TRACE in the mmc.c function mmc_send_cmd, and it gives the following output (with my additional debug printfs). It time out with the command SD_CMD_SEND_IF_COND during the mmc_start_init() function:

iRelay U-Boot > mmc dev 1
~~~ mmc_init:1286 err=-20 [IN_PROGRESS]
~~~ mmc_init:1290 err=-20 [IN_PROGRESS]
~~~ mmc_start_init:1206
~~~ mmc_start_init:1210
~~~ mmc_start_init:1212 err=0
~~~ mmc_start_init:1216 err=0
~~~ mmc_start_init:1219 err=0
~~~ mmc_start_init:1221 err=0
CMD_SEND:0 [MMC_CMD_GO_IDLE_STATE]
                ARG                      0x00000000
                MMC_RSP_NONE
~~~ mmc_start_init:1225 err=0
~~~ mmc_start_init:1229 err=0
CMD_SEND:8 [SD_CMD_SEND_IF_COND]   <----------------- It times out on this command
                ARG                      0x000001AA
                MMC_RSP_R1,5,6,7         0x00000003
~~~ mmc_send_if_cond:1150 err=-19 [TIMEOUT]
~~~ mmc_start_init:1236 err=-19 [TIMEOUT]
~~~ sd_send_op_cond:295
CMD_SEND:55
                ARG                      0x00000000
                MMC_RSP_R1,5,6,7         0x00000003
~~~ mmc_start_init:1241 err=-19 [TIMEOUT]
~~~ mmc_start_init:1244 err=-19 [TIMEOUT]
CMD_SEND:0
                ARG                      0x00000000
                MMC_RSP_NONE
CMD_SEND:1
                ARG                      0x00000000
                MMC_RSP_R3,4             0x00FF8080
CMD_SEND:1
                ARG                      0x40300000
                MMC_RSP_R3,4             0x00FF8080
~~~ mmc_start_init:1246 err=-20 [IN_PROGRESS]
~~~ mmc_start_init:1257 err=-20 [IN_PROGRESS]
~~~ mmc_start_init:1260 err=-20 [IN_PROGRESS]
~~~ mmc_init:1294 err=-20 [IN_PROGRESS]
CMD_SEND:1
                ARG                      0x40300000
                MMC_RSP_R3,4             0x00FF8080
CMD_SEND:1
                ARG                      0x40300000
                MMC_RSP_R3,4             0xC0FF8080
CMD_SEND:2
                ARG                      0x00000000
                MMC_RSP_R2               0xFE014E50
                                         0x31585858
                                         0x581229F3
                                         0x9DE4C100

                                        DUMPING DATA
                                        000 - FE 01 4E 50
                                        004 - 31 58 58 58
                                        008 - 58 12 29 F3
                                        012 - 9D E4 C1 00
CMD_SEND:3
                ARG                      0x00000000
                MMC_RSP_R1,5,6,7         0x00000500
CMD_SEND:9
                ARG                      0x00000000
                MMC_RSP_R2               0xD04F0132
                                         0x0F5913FF
                                         0xFFFFFFE7
                                         0x8A400000

                                        DUMPING DATA
                                        000 - D0 4F 01 32
                                        004 - 0F 59 13 FF
                                        008 - FF FF FF E7
                                        012 - 8A 40 00 00
CMD_SEND:13 [MMC_CMD_SEND_STATUS]
                ARG                      0x00000000
                MMC_RSP_R1,5,6,7         0x00000700
CURR STATE:3
CMD_SEND:7 [MMC_CMD_SELECT_CARD]
                ARG                      0x00000000
                MMC_RSP_R1,5,6,7         0x00000700
CMD_SEND:8 [MMC_CMD_SEND_EXT_CSD]
                ARG                      0x00000000
<--------------------------------------------------- Hangs here



[cid:MWC2016.jpg] tfx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/meta-freescale/attachments/20160114/358a93cc/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MWC2016.jpg
Type: image/jpeg
Size: 18691 bytes
Desc: MWC2016.jpg
URL: <http://lists.yoctoproject.org/pipermail/meta-freescale/attachments/20160114/358a93cc/attachment.jpg>


More information about the meta-freescale mailing list