ipq806x: fixes for R7800 and C2600
[openwrt/staging/lynxis.git] / target / linux / ipq806x / files / 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 = &uart4;
31 mdio-gpio0 = &mdio0;
32
33 led-boot = &power_white;
34 led-failsafe = &power_white;
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 pinctrl-0 = <&mdio0_pins &rgmii2_pins>;
46 pinctrl-names = "default";
47
48 i2c4_pins: i2c4_pinmux {
49 mux {
50 pins = "gpio12", "gpio13";
51 function = "gsbi4";
52 drive-strength = <12>;
53 bias-disable;
54 };
55 };
56
57 nand_pins: nand_pins {
58 mux {
59 pins = "gpio34", "gpio35", "gpio36",
60 "gpio37", "gpio38", "gpio39",
61 "gpio40", "gpio41", "gpio42",
62 "gpio43", "gpio44", "gpio45",
63 "gpio46", "gpio47";
64 function = "nand";
65 drive-strength = <10>;
66 bias-disable;
67 };
68 pullups {
69 pins = "gpio39";
70 bias-pull-up;
71 };
72 hold {
73 pins = "gpio40", "gpio41", "gpio42",
74 "gpio43", "gpio44", "gpio45",
75 "gpio46", "gpio47";
76 bias-bus-hold;
77 };
78 };
79
80 mdio0_pins: mdio0_pins {
81 mux {
82 pins = "gpio0", "gpio1";
83 function = "gpio";
84 drive-strength = <8>;
85 bias-disable;
86 };
87
88 clk {
89 pins = "gpio1";
90 input-disable;
91 };
92 };
93
94 rgmii2_pins: rgmii2_pins {
95 mux {
96 pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32",
97 "gpio51", "gpio52", "gpio59", "gpio60", "gpio61", "gpio62" ;
98 function = "rgmii2";
99 drive-strength = <8>;
100 bias-disable;
101 };
102
103 tx {
104 pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32" ;
105 input-disable;
106 };
107 };
108
109 spi_pins: spi_pins {
110 mux {
111 pins = "gpio18", "gpio19", "gpio21";
112 function = "gsbi5";
113 bias-pull-down;
114 };
115
116 data {
117 pins = "gpio18", "gpio19";
118 drive-strength = <10>;
119 };
120
121 cs {
122 pins = "gpio20";
123 drive-strength = <10>;
124 bias-pull-up;
125 };
126
127 clk {
128 pins = "gpio21";
129 drive-strength = <12>;
130 };
131 };
132
133 spi6_pins: spi6_pins {
134 mux {
135 pins = "gpio55", "gpio56", "gpio58";
136 function = "gsbi6";
137 bias-pull-down;
138 };
139
140 mosi {
141 pins = "gpio55";
142 drive-strength = <12>;
143 };
144
145 miso {
146 pins = "gpio56";
147 drive-strength = <14>;
148 };
149
150 cs {
151 pins = "gpio57";
152 drive-strength = <12>;
153 bias-pull-up;
154 };
155
156 clk {
157 pins = "gpio58";
158 drive-strength = <12>;
159 };
160
161 reset {
162 pins = "gpio33";
163 drive-strength = <10>;
164 bias-pull-down;
165 output-high;
166 };
167 };
168 };
169
170 gsbi@16300000 {
171 qcom,mode = <GSBI_PROT_I2C_UART>;
172 status = "ok";
173 serial@16340000 {
174 status = "ok";
175 };
176 /*
177 * The i2c device on gsbi4 should not be enabled.
178 * On ipq806x designs gsbi4 i2c is meant for exclusive
179 * RPM usage. Turning this on in kernel manifests as
180 * i2c failure for the RPM.
181 */
182 };
183
184 gsbi5: gsbi@1a200000 {
185 qcom,mode = <GSBI_PROT_SPI>;
186 status = "ok";
187
188 spi5: spi@1a280000 {
189 status = "ok";
190 spi-max-frequency = <50000000>;
191 pinctrl-0 = <&spi_pins>;
192 pinctrl-names = "default";
193
194 cs-gpios = <&qcom_pinmux 20 0>;
195
196 flash: m25p80@0 {
197 compatible = "jedec,spi-nor";
198 #address-cells = <1>;
199 #size-cells = <1>;
200 spi-max-frequency = <50000000>;
201 reg = <0>;
202
203 linux,part-probe = "qcom-smem";
204 };
205 };
206 };
207
208 gsbi6: gsbi@16500000 {
209 qcom,mode = <GSBI_PROT_SPI>;
210 status = "ok";
211 spi6: spi@16580000 {
212 status = "ok";
213 spi-max-frequency = <6000000>;
214 pinctrl-0 = <&spi6_pins>;
215 pinctrl-names = "default";
216
217 cs-gpios = <&qcom_pinmux 57 0>;
218
219 spi-nor@0 {
220 compatible = "spi-nor";
221 reg = <0>;
222 spi-max-frequency = <6000000>;
223 };
224 };
225 };
226
227 sata-phy@1b400000 {
228 status = "ok";
229 };
230
231 sata@29000000 {
232 ports-implemented = <0x1>;
233 status = "ok";
234 };
235
236 phy@100f8800 { /* USB3 port 1 HS phy */
237 status = "ok";
238 };
239
240 phy@100f8830 { /* USB3 port 1 SS phy */
241 status = "ok";
242 };
243
244 phy@110f8800 { /* USB3 port 0 HS phy */
245 status = "ok";
246 };
247
248 phy@110f8830 { /* USB3 port 0 SS phy */
249 status = "ok";
250 };
251
252 usb30@0 {
253 status = "ok";
254 };
255
256 usb30@1 {
257 status = "ok";
258 };
259
260 pcie0: pci@1b500000 {
261 status = "ok";
262 phy-tx0-term-offset = <7>;
263 };
264
265 pcie1: pci@1b700000 {
266 status = "ok";
267 phy-tx0-term-offset = <7>;
268 };
269
270 nand@1ac00000 {
271 status = "ok";
272
273 pinctrl-0 = <&nand_pins>;
274 pinctrl-names = "default";
275
276 nand-ecc-strength = <4>;
277 nand-ecc-step-size = <512>;
278 nand-bus-width = <8>;
279
280 #address-cells = <1>;
281 #size-cells = <1>;
282
283 qcadata@0 {
284 label = "qcadata";
285 reg = <0x0000000 0x0c80000>;
286 read-only;
287 };
288
289 APPSBL@c80000 {
290 label = "APPSBL";
291 reg = <0x0c80000 0x0500000>;
292 read-only;
293 };
294
295 APPSBLENV@1180000 {
296 label = "APPSBLENV";
297 reg = <0x1180000 0x0080000>;
298 read-only;
299 };
300
301 art: art@1200000 {
302 label = "art";
303 reg = <0x1200000 0x0140000>;
304 read-only;
305 };
306
307 artbak: art@1340000 {
308 label = "artbak";
309 reg = <0x1340000 0x0140000>;
310 read-only;
311 };
312
313 kernel@1480000 {
314 label = "kernel";
315 reg = <0x1480000 0x0200000>;
316 };
317
318 ubi@1680000 {
319 label = "ubi";
320 reg = <0x1680000 0x1E00000>;
321 };
322
323 netgear@3480000 {
324 label = "netgear";
325 reg = <0x3480000 0x4480000>;
326 read-only;
327 };
328
329 reserve@7900000 {
330 label = "reserve";
331 reg = <0x7900000 0x0700000>;
332 read-only;
333 };
334
335 firmware@1480000 {
336 label = "firmware";
337 reg = <0x1480000 0x2000000>;
338 };
339
340 };
341
342 mdio0: mdio {
343 compatible = "virtual,mdio-gpio";
344 #address-cells = <1>;
345 #size-cells = <0>;
346 gpios = <&qcom_pinmux 1 0 &qcom_pinmux 0 0>;
347
348 phy0: ethernet-phy@0 {
349 device_type = "ethernet-phy";
350 reg = <0>;
351 qca,ar8327-initvals = <
352 0x00004 0x7600000 /* PAD0_MODE */
353 0x00008 0x1000000 /* PAD5_MODE */
354 0x0000c 0x80 /* PAD6_MODE */
355 0x000e4 0xaa545 /* MAC_POWER_SEL */
356 0x000e0 0xc74164de /* SGMII_CTRL */
357 0x0007c 0x4e /* PORT0_STATUS */
358 0x00094 0x4e /* PORT6_STATUS */
359 0x00970 0x1e864443 /* QM_PORT0_CTRL0 */
360 0x00974 0x000001c6 /* QM_PORT0_CTRL1 */
361 0x00978 0x19008643 /* QM_PORT1_CTRL0 */
362 0x0097c 0x000001c6 /* QM_PORT1_CTRL1 */
363 0x00980 0x19008643 /* QM_PORT2_CTRL0 */
364 0x00984 0x000001c6 /* QM_PORT2_CTRL1 */
365 0x00988 0x19008643 /* QM_PORT3_CTRL0 */
366 0x0098c 0x000001c6 /* QM_PORT3_CTRL1 */
367 0x00990 0x19008643 /* QM_PORT4_CTRL0 */
368 0x00994 0x000001c6 /* QM_PORT4_CTRL1 */
369 0x00998 0x1e864443 /* QM_PORT5_CTRL0 */
370 0x0099c 0x000001c6 /* QM_PORT5_CTRL1 */
371 0x009a0 0x1e864443 /* QM_PORT6_CTRL0 */
372 0x009a4 0x000001c6 /* QM_PORT6_CTRL1 */
373 >;
374 qca,ar8327-vlans = <
375 0x1 0x5e /* VLAN1 Ports 1/2/3/4/6 */
376 0x2 0x21 /* VLAN2 Ports 0/5 */
377 >;
378 };
379
380 phy4: ethernet-phy@4 {
381 device_type = "ethernet-phy";
382 reg = <4>;
383 qca,ar8327-initvals = <
384 0x000e4 0x6a545 /* MAC_POWER_SEL */
385 0x0000c 0x80 /* PAD6_MODE */
386 >;
387 };
388 };
389
390 gmac1: ethernet@37200000 {
391 status = "ok";
392 phy-mode = "rgmii";
393 qcom,id = <1>;
394 qcom,phy_mdio_addr = <4>;
395 qcom,poll_required = <0>;
396 qcom,rgmii_delay = <1>;
397 qcom,phy_mii_type = <0>;
398 qcom,emulation = <0>;
399 qcom,irq = <255>;
400 mdiobus = <&mdio0>;
401
402 mtd-mac-address = <&art 6>;
403
404 fixed-link {
405 speed = <1000>;
406 full-duplex;
407 };
408 };
409
410 gmac2: ethernet@37400000 {
411 status = "ok";
412 phy-mode = "sgmii";
413 qcom,id = <2>;
414 qcom,phy_mdio_addr = <0>; /* none */
415 qcom,poll_required = <0>; /* no polling */
416 qcom,rgmii_delay = <0>;
417 qcom,phy_mii_type = <1>;
418 qcom,emulation = <0>;
419 qcom,irq = <258>;
420 mdiobus = <&mdio0>;
421
422 mtd-mac-address = <&art 0>;
423
424 fixed-link {
425 speed = <1000>;
426 full-duplex;
427 };
428 };
429
430 rpm@108000 {
431 pinctrl-0 = <&i2c4_pins>;
432 pinctrl-names = "default";
433 };
434 };
435
436 gpio-keys {
437 compatible = "gpio-keys";
438
439 wifi {
440 label = "wifi";
441 gpios = <&qcom_pinmux 6 1>;
442 linux,code = <KEY_RFKILL>;
443 debounce-interval = <60>;
444 wakeup-source;
445 };
446
447 reset {
448 label = "reset";
449 gpios = <&qcom_pinmux 54 1>;
450 linux,code = <KEY_RESTART>;
451 debounce-interval = <60>;
452 wakeup-source;
453 };
454
455 wps {
456 label = "wps";
457 gpios = <&qcom_pinmux 65 1>;
458 linux,code = <KEY_WPS_BUTTON>;
459 debounce-interval = <60>;
460 wakeup-source;
461 };
462 };
463
464 gpio-leds {
465 compatible = "gpio-leds";
466
467 power_white: power_white {
468 label = "r7800:white:power";
469 gpios = <&qcom_pinmux 53 0>;
470 default-state = "on";
471 };
472
473 power_amber: power_amber {
474 label = "r7800:amber:power";
475 gpios = <&qcom_pinmux 9 0>;
476 };
477
478 wan_white {
479 label = "r7800:white:wan";
480 gpios = <&qcom_pinmux 22 0>;
481 };
482
483 wan_amber {
484 label = "r7800:amber:wan";
485 gpios = <&qcom_pinmux 23 0>;
486 };
487
488 usb1 {
489 label = "r7800:white:usb1";
490 gpios = <&qcom_pinmux 7 0>;
491 };
492
493 usb2 {
494 label = "r7800:white:usb2";
495 gpios = <&qcom_pinmux 8 0>;
496 };
497
498 esata {
499 label = "r7800:white:esata";
500 gpios = <&qcom_pinmux 26 0>;
501 };
502
503 rfkill {
504 label = "r7800:white:rfkill";
505 gpios = <&qcom_pinmux 64 0>;
506 };
507
508 wps {
509 label = "r7800:white:wps";
510 gpios = <&qcom_pinmux 24 0>;
511 };
512
513 wifi {
514 label = "r7800:white:wifi";
515 gpios = <&qcom_pinmux 67 0>;
516 };
517 };
518
519 gpio_export {
520 compatible = "gpio-export";
521 #size-cells = <0>;
522
523 usb1-power {
524 gpio-export,name = "usb1";
525 gpio-export,output = <1>;
526 gpios = <&qcom_pinmux 15 0>;
527 };
528
529 usb2-power {
530 gpio-export,name = "usb2";
531 gpio-export,output = <1>;
532 gpios = <&qcom_pinmux 16 0>;
533 };
534
535 usb-power {
536 gpio-export,name = "usb_p";
537 gpio-export,output = <1>;
538 gpios = <&qcom_pinmux 68 0>;
539 };
540 };
541 };
542
543 &adm_dma {
544 status = "ok";
545 };