0

最近我买了一个 R-Car M3 开发板。按照 elinux.org/.../Yocto-Gen3 上的步骤,我已经使用 YOCTO 3.9.0 成功构建了嵌入式 Linux 映像

我还按照 elinux.org/.../M3SK 上的步骤更新了主板的固件。

现在我正在尝试从 SD 卡启动 Linux 映像,但是当我打开我的板时,我收到错误“MMC init fail”。我知道我可以访问 SD 卡并加载保存在那里的图像。但是当尝试从 SD 卡启动时,它会停止启动并显示以下消息“mmc0:初始化 MMC 卡时出现错误 -110”

尝试启动时似乎出现此错误是因为板无法初始化 mmc。有没有人面临同样的问题?有人可以帮我解决吗?

引导日志

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";
        };

4

2 回答 2

0

在 Renesas Yocto 3.9.0 版中,出现了一些已知问题:

https://elinux.org/R-Car/Boards/M3SK

(向下滚动到底部)

您应该在内核的 MMC 驱动程序上应用解决方法。

对于 M3SK 上的 mmc 规范,

  + sdhi0: used for sdcard 4-bit bus width 
  + sdhi2: used for on-board 8bit eMMC
  + sd-uhs-sdr50: SD UHS SDR50 speed is supported
  + sd-uhs-sdr104: SD UHS SDR104 speed is supported
  + mmc-hs200-1_8v: eMMC HS200 mode(1.8V I/O) is supported
  + mmc-hs400-1_8v: eMMC HS400 mode(1.8V I/O) is supported

还有一些补丁可以解决您的问题:

https://patchwork.kernel.org/patch/9963437/

https://patchwork.kernel.org/patch/9998159/

顺便说一句,您使用的是arm-tf v1.4,它应该与 u-boot v2018.09 一起使用以兼容。

于 2019-03-23T08:41:30.563 回答
0

u-boot 应该支持 mmc 和 sdcard init。您是否尝试使用其他 SD 卡?

要更新 u-boot-elf.srec,您需要来自https://github.com/renesas-rcar/flash_writer的 flash_writer

  1. 构建你的 flash_writer
  2. 让设备以 SCIF 下载模式或 USB 下载模式启动。输入“ctrl+A S”,发送你的 xxx.mot
  3. 请参阅https://elinux.org/R-Car/Boards/M3SK#Flashing_firmware中的步骤
于 2019-08-17T14:25:48.203 回答