SPL doesn't detect SD card

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

SPL doesn't detect SD card

ソリューションへジャンプ
2,557件の閲覧回数
Jamier
Contributor III

I have a problem booting from SD card and it appears SPL doesn't detect the SD card. I am using Yocto and building for the IMX8M Mini. The board I am using has an eMMC chip and an SD card. It looks like the eMMC (usdhc1) is recognized during the boot attempt, but not the SD card (usdhc2). The eMMC is blank, so I am using the ROM bootloader to boot to SD card. It does boot to SPL, but when SPL tries to detect the SD card it can't find it and the boot halts.

I know the hardware works because I can use a different image to boot successfully.

I've verified that u-boot-spl.dtb has entries for usdhc2, my defconfig has CONFIG_SPL_OF_CONTROL. Maybe I am missing a critical config?

Thanks!

 

Here is the boot text. You can see the line "FSL_SDHC: 0" which is output from a call to print_mmc_devices() I added. This tells me the eMMC is detected, but not SD card.

U-Boot SPL 2022.04-lf_v2022.04+g1c881f4da8 (Jun 07 2022 - 05:16:02 +0000)
DDRINFO: start DRAM init
DDRINFO: DRAM rate 2600MTS
DDRINFO:ddrphy calibration done
DDRINFO: ddrmix config done
Normal Boot
Trying to boot from MMC2
FSL_SDHC: 0
MMC Device 1 not found
spl: could not find mmc device 1. error: -19
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

ラベル(1)
0 件の賞賛
返信
1 解決策
2,536件の閲覧回数
Jamier
Contributor III

Thanks for your time and input. I think I've figured out where I was going wrong. Much of the documentation and other posts I've seen about this type of problem suggested the SD card can be detected with a proper device tree and CONFIG settings. However this was not the case for my situation. 

After reviewing the boot up code related to mmc initialization, I found an implementation of board_mmc_init() in our source code that was only initializing the eMMC slot. After changing this to initialize the SD card slot as well, SPL will now detect the SD card and boot to U-boot. The initialization was not referring to the device tree at all.

元の投稿で解決策を見る

2 返答(返信)
2,543件の閲覧回数
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

This may be related to drive strength, similar issue described on

https://community.nxp.com/t5/i-MX-Processors/imx8m-mini-custom-board-usdhc1-sd-card-detection-issue/...

https://community.nxp.com/t5/i-MX-Processors/eMMC-8GB-to-4GB-crash-on-linux-yocto-boot/m-p/373231

One can try to tweak "USDHC pad setting override" described in Table 6-19. USDHC boot eFUSE descriptions  i.MX 8M Mini Applications Processor Reference Manual

 

Regards

0 件の賞賛
返信
2,537件の閲覧回数
Jamier
Contributor III

Thanks for your time and input. I think I've figured out where I was going wrong. Much of the documentation and other posts I've seen about this type of problem suggested the SD card can be detected with a proper device tree and CONFIG settings. However this was not the case for my situation. 

After reviewing the boot up code related to mmc initialization, I found an implementation of board_mmc_init() in our source code that was only initializing the eMMC slot. After changing this to initialize the SD card slot as well, SPL will now detect the SD card and boot to U-boot. The initialization was not referring to the device tree at all.