[PATCH 06/13] arm64: dts: renesas: r9a09g087m44-rzn2h-evk: Add user LEDs

Prabhakar posted 13 patches 1 month, 3 weeks ago
[PATCH 06/13] arm64: dts: renesas: r9a09g087m44-rzn2h-evk: Add user LEDs
Posted by Prabhakar 1 month, 3 weeks ago
From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>

Add USER LED0-LED8, which are available on RZ/N2H EVK.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
 .../dts/renesas/r9a09g087m44-rzn2h-evk.dts    | 54 +++++++++++++++++++
 1 file changed, 54 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r9a09g087m44-rzn2h-evk.dts b/arch/arm64/boot/dts/renesas/r9a09g087m44-rzn2h-evk.dts
index d6ba14a26f03..f6437e82a7de 100644
--- a/arch/arm64/boot/dts/renesas/r9a09g087m44-rzn2h-evk.dts
+++ b/arch/arm64/boot/dts/renesas/r9a09g087m44-rzn2h-evk.dts
@@ -7,10 +7,64 @@
 
 /dts-v1/;
 
+#include <dt-bindings/gpio/gpio.h>
+
 #include "r9a09g087m44.dtsi"
 #include "rzt2h-n2h-evk-common.dtsi"
 
 / {
 	model = "Renesas RZ/N2H EVK Board based on r9a09g087m44";
 	compatible = "renesas,rzn2h-evk", "renesas,r9a09g087m44", "renesas,r9a09g087";
+
+	leds {
+		compatible = "gpio-leds";
+
+		led3 {
+			/* DSW18-7: ON, DSW18-8: OFF */
+			gpios = <&pinctrl RZN2H_GPIO(31, 6) GPIO_ACTIVE_LOW>;
+		};
+
+		led4 {
+			/* DSW18-9: ON, DSW18-10: OFF */
+			gpios = <&pinctrl RZN2H_GPIO(18, 1) GPIO_ACTIVE_LOW>;
+		};
+
+		led5 {
+			/* DSW18-1: ON, DSW18-2: OFF */
+			gpios = <&pinctrl RZN2H_GPIO(22, 7) GPIO_ACTIVE_LOW>;
+		};
+
+		led6 {
+			/* DSW18-3: ON, DSW18-4: OFF */
+			gpios = <&pinctrl RZN2H_GPIO(23, 0) GPIO_ACTIVE_LOW>;
+		};
+
+		led7 {
+			/*
+			 * DSW18-5: ON, DSW18-6: OFF
+			 * DSW19-3: ON, DSW19-4: OFF
+			 */
+			gpios = <&pinctrl RZN2H_GPIO(14, 3) GPIO_ACTIVE_LOW>;
+		};
+
+		led8 {
+			/* DSW15-8: OFF, DSW15-9: OFF, DSW15-10: ON */
+			gpios = <&pinctrl RZN2H_GPIO(14, 6) GPIO_ACTIVE_LOW>;
+		};
+
+		led9 {
+			/* DSW15-5: OFF, DSW16-6: ON */
+			gpios = <&pinctrl RZN2H_GPIO(14, 7) GPIO_ACTIVE_LOW>;
+		};
+
+		led10 {
+			/* DSW17-3: OFF, DSW17-4: ON */
+			gpios = <&pinctrl RZN2H_GPIO(2, 7) GPIO_ACTIVE_LOW>;
+		};
+
+		led11 {
+			/* DSW17-1: OFF, DSW17-2: ON */
+			gpios = <&pinctrl RZN2H_GPIO(3, 0) GPIO_ACTIVE_LOW>;
+		};
+	};
 };
-- 
2.50.1
Re: [PATCH 06/13] arm64: dts: renesas: r9a09g087m44-rzn2h-evk: Add user LEDs
Posted by Geert Uytterhoeven 1 month, 2 weeks ago
Hi Prabhakar,

On Tue, 12 Aug 2025 at 22:03, Prabhakar <prabhakar.csengg@gmail.com> wrote:
> From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
>
> Add USER LED0-LED8, which are available on RZ/N2H EVK.
>
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>

Thanks for your patch!

