Skip to contentSkip to conversation

arm64: dts: rockchip: Fix microSD card detect for Radxa ROCK 5 ITX

RFC PATCH Superseded FUKAUMI Naoki 3 participants 5 messages Nov 10, 2025

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 arm64: dts: rockchip: Fix microSD card detect for Radxa ROCK 5 ITX

Due to the discussion about cd-gpios and sdmmmc_det pin functionality[1], it would be better to use cd-gpios for now.

[1] https://lore.kernel.org/linux-rockchip/20240912152538.1.I858c2a0bf83606c8b59ba1ab6944978a398d2ac5@changeid/T/#u

Fixes 31390eb8ffbf2 ("arm64: dts: rockchip: add ROCK 5 ITX board")
---
 arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts +8 -1
index bc8140883de47..391c6482e8ee3 100644
@@ -670,6 +670,12 @@ led_pins: led-pins {
 		};
 	};
 
+	mmc {
+		sdmmc_det_gpio: sdmmc-det-gpio {
+			rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+
 	pcie {
 		pcie20x1_2_perstn: pcie20x1-2-perstn {
 			rockchip,pins = <3 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
@@ -795,12 +801,13 @@ &sdmmc {
 	bus-width = <4>;
 	cap-mmc-highspeed;
 	cap-sd-highspeed;
+	cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
 	disable-wp;
 	max-frequency = <200000000>;
 	no-sdio;
 	no-mmc;
 	pinctrl-names = "default";
-	pinctrl-0 = <&sdmmc_bus4 &sdmmc_clk &sdmmc_cmd &sdmmc_det>;
+	pinctrl-0 = <&sdmmc_bus4 &sdmmc_clk &sdmmc_cmd &sdmmc_det_gpio>;
 	sd-uhs-sdr104;
 	vmmc-supply = <&vcc_3v3_s3>;
 	vqmmc-supply = <&vccio_sd_s0>;
Signature · 7 lines
2.43.0


_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip
#1 lore raw

Hi,

Quoted 16 lines · FUKAUMI Naoki

Due to the discussion about cd-gpios and sdmmmc_det pin functionality[1], it would be better to use cd-gpios for now.

[1] https://lore.kernel.org/linux-rockchip/20240912152538.1.I858c2a0bf83606c8b59ba1ab6944978a398d2ac5@changeid/T/#u

Fixes 31390eb8ffbf2 ("arm64: dts: rockchip: add ROCK 5 ITX board")
---
  arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts | 9 ++++++++-
  1 file changed, 8 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts +0 -0
index bc8140883de47..391c6482e8ee3 100644

arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts led_pins: led-pins { · line 678

Quoted 9 lines
arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts +6 -0
@@ -670,6 +670,12 @@ led_pins: led-pins {
  		};
  	};
 
+	mmc {
+		sdmmc_det_gpio: sdmmc-det-gpio {
+			rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+

I got following error:

$ make CHECK_DTBS=y rockchip/rk3588-rock-5-itx.dtb
  UPD     include/config/kernel.release
  DTC [C] arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dtb
/home/radxa/linux/arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dtb: mmc: sdmmc-det-gpio: {'rockchip,pins': [[0, 4, 0, 270]], 'phandle': 145} is not of type 'array'
	from schema $id: http://devicetree.org/schemas/gpio/gpio-consumer.yaml#

What's wrong?

Best regards,

--
FUKAUMI Naoki
Radxa Computer (Shenzhen) Co., Ltd.

Quoted 8 lines
arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts +1 -0
  	pcie {
  		pcie20x1_2_perstn: pcie20x1-2-perstn {
  			rockchip,pins = <3 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
@@ -795,12 +801,13 @@ &sdmmc {
  	bus-width = <4>;
  	cap-mmc-highspeed;
  	cap-sd-highspeed;
+	cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;

arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts &sdmmc { · line 813

Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts +1 -1
  	disable-wp;
  	max-frequency = <200000000>;
  	no-sdio;
  	no-mmc;
  	pinctrl-names = "default";
-	pinctrl-0 = <&sdmmc_bus4 &sdmmc_clk &sdmmc_cmd &sdmmc_det>;
+	pinctrl-0 = <&sdmmc_bus4 &sdmmc_clk &sdmmc_cmd &sdmmc_det_gpio>;
  	sd-uhs-sdr104;
  	vmmc-supply = <&vcc_3v3_s3>;
  	vqmmc-supply = <&vccio_sd_s0>;

_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip

maintainer
#2 lore raw

Hi,

Am Montag, 10. November 2025, 04:16:37 Mitteleuropäische Normalzeit schrieb FUKAUMI Naoki:

Quoted 37 lines · FUKAUMI Naoki
Quoted 16 lines

Due to the discussion about cd-gpios and sdmmmc_det pin functionality[1], it would be better to use cd-gpios for now.

[1] https://lore.kernel.org/linux-rockchip/20240912152538.1.I858c2a0bf83606c8b59ba1ab6944978a398d2ac5@changeid/T/#u

Fixes 31390eb8ffbf2 ("arm64: dts: rockchip: add ROCK 5 ITX board")
---
  arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts | 9 ++++++++-
  1 file changed, 8 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts +0 -0
index bc8140883de47..391c6482e8ee3 100644

arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts led_pins: led-pins { · line 678

Quoted 9 lines
arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts +6 -0
@@ -670,6 +670,12 @@ led_pins: led-pins {
  		};
  	};
 
+	mmc {
+		sdmmc_det_gpio: sdmmc-det-gpio {
+			rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+

I got following error:

$ make CHECK_DTBS=y rockchip/rk3588-rock-5-itx.dtb
   UPD     include/config/kernel.release
   DTC [C] arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dtb
/home/radxa/linux/arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dtb: 
mmc: sdmmc-det-gpio: {'rockchip,pins': [[0, 4, 0, 270]], 'phandle': 145} 
is not of type 'array'
	from schema $id: http://devicetree.org/schemas/gpio/gpio-consumer.yaml#
Quoted 1 line

What's wrong?

the problem is the "-gpio" in the pinctrl node-name,which triggers a pattern matching against a normal gpios property.

So ideally rename sdmmc-det-gpio to sdmmc-det-pin or so.

Hope that helps
Heiko

#3 lore raw

Hi Heiko,

Quoted 40 lines · Heiko Stübner

Hi,

Am Montag, 10. November 2025, 04:16:37 Mitteleuropäische Normalzeit schrieb FUKAUMI Naoki:

Quoted 37 lines · FUKAUMI Naoki
Quoted 16 lines

Due to the discussion about cd-gpios and sdmmmc_det pin functionality[1], it would be better to use cd-gpios for now.

[1] https://lore.kernel.org/linux-rockchip/20240912152538.1.I858c2a0bf83606c8b59ba1ab6944978a398d2ac5@changeid/T/#u

Fixes 31390eb8ffbf2 ("arm64: dts: rockchip: add ROCK 5 ITX board")
---
   arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts | 9 ++++++++-
   1 file changed, 8 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts +0 -0
index bc8140883de47..391c6482e8ee3 100644

arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts led_pins: led-pins { · line 678

Quoted 9 lines
arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts +6 -0
@@ -670,6 +670,12 @@ led_pins: led-pins {
   		};
   	};
 
+	mmc {
+		sdmmc_det_gpio: sdmmc-det-gpio {
+			rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+

I got following error:

$ make CHECK_DTBS=y rockchip/rk3588-rock-5-itx.dtb
    UPD     include/config/kernel.release
    DTC [C] arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dtb
/home/radxa/linux/arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dtb:
mmc: sdmmc-det-gpio: {'rockchip,pins': [[0, 4, 0, 270]], 'phandle': 145}
is not of type 'array'
	from schema $id: http://devicetree.org/schemas/gpio/gpio-consumer.yaml#
Quoted 6 lines
Quoted 1 line

What's wrong?

the problem is the "-gpio" in the pinctrl node-name,which triggers a pattern matching against a normal gpios property.

So ideally rename sdmmc-det-gpio to sdmmc-det-pin or so.

sdmmc-det-pin works! Thanks!

I'll send v2 with this fix.

Best regards,

--
FUKAUMI Naoki
Radxa Computer (Shenzhen) Co., Ltd.

Quoted 5 lines

Hope that helps
Heiko

_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip

#4 lore raw
In reply to FUKAUMI Naoki
Quoted 11 lines · FUKAUMI Naoki

Due to the discussion about cd-gpios and sdmmmc_det pin functionality[1], it would be better to use cd-gpios for now.

[1] https://lore.kernel.org/linux-rockchip/20240912152538.1.I858c2a0bf83606c8b59ba1ab6944978a398d2ac5@changeid/T/#u

Fixes 31390eb8ffbf2 ("arm64: dts: rockchip: add ROCK 5 ITX board")
---
 arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

My bot found new DTB warnings on the .dts files added or changed in this series.

Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings are fixed by another series. Ultimately, it is up to the platform maintainer whether these warnings are acceptable or not. No need to reply unless the platform maintainer has comments.

If you already ran DT checks and didn't see these error(s), then make sure dt-schema is up to date:

  pip3 install dtschema --upgrade

This patch series was applied (using b4) to base:
Base: attempting to guess base-commit...
Base: tags/next-20251107 (exact match)
Base: tags/next-20251107 (use --merge-base to override)

If this is not the correct base, please add 'base-commit' tag (or use b4 which does this automatically)

New warnings running 'make CHECK_DTBS=y for arch/arm64/boot/dts/rockchip/' for [email protected]:

arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dtb: mmc: sdmmc-det-gpio: {'rockchip,pins': [[0, 4, 0, 270]], 'phandle': 145} is not of type 'array'
from schema $id: http://devicetree.org/schemas/gpio/gpio-consumer.yaml