This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM3352: eMMC initialization fails with replacement part

Part Number: AM3352

Tool/software: Linux

Hello,

We are using the AM3352 on a custom board running Linux 4.9 built from the sources in the TI processor SDK 04.02.00.  We were originally using a Micron eMMC p/n MTFC16GJDDQ-4M IT (JEDEC/MMC 4.41) which worked correctly with the eMMC driver supplied with the kernel.  Due to obsolesence, the eMMC was replaced with Micron p/n MTFC16GAKAENA-4M IT (JEDEC/MMC 5.0).  With the new eMMC, when the kernel boots and attempts to initialize the eMMC, the follwing is output and the boot process halts:

mmc0: error -110 whilst initialising MMC card

It appears that the calls to mmc_switch in mmc_select_bus_width as well as the call to mmc_switch to enable HPI in mmc_init_card (both located in mmc.c) are returning -110 (-ETIMEDOUT) which is causing mmc_init_card to return -110 and thus the mmc initialization fails.

The relevant device tree entries for the mmc are as follows:


mmc2: mmc@481d8000 {
    compatible = "ti,omap4-hsmmc";
    ti,hwmods = "mmc2";
    ti,needs-special-reset;
    dmas = <&edma 2 0
        &edma 3 0>;
    dma-names = "tx", "rx";
    interrupts = <28>;
    interrupt-parent = <&intc>;
    reg = <0x481d8000 0x1000>;
    status = "disabled";
    };

&mmc2 {
    vmmc-supply = <&vmmc_reg>;
    pinctrl-names = "default";
    pinctrl-0 = <&emmc_pins>;
    bus-width = <8>;
    ti,non-removable;
    non-removable;
    wp-gpios = <&gpio1 28 GPIO_ACTIVE_LOW>;
    ti,needs-special-hs-handling;
    status = "okay";
};


The complete kernel boot log is attached.

