RE: [PATCH 1/3] arm64: dts: renesas: r9a08g046: Add SDHI nodes for RZ/G3L SoC and SDHI1 pincontrol on SMARC EVK

From: Biju Das

Date: Fri Nov 20 2026 - 08:16:52 EST


Hi Geert,

Thanks for the feedback

> -----Original Message-----
> From: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
> Sent: 20 November 2026 12:52
> Subject: Re: [PATCH 1/3] arm64: dts: renesas: r9a08g046: Add SDHI nodes for RZ/G3L SoC and SDHI1
> pincontrol on SMARC EVK
>
> Hi Biju,
>
> On Thu, 12 Nov 2026 at 19:48, Biju Das <biju.das.au@xxxxxxxxx> wrote:
> > From: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
> >
> > 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@xxxxxxxxxxxxxx>
>
> Thanks for your patch!
>
> > --- a/arch/arm64/boot/dts/renesas/r9a08g046.dtsi
> > +++ b/arch/arm64/boot/dts/renesas/r9a08g046.dtsi
> > @@ -1062,9 +1062,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_IACLKM>,
> > + <&cpg CPG_MOD R9A08G046_SDHI0_IACLKS>;
> > + clock-names = "core", "clkh", "cd", "aclkm", "aclks";
> > + max-frequency = <150000000>;
>
> Given the bus clock can only run at 200, 100, 50, or 6.25 MHz,
> 150 Mhz looks strange to me.

Ref: RZG3L_clock_list_r1.10_ad.xlsx
400 MHz IMCL{K,K2} clock is prohibited for this SoC.
800 MHz HS clock is prohibited for this SoC.

IMCLK = SD / 2
HS = SD

IMCLK clock sources
400 MHz:- Prohibited
300.000
250.000
133.333


The next available max frequency = 300 / 2 = 150 MHz that goes to
SD interface.

>
> > + 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_IACLKM>,
> > + <&cpg CPG_MOD R9A08G046_SDHI1_IACLKS>;
> > + clock-names = "core", "clkh", "cd", "aclkm", "aclks";
> > + max-frequency = <150000000>;
>
> Likewise. This instance does not support HS400, but HS200 and HS400 use the same bus clock speed,
> right?

Yes that is correct, HS200 and HS400 use the same bus clock speed

for HS200 it is 1:1 option, so 300MHz and with internal divider(2) = 150 MHz

For HS400, Divider from SDctrl register=0, so 300MHz with SD_CTRL divider 2 =150 MHz.

>
> > + 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_IACLKM>,
> > + <&cpg CPG_MOD R9A08G046_SDHI2_IACLKS>;
> > + clock-names = "core", "clkh", "cd", "aclkm", "aclks";
> > + max-frequency = <150000000>;
>
> This instance maxes out at SDR104, so max-frequency should be lower?

SDR104 max frequency theoretical 208MHz.

In our SoC, 200 MHz is prohibited, so the next maximum available is 150MHz.

Cheers,
Biju