openwrt/target/linux/rockchip/patches-6.1/110-arm64-dts-rockchip-Update-LED-properties-for-NanoPi-.patch
Tianling Shen c06a71f0b3 rockchip: add NanoPi R5S support
Hardware
--------
RockChip RK3568 ARM64 (4 cores)
2GB or 4GB LPDDR4X RAM
1x 1000 Base-T
2x 2500 Base-T
4 LEDs (LAN1 / LAN2 / WAN / POWER)
8GB eMMC on-board
Micro-SD Slot
M.2 Slot
2x USB 3.0 Port

Installation
------------
Uncompress the OpenWrt sysupgrade and write it to a micro SD card or
internal eMMC using dd.

Tested-by: Packet Please <pktpls@systemli.org>
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-11-26 19:44:56 +01:00

64 lines
1.7 KiB
Diff

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.
Also replace function/color with legacy label as OpenWrt relys on it
to update LED settings.
Signed-off-by: Tianling Shen <cnsztl@gmail.com>
---
--- a/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
@@ -23,29 +23,22 @@
pinctrl-0 = <&lan1_led_pin>, <&lan2_led_pin>, <&power_led_pin>, <&wan_led_pin>;
led-lan1 {
- color = <LED_COLOR_ID_GREEN>;
- function = LED_FUNCTION_LAN;
- function-enumerator = <1>;
+ label = "green:lan1";
gpios = <&gpio3 RK_PD6 GPIO_ACTIVE_HIGH>;
};
led-lan2 {
- color = <LED_COLOR_ID_GREEN>;
- function = LED_FUNCTION_LAN;
- function-enumerator = <2>;
+ label = "green:lan2";
gpios = <&gpio3 RK_PD7 GPIO_ACTIVE_HIGH>;
};
power_led: led-power {
- color = <LED_COLOR_ID_RED>;
- function = LED_FUNCTION_POWER;
- linux,default-trigger = "heartbeat";
+ label = "red:power";
gpios = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>;
};
led-wan {
- color = <LED_COLOR_ID_GREEN>;
- function = LED_FUNCTION_WAN;
+ label = "green:wan";
gpios = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>;
};
};
--- a/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dtsi
@@ -18,6 +18,11 @@
aliases {
mmc0 = &sdmmc0;
mmc1 = &sdhci;
+
+ led-boot = &power_led;
+ led-failsafe = &power_led;
+ led-running = &power_led;
+ led-upgrade = &power_led;
};
chosen: chosen {