realtek: add system LED for ZyXEL XGS1250-12
[openwrt/staging/nbd.git] / target / linux / realtek / dts-5.10 / rtl9302_zyxel_xgs1250-12.dts
index 28cace6c108b9907e41e91a2309230fd1c432089..a57fc00c6e9f8185909f679ae1efb91a2c662e24 100644 (file)
@@ -5,13 +5,17 @@
 
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
 
 / {
        compatible = "zyxel,xgs1250-12", "realtek,rtl838x-soc";
        model = "Zyxel XGS1250-12 Switch";
 
-       chosen {
-               bootargs = "console=ttyS0,115200";
+       aliases {
+               led-boot = &led_pwr_sys;
+               led-failsafe = &led_pwr_sys;
+               led-running = &led_pwr_sys;
+               led-upgrade = &led_pwr_sys;
        };
 
        keys {
                clock-frequency = <100000>;
        };
 
+       leds {
+               compatible = "gpio-leds";
+
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinmux_disable_sys_led>;
+
+               led_pwr_sys: led-0 {
+                       label = "green:power";
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_POWER;
+                       gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
+               };
+       };
 
        sfp0: sfp-p12 {
                compatible = "sff,sfp";