* [PATCH v17 00/17] Add Renesas RZ/G3L SD/eMMC support
@ 2026-06-03 6:57 Biju
2026-06-03 6:57 ` [PATCH v17 01/17] dt-bindings: mmc: renesas,sdhi: Document RZ/G3L (r9a08g046) SoC Biju
` (4 more replies)
0 siblings, 5 replies; 10+ messages in thread
From: Biju @ 2026-06-03 6:57 UTC (permalink / raw)
To: Ulf Hansson, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Philipp Zabel, Magnus Damm
Cc: Biju Das, Wolfram Sang, linux-mmc, devicetree, linux-kernel,
linux-renesas-soc, Prabhakar Mahadev Lad, Biju Das
From: Biju Das <biju.das.jz@bp.renesas.com>
RZ/G3L SoC has:
Channel 0 supports SD and eMMC (including HS400/HS400ES).
Channel 1 supports SD and eMMC (except for HS400).
Channel 2 supports SD.
The SoC supports a maximum frequency of 150 MHz. The SD0 interface does
not support IOVS and PWEN in the SDHI register (no internal regulator),
unlike SD1 and SD2. It has an internal divider for all modes except HS400.
It also has a 2048-bit divider compared to 512 on others. Moreover
RZ/G3L supports HS400 enhanced strobe mode.
v1->v2:
* Collected tag for binding patch.
* Resending the series as there is an issue with patch threading from
patch #14.
Biju Das (17):
dt-bindings: mmc: renesas,sdhi: Document RZ/G3L (r9a08g046) SoC
clk: renesas: r9a08g046: Add clock and reset entries for SDHI
pinctrl: renesas: rzg2l: Add SD channel POC support for RZ/G3L
mmc: renesas_sdhi: Fix whitespace alignment in struct
renesas_sdhi_of_data
mmc: renesas_sdhi_internal_dmac: Fix whitespace alignment in struct
initializer
mmc: renesas_sdhi: Introduce renesas_sdhi_hw_info to abstract clock
mask
mmc: renesas_sdhi: Add max_divider to renesas_sdhi_hw_info
mmc: renesas_sdhi: Add tuning_delay hw_info flag
mmc: renesas_sdhi: Add internal_divider hw_info flag for clk rate
adjustment
mmc: renesas_sdhi: Add optional axis/axim reset controls
mmc: renesas_sdhi: Add RZ/G3L SDHI support
mmc: renesas_sdhi: Save and restore IOVS across suspend/resume
mmc: renesas_sdhi: Add RZ/G3L HS400 support
mmc: renesas_sdhi: Add HS400 enhanced strobe support for RZ/G3L
arm64: dts: renesas: r9a08g046: Add SDHI nodes for RZ/G3L SoC and
SDHI1 pincontrol on SMARC EVK
arm64: dts: renesas: rzg3l-smarc-som: Enable SD/eMMC on SDHI0
arm64: dts: renesas: rzg3l-smarc-som: Enable SDHI2
.../devicetree/bindings/mmc/renesas,sdhi.yaml | 101 ++++++--
arch/arm64/boot/dts/renesas/r9a08g046.dtsi | 73 +++++-
.../boot/dts/renesas/r9a08g046l48-smarc.dts | 89 +++++++
.../boot/dts/renesas/rzg3l-smarc-som.dtsi | 199 +++++++++++++++
drivers/clk/renesas/r9a08g046-cpg.c | 92 +++++++
drivers/mmc/host/renesas_sdhi.h | 25 +-
drivers/mmc/host/renesas_sdhi_core.c | 226 +++++++++++++-----
drivers/mmc/host/renesas_sdhi_internal_dmac.c | 71 +++++-
drivers/mmc/host/renesas_sdhi_sys_dmac.c | 67 ++++--
drivers/pinctrl/renesas/pinctrl-rzg2l.c | 74 ++++--
10 files changed, 889 insertions(+), 128 deletions(-)
--
2.43.0
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v17 01/17] dt-bindings: mmc: renesas,sdhi: Document RZ/G3L (r9a08g046) SoC
2026-06-03 6:57 [PATCH v17 00/17] Add Renesas RZ/G3L SD/eMMC support Biju
@ 2026-06-03 6:57 ` Biju
2026-06-03 6:57 ` [PATCH v17 15/17] arm64: dts: renesas: r9a08g046: Add SDHI nodes for RZ/G3L SoC and SDHI1 pincontrol on SMARC EVK Biju
` (3 subsequent siblings)
4 siblings, 0 replies; 10+ messages in thread
From: Biju @ 2026-06-03 6:57 UTC (permalink / raw)
To: Ulf Hansson, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm
Cc: Biju Das, Wolfram Sang, linux-mmc, devicetree, linux-kernel,
linux-renesas-soc, Prabhakar Mahadev Lad, Biju Das, Conor Dooley
From: Biju Das <biju.das.jz@bp.renesas.com>
Document the RZ/G3L (r9a08g046) SDHI controller. The RZ/G3L SDHI
controller is similar to RZ/G2L but has five clocks (core, clkh,
cd, aclk, aclkm) and three resets (rst, axim, axis), so update the
clocks/clock-names maximum to 5 and resets/reset-names maximum to 3.
It has an internal divider for all modes except HS400, and a 2048-bit
divider compared to 512 on others.
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
v1->v2:
* Collected tag.
---
.../devicetree/bindings/mmc/renesas,sdhi.yaml | 101 +++++++++++++-----
1 file changed, 75 insertions(+), 26 deletions(-)
diff --git a/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml b/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml
index 4d66966ce290..16cb395403f6 100644
--- a/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml
+++ b/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml
@@ -18,6 +18,7 @@ properties:
- renesas,sdhi-r7s9210 # SH-Mobile AG5
- renesas,sdhi-r8a73a4 # R-Mobile APE6
- renesas,sdhi-r8a7740 # R-Mobile A1
+ - renesas,sdhi-r9a08g046 # RZ/G3L
- renesas,sdhi-r9a09g057 # RZ/V2H(P)
- renesas,sdhi-sh73a0 # R-Mobile APE6
- items:
@@ -86,11 +87,11 @@ properties:
clocks:
minItems: 1
- maxItems: 4
+ maxItems: 5
clock-names:
minItems: 1
- maxItems: 4
+ maxItems: 5
dmas:
minItems: 4
@@ -116,7 +117,12 @@ properties:
maxItems: 1
resets:
- maxItems: 1
+ minItems: 1
+ maxItems: 3
+
+ reset-names:
+ minItems: 1
+ maxItems: 3
pinctrl-0:
minItems: 1
@@ -155,60 +161,101 @@ allOf:
properties:
compatible:
contains:
- enum:
- - renesas,sdhi-r9a09g057
- - renesas,rzg2l-sdhi
+ const: renesas,sdhi-r9a08g046
then:
properties:
clocks:
items:
- description: IMCLK, SDHI channel main clock1.
- description: CLK_HS, SDHI channel High speed clock which operates
- 4 times that of SDHI channel main clock1.
+ 2 times that of SDHI channel main clock1.
- description: IMCLK2, SDHI channel main clock2. When this clock is
turned off, external SD card detection cannot be
detected.
- - description: ACLK, SDHI channel bus clock.
+ - description: ACLK/IACLKS, SDHI channel bus clock.
+ - description: IACLKM, SDHI channel bus clock m.
clock-names:
items:
- const: core
- const: clkh
- const: cd
- const: aclk
+ - const: aclkm
+ resets:
+ items:
+ - description: rst, Core reset.
+ - description: axim, SDHI axi bus reset m.
+ - description: axis, SDHI axi bus reset s.
+ reset-names:
+ items:
+ - const: rst
+ - const: axim
+ - const: axis
required:
- clock-names
- resets
+ - reset-names
else:
if:
properties:
compatible:
contains:
enum:
- - renesas,rcar-gen2-sdhi
- - renesas,rcar-gen3-sdhi
- - renesas,rcar-gen4-sdhi
+ - renesas,sdhi-r9a09g057
+ - renesas,rzg2l-sdhi
then:
properties:
clocks:
- minItems: 1
- maxItems: 3
- clock-names:
- minItems: 1
- uniqueItems: true
items:
- - const: core
- - enum: [ clkh, cd ]
- - const: cd
- else:
- properties:
- clocks:
- minItems: 1
- maxItems: 2
+ - description: IMCLK, SDHI channel main clock1.
+ - description: CLK_HS, SDHI channel High speed clock which operates
+ 4 times that of SDHI channel main clock1.
+ - description: IMCLK2, SDHI channel main clock2. When this clock is
+ turned off, external SD card detection cannot be
+ detected.
+ - description: ACLK, SDHI channel bus clock.
clock-names:
- minItems: 1
items:
- const: core
+ - const: clkh
- const: cd
+ - const: aclk
+ resets:
+ maxItems: 1
+ required:
+ - clock-names
+ - resets
+ else:
+ if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - renesas,rcar-gen2-sdhi
+ - renesas,rcar-gen3-sdhi
+ - renesas,rcar-gen4-sdhi
+ then:
+ properties:
+ clocks:
+ minItems: 1
+ maxItems: 3
+ clock-names:
+ minItems: 1
+ uniqueItems: true
+ items:
+ - const: core
+ - enum: [ clkh, cd ]
+ - const: cd
+ else:
+ properties:
+ clocks:
+ minItems: 1
+ maxItems: 2
+ clock-names:
+ minItems: 1
+ items:
+ - const: core
+ - const: cd
- if:
properties:
@@ -247,7 +294,9 @@ allOf:
properties:
compatible:
contains:
- const: renesas,sdhi-r9a09g057
+ enum:
+ - renesas,sdhi-r9a08g046
+ - renesas,sdhi-r9a09g057
then:
properties:
vqmmc-regulator:
--
2.43.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v17 15/17] arm64: dts: renesas: r9a08g046: Add SDHI nodes for RZ/G3L SoC and SDHI1 pincontrol on SMARC EVK
2026-06-03 6:57 [PATCH v17 00/17] Add Renesas RZ/G3L SD/eMMC support Biju
2026-06-03 6:57 ` [PATCH v17 01/17] dt-bindings: mmc: renesas,sdhi: Document RZ/G3L (r9a08g046) SoC Biju
@ 2026-06-03 6:57 ` Biju
2026-06-03 6:57 ` [PATCH v17 16/17] arm64: dts: renesas: rzg3l-smarc-som: Enable SD/eMMC on SDHI0 Biju
` (2 subsequent siblings)
4 siblings, 0 replies; 10+ messages in thread
From: Biju @ 2026-06-03 6:57 UTC (permalink / raw)
To: Geert Uytterhoeven, Magnus Damm, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: Biju Das, linux-renesas-soc, devicetree, linux-kernel,
Prabhakar Mahadev Lad, Biju Das
From: Biju Das <biju.das.jz@bp.renesas.com>
Add device tree nodes for the three SDHI controllers (SDHI{0,1,2})
on the RZ/G3L SoC (r9a08g046) and enable SDHI1 on the RZ/G3L SMARC
EVK platform with pincontrol and GPIO-based voltage switching
regulator support.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
v1->v2:
* No change.
---
arch/arm64/boot/dts/renesas/r9a08g046.dtsi | 73 ++++++++++++++-
.../boot/dts/renesas/r9a08g046l48-smarc.dts | 88 +++++++++++++++++++
2 files changed, 160 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/renesas/r9a08g046.dtsi b/arch/arm64/boot/dts/renesas/r9a08g046.dtsi
index c63a857f0e5b..ff2de3f192b5 100644
--- a/arch/arm64/boot/dts/renesas/r9a08g046.dtsi
+++ b/arch/arm64/boot/dts/renesas/r9a08g046.dtsi
@@ -762,9 +762,80 @@ dmac: dma-controller@11820000 {
dma-channels = <16>;
};
+ sdhi0: mmc@11c00000 {
+ compatible = "renesas,sdhi-r9a08g046";
+ reg = <0x0 0x11c00000 0 0x10000>;
+ interrupts = <GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cpg CPG_MOD R9A08G046_SDHI0_IMCLK>,
+ <&cpg CPG_MOD R9A08G046_SDHI0_CLK_HS>,
+ <&cpg CPG_MOD R9A08G046_SDHI0_IMCLK2>,
+ <&cpg CPG_MOD R9A08G046_SDHI0_IACLKS>,
+ <&cpg CPG_MOD R9A08G046_SDHI0_IACLKM>;
+ clock-names = "core", "clkh", "cd", "aclk", "aclkm";
+ max-frequency = <150000000>;
+ resets = <&cpg R9A08G046_SDHI0_IXRST>,
+ <&cpg R9A08G046_SDHI0_IXRSTAXIM>,
+ <&cpg R9A08G046_SDHI0_IXRSTAXIS>;
+ reset-names = "rst", "axim", "axis";
+ power-domains = <&cpg>;
+ status = "disabled";
+ };
+
sdhi1: mmc@11c10000 {
+ compatible = "renesas,sdhi-r9a08g046";
reg = <0x0 0x11c10000 0 0x10000>;
- /* placeholder */
+ interrupts = <GIC_SPI 132 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cpg CPG_MOD R9A08G046_SDHI1_IMCLK>,
+ <&cpg CPG_MOD R9A08G046_SDHI1_CLK_HS>,
+ <&cpg CPG_MOD R9A08G046_SDHI1_IMCLK2>,
+ <&cpg CPG_MOD R9A08G046_SDHI1_IACLKS>,
+ <&cpg CPG_MOD R9A08G046_SDHI1_IACLKM>;
+ clock-names = "core", "clkh", "cd", "aclk", "aclkm";
+ max-frequency = <150000000>;
+ resets = <&cpg R9A08G046_SDHI1_IXRST>,
+ <&cpg R9A08G046_SDHI1_IXRSTAXIM>,
+ <&cpg R9A08G046_SDHI1_IXRSTAXIS>;
+ reset-names = "rst", "axim", "axis";
+ power-domains = <&cpg>;
+ status = "disabled";
+
+ sdhi1_vqmmc: vqmmc-regulator {
+ regulator-name = "SDHI1-VQMMC";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-ramp-delay = <1200>;
+ status = "disabled";
+ };
+ };
+
+ sdhi2: mmc@11c20000 {
+ compatible = "renesas,sdhi-r9a08g046";
+ reg = <0x0 0x11c20000 0 0x10000>;
+ interrupts = <GIC_SPI 134 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cpg CPG_MOD R9A08G046_SDHI2_IMCLK>,
+ <&cpg CPG_MOD R9A08G046_SDHI2_CLK_HS>,
+ <&cpg CPG_MOD R9A08G046_SDHI2_IMCLK2>,
+ <&cpg CPG_MOD R9A08G046_SDHI2_IACLKS>,
+ <&cpg CPG_MOD R9A08G046_SDHI2_IACLKM>;
+ clock-names = "core", "clkh", "cd", "aclk", "aclkm";
+ max-frequency = <150000000>;
+ resets = <&cpg R9A08G046_SDHI2_IXRST>,
+ <&cpg R9A08G046_SDHI2_IXRSTAXIM>,
+ <&cpg R9A08G046_SDHI2_IXRSTAXIS>;
+ reset-names = "rst", "axim", "axis";
+ power-domains = <&cpg>;
+ status = "disabled";
+
+ sdhi2_vqmmc: vqmmc-regulator {
+ regulator-name = "SDHI2-VQMMC";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-ramp-delay = <1200>;
+ status = "disabled";
+ };
};
eth0: ethernet@11c30000 {
diff --git a/arch/arm64/boot/dts/renesas/r9a08g046l48-smarc.dts b/arch/arm64/boot/dts/renesas/r9a08g046l48-smarc.dts
index 624fcaea350f..a4cc07408b3f 100644
--- a/arch/arm64/boot/dts/renesas/r9a08g046l48-smarc.dts
+++ b/arch/arm64/boot/dts/renesas/r9a08g046l48-smarc.dts
@@ -14,6 +14,7 @@
#define SW_GPIO4 1
#define SW_I3C_EN 0
#define SW_SER0_PMOD 1
+#define SW_SDIO_M2E 0
#define PMOD_GPIO4 0
#define PMOD_GPIO6 0
@@ -38,6 +39,7 @@ / {
aliases {
i2c2 = &i2c2;
i2c3 = &i2c3;
+ mmc1 = &sdhi1;
serial0 = &rsci2;
serial1 = &rsci3;
serial2 = &rsci1;
@@ -69,6 +71,19 @@ codec_dai: codec {
};
};
#endif
+
+#if RZ_BOOT_MODE3
+ vqmmc_sd1_pvdd: regulator-vqmmc-sd1-pvdd {
+ compatible = "regulator-gpio";
+ regulator-name = "SD1_PVDD";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ gpios = <&pinctrl RZG3L_GPIO(J, 1) GPIO_ACTIVE_HIGH>;
+ gpios-states = <0>;
+ states = <3300000 0>, <1800000 1>;
+ regulator-ramp-delay = <1200>;
+ };
+#endif
};
&i2c2 {
@@ -175,6 +190,68 @@ scif0_pins: scif0 {
power-source = <1800>;
};
+#if RZ_BOOT_MODE3
+ sd1-pwr-en-hog {
+ gpio-hog;
+ gpios = <RZG3L_GPIO(J, 2) GPIO_ACTIVE_HIGH>;
+ output-high;
+ line-name = "sd1_pwr_en";
+ };
+#endif
+
+ sdhi1_pins: sd1 {
+ sd1-cd {
+ pinmux = <RZG3L_PORT_PINMUX(J, 0, 8)>; /* SD1_CD */
+ };
+
+ sd1-clk {
+ pinmux = <RZG3L_PORT_PINMUX(G, 0, 1)>; /* SD1_CLK */
+ power-source = <3300>;
+ };
+
+ sd1-cmd {
+ pinmux = <RZG3L_PORT_PINMUX(G, 1, 1)>; /* SD1_CMD */
+ input-enable;
+ power-source = <3300>;
+ bias-pull-up;
+ };
+
+ sd1-data {
+ pinmux = <RZG3L_PORT_PINMUX(G, 2, 1)>, /* SD1_DAT0 */
+ <RZG3L_PORT_PINMUX(G, 3, 1)>, /* SD1_DAT1 */
+ <RZG3L_PORT_PINMUX(G, 4, 1)>, /* SD1_DAT2 */
+ <RZG3L_PORT_PINMUX(G, 5, 1)>; /* SD1_DAT3 */
+ input-enable;
+ power-source = <3300>;
+ };
+ };
+
+ sdhi1_uhs_pins: sd1-uhs {
+ sd1-cd {
+ pinmux = <RZG3L_PORT_PINMUX(J, 0, 8)>; /* SD1_CD */
+ };
+
+ sd1-clk {
+ pinmux = <RZG3L_PORT_PINMUX(G, 0, 1)>; /* SD1_CLK */
+ power-source = <1800>;
+ };
+
+ sd1-cmd {
+ pinmux = <RZG3L_PORT_PINMUX(G, 1, 1)>; /* SD1_CMD */
+ input-enable;
+ power-source = <1800>;
+ };
+
+ sd1-data {
+ pinmux = <RZG3L_PORT_PINMUX(G, 2, 1)>, /* SD1_DAT0 */
+ <RZG3L_PORT_PINMUX(G, 3, 1)>, /* SD1_DAT1 */
+ <RZG3L_PORT_PINMUX(G, 4, 1)>, /* SD1_DAT2 */
+ <RZG3L_PORT_PINMUX(G, 5, 1)>; /* SD1_DAT3 */
+ input-enable;
+ power-source = <1800>;
+ };
+ };
+
ssi0_pins: ssi0 {
pinmux = <RZG3L_PORT_PINMUX(H, 0, 9)>, /* SSIF0_RXD */
<RZG3L_PORT_PINMUX(H, 1, 9)>, /* SSIF0_BCK */
@@ -219,6 +296,17 @@ &scif0 {
pinctrl-names = "default";
};
+#if RZ_BOOT_MODE3
+&sdhi1 {
+ pinctrl-0 = <&sdhi1_pins>;
+ pinctrl-1 = <&sdhi1_uhs_pins>;
+ pinctrl-names = "default", "state_uhs";
+
+ vmmc-supply = <®_3p3v>;
+ vqmmc-supply = <&vqmmc_sd1_pvdd>;
+};
+#endif
+
#if !SW_SD2_EN
&ssi0 {
clocks = <&cpg CPG_MOD R9A08G046_SSI0_PCLK2>,
--
2.43.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v17 16/17] arm64: dts: renesas: rzg3l-smarc-som: Enable SD/eMMC on SDHI0
2026-06-03 6:57 [PATCH v17 00/17] Add Renesas RZ/G3L SD/eMMC support Biju
2026-06-03 6:57 ` [PATCH v17 01/17] dt-bindings: mmc: renesas,sdhi: Document RZ/G3L (r9a08g046) SoC Biju
2026-06-03 6:57 ` [PATCH v17 15/17] arm64: dts: renesas: r9a08g046: Add SDHI nodes for RZ/G3L SoC and SDHI1 pincontrol on SMARC EVK Biju
@ 2026-06-03 6:57 ` Biju
2026-06-03 6:57 ` [PATCH v17 17/17] arm64: dts: renesas: rzg3l-smarc-som: Enable SDHI2 Biju
2026-06-03 7:00 ` [PATCH v17 00/17] Add Renesas RZ/G3L SD/eMMC support Biju Das
4 siblings, 0 replies; 10+ messages in thread
From: Biju @ 2026-06-03 6:57 UTC (permalink / raw)
To: Geert Uytterhoeven, Magnus Damm, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: Biju Das, linux-renesas-soc, devicetree, linux-kernel,
Prabhakar Mahadev Lad, Biju Das
From: Biju Das <biju.das.jz@bp.renesas.com>
Add support for enabling SD card or eMMC on SDHI0 on the RZ/G3L SMARC
SoM. The selection between SD and eMMC is controlled by the
SW_SD0_DEV_SEL macro in the board DTS, which must match the position
of switch SYS.1 on the SoM. By default, eMMC is enabled.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
v1->v2:
* No change.
---
.../boot/dts/renesas/r9a08g046l48-smarc.dts | 1 +
.../boot/dts/renesas/rzg3l-smarc-som.dtsi | 111 ++++++++++++++++++
2 files changed, 112 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/r9a08g046l48-smarc.dts b/arch/arm64/boot/dts/renesas/r9a08g046l48-smarc.dts
index a4cc07408b3f..2f16a2bb6dc8 100644
--- a/arch/arm64/boot/dts/renesas/r9a08g046l48-smarc.dts
+++ b/arch/arm64/boot/dts/renesas/r9a08g046l48-smarc.dts
@@ -9,6 +9,7 @@
/* Switch selection settings */
#define RZ_BOOT_MODE3 1
+#define SW_SD0_DEV_SEL 0
#define SW_SD2_EN 0
#define SW_DPI_EN 0
#define SW_GPIO4 1
diff --git a/arch/arm64/boot/dts/renesas/rzg3l-smarc-som.dtsi b/arch/arm64/boot/dts/renesas/rzg3l-smarc-som.dtsi
index 091a227233cb..446c7780cb30 100644
--- a/arch/arm64/boot/dts/renesas/rzg3l-smarc-som.dtsi
+++ b/arch/arm64/boot/dts/renesas/rzg3l-smarc-som.dtsi
@@ -9,6 +9,10 @@
* Please set the below switch position on the SoM and the corresponding macro
* on the board DTS:
*
+ * Switch position SYS.1, Macro SW_SD0_DEV_SEL:
+ * 0 - SD0 is connected to eMMC (default)
+ * 1 - SD0 is connected to uSD0 card
+ *
* Switch position SYS.2, Macro SW_I3C_EN:
* 0 - SMARC_I2C_GP is enabled
* 1 - I3C is enabled
@@ -37,6 +41,7 @@ aliases {
ethernet0 = ð0;
ethernet1 = ð1;
i2c0 = &i2c0;
+ mmc0 = &sdhi0;
};
memory@48000000 {
@@ -63,6 +68,19 @@ reg_3p3v: regulator-3p3v {
regulator-always-on;
};
+#if SW_SD0_DEV_SEL
+ vqmmc_sd0_pvdd: vqmmc-sd0-pvdd {
+ compatible = "regulator-gpio";
+ regulator-name = "SD0_PVDD";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ gpios = <&pinctrl RZG3L_GPIO(L, 4) GPIO_ACTIVE_HIGH>;
+ gpios-states = <0>;
+ states = <3300000 0>, <1800000 1>;
+ regulator-ramp-delay = <1200>;
+ };
+#endif
+
x2_clk: x2-clock {
compatible = "fixed-clock";
#clock-cells = <0>;
@@ -216,7 +234,100 @@ i2c0_pins: i2c0 {
pinmux = <RZG3L_PORT_PINMUX(L, 2, 4)>, /* RIIC0_SCL */
<RZG3L_PORT_PINMUX(L, 3, 4)>; /* RIIC0_SDA */
};
+
+ sd0-pwr-en-hog {
+ gpio-hog;
+ gpios = <RZG3L_GPIO(5, 1) GPIO_ACTIVE_HIGH>;
+ output-high;
+ line-name = "sd0_pwr_en";
+ };
+
+ sdhi0_emmc_pins: sd0-emmc {
+ sd0-ctrl {
+ pins = "SD0_CLK", "SD0_CMD";
+ power-source = <1800>;
+ };
+
+ sd0-data {
+ pins = "SD0_DAT0", "SD0_DAT1", "SD0_DAT2", "SD0_DAT3",
+ "SD0_DAT4", "SD0_DAT5", "SD0_DAT6", "SD0_DAT7";
+ power-source = <1800>;
+ };
+
+ sd0-rst {
+ pins = "SD0_RST#";
+ power-source = <1800>;
+ };
+
+ sd0-ds {
+ pins = "SD0_DS";
+ power-source = <1800>;
+ };
+ };
+
+ sdhi0_usd_pins: sd0-usd {
+ sd0-cd {
+ pinmux = <RZG2L_PORT_PINMUX(5, 0, 8)>; /* SD0_CD */
+ };
+
+ sd0-ctrl {
+ pins = "SD0_CLK", "SD0_CMD";
+ power-source = <3300>;
+ };
+
+ sd0-data {
+ pins = "SD0_DAT0", "SD0_DAT1", "SD0_DAT2", "SD0_DAT3";
+ power-source = <3300>;
+ };
+ };
+
+ sdhi0_usd_uhs_pins: sd0-usd-uhs {
+ sd0-cd {
+ pinmux = <RZG2L_PORT_PINMUX(5, 0, 8)>; /* SD0_CD */
+ };
+
+ sd0-ctrl {
+ pins = "SD0_CLK", "SD0_CMD";
+ power-source = <1800>;
+ };
+
+ sd0-data {
+ pins = "SD0_DAT0", "SD0_DAT1", "SD0_DAT2", "SD0_DAT3";
+ power-source = <1800>;
+ };
+ };
+};
+
+#if (SW_SD0_DEV_SEL)
+&sdhi0 {
+ pinctrl-0 = <&sdhi0_usd_pins>;
+ pinctrl-1 = <&sdhi0_usd_uhs_pins>;
+ pinctrl-names = "default", "state_uhs";
+
+ vmmc-supply = <®_3p3v>;
+ vqmmc-supply = <&vqmmc_sd0_pvdd>;
+ bus-width = <4>;
+ sd-uhs-sdr50;
+ sd-uhs-sdr104;
+ status = "okay";
+};
+#else
+&sdhi0 {
+ pinctrl-0 = <&sdhi0_emmc_pins>;
+ pinctrl-1 = <&sdhi0_emmc_pins>;
+ pinctrl-names = "default", "state_uhs";
+
+ vmmc-supply = <®_3p3v>;
+ vqmmc-supply = <®_1p8v>;
+ bus-width = <8>;
+ mmc-hs200-1_8v;
+ mmc-hs400-1_8v;
+ mmc-hs400-enhanced-strobe;
+ non-removable;
+ fixed-emmc-driver-type = <1>;
+ status = "okay";
};
+#endif
&wdt0 {
timeout-sec = <60>;
--
2.43.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v17 17/17] arm64: dts: renesas: rzg3l-smarc-som: Enable SDHI2
2026-06-03 6:57 [PATCH v17 00/17] Add Renesas RZ/G3L SD/eMMC support Biju
` (2 preceding siblings ...)
2026-06-03 6:57 ` [PATCH v17 16/17] arm64: dts: renesas: rzg3l-smarc-som: Enable SD/eMMC on SDHI0 Biju
@ 2026-06-03 6:57 ` Biju
2026-06-03 7:00 ` [PATCH v17 00/17] Add Renesas RZ/G3L SD/eMMC support Biju Das
4 siblings, 0 replies; 10+ messages in thread
From: Biju @ 2026-06-03 6:57 UTC (permalink / raw)
To: Geert Uytterhoeven, Magnus Damm, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: Biju Das, linux-renesas-soc, devicetree, linux-kernel,
Prabhakar Mahadev Lad, Biju Das
From: Biju Das <biju.das.jz@bp.renesas.com>
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.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
v1->v2:
* No change.
---
.../boot/dts/renesas/rzg3l-smarc-som.dtsi | 88 +++++++++++++++++++
1 file changed, 88 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/rzg3l-smarc-som.dtsi b/arch/arm64/boot/dts/renesas/rzg3l-smarc-som.dtsi
index 446c7780cb30..3d5e6b8489a9 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 {
@@ -296,6 +297,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)
@@ -329,6 +398,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
^ permalink raw reply related [flat|nested] 10+ messages in thread
* RE: [PATCH v17 00/17] Add Renesas RZ/G3L SD/eMMC support
2026-06-03 6:57 [PATCH v17 00/17] Add Renesas RZ/G3L SD/eMMC support Biju
` (3 preceding siblings ...)
2026-06-03 6:57 ` [PATCH v17 17/17] arm64: dts: renesas: rzg3l-smarc-som: Enable SDHI2 Biju
@ 2026-06-03 7:00 ` Biju Das
2026-06-03 7:13 ` Geert Uytterhoeven
2026-06-03 7:19 ` wsa+renesas
4 siblings, 2 replies; 10+ messages in thread
From: Biju Das @ 2026-06-03 7:00 UTC (permalink / raw)
To: biju.das.au, Ulf Hansson, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Geert Uytterhoeven, Philipp Zabel, magnus.damm
Cc: wsa+renesas, linux-mmc@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-renesas-soc@vger.kernel.org, Prabhakar Mahadev Lad,
biju.das.au
Hi all,
Please ignore this series as by mistake instead of patch series 2
I mentioned it as Patch series 17.
I will fix the issue soon.
Sorry for the inconvenience.
Cheers,
Biju
> -----Original Message-----
> From: Biju <biju.das.au@gmail.com>
> Sent: 03 June 2026 07:57
> Subject: [PATCH v17 00/17] Add Renesas RZ/G3L SD/eMMC support
>
> From: Biju Das <biju.das.jz@bp.renesas.com>
>
> RZ/G3L SoC has:
>
> Channel 0 supports SD and eMMC (including HS400/HS400ES).
> Channel 1 supports SD and eMMC (except for HS400).
> Channel 2 supports SD.
>
> The SoC supports a maximum frequency of 150 MHz. The SD0 interface does not support IOVS and PWEN in
> the SDHI register (no internal regulator), unlike SD1 and SD2. It has an internal divider for all
> modes except HS400.
> It also has a 2048-bit divider compared to 512 on others. Moreover RZ/G3L supports HS400 enhanced
> strobe mode.
>
> v1->v2:
> * Collected tag for binding patch.
> * Resending the series as there is an issue with patch threading from
> patch #14.
>
> Biju Das (17):
> dt-bindings: mmc: renesas,sdhi: Document RZ/G3L (r9a08g046) SoC
> clk: renesas: r9a08g046: Add clock and reset entries for SDHI
> pinctrl: renesas: rzg2l: Add SD channel POC support for RZ/G3L
> mmc: renesas_sdhi: Fix whitespace alignment in struct
> renesas_sdhi_of_data
> mmc: renesas_sdhi_internal_dmac: Fix whitespace alignment in struct
> initializer
> mmc: renesas_sdhi: Introduce renesas_sdhi_hw_info to abstract clock
> mask
> mmc: renesas_sdhi: Add max_divider to renesas_sdhi_hw_info
> mmc: renesas_sdhi: Add tuning_delay hw_info flag
> mmc: renesas_sdhi: Add internal_divider hw_info flag for clk rate
> adjustment
> mmc: renesas_sdhi: Add optional axis/axim reset controls
> mmc: renesas_sdhi: Add RZ/G3L SDHI support
> mmc: renesas_sdhi: Save and restore IOVS across suspend/resume
> mmc: renesas_sdhi: Add RZ/G3L HS400 support
> mmc: renesas_sdhi: Add HS400 enhanced strobe support for RZ/G3L
> arm64: dts: renesas: r9a08g046: Add SDHI nodes for RZ/G3L SoC and
> SDHI1 pincontrol on SMARC EVK
> arm64: dts: renesas: rzg3l-smarc-som: Enable SD/eMMC on SDHI0
> arm64: dts: renesas: rzg3l-smarc-som: Enable SDHI2
>
> .../devicetree/bindings/mmc/renesas,sdhi.yaml | 101 ++++++--
> arch/arm64/boot/dts/renesas/r9a08g046.dtsi | 73 +++++-
> .../boot/dts/renesas/r9a08g046l48-smarc.dts | 89 +++++++
> .../boot/dts/renesas/rzg3l-smarc-som.dtsi | 199 +++++++++++++++
> drivers/clk/renesas/r9a08g046-cpg.c | 92 +++++++
> drivers/mmc/host/renesas_sdhi.h | 25 +-
> drivers/mmc/host/renesas_sdhi_core.c | 226 +++++++++++++-----
> drivers/mmc/host/renesas_sdhi_internal_dmac.c | 71 +++++-
> drivers/mmc/host/renesas_sdhi_sys_dmac.c | 67 ++++--
> drivers/pinctrl/renesas/pinctrl-rzg2l.c | 74 ++++--
> 10 files changed, 889 insertions(+), 128 deletions(-)
>
> --
> 2.43.0
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v17 00/17] Add Renesas RZ/G3L SD/eMMC support
2026-06-03 7:00 ` [PATCH v17 00/17] Add Renesas RZ/G3L SD/eMMC support Biju Das
@ 2026-06-03 7:13 ` Geert Uytterhoeven
2026-06-03 7:20 ` Biju Das
2026-06-03 7:19 ` wsa+renesas
1 sibling, 1 reply; 10+ messages in thread
From: Geert Uytterhoeven @ 2026-06-03 7:13 UTC (permalink / raw)
To: Biju Das
Cc: biju.das.au, Ulf Hansson, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Geert Uytterhoeven, Philipp Zabel, magnus.damm,
wsa+renesas, linux-mmc@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-renesas-soc@vger.kernel.org, Prabhakar Mahadev Lad
Hi Biju,
On Wed, 3 Jun 2026 at 09:00, Biju Das <biju.das.jz@bp.renesas.com> wrote:
> Please ignore this series as by mistake instead of patch series 2
> I mentioned it as Patch series 17.
>
> I will fix the issue soon.
How? I am afraid the next revision must be v18, not to confuse b4?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v17 00/17] Add Renesas RZ/G3L SD/eMMC support
2026-06-03 7:00 ` [PATCH v17 00/17] Add Renesas RZ/G3L SD/eMMC support Biju Das
2026-06-03 7:13 ` Geert Uytterhoeven
@ 2026-06-03 7:19 ` wsa+renesas
2026-06-03 7:27 ` Biju Das
1 sibling, 1 reply; 10+ messages in thread
From: wsa+renesas @ 2026-06-03 7:19 UTC (permalink / raw)
To: Biju Das
Cc: biju.das.au, Ulf Hansson, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Geert Uytterhoeven, Philipp Zabel, magnus.damm,
linux-mmc@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
Prabhakar Mahadev Lad
[-- Attachment #1: Type: text/plain, Size: 63 bytes --]
> I will fix the issue soon.
No need to resend from my POV.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH v17 00/17] Add Renesas RZ/G3L SD/eMMC support
2026-06-03 7:13 ` Geert Uytterhoeven
@ 2026-06-03 7:20 ` Biju Das
0 siblings, 0 replies; 10+ messages in thread
From: Biju Das @ 2026-06-03 7:20 UTC (permalink / raw)
To: geert
Cc: biju.das.au, Ulf Hansson, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Geert Uytterhoeven, Philipp Zabel, magnus.damm,
wsa+renesas, linux-mmc@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-renesas-soc@vger.kernel.org, Prabhakar Mahadev Lad
Hi Geert,
> -----Original Message-----
> From: Geert Uytterhoeven <geert@linux-m68k.org>
> Sent: 03 June 2026 08:14
> Subject: Re: [PATCH v17 00/17] Add Renesas RZ/G3L SD/eMMC support
>
> Hi Biju,
>
> On Wed, 3 Jun 2026 at 09:00, Biju Das <biju.das.jz@bp.renesas.com> wrote:
> > Please ignore this series as by mistake instead of patch series 2 I
> > mentioned it as Patch series 17.
> >
> > I will fix the issue soon.
>
> How? I am afraid the next revision must be v18, not to confuse b4?
Previously patchwork has listed all the patches in order[1] and b4 some
patches went out of order because of a mistake I did while sending out.
As this patch series is v2 version and no patch is being reviewed rather than
binding patch in v1, do we care about b4 tooling?
[1] https://patchwork.kernel.org/project/linux-renesas-soc/list/?series=1103347
Cheers,
Biju
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH v17 00/17] Add Renesas RZ/G3L SD/eMMC support
2026-06-03 7:19 ` wsa+renesas
@ 2026-06-03 7:27 ` Biju Das
0 siblings, 0 replies; 10+ messages in thread
From: Biju Das @ 2026-06-03 7:27 UTC (permalink / raw)
To: wsa+renesas
Cc: biju.das.au, Ulf Hansson, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Geert Uytterhoeven, Philipp Zabel, magnus.damm,
linux-mmc@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
Prabhakar Mahadev Lad
Hi Wolfram,
Thanks for the feedback.
> -----Original Message-----
> From: wsa+renesas <wsa+renesas@sang-engineering.com>
> Sent: 03 June 2026 08:19
> Subject: Re: [PATCH v17 00/17] Add Renesas RZ/G3L SD/eMMC support
>
>
> > I will fix the issue soon.
>
> No need to resend from my POV.
I will wait for review comments then.
Cheers,
Biju
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2026-06-03 7:27 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-03 6:57 [PATCH v17 00/17] Add Renesas RZ/G3L SD/eMMC support Biju
2026-06-03 6:57 ` [PATCH v17 01/17] dt-bindings: mmc: renesas,sdhi: Document RZ/G3L (r9a08g046) SoC Biju
2026-06-03 6:57 ` [PATCH v17 15/17] arm64: dts: renesas: r9a08g046: Add SDHI nodes for RZ/G3L SoC and SDHI1 pincontrol on SMARC EVK Biju
2026-06-03 6:57 ` [PATCH v17 16/17] arm64: dts: renesas: rzg3l-smarc-som: Enable SD/eMMC on SDHI0 Biju
2026-06-03 6:57 ` [PATCH v17 17/17] arm64: dts: renesas: rzg3l-smarc-som: Enable SDHI2 Biju
2026-06-03 7:00 ` [PATCH v17 00/17] Add Renesas RZ/G3L SD/eMMC support Biju Das
2026-06-03 7:13 ` Geert Uytterhoeven
2026-06-03 7:20 ` Biju Das
2026-06-03 7:19 ` wsa+renesas
2026-06-03 7:27 ` Biju Das
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox