treewide: dts: use keycode defines from input dt-binding
[openwrt/openwrt.git] / target / linux / ramips / dts / NBG-419N.dts
index c7d66c410ef4d537bfed8d46060347153a743a16..e19ce34b5c36d1629974eda5dcbfac2baaf54140 100644 (file)
@@ -1,24 +1,16 @@
 /dts-v1/;
 
-/include/ "rt3050.dtsi"
+#include "rt3050.dtsi"
+
+#include <dt-bindings/input/input.h>
 
 / {
        compatible = "NBG-419N", "ralink,rt3052-soc";
        model = "ZyXEL NBG-419N";
 
-       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 = "nbg-419n:green:power";
                        gpios = <&gpio0 9 1>;
                };
+
                wps {
                        label = "nbg-419n:green:wps";
                        gpios = <&gpio0 14 1>;
                #address-cells = <1>;
                #size-cells = <0>;
                poll-interval = <20>;
+
                reset {
                        label = "reset";
                        gpios = <&gpio0 10 1>;
-                       linux,code = <0x198>;
+                       linux,code = <KEY_RESTART>;
                };
+
                wps {
                        label = "wps";
                        gpios = <&gpio0 0 1>;
-                       linux,code = <0x211>;
+                       linux,code = <KEY_WPS_BUTTON>;
                };
        };
 };
+
+&pinctrl {
+       state_default: pinctrl0 {
+               gpio {
+                       ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
+                       ralink,function = "gpio";
+               };
+       };
+};
+
+&ethernet {
+       mtd-mac-address = <&factory 0x28>;
+};
+
+&esw {
+       mediatek,portmap = <0x2f>;
+};
+
+&wmac {
+       ralink,mtd-eeprom = <&factory 0>;
+};