From: Tianling Shen Date: Mon, 12 Feb 2024 11:21:38 +0000 (+0800) Subject: rockchip: remove LED label hack X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=08e249d43ca8011662bc862969534b6f0570a7a3;p=openwrt%2Fstaging%2Fneocturne.git 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 --- diff --git a/target/linux/rockchip/armv8/base-files/etc/board.d/01_leds b/target/linux/rockchip/armv8/base-files/etc/board.d/01_leds index ad84666600..ef89461056 100644 --- a/target/linux/rockchip/armv8/base-files/etc/board.d/01_leds +++ b/target/linux/rockchip/armv8/base-files/etc/board.d/01_leds @@ -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 diff --git a/target/linux/rockchip/patches-6.1/100-rockchip-use-system-LED-for-OpenWrt.patch b/target/linux/rockchip/patches-6.1/100-rockchip-use-system-LED-for-OpenWrt.patch index 01009c5eb8..683e5347f7 100644 --- a/target/linux/rockchip/patches-6.1/100-rockchip-use-system-LED-for-OpenWrt.patch +++ b/target/linux/rockchip/patches-6.1/100-rockchip-use-system-LED-for-OpenWrt.patch @@ -15,7 +15,15 @@ Signed-off-by: David Bauer --- 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 ++#include + #include + #include "rk3328.dtsi" + +@@ -16,6 +17,11 @@ aliases { ethernet1 = &rtl8153; mmc0 = &sdmmc; @@ -27,25 +35,29 @@ Signed-off-by: David Bauer }; chosen { -@@ -49,18 +54,18 @@ +@@ -48,19 +54,22 @@ + pinctrl-names = "default"; lan_led: led-0 { ++ color = ; ++ function = LED_FUNCTION_LAN; gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>; - label = "nanopi-r2s:green:lan"; -+ label = "green:lan"; }; sys_led: led-1 { ++ color = ; ++ 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 = ; ++ function = LED_FUNCTION_WAN; gpios = <&gpio2 RK_PC2 GPIO_ACTIVE_HIGH>; - label = "nanopi-r2s:green:wan"; -+ label = "green:wan"; }; }; diff --git a/target/linux/rockchip/patches-6.1/103-arm64-rockchip-add-OF-node-for-USB-eth-on-NanoPi-R2S.patch b/target/linux/rockchip/patches-6.1/103-arm64-rockchip-add-OF-node-for-USB-eth-on-NanoPi-R2S.patch index 2221077c97..eeef0df014 100644 --- a/target/linux/rockchip/patches-6.1/103-arm64-rockchip-add-OF-node-for-USB-eth-on-NanoPi-R2S.patch +++ b/target/linux/rockchip/patches-6.1/103-arm64-rockchip-add-OF-node-for-USB-eth-on-NanoPi-R2S.patch @@ -14,7 +14,7 @@ Signed-off-by: David Bauer --- 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>; diff --git a/target/linux/rockchip/patches-6.1/107-arm64-dts-rockchip-Update-LED-properties-for-Orange-.patch b/target/linux/rockchip/patches-6.1/107-arm64-dts-rockchip-Update-LED-properties-for-Orange-.patch index b1e26d4e3e..3aff37d096 100644 --- a/target/linux/rockchip/patches-6.1/107-arm64-dts-rockchip-Update-LED-properties-for-Orange-.patch +++ b/target/linux/rockchip/patches-6.1/107-arm64-dts-rockchip-Update-LED-properties-for-Orange-.patch @@ -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 --- @@ -27,30 +25,16 @@ Signed-off-by: Tianling Shen }; chosen { -@@ -36,22 +41,18 @@ - pinctrl-names = "default"; - - led-0 { -- function = LED_FUNCTION_LAN; -- color = ; +@@ -41,11 +46,10 @@ gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>; -+ label = "green:lan"; }; - led-1 { -- function = LED_FUNCTION_STATUS; -- color = ; + status_led: led-1 { + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio3 RK_PC5 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "heartbeat"; -+ label = "red:status"; }; led-2 { -- function = LED_FUNCTION_WAN; -- color = ; - gpios = <&gpio2 RK_PC2 GPIO_ACTIVE_HIGH>; -+ label = "green:wan"; - }; - }; - diff --git a/target/linux/rockchip/patches-6.1/108-arm64-dts-rockchip-add-LED-configuration-to-Orange-P.patch b/target/linux/rockchip/patches-6.1/108-arm64-dts-rockchip-add-LED-configuration-to-Orange-P.patch index 37b59925fc..af8f8b16ba 100644 --- a/target/linux/rockchip/patches-6.1/108-arm64-dts-rockchip-add-LED-configuration-to-Orange-P.patch +++ b/target/linux/rockchip/patches-6.1/108-arm64-dts-rockchip-add-LED-configuration-to-Orange-P.patch @@ -14,7 +14,7 @@ Signed-off-by: Tianling Shen --- 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>; diff --git a/target/linux/rockchip/patches-6.1/110-arm64-dts-rockchip-Update-LED-properties-for-NanoPi-.patch b/target/linux/rockchip/patches-6.1/110-arm64-dts-rockchip-Update-LED-properties-for-NanoPi-.patch index 64dc433a30..c22fdd52b8 100644 --- a/target/linux/rockchip/patches-6.1/110-arm64-dts-rockchip-Update-LED-properties-for-NanoPi-.patch +++ b/target/linux/rockchip/patches-6.1/110-arm64-dts-rockchip-Update-LED-properties-for-NanoPi-.patch @@ -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 --- --- 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 = ; -- function = LED_FUNCTION_LAN; -+ label = "green:lan"; - gpios = <&gpio3 RK_PA3 GPIO_ACTIVE_HIGH>; - }; - +@@ -40,7 +40,6 @@ power_led: led-power { -- color = ; -- function = LED_FUNCTION_POWER; + color = ; + function = LED_FUNCTION_POWER; - linux,default-trigger = "heartbeat"; -+ label = "red:power"; gpios = <&gpio3 RK_PA2 GPIO_ACTIVE_HIGH>; }; - led-wan { -- color = ; -- function = LED_FUNCTION_WAN; -+ label = "green:wan"; - gpios = <&gpio3 RK_PA4 GPIO_ACTIVE_HIGH>; - }; - - led-wlan { -- color = ; -- 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 = ; -- function = LED_FUNCTION_LAN; -- function-enumerator = <1>; -+ label = "green:lan1"; - gpios = <&gpio3 RK_PD6 GPIO_ACTIVE_HIGH>; - }; - - led-lan2 { -- color = ; -- 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 = ; -- function = LED_FUNCTION_POWER; + color = ; + function = LED_FUNCTION_POWER; - linux,default-trigger = "heartbeat"; -+ label = "red:power"; gpios = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>; }; - led-wan { -- color = ; -- 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 @@