Issue:
I’m using a Compute Module 5 (CM5) with built-in eMMC, which repurposes the SD card pins for eMMC. I’ve tried adapting the sdhost-overlay.dts approach (successful on CM4) to re-enable SD card access via GPIO 22-27, but without success.
What I’ve Done:
Created an overlay (sdhost-overlay.dts) to configure sdhost on GPIO 22-27 (SD0 pins, ALT0 function).
Compiled and copied the overlay to /boot/overlays/.
Added dtoverlay=sdhost-overlay to config.txt.
Problem:
The SD card is not detected (dmesg shows no activity).
Confirmed GPIO 22-27 are not conflicting with other functions.
Verified voltage levels (3.3V) on SD card pins.
Hardware:
CM5 (eMMC variant) – SD card slot wired to GPIO 22-27 (CLK, CMD, DAT0-DAT3).
Power supply: Stable 3.3V/5V.
Overlay Used:
dtsSteps Taken:
Compiled with:
bashAdded to config.txt:
iniRebooted and checked dmesg | grep -i sd.
Questions:
Is sdhost still the correct driver for CM5’s SD interface, or does it require mmc instead?
Are GPIO 22-27 still mapped to SD0 on CM5 (eMMC variant)?
Any known conflicts with eMMC disabling SD host functionality?
Debugging tips (e.g., probe signals with logic analyzer)?
Additional Info:
Kernel: uname -a → Linux fennec 6.12.22-v8-16k+ #1 SMP PREEMPT Tue Apr 15 08:23:02 UTC 2025 aarch64 GNU/Linux
regards for you all
I’m using a Compute Module 5 (CM5) with built-in eMMC, which repurposes the SD card pins for eMMC. I’ve tried adapting the sdhost-overlay.dts approach (successful on CM4) to re-enable SD card access via GPIO 22-27, but without success.
What I’ve Done:
Created an overlay (sdhost-overlay.dts) to configure sdhost on GPIO 22-27 (SD0 pins, ALT0 function).
Compiled and copied the overlay to /boot/overlays/.
Added dtoverlay=sdhost-overlay to config.txt.
Problem:
The SD card is not detected (dmesg shows no activity).
Confirmed GPIO 22-27 are not conflicting with other functions.
Verified voltage levels (3.3V) on SD card pins.
Hardware:
CM5 (eMMC variant) – SD card slot wired to GPIO 22-27 (CLK, CMD, DAT0-DAT3).
Power supply: Stable 3.3V/5V.
Overlay Used:
dts
Code:
/* * Device tree overlay for enabling SD0 via sdhost on GPIO 22-27 *//dts-v1/;/plugin/;/ { compatible = "brcm,bcm2711"; fragment@0 { target = <&sdhost>; frag0: __overlay__ { pinctrl-names = "default"; pinctrl-0 = <&sdhost_pins>; bus-width = <4>; brcm,overclock-50 = <0>; brcm,pio-limit = <1>; status = "okay"; }; }; fragment@1 { target = <&gpio>; __overlay__ { sdhost_pins: sdhost_pins { brcm,pins = <22 23 24 25 26 27>; // CLK, CMD, DAT0-DAT3 brcm,function = <4 4 4 4 4 4>; // ALT0: SD0 brcm,pull = <0 2 2 2 2 2>; // Pull up except CLK }; }; };};Compiled with:
bash
Code:
dtc -@ -I dts -O dtb -o sdhost-overlay.dtbo sdhost-overlay.dtssudo cp sdhost-overlay.dtbo /boot/overlays/ini
Code:
dtoverlay=sdhost-overlayQuestions:
Is sdhost still the correct driver for CM5’s SD interface, or does it require mmc instead?
Are GPIO 22-27 still mapped to SD0 on CM5 (eMMC variant)?
Any known conflicts with eMMC disabling SD host functionality?
Debugging tips (e.g., probe signals with logic analyzer)?
Additional Info:
Kernel: uname -a → Linux fennec 6.12.22-v8-16k+ #1 SMP PREEMPT Tue Apr 15 08:23:02 UTC 2025 aarch64 GNU/Linux
regards for you all
Statistics: Posted by mot1639 — Thu May 22, 2025 4:18 am