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