Any suggestions?  Thank you.

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.9.59-alc (jeff@alcdeb04m) (gcc version 6.2.1 20161016 (Linaro GCC 6.2-2016.11) ) #1 PREEMPT Fri Mar 22 13:10:19 EDT 2019
[    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt:Machine model: TI AM335x ALC
[    0.000000] cma: Reserved 24 MiB at 0x8d800000
[    0.000000] Memory policy: Data cache writeback
[    0.000000] CPU: All CPU(s) started in SVC mode.
[    0.000000] AM335X ES2.1 (neon)
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 64516
[    0.000000] Kernel command line: console=ttyO0,115200n8 loginShell=allow root=/dev/mmcblk0p2 ro rootflags=data=ordered,journal_checksum,commit=1,discard rootfstype=ext4 t
[    0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Memory: 223124K/260096K available (6144K kernel code, 382K rwdata, 2032K rodata, 1024K init, 245K bss, 12396K reserved, 24576K cma-reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xd0000000 - 0xff800000   ( 760 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xcfe00000   ( 254 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0700000   (7136 kB)
[    0.000000]       .init : 0xc0900000 - 0xc0a00000   (1024 kB)
[    0.000000]       .data : 0xc0a00000 - 0xc0a5f8b0   ( 383 kB)
[    0.000000]        .bss : 0xc0a61000 - 0xc0a9e430   ( 246 kB)
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000]  Build-time adjustment of leaf fanout to 32.
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
[    0.000000] OMAP clockevent source: timer2 at 24000000 Hz
[    0.000020] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000046] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000061] OMAP clocksource: timer1 at 24000000 Hz
[    0.001019] clocksource_probe: no matching clocksources found
[    0.001352] Console: colour dummy device 80x30
[    0.001391] Calibrating delay loop... 597.60 BogoMIPS (lpj=2988032)
[    0.118706] pid_max: default: 32768 minimum: 301
[    0.118839] Security Framework initialized
[    0.118907] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.118921] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.119851] CPU: Testing write buffer coherency: ok
[    0.120284] Setting up static identity map for 0x80100000 - 0x80100078
[    0.123645] devtmpfs: initialized
[    0.140639] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[    0.141340] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.141376] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.143354] pinctrl core: initialized pinctrl subsystem
[    0.144918] NET: Registered protocol family 16
[    0.147793] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.170823] omap_hwmod: debugss: _wait_target_disable failed
[    0.242080] OMAP GPIO hardware version 0.1
[    0.274534] No ATAGs?
[    0.274568] hw-breakpoint: debug architecture 0x4 unsupported.
[    0.274967] omap4_sram_init:Unable to allocate sram needed to handle errata I688
[    0.274983] omap4_sram_init:Unable to get sram pool needed to handle errata I688
[    0.348654] edma 49000000.edma: TI EDMA DMA engine driver
[    0.355979] SCSI subsystem initialized
[    0.357876] usbcore: registered new interface driver usbfs
[    0.358058] usbcore: registered new interface driver hub
[    0.358234] usbcore: registered new device driver usb
[    0.359926] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c0_pins, deferring probe
[    0.360355] pps_core: LinuxPPS API ver. 1 registered
[    0.360372] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.360477] PTP clock support registered
[    0.364445] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
[    0.367578] clocksource: Switched to clocksource timer1
[    0.367790] VFS: Disk quotas dquot_6.6.0
[    0.367880] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.396066] NET: Registered protocol family 2
[    0.398834] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
[    0.398887] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[    0.398926] TCP: Hash tables configured (established 2048 bind 2048)
[    0.399015] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.399042] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.399293] NET: Registered protocol family 1
[    0.399792] RPC: Registered named UNIX socket transport module.
[    0.399812] RPC: Registered udp transport module.
[    0.399821] RPC: Registered tcp transport module.
[    0.399831] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.400755] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.401304] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
[    0.406468] workingset: timestamp_bits=30 max_order=16 bucket_order=0
[    0.407356] NFS: Registering the id_resolver key type
[    0.407414] Key type id_resolver registered
[    0.407427] Key type id_legacy registered
[    0.414770] NET: Registered protocol family 38
[    0.414831] io scheduler noop registered
[    0.414844] io scheduler deadline registered
[    0.414917] io scheduler cfq registered (default)
[    0.416703] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
[    0.420981] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[    0.424875] omap_uart 44e09000.serial: no wakeirq for uart0
[    0.425023] 44e09000.serial: ttyO0 at MMIO 0x44e09000 (irq = 158, base_baud = 3000000) is a OMAP UART0
[    1.023541] console [ttyO0] enabled
[    1.029132] omap_rng 48310000.rng: OMAP Random Number Generator ver. 20
[    1.060219] brd: module loaded
[    1.076031] loop: module loaded
[    1.091322] libphy: Fixed MDIO Bus: probed
[    1.099136] vcan: Virtual CAN interface driver
[    1.103821] slcan: serial line CAN interface driver
[    1.110581] slcan: 10 dynamic interface channels.
[    1.115537] CAN device driver interface
[    1.121340] usbcore: registered new interface driver asix
[    1.128183] usbcore: registered new interface driver ax88179_178a
[    1.134813] usbcore: registered new interface driver cdc_ether
[    1.141426] usbcore: registered new interface driver smsc95xx
[    1.147889] usbcore: registered new interface driver net1080
[    1.153990] usbcore: registered new interface driver cdc_subset
[    1.160527] usbcore: registered new interface driver zaurus
[    1.166711] usbcore: registered new interface driver cdc_ncm
[    1.173853] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.181241] ehci-omap: OMAP-EHCI Host Controller driver
[    1.187219] usbcore: registered new interface driver cdc_wdm
[    1.193652] usbcore: registered new interface driver usb-storage
[    1.200478] usbcore: registered new interface driver usbserial
[    1.206972] usbcore: registered new interface driver usbserial_generic
[    1.214158] usbserial: USB Serial support registered for generic
[    1.220862] usbcore: registered new interface driver ftdi_sio
[    1.227169] usbserial: USB Serial support registered for FTDI USB Serial Device
[    1.236227] i2c /dev entries driver
[    1.242322] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
[    1.252268] omap_hsmmc 481d8000.mmc: Got WP GPIO
[    1.262874] ledtrig-cpu: registered to indicate activity on CPUs
[    1.270967] omap-aes 53500000.aes: OMAP AES hw accel rev: 3.2
[    1.277278] omap-aes 53500000.aes: will run requests pump with realtime priority
[    1.287016] omap-sham 53100000.sham: hw accel on OMAP rev 4.3
[    1.295397] usbcore: registered new interface driver usbhid
[    1.302009] usbhid: USB HID core driver
[    1.307208] oprofile: using arm/armv7
[    1.311866] nf_conntrack version 0.5.0 (4096 buckets, 16384 max)
[    1.318916] Initializing XFRM netlink socket
[    1.323447] NET: Registered protocol family 17
[    1.328328] NET: Registered protocol family 15
[    1.332999] can: controller area network core (rev 20120528 abi 9)
[    1.339635] NET: Registered protocol family 29
[    1.344306] can: raw protocol (rev 20120528)
[    1.348845] can: broadcast manager protocol (rev 20161123 t)
[    1.354794] can: netlink gateway (rev 20130117) max_hops=1
[    1.360751] Key type dns_resolver registered
[    1.365484] omap_voltage_late_init: Voltage driver support not added
[    1.372877] ThumbEE CPU extension supported.
[    1.411608] vrtc: supplied by vcc_5v0_pmic
[    1.420019] vio: supplied by vcc_5v0_pmic
[    1.426108] vdd1: supplied by vcc_5v0_pmic
[    1.432699] vdd2: supplied by vcc_5v0_pmic
[    1.439459] random: fast init done
[    1.444681] vdig1: supplied by vcc_5v0_pmic
[    1.450900] vdig2: supplied by vcc_5v0_pmic
[    1.456958] vpll: supplied by vcc_5v0_pmic
[    1.463080] vdac: supplied by vcc_5v0_pmic
[    1.469247] vaux1: supplied by vcc_5v0_pmic
[    1.475323] vaux2: supplied by vcc_5v0_pmic
[    1.481568] vaux33: supplied by vcc_5v0_pmic
[    1.487821] vmmc: supplied by vcc_5v0_pmic
[    1.493848] vbb: supplied by vcc_5v0_pmic
[    1.502021] rtc-pcf8523 0-0068: rtc core: registered rtc-pcf8523 as rtc0
[    1.510401] at24 0-0051: 32768 byte 24c256 EEPROM, writable, 64 bytes/write
[    1.518389] 0-0022 supply vcc not found, using dummy regulator
[    1.525980] pca953x 0-0022: interrupt support not compiled in
[    1.533329] at24 0-0050: 32768 byte 24c256 EEPROM, writable, 64 bytes/write
[    1.541011] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
[    1.547993] omap_hsmmc 481d8000.mmc: Got WP GPIO
[    1.677616] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
[    1.684044] libphy: 4a101000.mdio: probed
[    1.689296] omap_hsmmc 481d8000.mmc: omap_hsmmc_init_card:2101
[    1.695974] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver SMSC LAN8710/LAN8720
[    1.706006] davinci_mdio 4a101000.mdio: phy[1]: device 4a101000.mdio:01, driver Micrel KSZ9031 Gigabit PHY
[    1.717420] cpsw 4a100000.ethernet: Detected MACID = 4c:3f:d3:52:3b:77
[    1.724803] cpsw 4a100000.ethernet: device node lookup for pps timer failed
[    1.732382] cpsw 4a100000.ethernet: cpts: overflow check period 500 (jiffies)
[    1.767828] at24: offset=70 ff:ff:ff:ff:ff:ff
[    1.848595] mmc0: error -110 whilst initialising MMC card
[    1.855487] cpsw 4a100000.ethernet: EEPROM MACID1 is not valid and Detected MACID1 FROM TI SOC  = 4c:3f:d3:52:3b:79
[    1.870939] rtc-pcf8523 0-0068: setting system clock to 2019-03-22 12:19:13 UTC (1553257153)
[    1.881545] Waiting for root device /dev/mmcblk0p2...

  • Hello Jeffrey,

    In Uboot, I am wondering if you are able to see the eMMC device using the command "mmc dev". Also, could you please confirm if you are seeing any clock activities on the eMMC device.

    Regards,
    Krunal
  • Yes, u-boot is able to see/mount the eMMC (that's how the kernel is loaded since it resides on a partition on the eMMC).

    I believe I have found the root cause: The new eMMC device is JEDEC 5.0 compliant while the original device is 4.41 compliant.  It seems that somewhere around JEDEC 4.5 the ability to determine certain eMMC read/write/switch timeouts directly from the device was introduced.  The 4.9 Linux kernel eMMC driver supports this and was using timeout values retrieved from the new device, whereas it had been using internal default values for the old device.  Unfortunately it seems that some of the values provided by the card were not long enough, leading to timeouts when configuring the device.  I was able to patch the kernel to avoid reading the offending timeouts from the new device (using defaults instead) for our application and it is now able to boot and mount the device normally.