Some microSD cards aren't readable on BBAI: mmc0: error -110 whilst initialising SD card

I have a number of microSD cards that aren’t readable on the BBAI. They work fine when reading/flashing to them on my computer, they work fine on the BBB and U-Boot seems to read the /boot/uEnv.txt file on it fine. After the kernel loads, though, I see this error “mmc0: error -110 whilst initialising SD card” and the board never finishes booting and eventually is thrown into an initramfs terminal:

U-Boot 2022.04-ge0d31da5 (Aug 23 2022 - 19:11:21 +0000)

CPU  : DRA752-GP ES2.0
Model: BeagleBoard.org BeagleBone AI
Board: BeagleBone AI REV A
DRAM:  1 GiB
Core:  60 devices, 16 uclasses, devicetree: separate
MMC:   no pinctrl state for default mode
omap_hsmmc_init_setup: timedout waiting for cc2!
no pinctrl state for default mode
omap_hsmmc_init_setup: timedout waiting for cc2!
mmc@480d1000 - probe failed: -110
OMAP SD/MMC: 0, OMAP SD/MMC: 1no pinctrl state for default mode
omap_hsmmc_init_setup: timedout waiting for cc2!

Loading Environment from nowhere... OK
BeagleBone Cape EEPROM: no EEPROM at address: 0x54
BeagleBone Cape EEPROM: no EEPROM at address: 0x55
BeagleBone Cape EEPROM: no EEPROM at address: 0x56
BeagleBone Cape EEPROM: no EEPROM at address: 0x57
Net:   eth2: ethernet@48484000
Press SPACE to abort autoboot in 1 seconds
switch to partitions #0, OK
mmc0 is current device

Partition Map for MMC device 0  --   Partition Type: DOS

Part    Start Sector    Num Sectors     UUID            Type
  1     8192            1835008         8e6714ae-01     83 Boot
Scanning mmc device 0
Checking for: /uEnv.txt ...
Checking for: /boot/uEnv.txt ...
1395 bytes read in 4 ms (339.8 KiB/s)
Loaded environment from /boot/uEnv.txt
Checking if uname_r is set in /boot/uEnv.txt ...
debug: [uname_r=4.19.94-ti-r74] ...
loading /boot/vmlinuz-4.19.94-ti-r74 ...
10179072 bytes read in 441 ms (22 MiB/s)
loading /boot/dtbs/4.19.94-ti-r74/am5729-beagleboneai.dtb ...
252439 bytes read in 17 ms (14.2 MiB/s)
uboot_overlays: [fdt_buffer=0x60000] ...
loading /boot/initrd.img-4.19.94-ti-r74 ...
7411849 bytes read in 322 ms (22 MiB/s)
debug: [console=ttyS0,115200n8 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 rng_core.default_quality=100 quiet] ...
debug: [bootz 0x82000000 0x88080000:711889 0x88000000] ...
Kernel image @ 0x82000000 [ 0x000000 - 0x9b5200 ]
## Flattened Device Tree blob at 88000000
   Booting using the fdt blob at 0x88000000
   Loading Ramdisk to 8f8ee000, end 8ffff889 ... OK
   Loading Device Tree to 8f8ad000, end 8f8eda16 ... OK

Starting kernel ...

[    0.003398] /cpus/cpu@0 missing clock-frequency property
[    0.003421] /cpus/cpu@1 missing clock-frequency property
[    0.561970] omap-mailbox 4a0f4000.mailbox: no available mbox devices found
[    0.562041] omap-mailbox 4883a000.mailbox: no available mbox devices found
[    0.562108] omap-mailbox 4883c000.mailbox: no available mbox devices found
[    0.562173] omap-mailbox 4883e000.mailbox: no available mbox devices found
[    0.562838] omap-mailbox 48844000.mailbox: no available mbox devices found
[    0.562906] omap-mailbox 48846000.mailbox: no available mbox devices found
[    0.562971] omap-mailbox 4885e000.mailbox: no available mbox devices found
[    0.563035] omap-mailbox 48860000.mailbox: no available mbox devices found
[    0.563098] omap-mailbox 48862000.mailbox: no available mbox devices found
[    0.563161] omap-mailbox 48864000.mailbox: no available mbox devices found
[    0.563225] omap-mailbox 48802000.mailbox: no available mbox devices found
[    1.147876] sdhci-omap 4809c000.mmc: failed to set system capabilities
[    1.155141] sdhci-omap 480b4000.mmc: failed to set system capabilities
[    1.360064] dwc3 488d0000.usb: Failed to get clk 'ref': -2
[    1.439976] omap_voltage_late_init: Voltage driver support not added
[    1.537152] sdhci-omap 4809c000.mmc: no pinctrl state for ddr_1_8v mode
[    1.543834] sdhci-omap 4809c000.mmc: no pinctrl state for ddr_3_3v mode
[    1.550507] sdhci-omap 4809c000.mmc: no pinctrl state for hs200_1_8v mode
[    1.644468] dwc3 48890000.usb: Failed to get clk 'ref': -2
[    1.659172] OF: graph: no port node found in /ocp/ocp2scp@4a080000/phy@4a084000
[    1.667258] mmc0: error -110 whilst initialising SD card
[    1.674124] dwc3 488d0000.usb: Failed to get clk 'ref': -2
[    1.700411] omapdss error: HDMI I2C Master Error
[    2.722541] omapdss error: HDMI I2C Master Error
Gave up waiting for root file system device.  Common problems:
 - Boot args (cat /proc/cmdline)
   - Check rootdelay= (did the system wait long enough?)
 - Missing modules (cat /proc/modules; ls /dev)
