treewide: dts: use keycode defines from input dt-binding
[lede.git] / target / linux / ramips / dts / WSR-600.dts
1 /dts-v1/;
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/input/input.h>
6
7 / {
8         compatible = "ralink,mt7621-eval-board", "ralink,mt7621-soc";
9         model = "Buffalo WSR-600DHP";
10
11         memory@0 {
12                 device_type = "memory";
13                 reg = <0x0 0x4000000>;
14         };
15
16         chosen {
17                 bootargs = "console=ttyS0,57600";
18         };
19
20         gpio-leds {
21                 compatible = "gpio-leds";
22
23                 power {
24                         label = "wsr-600:green:power";
25                         gpios = <&gpio0 12 1>;
26                 };
27
28                 wifi_o {
29                         label = "wsr-600:orange:wifi";
30                         gpios = <&gpio1 9 1>;
31                 };
32
33                 diag {
34                         label = "wsr-600:orange:diag";
35                         gpios = <&gpio1 10 1>;
36                 };
37
38                 wifi_g {
39                         label = "wsr-600:green:wifi";
40                         gpios = <&gpio1 12 1>;
41                 };
42
43                 router_o {
44                         label = "wsr-600:orange:router";
45                         gpios = <&gpio1 13 1>;
46                 };
47
48                 router_g {
49                         label = "wsr-600:green:router";
50                         gpios = <&gpio1 14 1>;
51                 };
52
53                 internet_o {
54                         label = "wsr-600:orange:internet";
55                         gpios = <&gpio1 15 1>;
56                 };
57
58                 internet_g {
59                         label = "wsr-600:green:internet";
60                         gpios = <&gpio1 16 1>;
61                 };
62         };
63
64         gpio-keys-polled {
65                 compatible = "gpio-keys-polled";
66                 #address-cells = <1>;
67                 #size-cells = <0>;
68                 poll-interval = <20>;
69
70                 power {
71                         label = "power";
72                         gpios = <&gpio0 8 1>;
73                         linux,code = <KEY_POWER>;
74                 };
75
76                 reset {
77                         label = "reset";
78                         gpios = <&gpio0 11 1>;
79                         linux,code = <KEY_RESTART>;
80                 };
81
82                 aoss {
83                         label = "aoss";
84                         gpios = <&gpio0 18 1>;
85                         linux,code = <KEY_WPS_BUTTON>;
86                 };
87
88                 auto {
89                         label = "mode";
90                         gpios = <&gpio0 7 0>;
91                         linux,code = <BTN_0>;
92                         linux,input-type = <EV_SW>;
93                 };
94
95                 ap {
96                         label = "ap";
97                         gpios = <&gpio0 6 0>;
98                         linux,code = <BTN_0>;
99                         linux,input-type = <EV_SW>;
100                 };
101
102                 router {
103                         label = "router";
104                         gpios = <&gpio0 10 0>;
105                         linux,code = <BTN_0>;
106                         linux,input-type = <EV_SW>;
107                 };
108         };
109
110         gpio_poweroff {
111                 compatible = "gpio-poweroff";
112                 gpios = <&gpio1 11 1>;
113         };
114 };
115
116 &spi0 {
117         status = "okay";
118
119         m25p80@0 {
120                 #address-cells = <1>;
121                 #size-cells = <1>;
122                 compatible = "jedec,spi-nor";
123                 reg = <0>;
124                 linux,modalias = "m25p80";
125                 spi-max-frequency = <10000000>;
126
127                 partition@0 {
128                         label = "u-boot";
129                         reg = <0x0 0x30000>;
130                         read-only;
131                 };
132
133                 partition@30000 {
134                         label = "u-boot-env";
135                         reg = <0x30000 0x10000>;
136                         read-only;
137                 };
138
139                 factory: partition@40000 {
140                         label = "factory";
141                         reg = <0x40000 0x10000>;
142                         read-only;
143                 };
144
145                 partition@50000 {
146                         label = "firmware";
147                         reg = <0x50000 0xfb0000>;
148                 };
149         };
150 };
151
152 &pinctrl {
153         state_default: pinctrl0 {
154                 gpio {
155                         ralink,group = "i2c", "uart2", "uart3", "rgmii2", "sdhci";
156                         ralink,function = "gpio";
157                 };
158         };
159 };