rockchip: add NanoPi R5S support
[openwrt/staging/hauke.git] / target / linux / rockchip / patches-6.1 / 110-arm64-dts-rockchip-Update-LED-properties-for-NanoPi-.patch
1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: Tianling Shen <cnsztl@gmail.com>
3 Date: Tue Jun 20 16:45:27 2023 +0800
4 Subject: [PATCH] arm64: dts: rockchip: Update LED properties for NanoPi R5
5 series
6
7 Add OpenWrt's LED aliases for showing system status.
8 Also replace function/color with legacy label as OpenWrt relys on it
9 to update LED settings.
10
11 Signed-off-by: Tianling Shen <cnsztl@gmail.com>
12 ---
13
14 --- a/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
15 +++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
16 @@ -23,29 +23,22 @@
17 pinctrl-0 = <&lan1_led_pin>, <&lan2_led_pin>, <&power_led_pin>, <&wan_led_pin>;
18
19 led-lan1 {
20 - color = <LED_COLOR_ID_GREEN>;
21 - function = LED_FUNCTION_LAN;
22 - function-enumerator = <1>;
23 + label = "green:lan1";
24 gpios = <&gpio3 RK_PD6 GPIO_ACTIVE_HIGH>;
25 };
26
27 led-lan2 {
28 - color = <LED_COLOR_ID_GREEN>;
29 - function = LED_FUNCTION_LAN;
30 - function-enumerator = <2>;
31 + label = "green:lan2";
32 gpios = <&gpio3 RK_PD7 GPIO_ACTIVE_HIGH>;
33 };
34
35 power_led: led-power {
36 - color = <LED_COLOR_ID_RED>;
37 - function = LED_FUNCTION_POWER;
38 - linux,default-trigger = "heartbeat";
39 + label = "red:power";
40 gpios = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>;
41 };
42
43 led-wan {
44 - color = <LED_COLOR_ID_GREEN>;
45 - function = LED_FUNCTION_WAN;
46 + label = "green:wan";
47 gpios = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>;
48 };
49 };
50 --- a/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dtsi
51 +++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dtsi
52 @@ -18,6 +18,11 @@
53 aliases {
54 mmc0 = &sdmmc0;
55 mmc1 = &sdhci;
56 +
57 + led-boot = &power_led;
58 + led-failsafe = &power_led;
59 + led-running = &power_led;
60 + led-upgrade = &power_led;
61 };
62
63 chosen: chosen {