iMX6ULZ u-boot-fslc not able to read sd card on usdhc1

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

iMX6ULZ u-boot-fslc not able to read sd card on usdhc1

Jump to solution
931 Views
kbai
Contributor I

Hello,

I've got a custom board designed around the i.MX6ULZ processor. The design follows the i.MX6ULL EVK fairly closely although much simpler (not as many peripherals exposed). 

We are using usdhc1 as the boot device, which works with the ROM - i.e the board will boot into u-boot on an sdcard inserted into the sd card slot on usdhc1.  However, when u-boot attempts to load, the device is stuck in a deadloop waiting for an IRQ in the fsl_esdhc_imx.c driver.  I have enabled MMC_TRACE in the u-boot configuration and received the following log:

U-Boot 2020.04+fslc+ga7864ef223 (Jan 01 1970 - 00:00:00 +0000)

CPU: Freescale i.MX6ULZ rev1.1 996 MHz (running at 396 MHz)
CPU: Commercial temperature grade (0C to 95C) at 37C
Reset cause: POR
Model: Freescale i.MX6 ULZ 14x14 EVK Board
Board: MX6ULZ 14x14 EVK
DRAM: 512 MiB
MMC: FSL_SDHC: 0
Loading Environment from MMC... CMD_SEND:0
ARG 0x00000000
MMC_RSP_NONE
CMD_SEND:8
ARG 0x000001aa
MMC_RSP_R1,5,6,7 0x000001aa
CMD_SEND:55
ARG 0x00000000
MMC_RSP_R1,5,6,7 0x00000120
CMD_SEND:41
ARG 0x40300000
MMC_RSP_R3,4 0x40ff8000
CMD_SEND:55
ARG 0x00000000
MMC_RSP_R1,5,6,7 0x00000120
CMD_SEND:41
ARG 0x40300000
MMC_RSP_R3,4 0x40ff8000
CMD_SEND:55
ARG 0x00000000
MMC_RSP_R1,5,6,7 0x00000120
CMD_SEND:41
ARG 0x40300000
MMC_RSP_R3,4 0xc0ff8000
CMD_SEND:2
ARG 0x00000000
MMC_RSP_R2 0x03534453
0x53303847
0x80b72ab1
0xb5014900

DUMPING DATA
000 - 03 53 44 53
004 - 53 30 38 47
008 - 80 b7 2a b1
012 - b5 01 49 00
CMD_SEND:3
ARG 0x00000000
MMC_RSP_R1,5,6,7 0xaaaa0520
CMD_SEND:9
ARG 0xaaaa0000
MMC_RSP_R2 0x400e0032
0x5b590000
0x3b377f80
0x0a404000

DUMPING DATA
000 - 40 0e 00 32
004 - 5b 59 00 00
008 - 3b 37 7f 80
012 - 0a 40 40 00
CMD_SEND:7
ARG 0xaaaa0000
MMC_RSP_R1,5,6,7 0x00000700
CMD_SEND:55
ARG 0xaaaa0000
MMC_RSP_R1,5,6,7 0x00000920
CMD_SEND:51
ARG 0x00000000

The command hangs on the last CMD55/51 (APP_CMD ACMD51) sequence.  I've tracked down the lock-up to be in this loop.  

The interesting bit is if I change the u-boot build to build for the i.MX6ULL processor, the mmc appears to work much better with no lock-ups.

I notice a difference in the mx6ull_14x14_evk_defconfig and the mx6ulz_14x14_evk_defconfig files in that the former has defined 

CONFIG_FSL_USDHC=y

while the latter has 

CONFIG_FSL_ESDHC_IMX=y

What is the difference between these two settings?  Why are the ULL and the ULZ using different config settings for the eMMC/SD interfaces?

Any tips or advice I should be looking at to get this system to work?  Again, we know the sdcard interface is functional as u-boot is being loaded by the ROM on the sdcard interface in question, it's only when u-boot tries to load the environment from MMC that the system hangs.

Labels (3)
0 Kudos
Reply
1 Solution
924 Views
igorpadykov
NXP Employee
NXP Employee

Hi Kevin

 

>CONFIG_FSL_USDHC=y.. CONFIG_FSL_ESDHC_IMX=y
>What is the difference between these two settings?

 

CONFIG_FSL_ESDHC_IMX was used for i.MX35.51,53 processors which have eSDHC module,

i.MX6x have uSDHC module (CONFIG_FSL_USDHC)

 

>Why are the ULL and the ULZ using different config settings for the eMMC/SD interfaces?

 

nxp uboot-imx have CONFIG_FSL_USDHC for both processors

https://source.codeaurora.org/external/imx/uboot-imx/tree/configs/mx6ulz_14x14_evk_defconfig?h=imx_v...

https://source.codeaurora.org/external/imx/uboot-imx/tree/configs/mx6ull_14x14_evk_defconfig?h=imx_v...

 

Please note that  "u-boot-fslc" is supported by community, may be recommended to

post issue on meta-fsl-arm mailing list  :  https://lists.yoctoproject.org/g/meta-freescale

 

Difference between nxp and community ("-fslc") bsps is described on

https://community.nxp.com/t5/i-MX-Processors/difference-between-Yocto-Community-BSP-and-Freescale-BS...

https://lists.yoctoproject.org/g/meta-freescale/topic/imx6dl_dunfell_and_kernel/80897983?p=,,,20,0,0...

 

Best regards
igor

View solution in original post

0 Kudos
Reply
2 Replies
925 Views
igorpadykov
NXP Employee
NXP Employee

Hi Kevin

 

>CONFIG_FSL_USDHC=y.. CONFIG_FSL_ESDHC_IMX=y
>What is the difference between these two settings?

 

CONFIG_FSL_ESDHC_IMX was used for i.MX35.51,53 processors which have eSDHC module,

i.MX6x have uSDHC module (CONFIG_FSL_USDHC)

 

>Why are the ULL and the ULZ using different config settings for the eMMC/SD interfaces?

 

nxp uboot-imx have CONFIG_FSL_USDHC for both processors

https://source.codeaurora.org/external/imx/uboot-imx/tree/configs/mx6ulz_14x14_evk_defconfig?h=imx_v...

https://source.codeaurora.org/external/imx/uboot-imx/tree/configs/mx6ull_14x14_evk_defconfig?h=imx_v...

 

Please note that  "u-boot-fslc" is supported by community, may be recommended to

post issue on meta-fsl-arm mailing list  :  https://lists.yoctoproject.org/g/meta-freescale

 

Difference between nxp and community ("-fslc") bsps is described on

https://community.nxp.com/t5/i-MX-Processors/difference-between-Yocto-Community-BSP-and-Freescale-BS...

https://lists.yoctoproject.org/g/meta-freescale/topic/imx6dl_dunfell_and_kernel/80897983?p=,,,20,0,0...

 

Best regards
igor

0 Kudos
Reply
917 Views
kbai
Contributor I

Thanks for the response @igorpadykov, this is great information to have.

0 Kudos
Reply