No SD card on CM3s in various carrier boards

I’m currently evaluating the CM3 for a customer while also working on my own carrier board. I have three CM3s (v1.31A): one with eMMC, booting the Radxa Debian image, plus two lower-end units with no eMMC or WiFi. I’ve been unable to get an actual Radxa CM3-IO board, and am working with various other carrier boards:

  • Official Raspberry Pi CM4 IO board
  • PINE64 SOQuartz carrier
  • PINE64 SOQuartz blade
  • Big Tree Tech Pi4B board

I’m not able to get any CM3 unit to talk to any SD card in any of the carrier boards. I’ve verified the SD card has 3.3V power, but the eMMC CM3 cannot see it once booted, and the non-eMMC CM3s cannot boot. PINE64 SOQuartz modules work fine in the same carriers with the same SD card brands.

I note that a lot of designs including the Ras Pi IO board connect SD card detect to pin 76, though it’s marked as NC. The Ras Pi IO board is populated this way, and does not react to the card. I modified the Ras Pi IO board to connect the card detect so it pulls pin 76 low when a card is inserted, and now when I insert the card I get messages like this:

[  167.228071] mmc_host mmc1: Bus speed (slot 0) = 375000Hz (slot req 400000Hz, actual 375000HZ div = 0)
[  167.368033] mmc_host mmc1: Bus speed (slot 0) = 375000Hz (slot req 300000Hz, actual 187500HZ div = 1)
[  167.380890] mmc_host mmc1: Bus speed (slot 0) = 375000Hz (slot req 375000Hz, actual 375000HZ div = 0)
[  167.508036] mmc_host mmc1: Bus speed (slot 0) = 375000Hz (slot req 200000Hz, actual 187500HZ div = 1)
[  167.518593] mmc_host mmc1: Bus speed (slot 0) = 375000Hz (slot req 375000Hz, actual 375000HZ div = 0)
[  167.644703] mmc_host mmc1: Bus speed (slot 0) = 375000Hz (slot req 100000Hz, actual 93750HZ div = 2)
[  167.657560] mmc_host mmc1: Bus speed (slot 0) = 375000Hz (slot req 375000Hz, actual 375000HZ div = 0)

with Sandisk and Kingston cards, and this with Patriot:

[   27.213710] mmc_host mmc1: Bus speed (slot 0) = 375000Hz (slot req 400000Hz, actual 375000HZ div = 0)
[   27.251688] mmc1: error -110 whilst initialising SD card
[   27.370411] mmc_host mmc1: Bus speed (slot 0) = 375000Hz (slot req 300000Hz, actual 187500HZ div = 1)
[   27.383278] mmc_host mmc1: Bus speed (slot 0) = 375000Hz (slot req 375000Hz, actual 375000HZ div = 0)
[   27.412106] mmc1: error -110 whilst initialising SD card
[   27.530355] mmc_host mmc1: Bus speed (slot 0) = 375000Hz (slot req 200000Hz, actual 187500HZ div = 1)
[   27.543169] mmc_host mmc1: Bus speed (slot 0) = 375000Hz (slot req 375000Hz, actual 375000HZ div = 0)
[   27.568360] mmc1: error -110 whilst initialising SD card
[   27.686733] mmc_host mmc1: Bus speed (slot 0) = 375000Hz (slot req 100000Hz, actual 93750HZ div = 2)
[   27.699389] mmc_host mmc1: Bus speed (slot 0) = 375000Hz (slot req 375000Hz, actual 375000HZ div = 0)
[   27.725094] mmc1: error -110 whilst initialising SD card
[   33.760831] vcc_sd: disabling

With these modifications the SOQuartz still boots as expected.

Can you advise what I need to do to reliably boot the CM3 from SD card? My customer would like to select a module for their product, and I’d like to finish off my carrier board and get it into fab. Both need the option of booting a non-eMMC CM3 from SD card.

Thanks!

I like to know the solution to this to. Have not had any luck with any IO ports on any carrier board except for radxa’s own board.

Update: I added a devicetree overlay to add the broken-cd property to the SD card controller:

/** Overlay for debugging SD card on Radxa's Rock 3 CM3 image
 *
 * To use this dts:
 * - save this to a file named sdio.dtso
 * - apt-get install device-tree-compiler
 * - dtc -@ -I dts -O dtb -o sdio.dtbo sdio.dtso
 * - sudo cp gpio_pull-overlay.dtb /boot/overlays
 * - add this to the bootloader's overlay list
 */
/dts-v1/;
/plugin/;
/ {
	compatible = "radxa,radxa-cm3-io\0rockchip,rk3566";
	fragment@0 {
		target = <&sdmmc0>;
		__overlay__ {
			 broken-cd;
		};
	};
};

After this, the kernel can detect card insert/remove:

[  239.183494] mmc1: new high speed SDHC card at address 59b4
[  239.187602] mmcblk1: mmc1:59b4 SMI-S 7.61 GiB 
[  436.795892] mmc1: card 59b4 removed

All is still not well, since this is a ~32GB card reported as ~8GB, but it’s progress. I cabled the board to a Saleae logic analyzer, and can see the clock and command pins wiggling as expected. Clock speed is ~371KHz in this phase. On insert, there is traffic on one of the data pins:

Subsequent raw reads return all-zeros:

root@radxa-cm3-io:~# dd if=/dev/mmcblk1 count=1 | hexdump -C
00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
1+0 records in
1+0 records out
*
00000200
512 bytes copied, 0.00176114 s, 291 kB/s

Interestingly, this is also the traffic on the bus, in read or write. Clock speed is 2MHz during the data phases:


The card I used is partitioned, so I should see a partition table in that first block. Writing random data to the card also shows all-zero on the Saleae, and has no effect when I examine it in another machine.

Did your problem get resolved ?

I have both “radxa-io-board” and “raspi-4-io-board(Official)”.
If I can get a concrete image-name of the problem you are having and the procedure for doing so,
I can confirm that by comparing the two boards.

My “cm3” is “v1.3” .
And configured with RAM:4GB & Wifi & eMMC:32GB & SPI-Flash.

* I am currently not using “eMMC”. The content is empty. (All “0x00”)


My case is the same as yours too, I could not boot from “SD-Card” at all.
But, After investigating for about 2-days, and I clarified the cause of the problem and took countermeasures, and now I can start it.

In my conclusion is that it is essential to modification the board (raspi-4-io-board: Official) in order to boot from the “SD-Card”.