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

Compute Module • CM5 additional SD card - GPIO22-27

$
0
0
In my custom baseboard I have a SD card holder connected to pins GPIO 22-27 and it works great with a CM4 and using the custom overlay from @Lauszus posted here: https://forums.raspberrypi.com/viewtopic.php?t=302634.
Now I'm trying to get my system to work on the CM5. I have managed to get everything working, except the additional external SD card. I have attempted to update the overlay to what I could derive from the sdio-pi overlay, but I''m probably doing something wrong because it's not working. What makes this harder is that this is running BalenaOS which is a hardened distribution lacking some of the tools like vcdbg, so I'm somewhat restricted in my troubleshooting.

Custom overlay attempted to update it for CM5:

Code:

/* * Device tree overlay for enabling SDIO (mmc0) on GPIO 22-27 for Raspberry Pi CM5. * Adapted from CM4 overlay by Kristian Sloth Lauszus. *//dts-v1/;/plugin/;/ {    compatible = "brcm,bcm2712";    fragment@0 {        target = <&mmc0>;        frag0: __overlay__ {            pinctrl-names = "default";            pinctrl-0 = <&sdio_pins>;            bus-width = <4>;            status = "okay";            non-removable; /* Optional: Set if card-detect pin is not used */        };    };    fragment@1 {        target = <&gpio>;        __overlay__ {            sdio_pins: sdio_pins {                brcm,pins = <22 23 24 25 26 27>;                brcm,function = <7>; /* ALT7 for mmc0 on CM5 */                brcm,pull = <0 2 2 2 2 2>; /* No pull on CLK, pull-up on others */            };        };    };    __overrides__ {        bus_width = <&frag0>,"bus-width:0";        overclock = <&frag0>,"sdio-overclock:0";        poll_once = <&frag0>,"poll-once?";    };};
The issue is that nothing happens, the GPIO lines aren't allocated (using pinctrl), I don't see anything that stands out in dmesg, however I don't see anything logged in dmesg on my CM4 device either, where it works fine. I do see the mount messages on my CM4 when I plug in a SD card, again nothing when plugging in the card on the CM5 (which is expected since the GPIO lines aren't used).
I've attempted to use the official sdio-pi5 overlay, but it makes my system unreachable (due to how my hardware is used I don't have access to the display or console via serial to see if it's stuck on booting due to some conflict, or if it somehow can't reach the network). I realize this makes it harder to troubleshoot, and if I can't figure it out with some help here then my next step will be to try to access the console logs via uart or run a normal distro on this hardware).

Any obvious issues with the overlay above? Any suggestions on how I can troubleshoot (without access to vcdbg)?

I'll be honest I used Grok to update the sd0-overlay for Pi5 above as I don't quite understand the differences. :shock:

Statistics: Posted by hakanl — Thu Apr 17, 2025 11:32 pm



Viewing all articles
Browse latest Browse all 8037

Trending Articles