ALERT!  /dev/mmcblk0p1 does not exist.  Dropping to a shell!


BusyBox v1.30.1 (Debian 1:1.30.1-4) built-in shell (ash)
Enter 'help' for a list of built-in commands.

(initramfs) 

If I boot the BBAI to the eMMC and try to insert the microSD card I see the same error pop up and /dev/mmcblk0p1 never shows up. I have a number of microSD cards (at least 3, but it seems to be a trend with a new batch of cards that we have, so it is likely more) that do this. I have a number of older cards that work fine. Nothing physical about the cards seems different, and I’ve tried this on 3 different BBAIs and get the same behavior.

Anyone have any ideas?

In case it’s helpful, here is the serial output of the same image when booting to one of the good microSD cards:

U-Boot 2022.04-ge0d31da5 (Aug 23 2022 - 19:11:21 +0000)

CPU  : DRA752-GP ES2.0
Model: BeagleBoard.org BeagleBone AI
Board: BeagleBone AI REV A
DRAM:  1 GiB
Core:  60 devices, 16 uclasses, devicetree: separate
MMC:   no pinctrl state for default mode
omap_hsmmc_init_setup: timedout waiting for cc2!
no pinctrl state for default mode
omap_hsmmc_init_setup: timedout waiting for cc2!
mmc@480d1000 - probe failed: -110
OMAP SD/MMC: 0, OMAP SD/MMC: 1no pinctrl state for default mode
omap_hsmmc_init_setup: timedout waiting for cc2!

Loading Environment from nowhere... OK
BeagleBone Cape EEPROM: no EEPROM at address: 0x54
BeagleBone Cape EEPROM: no EEPROM at address: 0x55
BeagleBone Cape EEPROM: no EEPROM at address: 0x56
BeagleBone Cape EEPROM: no EEPROM at address: 0x57
Net:   eth2: ethernet@48484000
Press SPACE to abort autoboot in 1 seconds
switch to partitions #0, OK
mmc0 is current device

Partition Map for MMC device 0  --   Partition Type: DOS

Part    Start Sector    Num Sectors     UUID            Type
  1     8192            1835008         8e6714ae-01     83 Boot
Scanning mmc device 0
Checking for: /uEnv.txt ...
Checking for: /boot/uEnv.txt ...
1395 bytes read in 3 ms (454.1 KiB/s)
Loaded environment from /boot/uEnv.txt
Checking if uname_r is set in /boot/uEnv.txt ...
debug: [uname_r=4.19.94-ti-r74] ...
loading /boot/vmlinuz-4.19.94-ti-r74 ...
10179072 bytes read in 440 ms (22.1 MiB/s)
loading /boot/dtbs/4.19.94-ti-r74/am5729-beagleboneai.dtb ...
252439 bytes read in 17 ms (14.2 MiB/s)
uboot_overlays: [fdt_buffer=0x60000] ...
loading /boot/initrd.img-4.19.94-ti-r74 ...
7411849 bytes read in 321 ms (22 MiB/s)
debug: [console=ttyS0,115200n8 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 rng_core.default_quality=100 quiet] ...
debug: [bootz 0x82000000 0x88080000:711889 0x88000000] ...
Kernel image @ 0x82000000 [ 0x000000 - 0x9b5200 ]
## Flattened Device Tree blob at 88000000
   Booting using the fdt blob at 0x88000000
   Loading Ramdisk to 8f8ee000, end 8ffff889 ... OK
   Loading Device Tree to 8f8ad000, end 8f8eda16 ... OK

Starting kernel ...

