[U-Boot] Renesas R-Car Gen3 SD/MMC driver issues
Marek Vasut
marek.vasut at gmail.com
Tue Sep 11 19:48:57 UTC 2018
On 09/10/2018 04:16 PM, Matthias Blankertz wrote:
> Hello,
>
> we are experiencing issues with the R-Car Gen3 SD driver with H3ULCB
> development kits, in both u-boot 2018.05 and 2018.07. The issues are
> frequent failures of u-boot to access the eMMC storage. I have traced
> the issue to u-boot commit 9ac9c341f which switched the default configs
> to use the UniPhier/Matsushita common driver instead of the previous
> custom Renesas driver.
>
> With the Matsushita driver we have various H3ULCB starter kits with
> failures related to the eMMC storage on the ulcb. Either u-boot cannot
> access it at all (resulting in a failure to load the u-boot
> environment), or reads corrupted data from the eMMC storage when reading
> the boot images. These failures occur frequently, but are not
> reproducible on every boot. Also, the frequency of failure depends on
> the specific starter kit, with some having no failures at all and others
> failing almost every boot.
>
> I have tried building u-boot both with the default config, which enables
> MMC_UHS_SUPPORT and MMC_HS200_SUPPORT, and with UHS and HS200 support
> disabled. There is no change in the failures.
>
> When I build u-boot with RENESAS_SDHI disabled and instead use the old
> custom Renesas driver (CONFIG_SH_SDHI) the eMMC failures disappear
> completely for every starter kit: Both environment loading and reading
> boot images from eMMC are reliable with the old driver.
>
>
> I have a vague suspicion that there is some sort of timing issue with
> the UniPhier/Matsushita common driver and the R-Car Gen3 or the eMMCs.
> When I add a delay to the u-boot startup (inserting udelay(5) before the
> mmc device is initialised in env/mmc.c) the failures in u-boot
> disappear, but then the SD controller (or eMMC card?) is sometimes left
> in a state where the linux kernel cannot use it: "Timeout waiting for
> hardware interrupt after CMD...".
>
> This effect, that the controller/card is left in a state that the linux
> kernel cannot deal with, also does not occur when the old Renesas driver
> is used in u-boot.
>
> Any ideas?
Try 2018.09 and make sure to use latest ATF, seems to work fine there:
[ 0.000162] NOTICE: BL2: R-Car Gen3 Initial Program Loader(CA57)
Rev.1.0.21
[ 0.005724] NOTICE: BL2: PRR is R-Car H3 Ver.2.0
[ 0.010393] NOTICE: BL2: Board is Starter Kit Rev.1.0
[ 0.015506] NOTICE: BL2: Boot device is HyperFlash(80MHz)
[ 0.020932] NOTICE: BL2: LCM state is CM
[ 0.024974] NOTICE: BL2: AVS setting succeeded. DVFS_SetVID=0x53
[ 0.030962] NOTICE: BL2: DDR3200(rev.0.33)NOTICE:
[COLD_BOOT]NOTICE: ..0
[ 0.065954] NOTICE: BL2: DRAM Split is 4ch
[ 0.069837] NOTICE: BL2: QoS is default setting(rev.0.19)
[ 0.075280] NOTICE: BL2: DRAM refresh interval 1.95 usec
[ 0.080701] NOTICE: BL2: v1.4(release):15dba6bb-dirty
[ 0.085734] NOTICE: BL2: Built : 15:20:54, Sep 9 2018
[ 0.090921] NOTICE: BL2: Normal boot
[ 0.094567] NOTICE: BL2: dst=0xe6322d00 src=0x8180000 len=512(0x200)
[ 0.100950] NOTICE: BL2: dst=0x43f00000 src=0x8180400 len=6144(0x1800)
[ 0.107570] NOTICE: BL2: dst=0x44000000 src=0x81c0000 len=65536(0x10000)
[ 0.114801] NOTICE: BL2: dst=0x44100000 src=0x8200000
len=1048576(0x100000)
[ 0.129624] NOTICE: BL2: dst=0x50000000 src=0x8640000
len=1048576(0x100000)
U-Boot 2018.09-rc3 (Sep 09 2018 - 15:21:06 +0000)
CPU: Renesas Electronics R8A7795 rev 2.0
Model: Renesas H3ULCB board based on r8a7795 ES2.0+
DRAM: 3.9 GiB
Flash: 64 MiB
MMC: sd at ee100000: 0, sd at ee140000: 1
Loading Environment from MMC... OK
In: serial at e6e88000
Out: serial at e6e88000
Err: serial at e6e88000
Net: eth0: ethernet at e6800000
Auto-update from TFTP: failed, env. variable 'updatefile' not found
Hit any key to stop autoboot: 0
=>
=>
=> mmc dev 1
switch to partitions #0, OK
mmc1(part 0) is current device
=> mmc info
Device: sd at ee140000
Manufacturer ID: 15
OEM: 100
Name: 8GSD4
Bus Speed: 199999992
Mode : HS200 (200MHz)
Rd Block Len: 512
MMC version 5.1
High Capacity: Yes
Capacity: 7.3 GiB
Bus Width: 8-bit
Erase Group Size: 512 KiB
HC WP Group Size: 8 MiB
User Capacity: 7.3 GiB WRREL
Boot Capacity: 31.9 MiB ENH
RPMB Capacity: 512 KiB ENH
--
Best regards,
Marek Vasut
More information about the U-Boot
mailing list