a93a7965834ba1a3e68bf89d12a290b393880cb2
[openwrt/staging/981213.git] / target / linux / ipq806x / files-5.4 / arch / arm / boot / dts / qcom-ipq8064-wxr-2533dhp.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 #include "qcom-ipq8064-v2.0.dtsi"
3
4 #include <dt-bindings/input/input.h>
5
6 / {
7 model = "Buffalo WXR-2533DHP";
8 compatible = "buffalo,wxr-2533dhp", "qcom,ipq8064";
9
10 memory@42000000 {
11 reg = <0x42000000 0x1e000000>;
12 device_type = "memory";
13 };
14
15 reserved-memory {
16 #address-cells = <1>;
17 #size-cells = <1>;
18 ranges;
19 rsvd@41200000 {
20 reg = <0x41200000 0x300000>;
21 no-map;
22 };
23 };
24
25 aliases {
26 serial0 = &gsbi4_serial;
27
28 led-boot = &power;
29 led-failsafe = &diag;
30 led-running = &power;
31 led-upgrade = &power;
32 };
33
34 chosen {
35 /* use "ubi_rootfs" volume in "ubi" partition as rootfs */
36 bootargs = "ubi.block=0,1 root=/dev/ubiblock0_1 rootfstype=squashfs";
37 stdout-path = "serial0:115200n8";
38 };
39
40 leds {
41 compatible = "gpio-leds";
42 pinctrl-0 = <&led_pins>;
43 pinctrl-names = "default";
44
45 usb {
46 label = "wxr-2533dhp:green:usb";
47 gpios = <&qcom_pinmux 7 GPIO_ACTIVE_HIGH>;
48 linux,default-trigger = "usbport";
49 trigger-sources = <&hub_port0 &hub_port1>;
50 };
51
52 guestport {
53 label = "wxr-2533dhp:green:guestport";
54 gpios = <&qcom_pinmux 8 GPIO_ACTIVE_HIGH>;
55 };
56
57 diag: diag {
58 label = "wxr-2533dhp:orange:diag";
59 gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
60 };
61
62 internet_orange {
63 label = "wxr-2533dhp:orange:internet";
64 gpios = <&qcom_pinmux 16 GPIO_ACTIVE_HIGH>;
65 };
66
67 internet_white {
68 label = "wxr-2533dhp:white:internet";
69 gpios = <&qcom_pinmux 22 GPIO_ACTIVE_HIGH>;
70 };
71
72 wireless_orange {
73 label = "wxr-2533dhp:orange:wireless";
74 gpios = <&qcom_pinmux 23 GPIO_ACTIVE_HIGH>;
75 };
76
77 wireless_white {
78 label = "wxr-2533dhp:white:wireless";
79 gpios = <&qcom_pinmux 24 GPIO_ACTIVE_HIGH>;
80 };
81
82 router_orange {
83 label = "wxr-2533dhp:orange:router";
84 gpios = <&qcom_pinmux 25 GPIO_ACTIVE_HIGH>;
85 };
86
87 router_white {
88 label = "wxr-2533dhp:white:router";
89 gpios = <&qcom_pinmux 26 GPIO_ACTIVE_LOW>;
90 };
91
92 power: power {
93 label = "wxr-2533dhp:white:power";
94 gpios = <&qcom_pinmux 53 GPIO_ACTIVE_HIGH>;
95 };
96 };
97
98 keys {
99 compatible = "gpio-keys";
100 pinctrl-0 = <&button_pins>;
101 pinctrl-names = "default";
102
103 power {
104 label = "power";
105 gpios = <&qcom_pinmux 58 GPIO_ACTIVE_LOW>;
106 linux,code = <KEY_POWER>;
107 };
108
109 reset {
110 label = "reset";
111 gpios = <&qcom_pinmux 54 GPIO_ACTIVE_LOW>;
112 linux,code = <KEY_RESTART>;
113 };
114
115 wps {
116 label = "wps";
117 gpios = <&qcom_pinmux 65 GPIO_ACTIVE_LOW>;
118 linux,code = <KEY_WPS_BUTTON>;
119 };
120
121 eject {
122 label = "eject";
123 gpios = <&qcom_pinmux 6 GPIO_ACTIVE_LOW>;
124 linux,code = <KEY_EJECTCD>;
125 };
126
127 guest {
128 label = "guest";
129 gpios = <&qcom_pinmux 64 GPIO_ACTIVE_LOW>;
130 linux,code = <BTN_0>;
131 };
132
133 ap {
134 label = "ap";
135 gpios = <&qcom_pinmux 55 GPIO_ACTIVE_LOW>;
136 linux,code = <BTN_1>;
137 linux,input-type = <EV_SW>;
138 };
139
140 router {
141 label = "router";
142 gpios = <&qcom_pinmux 56 GPIO_ACTIVE_LOW>;
143 linux,code = <BTN_1>;
144 linux,input-type = <EV_SW>;
145 };
146
147 auto {
148 label = "auto";
149 gpios = <&qcom_pinmux 57 GPIO_ACTIVE_LOW>;
150 linux,code = <BTN_1>;
151 linux,input-type = <EV_SW>;
152 };
153 };
154 };
155
156 &nand_controller {
157 status = "okay";
158
159 pinctrl-0 = <&nand_pins>;
160 pinctrl-names = "default";
161
162 cs@0 {
163 reg = <0>;
164 compatible = "qcom,nandcs";
165
166 nand-ecc-strength = <4>;
167 nand-bus-width = <8>;
168 nand-ecc-step-size = <512>;
169
170 partitions {
171 compatible = "fixed-partitions";
172 #address-cells = <1>;
173 #size-cells = <1>;
174
175 ubi@0 {
176 label = "ubi";
177 reg = <0x0000000 0x4000000>;
178 };
179
180 rootfs_1@4000000 {
181 label = "rootfs_1";
182 reg = <0x4000000 0x4000000>;
183 };
184 };
185 };
186 };
187
188 &adm_dma {
189 status = "okay";
190 };
191
192 &mdio0 {
193 status = "okay";
194
195 pinctrl-0 = <&mdio0_pins>;
196 pinctrl-names = "default";
197
198 ethernet-phy@0 {
199 reg = <0>;
200 qca,ar8327-initvals = <
201 0x00004 0x07600000 /* PAD0_MODE */
202 0x00008 0x01000000 /* PAD5_MODE */
203 0x0000c 0x00000080 /* PAD6_MODE */
204 0x00050 0xcc35cc35 /* LED_CTRL0 */
205 0x00054 0xca35ca35 /* LED_CTRL1 */
206 0x00058 0xc935c935 /* LED_CTRL2 */
207 0x0005c 0x03ffff00 /* LED_CTRL3 */
208 0x000e4 0x0006a545 /* MAC_POWER_SEL */
209 0x000e0 0xc74164de /* SGMII_CTRL */
210 0x0007c 0x0000007e /* PORT0_STATUS */
211 0x00094 0x0000007e /* PORT6_STATUS */
212 >;
213 };
214
215 ethernet-phy@4 {
216 reg = <4>;
217 };
218 };
219
220 &gmac1 {
221 status = "okay";
222
223 phy-mode = "rgmii";
224 qcom,id = <1>;
225
226 pinctrl-0 = <&rgmii2_pins>;
227 pinctrl-names = "default";
228
229 mtd-mac-address = <&ART 6>;
230
231 fixed-link {
232 speed = <1000>;
233 full-duplex;
234 };
235 };
236
237 &gmac2 {
238 status = "okay";
239
240 phy-mode = "sgmii";
241 qcom,id = <2>;
242
243 mtd-mac-address = <&ART 0>;
244
245 fixed-link {
246 speed = <1000>;
247 full-duplex;
248 };
249 };
250
251 &gsbi4 {
252 status = "okay";
253 qcom,mode = <GSBI_PROT_I2C_UART>;
254 };
255
256 &gsbi4_serial {
257 status = "okay";
258
259 pinctrl-0 = <&uart0_pins>;
260 pinctrl-names = "default";
261 };
262
263 &gsbi5 {
264 status = "okay";
265 qcom,mode = <GSBI_PROT_SPI>;
266
267 spi@1a280000 {
268 status = "okay";
269
270 pinctrl-0 = <&spi_pins>;
271 pinctrl-names = "default";
272
273 cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
274
275 flash@0 {
276 compatible = "jedec,spi-nor";
277 spi-max-frequency = <50000000>;
278 reg = <0>;
279
280 partitions {
281 compatible = "fixed-partitions";
282 #address-cells = <1>;
283 #size-cells = <1>;
284
285 SBL1@0 {
286 label = "SBL1";
287 reg = <0x0 0x10000>;
288 read-only;
289 };
290
291 MIBIB@10000 {
292 label = "MIBIB";
293 reg = <0x10000 0x20000>;
294 read-only;
295 };
296
297 SBL2@30000 {
298 label = "SBL2";
299 reg = <0x30000 0x30000>;
300 read-only;
301 };
302
303 SBL3@60000 {
304 label = "SBL3";
305 reg = <0x60000 0x30000>;
306 read-only;
307 };
308
309 DDRCONFIG@90000 {
310 label = "DDRCONFIG";
311 reg = <0x90000 0x10000>;
312 read-only;
313 };
314
315 SSD@a0000 {
316 label = "SSD";
317 reg = <0xa0000 0x10000>;
318 read-only;
319 };
320
321 TZ@b0000 {
322 label = "TZ";
323 reg = <0xb0000 0x30000>;
324 read-only;
325 };
326
327 RPM@e0000 {
328 label = "RPM";
329 reg = <0xe0000 0x20000>;
330 read-only;
331 };
332
333 APPSBL@100000 {
334 label = "APPSBL";
335 reg = <0x100000 0x70000>;
336 read-only;
337 };
338
339 APPSBLENV@170000 {
340 label = "APPSBLENV";
341 reg = <0x170000 0x10000>;
342 read-only;
343 };
344
345 ART: ART@180000 {
346 label = "ART";
347 reg = <0x180000 0x40000>;
348 read-only;
349 };
350
351 BOOTCONFIG@1c0000 {
352 label = "BOOTCONFIG";
353 reg = <0x1c0000 0x10000>;
354 read-only;
355 };
356
357 APPSBL_1@1d0000 {
358 label = "APPSBL_1";
359 reg = <0x1d0000 0x70000>;
360 read-only;
361 };
362 };
363 };
364 };
365 };
366
367 &usb3_0 {
368 status = "okay";
369
370 pinctrl-0 = <&usb_pwr_en_pins>;
371 pinctrl-names = "default";
372 };
373
374 &usb3_1 {
375 status = "okay";
376 };
377
378 &dwc3_0 {
379 #address-cells = <1>;
380 #size-cells = <0>;
381
382 hub_port0: port@1 {
383 reg = <1>;
384 #trigger-source-cells = <0>;
385 };
386 };
387
388 &dwc3_1 {
389 #address-cells = <1>;
390 #size-cells = <0>;
391
392 hub_port1: port@1 {
393 reg = <1>;
394 #trigger-source-cells = <0>;
395 };
396 };
397
398 &pcie0 {
399 status = "okay";
400 };
401
402 &pcie1 {
403 status = "okay";
404 force_gen1 = <1>;
405 };
406
407 &qcom_pinmux {
408 button_pins: button_pins {
409 mux {
410 pins = "gpio6", "gpio54", "gpio55", "gpio56", "gpio57",
411 "gpio58", "gpio64", "gpio65";
412 function = "gpio";
413 drive-strength = <2>;
414 bias-pull-up;
415 };
416 };
417
418 led_pins: led_pins {
419 mux {
420 pins = "gpio7", "gpio8", "gpio9", "gpio16", "gpio22",
421 "gpio23", "gpio24", "gpio25", "gpio26", "gpio53";
422 function = "gpio";
423 drive-strength = <2>;
424 bias-pull-up;
425 };
426 };
427
428 uart0_pins: uart0_pins {
429 mux {
430 pins = "gpio10", "gpio11";
431 function = "gsbi4";
432 drive-strength = <12>;
433 bias-disable;
434 };
435 };
436
437 spi_pins: spi_pins {
438 mux {
439 pins = "gpio18", "gpio19", "gpio21";
440 function = "gsbi5";
441 bias-pull-down;
442 };
443
444 data {
445 pins = "gpio18", "gpio19";
446 drive-strength = <10>;
447 };
448
449 cs{
450 pins = "gpio20";
451 drive-strength = <10>;
452 bias-pull-up;
453 };
454
455 clk {
456 pins = "gpio21";
457 drive-strength = <12>;
458 };
459 };
460
461 mdio0_pins: mdio0_pins {
462 mux {
463 pins = "gpio0", "gpio1";
464 function = "mdio";
465 drive-strength = <8>;
466 bias-disable;
467 };
468 };
469
470 nand_pins: nand_pins {
471 disable {
472 pins = "gpio34", "gpio35", "gpio36",
473 "gpio37", "gpio38";
474 function = "nand";
475 drive-strength = <10>;
476 bias-disable;
477 };
478
479 pullups {
480 pins = "gpio39";
481 function = "nand";
482 drive-strength = <10>;
483 bias-pull-up;
484 };
485
486 hold {
487 pins = "gpio40", "gpio41", "gpio42",
488 "gpio43", "gpio44", "gpio45",
489 "gpio46", "gpio47";
490 function = "nand";
491 drive-strength = <10>;
492 bias-bus-hold;
493 };
494 };
495
496 rgmii2_pins: rgmii2_pins {
497 mux {
498 pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32",
499 "gpio51", "gpio52", "gpio59", "gpio60", "gpio61", "gpio62" ;
500 function = "rgmii2";
501 drive-strength = <8>;
502 bias-disable;
503 };
504 };
505
506 usb_pwr_en_pins: usb_pwr_en_pins {
507 mux{
508 pins = "gpio68";
509 function = "gpio";
510 drive-strength = <2>;
511 bias-pull-up;
512 output-high;
513 };
514 };
515 };