ipq806x: add qca8k support
[openwrt/staging/blogic.git] / target / linux / ipq806x / files-4.14 / arch / arm / boot / dts / qcom-ipq8065-r7800.dts
1 #include "qcom-ipq8065.dtsi"
2
3 #include <dt-bindings/input/input.h>
4
5 / {
6 model = "Netgear Nighthawk X4S R7800";
7 compatible = "netgear,r7800", "qcom,ipq8065", "qcom,ipq8064";
8
9 memory@0 {
10 reg = <0x42000000 0x1e000000>;
11 device_type = "memory";
12 };
13
14 reserved-memory {
15 #address-cells = <1>;
16 #size-cells = <1>;
17 ranges;
18 rsvd@41200000 {
19 reg = <0x41200000 0x300000>;
20 no-map;
21 };
22
23 rsvd@5fe00000 {
24 reg = <0x5fe00000 0x200000>;
25 reusable;
26 };
27 };
28
29 aliases {
30 serial0 = &gsbi4_serial;
31 mdio-gpio0 = &mdio0;
32
33 led-boot = &power_white;
34 led-failsafe = &power_amber;
35 led-running = &power_white;
36 led-upgrade = &power_amber;
37 };
38
39 chosen {
40 linux,stdout-path = "serial0:115200n8";
41 };
42
43 soc {
44 pinmux@800000 {
45 button_pins: button_pins {
46 mux {
47 pins = "gpio6", "gpio54", "gpio65";
48 function = "gpio";
49 drive-strength = <2>;
50 bias-pull-up;
51 };
52 };
53
54 i2c4_pins: i2c4_pinmux {
55 mux {
56 pins = "gpio12", "gpio13";
57 function = "gsbi4";
58 drive-strength = <12>;
59 bias-disable;
60 };
61 };
62
63 led_pins: led_pins {
64 pins = "gpio7", "gpio8", "gpio9", "gpio22", "gpio23",
65 "gpio24","gpio26", "gpio53", "gpio64";
66 function = "gpio";
67 drive-strength = <2>;
68 bias-pull-down;
69 };
70
71 nand_pins: nand_pins {
72 mux {
73 pins = "gpio34", "gpio35", "gpio36",
74 "gpio37", "gpio38", "gpio39",
75 "gpio40", "gpio41", "gpio42",
76 "gpio43", "gpio44", "gpio45",
77 "gpio46", "gpio47";
78 function = "nand";
79 drive-strength = <10>;
80 bias-disable;
81 };
82 pullups {
83 pins = "gpio39";
84 bias-pull-up;
85 };
86 hold {
87 pins = "gpio40", "gpio41", "gpio42",
88 "gpio43", "gpio44", "gpio45",
89 "gpio46", "gpio47";
90 bias-bus-hold;
91 };
92 };
93
94 mdio0_pins: mdio0_pins {
95 mux {
96 pins = "gpio0", "gpio1";
97 function = "gpio";
98 drive-strength = <8>;
99 bias-disable;
100 };
101
102 clk {
103 pins = "gpio1";
104 input-disable;
105 };
106 };
107
108 rgmii2_pins: rgmii2_pins {
109 mux {
110 pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32",
111 "gpio51", "gpio52", "gpio59", "gpio60", "gpio61", "gpio62" ;
112 function = "rgmii2";
113 drive-strength = <8>;
114 bias-disable;
115 };
116
117 tx {
118 pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32" ;
119 input-disable;
120 };
121 };
122
123 spi_pins: spi_pins {
124 mux {
125 pins = "gpio18", "gpio19", "gpio21";
126 function = "gsbi5";
127 bias-pull-down;
128 };
129
130 data {
131 pins = "gpio18", "gpio19";
132 drive-strength = <10>;
133 };
134
135 cs {
136 pins = "gpio20";
137 drive-strength = <10>;
138 bias-pull-up;
139 };
140
141 clk {
142 pins = "gpio21";
143 drive-strength = <12>;
144 };
145 };
146
147 spi6_pins: spi6_pins {
148 mux {
149 pins = "gpio55", "gpio56", "gpio58";
150 function = "gsbi6";
151 bias-pull-down;
152 };
153
154 mosi {
155 pins = "gpio55";
156 drive-strength = <12>;
157 };
158
159 miso {
160 pins = "gpio56";
161 drive-strength = <14>;
162 };
163
164 cs {
165 pins = "gpio57";
166 drive-strength = <12>;
167 bias-pull-up;
168 };
169
170 clk {
171 pins = "gpio58";
172 drive-strength = <12>;
173 };
174
175 reset {
176 pins = "gpio33";
177 drive-strength = <10>;
178 bias-pull-down;
179 output-high;
180 };
181 };
182
183 usb0_pwr_en_pins: usb0_pwr_en_pins {
184 mux {
185 pins = "gpio15";
186 function = "gpio";
187 drive-strength = <12>;
188 bias-pull-down;
189 output-high;
190 };
191 };
192
193 usb1_pwr_en_pins: usb1_pwr_en_pins {
194 mux {
195 pins = "gpio16", "gpio68";
196 function = "gpio";
197 drive-strength = <12>;
198 bias-pull-down;
199 output-high;
200 };
201 };
202 };
203
204 gsbi@16300000 {
205 qcom,mode = <GSBI_PROT_I2C_UART>;
206 status = "ok";
207 serial@16340000 {
208 status = "ok";
209 };
210 /*
211 * The i2c device on gsbi4 should not be enabled.
212 * On ipq806x designs gsbi4 i2c is meant for exclusive
213 * RPM usage. Turning this on in kernel manifests as
214 * i2c failure for the RPM.
215 */
216 };
217
218 sata-phy@1b400000 {
219 status = "ok";
220 };
221
222 sata@29000000 {
223 ports-implemented = <0x1>;
224 status = "ok";
225 };
226
227 phy@100f8800 { /* USB3 port 1 HS phy */
228 status = "ok";
229 };
230
231 phy@100f8830 { /* USB3 port 1 SS phy */
232 status = "ok";
233 };
234
235 phy@110f8800 { /* USB3 port 0 HS phy */
236 status = "ok";
237 };
238
239 phy@110f8830 { /* USB3 port 0 SS phy */
240 status = "ok";
241 };
242
243 usb30@0 {
244 status = "ok";
245
246 pinctrl-0 = <&usb0_pwr_en_pins>;
247 pinctrl-names = "default";
248 };
249
250 usb30@1 {
251 status = "ok";
252
253 pinctrl-0 = <&usb1_pwr_en_pins>;
254 pinctrl-names = "default";
255 };
256
257 pcie0: pci@1b500000 {
258 status = "ok";
259 };
260
261 pcie1: pci@1b700000 {
262 status = "ok";
263 force_gen1 = <1>;
264 };
265
266 nand@1ac00000 {
267 status = "ok";
268
269 pinctrl-0 = <&nand_pins>;
270 pinctrl-names = "default";
271
272 cs0 {
273 reg = <0>;
274 compatible = "qcom,nandcs";
275
276 nand-ecc-strength = <4>;
277 nand-bus-width = <8>;
278 nand-ecc-step-size = <512>;
279
280 partitions {
281 compatible = "fixed-partitions";
282 #address-cells = <1>;
283 #size-cells = <1>;
284
285 qcadata@0 {
286 label = "qcadata";
287 reg = <0x0000000 0x0c80000>;
288 read-only;
289 };
290
291 APPSBL@c80000 {
292 label = "APPSBL";
293 reg = <0x0c80000 0x0500000>;
294 read-only;
295 };
296
297 APPSBLENV@1180000 {
298 label = "APPSBLENV";
299 reg = <0x1180000 0x0080000>;
300 read-only;
301 };
302
303 art: art@1200000 {
304 label = "art";
305 reg = <0x1200000 0x0140000>;
306 read-only;
307 };
308
309 artbak: art@1340000 {
310 label = "artbak";
311 reg = <0x1340000 0x0140000>;
312 read-only;
313 };
314
315 kernel@1480000 {
316 label = "kernel";
317 reg = <0x1480000 0x0400000>;
318 };
319
320 ubi@1880000 {
321 label = "ubi";
322 reg = <0x1880000 0x1C00000>;
323 };
324
325 netgear@3480000 {
326 label = "netgear";
327 reg = <0x3480000 0x4480000>;
328 read-only;
329 };
330
331 reserve@7900000 {
332 label = "reserve";
333 reg = <0x7900000 0x0700000>;
334 read-only;
335 };
336
337 firmware@1480000 {
338 label = "firmware";
339 reg = <0x1480000 0x2000000>;
340 };
341 };
342 };
343 };
344
345 mdio0: mdio {
346 compatible = "virtual,mdio-gpio";
347 #address-cells = <1>;
348 #size-cells = <0>;
349 gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH &qcom_pinmux 0 GPIO_ACTIVE_HIGH>;
350 pinctrl-0 = <&mdio0_pins>;
351 pinctrl-names = "default";
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 switch0@16 {
374 compatible = "qca,qca8337";
375 #address-cells = <1>;
376 #size-cells = <0>;
377
378 reg = <16>;
379
380 ports {
381 #address-cells = <1>;
382 #size-cells = <0>;
383 port@0 {
384 reg = <0>;
385 label = "cpu";
386 ethernet = <&gmac1>;
387 phy-mode = "rgmii";
388
389 fixed-link {
390 speed = <1000>;
391 full-duplex;
392 };
393 };
394
395 port@1 {
396 reg = <1>;
397 label = "lan4";
398 phy-handle = <&phy_port1>;
399 };
400
401 port@2 {
402 reg = <2>;
403 label = "lan3";
404 phy-handle = <&phy_port2>;
405 };
406
407 port@3 {
408 reg = <3>;
409 label = "lan2";
410 phy-handle = <&phy_port3>;
411 };
412
413 port@4 {
414 reg = <4>;
415 label = "lan1";
416 phy-handle = <&phy_port4>;
417 };
418
419 port@5 {
420 reg = <5>;
421 label = "wan";
422 phy-handle = <&phy_port5>;
423 };
424
425 /*
426 * Disabled until DSA supports multiple CPUs,
427 * otherwise it causes undefined behavior.
428 *
429 * port@6 {
430 * reg = <6>;
431 * label = "cpu";
432 * ethernet = <&gmac2>;
433 * phy-mode = "sgmii";
434 *
435 * fixed-link {
436 * speed = <1000>;
437 * full-duplex;
438 * };
439 * };
440 */
441 };
442 };
443 };
444
445 gmac1: ethernet@37200000 {
446 status = "ok";
447 phy-mode = "rgmii";
448 qcom,id = <1>;
449 qcom,phy_mdio_addr = <4>;
450 qcom,poll_required = <0>;
451 qcom,rgmii_delay = <1>;
452 qcom,phy_mii_type = <0>;
453 qcom,emulation = <0>;
454 qcom,irq = <255>;
455 mdiobus = <&mdio0>;
456
457 pinctrl-0 = <&rgmii2_pins>;
458 pinctrl-names = "default";
459
460 mtd-mac-address = <&art 6>;
461
462 fixed-link {
463 speed = <1000>;
464 full-duplex;
465 };
466 };
467
468 gmac2: ethernet@37400000 {
469 status = "ok";
470 phy-mode = "sgmii";
471 qcom,id = <2>;
472 qcom,phy_mdio_addr = <0>; /* none */
473 qcom,poll_required = <0>; /* no polling */
474 qcom,rgmii_delay = <0>;
475 qcom,phy_mii_type = <1>;
476 qcom,emulation = <0>;
477 qcom,irq = <258>;
478 mdiobus = <&mdio0>;
479
480 mtd-mac-address = <&art 0>;
481
482 fixed-link {
483 speed = <1000>;
484 full-duplex;
485 };
486 };
487 };
488
489 gpio-keys {
490 compatible = "gpio-keys";
491 pinctrl-0 = <&button_pins>;
492 pinctrl-names = "default";
493
494 wifi {
495 label = "wifi";
496 gpios = <&qcom_pinmux 6 GPIO_ACTIVE_LOW>;
497 linux,code = <KEY_RFKILL>;
498 debounce-interval = <60>;
499 wakeup-source;
500 };
501
502 reset {
503 label = "reset";
504 gpios = <&qcom_pinmux 54 GPIO_ACTIVE_LOW>;
505 linux,code = <KEY_RESTART>;
506 debounce-interval = <60>;
507 wakeup-source;
508 };
509
510 wps {
511 label = "wps";
512 gpios = <&qcom_pinmux 65 GPIO_ACTIVE_LOW>;
513 linux,code = <KEY_WPS_BUTTON>;
514 debounce-interval = <60>;
515 wakeup-source;
516 };
517 };
518
519 gpio-leds {
520 compatible = "gpio-leds";
521 pinctrl-0 = <&led_pins>;
522 pinctrl-names = "default";
523
524 power_white: power_white {
525 label = "r7800:white:power";
526 gpios = <&qcom_pinmux 53 GPIO_ACTIVE_HIGH>;
527 default-state = "keep";
528 };
529
530 power_amber: power_amber {
531 label = "r7800:amber:power";
532 gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
533 };
534
535 wan_white {
536 label = "r7800:white:wan";
537 gpios = <&qcom_pinmux 22 GPIO_ACTIVE_HIGH>;
538 };
539
540 wan_amber {
541 label = "r7800:amber:wan";
542 gpios = <&qcom_pinmux 23 GPIO_ACTIVE_HIGH>;
543 };
544
545 usb1 {
546 label = "r7800:white:usb1";
547 gpios = <&qcom_pinmux 7 GPIO_ACTIVE_HIGH>;
548 };
549
550 usb2 {
551 label = "r7800:white:usb2";
552 gpios = <&qcom_pinmux 8 GPIO_ACTIVE_HIGH>;
553 };
554
555 esata {
556 label = "r7800:white:esata";
557 gpios = <&qcom_pinmux 26 GPIO_ACTIVE_HIGH>;
558 };
559
560 wifi {
561 label = "r7800:white:wifi";
562 gpios = <&qcom_pinmux 64 GPIO_ACTIVE_HIGH>;
563 };
564
565 wps {
566 label = "r7800:white:wps";
567 gpios = <&qcom_pinmux 24 GPIO_ACTIVE_HIGH>;
568 };
569 };
570 };
571
572 &adm_dma {
573 status = "ok";
574 };