Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8609

Interfacing (DSI, CSI, I2C, etc.) • CM4 SDIO troubleshooting

$
0
0
Hey all, I've read through a few of the threads here about getting uSD to work via GIPO and I'm running into some issues and/or have a lack of understanding so wanted to put something out there to see if I'm missing something.

I'm using a SD car breakout like this guy: https://www.adafruit.com/product/4682
Using a CM4, with EMMC and no WIFI on a CM-IO board
Flashed from the rpi imager, using the x63 image so:
Kernel version is 6.12.47+rpt-rpi-48
OS is Debian bookworm

I've tried a few different things in config.txt but currently am on just adding the below under the [all] tag:
dtoverlay=sdio,poll_once=off,sdio_overclock=25

if I run a <lslbk> nothing turns up, and <sudo cat /sys/kernel/debug/mmc1/ios> shows 0's across the board, sans bus mode set to "2".

<dmesg | greg mmc1> lists a single entry of "failed to initialize a non-removable card"

lastly, if i do a <raspi-gpio get 22-27,48-53> I get:
GPIO 22: level=1 func=INPUT pull=DOWN
GPIO 23: level=1 func=INPUT pull=DOWN
GPIO 24: level=1 func=INPUT pull=DOWN
GPIO 25: level=1 func=INPUT pull=DOWN
GPIO 26: level=1 func=INPUT pull=DOWN
GPIO 27: level=1 func=INPUT pull=DOWN
GPIO 48: level=0 alt=0 func=SD0_CLK pull=DOWN
GPIO 49: level=0 alt=0 func=SD0_CMD pull=DOWN
GPIO 50: level=0 alt=0 func=SD0_DAT0 pull=DOWN
GPIO 51: level=0 alt=0 func=SD0_DAT1 pull=DOWN
GPIO 52: level=0 alt=0 func=SD0_DAT2 pull=DOWN
GPIO 53: level=0 alt=0 func=SD0_DAT3 pull=DOWN
Trying to make sense of all of this together then, from what I understand 48-53 is correctly handling the onboard EMMC (and also wired to the SD card socket). However, even with the changes to config.txt I see GPIO22-27 just mapped as "inputs" which makes me thing my overlay for SD1 isn't working correctly. I'd expect to see "SD1_xxx" with <xxx> being the various input pins if it were correctly mapped. Is that correct?

Reading up on some of the threads, I understand that using the SDIO interface and mapping GPIO22-27 to the alternate pin mappings for SDIO control without a custom dtb disables BT/WiFi; Since I have neither, I assumed there was no need for the custom dtb to get SDIO working (or rather the effect of disabling BT/WiFi is not a concern to me). Am i incorrect in this?

The chronological order of some of the threads makes me a little unsure if this is a version/kernel issue where previously a custom dtb to expose the SDIO pins to GPIO22-27 was needed and it no longer is, or if it's still needed. I see in the overlay readme at https://github.com/raspberrypi/firmware ... ays/README that the "sdio" dtoverlay should expose on GPIO 22-27 which makes me think just adding the config.txt line would be sufficient.

Statistics: Posted by jungle_jim — Mon Sep 29, 2025 2:02 am



Viewing all articles
Browse latest Browse all 8609

Trending Articles