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