107-arm64-dts-rockchip-Update-LED-properties-for-Orange-.patch 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. From d2166e3b3680bd2b206aebf1e1ce4c0d346f3c50 Mon Sep 17 00:00:00 2001
  2. From: Tianling Shen <[email protected]>
  3. Date: Fri, 19 May 2023 12:10:52 +0800
  4. Subject: [PATCH] arm64: dts: rockchip: Update LED properties for Orange Pi R1
  5. Plus
  6. Add OpenWrt's LED aliases for showing system status.
  7. Also replace function/color with legacy label as OpenWrt relys on it
  8. to update LED settings.
  9. Signed-off-by: Tianling Shen <[email protected]>
  10. ---
  11. .../dts/rockchip/rk3328-orangepi-r1-plus.dts | 17 +++++++++--------
  12. 1 file changed, 9 insertions(+), 8 deletions(-)
  13. --- a/arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus.dts
  14. +++ b/arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus.dts
  15. @@ -17,6 +17,11 @@
  16. aliases {
  17. ethernet1 = &rtl8153;
  18. mmc0 = &sdmmc;
  19. +
  20. + led-boot = &status_led;
  21. + led-failsafe = &status_led;
  22. + led-running = &status_led;
  23. + led-upgrade = &status_led;
  24. };
  25. chosen {
  26. @@ -36,22 +41,18 @@
  27. pinctrl-names = "default";
  28. led-0 {
  29. - function = LED_FUNCTION_LAN;
  30. - color = <LED_COLOR_ID_GREEN>;
  31. gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
  32. + label = "green:lan";
  33. };
  34. - led-1 {
  35. - function = LED_FUNCTION_STATUS;
  36. - color = <LED_COLOR_ID_RED>;
  37. + status_led: led-1 {
  38. gpios = <&gpio3 RK_PC5 GPIO_ACTIVE_HIGH>;
  39. - linux,default-trigger = "heartbeat";
  40. + label = "red:status";
  41. };
  42. led-2 {
  43. - function = LED_FUNCTION_WAN;
  44. - color = <LED_COLOR_ID_GREEN>;
  45. gpios = <&gpio2 RK_PC2 GPIO_ACTIVE_HIGH>;
  46. + label = "green:wan";
  47. };
  48. };