arm64: dts: rockchip: fix label of sys_led for nanopi-r4s
Subsystems (2)
PATCH 1/1 arm64: dts: rockchip: fix label of sys_led for nanopi-r4s
The sys_led of NanoPi R4S is labeled as SYS on the board and on the original case, and it is green, not red.
The board also has a red power led, but that one is connected to 3V3 and cannot be controled via GPIO.
The above can checked on page 17 of board's schematics at
https://wiki.friendlyelec.com/wiki/images/0/06/NanoPi-R4S-1GB-2008-Schematic.pdf
This patch changes the label for sys_led from red:power to green:sys.
--- arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dtsi +1 -1
@@ -31,7 +31,7 @@ lan_led: led-lan { sys_led: led-sys { gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>; - label = "red:power"; + label = "green:sys"; default-state = "on"; };
Signature · 7 lines
2.47.3 _______________________________________________ Linux-rockchip mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-rockchip
[email protected]
AI reviewThank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] The patch assigns a new value to the deprecated `label` property instead of modernizing the LED…
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The patch assigns a new value to the deprecated label property instead of modernizing the LED Device Tree binding to use color and function. --
--- Patch [1]: [PATCH] arm64: dts: rockchip: fix label of sys_led for nanopi-r4s --- commit ceee1e0876cda2fa407388b630cd3de2ef149410
Author: Vic B <[email protected]>
arm64: dts: rockchip: fix label of sys_led for nanopi-r4s
This commit corrects the system LED configuration for the NanoPi R4S by changing the label from red:power to green:sys. It aligns the device tree with the physical board schematics.
arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dtsi lan_led: led-lan { · line 34
Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dtsi +1
-1@@ -31,7 +31,7 @@ lan_led: led-lan { sys_led: led-sys { gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>; - label = "red:power"; + label = "green:sys";
[Severity: Low]
Since the label property is deprecated in modern LED Device Tree bindings, would it be better to replace this with the color and function properties?
Modern user-space LED managers rely on standard sysfs directories named color:function. Defining the LED using the color and function properties would align the driver with current subsystem guidelines and prevent userspace from relying on the legacy label field to correctly identify the hardware role.
Quoted 3 lines
arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dtsi +0
-0default-state = "on"; };
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
PATCH v2 1/1 arm64: dts: rockchip: fix label of sys_led for nanopi-r4s
In reply to Vic BThis commit corrects the system LED configuration for the NanoPi R4S by replacing the deprecated label property with color and function.
This changes the resulting label of mislabeled sys_led from red:power to green:status, while the labels of the other two leds stay intact (green:lan for lan_led and green:wan for wan_led).
---
Changes in v2:
- use color and function instead of deprecated label as suggested by Sashiko AI
--- arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dtsi | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dtsi +7 -3
@@ -14,6 +14,7 @@ /dts-v1/; +#include <dt-bindings/leds/common.h> #include "rk3399-nanopi4.dtsi" / {
@@ -25,19 +26,22 @@ gpio-leds { /delete-node/ led-0; lan_led: led-lan { + color = <LED_COLOR_ID_GREEN>; + function = LED_FUNCTION_LAN; gpios = <&gpio1 RK_PA1 GPIO_ACTIVE_HIGH>; - label = "green:lan"; }; sys_led: led-sys { + color = <LED_COLOR_ID_GREEN>; + function = LED_FUNCTION_STATUS; gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>; - label = "red:power"; default-state = "on"; }; wan_led: led-wan { + color = <LED_COLOR_ID_GREEN>; + function = LED_FUNCTION_WAN; gpios = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>; - label = "green:wan"; }; };
Signature · 1 line
2.47.3
Quoted 8 lines · Vic B
This commit corrects the system LED configuration for the NanoPi R4S by replacing the deprecated label property with color and function.
This changes the resulting label of mislabeled
sys_ledfrom red:power to green:status, while the labels of the other two leds stay intact (green:lan forlan_ledand green:wan forwan_led).[...]
Applied, thanks!
[1/1] arm64: dts: rockchip: fix label of sys_led for nanopi-r4s
commit: f4fb08d6d735ddd64ae507e0b32679df0135cd8e
Best regards,
Signature · 1 line
Heiko Stuebner <[email protected]>