rockchip-linux / u-boot

U-Boot tree for pending commits
113 stars 79 forks source link

eMMC hs400 read fail #66

Closed suxiaocheng closed 3 years ago

suxiaocheng commented 3 years ago

We encounter an u-boot load kernel fail issue, the log is in below file: eMMC_read_fail.txt

We found that in mmc_bread function, if mmc_read_blocks fail, the function will try to reinit the eMMC, but mmc_init will alway execute fail. We have already check cmd0 in LA. There is an issue in sending cmd0, host sending cmd0 is without crc, so the eMMC device will not reset and later command will fail.

Could you provide any suggestion?

suxiaocheng commented 3 years ago

Attach more info, if eMMC support HS400 mode, can reproduce this issue by follow command:

=> mmc info 
Device: sdhci@fe330000
Manufacturer ID: dd
OEM: 11a
Name: AD41A 
Timing Interface: HS400
Tran Speed: 150000000
Rd Block Len: 512
MMC version 5.0
High Capacity: Yes
Capacity: 28.8 GiB
Bus Width: 8-bit DDR
Erase Group Size: 512 KiB
HC WP Group Size: 8 MiB
User Capacity: 28.8 GiB WRREL
Boot Capacity: 4 MiB ENH
RPMB Capacity: 4 MiB ENH
=> mmc rescan
Card did not respond to voltage select!
mmc_init: -95, time 27
=> mmc info 
mmc_init: -110, time 22

If the eMMC is only support DDR52, "mmc rescan" command will pass.

=> mmc info 
Device: sdhci@fe330000
Manufacturer ID: dd
OEM: 101
Name: AD11A 
Timing Interface: High Speed
Tran Speed: 52000000
Rd Block Len: 512
MMC version 5.0
High Capacity: Yes
Capacity: 28.8 GiB
Bus Width: 8-bit
Erase Group Size: 512 KiB
HC WP Group Size: 8 MiB
User Capacity: 28.8 GiB WRREL
Boot Capacity: 4 MiB ENH
RPMB Capacity: 4 MiB ENH
=> mmc info 
Device: sdhci@fe330000
Manufacturer ID: dd
OEM: 101
Name: AD11A 
Timing Interface: High Speed
Tran Speed: 52000000
Rd Block Len: 512
MMC version 5.0
High Capacity: Yes
Capacity: 28.8 GiB
Bus Width: 8-bit
Erase Group Size: 512 KiB
HC WP Group Size: 8 MiB
User Capacity: 28.8 GiB WRREL
Boot Capacity: 4 MiB ENH
RPMB Capacity: 4 MiB ENH
=> mmc rescan
=> 
=>