sunxi: orangepi-3: use power led to show system running status

The "status led" should be used for other purposes, like networking,
or IO r/w.

Using power led for system running status is fair. It should flash
while the device is booting and upgrading, and keep lighting when it
runs normally.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
Tianling Shen 2021-07-28 03:19:31 +08:00
parent 9fdddfc7a1
commit 410226a48d
No known key found for this signature in database
GPG Key ID: 6850B6345C862176

View File

@ -3,7 +3,7 @@ From: Tianling Shen <cnsztl@immortalwrt.org>
Date: Sat, 19 Jun 2021 12:09:34 +0800
Subject: [PATCH] arm64: dts: allwinner: h6: orangepi-3: add status LED aliases
Use the status led on the casing for showing system status.
Use the Power LED on the casing for showing system status.
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
---
@ -12,24 +12,23 @@ Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts
@@ -18,6 +18,11 @@
@@ -18,6 +18,10 @@
serial0 = &uart0;
serial1 = &uart1;
ethernet0 = &emac;
+
+ led-boot = &led_status;
+ led-failsafe = &led_status;
+ led-running = &led_status;
+ led-upgrade = &led_status;
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
};
chosen {
@@ -45,7 +50,7 @@
default-state = "on";
};
@@ -39,7 +43,7 @@
leds {
compatible = "gpio-leds";
- status {
+ led_status: status {
label = "orangepi:green:status";
gpios = <&r_pio 0 7 GPIO_ACTIVE_HIGH>; /* PL7 */
};
- power {
+ led_power: power {
label = "orangepi:red:power";
gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */
default-state = "on";