treewide: dts: use keycode defines from input dt-binding
[openwrt/openwrt.git] / target / linux / ramips / dts / NBG-419N2.dts
1 /dts-v1/;
2
3 #include "rt3352.dtsi"
4
5 #include <dt-bindings/input/input.h>
6
7 / {
8 compatible = "NBG-419N2", "ralink,rt3352-soc";
9 model = "ZyXEL NBG-419N v2";
10
11 palmbus@10000000 {
12 spi@b00 {
13 status = "okay";
14 m25p80@0 {
15 #address-cells = <1>;
16 #size-cells = <1>;
17 compatible = "mx25l6405d";
18 reg = <0 0>;
19 linux,modalias = "m25p80", "mx25l6405d";
20 spi-max-frequency = <10000000>;
21
22 partition@0 {
23 label = "u-boot";
24 reg = <0x0 0x30000>;
25 read-only;
26 };
27
28 partition@30000 {
29 label = "u-boot-env";
30 reg = <0x30000 0x10000>;
31 read-only;
32 };
33
34 factory: partition@40000 {
35 label = "factory";
36 reg = <0x40000 0x10000>;
37 read-only;
38 };
39
40 partition@50000 {
41 label = "firmware";
42 reg = <0x50000 0x7b0000>;
43 };
44 };
45 };
46 };
47
48 gpio-leds {
49 compatible = "gpio-leds";
50
51 power {
52 label = "nbg-419n2:green:power";
53 gpios = <&gpio0 9 1>;
54 };
55
56 wps {
57 label = "nbg-419n2:green:wps";
58 gpios = <&gpio0 14 1>;
59 };
60
61 usb {
62 label = "nbg-419n2:green:usb";
63 gpios = <&gpio0 13 1>;
64 };
65 };
66
67 gpio-keys-polled {
68 compatible = "gpio-keys-polled";
69 #address-cells = <1>;
70 #size-cells = <0>;
71 poll-interval = <20>;
72 reset {
73 label = "reset";
74 gpios = <&gpio0 10 1>;
75 linux,code = <KEY_RESTART>;
76 };
77 wps {
78 label = "wps";
79 gpios = <&gpio0 0 1>;
80 linux,code = <KEY_WPS_BUTTON>;
81 };
82 rfkill {
83 label = "rfkill";
84 linux,input-type = <EV_SW>;
85 gpios = <&gpio0 12 0>;
86 linux,code = <KEY_RFKILL>;
87 };
88 };
89
90 };
91
92 &pinctrl {
93 state_default: pinctrl0 {
94 gpio {
95 ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf";
96 ralink,function = "gpio";
97 };
98 };
99 };
100
101 &ethernet {
102 mtd-mac-address = <&factory 0x28>;
103 };
104
105 &esw {
106 ralink,portmap = <0x2f>;
107 };
108
109 &wmac {
110 ralink,mtd-eeprom = <&factory 0>;
111 };
112
113 &ehci {
114 status = "okay";
115 };
116
117 &ohci {
118 status = "okay";
119 };