Re: [PATCH 1/3] arm64: dts: renesas: Add CN15 eMMC and SD overlays for RZ/V2N EVK

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Geert,

Thank you for the review.

On Thu, Jun 26, 2025 at 12:58 PM Geert Uytterhoeven
<geert@xxxxxxxxxxxxxx> wrote:
>
> Hi Prabhakar,
>
> On Fri, 20 Jun 2025 at 14:10, Prabhakar <prabhakar.csengg@xxxxxxxxx> wrote:
> > From: Lad Prabhakar <prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx>
> >
> > Introduce device tree overlays to support the eMMC (RTK0EF0186B02000BJ)
> > and microSD (RTK0EF0186B01000BJ) sub-boards via the CN15 connector on the
> > RZ/V2N EVK. These overlays enable SDHI0 with appropriate pinctrl settings,
> > regulator configurations, and GPIO handling.
> >
> > Shared DTSI fragments (rzv2-evk-cn15-emmc-common.dtsi and
> > rzv2-evk-cn15-sd-common.dtsi) provide reusable configurations for both
> > RZ/V2N and RZ/V2H EVKs, as both support the same CN15 sub-boards.
> >
> > Additionally, the base board DTS is updated to define an `mmc0` alias
> > pointing to `&sdhi0`, and to add a fixed 1.8V regulator node (`reg_1p8v`)
> > intended for use by the optional eMMC sub-board and, in the future, the
> > ADV7535 HDMI encoder (not yet enabled in the DTS).
> >
> > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx>
>
> Thanks for your patch!
>
> > --- /dev/null
> > +++ b/arch/arm64/boot/dts/renesas/r9a09g056n48-rzv2n-evk-cn15-emmc.dtso
> > @@ -0,0 +1,15 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +/*
> > + * Device Tree overlay for the RZ/V2N EVK with the eMMC sub-board
> > + * (RTK0EF0186802000BJ) connected to the CN15 connector.
> > + *
> > + * Copyright (C) 2025 Renesas Electronics Corp.
> > + */
> > +
> > +/dts-v1/;
> > +/plugin/;
> > +
> > +#define RZV2N_PA               10
>
> This is duplicated from r9a09g056.dtsi, but unused?
>
Ouch, I'll drop this and the below macro too.

> > +#define EMMC_GPIO(port, pin)   RZG2L_GPIO(RZV2N_P##port, pin)
>
> Unused?
>
> > +
> > +#include "rzv2-evk-cn15-emmc-common.dtsi"
>
> Hence you can just have a single rzv2-evk-cn15-emmc.dtso that works
> on both RZ/V2H and RZ/V2N.
>
Agreed (I will squash patch 3/3 into the same patch).

> > diff --git a/arch/arm64/boot/dts/renesas/r9a09g056n48-rzv2n-evk-cn15-sd.dtso b/arch/arm64/boot/dts/renesas/r9a09g056n48-rzv2n-evk-cn15-sd.dtso
> > new file mode 100644
> > index 000000000000..6268dda138ab
> > --- /dev/null
> > +++ b/arch/arm64/boot/dts/renesas/r9a09g056n48-rzv2n-evk-cn15-sd.dtso
> > @@ -0,0 +1,16 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +/*
> > + * Device Tree overlay for the RZ/V2N EVK with the SD sub-board
> > + * (RTK0EF0186B01000BJ) connected to the CN15 connector.
> > + *
> > + * Copyright (C) 2025 Renesas Electronics Corp.
> > + */
> > +
> > +/dts-v1/;
> > +/plugin/;
> > +
> > +#define RZV2N_PA               10
>
> This is duplicated from r9a09g056.dtsi. Can we avoid that?
> If not, I think we found the justification for moving these definitions
> to include/dt-bindings/pinctrl/renesas,r9a09g056-pinctrl.h...
>
> > +#define SD_GPIO(port, pin)     RZG2L_GPIO(RZV2N_P##port, pin)
> > +#define SD_PORT_PINMUX(b, p, f)        RZG2L_PORT_PINMUX(RZV2N_P##b, p, f)
> > +
> > +#include "rzv2-evk-cn15-sd-common.dtsi"
> > diff --git a/arch/arm64/boot/dts/renesas/r9a09g056n48-rzv2n-evk.dts b/arch/arm64/boot/dts/renesas/r9a09g056n48-rzv2n-evk.dts
> > index b63ee1ff18d5..795d9f6b9651 100644
> > --- a/arch/arm64/boot/dts/renesas/r9a09g056n48-rzv2n-evk.dts
> > +++ b/arch/arm64/boot/dts/renesas/r9a09g056n48-rzv2n-evk.dts
> > @@ -24,6 +24,7 @@ aliases {
> >                 i2c6 = &i2c6;
> >                 i2c7 = &i2c7;
> >                 i2c8 = &i2c8;
> > +               mmc0 = &sdhi0;
>
> While (out-of-tree) dynamic DT overlays do not support updating aliases
> yet, this logically belongs in the overlay, so please move it there.
>
Ok, I'll move it to the overlay as `mmc0 = "/soc/mmc@15c00000";`

> >                 mmc1 = &sdhi1;
> >                 serial0 = &scif;
> >         };
> > --- /dev/null
> > +++ b/arch/arm64/boot/dts/renesas/rzv2-evk-cn15-emmc-common.dtsi
> > @@ -0,0 +1,46 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +/*
> > + * Shared DT include for the eMMC Sub Board (RTK0EF0186B02000BJ), which
> > + * is connected to the CN15 connector on the RZ/V2H and RZ/V2N EVKs.
> > + *
> > + * Contains common pinctrl and SDHI0 definitions.
> > + *
> > + * Copyright (C) 2025 Renesas Electronics Corp.
> > + */
> > +
> > +/dts-v1/;
> > +/plugin/;
>
> These two directives belong in the .dtso files (and you already have
> them there).
>
Agreed, I will drop them.

> > --- /dev/null
> > +++ b/arch/arm64/boot/dts/renesas/rzv2-evk-cn15-sd-common.dtsi
> > @@ -0,0 +1,67 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +/*
> > + * Shared DT include for the microSD Sub Board (RTK0EF0186B01000BJ), which
> > + * is connected to the CN15 connector on the RZ/V2H and RZ/V2N EVKs.
> > + *
> > + * Contains common pinctrl and SDHI0 definitions.
> > + *
> > + * Copyright (C) 2025 Renesas Electronics Corp.
> > + */
> > +
> > +/dts-v1/;
> > +/plugin/;
>
> Likewise.
>
> > +
> > +#include <dt-bindings/gpio/gpio.h>
> > +#include <dt-bindings/pinctrl/rzg2l-pinctrl.h>
> > +
> > +&{/} {
> > +       vqmmc_sdhi0: regulator-vqmmc-sdhi0 {
> > +               compatible = "regulator-gpio";
> > +               regulator-name = "SDHI0 VqmmC";
> > +               gpios = <&pinctrl SD_GPIO(A, 0) GPIO_ACTIVE_HIGH>;
>
> If you use a macro to abstract the GPIO number, please include the
> bank and port number in the abstraction.
>
> Alternatively, as both RZ/V2H and RZ/V2N use PA0, you can use
> RZG2L_GPIO(10, 10) directly.  That just leaves us with a desire to
> express "A" instead of 10...
>
> Note that you end up with the exact same .dtbo for RZ/V2H and RZ/V2N
> again...
>
Good point, I will switch to RZG2L_GPIO(10, x).

Cheers,
Prabhakar





[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux