aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/rockchip/patches-5.15/107-arm64-dts-rockchip-Update-LED-properties-for-Orange-.patch
blob: b1e26d4e3e27d795f42de9b61b68450fa87a2ffb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
From d2166e3b3680bd2b206aebf1e1ce4c0d346f3c50 Mon Sep 17 00:00:00 2001
From: Tianling Shen <cnsztl@gmail.com>
Date: Fri, 19 May 2023 12:10:52 +0800
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 <cnsztl@gmail.com>
---
 .../dts/rockchip/rk3328-orangepi-r1-plus.dts    | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

--- a/arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus.dts
@@ -17,6 +17,11 @@
 	aliases {
 		ethernet1 = &rtl8153;
 		mmc0 = &sdmmc;
+
+		led-boot = &status_led;
+		led-failsafe = &status_led;
+		led-running = &status_led;
+		led-upgrade = &status_led;
 	};
 
 	chosen {
@@ -36,22 +41,18 @@
 		pinctrl-names = "default";
 
 		led-0 {
-			function = LED_FUNCTION_LAN;
-			color = <LED_COLOR_ID_GREEN>;
 			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 {
 			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";
 		};
 	};