> --- a/arch/arm64/boot/dts/renesas/r9a09g087m44-rzn2h-evk.dts
> +++ b/arch/arm64/boot/dts/renesas/r9a09g087m44-rzn2h-evk.dts
> @@ -7,10 +7,64 @@
>
>  /dts-v1/;
>
> +#include <dt-bindings/gpio/gpio.h>
> +
>  #include "r9a09g087m44.dtsi"
>  #include "rzt2h-n2h-evk-common.dtsi"
>
>  / {
>         model = "Renesas RZ/N2H EVK Board based on r9a09g087m44";
>         compatible = "renesas,rzn2h-evk", "renesas,r9a09g087m44", "renesas,r9a09g087";
> +
> +       leds {
> +               compatible = "gpio-leds";
> +
> +               led3 {
> +                       /* DSW18-7: ON, DSW18-8: OFF */
> +                       gpios = <&pinctrl RZN2H_GPIO(31, 6) GPIO_ACTIVE_LOW>;

Similar comments like for the RZ/T2H EVB, e.g.

    led-3 {
            /* DSW18-7: ON, DSW18-8: OFF */
            gpios = <&pinctrl RZN2H_GPIO(31, 6) GPIO_ACTIVE_LOW>;
            color = <LED_COLOR_ID_GREEN>;
            function = LED_FUNCTION_DEBUG;
            function-enumerator = <4>;
    };

> +               };
> +
> +               led4 {
> +                       /* DSW18-9: ON, DSW18-10: OFF */
> +                       gpios = <&pinctrl RZN2H_GPIO(18, 1) GPIO_ACTIVE_LOW>;
> +               };
> +
> +               led5 {
> +                       /* DSW18-1: ON, DSW18-2: OFF */
> +                       gpios = <&pinctrl RZN2H_GPIO(22, 7) GPIO_ACTIVE_LOW>;
> +               };
> +
> +               led6 {
> +                       /* DSW18-3: ON, DSW18-4: OFF */
> +                       gpios = <&pinctrl RZN2H_GPIO(23, 0) GPIO_ACTIVE_LOW>;
> +               };
> +
> +               led7 {
> +                       /*
> +                        * DSW18-5: ON, DSW18-6: OFF
> +                        * DSW19-3: ON, DSW19-4: OFF

Shouldn't that be "DSW19-3: OFF, DSW19-4: ON"?

> +                        */
> +                       gpios = <&pinctrl RZN2H_GPIO(14, 3) GPIO_ACTIVE_LOW>;
> +               };
> +
> +               led8 {
> +                       /* DSW15-8: OFF, DSW15-9: OFF, DSW15-10: ON */
> +                       gpios = <&pinctrl RZN2H_GPIO(14, 6) GPIO_ACTIVE_LOW>;
> +               };
> +
> +               led9 {
> +                       /* DSW15-5: OFF, DSW16-6: ON */

s/DSW16/DSW15/

> +                       gpios = <&pinctrl RZN2H_GPIO(14, 7) GPIO_ACTIVE_LOW>;
> +               };
> +
> +               led10 {
> +                       /* DSW17-3: OFF, DSW17-4: ON */
> +                       gpios = <&pinctrl RZN2H_GPIO(2, 7) GPIO_ACTIVE_LOW>;
> +               };
> +
> +               led11 {
> +                       /* DSW17-1: OFF, DSW17-2: ON */
> +                       gpios = <&pinctrl RZN2H_GPIO(3, 0) GPIO_ACTIVE_LOW>;
> +               };
> +       };
>  };

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
Re: [PATCH 06/13] arm64: dts: renesas: r9a09g087m44-rzn2h-evk: Add user LEDs
Posted by Lad, Prabhakar 1 month, 2 weeks ago
Hi Geert,

Thank you for the review.

On Mon, Aug 18, 2025 at 3:15 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>
> Hi Prabhakar,
>
> On Tue, 12 Aug 2025 at 22:03, Prabhakar <prabhakar.csengg@gmail.com> wrote:
> > From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> >
> > Add USER LED0-LED8, which are available on RZ/N2H EVK.
> >
> > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
>
> Thanks for your patch!
>
> > --- a/arch/arm64/boot/dts/renesas/r9a09g087m44-rzn2h-evk.dts
> > +++ b/arch/arm64/boot/dts/renesas/r9a09g087m44-rzn2h-evk.dts
> > @@ -7,10 +7,64 @@
> >
> >  /dts-v1/;
> >
> > +#include <dt-bindings/gpio/gpio.h>
> > +
> >  #include "r9a09g087m44.dtsi"
> >  #include "rzt2h-n2h-evk-common.dtsi"
> >
> >  / {
> >         model = "Renesas RZ/N2H EVK Board based on r9a09g087m44";
> >         compatible = "renesas,rzn2h-evk", "renesas,r9a09g087m44", "renesas,r9a09g087";
> > +
> > +       leds {
> > +               compatible = "gpio-leds";
> > +
> > +               led3 {
> > +                       /* DSW18-7: ON, DSW18-8: OFF */
> > +                       gpios = <&pinctrl RZN2H_GPIO(31, 6) GPIO_ACTIVE_LOW>;
>
> Similar comments like for the RZ/T2H EVB, e.g.
>
>     led-3 {
>             /* DSW18-7: ON, DSW18-8: OFF */
>             gpios = <&pinctrl RZN2H_GPIO(31, 6) GPIO_ACTIVE_LOW>;
>             color = <LED_COLOR_ID_GREEN>;
>             function = LED_FUNCTION_DEBUG;
>             function-enumerator = <4>;
>     };
>
Agreed.

> > +               };
> > +
> > +               led4 {
> > +                       /* DSW18-9: ON, DSW18-10: OFF */
> > +                       gpios = <&pinctrl RZN2H_GPIO(18, 1) GPIO_ACTIVE_LOW>;
> > +               };
> > +
> > +               led5 {
> > +                       /* DSW18-1: ON, DSW18-2: OFF */
> > +                       gpios = <&pinctrl RZN2H_GPIO(22, 7) GPIO_ACTIVE_LOW>;
> > +               };
> > +
> > +               led6 {
> > +                       /* DSW18-3: ON, DSW18-4: OFF */
> > +                       gpios = <&pinctrl RZN2H_GPIO(23, 0) GPIO_ACTIVE_LOW>;
> > +               };
> > +
> > +               led7 {
> > +                       /*
> > +                        * DSW18-5: ON, DSW18-6: OFF
> > +                        * DSW19-3: ON, DSW19-4: OFF
>
> Shouldn't that be "DSW19-3: OFF, DSW19-4: ON"?
>
Agreed.

> > +                        */
> > +                       gpios = <&pinctrl RZN2H_GPIO(14, 3) GPIO_ACTIVE_LOW>;
> > +               };
> > +
> > +               led8 {
> > +                       /* DSW15-8: OFF, DSW15-9: OFF, DSW15-10: ON */
> > +                       gpios = <&pinctrl RZN2H_GPIO(14, 6) GPIO_ACTIVE_LOW>;
> > +               };
> > +
> > +               led9 {
> > +                       /* DSW15-5: OFF, DSW16-6: ON */
>
> s/DSW16/DSW15/
>
Agreed, (Ive also notified to update the user manual).


Cheers,
Prabhakar