Other Parts Discussed in Thread: AM4372
Tool/software: Linux
Hi
We are using AM4378 soc based system on module, on which we have mmc0 connected to SDCard(16GB) and mmc1 connected to emmc(4GB). The board is booting up properly with SD Card.
Now we want to enable the emmc and copy our u-boot, linux kernel, rootfs.
SDK using is ti-processor-sdk-linux-am437x-evm-04.00.00.04
Device tree am437x-sk-evm.dts
In device tree(am4372.dtsi) by default, status of mmc1(emmc) is disabled
status = "disabled";
I have enabled it in arch/arm/boot/dts/am437x-sk-evm.dts by adding the following snippet at appropriate place
vmmcsd_fixed: fixedregulator-sd { compatible = "regulator-fixed"; regulator-name = "vmmcsd_fixed"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; enable-active-high; }; emmc_pins: pinmux_emmc_pins { pinctrl-single,pins = < 0x080 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn1.mmc1_clk */ 0x084 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn2.mmc1_cmd */ 0x020 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad8.mmc1_dat0 */ 0x024 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad9.mmc1_dat1 */ 0x028 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad10.mmc1_dat2 */ 0x02c (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad11.mmc1_dat3 */ 0x030 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad12.mmc1_dat4 */ 0x034 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad13.mmc1_dat5 */ 0x038 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad14.mmc1_dat6 */ 0x03c (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad15.mmc1_dat7 */ >; }; &mmc2 { vmmc-supply = <&vmmcsd_fixed>; bus-width = <8>; ti,non-removable; pinctrl-names = "default"; pinctrl-0 = <&emmc_pins>; status = "okay"; };
With reference from dts and User Manual, SD Card(mmc0) should detect at address 0x48060000 and emmc(mmc1) should be at address 0x481d8000. But both are being detecting at 0x48060000 and kernel is failing to load. Please check the below dmesg log for more clear information.
Is there anywhere i am going wrong in dts, from dmesg I see that emmc is given mmcblk0 and SD Card as mmcblk1, which should be the other way.
I feel there is no issue with hardware, as we are able to boot the board properly from emmc by changing boot switches position.
[ 1.539985] omap_hsmmc 48060000.mmc: Got CD GPIO [ 1.570113] omap_hsmmc 47810000.mmc: RX DMA channel request failed [ 1.596398] mmc0: new high speed MMC card at address 0001 [ 1.602731] ledtrig-cpu: registered to indicate activity on CPUs [ 1.611435] NET: Registered protocol family 10 [ 1.612959] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver [ 1.613814] NET: Registered protocol family 17 [ 1.614139] Key type dns_resolver registered [ 1.614499] omap_voltage_late_init: Voltage driver support not added [ 1.648886] mmcblk0: mmc0:0001 Q2J54A 3.59 GiB [ 1.655168] mmcblk0boot0: mmc0:0001 Q2J54A partition 1 16.0 MiB [ 1.661653] mmcblk0boot1: mmc0:0001 Q2J54A partition 2 16.0 MiB [ 1.669285] mmcblk0: p1 p2 p3 [ 1.698067] at24 0-0050: 32768 byte 24c256 EEPROM, writable, 64 bytes/write [ 1.705237] omap_i2c 44e0b000.i2c: bus 0 rev0.12 at 100 kHz [ 1.712488] omap_i2c 4802a000.i2c: bus 1 rev0.12 at 400 kHz [ 1.720345] omap_hsmmc 48060000.mmc: Got CD GPIO [ 1.780397] hctosys: unable to open rtc device (rtc0) [ 1.786176] ALSA device list: [ 1.789163] No soundcards found. [ 1.809587] random: fast init done [ 1.837051] mmc1: host does not support reading read-only switch, assuming write-enable [ 1.847099] mmc1: Problem switching card into high-speed mode! [ 1.853059] mmc1: new SDHC card at address 0001 [ 1.858341] mmcblk1: mmc1:0001 SD 14.6 GiB [ 1.864298] mmcblk1: p1 p2 [ 1.946486] EXT4-fs (mmcblk0p2): recovery complete [ 1.951953] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null) [ 1.960178] VFS: Mounted root (ext4 filesystem) on device 179:2. [ 1.967332] devtmpfs: mounted [ 1.972296] Freeing unused kernel memory: 1024K (c0d00000 - c0e00000) INIT: version 2.88 booting Error opening /dev/fb0: No such file or directory Starting udev [ 2.509809] udevd[126]: starting version 182 [ 5.522622] FAT-fs (mmcblk0p3): Volume was not properly unmounted. Some data may be corrupt. Please run fsck. [ 5.557749] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck. [ 5.646893] EXT4-fs (mmcblk1p2): warning: mounting fs with errors, running e2fsck is recommended [ 5.651469] EXT4-fs (mmcblk1p2): mounted filesystem with ordered data mode. Opts: (null) [ 5.654066] FAT-fs (mmcblk1p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck. ERROR: could not open directory /lib/modules/4.9.28-geed43d1050: No such file or directory WARNING: -e needs -E or -F ERROR: could not open directory /lib/modules/4.9.28-geed43d1050: No such file or directory FATAL: could not search modules: No such file or directory Starting Bootlog daemon: bootlogd. [ 6.992464] EXT4-fs (mmcblk0p2): re-mounted. Opts: data=ordered ALSA: Restoring mixer settings... /usr/sbin/alsactl: load_state:1696: No soundcards found... Configuring network interfaces... [ 7.697720] net eth0: initializing cpsw version 1.15 (0) [ 7.705551] net eth0: initialized cpsw ale version 1.4 [ 7.710845] net eth0: ALE Table size 1024 [ 7.809901] Atheros 8035 ethernet 4a101000.mdio:04: attached PHY driver [Atheros 8035 ethernet] (mii_bus:phy_addr=4a101000.mdio:04, irq=-1) [ 7.830420] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready udhcpc (v1.20.2) started Sending discover... Sending discover... [ 12.010515] cpsw 4a100000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx [ 12.018516] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready Sending discover... ^Chwclock: can't open '/dev/misc/rtc': No such file or directory Mon Jun 9 20:16:00 UTC 2014 hwclock: can't open '/dev/misc/rtc': No such file or directory INIT: Entering runlevel: 5 Starting system message bus: dbus. UIM SYSFS Node Not Found Starting Dropbear SSH server: dropbear. Starting telnet daemon. hwclock: can't open '/dev/misc/rtc': No such file or directory Starting syslogd/klogd: done
Thanks