39fd81fe5537f38cb5fe93400c6c80c023bb3606
[openwrt/openwrt.git] / target / linux / ipq806x / files / 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-smb208.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 aliases {
16 led-boot = &power;
17 led-failsafe = &diag;
18 led-running = &power;
19 led-upgrade = &power;
20 };
21
22 chosen {
23 /* use "ubi_rootfs" volume in "ubi" partition as rootfs */
24 bootargs = "ubi.block=0,1 root=/dev/ubiblock0_1 rootfstype=squashfs";
25 };
26
27 leds {
28 compatible = "gpio-leds";
29 pinctrl-0 = <&led_pins>;
30 pinctrl-names = "default";
31
32 usb {
33 label = "green:usb";
34 gpios = <&qcom_pinmux 7 GPIO_ACTIVE_HIGH>;
35 linux,default-trigger = "usbport";
36 trigger-sources = <&hub_port0 &hub_port1>;
37 };
38
39 guestport {
40 label = "green:guestport";
41 gpios = <&qcom_pinmux 8 GPIO_ACTIVE_HIGH>;
42 };
43
44 diag: diag {
45 label = "orange:diag";
46 gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
47 };
48
49 internet_orange {
50 label = "orange:internet";
51 gpios = <&qcom_pinmux 16 GPIO_ACTIVE_HIGH>;
52 };
53
54 internet_white {
55 label = "white:internet";
56 gpios = <&qcom_pinmux 22 GPIO_ACTIVE_HIGH>;
57 };
58
59 wireless_orange {
60 label = "orange:wireless";
61 gpios = <&qcom_pinmux 23 GPIO_ACTIVE_HIGH>;
62 };
63
64 wireless_white {
65 label = "white:wireless";
66 gpios = <&qcom_pinmux 24 GPIO_ACTIVE_HIGH>;
67 };
68
69 router_orange {
70 label = "orange:router";
71 gpios = <&qcom_pinmux 25 GPIO_ACTIVE_HIGH>;
72 };
73
74 router_white {
75 label = "white:router";
76 gpios = <&qcom_pinmux 26 GPIO_ACTIVE_LOW>;
77 };
78
79 power: power {
80 label = "white:power";
81 gpios = <&qcom_pinmux 53 GPIO_ACTIVE_HIGH>;
82 };
83 };
84
85 keys {
86 compatible = "gpio-keys";
87 pinctrl-0 = <&button_pins>;
88 pinctrl-names = "default";
89
90 power {
91 label = "power";
92 gpios = <&qcom_pinmux 58 GPIO_ACTIVE_LOW>;
93 linux,code = <KEY_POWER>;
94 debounce-interval = <60>;
95 wakeup-source;
96 };
97
98 reset {
99 label = "reset";
100 gpios = <&qcom_pinmux 54 GPIO_ACTIVE_LOW>;
101 linux,code = <KEY_RESTART>;
102 debounce-interval = <60>;
103 wakeup-source;
104 };
105
106 wps {
107 label = "wps";
108 gpios = <&qcom_pinmux 65 GPIO_ACTIVE_LOW>;
109 linux,code = <KEY_WPS_BUTTON>;
110 debounce-interval = <60>;
111 wakeup-source;
112 };
113
114 eject {
115 label = "eject";
116 gpios = <&qcom_pinmux 6 GPIO_ACTIVE_LOW>;
117 linux,code = <KEY_EJECTCD>;
118 debounce-interval = <60>;
119 wakeup-source;
120 };
121
122 guest {
123 label = "guest";
124 gpios = <&qcom_pinmux 64 GPIO_ACTIVE_LOW>;
125 linux,code = <BTN_0>;
126 debounce-interval = <60>;
127 wakeup-source;
128 };
129
130 ap {
131 label = "ap";
132 gpios = <&qcom_pinmux 55 GPIO_ACTIVE_LOW>;
133 linux,code = <BTN_1>;
134 linux,input-type = <EV_SW>;
135 debounce-interval = <60>;
136 wakeup-source;
137 };
138
139 router {
140 label = "router";
141 gpios = <&qcom_pinmux 56 GPIO_ACTIVE_LOW>;
142 linux,code = <BTN_1>;
143 linux,input-type = <EV_SW>;
144 debounce-interval = <60>;
145 wakeup-source;
146 };
147
148 auto {
149 label = "auto";
150 gpios = <&qcom_pinmux 57 GPIO_ACTIVE_LOW>;
151 linux,code = <BTN_1>;
152 linux,input-type = <EV_SW>;
153 debounce-interval = <60>;
154 wakeup-source;
155 };
156 };
157 };
158
159 &nand {
160 status = "okay";
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 nvmem-cells = <&macaddr_ART_6>;
230 nvmem-cell-names = "mac-address";
231
232 fixed-link {
233 speed = <1000>;
234 full-duplex;
235 };
236 };
237
238 &gmac2 {
239 status = "okay";
240
241 phy-mode = "sgmii";
242 qcom,id = <2>;
243
244 nvmem-cells = <&macaddr_ART_0>;
245 nvmem-cell-names = "mac-address";
246
247 fixed-link {
248 speed = <1000>;
249 full-duplex;
250 };
251 };
252
253 &gsbi4_serial {
254 pinctrl-0 = <&uart0_pins>;
255 pinctrl-names = "default";
256 };
257
258 &gsbi5 {
259 status = "okay";
260 qcom,mode = <GSBI_PROT_SPI>;
261
262 spi@1a280000 {
263 status = "okay";
264
265 pinctrl-0 = <&spi_pins>;
266 pinctrl-names = "default";
267
268 cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
269
270 flash@0 {
271 compatible = "jedec,spi-nor";
272 spi-max-frequency = <50000000>;
273 reg = <0>;
274
275 partitions {
276 compatible = "fixed-partitions";
277 #address-cells = <1>;
278 #size-cells = <1>;
279
280 SBL1@0 {
281 label = "SBL1";
282 reg = <0x0 0x10000>;
283 read-only;
284 };
285
286 MIBIB@10000 {
287 label = "MIBIB";
288 reg = <0x10000 0x20000>;
289 read-only;
290 };
291
292 SBL2@30000 {
293 label = "SBL2";
294 reg = <0x30000 0x30000>;
295 read-only;
296 };
297
298 SBL3@60000 {
299 label = "SBL3";
300 reg = <0x60000 0x30000>;
301 read-only;
302 };
303
304 DDRCONFIG@90000 {
305 label = "DDRCONFIG";
306 reg = <0x90000 0x10000>;
307 read-only;
308 };
309
310 SSD@a0000 {
311 label = "SSD";
312 reg = <0xa0000 0x10000>;
313 read-only;
314 };
315
316 TZ@b0000 {
317 label = "TZ";
318 reg = <0xb0000 0x30000>;
319 read-only;
320 };
321
322 RPM@e0000 {
323 label = "RPM";
324 reg = <0xe0000 0x20000>;
325 read-only;
326 };
327
328 APPSBL@100000 {
329 label = "APPSBL";
330 reg = <0x100000 0x70000>;
331 read-only;
332 };
333
334 APPSBLENV@170000 {
335 label = "APPSBLENV";
336 reg = <0x170000 0x10000>;
337 read-only;
338 };
339
340 ART@180000 {
341 label = "ART";
342 reg = <0x180000 0x40000>;
343 read-only;
344
345 compatible = "nvmem-cells";
346 #address-cells = <1>;
347 #size-cells = <1>;
348
349 macaddr_ART_0: macaddr@0 {
350 reg = <0x0 0x6>;
351 };
352
353 macaddr_ART_6: macaddr@6 {
354 reg = <0x6 0x6>;
355 };
356
357 macaddr_ART_18: macaddr@18 {
358 reg = <0x18 0x6>;
359 };
360
361 macaddr_ART_1e: macaddr@1e {
362 reg = <0x1e 0x6>;
363 };
364
365 precal_ART_1000: precal@1000 {
366 reg = <0x1000 0x2f20>;
367 };
368
369 precal_ART_5000: precal@5000 {
370 reg = <0x5000 0x2f20>;
371 };
372 };
373
374 BOOTCONFIG@1c0000 {
375 label = "BOOTCONFIG";
376 reg = <0x1c0000 0x10000>;
377 read-only;
378 };
379
380 APPSBL_1@1d0000 {
381 label = "APPSBL_1";
382 reg = <0x1d0000 0x70000>;
383 read-only;
384 };
385 };
386 };
387 };
388 };
389
390 &hs_phy_0 {
391 status = "okay";
392 };
393
394 &ss_phy_0 {
395 status = "okay";
396 };
397
398 &usb3_0 {
399 status = "okay";
400
401 pinctrl-0 = <&usb_pwr_en_pins>;
402 pinctrl-names = "default";
403 };
404
405 &hs_phy_1 {
406 status = "okay";
407 };
408
409 &ss_phy_1 {
410 status = "okay";
411 };
412
413 &usb3_1 {
414 status = "okay";
415 };
416
417 &dwc3_0 {
418 #address-cells = <1>;
419 #size-cells = <0>;
420
421 hub_port0: port@1 {
422 reg = <1>;
423 #trigger-source-cells = <0>;
424 };
425 };
426
427 &dwc3_1 {
428 #address-cells = <1>;
429 #size-cells = <0>;
430
431 hub_port1: port@1 {
432 reg = <1>;
433 #trigger-source-cells = <0>;
434 };
435 };
436
437 &pcie0 {
438 status = "okay";
439
440 bridge@0,0 {
441 reg = <0x00000000 0 0 0 0>;
442 #address-cells = <3>;
443 #size-cells = <2>;
444 ranges;
445
446 wifi@1,0 {
447 compatible = "pci168c,0040";
448 reg = <0x00010000 0 0 0 0>;
449
450 nvmem-cells = <&macaddr_ART_1e>, <&precal_ART_1000>;
451 nvmem-cell-names = "mac-address", "pre-calibration";
452 };
453 };
454 };
455
456 &pcie1 {
457 status = "okay";
458 max-link-speed = <1>;
459
460 bridge@0,0 {
461 reg = <0x00000000 0 0 0 0>;
462 #address-cells = <3>;
463 #size-cells = <2>;
464 ranges;
465
466 wifi@1,0 {
467 compatible = "pci168c,0040";
468 reg = <0x00010000 0 0 0 0>;
469
470 nvmem-cells = <&macaddr_ART_18>, <&precal_ART_5000>;
471 nvmem-cell-names = "mac-address", "pre-calibration";
472 };
473 };
474 };
475
476 &qcom_pinmux {
477 button_pins: button_pins {
478 mux {
479 pins = "gpio6", "gpio54", "gpio55", "gpio56", "gpio57",
480 "gpio58", "gpio64", "gpio65";
481 function = "gpio";
482 drive-strength = <2>;
483 bias-pull-up;
484 };
485 };
486
487 led_pins: led_pins {
488 mux {
489 pins = "gpio7", "gpio8", "gpio9", "gpio16", "gpio22",
490 "gpio23", "gpio24", "gpio25", "gpio26", "gpio53";
491 function = "gpio";
492 drive-strength = <2>;
493 bias-pull-up;
494 };
495 };
496
497 uart0_pins: uart0_pins {
498 mux {
499 pins = "gpio10", "gpio11";
500 function = "gsbi4";
501 drive-strength = <12>;
502 bias-disable;
503 };
504 };
505
506 spi_pins: spi_pins {
507 mux {
508 pins = "gpio18", "gpio19", "gpio21";
509 function = "gsbi5";
510 bias-pull-down;
511 };
512
513 data {
514 pins = "gpio18", "gpio19";
515 drive-strength = <10>;
516 };
517
518 cs{
519 pins = "gpio20";
520 drive-strength = <10>;
521 bias-pull-up;
522 };
523
524 clk {
525 pins = "gpio21";
526 drive-strength = <12>;
527 };
528 };
529
530 usb_pwr_en_pins: usb_pwr_en_pins {
531 mux{
532 pins = "gpio68";
533 function = "gpio";
534 drive-strength = <2>;
535 bias-pull-up;
536 output-high;
537 };
538 };
539 };