diff mbox series

[4.19.y-cip,1/6] arm64: dts: renesas: r8a774c0-cat874: Add LEDs support

Message ID 1563200930-39297-2-git-send-email-biju.das@bp.renesas.com (mailing list archive)
State Accepted
Headers show
Series Add LED/WDT support | expand

Commit Message

Biju Das July 15, 2019, 2:28 p.m. UTC
From: Fabrizio Castro <fabrizio.castro@bp.renesas.com>

commit dc0b439471323521a20314934080f51e8589fd19 upstream.

This patch adds LEDs support to the CAT874 board specific
device tree.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Biju Das <biju.das@bp.renesas.com>
---
 arch/arm64/boot/dts/renesas/r8a774c0-cat874.dts | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

Comments

Pavel Machek July 16, 2019, 8:26 p.m. UTC | #1
Hi!

> index f08778e..af396bb 100644
> --- a/arch/arm64/boot/dts/renesas/r8a774c0-cat874.dts
> +++ b/arch/arm64/boot/dts/renesas/r8a774c0-cat874.dts
> @@ -22,6 +22,30 @@
>  		stdout-path = "serial0:115200n8";
>  	};
>  
> +	leds {
> +		compatible = "gpio-leds";
> +
> +		led0 {
> +			gpios = <&gpio5 19 GPIO_ACTIVE_HIGH>;
> +			label = "LED0";
> +		};
> +
> +		led1 {
> +			gpios = <&gpio3 14 GPIO_ACTIVE_HIGH>;
> +			label = "LED1";
> +		};
> +
> +		led2 {
> +			gpios = <&gpio4 10 GPIO_ACTIVE_HIGH>;
> +			label = "LED2";
> +		};
> +
> +		led3 {
> +			gpios = <&gpio6 4 GPIO_ACTIVE_HIGH>;
> +			label = "LED3";
> +		};
> +	};

With my LED maintainer hat on... these are not exactly useful LED
names. Do they have any fixed meaning? Are they labeled on the board?
What color are they?

Best regards,
								Pavel
Biju Das July 17, 2019, 6:59 a.m. UTC | #2
Hi Pavel,

Thanks for the feedback.

> Subject: Re: [cip-dev] [PATCH 4.19.y-cip 1/6] arm64: dts: renesas: r8a774c0-
> cat874: Add LEDs support
> 
> Hi!
> 
> > index f08778e..af396bb 100644
> > --- a/arch/arm64/boot/dts/renesas/r8a774c0-cat874.dts
> > +++ b/arch/arm64/boot/dts/renesas/r8a774c0-cat874.dts
> > @@ -22,6 +22,30 @@
> >  		stdout-path = "serial0:115200n8";
> >  	};
> >
> > +	leds {
> > +		compatible = "gpio-leds";
> > +
> > +		led0 {
> > +			gpios = <&gpio5 19 GPIO_ACTIVE_HIGH>;
> > +			label = "LED0";
> > +		};
> > +
> > +		led1 {
> > +			gpios = <&gpio3 14 GPIO_ACTIVE_HIGH>;
> > +			label = "LED1";
> > +		};
> > +
> > +		led2 {
> > +			gpios = <&gpio4 10 GPIO_ACTIVE_HIGH>;
> > +			label = "LED2";
> > +		};
> > +
> > +		led3 {
> > +			gpios = <&gpio6 4 GPIO_ACTIVE_HIGH>;
> > +			label = "LED3";
> > +		};
> > +	};
> 
> With my LED maintainer hat on... these are not exactly useful LED names. Do
> they have any fixed meaning? Are they labeled on the board?
> What color are they?

It is labelled as LED0 label on the board and green colour. 

Basically this board is as per 96boards CE specification
System and User LEDs
The following LEDs shall be present on the board.
The LEDs shall be of the specified size, color and location.
The User LEDs shall be directly programmable from the SoC.
1. WiFi activity LED Yellow Type: 0603 SMD
2. Bluetooth activity LED Blue Type: 0603 SMD
3. User LEDs x4 Green Type: 0603 SMD
Other LEDs and UI interfaces are optional.

As a LED maintainer, What is your recommendation for mainline?

1) label = "LED0"; --> based on the label on the board

2) label = " gren:LED0 "; --> based on the colour and label on the board.

3) label = " green:user1";--> based on the colour and label as per 96 boards CE specification.

Regards,
Biju
Pavel Machek July 17, 2019, 9:39 a.m. UTC | #3
Hi!

> > > +		led3 {
> > > +			gpios = <&gpio6 4 GPIO_ACTIVE_HIGH>;
> > > +			label = "LED3";
> > > +		};
> > > +	};
> > 
> > With my LED maintainer hat on... these are not exactly useful LED names. Do
> > they have any fixed meaning? Are they labeled on the board?
> > What color are they?
> 
> It is labelled as LED0 label on the board and green colour. 
> 
> Basically this board is as per 96boards CE specification
> System and User LEDs
> The following LEDs shall be present on the board.
> The LEDs shall be of the specified size, color and location.
> The User LEDs shall be directly programmable from the SoC.
> 1. WiFi activity LED Yellow Type: 0603 SMD
> 2. Bluetooth activity LED Blue Type: 0603 SMD
> 3. User LEDs x4 Green Type: 0603 SMD
> Other LEDs and UI interfaces are optional.
> 
> As a LED maintainer, What is your recommendation for mainline?
> 
> 1) label = "LED0"; --> based on the label on the board
> 
> 2) label = " gren:LED0 "; --> based on the colour and label on the board.
> 
> 3) label = " green:user1";--> based on the colour and label as per 96 boards CE specification.

Lets make it "green:user1".

Thank you,
								Pavel
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/renesas/r8a774c0-cat874.dts b/arch/arm64/boot/dts/renesas/r8a774c0-cat874.dts
index f08778e..af396bb 100644
--- a/arch/arm64/boot/dts/renesas/r8a774c0-cat874.dts
+++ b/arch/arm64/boot/dts/renesas/r8a774c0-cat874.dts
@@ -22,6 +22,30 @@ 
 		stdout-path = "serial0:115200n8";
 	};
 
+	leds {
+		compatible = "gpio-leds";
+
+		led0 {
+			gpios = <&gpio5 19 GPIO_ACTIVE_HIGH>;
+			label = "LED0";
+		};
+
+		led1 {
+			gpios = <&gpio3 14 GPIO_ACTIVE_HIGH>;
+			label = "LED1";
+		};
+
+		led2 {
+			gpios = <&gpio4 10 GPIO_ACTIVE_HIGH>;
+			label = "LED2";
+		};
+
+		led3 {
+			gpios = <&gpio6 4 GPIO_ACTIVE_HIGH>;
+			label = "LED3";
+		};
+	};
+
 	memory@48000000 {
 		device_type = "memory";
 		/* first 128MB is reserved for secure area. */