[PATCH v2 3/3] arm64: dts: renesas: rzg3l-smarc-som: Enable SDHI2
From: Biju Das
Date: Mon Nov 23 2026 - 08:58:47 EST
From: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
Enable SDHI2 on the RZ/G3L SMARC EVK platform using the internal
voltage regulator for voltage switching. SDHI2 signals are muxed
with I2S0; the selection is controlled by the SW_SD2_EN macro in
the board DTS, which must match the position of switch SYS.4 on
the SoM. By default, I2S0 is enabled.
Reviewed-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
Signed-off-by: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
---
v2
- Added a comment about the SD power signal.
- Collected tag.
---
arch/arm64/boot/dts/renesas/r9a08g046l48-smarc.dts | 11 +++
arch/arm64/boot/dts/renesas/rzg3l-smarc-som.dtsi | 88 ++++++++++++++++++++++
2 files changed, 99 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/r9a08g046l48-smarc.dts b/arch/arm64/boot/dts/renesas/r9a08g046l48-smarc.dts
index 3699712d8bf1..e59126e7ff9e 100644
--- a/arch/arm64/boot/dts/renesas/r9a08g046l48-smarc.dts
+++ b/arch/arm64/boot/dts/renesas/r9a08g046l48-smarc.dts
@@ -34,6 +34,17 @@
#include "rzg3l-smarc-som.dtsi"
#include "renesas-smarc2.dtsi"
+/*
+ * The SDHI power signal can be controlled either by a GPIO hog or an internal
+ * regulator, so a customer design can use whichever matches its hardware:
+ * - SD0 does not have an internal regulator, but SD1 and SD2 do.
+ * - SD0 and SD1 use GPIO hogs to control the power signal on the board.
+ * - SD2 uses the SoC's internal voltage regulator.
+ *
+ * The mixed usage is only meant to demonstrate both options. It is not a
+ * hardware requirement of this board.
+ */
+
/ {
model = "Renesas SMARC EVK version 2 based on r9a08g046l48";
compatible = "renesas,smarc2-evk", "renesas,rzg3l-smarcm",
diff --git a/arch/arm64/boot/dts/renesas/rzg3l-smarc-som.dtsi b/arch/arm64/boot/dts/renesas/rzg3l-smarc-som.dtsi
index e64a611aebec..fc5ed4907a65 100644
--- a/arch/arm64/boot/dts/renesas/rzg3l-smarc-som.dtsi
+++ b/arch/arm64/boot/dts/renesas/rzg3l-smarc-som.dtsi
@@ -42,6 +42,7 @@ aliases {
ethernet1 = ð1;
i2c0 = &i2c0;
mmc0 = &sdhi0;
+ mmc2 = &sdhi2;
};
memory@48000000 {
@@ -355,6 +356,74 @@ sd0-data {
power-source = <1800>;
};
};
+
+ sdhi2_pins: sd2 {
+ sd2-cd {
+ pinmux = <RZG3L_PORT_PINMUX(K, 0, 1)>; /* SD2_CD */
+ };
+
+ sd2-clk {
+ pinmux = <RZG3L_PORT_PINMUX(H, 0, 1)>; /* SD2_CLK */
+ power-source = <3300>;
+ };
+
+ sd2-cmd {
+ pinmux = <RZG3L_PORT_PINMUX(H, 1, 1)>; /* SD2_CMD */
+ input-enable;
+ power-source = <3300>;
+ };
+
+ sd2-data {
+ pinmux = <RZG3L_PORT_PINMUX(H, 2, 1)>, /* SD2_DAT0 */
+ <RZG3L_PORT_PINMUX(H, 3, 1)>, /* SD2_DAT1 */
+ <RZG3L_PORT_PINMUX(H, 4, 1)>, /* SD2_DAT2 */
+ <RZG3L_PORT_PINMUX(H, 5, 1)>; /* SD2_DAT3 */
+ input-enable;
+ power-source = <3300>;
+ };
+
+ sd2-iovs {
+ pinmux = <RZG3L_PORT_PINMUX(K, 1, 1)>; /* SD2_IOVS */
+ };
+
+ sd2-pwen {
+ pinmux = <RZG3L_PORT_PINMUX(K, 2, 1)>; /* SD2_PWEN */
+ };
+ };
+
+ sdhi2_pins_uhs: sd2-uhs {
+ sd2-cd {
+ pinmux = <RZG3L_PORT_PINMUX(K, 0, 1)>; /* SD2_CD */
+ };
+
+ sd2-clk {
+ pinmux = <RZG3L_PORT_PINMUX(H, 0, 1)>; /* SD2_CLK */
+ power-source = <1800>;
+ };
+
+ sd2-cmd {
+ pinmux = <RZG3L_PORT_PINMUX(H, 1, 1)>; /* SD2_CMD */
+ input-enable;
+ power-source = <1800>;
+ };
+
+ sd2-data {
+ pinmux = <RZG3L_PORT_PINMUX(H, 2, 1)>, /* SD2_DAT0 */
+ <RZG3L_PORT_PINMUX(H, 3, 1)>, /* SD2_DAT1 */
+ <RZG3L_PORT_PINMUX(H, 4, 1)>, /* SD2_DAT2 */
+ <RZG3L_PORT_PINMUX(H, 5, 1)>; /* SD2_DAT3 */
+ input-enable;
+ power-source = <1800>;
+ };
+
+ sd2-iovs {
+ pinmux = <RZG3L_PORT_PINMUX(K, 1, 1)>; /* SD2_IOVS */
+ };
+
+ sd2-pwen {
+ pinmux = <RZG3L_PORT_PINMUX(K, 2, 1)>; /* SD2_PWEN */
+ };
+ };
};
#if (SW_SD0_DEV_SEL)
@@ -386,6 +455,25 @@ &sdhi0 {
};
#endif
+#if SW_SD2_EN
+&sdhi2 {
+ pinctrl-0 = <&sdhi2_pins>;
+ pinctrl-1 = <&sdhi2_pins_uhs>;
+ pinctrl-names = "default", "state_uhs";
+
+ vmmc-supply = <®_3p3v>;
+ vqmmc-supply = <&sdhi2_vqmmc>;
+ bus-width = <4>;
+ sd-uhs-sdr50;
+ sd-uhs-sdr104;
+ status = "okay";
+};
+
+&sdhi2_vqmmc {
+ status = "okay";
+};
+#endif
+
&wdt0 {
timeout-sec = <60>;
status = "okay";
--
2.43.0