ipq806x: move mdio node to ipq8064 dts
[openwrt/staging/rmilecki.git] / target / linux / ipq806x / files-5.4 / arch / arm / boot / dts / qcom-ipq8064-wpq864.dts
1 /*
2 * BSD LICENSE
3 *
4 * Copyright (C) 2017 Christian Mehlis <christian@m3hlis.de>
5 * Copyright (C) 2018 Mathias Kresin <dev@kresin.me>
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
11 *
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution.
17 * 3. Neither the names of the copyright holders nor the names of any
18 * contributors may be used to endorse or promote products derived
19 * from this software without specific prior written permission.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25 * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 */
33
34 #include "qcom-ipq8064-v1.0.dtsi"
35
36 #include <dt-bindings/input/input.h>
37 #include <dt-bindings/soc/qcom,tcsr.h>
38
39 / {
40 compatible = "compex,wpq864", "qcom,ipq8064";
41 model = "Compex WPQ864";
42
43 aliases {
44 mdio-gpio0 = &mdio0;
45 serial0 = &gsbi4_serial;
46 ethernet0 = &gmac1;
47 ethernet1 = &gmac0;
48
49 led-boot = &led_pass;
50 led-failsafe = &led_fail;
51 led-running = &led_pass;
52 led-upgrade = &led_pass;
53 };
54
55 chosen {
56 stdout-path = "serial0:115200n8";
57 };
58
59 leds {
60 compatible = "gpio-leds";
61
62 pinctrl-0 = <&led_pins>;
63 pinctrl-names = "default";
64
65 rss4 {
66 label = "wpq864:green:rss4";
67 gpios = <&qcom_pinmux 23 GPIO_ACTIVE_HIGH>;
68 };
69
70 rss3 {
71 label = "wpq864:green:rss3";
72 gpios = <&qcom_pinmux 24 GPIO_ACTIVE_HIGH>;
73 default-state = "keep";
74 };
75
76 rss2 {
77 label = "wpq864:orange:rss2";
78 gpios = <&qcom_pinmux 25 GPIO_ACTIVE_HIGH>;
79 };
80
81 rss1 {
82 label = "wpq864:red:rss1";
83 gpios = <&qcom_pinmux 22 GPIO_ACTIVE_HIGH>;
84 };
85
86 led_pass: pass {
87 label = "wpq864:green:pass";
88 gpios = <&qcom_pinmux 53 GPIO_ACTIVE_HIGH>;
89 };
90
91 led_fail: fail {
92 label = "wpq864:green:fail";
93 gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
94 };
95
96 usb {
97 label = "wpq864:green:usb";
98 gpios = <&qcom_pinmux 7 GPIO_ACTIVE_HIGH>;
99 };
100
101 usb-pcie {
102 label = "wpq864:green:usb-pcie";
103 gpios = <&qcom_pinmux 8 GPIO_ACTIVE_HIGH>;
104 };
105 };
106
107 keys {
108 compatible = "gpio-keys";
109
110 pinctrl-0 = <&button_pins>;
111 pinctrl-names = "default";
112
113 reset {
114 label = "reset";
115 gpios = <&qcom_pinmux 54 GPIO_ACTIVE_LOW>;
116 linux,code = <KEY_RESTART>;
117 };
118 };
119
120 beeper {
121 compatible = "gpio-beeper";
122
123 pinctrl-0 = <&beeper_pins>;
124 pinctrl-names = "default";
125
126 gpios = <&qcom_pinmux 55 GPIO_ACTIVE_HIGH>;
127 };
128 };
129
130 &rpm {
131 pinctrl-0 = <&rpm_pins>;
132 pinctrl-names = "default";
133 };
134
135 &nand_controller {
136 status = "okay";
137
138 pinctrl-0 = <&nand_pins>;
139 pinctrl-names = "default";
140
141 mt29f2g08abbeah4@0 {
142 compatible = "qcom,nandcs";
143
144 reg = <0>;
145
146 nand-ecc-strength = <4>;
147 nand-bus-width = <8>;
148 nand-ecc-step-size = <512>;
149
150 partitions {
151 compatible = "fixed-partitions";
152 #address-cells = <1>;
153 #size-cells = <1>;
154
155 SBL1@0 {
156 label = "SBL1";
157 reg = <0x0000000 0x0040000>;
158 read-only;
159 };
160
161 MIBIB@40000 {
162 label = "MIBIB";
163 reg = <0x0040000 0x0140000>;
164 read-only;
165 };
166
167 SBL2@180000 {
168 label = "SBL2";
169 reg = <0x0180000 0x0140000>;
170 read-only;
171 };
172
173 SBL3@2c0000 {
174 label = "SBL3";
175 reg = <0x02c0000 0x0280000>;
176 read-only;
177 };
178
179 DDRCONFIG@540000 {
180 label = "DDRCONFIG";
181 reg = <0x0540000 0x0120000>;
182 read-only;
183 };
184
185 SSD@660000 {
186 label = "SSD";
187 reg = <0x0660000 0x0120000>;
188 read-only;
189 };
190
191 TZ@780000 {
192 label = "TZ";
193 reg = <0x0780000 0x0280000>;
194 read-only;
195 };
196
197 RPM@a00000 {
198 label = "RPM";
199 reg = <0x0a00000 0x0280000>;
200 read-only;
201 };
202
203 APPSBL@c80000 {
204 label = "APPSBL";
205 reg = <0x0c80000 0x0500000>;
206 read-only;
207 };
208
209 APPSBLENV@1180000 {
210 label = "APPSBLENV";
211 reg = <0x1180000 0x0080000>;
212 };
213
214 ART@1200000 {
215 label = "ART";
216 reg = <0x1200000 0x0140000>;
217 };
218
219 ubi@1340000 {
220 label = "ubi";
221 reg = <0x1340000 0x4000000>;
222 };
223
224 BOOTCONFIG@5340000 {
225 label = "BOOTCONFIG";
226 reg = <0x5340000 0x0060000>;
227 };
228
229 SBL2-1@53a0000- {
230 label = "SBL2_1";
231 reg = <0x53a0000 0x0140000>;
232 read-only;
233 };
234
235 SBL3-1@54e0000 {
236 label = "SBL3_1";
237 reg = <0x54e0000 0x0280000>;
238 read-only;
239 };
240
241 DDRCONFIG-1@5760000 {
242 label = "DDRCONFIG_1";
243 reg = <0x5760000 0x0120000>;
244 read-only;
245 };
246
247 SSD-1@5880000 {
248 label = "SSD_1";
249 reg = <0x5880000 0x0120000>;
250 read-only;
251 };
252
253 TZ-1@59a0000 {
254 label = "TZ_1";
255 reg = <0x59a0000 0x0280000>;
256 read-only;
257 };
258
259 RPM-1@5c20000 {
260 label = "RPM_1";
261 reg = <0x5c20000 0x0280000>;
262 read-only;
263 };
264
265 BOOTCONFIG1@5ea0000 {
266 label = "BOOTCONFIG1";
267 reg = <0x5ea0000 0x0060000>;
268 };
269
270 APPSBL-1@5f00000 {
271 label = "APPSBL_1";
272 reg = <0x5f00000 0x0500000>;
273 read-only;
274 };
275
276 ubi-1@6400000 {
277 label = "ubi_1";
278 reg = <0x6400000 0x4000000>;
279 };
280
281 unused@a400000 {
282 label = "unused";
283 reg = <0xa400000 0x5c00000>;
284 };
285 };
286 };
287 };
288
289 &adm_dma {
290 status = "okay";
291 };
292
293 &mdio0 {
294 status = "okay";
295
296 pinctrl-0 = <&mdio0_pins>;
297 pinctrl-names = "default";
298
299 ethernet-phy@0 {
300 reg = <0>;
301 qca,ar8327-initvals = <
302 0x00004 0x7600000 /* PAD0_MODE */
303 0x00008 0x1000000 /* PAD5_MODE */
304 0x0000c 0x80 /* PAD6_MODE */
305 0x000e4 0x6a545 /* MAC_POWER_SEL */
306 0x000e0 0xc74164de /* SGMII_CTRL */
307 0x0007c 0x4e /* PORT0_STATUS */
308 0x00094 0x4e /* PORT6_STATUS */
309 >;
310 };
311
312 ethernet-phy@4 {
313 reg = <4>;
314 };
315 };
316
317 &gmac1 {
318 status = "okay";
319
320 pinctrl-0 = <&rgmii2_pins>;
321 pinctrl-names = "default";
322
323 phy-mode = "rgmii";
324 qcom,id = <1>;
325
326 fixed-link {
327 speed = <1000>;
328 full-duplex;
329 };
330 };
331
332 &gmac2 {
333 status = "okay";
334
335 phy-mode = "sgmii";
336 qcom,id = <2>;
337
338 fixed-link {
339 speed = <1000>;
340 full-duplex;
341 };
342 };
343
344 &gsbi4 {
345 status = "okay";
346 qcom,mode = <GSBI_PROT_I2C_UART>;
347 };
348
349 &gsbi4_serial {
350 status = "okay";
351
352 pinctrl-0 = <&uart0_pins>;
353 pinctrl-names = "default";
354 };
355
356 &gsbi5 {
357 status = "okay";
358
359 qcom,mode = <GSBI_PROT_SPI>;
360
361 spi@1a280000 {
362 status = "okay";
363
364 pinctrl-0 = <&spi_pins>;
365 pinctrl-names = "default";
366
367 cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
368
369 s25fl256s1@0 {
370 compatible = "jedec,spi-nor";
371 #address-cells = <1>;
372 #size-cells = <1>;
373 reg = <0>;
374 spi-max-frequency = <50000000>;
375 };
376 };
377 };
378
379 &ss_phy_0 { /* USB3 port 0 SS phy */
380 status = "okay";
381
382 rx_eq = <2>;
383 tx_deamp_3_5db = <32>;
384 mpll = <160>;
385 };
386
387 &ss_phy_1 { /* USB3 port 1 SS phy */
388 status = "okay";
389
390 rx_eq = <2>;
391 tx_deamp_3_5db = <32>;
392 mpll = <160>;
393 };
394
395 &pcie0 {
396 status = "okay";
397
398 /delete-property/ pinctrl-0;
399 /delete-property/ pinctrl-names;
400 /delete-property/ perst-gpios;
401 };
402
403 &pcie1 {
404 status = "okay";
405 };
406
407 &pcie2 {
408 status = "okay";
409
410 /delete-property/ pinctrl-0;
411 /delete-property/ pinctrl-names;
412 /delete-property/ perst-gpios;
413 };
414
415 &qcom_pinmux {
416 pinctrl-names = "default";
417 pinctrl-0 = <&state_default>;
418
419 state_default: pinctrl0 {
420 pcie0_pcie2_perst {
421 pins = "gpio3";
422 function = "gpio";
423 drive-strength = <2>;
424 bias-disable;
425 output-high;
426 };
427 };
428
429 led_pins: led_pins {
430 mux {
431 pins = "gpio7", "gpio8", "gpio9", "gpio22",
432 "gpio23", "gpio24", "gpio25", "gpio53";
433 function = "gpio";
434 drive-strength = <2>;
435 bias-pull-up;
436 };
437 };
438
439 button_pins: button_pins {
440 mux {
441 pins = "gpio54";
442 function = "gpio";
443 drive-strength = <2>;
444 bias-pull-up;
445 };
446 };
447
448 beeper_pins: beeper_pins {
449 mux {
450 pins = "gpio55";
451 function = "gpio";
452 drive-strength = <2>;
453 bias-pull-up;
454 };
455 };
456
457 rpm_pins: rpm_pins {
458 mux {
459 pins = "gpio12", "gpio13";
460 function = "gsbi4";
461 drive-strength = <10>;
462 bias-disable;
463 };
464 };
465
466 uart0_pins: uart0_pins {
467 mux {
468 pins = "gpio10", "gpio11";
469 function = "gsbi4";
470 drive-strength = <10>;
471 bias-disable;
472 };
473 };
474
475 spi_pins: spi_pins {
476 mux {
477 pins = "gpio18", "gpio19";
478 function = "gsbi5";
479 drive-strength = <10>;
480 bias-pull-down;
481 };
482
483 clk {
484 pins = "gpio21";
485 function = "gsbi5";
486 drive-strength = <12>;
487 bias-pull-down;
488 };
489
490 cs {
491 pins = "gpio20";
492 function = "gpio";
493 drive-strength = <10>;
494 bias-pull-up;
495 };
496 };
497
498 nand_pins: nand_pins {
499 disable {
500 pins = "gpio34", "gpio35", "gpio36", "gpio37",
501 "gpio38";
502 function = "nand";
503 drive-strength = <10>;
504 bias-disable;
505 };
506
507 pullups {
508 pins = "gpio39";
509 function = "nand";
510 drive-strength = <10>;
511 bias-pull-up;
512 };
513
514 hold {
515 pins = "gpio40", "gpio41", "gpio42", "gpio43",
516 "gpio44", "gpio45", "gpio46", "gpio47";
517 function = "nand";
518 drive-strength = <10>;
519 bias-bus-hold;
520 };
521 };
522
523 mdio0_pins: mdio0_pins {
524 mux {
525 pins = "gpio0", "gpio1";
526 function = "mdio";
527 drive-strength = <8>;
528 bias-disable;
529 };
530 };
531
532 rgmii2_pins: rgmii2_pins {
533 mux {
534 pins = "gpio27", "gpio28", "gpio29", "gpio30",
535 "gpio31", "gpio32", "gpio51", "gpio52",
536 "gpio59", "gpio60", "gpio61", "gpio62";
537 function = "rgmii2";
538 drive-strength = <8>;
539 bias-disable;
540 };
541 };
542 };
543
544 &usb3_0 {
545 status = "okay";
546 };
547
548 &usb3_1 {
549 status = "okay";
550 };
551
552 &tcsr {
553 qcom,usb-ctrl-select = <TCSR_USB_SELECT_USB3_DUAL>;
554 };