Skip to content

Commit 1631cbd

Browse files
diederikdehaasmmind
authored andcommitted
arm64: dts: rockchip: Improve LED config for NanoPi R5S
The NanoPi R5S has 4 GPIO LEDs, a RED one for SYStem power and 3 green LEDs meant to indicate that a cable is connected to either of the 2.5GbE LAN ports or the 1GbE WAN port. In the NanoPi R5S schematic (2204; page 19) as well as on the PCB and on the case, SYS is used and not POWER. So replace 'power' with 'sys'. But keep the 'power_led' label/phandle even though the kernel doesn't use it, but it may be used outside of it. The SYStem LED already had "heartbeat" as its default-trigger. Set the default-trigger to "netdev" for the NICs so they will show when LAN1/LAN2/WAN is connected and set their default-state to "off". Also assign labels as close as possible to the labels on the case, while still being descriptive enough in their own right. Signed-off-by: Diederik de Haas <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Heiko Stuebner <[email protected]>
1 parent 56198ac commit 1631cbd

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,33 +20,43 @@
2020
gpio-leds {
2121
compatible = "gpio-leds";
2222
pinctrl-names = "default";
23-
pinctrl-0 = <&lan1_led_pin>, <&lan2_led_pin>, <&power_led_pin>, <&wan_led_pin>;
23+
pinctrl-0 = <&lan1_led_pin>, <&lan2_led_pin>, <&sys_led_pin>, <&wan_led_pin>;
2424

2525
led-lan1 {
2626
color = <LED_COLOR_ID_GREEN>;
27+
default-state = "off";
2728
function = LED_FUNCTION_LAN;
2829
function-enumerator = <1>;
2930
gpios = <&gpio3 RK_PD6 GPIO_ACTIVE_HIGH>;
31+
label = "LAN-1";
32+
linux,default-trigger = "netdev";
3033
};
3134

3235
led-lan2 {
3336
color = <LED_COLOR_ID_GREEN>;
37+
default-state = "off";
3438
function = LED_FUNCTION_LAN;
3539
function-enumerator = <2>;
3640
gpios = <&gpio3 RK_PD7 GPIO_ACTIVE_HIGH>;
41+
label = "LAN-2";
42+
linux,default-trigger = "netdev";
3743
};
3844

39-
power_led: led-power {
45+
power_led: led-sys {
4046
color = <LED_COLOR_ID_RED>;
4147
function = LED_FUNCTION_POWER;
42-
linux,default-trigger = "heartbeat";
4348
gpios = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>;
49+
label = "SYS";
50+
linux,default-trigger = "heartbeat";
4451
};
4552

4653
led-wan {
4754
color = <LED_COLOR_ID_GREEN>;
55+
default-state = "off";
4856
function = LED_FUNCTION_WAN;
4957
gpios = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>;
58+
label = "WAN";
59+
linux,default-trigger = "netdev";
5060
};
5161
};
5262
};
@@ -126,7 +136,7 @@
126136
rockchip,pins = <3 RK_PD7 RK_FUNC_GPIO &pcfg_pull_none>;
127137
};
128138

129-
power_led_pin: power-led-pin {
139+
sys_led_pin: sys-led-pin {
130140
rockchip,pins = <4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
131141
};
132142

0 commit comments

Comments
 (0)