ipq806x: convert to using qca8k
[openwrt/staging/blogic.git] / target / linux / ipq806x / files-4.9 / arch / arm / boot / dts / qcom-ipq8065-r7800.dts
1 #include "qcom-ipq8065-v1.0.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 gsbi5: gsbi@1a200000 {
219 qcom,mode = <GSBI_PROT_SPI>;
220 status = "ok";
221
222 spi5: spi@1a280000 {
223 status = "ok";
224
225 pinctrl-0 = <&spi_pins>;
226 pinctrl-names = "default";
227
228 cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
229
230 flash: m25p80@0 {
231 compatible = "jedec,spi-nor";
232 #address-cells = <1>;
233 #size-cells = <1>;
234 spi-max-frequency = <50000000>;
235 reg = <0>;
236
237 linux,part-probe = "qcom-smem";
238 };
239 };
240 };
241
242 gsbi6: gsbi@16500000 {
243 qcom,mode = <GSBI_PROT_SPI>;
244 status = "ok";
245 spi6: spi@16580000 {
246 status = "ok";
247
248 pinctrl-0 = <&spi6_pins>;
249 pinctrl-names = "default";
250
251 cs-gpios = <&qcom_pinmux 57 GPIO_ACTIVE_HIGH>;
252
253 spi-nor@0 {
254 compatible = "jedec,spi-nor";
255 reg = <0>;
256 spi-max-frequency = <6000000>;
257 };
258 };
259 };
260
261 sata-phy@1b400000 {
262 status = "ok";
263 };
264
265 sata@29000000 {
266 ports-implemented = <0x1>;
267 status = "ok";
268 };
269
270 phy@100f8800 { /* USB3 port 1 HS phy */
271 status = "ok";
272 };
273
274 phy@100f8830 { /* USB3 port 1 SS phy */
275 status = "ok";
276 };
277
278 phy@110f8800 { /* USB3 port 0 HS phy */
279 status = "ok";
280 };
281
282 phy@110f8830 { /* USB3 port 0 SS phy */
283 status = "ok";
284 };
285
286 usb30@0 {
287 status = "ok";
288
289 pinctrl-0 = <&usb0_pwr_en_pins>;
290 pinctrl-names = "default";
291 };
292
293 usb30@1 {
294 status = "ok";
295
296 pinctrl-0 = <&usb1_pwr_en_pins>;
297 pinctrl-names = "default";
298 };
299
300 pcie0: pci@1b500000 {
301 status = "ok";
302 phy-tx0-term-offset = <7>;
303 };
304
305 pcie1: pci@1b700000 {
306 status = "ok";
307 phy-tx0-term-offset = <7>;
308 };
309
310 nand@1ac00000 {
311 status = "ok";
312
313 pinctrl-0 = <&nand_pins>;
314 pinctrl-names = "default";
315
316 cs0 {
317 reg = <0>;
318 compatible = "qcom,nandcs";
319
320 nand-ecc-strength = <4>;
321 nand-bus-width = <8>;
322 nand-ecc-step-size = <512>;
323
324 partitions {
325 compatible = "fixed-partitions";
326 #address-cells = <1>;
327 #size-cells = <1>;
328
329 qcadata@0 {
330 label = "qcadata";
331 reg = <0x0000000 0x0c80000>;
332 read-only;
333 };
334
335 APPSBL@c80000 {
336 label = "APPSBL";
337 reg = <0x0c80000 0x0500000>;
338 read-only;
339 };
340
341 APPSBLENV@1180000 {
342 label = "APPSBLENV";
343 reg = <0x1180000 0x0080000>;
344 read-only;
345 };
346
347 art: art@1200000 {
348 label = "art";
349 reg = <0x1200000 0x0140000>;
350 read-only;
351 };
352
353 artbak: art@1340000 {
354 label = "artbak";
355 reg = <0x1340000 0x0140000>;
356 read-only;
357 };
358
359 kernel@1480000 {
360 label = "kernel";
361 reg = <0x1480000 0x0200000>;
362 };
363
364 ubi@1680000 {
365 label = "ubi";
366 reg = <0x1680000 0x1E00000>;
367 };
368
369 netgear@3480000 {
370 label = "netgear";
371 reg = <0x3480000 0x4480000>;
372 read-only;
373 };
374
375 reserve@7900000 {
376 label = "reserve";
377 reg = <0x7900000 0x0700000>;
378 read-only;
379 };
380
381 firmware@1480000 {
382 label = "firmware";
383 reg = <0x1480000 0x2000000>;
384 };
385 };
386 };
387 };
388
389 mdio0: mdio {
390 compatible = "virtual,mdio-gpio";
391 #address-cells = <1>;
392 #size-cells = <0>;
393 gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH &qcom_pinmux 0 GPIO_ACTIVE_HIGH>;
394 pinctrl-0 = <&mdio0_pins>;
395 pinctrl-names = "default";
396
397 phy_port1: phy@0 {
398 reg = <0>;
399 };
400
401 phy_port2: phy@1 {
402 reg = <1>;
403 };
404
405 phy_port3: phy@2 {
406 reg = <2>;
407 };
408
409 phy_port4: phy@3 {
410 reg = <3>;
411 };
412
413 phy_port5: phy@4 {
414 reg = <4>;
415 };
416
417 switch0@16 {
418 compatible = "qca,qca8337";
419 #address-cells = <1>;
420 #size-cells = <0>;
421
422 reg = <16>;
423
424 ports {
425 #address-cells = <1>;
426 #size-cells = <0>;
427 port@0 {
428 reg = <0>;
429 label = "cpu";
430 ethernet = <&gmac1>;
431 phy-mode = "rgmii";
432
433 fixed-link {
434 speed = <1000>;
435 full-duplex;
436 };
437 };
438
439 port@1 {
440 reg = <1>;
441 label = "lan4";
442 phy-handle = <&phy_port1>;
443 };
444
445 port@2 {
446 reg = <2>;
447 label = "lan3";
448 phy-handle = <&phy_port2>;
449 };
450
451 port@3 {
452 reg = <3>;
453 label = "lan2";
454 phy-handle = <&phy_port3>;
455 };
456
457 port@4 {
458 reg = <4>;
459 label = "lan1";
460 phy-handle = <&phy_port4>;
461 };
462
463 port@5 {
464 reg = <5>;
465 label = "wan";
466 phy-handle = <&phy_port5>;
467 };
468
469 /*
470 * Disabled until DSA supports multiple CPUs,
471 * otherwise it causes undefined behavior.
472 *
473 * port@6 {
474 * reg = <6>;
475 * label = "cpu";
476 * ethernet = <&gmac2>;
477 * phy-mode = "sgmii";
478 *
479 * fixed-link {
480 * speed = <1000>;
481 * full-duplex;
482 * };
483 * };
484 */
485 };
486 };
487 };
488
489 gmac1: ethernet@37200000 {
490 status = "ok";
491 phy-mode = "rgmii";
492 qcom,id = <1>;
493 qcom,phy_mdio_addr = <4>;
494 qcom,poll_required = <0>;
495 qcom,rgmii_delay = <1>;
496 qcom,phy_mii_type = <0>;
497 qcom,emulation = <0>;
498 qcom,irq = <255>;
499 mdiobus = <&mdio0>;
500
501 pinctrl-0 = <&rgmii2_pins>;
502 pinctrl-names = "default";
503
504 mtd-mac-address = <&art 6>;
505
506 fixed-link {
507 speed = <1000>;
508 full-duplex;
509 };
510 };
511
512 gmac2: ethernet@37400000 {
513 status = "ok";
514 phy-mode = "sgmii";
515 qcom,id = <2>;
516 qcom,phy_mdio_addr = <0>; /* none */
517 qcom,poll_required = <0>; /* no polling */
518 qcom,rgmii_delay = <0>;
519 qcom,phy_mii_type = <1>;
520 qcom,emulation = <0>;
521 qcom,irq = <258>;
522 mdiobus = <&mdio0>;
523
524 mtd-mac-address = <&art 0>;
525
526 fixed-link {
527 speed = <1000>;
528 full-duplex;
529 };
530 };
531
532 rpm@108000 {
533 pinctrl-0 = <&i2c4_pins>;
534 pinctrl-names = "default";
535 };
536 };
537
538 gpio-keys {
539 compatible = "gpio-keys";
540 pinctrl-0 = <&button_pins>;
541 pinctrl-names = "default";
542
543 wifi {
544 label = "wifi";
545 gpios = <&qcom_pinmux 6 GPIO_ACTIVE_LOW>;
546 linux,code = <KEY_RFKILL>;
547 debounce-interval = <60>;
548 wakeup-source;
549 };
550
551 reset {
552 label = "reset";
553 gpios = <&qcom_pinmux 54 GPIO_ACTIVE_LOW>;
554 linux,code = <KEY_RESTART>;
555 debounce-interval = <60>;
556 wakeup-source;
557 };
558
559 wps {
560 label = "wps";
561 gpios = <&qcom_pinmux 65 GPIO_ACTIVE_LOW>;
562 linux,code = <KEY_WPS_BUTTON>;
563 debounce-interval = <60>;
564 wakeup-source;
565 };
566 };
567
568 gpio-leds {
569 compatible = "gpio-leds";
570 pinctrl-0 = <&led_pins>;
571 pinctrl-names = "default";
572
573 power_white: power_white {
574 label = "r7800:white:power";
575 gpios = <&qcom_pinmux 53 GPIO_ACTIVE_HIGH>;
576 default-state = "keep";
577 };
578
579 power_amber: power_amber {
580 label = "r7800:amber:power";
581 gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
582 };
583
584 wan_white {
585 label = "r7800:white:wan";
586 gpios = <&qcom_pinmux 22 GPIO_ACTIVE_HIGH>;
587 };
588
589 wan_amber {
590 label = "r7800:amber:wan";
591 gpios = <&qcom_pinmux 23 GPIO_ACTIVE_HIGH>;
592 };
593
594 usb1 {
595 label = "r7800:white:usb1";
596 gpios = <&qcom_pinmux 7 GPIO_ACTIVE_HIGH>;
597 };
598
599 usb2 {
600 label = "r7800:white:usb2";
601 gpios = <&qcom_pinmux 8 GPIO_ACTIVE_HIGH>;
602 };
603
604 esata {
605 label = "r7800:white:esata";
606 gpios = <&qcom_pinmux 26 GPIO_ACTIVE_HIGH>;
607 };
608
609 wifi {
610 label = "r7800:white:wifi";
611 gpios = <&qcom_pinmux 64 GPIO_ACTIVE_HIGH>;
612 };
613
614 wps {
615 label = "r7800:white:wps";
616 gpios = <&qcom_pinmux 24 GPIO_ACTIVE_HIGH>;
617 };
618 };
619 };
620
621 &adm_dma {
622 status = "ok";
623 };