--- 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;
};
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";
};
};
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>
---
};
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";
- };
- };
-
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 @@