ipq806x: WPQ864: fix partition unit-address
[openwrt/openwrt.git] / target / linux / ipq806x / files-4.14 / 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 soc {
60 rpm@108000 {
61 pinctrl-0 = <&rpm_pins>;
62 pinctrl-names = "default";
63 };
64
65 nand@1ac00000 {
66 status = "okay";
67
68 pinctrl-0 = <&nand_pins>;
69 pinctrl-names = "default";
70
71 mt29f2g08abbeah4@0 {
72 compatible = "qcom,nandcs";
73
74 reg = <0>;
75
76 nand-ecc-strength = <4>;
77 nand-bus-width = <8>;
78 nand-ecc-step-size = <512>;
79
80 partitions {
81 compatible = "fixed-partitions";
82 #address-cells = <1>;
83 #size-cells = <1>;
84
85 SBL1@0 {
86 label = "SBL1";
87 reg = <0x0000000 0x0040000>;
88 read-only;
89 };
90
91 MIBIB@40000 {
92 label = "MIBIB";
93 reg = <0x0040000 0x0140000>;
94 read-only;
95 };
96
97 SBL2@180000 {
98 label = "SBL2";
99 reg = <0x0180000 0x0140000>;
100 read-only;
101 };
102
103 SBL3@2c0000 {
104 label = "SBL3";
105 reg = <0x02c0000 0x0280000>;
106 read-only;
107 };
108
109 DDRCONFIG@540000 {
110 label = "DDRCONFIG";
111 reg = <0x0540000 0x0120000>;
112 read-only;
113 };
114
115 SSD@660000 {
116 label = "SSD";
117 reg = <0x0660000 0x0120000>;
118 read-only;
119 };
120
121 TZ@780000 {
122 label = "TZ";
123 reg = <0x0780000 0x0280000>;
124 read-only;
125 };
126
127 RPM@a00000 {
128 label = "RPM";
129 reg = <0x0a00000 0x0280000>;
130 read-only;
131 };
132
133 APPSBL@c80000 {
134 label = "APPSBL";
135 reg = <0x0c80000 0x0500000>;
136 read-only;
137 };
138
139 APPSBLENV@1180000 {
140 label = "APPSBLENV";
141 reg = <0x1180000 0x0080000>;
142 };
143
144 ART@1200000 {
145 label = "ART";
146 reg = <0x1200000 0x0140000>;
147 };
148
149 ubi@1340000 {
150 label = "ubi";
151 reg = <0x1340000 0x4000000>;
152 };
153
154 BOOTCONFIG@5340000 {
155 label = "BOOTCONFIG";
156 reg = <0x5340000 0x0060000>;
157 };
158
159 SBL2-1@53a0000- {
160 label = "SBL2_1";
161 reg = <0x53a0000 0x0140000>;
162 read-only;
163 };
164
165 SBL3-1@54e0000 {
166 label = "SBL3_1";
167 reg = <0x54e0000 0x0280000>;
168 read-only;
169 };
170
171 DDRCONFIG-1@5760000 {
172 label = "DDRCONFIG_1";
173 reg = <0x5760000 0x0120000>;
174 read-only;
175 };
176
177 SSD-1@5880000 {
178 label = "SSD_1";
179 reg = <0x5880000 0x0120000>;
180 read-only;
181 };
182
183 TZ-1@59a0000 {
184 label = "TZ_1";
185 reg = <0x59a0000 0x0280000>;
186 read-only;
187 };
188
189 RPM-1@5c20000 {
190 label = "RPM_1";
191 reg = <0x5c20000 0x0280000>;
192 read-only;
193 };
194
195 BOOTCONFIG1@5ea0000 {
196 label = "BOOTCONFIG1";
197 reg = <0x5ea0000 0x0060000>;
198 };
199
200 APPSBL-1@5f00000 {
201 label = "APPSBL_1";
202 reg = <0x5f00000 0x0500000>;
203 read-only;
204 };
205
206 ubi-1@6400000 {
207 label = "ubi_1";
208 reg = <0x6400000 0x4000000>;
209 };
210
211 unused@a400000 {
212 label = "unused";
213 reg = <0xa400000 0x5c00000>;
214 };
215 };
216 };
217 };
218 };
219
220 mdio0: mdio {
221 #address-cells = <1>;
222 #size-cells = <0>;
223
224 compatible = "virtual,mdio-gpio";
225
226 pinctrl-0 = <&mdio0_pins>;
227 pinctrl-names = "default";
228
229 gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH &qcom_pinmux 0 GPIO_ACTIVE_HIGH>;
230
231 ethernet-phy@0 {
232 reg = <0>;
233 qca,ar8327-initvals = <
234 0x00004 0x7600000 /* PAD0_MODE */
235 0x00008 0x1000000 /* PAD5_MODE */
236 0x0000c 0x80 /* PAD6_MODE */
237 0x000e4 0x6a545 /* MAC_POWER_SEL */
238 0x000e0 0xc74164de /* SGMII_CTRL */
239 0x0007c 0x4e /* PORT0_STATUS */
240 0x00094 0x4e /* PORT6_STATUS */
241 >;
242 };
243
244 ethernet-phy@4 {
245 reg = <4>;
246 };
247 };
248
249 leds {
250 compatible = "gpio-leds";
251
252 pinctrl-0 = <&led_pins>;
253 pinctrl-names = "default";
254
255 rss4 {
256 label = "wpq864:green:rss4";
257 gpios = <&qcom_pinmux 23 GPIO_ACTIVE_HIGH>;
258 };
259
260 rss3 {
261 label = "wpq864:green:rss3";
262 gpios = <&qcom_pinmux 24 GPIO_ACTIVE_HIGH>;
263 default-state = "keep";
264 };
265
266 rss2 {
267 label = "wpq864:orange:rss2";
268 gpios = <&qcom_pinmux 25 GPIO_ACTIVE_HIGH>;
269 };
270
271 rss1 {
272 label = "wpq864:red:rss1";
273 gpios = <&qcom_pinmux 22 GPIO_ACTIVE_HIGH>;
274 };
275
276 led_pass: pass {
277 label = "wpq864:green:pass";
278 gpios = <&qcom_pinmux 53 GPIO_ACTIVE_HIGH>;
279 };
280
281 led_fail: fail {
282 label = "wpq864:green:fail";
283 gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
284 };
285
286 usb {
287 label = "wpq864:green:usb";
288 gpios = <&qcom_pinmux 7 GPIO_ACTIVE_HIGH>;
289 };
290
291 usb-pcie {
292 label = "wpq864:green:usb-pcie";
293 gpios = <&qcom_pinmux 8 GPIO_ACTIVE_HIGH>;
294 };
295 };
296
297 keys {
298 compatible = "gpio-keys";
299
300 pinctrl-0 = <&button_pins>;
301 pinctrl-names = "default";
302
303 reset {
304 label = "reset";
305 gpios = <&qcom_pinmux 54 GPIO_ACTIVE_LOW>;
306 linux,code = <KEY_RESTART>;
307 };
308 };
309
310 beeper {
311 compatible = "gpio-beeper";
312
313 pinctrl-0 = <&beeper_pins>;
314 pinctrl-names = "default";
315
316 gpios = <&qcom_pinmux 55 GPIO_ACTIVE_HIGH>;
317 };
318 };
319
320 &adm_dma {
321 status = "okay";
322 };
323
324 &gmac1 {
325 status = "okay";
326
327 pinctrl-0 = <&rgmii2_pins>;
328 pinctrl-names = "default";
329
330 phy-mode = "rgmii";
331 qcom,id = <1>;
332
333 fixed-link {
334 speed = <1000>;
335 full-duplex;
336 };
337 };
338
339 &gmac2 {
340 status = "okay";
341
342 phy-mode = "sgmii";
343 qcom,id = <2>;
344
345 fixed-link {
346 speed = <1000>;
347 full-duplex;
348 };
349 };
350
351 &gsbi4 {
352 status = "okay";
353 qcom,mode = <GSBI_PROT_I2C_UART>;
354 };
355
356 &gsbi4_serial {
357 status = "okay";
358
359 pinctrl-0 = <&uart0_pins>;
360 pinctrl-names = "default";
361 };
362
363 &gsbi5 {
364 status = "okay";
365
366 qcom,mode = <GSBI_PROT_SPI>;
367
368 spi@1a280000 {
369 status = "okay";
370
371 pinctrl-0 = <&spi_pins>;
372 pinctrl-names = "default";
373
374 cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
375
376 s25fl256s1@0 {
377 compatible = "jedec,spi-nor";
378 #address-cells = <1>;
379 #size-cells = <1>;
380 reg = <0>;
381 spi-max-frequency = <50000000>;
382 };
383 };
384 };
385
386 &hs_phy_0 { /* USB3 port 0 HS phy */
387 status = "okay";
388 };
389
390 &hs_phy_1 { /* USB3 port 1 HS phy */
391 status = "okay";
392 };
393
394 &ss_phy_0 { /* USB3 port 0 SS phy */
395 status = "okay";
396
397 rx_eq = <2>;
398 tx_deamp_3_5db = <32>;
399 mpll = <160>;
400 };
401
402 &ss_phy_1 { /* USB3 port 1 SS phy */
403 status = "okay";
404
405 rx_eq = <2>;
406 tx_deamp_3_5db = <32>;
407 mpll = <160>;
408 };
409
410 &pcie0 {
411 status = "okay";
412
413 /delete-property/ pinctrl-0;
414 /delete-property/ pinctrl-names;
415 /delete-property/ perst-gpios;
416 };
417
418 &pcie1 {
419 status = "okay";
420 };
421
422 &pcie2 {
423 status = "okay";
424
425 /delete-property/ pinctrl-0;
426 /delete-property/ pinctrl-names;
427 /delete-property/ perst-gpios;
428 };
429
430 &qcom_pinmux {
431 pinctrl-names = "default";
432 pinctrl-0 = <&state_default>;
433
434 state_default: pinctrl0 {
435 pcie0_pcie2_perst {
436 pins = "gpio3";
437 function = "gpio";
438 drive-strength = <2>;
439 bias-disable;
440 output-high;
441 };
442 };
443
444 led_pins: led_pins {
445 mux {
446 pins = "gpio7", "gpio8", "gpio9", "gpio22",
447 "gpio23", "gpio24", "gpio25", "gpio53";
448 function = "gpio";
449 drive-strength = <2>;
450 bias-pull-up;
451 };
452 };
453
454 button_pins: button_pins {
455 mux {
456 pins = "gpio54";
457 function = "gpio";
458 drive-strength = <2>;
459 bias-pull-up;
460 };
461 };
462
463 beeper_pins: beeper_pins {
464 mux {
465 pins = "gpio55";
466 function = "gpio";
467 drive-strength = <2>;
468 bias-pull-up;
469 };
470 };
471
472 rpm_pins: rpm_pins {
473 mux {
474 pins = "gpio12", "gpio13";
475 function = "gsbi4";
476 drive-strength = <10>;
477 bias-disable;
478 };
479 };
480
481 uart0_pins: uart0_pins {
482 mux {
483 pins = "gpio10", "gpio11";
484 function = "gsbi4";
485 drive-strength = <10>;
486 bias-disable;
487 };
488 };
489
490 spi_pins: spi_pins {
491 mux {
492 pins = "gpio18", "gpio19";
493 function = "gsbi5";
494 drive-strength = <10>;
495 bias-pull-down;
496 };
497
498 clk {
499 pins = "gpio21";
500 function = "gsbi5";
501 drive-strength = <12>;
502 bias-pull-down;
503 };
504
505 cs {
506 pins = "gpio20";
507 function = "gpio";
508 drive-strength = <10>;
509 bias-pull-up;
510 };
511 };
512
513 nand_pins: nand_pins {
514 mux {
515 pins = "gpio34", "gpio35", "gpio36", "gpio37",
516 "gpio38", "gpio39", "gpio40", "gpio41",
517 "gpio42", "gpio43", "gpio44", "gpio45",
518 "gpio46", "gpio47";
519 function = "nand";
520 drive-strength = <10>;
521 bias-disable;
522 };
523
524 pullups {
525 pins = "gpio39";
526 bias-pull-up;
527 };
528
529 hold {
530 pins = "gpio40", "gpio41", "gpio42", "gpio43",
531 "gpio44", "gpio45", "gpio46", "gpio47";
532 bias-bus-hold;
533 };
534 };
535
536 mdio0_pins: mdio0_pins {
537 mux {
538 pins = "gpio0", "gpio1";
539 function = "gpio";
540 drive-strength = <8>;
541 bias-disable;
542 };
543 };
544
545 rgmii2_pins: rgmii2_pins {
546 mux {
547 pins = "gpio27", "gpio28", "gpio29", "gpio30",
548 "gpio31", "gpio32", "gpio51", "gpio52",
549 "gpio59", "gpio60", "gpio61", "gpio62";
550 function = "rgmii2";
551 drive-strength = <8>;
552 bias-disable;
553 };
554 };
555 };
556
557 &usb3_0 {
558 status = "okay";
559 };
560
561
562 &usb3_1 {
563 status = "okay";
564 };
565
566 &tcsr {
567 qcom,usb-ctrl-select = <TCSR_USB_SELECT_USB3_DUAL>;
568 };