arm64: dts: allwinner: h6: Add LED device nodes for Pine H64
diff mbox

Message ID 20180620071341.8143-1-wens@csie.org
State New, archived
Headers show

Commit Message

Chen-Yu Tsai June 20, 2018, 7:13 a.m. UTC
The Pine H64 has 3 GPIO-controlled LEDs, which are labeled "heartbeat",
"link", and "status".

Add device nodes for them.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 .../boot/dts/allwinner/sun50i-h6-pine-h64.dts | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

Comments

Maxime Ripard June 20, 2018, 8:43 a.m. UTC | #1
On Wed, Jun 20, 2018 at 03:13:41PM +0800, Chen-Yu Tsai wrote:
> The Pine H64 has 3 GPIO-controlled LEDs, which are labeled "heartbeat",
> "link", and "status".
>
> Add device nodes for them.
> 
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> ---

Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>

Thanks!
Maxime
Chen-Yu Tsai June 26, 2018, 3:29 a.m. UTC | #2
On Wed, Jun 20, 2018 at 4:43 PM, Maxime Ripard
<maxime.ripard@bootlin.com> wrote:
> On Wed, Jun 20, 2018 at 03:13:41PM +0800, Chen-Yu Tsai wrote:
>> The Pine H64 has 3 GPIO-controlled LEDs, which are labeled "heartbeat",
>> "link", and "status".
>>
>> Add device nodes for them.
>>
>> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
>> ---
>
> Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>

Applied.

Patch
diff mbox

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts
index b6f2d6b2ecae..2e97173c9204 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts
@@ -20,6 +20,25 @@ 
 	chosen {
 		stdout-path = "serial0:115200n8";
 	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		heartbeat {
+			label = "pine-h64:green:heartbeat";
+			gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */
+		};
+
+		link {
+			label = "pine-h64:white:link";
+			gpios = <&r_pio 0 3 GPIO_ACTIVE_HIGH>; /* PL3 */
+		};
+
+		status {
+			label = "pine-h64:blue:status";
+			gpios = <&r_pio 0 7 GPIO_ACTIVE_HIGH>; /* PL7 */
+		};
+	};
 };
 
 &r_i2c {