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