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