ramips: Use dts alias based status led
[openwrt/staging/mkresin.git] / target / linux / ramips / dts / ZBT-WR8305RT.dts
index 694b7cfa962be9b7ff1175c641c39227f1779606..59970c4daed2dd53f951b4fbcf9b3d0361416c12 100644 (file)
@@ -2,26 +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>;
                };
        };
 
@@ -33,8 +40,8 @@
 
                reset {
                        label = "reset";
-                       gpios = <&gpio0 1 1>;
-                       linux,code = <0x198>;
+                       gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_RESTART>;
                };
        };
 };
@@ -55,7 +62,6 @@
                #size-cells = <1>;
                compatible = "jedec,spi-nor";
                reg = <0>;
-               linux,modalias = "m25p80", "en25q64";
                spi-max-frequency = <10000000>;
 
                partition@0 {
@@ -92,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";