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 <[email protected]>
---
 .../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";
+
+               [email protected] {
+                       reg = <0 0 0>;
+                       label = "green:lan-1";
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <1>;
+               };
+               [email protected] {
+                       reg = <1 0 0>;
+                       label = "green:lan-2";
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <2>;
+               };
+               [email protected] {
+                       reg = <2 0 0>;
+                       label = "green:lan-3";
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <3>;
+               };
+               [email protected] {
+                       reg = <3 0 0>;
+                       label = "green:lan-4";
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <4>;
+               };
+               [email protected] {
+                       reg = <4 0 0>;
+                       label = "green:lan-5";
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <5>;
+               };
+               [email protected] {
+                       reg = <5 0 0>;
+                       label = "green:lan-6";
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <6>;
+               };
+               [email protected] {
+                       reg = <6 0 0>;
+                       label = "green:lan-7";
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <7>;
+               };
+               [email protected] {
+                       reg = <7 0 0>;
+                       label = "green:lan-8";
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <8>;
+               };
+               [email protected] {
+                       reg = <8 0 0>;
+                       label = "green:lan-9";
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <9>;
+               };
+               [email protected] {
+                       reg = <9 0 0>;
+                       label = "green:lan-10";
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <10>;
+               };
+               [email protected] {
+                       reg = <10 0 0>;
+                       label = "green:lan-11";
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <11>;
+               };
+               [email protected] {
+                       reg = <11 0 0>;
+                       label = "green:lan-12";
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <12>;
+               };
+               [email protected] {
+                       reg = <12 0 0>;
+                       label = "green:lan-13";
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <13>;
+               };
+               [email protected] {
+                       reg = <13 0 0>;
+                       label = "green:lan-14";
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <14>;
+               };
+               [email protected] {
+                       reg = <14 0 0>;
+                       label = "green:lan-15";
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <15>;
+               };
+               [email protected] {
+                       reg = <15 0 0>;
+                       label = "green:lan-16";
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <16>;
+               };
+               [email protected] {
+                       reg = <16 0 0>;
+                       label = "green:lan-17";
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <17>;
+               };
+               [email protected] {
+                       reg = <17 0 0>;
+                       label = "green:lan-18";
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <18>;
+               };
+               [email protected] {
+                       reg = <18 0 0>;
+                       label = "green:lan-19";
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <19>;
+               };
+               [email protected] {
+                       reg = <19 0 0>;
+                       label = "green:lan-20";
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <20>;
+               };
+               [email protected] {
+                       reg = <20 0 0>;
+                       label = "green:lan-21";
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <21>;
+               };
+               [email protected] {
+                       reg = <21 0 0>;
+                       label = "green:lan-22";
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <22>;
+               };
+               [email protected] {
+                       reg = <22 0 0>;
+                       label = "green:lan-23";
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <23>;
+               };
+               [email protected] {
+                       reg = <23 0 0>;
+                       label = "green:lan-24";
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <24>;
+               };
+               [email protected] {
+                       reg = <24 0 0>;
+                       label = "green:lan-25";
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <25>;
+               };
+               [email protected] {
+                       reg = <25 0 0>;
+                       label = "green:lan-26";
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <26>;
+               };
+               [email protected] {
+                       reg = <26 0 0>;
+                       label = "green:lan-27";
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <27>;
+               };
+               [email protected] {
+                       reg = <27 0 0>;
+                       label = "green:lan-28";
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <28>;
+               };
+               [email protected] {
+                       reg = <28 0 0>;
+                       label = "green:lan-29";
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <29>;
+               };
+               [email protected] {
+                       reg = <29 0 0>;
+                       label = "green:lan-30";
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <30>;
+               };
+               [email protected] {
+                       reg = <30 0 0>;
+                       label = "green:lan-31";
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <31>;
+               };
+               [email protected] {
+                       reg = <31 0 0>;
+                       label = "green:lan-32";
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <32>;
+               };
+               [email protected] {
+                       reg = <32 0 0>;
+                       label = "green:lan-33";
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <33>;
+               };
+               [email protected] {
+                       reg = <33 0 0>;
+                       label = "green:lan-34";
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <34>;
+               };
+               [email protected] {
+                       reg = <34 0 0>;
+                       label = "green:lan-35";
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <35>;
+               };
+               [email protected] {
+                       reg = <35 0 0>;
+                       label = "green:lan-36";
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <36>;
+               };
+               [email protected] {
+                       reg = <36 0 0>;
+                       label = "green:lan-37";
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <37>;
+               };
+               [email protected] {
+                       reg = <37 0 0>;
+                       label = "green:lan-38";
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <38>;
+               };
+               [email protected] {
+                       reg = <38 0 0>;
+                       label = "green:lan-39";
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <39>;
+               };
+               [email protected] {
+                       reg = <39 0 0>;
+                       label = "green:lan-40";
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <40>;
+               };
+               [email protected] {
+                       reg = <40 0 0>;
+                       label = "green:lan-41";
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <41>;
+               };
+               [email protected] {
+                       reg = <41 0 0>;
+                       label = "green:lan-42";
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <42>;
+               };
+               [email protected] {
+                       reg = <42 0 0>;
+                       label = "green:lan-43";
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <43>;
+               };
+               [email protected] {
+                       reg = <43 0 0>;
+                       label = "green:lan-44";
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <44>;
+               };
+               [email protected] {
+                       reg = <44 0 0>;
+                       label = "green:lan-45";
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <45>;
+               };
+               [email protected] {
+                       reg = <45 0 0>;
+                       label = "green:lan-46";
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <46>;
+               };
+               [email protected] {
+                       reg = <46 0 0>;
+                       label = "green:lan-47";
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <47>;
+               };
+               [email protected] {
+                       reg = <47 0 0>;
+                       label = "green:lan-48";
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <48>;
+               };
+               [email protected] {
+                       reg = <48 0 0>;
+                       label = "green:lan-49";
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <49>;
+               };
+               [email protected] {
+                       reg = <49 0 0>;
+                       label = "green:lan-50";
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_LAN;
+                       function-enumerator = <50>;
+               };
+       };
+};
-- 
2.37.3


_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to