* [PATCH v2] arm64: dts: rockchip: Add CD GPIO to Orange Pi 5/5B/5Pro
@ 2026-12-03 8:54 Dang Huynh via B4 Relay
2026-12-03 9:07 ` sashiko-bot
0 siblings, 1 reply; 2+ messages in thread
From: Dang Huynh via B4 Relay @ 2026-12-03 8:54 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner
Cc: devicetree, linux-arm-kernel, linux-rockchip, Dang Huynh
From: Dang Huynh <dang.huynh@mainlining.org>
CD GPIO is currently not defined in Orange Pi 5, this breaks
SD card hotplugging.
The SDMMC_DET_L pin is connected to GPIO0_A4 on both OPi 5[0],
OPi 5B[1] and OPi 5 Pro[2].
[0]: https://drive.google.com/file/d/1Wsp-Q7IyG0Ky_W-z1n5oXcFG4oqIbtOb/view?usp=sharing
[1]: https://drive.google.com/file/d/19iPdpAXhA1vFkVOgG5Sz7L6cV8BB6004/view?usp=sharing
[2]: https://drive.google.com/file/d/1qs1DratHuh7C6J6MEtQIwUsiSrg8qgTi/view?usp=sharing
Signed-off-by: Dang Huynh <dang.huynh@mainlining.org>
---
Changes in v2:
- Configure pinmux for CD GPIO
- Link to v1: https://patch.msgid.link/20261121-orange-pi-5-sdcard-v1-1-e431e7c46ba0@mainlining.org
---
arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dtsi | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dtsi b/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dtsi
index 2db6ee95e504..73e41ec63c54 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dtsi
@@ -226,6 +226,12 @@ hym8563_int: hym8563-int {
};
};
+ sdmmc {
+ sdmmc_det_gpio: sdmmc-det-gpio {
+ rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ };
+
sound {
hp_detect: hp-detect {
rockchip,pins = <1 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
@@ -282,10 +288,13 @@ &sdhci {
&sdmmc {
bus-width = <4>;
cap-sd-highspeed;
+ cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
disable-wp;
max-frequency = <150000000>;
no-mmc;
no-sdio;
+ pinctrl-names = "default";
+ pinctrl-0 = <&sdmmc_bus4 &sdmmc_clk &sdmmc_cmd &sdmmc_det_gpio>;
sd-uhs-sdr104;
vqmmc-supply = <&vccio_sd_s0>;
status = "okay";
---
base-commit: 909ef7a9a30fa139e69e555e3606680f5cca7726
change-id: 20261121-orange-pi-5-sdcard-98cbfa3c12e7
Best regards,
--
Dang Huynh <dang.huynh@mainlining.org>
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] arm64: dts: rockchip: Add CD GPIO to Orange Pi 5/5B/5Pro
2026-12-03 8:54 [PATCH v2] arm64: dts: rockchip: Add CD GPIO to Orange Pi 5/5B/5Pro Dang Huynh via B4 Relay
@ 2026-12-03 9:07 ` sashiko-bot
0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-12-03 9:07 UTC (permalink / raw)
To: Dang Huynh; +Cc: devicetree, robh, conor+dt
Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Low] arm64: dts: rockchip: missing Fixes trailer for Orange Pi 5 SD
hotplug fix
- [Low] arm64: dts: rockchip: inaccurate root cause and omitted pinmux
change in log
--
commit 247553dea34b4f12c4a563e270c7ccc7aae4d099
Author: Dang Huynh <dang.huynh@mainlining.org>
> arm64: dts: rockchip: Add CD GPIO to Orange Pi 5/5B/5Pro
>
> CD GPIO is currently not defined in Orange Pi 5, this breaks
> SD card hotplugging.
[Severity: Low]
As reported by Quentin Schulz on v1 [1], is this root-cause description
accurate? rk3588-base.dtsi already configures sdmmc with native sdmmc_det
on GPIO0_A4 and RK3588_PD_SDMMC; hotplugging breaks because native
SDMMC_DET stops working when runtime suspend powers off the controller.
The commit message also does not mention that GPIO0_A4 is now re-muxed
from native sdmmc_det to GPIO via sdmmc_det_gpio and a new pinctrl-0
override on &sdmmc.
>
> The SDMMC_DET_L pin is connected to GPIO0_A4 on both OPi 5[0],
> OPi 5B[1] and OPi 5 Pro[2].
>
> [0]: https://drive.google.com/file/d/1Wsp-Q7IyG0Ky_W-z1n5oXcFG4oqIbtOb/view?usp=sharing
> [1]: https://drive.google.com/file/d/19iPdpAXhA1vFkVOgG5Sz7L6cV8BB6004/view?usp=sharing
> [2]: https://drive.google.com/file/d/1qs1DratHuh7C6J6MEtQIwUsiSrg8qgTi/view?usp=sharing
>
> Signed-off-by: Dang Huynh <dang.huynh@mainlining.org>
[Severity: Low]
This fixes broken SD card hotplugging on the Orange Pi 5 family. Should
this include:
Fixes: b6bc755d806e ("arm64: dts: rockchip: Add Orange Pi 5")
[1] https://lore.kernel.org/r/c6930807-24de-49c2-adcb-5dbbc3da0c45@cherry.de
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261203-orange-pi-5-sdcard-v2-1-f72b4310cbc5@mainlining.org?part=1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-12-03 9:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-03 8:54 [PATCH v2] arm64: dts: rockchip: Add CD GPIO to Orange Pi 5/5B/5Pro Dang Huynh via B4 Relay
2026-12-03 9:07 ` sashiko-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox