Recently I acquire a R-Car M3 development board. I had successfully built an embedded Linux image with YOCTO 3.9.0 by following the steps on elinux.org/.../Yocto-Gen3
I have also update the firmware of the board by following the steps on elinux.org/.../M3SK.
Now I am trying to boot up Linux image form an SD card but when I turn on my board I get the error "MMC init fail". I know I can access the SD card and load the images that are saved there. But when trying to boot from the SD card it stops the boot and show the following message "mmc0: error -110 whilst initialising MMC card"
It seems that this error when trying to boot is because the board is not able to initialize the mmc. Has anybody face this same problem? Can someone help me solve it?
Boot logs
Welcome to minicom 2.7
OPTIONS: I18n
Compiled on Nov 15 2018, 20:18:47.
Port /dev/ttyUSB0, 22:57:14
Press CTRL-A Z for help on special keys
[ 0.000190] NOTICE: BL2: R-Car Gen3 Initial Program Loader(CA57) Rev.1.0.21
[ 0.005752] NOTICE: BL2: PRR is R-Car M3 Ver.1.0
[ 0.010421] NOTICE: BL2: Board is Starter Kit Rev.1.0
[ 0.015533] NOTICE: BL2: Boot device is HyperFlash(80MHz)
[ 0.020959] NOTICE: BL2: LCM state is CM
[ 0.025001] NOTICE: BL2: AVS setting succeeded. DVFS_SetVID=0x53
[ 0.030988] NOTICE: BL2: DDR3200(rev.0.33)NOTICE: [COLD_BOOT]NOTICE: ..0
[ 0.086074] NOTICE: BL2: DRAM Split is 2ch
[ 0.089960] NOTICE: BL2: QoS is default setting(rev.0.19)
[ 0.095463] NOTICE: BL2: Lossy Decomp areas
[ 0.099636] NOTICE: Entry 0: DCMPAREACRAx:0x80000540 DCMPAREACRBx:0x570
[ 0.106721] NOTICE: Entry 1: DCMPAREACRAx:0x40000000 DCMPAREACRBx:0x0
[ 0.113633] NOTICE: Entry 2: DCMPAREACRAx:0x20000000 DCMPAREACRBx:0x0
[ 0.120548] NOTICE: BL2: v1.4(release):15dba6b
[ 0.125038] NOTICE: BL2: Built : 05:48:04, Feb 18 2019
[ 0.130225] NOTICE: BL2: Normal boot
[ 0.133871] NOTICE: BL2: dst=0xe6320d00 src=0x8180000 len=512(0x200)
[ 0.140254] NOTICE: BL2: dst=0x43f00000 src=0x8180400 len=6144(0x1800)
[ 0.146875] NOTICE: BL2: dst=0x44000000 src=0x81c0000 len=65536(0x10000)
[ 0.154105] NOTICE: BL2: dst=0x44100000 src=0x8200000 len=1048576(0x100000)
[ 0.168928] NOTICE: BL2: dst=0x50000000 src=0x8640000 len=1048576(0x100000)
U-Boot 2015.04 (Feb 17 2019 - 23:28:11)
CPU: Renesas Electronics R8A7796 rev 1.0
Board: M3ULCB
I2C: ready
DRAM: 1.9 GiB
Bank #0: 0x048000000 - 0x07fffffff, 896 MiB
Bank #1: 0x600000000 - 0x63fffffff, 1 GiB
MMC: sh-sdhi: 0, sh-sdhi: 1
MMC init failed
Using default environment
In: serial
Out: serial
Err: serial
Net: Board Net Initialization Failed
No ethernet found.
Hit any key to stop autoboot: 0
=> mmc dev 0
switch to partitions #0, OK
mmc0 is current device
=> mmc info
Device: sh-sdhi
Manufacturer ID: 3
OEM: 5344
Name: SC64G
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 59.5 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
=> ext2ls mmc 0:1 /boot
<DIR> 4096 .
<DIR> 4096 ..
<SYM> 28 Image
18522624 Image-4.14.35-yocto-standard
67069 Image-r8a7796-m3ulcb.dtb
67069 r8a7796-m3ulcb.dtb
67069 Image--4.14.35+git0+118adc53e8-r1-r8a7796-m3ulcb-2019021804481b
=> setenv bootargs 'rw root=/dev/mmcblk0p1 rootfstype=ext4 rootwait'
=> saveenv
Saving Environment to MMC...
MMC init failed
**END OF BOOTING LOG**
**DTB file Information**
sd@ee100000 {
compatible = "renesas,sdhi-r8a7796", "renesas,rcar-gen3-sdhi";
reg = <0x0 0xee100000 0x0 0x2000>;
interrupts = <0x0 0xa5 0x4>;
clocks = <0xa 0x1 0x13a>;
max-frequency = <0xbebc200>;
power-domains = <0x7 0x20>;
resets = <0xa 0x13a>;
status = "okay";
pinctrl-0 = <0x61>;
pinctrl-1 = <0x62>;
pinctrl-names = "default", "state_uhs";
vmmc-supply = <0x63>;
vqmmc-supply = <0x64>;
cd-gpios = <0x65 0xc 0x1>;
bus-width = <0x4>;
sd-uhs-sdr50;
sd-uhs-sdr104;
};
sd@ee120000 {
compatible = "renesas,sdhi-r8a7796", "renesas,rcar-gen3-sdhi";
reg = <0x0 0xee120000 0x0 0x2000>;
interrupts = <0x0 0xa6 0x4>;
clocks = <0xa 0x1 0x139>;
max-frequency = <0xbebc200>;
power-domains = <0x7 0x20>;
resets = <0xa 0x139>;
status = "disabled";
};
sd@ee140000 {
compatible = "renesas,sdhi-r8a7796", "renesas,rcar-gen3-sdhi";
reg = <0x0 0xee140000 0x0 0x2000>;
interrupts = <0x0 0xa7 0x4>;
clocks = <0xa 0x1 0x138>;
max-frequency = <0xbebc200>;
power-domains = <0x7 0x20>;
resets = <0xa 0x138>;
status = "okay";
pinctrl-0 = <0x66>;
pinctrl-1 = <0x67>;
pinctrl-names = "default", "state_uhs";
vmmc-supply = <0x68>;
vqmmc-supply = <0x69>;
bus-width = <0x8>;
mmc-hs200-1_8v;
mmc-hs400-1_8v;
non-removable;
};
sd@ee160000 {
compatible = "renesas,sdhi-r8a7796", "renesas,rcar-gen3-sdhi";
reg = <0x0 0xee160000 0x0 0x2000>;
interrupts = <0x0 0xa8 0x4>;
clocks = <0xa 0x1 0x137>;
max-frequency = <0xbebc200>;
power-domains = <0x7 0x20>;
resets = <0xa 0x137>;
status = "disabled";
};
With Renesas Yocto version 3.9.0, there were some already-known issues raised at:
https://elinux.org/R-Car/Boards/M3SK
(scroll down to the bottom)
You should apply the workaround on MMC driver for the kernel.
For mmc spec on M3SK,
There were also some patches that may deal with your issue:
https://patchwork.kernel.org/patch/9963437/
https://patchwork.kernel.org/patch/9998159/
By the way, you are using arm-tf v1.4, it should be used with u-boot v2018.09 for compatibility.