ramips: cleanup SPI flash device tree properties usage
[openwrt/openwrt.git] / target / linux / ramips / dts / MZK-W300NH2.dts
index 78c120a5bf6e64e67021fb9565ebb022e66d75bb..4b002b7c20e308af873e17a3470ca3c2cba14f0f 100644 (file)
@@ -1,24 +1,16 @@
 /dts-v1/;
 
-/include/ "rt3050.dtsi"
+#include "rt3050.dtsi"
+
+#include <dt-bindings/input/input.h>
 
 / {
        compatible = "MZK-W300NH2", "ralink,rt3052-soc";
        model = "Planex MZK-W300NH2";
 
-       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>;
                };
        };
 
-       esw@10110000 {
-               ralink,portmap = <0x2f>;
-       };
-
        gpio-leds {
                compatible = "gpio-leds";
+
                power {
-                       label = "mzkw300nh2:green:power";
+                       label = "mzk-w300nh2:green:power";
                        gpios = <&gpio0 9 1>;
                };
+
                wlan {
-                       label = "mzkw300nh2:amber:wlan";
+                       label = "mzk-w300nh2:amber:wlan";
                        gpios = <&gpio0 14 1>;
                };
+
                wps {
-                       label = "mzkw300nh2:amber:wps";
+                       label = "mzk-w300nh2:amber:wps";
                        gpios = <&gpio0 11 1>;
                };
        };
                #address-cells = <1>;
                #size-cells = <0>;
                poll-interval = <20>;
+
                wps {
                        label = "wps";
                        gpios = <&gpio0 12 1>;
-                       linux,code = <0x211>;
+                       linux,code = <KEY_WPS_BUTTON>;
                };
+
                reset {
                        label = "reset";
                        gpios = <&gpio0 0 1>;
-                       linux,code = <0x198>;
+                       linux,code = <KEY_RESTART>;
                };
+
                rt {
                        label = "rt";
                        gpios = <&gpio0 13 1>;
-                       linux,code = <0x100>;
+                       linux,code = <BTN_0>;
+               };
+       };
+};
+
+&pinctrl {
+       state_default: pinctrl0 {
+               gpio {
+                       ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
+                       ralink,function = "gpio";
                };
        };
 };
+
+&ethernet {
+       mtd-mac-address = <&factory 0x4>;
+};
+
+&esw {
+       mediatek,portmap = <0x2f>;
+};
+
+&wmac {
+       ralink,mtd-eeprom = <&factory 0>;
+};