ramips: Use dts alias based status led
[openwrt/staging/mkresin.git] / target / linux / ramips / dts / ZBT-WR8305RT.dts
index 81598bd237dd1b6a785e215f8cd6527c38c6997e..59970c4daed2dd53f951b4fbcf9b3d0361416c12 100644 (file)
@@ -2,28 +2,33 @@
 
 #include "mt7620n.dtsi"
 
+#include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 
 / {
        compatible = "zbtlink,zbt-wr8305rt", "ralink,mt7620n-soc";
        model = "Zbtlink ZBT-WR8305RT";
 
+       aliases {
+               led-status = &led_sys;
+       };
+
        gpio-leds {
                compatible = "gpio-leds";
 
-               sys {
+               led_sys: sys {
                        label = "zbt-wr8305rt:green:sys";
-                       gpios = <&gpio1 14 1>;
+                       gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
                };
 
                lan {
                        label = "zbt-wr8305rt:green:usb";
-                       gpios = <&gpio1 15 1>;
+                       gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
                };
 
                wifi {
                        label = "zbt-wr8305rt:green:wifi";
-                       gpios = <&gpio3 0 1>;
+                       gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
                };
        };
 
@@ -35,7 +40,7 @@
 
                reset {
                        label = "reset";
-                       gpios = <&gpio0 1 1>;
+                       gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_RESTART>;
                };
        };
@@ -93,6 +98,8 @@
 };
 
 &ethernet {
+       pinctrl-names = "default";
+       pinctrl-0 = <&ephy_pins>;
        mtd-mac-address = <&factory 0x4>;
        mediatek,portmap = "llllw";
 };
 
 &pinctrl {
        state_default: pinctrl0 {
-               ephy {
-                       ralink,group = "ephy";
-                       ralink,function = "ephy";
-               };
-
                default {
                        ralink,group = "i2c", "uartf", "spi refclk", "wled";
                        ralink,function = "gpio";