ramips: fix mt7628 eval board pinmux
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / PWH2004.dts
index f94370f39c1036a26709d8533055841e5283129c..c086894fd25407965e37fbd5120abf638d6ef343 100644 (file)
@@ -1,24 +1,17 @@
 /dts-v1/;
 
-/include/ "rt3050.dtsi"
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
 
 / {
-       compatible = "PWH2004", "ralink,rt3052-soc";
+       compatible = "prolink,pwh2004", "ralink,rt3052-soc";
        model = "Prolink PWH2004";
 
-       pinctrl {
-               state_default: pinctrl0 {
-                       gpio {
-                               ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
-                               ralink,function = "gpio";
-                       };
-               };
-       };
-
        cfi@1f000000 {
                compatible = "cfi-flash";
                reg = <0x1f000000 0x800000>;
-
                bank-width = <2>;
                device-width = <2>;
                #address-cells = <1>;
 
        gpio-leds {
                compatible = "gpio-leds";
+
                wifi {
                        label = "pwh2004:red:wifi";
-                       gpios = <&gpio0 14 1>;
+                       gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
                };
+
                power {
                        label = "pwh2004:green:power";
-                       gpios = <&gpio0 9 1>;
+                       gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
                };
        };
 
                #address-cells = <1>;
                #size-cells = <0>;
                poll-interval = <20>;
+
                wps {
                        label = "wps";
-                       gpios = <&gpio0 12 1>;
-                       linux,code = <0x198>;
+                       gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_RESTART>;
                };
        };
+};
 
-       esw@10110000 {
-               ralink,portmap = <0x2f>;
+&pinctrl {
+       state_default: pinctrl0 {
+               gpio {
+                       ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
+                       ralink,function = "gpio";
+               };
        };
+};
 
-       wmac@10180000 {
-               ralink,mtd-eeprom = <&factory 0>;
-       };
+&esw {
+       mediatek,portmap = <0x2f>;
+};
+
+&wmac {
+       ralink,mtd-eeprom = <&factory 0>;
 };