lantiq: kernel 4.14: cleanup dts files
[openwrt/openwrt.git] / target / linux / lantiq / files-4.14 / arch / mips / boot / dts / WBMR300.dts
1 /dts-v1/;
2
3 #include "vr9.dtsi"
4
5 #include <dt-bindings/input/input.h>
6
7 / {
8 compatible = "buffalo,wbmr-300hpd", "lantiq,xway", "lantiq,vr9";
9 model = "Buffalo WBMR-300HPD";
10
11 chosen {
12 bootargs = "console=ttyLTQ0,115200";
13 };
14
15 aliases {
16 led-boot = &power_g;
17 led-failsafe = &diag_r;
18 led-running = &power_g;
19
20 led-dsl = &dsl;
21 led-internet = &router_g;
22 led-wifi = &wifi_g;
23 };
24
25 memory@0 {
26 reg = <0x0 0x4000000>;
27 };
28
29 gphy-xrx200 {
30 compatible = "lantiq,phy-xrx200";
31 firmware = "lantiq/xrx200_phy22f_a22.bin";
32 phys = [ 00 01 ];
33 };
34
35 gpio_poweroff {
36 compatible = "gpio-poweroff";
37 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
38 };
39
40 gpio-keys-polled {
41 compatible = "gpio-keys-polled";
42 #address-cells = <1>;
43 #size-cells = <0>;
44 poll-interval = <100>;
45
46 power {
47 label = "power";
48 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
49 linux,code = <KEY_POWER>;
50 };
51
52 reset {
53 label = "reset";
54 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
55 linux,code = <KEY_RESTART>;
56 };
57
58 wps {
59 label = "wps";
60 gpios = <&gpio 31 GPIO_ACTIVE_LOW>;
61 linux,code = <KEY_WPS_BUTTON>;
62 };
63
64 auto {
65 label = "auto";
66 gpios = <&gpio 48 GPIO_ACTIVE_HIGH>;
67 linux,code = <BTN_0>;
68 linux,input-type = <EV_SW>;
69 };
70
71 router {
72 label = "router";
73 gpios = <&gpio 2 GPIO_ACTIVE_HIGH>;
74 linux,code = <BTN_1>;
75 linux,input-type = <EV_SW>;
76 };
77 };
78
79 gpio-leds {
80 compatible = "gpio-leds";
81
82 diag_r: diag_r {
83 label = "wbmr300:red:diag";
84 gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
85 default_state = "off";
86 };
87
88 wifi_g: wifi_g {
89 label = "wbmr300:green:wifi";
90 gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
91 };
92
93 dsl: dsl {
94 label = "dsl";
95 gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
96 };
97
98 router_y: router_y {
99 label = "wbmr300:yellow:router";
100 gpios = <&gpio 8 GPIO_ACTIVE_HIGH>;
101 };
102
103 wifi_y: wifi_y {
104 label = "wbmr300:yellow:wifi";
105 gpios = <&gpio 9 GPIO_ACTIVE_HIGH>;
106 };
107
108 lan1: lan1 {
109 label = "wbmr300:green:lan1";
110 gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
111 };
112
113 wan: wan {
114 label = "wbmr300:green:wan";
115 gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
116 };
117
118 lan3: lan3 {
119 label = "wbmr300:green:lan3";
120 gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
121 };
122
123 lan2: lan2 {
124 label = "wbmr300:green:lan2";
125 gpios = <&gpio 33 GPIO_ACTIVE_HIGH>;
126 };
127
128 internet_g: internet_g {
129 label = "wbmr300:green:internet";
130 gpios = <&gpio 34 GPIO_ACTIVE_HIGH>;
131 };
132
133 internet_y: internet_y {
134 label = "wbmr300:yellow:internet";
135 gpios = <&gpio 35 GPIO_ACTIVE_HIGH>;
136 };
137
138 router_g: router_g {
139 label = "wbmr300:green:router";
140 gpios = <&gpio 36 GPIO_ACTIVE_HIGH>;
141 };
142
143 power_g: power_g {
144 label = "wbmr300:green:power";
145 gpios = <&gpio 49 GPIO_ACTIVE_HIGH>;
146 };
147 };
148 };
149
150 &eth0 {
151 lan: interface@0 {
152 compatible = "lantiq,xrx200-pdi";
153 #address-cells = <1>;
154 #size-cells = <0>;
155 reg = <0>;
156 lantiq,switch;
157
158 ethernet@1 {
159 compatible = "lantiq,xrx200-pdi-port";
160 reg = <4>;
161 phy-mode = "mii";
162 phy-handle = <&phy13>;
163 };
164 ethernet@2 {
165 compatible = "lantiq,xrx200-pdi-port";
166 reg = <5>;
167 phy-mode = "mii";
168 phy-handle = <&phy14>;
169 };
170 ethernet@3 {
171 compatible = "lantiq,xrx200-pdi-port";
172 reg = <2>;
173 phy-mode = "mii";
174 phy-handle = <&phy11>;
175 };
176 ethernet@4 {
177 compatible = "lantiq,xrx200-pdi-port";
178 reg = <3>;
179 phy-mode = "mii";
180 phy-handle = <&phy12>;
181 };
182 };
183
184 mdio@0 {
185 #address-cells = <1>;
186 #size-cells = <0>;
187 compatible = "lantiq,xrx200-mdio";
188 reg = <0>;
189
190 phy11: ethernet-phy@11 {
191 reg = <0x11>;
192 compatible = "lantiq,phy22f", "ethernet-phy-ieee802.3-c22";
193 };
194 phy12: ethernet-phy@12 {
195 reg = <0x12>;
196 compatible = "lantiq,phy22f", "ethernet-phy-ieee802.3-c22";
197 };
198 phy13: ethernet-phy@13 {
199 reg = <0x13>;
200 compatible = "lantiq,phy22f", "ethernet-phy-ieee802.3-c22";
201 };
202 phy14: ethernet-phy@14 {
203 reg = <0x14>;
204 compatible = "lantiq,phy22f", "ethernet-phy-ieee802.3-c22";
205 };
206 };
207 };
208
209 &gpio {
210 pinctrl-names = "default";
211 pinctrl-0 = <&state_default>;
212
213 state_default: pinmux {
214 mdio {
215 lantiq,groups = "mdio";
216 lantiq,function = "mdio";
217 };
218 phy-rst {
219 lantiq,pins = "io42";
220 lantiq,pull = <0>;
221 lantiq,open-drain = <0>;
222 lantiq,output = <1>;
223 };
224 pcie-rst {
225 lantiq,pins = "io38";
226 lantiq,pull = <0>;
227 lantiq,output = <1>;
228 };
229 };
230 pins_spi_default: pins_spi_default {
231 spi_in {
232 lantiq,groups = "spi_di";
233 lantiq,function = "spi";
234 };
235 spi_out {
236 lantiq,groups = "spi_do", "spi_clk",
237 "spi_cs4";
238 lantiq,function = "spi";
239 lantiq,output = <1>;
240 };
241 };
242 };
243
244 &spi {
245 status = "okay";
246
247 pinctrl-names = "default";
248 pinctrl-0 = <&pins_spi_default>;
249
250 m25p80@4 {
251 #address-cells = <1>;
252 #size-cells = <1>;
253 compatible = "jedec,spi-nor";
254 reg = <4 0>;
255 spi-max-frequency = <20000000>;
256
257 partition@0 {
258 reg = <0x0 0x10000>;
259 label = "u-boot";
260 read-only;
261 };
262
263 partition@10000 {
264 reg = <0x10000 0x10000>;
265 label = "gphyfirmware";
266 read-only;
267 };
268
269 partition@20000 {
270 reg = <0x20000 0x80000>;
271 label = "dsl_fw";
272 };
273
274 partition@de0000 {
275 reg = <0xa0000 0xf40000>;
276 label = "firmware";
277 };
278
279 partition@fe0000 {
280 reg = <0xfe0000 0x10000>;
281 label = "sysconfig";
282 read-only;
283 };
284
285 partition@ff0000 {
286 reg = <0xff0000 0x2000>;
287 label = "ubootconfig";
288 };
289
290 partition@ff3000 {
291 reg = <0xff3000 0x2000>;
292 label = "board_config";
293 read-only;
294 };
295 };
296 };
297
298 &usb0 {
299 status = "okay";
300 gpios = <&gpio 33 GPIO_ACTIVE_HIGH>;
301 lantiq,portmask = <0x3>;
302 };
303
304 &usb1 {
305 status = "okay";
306 gpios = <&gpio 33 GPIO_ACTIVE_HIGH>;
307 };