From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Tianling Shen <cnsztl@gmail.com>
Date: Tue Jun 20 16:45:27 2023 +0800
Subject: [PATCH] arm64: dts: rockchip: Update LED properties for NanoPi R5
 series

Add OpenWrt's LED aliases for showing system status.

Signed-off-by: Tianling Shen <cnsztl@gmail.com>
---

--- a/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5c.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5c.dts
@@ -40,7 +40,6 @@
 		power_led: led-power {
 			color = <LED_COLOR_ID_RED>;
 			function = LED_FUNCTION_POWER;
-			linux,default-trigger = "heartbeat";
 			gpios = <&gpio3 RK_PA2 GPIO_ACTIVE_HIGH>;
 		};
 
--- a/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
@@ -41,7 +41,6 @@
 			function = LED_FUNCTION_LAN;
 			function-enumerator = <1>;
 			gpios = <&gpio3 RK_PD6 GPIO_ACTIVE_HIGH>;
-			label = "LAN-1";
 		};
 
 		led-lan2 {
@@ -50,15 +49,12 @@
 			function = LED_FUNCTION_LAN;
 			function-enumerator = <2>;
 			gpios = <&gpio3 RK_PD7 GPIO_ACTIVE_HIGH>;
-			label = "LAN-2";
 		};
 
 		power_led: led-sys {
 			color = <LED_COLOR_ID_RED>;
 			function = LED_FUNCTION_POWER;
 			gpios = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>;
-			label = "SYS";
-			linux,default-trigger = "heartbeat";
 		};
 
 		led-wan {
@@ -66,7 +62,6 @@
 			default-state = "off";
 			function = LED_FUNCTION_WAN;
 			gpios = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>;
-			label = "WAN";
 		};
 	};
 };
--- a/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dtsi
@@ -19,6 +19,11 @@
 		mmc0 = &sdmmc0;
 		mmc1 = &sdhci;
 		rtc0 = &hym8563;
+
+		led-boot = &power_led;
+		led-failsafe = &power_led;
+		led-running = &power_led;
+		led-upgrade = &power_led;
 	};
 
 	chosen: chosen {
