mirror of
https://github.com/openwrt/openwrt.git
synced 2025-02-21 09:42:09 +00:00
rockchip: remove LED label hack
Now we support parsing the color and function properties. Ref: e814acc59948 ("base-files: support parse DT LED color and function") Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
parent
62acd9a2f9
commit
08e249d43c
@ -25,8 +25,8 @@ friendlyarm,nanopi-r5c)
|
||||
;;
|
||||
friendlyarm,nanopi-r5s)
|
||||
ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth0"
|
||||
ucidef_set_led_netdev "lan1" "LAN1" "green:lan1" "eth1"
|
||||
ucidef_set_led_netdev "lan2" "LAN2" "green:lan2" "eth2"
|
||||
ucidef_set_led_netdev "lan1" "LAN1" "green:lan-1" "eth1"
|
||||
ucidef_set_led_netdev "lan2" "LAN2" "green:lan-2" "eth2"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -15,7 +15,15 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
|
||||
@@ -16,6 +16,11 @@
|
||||
@@ -6,6 +6,7 @@
|
||||
/dts-v1/;
|
||||
|
||||
#include <dt-bindings/input/input.h>
|
||||
+#include <dt-bindings/leds/common.h>
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include "rk3328.dtsi"
|
||||
|
||||
@@ -16,6 +17,11 @@
|
||||
aliases {
|
||||
ethernet1 = &rtl8153;
|
||||
mmc0 = &sdmmc;
|
||||
@ -27,25 +35,29 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
};
|
||||
|
||||
chosen {
|
||||
@@ -49,18 +54,18 @@
|
||||
@@ -48,19 +54,22 @@
|
||||
pinctrl-names = "default";
|
||||
|
||||
lan_led: led-0 {
|
||||
+ color = <LED_COLOR_ID_GREEN>;
|
||||
+ function = LED_FUNCTION_LAN;
|
||||
gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
|
||||
- label = "nanopi-r2s:green:lan";
|
||||
+ label = "green:lan";
|
||||
};
|
||||
|
||||
sys_led: led-1 {
|
||||
+ color = <LED_COLOR_ID_RED>;
|
||||
+ function = LED_FUNCTION_STATUS;
|
||||
gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
|
||||
- label = "nanopi-r2s:red:sys";
|
||||
+ label = "red:sys";
|
||||
default-state = "on";
|
||||
};
|
||||
|
||||
wan_led: led-2 {
|
||||
+ color = <LED_COLOR_ID_GREEN>;
|
||||
+ function = LED_FUNCTION_WAN;
|
||||
gpios = <&gpio2 RK_PC2 GPIO_ACTIVE_HIGH>;
|
||||
- label = "nanopi-r2s:green:wan";
|
||||
+ label = "green:wan";
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -14,7 +14,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
|
||||
@@ -402,6 +402,7 @@
|
||||
@@ -406,6 +406,7 @@
|
||||
rtl8153: device@2 {
|
||||
compatible = "usbbda,8153";
|
||||
reg = <2>;
|
||||
|
@ -5,8 +5,6 @@ Subject: [PATCH] arm64: dts: rockchip: Update LED properties for Orange Pi R1
|
||||
Plus
|
||||
|
||||
Add OpenWrt's LED aliases for showing system status.
|
||||
Also replace function/color with legacy label as OpenWrt relys on it
|
||||
to update LED settings.
|
||||
|
||||
Signed-off-by: Tianling Shen <cnsztl@gmail.com>
|
||||
---
|
||||
@ -27,30 +25,16 @@ Signed-off-by: Tianling Shen <cnsztl@gmail.com>
|
||||
};
|
||||
|
||||
chosen {
|
||||
@@ -36,22 +41,18 @@
|
||||
pinctrl-names = "default";
|
||||
|
||||
led-0 {
|
||||
- function = LED_FUNCTION_LAN;
|
||||
- color = <LED_COLOR_ID_GREEN>;
|
||||
@@ -41,11 +46,10 @@
|
||||
gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
|
||||
+ label = "green:lan";
|
||||
};
|
||||
|
||||
- led-1 {
|
||||
- function = LED_FUNCTION_STATUS;
|
||||
- color = <LED_COLOR_ID_RED>;
|
||||
+ status_led: led-1 {
|
||||
function = LED_FUNCTION_STATUS;
|
||||
color = <LED_COLOR_ID_RED>;
|
||||
gpios = <&gpio3 RK_PC5 GPIO_ACTIVE_HIGH>;
|
||||
- linux,default-trigger = "heartbeat";
|
||||
+ label = "red:status";
|
||||
};
|
||||
|
||||
led-2 {
|
||||
- function = LED_FUNCTION_WAN;
|
||||
- color = <LED_COLOR_ID_GREEN>;
|
||||
gpios = <&gpio2 RK_PC2 GPIO_ACTIVE_HIGH>;
|
||||
+ label = "green:wan";
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -14,7 +14,7 @@ Signed-off-by: Tianling Shen <cnsztl@gmail.com>
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus.dts
|
||||
@@ -362,6 +362,7 @@
|
||||
@@ -365,6 +365,7 @@
|
||||
rtl8153: device@2 {
|
||||
compatible = "usbbda,8153";
|
||||
reg = <2>;
|
||||
|
@ -5,82 +5,30 @@ Subject: [PATCH] arm64: dts: rockchip: Update LED properties for NanoPi R5
|
||||
series
|
||||
|
||||
Add OpenWrt's LED aliases for showing system status.
|
||||
Also replace function/color with legacy label as OpenWrt relys on it
|
||||
to update LED settings.
|
||||
|
||||
Signed-off-by: Tianling Shen <cnsztl@gmail.com>
|
||||
---
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5c.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5c.dts
|
||||
@@ -32,27 +32,22 @@
|
||||
pinctrl-0 = <&lan_led_pin>, <&power_led_pin>, <&wan_led_pin>, <&wlan_led_pin>;
|
||||
|
||||
led-lan {
|
||||
- color = <LED_COLOR_ID_GREEN>;
|
||||
- function = LED_FUNCTION_LAN;
|
||||
+ label = "green:lan";
|
||||
gpios = <&gpio3 RK_PA3 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
@@ -40,7 +40,6 @@
|
||||
power_led: led-power {
|
||||
- color = <LED_COLOR_ID_RED>;
|
||||
- function = LED_FUNCTION_POWER;
|
||||
color = <LED_COLOR_ID_RED>;
|
||||
function = LED_FUNCTION_POWER;
|
||||
- linux,default-trigger = "heartbeat";
|
||||
+ label = "red:power";
|
||||
gpios = <&gpio3 RK_PA2 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
led-wan {
|
||||
- color = <LED_COLOR_ID_GREEN>;
|
||||
- function = LED_FUNCTION_WAN;
|
||||
+ label = "green:wan";
|
||||
gpios = <&gpio3 RK_PA4 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
led-wlan {
|
||||
- color = <LED_COLOR_ID_GREEN>;
|
||||
- function = LED_FUNCTION_WLAN;
|
||||
+ label = "green:wlan";
|
||||
gpios = <&gpio3 RK_PA5 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
|
||||
@@ -23,29 +23,22 @@
|
||||
pinctrl-0 = <&lan1_led_pin>, <&lan2_led_pin>, <&power_led_pin>, <&wan_led_pin>;
|
||||
|
||||
led-lan1 {
|
||||
- color = <LED_COLOR_ID_GREEN>;
|
||||
- function = LED_FUNCTION_LAN;
|
||||
- function-enumerator = <1>;
|
||||
+ label = "green:lan1";
|
||||
gpios = <&gpio3 RK_PD6 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
led-lan2 {
|
||||
- color = <LED_COLOR_ID_GREEN>;
|
||||
- function = LED_FUNCTION_LAN;
|
||||
- function-enumerator = <2>;
|
||||
+ label = "green:lan2";
|
||||
gpios = <&gpio3 RK_PD7 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
@@ -39,7 +39,6 @@
|
||||
power_led: led-power {
|
||||
- color = <LED_COLOR_ID_RED>;
|
||||
- function = LED_FUNCTION_POWER;
|
||||
color = <LED_COLOR_ID_RED>;
|
||||
function = LED_FUNCTION_POWER;
|
||||
- linux,default-trigger = "heartbeat";
|
||||
+ label = "red:power";
|
||||
gpios = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
led-wan {
|
||||
- color = <LED_COLOR_ID_GREEN>;
|
||||
- function = LED_FUNCTION_WAN;
|
||||
+ label = "green:wan";
|
||||
gpios = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dtsi
|
||||
@@ -18,6 +18,11 @@
|
||||
|
Loading…
x
Reference in New Issue
Block a user