[PATCH v2 13/16] realtek: Zyxel GS1900-48: add port LEDs
Sander Vanheule
sander at svanheule.net
Mon Oct 3 13:52:24 PDT 2022
The GS1900-48 has 48 RJ45 ports, and two dedicated SFP ports, each
having one associated green LED to indicate port status. Add 50 nodes to
allow individual control of each LED.
Signed-off-by: Sander Vanheule <sander at svanheule.net>
---
.../dts-5.10/rtl8393_zyxel_gs1900-48.dts | 362 ++++++++++++++++++
1 file changed, 362 insertions(+)
diff --git a/target/linux/realtek/dts-5.10/rtl8393_zyxel_gs1900-48.dts b/target/linux/realtek/dts-5.10/rtl8393_zyxel_gs1900-48.dts
index dd392c5a9beb..491d98a1266f 100644
--- a/target/linux/realtek/dts-5.10/rtl8393_zyxel_gs1900-48.dts
+++ b/target/linux/realtek/dts-5.10/rtl8393_zyxel_gs1900-48.dts
@@ -3,6 +3,7 @@
#include "rtl839x.dtsi"
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
#include <dt-bindings/gpio/gpio.h>
/ {
@@ -318,3 +319,364 @@
};
};
};
+
+&switchcore {
+ port-leds {
+ compatible = "realtek,cypress-port-led";
+ #address-cells = <3>;
+ #size-cells = <0>;
+
+ realtek,output-mode = "single-color-scan";
+
+ led at 0.0.0 {
+ reg = <0 0 0>;
+ label = "green:lan-1";
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <1>;
+ };
+ led at 1.0.0 {
+ reg = <1 0 0>;
+ label = "green:lan-2";
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <2>;
+ };
+ led at 2.0.0 {
+ reg = <2 0 0>;
+ label = "green:lan-3";
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <3>;
+ };
+ led at 3.0.0 {
+ reg = <3 0 0>;
+ label = "green:lan-4";
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <4>;
+ };
+ led at 4.0.0 {
+ reg = <4 0 0>;
+ label = "green:lan-5";
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <5>;
+ };
+ led at 5.0.0 {
+ reg = <5 0 0>;
+ label = "green:lan-6";
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <6>;
+ };
+ led at 6.0.0 {
+ reg = <6 0 0>;
+ label = "green:lan-7";
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <7>;
+ };
+ led at 7.0.0 {
+ reg = <7 0 0>;
+ label = "green:lan-8";
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <8>;
+ };
+ led at 8.0.0 {
+ reg = <8 0 0>;
+ label = "green:lan-9";
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <9>;
+ };
+ led at 9.0.0 {
+ reg = <9 0 0>;
+ label = "green:lan-10";
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <10>;
+ };
+ led at 10.0.0 {
+ reg = <10 0 0>;
+ label = "green:lan-11";
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <11>;
+ };
+ led at 11.0.0 {
+ reg = <11 0 0>;
+ label = "green:lan-12";
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <12>;
+ };
+ led at 12.0.0 {
+ reg = <12 0 0>;
+ label = "green:lan-13";
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <13>;
+ };
+ led at 13.0.0 {
+ reg = <13 0 0>;
+ label = "green:lan-14";
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <14>;
+ };
+ led at 14.0.0 {
+ reg = <14 0 0>;
+ label = "green:lan-15";
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <15>;
+ };
+ led at 15.0.0 {
+ reg = <15 0 0>;
+ label = "green:lan-16";
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <16>;
+ };
+ led at 16.0.0 {
+ reg = <16 0 0>;
+ label = "green:lan-17";
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <17>;
+ };
+ led at 17.0.0 {
+ reg = <17 0 0>;
+ label = "green:lan-18";
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <18>;
+ };
+ led at 18.0.0 {
+ reg = <18 0 0>;
+ label = "green:lan-19";
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <19>;
+ };
+ led at 19.0.0 {
+ reg = <19 0 0>;
+ label = "green:lan-20";
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <20>;
+ };
+ led at 20.0.0 {
+ reg = <20 0 0>;
+ label = "green:lan-21";
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <21>;
+ };
+ led at 21.0.0 {
+ reg = <21 0 0>;
+ label = "green:lan-22";
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <22>;
+ };
+ led at 22.0.0 {
+ reg = <22 0 0>;
+ label = "green:lan-23";
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <23>;
+ };
+ led at 23.0.0 {
+ reg = <23 0 0>;
+ label = "green:lan-24";
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <24>;
+ };
+ led at 24.0.0 {
+ reg = <24 0 0>;
+ label = "green:lan-25";
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <25>;
+ };
+ led at 25.0.0 {
+ reg = <25 0 0>;
+ label = "green:lan-26";
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <26>;
+ };
+ led at 26.0.0 {
+ reg = <26 0 0>;
+ label = "green:lan-27";
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <27>;
+ };
+ led at 27.0.0 {
+ reg = <27 0 0>;
+ label = "green:lan-28";
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <28>;
+ };
+ led at 28.0.0 {
+ reg = <28 0 0>;
+ label = "green:lan-29";
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <29>;
+ };
+ led at 29.0.0 {
+ reg = <29 0 0>;
+ label = "green:lan-30";
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <30>;
+ };
+ led at 30.0.0 {
+ reg = <30 0 0>;
+ label = "green:lan-31";
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <31>;
+ };
+ led at 31.0.0 {
+ reg = <31 0 0>;
+ label = "green:lan-32";
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <32>;
+ };
+ led at 32.0.0 {
+ reg = <32 0 0>;
+ label = "green:lan-33";
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <33>;
+ };
+ led at 33.0.0 {
+ reg = <33 0 0>;
+ label = "green:lan-34";
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <34>;
+ };
+ led at 34.0.0 {
+ reg = <34 0 0>;
+ label = "green:lan-35";
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <35>;
+ };
+ led at 35.0.0 {
+ reg = <35 0 0>;
+ label = "green:lan-36";
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <36>;
+ };
+ led at 36.0.0 {
+ reg = <36 0 0>;
+ label = "green:lan-37";
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <37>;
+ };
+ led at 37.0.0 {
+ reg = <37 0 0>;
+ label = "green:lan-38";
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <38>;
+ };
+ led at 38.0.0 {
+ reg = <38 0 0>;
+ label = "green:lan-39";
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <39>;
+ };
+ led at 39.0.0 {
+ reg = <39 0 0>;
+ label = "green:lan-40";
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <40>;
+ };
+ led at 40.0.0 {
+ reg = <40 0 0>;
+ label = "green:lan-41";
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <41>;
+ };
+ led at 41.0.0 {
+ reg = <41 0 0>;
+ label = "green:lan-42";
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <42>;
+ };
+ led at 42.0.0 {
+ reg = <42 0 0>;
+ label = "green:lan-43";
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <43>;
+ };
+ led at 43.0.0 {
+ reg = <43 0 0>;
+ label = "green:lan-44";
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <44>;
+ };
+ led at 44.0.0 {
+ reg = <44 0 0>;
+ label = "green:lan-45";
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <45>;
+ };
+ led at 45.0.0 {
+ reg = <45 0 0>;
+ label = "green:lan-46";
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <46>;
+ };
+ led at 46.0.0 {
+ reg = <46 0 0>;
+ label = "green:lan-47";
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <47>;
+ };
+ led at 47.0.0 {
+ reg = <47 0 0>;
+ label = "green:lan-48";
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <48>;
+ };
+ led at 48.0.0 {
+ reg = <48 0 0>;
+ label = "green:lan-49";
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <49>;
+ };
+ led at 49.0.0 {
+ reg = <49 0 0>;
+ label = "green:lan-50";
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ function-enumerator = <50>;
+ };
+ };
+};
--
2.37.3
More information about the openwrt-devel
mailing list