ipq806x: convert each device to DSA implementation
[openwrt/staging/svanheule.git] / target / linux / ipq806x / files / arch / arm / boot / dts / qcom-ipq8064-wpq864.dts
1 // SPDX-License-Identifier: BSD-3-Clause
2 /*
3 * Copyright (C) 2017 Christian Mehlis <christian@m3hlis.de>
4 * Copyright (C) 2018 Mathias Kresin <dev@kresin.me>
5 * All rights reserved.
6 */
7
8 #include "qcom-ipq8064-v1.0.dtsi"
9
10 #include <dt-bindings/input/input.h>
11 #include <dt-bindings/soc/qcom,tcsr.h>
12
13 / {
14 compatible = "compex,wpq864", "qcom,ipq8064";
15 model = "Compex WPQ864";
16
17 aliases {
18 mdio-gpio0 = &mdio0;
19 ethernet0 = &gmac1;
20 ethernet1 = &gmac0;
21
22 led-boot = &led_pass;
23 led-failsafe = &led_fail;
24 led-running = &led_pass;
25 led-upgrade = &led_pass;
26 };
27
28 leds {
29 compatible = "gpio-leds";
30
31 pinctrl-0 = <&led_pins>;
32 pinctrl-names = "default";
33
34 rss4 {
35 label = "green:rss4";
36 gpios = <&qcom_pinmux 23 GPIO_ACTIVE_HIGH>;
37 };
38
39 rss3 {
40 label = "green:rss3";
41 gpios = <&qcom_pinmux 24 GPIO_ACTIVE_HIGH>;
42 default-state = "keep";
43 };
44
45 rss2 {
46 label = "orange:rss2";
47 gpios = <&qcom_pinmux 25 GPIO_ACTIVE_HIGH>;
48 };
49
50 rss1 {
51 label = "red:rss1";
52 gpios = <&qcom_pinmux 22 GPIO_ACTIVE_HIGH>;
53 };
54
55 led_pass: pass {
56 label = "green:pass";
57 gpios = <&qcom_pinmux 53 GPIO_ACTIVE_HIGH>;
58 };
59
60 led_fail: fail {
61 label = "green:fail";
62 gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
63 };
64
65 usb {
66 label = "green:usb";
67 gpios = <&qcom_pinmux 7 GPIO_ACTIVE_HIGH>;
68 };
69
70 usb-pcie {
71 label = "green:usb-pcie";
72 gpios = <&qcom_pinmux 8 GPIO_ACTIVE_HIGH>;
73 };
74 };
75
76 keys {
77 compatible = "gpio-keys";
78
79 pinctrl-0 = <&button_pins>;
80 pinctrl-names = "default";
81
82 reset {
83 label = "reset";
84 gpios = <&qcom_pinmux 54 GPIO_ACTIVE_LOW>;
85 linux,code = <KEY_RESTART>;
86 debounce-interval = <60>;
87 wakeup-source;
88 };
89 };
90
91 beeper {
92 compatible = "gpio-beeper";
93
94 pinctrl-0 = <&beeper_pins>;
95 pinctrl-names = "default";
96
97 gpios = <&qcom_pinmux 55 GPIO_ACTIVE_HIGH>;
98 };
99 };
100
101 &rpm {
102 pinctrl-0 = <&rpm_pins>;
103 pinctrl-names = "default";
104 };
105
106 &nand {
107 status = "okay";
108
109 pinctrl-0 = <&nand_pins>;
110 pinctrl-names = "default";
111
112 mt29f2g08abbeah4@0 {
113 compatible = "qcom,nandcs";
114
115 reg = <0>;
116
117 nand-ecc-strength = <4>;
118 nand-bus-width = <8>;
119 nand-ecc-step-size = <512>;
120
121 nand-is-boot-medium;
122 qcom,boot-partitions = <0x0 0x1180000 0x5340000 0x10c0000>;
123
124 partitions {
125 compatible = "fixed-partitions";
126 #address-cells = <1>;
127 #size-cells = <1>;
128
129 partition@0 {
130 label = "0:SBL1";
131 reg = <0x0000000 0x0040000>;
132 read-only;
133 };
134
135 partition@40000 {
136 label = "0:MIBIB";
137 reg = <0x0040000 0x0140000>;
138 read-only;
139 };
140
141 partition@180000 {
142 label = "0:SBL2";
143 reg = <0x0180000 0x0140000>;
144 read-only;
145 };
146
147 partition@2c0000 {
148 label = "0:SBL3";
149 reg = <0x02c0000 0x0280000>;
150 read-only;
151 };
152
153 partition@540000 {
154 label = "0:DDRCONFIG";
155 reg = <0x0540000 0x0120000>;
156 read-only;
157 };
158
159 partition@660000 {
160 label = "0:SSD";
161 reg = <0x0660000 0x0120000>;
162 read-only;
163 };
164
165 partition@780000 {
166 label = "0:TZ";
167 reg = <0x0780000 0x0280000>;
168 read-only;
169 };
170
171 partition@a00000 {
172 label = "0:RPM";
173 reg = <0x0a00000 0x0280000>;
174 read-only;
175 };
176
177 partition@c80000 {
178 label = "0:APPSBL";
179 reg = <0x0c80000 0x0500000>;
180 read-only;
181 };
182
183 partition@1180000 {
184 label = "0:APPSBLENV";
185 reg = <0x1180000 0x0080000>;
186 };
187
188 partition@1200000 {
189 label = "0:ART";
190 reg = <0x1200000 0x0140000>;
191 };
192
193 partition@1340000 {
194 label = "ubi";
195 reg = <0x1340000 0x4000000>;
196 };
197
198 partition@5340000 {
199 label = "0:BOOTCONFIG";
200 reg = <0x5340000 0x0060000>;
201 };
202
203 partition@53a0000 {
204 label = "0:SBL2_1";
205 reg = <0x53a0000 0x0140000>;
206 read-only;
207 };
208
209 partition@54e0000 {
210 label = "0:SBL3_1";
211 reg = <0x54e0000 0x0280000>;
212 read-only;
213 };
214
215 partition@5760000 {
216 label = "0:DDRCONFIG_1";
217 reg = <0x5760000 0x0120000>;
218 read-only;
219 };
220
221 partition@5880000 {
222 label = "0:SSD_1";
223 reg = <0x5880000 0x0120000>;
224 read-only;
225 };
226
227 partition@59a0000 {
228 label = "0:TZ_1";
229 reg = <0x59a0000 0x0280000>;
230 read-only;
231 };
232
233 partition@5c20000 {
234 label = "0:RPM_1";
235 reg = <0x5c20000 0x0280000>;
236 read-only;
237 };
238
239 partition@5ea0000 {
240 label = "0:BOOTCONFIG1";
241 reg = <0x5ea0000 0x0060000>;
242 };
243
244 partition@5f00000 {
245 label = "0:APPSBL_1";
246 reg = <0x5f00000 0x0500000>;
247 read-only;
248 };
249
250 partition@6400000 {
251 label = "ubi_1";
252 reg = <0x6400000 0x4000000>;
253 };
254
255 partition@a400000 {
256 label = "unused";
257 reg = <0xa400000 0x5c00000>;
258 };
259 };
260 };
261 };
262
263 &adm_dma {
264 status = "okay";
265 };
266
267 &mdio0 {
268 status = "okay";
269
270 pinctrl-0 = <&mdio0_pins>;
271 pinctrl-names = "default";
272
273 switch@10 {
274 compatible = "qca,qca8337";
275 #address-cells = <1>;
276 #size-cells = <0>;
277 reg = <0x10>;
278
279 ports {
280 #address-cells = <1>;
281 #size-cells = <0>;
282
283 port@0 {
284 reg = <0>;
285 label = "cpu";
286 ethernet = <&gmac1>;
287 phy-mode = "rgmii";
288 tx-internal-delay-ps = <1000>;
289 rx-internal-delay-ps = <1000>;
290
291 fixed-link {
292 speed = <1000>;
293 full-duplex;
294 };
295 };
296
297 port@1 {
298 reg = <1>;
299 label = "lan1";
300 phy-mode = "internal";
301 phy-handle = <&phy_port1>;
302 };
303
304 port@2 {
305 reg = <2>;
306 label = "lan2";
307 phy-mode = "internal";
308 phy-handle = <&phy_port2>;
309 };
310
311 port@3 {
312 reg = <3>;
313 label = "lan3";
314 phy-mode = "internal";
315 phy-handle = <&phy_port3>;
316 };
317
318 port@4 {
319 reg = <4>;
320 label = "lan4";
321 phy-mode = "internal";
322 phy-handle = <&phy_port4>;
323 };
324
325 port@5 {
326 reg = <5>;
327 label = "wan";
328 phy-mode = "internal";
329 phy-handle = <&phy_port5>;
330 };
331
332 /*
333 port@6 {
334 reg = <0>;
335 label = "cpu";
336 ethernet = <&gmac2>;
337 phy-mode = "rgmii";
338
339 fixed-link {
340 speed = <1000>;
341 full-duplex;
342 pause;
343 asym-pause;
344 };
345 };
346 */
347 };
348
349 mdio {
350 #address-cells = <1>;
351 #size-cells = <0>;
352
353 phy_port1: phy@0 {
354 reg = <0>;
355 };
356
357 phy_port2: phy@1 {
358 reg = <1>;
359 };
360
361 phy_port3: phy@2 {
362 reg = <2>;
363 };
364
365 phy_port4: phy@3 {
366 reg = <3>;
367 };
368
369 phy_port5: phy@4 {
370 reg = <4>;
371 };
372 };
373 };
374 };
375
376 &gmac1 {
377 status = "okay";
378
379 pinctrl-0 = <&rgmii2_pins>;
380 pinctrl-names = "default";
381
382 phy-mode = "rgmii";
383 qcom,id = <1>;
384
385 fixed-link {
386 speed = <1000>;
387 full-duplex;
388 };
389 };
390
391 &gmac2 {
392 status = "okay";
393
394 phy-mode = "sgmii";
395 qcom,id = <2>;
396
397 fixed-link {
398 speed = <1000>;
399 full-duplex;
400 };
401 };
402
403 &gsbi4_serial {
404 pinctrl-0 = <&uart0_pins>;
405 pinctrl-names = "default";
406 };
407
408 &flash {
409 compatible = "jedec,spi-nor";
410 };
411
412 &sata_phy {
413 status = "disabled";
414 };
415
416 &sata {
417 status = "disabled";
418 };
419
420 &hs_phy_0 {
421 status = "okay";
422 };
423
424 &ss_phy_0 {
425 status = "okay";
426
427 rx_eq = <2>;
428 tx_deamp_3_5db = <32>;
429 mpll = <160>;
430 };
431
432 &usb3_0 {
433 status = "okay";
434 };
435
436 &hs_phy_1 {
437 status = "okay";
438 };
439
440 &ss_phy_1 {
441 status = "okay";
442
443 rx_eq = <2>;
444 tx_deamp_3_5db = <32>;
445 mpll = <160>;
446 };
447
448 &usb3_1 {
449 status = "okay";
450 };
451
452 &pcie0 {
453 status = "okay";
454
455 /delete-property/ pinctrl-0;
456 /delete-property/ pinctrl-names;
457 /delete-property/ perst-gpios;
458 };
459
460 &pcie1 {
461 status = "okay";
462 };
463
464 &pcie2 {
465 status = "okay";
466
467 /delete-property/ pinctrl-0;
468 /delete-property/ pinctrl-names;
469 /delete-property/ perst-gpios;
470 };
471
472 &qcom_pinmux {
473 pinctrl-names = "default";
474 pinctrl-0 = <&state_default>;
475
476 state_default: pinctrl0 {
477 pcie0_pcie2_perst {
478 pins = "gpio3";
479 function = "gpio";
480 drive-strength = <2>;
481 bias-disable;
482 output-high;
483 };
484 };
485
486 led_pins: led_pins {
487 mux {
488 pins = "gpio7", "gpio8", "gpio9", "gpio22",
489 "gpio23", "gpio24", "gpio25", "gpio53";
490 function = "gpio";
491 drive-strength = <2>;
492 bias-pull-up;
493 };
494 };
495
496 button_pins: button_pins {
497 mux {
498 pins = "gpio54";
499 function = "gpio";
500 drive-strength = <2>;
501 bias-pull-up;
502 };
503 };
504
505 beeper_pins: beeper_pins {
506 mux {
507 pins = "gpio55";
508 function = "gpio";
509 drive-strength = <2>;
510 bias-pull-up;
511 };
512 };
513
514 rpm_pins: rpm_pins {
515 mux {
516 pins = "gpio12", "gpio13";
517 function = "gsbi4";
518 drive-strength = <10>;
519 bias-disable;
520 };
521 };
522
523 uart0_pins: uart0_pins {
524 mux {
525 pins = "gpio10", "gpio11";
526 function = "gsbi4";
527 drive-strength = <10>;
528 bias-disable;
529 };
530 };
531
532 spi_pins: spi_pins {
533 mux {
534 pins = "gpio18", "gpio19";
535 function = "gsbi5";
536 drive-strength = <10>;
537 bias-pull-down;
538 };
539
540 clk {
541 pins = "gpio21";
542 function = "gsbi5";
543 drive-strength = <12>;
544 bias-pull-down;
545 };
546
547 cs {
548 pins = "gpio20";
549 function = "gpio";
550 drive-strength = <10>;
551 bias-pull-up;
552 };
553 };
554 };
555
556 &tcsr {
557 qcom,usb-ctrl-select = <TCSR_USB_SELECT_USB3_DUAL>;
558 };