Cm3 IO board SDcard detection

Hi there,

I can get uboot to boot my kernel, however the kernel is not detecting the SDcard.

I have tried both the following dtbs :
rk3566-rock-cm3-e23-io.dtb
rk3566-rock-cm3-rpi-cm4-io.dtb

Here are the linux repo, version, defconfig and dtb :
BR2_LINUX_KERNEL_CUSTOM_REPO_URL=“https://github.com/radxa/kernel.git
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION=“a4e78ea509f7c32206d84301e674b9718583ace1”
BR2_LINUX_KERNEL_USE_DEFCONFIG=y
BR2_LINUX_KERNEL_DEFCONFIG=“rockchip_linux”
#BR2_LINUX_KERNEL_INTREE_DTS_NAME=“rockchip/rk3566-rock-cm3-e23-io”
BR2_LINUX_KERNEL_INTREE_DTS_NAME=“rockchip/rk3566-rock-cm3-rpi-cm4-io”

The only mmc devices I see seem to be the onboard flash.

I see the following issue about the regulator :

[    0.835813] dwmmc_rockchip fe2b0000.dwmmc: IDMAC supports 32-bit address mode.
[    0.836191] dwmmc_rockchip fe2b0000.dwmmc: Using internal DMA controller.
[    0.836222] dwmmc_rockchip fe2b0000.dwmmc: Version ID is 270a
[    0.836288] dwmmc_rockchip fe2b0000.dwmmc: DW MMC controller at irq 47,32 bit host data width,256 deep fifo
[    0.836431] dwmmc_rockchip fe2b0000.dwmmc: Linked as a consumer to regulator.4
[    0.836530] dwmmc_rockchip fe2b0000.dwmmc: Linked as a consumer to regulator.14
[    0.836558] dwmmc_rockchip fe2b0000.dwmmc: Failed getting OCR mask: -22
[    0.836838] dwmmc_rockchip fe2b0000.dwmmc: could not set regulator OCR (-22)
[    0.836864] dwmmc_rockchip fe2b0000.dwmmc: failed to enable vmmc regulator
[    0.865184] dwmmc_rockchip fe2c0000.dwmmc: IDMAC supports 32-bit address mode.
[    0.865776] dwmmc_rockchip fe2c0000.dwmmc: Using internal DMA controller.
[    0.865802] dwmmc_rockchip fe2c0000.dwmmc: Version ID is 270a
[    0.865873] dwmmc_rockchip fe2c0000.dwmmc: DW MMC controller at irq 48,32 bit host data width,256 deep fifo
[    0.866025] dwmmc_rockchip fe2c0000.dwmmc: allocated mmc-pwrseq

OK - new information.

At time 2 seconds, the system is waiting for the sdcard to appear so that it can boot :
[ 1.959313] Waiting for root device /dev/mmcblk1p2...

Then only at time 48 seconds does the sdcard actually appear, due to some internal error
[ 46.725716] dwmmc_rockchip fe2b0000.dwmmc: could not set regulator OCR (-22)
[ 46.725793] dwmmc_rockchip fe2b0000.dwmmc: failed to enable vmmc regulator
[ 47.422671] dwmmc_rockchip fe2b0000.dwmmc: Unexpected xfer timeout, state 0
[ 47.462642] dwmmc_rockchip fe2b0000.dwmmc: Busy; trying anyway
[ 47.962669] mmc_host mmc1: Timeout sending command (cmd 0x202000 arg 0x0 status 0x80202000)
[ 47.965217] dwmmc_rockchip fe2b0000.dwmmc: could not set regulator OCR (-22)
[ 47.965231] dwmmc_rockchip fe2b0000.dwmmc: failed to enable vmmc regulator
[ 48.019167] mmc_host mmc1: Bus speed (slot 0) = 50000000Hz (slot req 50000000Hz, actual 50000000HZ div = 0)
[ 48.019258] mmc1: new high speed SDHC card at address 59b4
[ 48.021000] mmcblk1: mmc1:59b4 5WCGO 14.9 GiB
[ 48.022391] mmcblk1: p1 p2
[ 48.043258] EXT4-fs (mmcblk1p2): mounted filesystem with ordered data mode. Opts: (null)
[ 48.043324] VFS: Mounted root (ext4 filesystem) on device 179:98.

# cat /proc/version 
Linux version 4.19.193 (flatmax@dev) (gcc version 10.3.0 (Buildroot 2022.05

This is now fixed by switching to the following kernel version :
BR2_LINUX_KERNEL_CUSTOM_REPO_URL=“https://github.com/radxa/kernel.git
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION=“0f91d24e217c2d146d0f82c1982b4b7d1c2e3573”
BR2_LINUX_KERNEL_DEFCONFIG=“rockchip_linux”
BR2_LINUX_KERNEL_INTREE_DTS_NAME=“rockchip/rk3566-radxa-cm3-io”