[    0.003395] /cpus/cpu@0 missing clock-frequency property
[    0.003418] /cpus/cpu@1 missing clock-frequency property
[    0.561666] omap-mailbox 4a0f4000.mailbox: no available mbox devices found
[    0.561736] omap-mailbox 4883a000.mailbox: no available mbox devices found
[    0.561830] omap-mailbox 4883c000.mailbox: no available mbox devices found
[    0.561898] omap-mailbox 4883e000.mailbox: no available mbox devices found
[    0.562567] omap-mailbox 48844000.mailbox: no available mbox devices found
[    0.562635] omap-mailbox 48846000.mailbox: no available mbox devices found
[    0.562699] omap-mailbox 4885e000.mailbox: no available mbox devices found
[    0.562762] omap-mailbox 48860000.mailbox: no available mbox devices found
[    0.562825] omap-mailbox 48862000.mailbox: no available mbox devices found
[    0.562888] omap-mailbox 48864000.mailbox: no available mbox devices found
[    0.562950] omap-mailbox 48802000.mailbox: no available mbox devices found
[    1.147781] sdhci-omap 4809c000.mmc: failed to set system capabilities
[    1.155038] sdhci-omap 480b4000.mmc: failed to set system capabilities
[    1.359718] dwc3 488d0000.usb: Failed to get clk 'ref': -2
[    1.439663] omap_voltage_late_init: Voltage driver support not added
[    1.535452] sdhci-omap 4809c000.mmc: no pinctrl state for ddr_1_8v mode
[    1.542135] sdhci-omap 4809c000.mmc: no pinctrl state for ddr_3_3v mode
[    1.548810] sdhci-omap 4809c000.mmc: no pinctrl state for hs200_1_8v mode
[    1.640951] dwc3 48890000.usb: Failed to get clk 'ref': -2
[    1.655436] OF: graph: no port node found in /ocp/ocp2scp@4a080000/phy@4a084000
[    1.666872] dwc3 488d0000.usb: Failed to get clk 'ref': -2
[    1.698985] omapdss error: HDMI I2C Master Error
[    2.722186] omapdss error: HDMI I2C Master Error
[    6.889785] cpu cpu0: _get_optimal_vdd_voltage: Failed optimized voltage match for 860000
[    7.382768] remoteproc remoteproc0: request_firmware failed: -2
[    7.398259] remoteproc remoteproc1: request_firmware failed: -2
[    7.413191] remoteproc remoteproc2: request_firmware failed: -2
[    7.447935] remoteproc remoteproc3: request_firmware failed: -2

Debian GNU/Linux 10 beaglebone ttyS0

BeagleBoard.org Debian Buster Console Image 2023-06-27
Support: https://bbb.io/debian
default username:password is [debian:temppwd]

beaglebone login: 

And this is the image I’m using:
https://rcn-ee.net/rootfs/snapshot/2023-06-27/buster-console-armhf/am57xx-debian-10.13-console-armhf-2023-06-27-1gb.img.xz

I saw similar behavior on this one as well:
https://rcn-ee.com/rootfs/bb.org/testing/2023-05-18/bullseye-minimal-armhf/am57xx-debian-11.7-minimal-armhf-2023-05-18-2gb.img.xz

The only pattern we’ve been able to spot is the batch that works says made in Malaysia and the ones that don’t say made in Taiwan. My best guess is there is something minutely physically different between them. If I press on the microSD card holder while it boots with one of the bad ones, I can get it recognize it sometimes.

So, not to throw a wrench into this, but in 5.4.x timeframe, TI nuked the ti specific ti,omap4-hsmmc driver and moved to the sdhci-omap driver, mainly as it’s a shared generic sdhci stack.

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/arch/arm/boot/dts/dra7.dtsi?h=v6.4&id=940293affa7ed7c0bdb1820ecf7a8f12e901d030

So, i’d really ‘retest’ on 5.10.x-ti image with those same microSD cards…

Regards,

Thanks for the extra info, Robert! I thought I had tested this with the Debian 11 minimal image here (I at least downloaded it!): https://rcn-ee.com/rootfs/bb.org/testing/2023-05-18/bullseye-minimal-armhf/am57xx-debian-11.7-minimal-armhf-2023-05-18-2gb.img.xz

Trying it again with several different cards, it does seem to be the difference between working and not working with the cards I was having issues with. Thanks!

Hi Robert, the same issue occurs on my BBAI64 when using certain micro SD cards when using Ubuntu 22.04.3 (16 Nov Image). Do you think this will be resolved in the near future for Ubuntu 22?

Thanks

1 Like