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


Biju Das <biju.das@...>
 

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(+)

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. */
--
2.7.4


Pavel Machek
 

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
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany


Biju Das <biju.das@...>
 

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
 

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
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany