ipq806x: move common pinmux nodes to SoC DTSI
[openwrt/staging/981213.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 led_pins: led_pins {
138 mux {
139 pins = "gpio7", "gpio8", "gpio9", "gpio22", "gpio23",
140 "gpio24","gpio26", "gpio53", "gpio64";
141 function = "gpio";
142 drive-strength = <2>;
143 bias-pull-down;
144 };
145 };
146
147 mdio0_pins: mdio0_pins {
148 clk {
149 pins = "gpio1";
150 input-disable;
151 };
152 };
153
154 rgmii2_pins: rgmii2_pins {
155 tx {
156 pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32" ;
157 input-disable;
158 };
159 };
160
161 spi_pins: spi_pins {
162 mux {
163 pins = "gpio18", "gpio19", "gpio21";
164 function = "gsbi5";
165 bias-pull-down;
166 };
167
168 data {
169 pins = "gpio18", "gpio19";
170 drive-strength = <10>;
171 };
172
173 cs {
174 pins = "gpio20";
175 drive-strength = <10>;
176 bias-pull-up;
177 };
178
179 clk {
180 pins = "gpio21";
181 drive-strength = <12>;
182 };
183 };
184
185 spi6_pins: spi6_pins {
186 mux {
187 pins = "gpio55", "gpio56", "gpio58";
188 function = "gsbi6";
189 bias-pull-down;
190 };
191
192 mosi {
193 pins = "gpio55";
194 drive-strength = <12>;
195 };
196
197 miso {
198 pins = "gpio56";
199 drive-strength = <14>;
200 };
201
202 cs {
203 pins = "gpio57";
204 drive-strength = <12>;
205 bias-pull-up;
206 };
207
208 clk {
209 pins = "gpio58";
210 drive-strength = <12>;
211 };
212
213 reset {
214 pins = "gpio33";
215 drive-strength = <10>;
216 bias-pull-down;
217 output-high;
218 };
219 };
220
221 usb0_pwr_en_pins: usb0_pwr_en_pins {
222 mux {
223 pins = "gpio15";
224 function = "gpio";
225 drive-strength = <12>;
226 bias-pull-down;
227 output-high;
228 };
229 };
230
231 usb1_pwr_en_pins: usb1_pwr_en_pins {
232 mux {
233 pins = "gpio16", "gpio68";
234 function = "gpio";
235 drive-strength = <12>;
236 bias-pull-down;
237 output-high;
238 };
239 };
240 };
241
242 &gsbi4 {
243 qcom,mode = <GSBI_PROT_I2C_UART>;
244 status = "okay";
245
246 serial@16340000 {
247 status = "okay";
248 };
249
250 /*
251 * The i2c device on gsbi4 should not be enabled.
252 * On ipq806x designs gsbi4 i2c is meant for exclusive
253 * RPM usage. Turning this on in kernel manifests as
254 * i2c failure for the RPM.
255 */
256 };
257
258 &nand_controller {
259 status = "okay";
260
261 pinctrl-0 = <&nand_pins>;
262 pinctrl-names = "default";
263
264 nand@0 {
265 reg = <0>;
266 compatible = "qcom,nandcs";
267
268 nand-ecc-strength = <4>;
269 nand-bus-width = <8>;
270 nand-ecc-step-size = <512>;
271
272 partitions {
273 compatible = "fixed-partitions";
274 #address-cells = <1>;
275 #size-cells = <1>;
276
277 qcadata@0 {
278 label = "qcadata";
279 reg = <0x0000000 0x0c80000>;
280 read-only;
281 };
282
283 APPSBL@c80000 {
284 label = "APPSBL";
285 reg = <0x0c80000 0x0500000>;
286 read-only;
287 };
288
289 APPSBLENV@1180000 {
290 label = "APPSBLENV";
291 reg = <0x1180000 0x0080000>;
292 read-only;
293 };
294
295 art: art@1200000 {
296 label = "art";
297 reg = <0x1200000 0x0140000>;
298 read-only;
299 };
300
301 artbak: art@1340000 {
302 label = "artbak";
303 reg = <0x1340000 0x0140000>;
304 read-only;
305 };
306
307 kernel@1480000 {
308 label = "kernel";
309 reg = <0x1480000 0x0400000>;
310 };
311
312 ubi@1880000 {
313 label = "ubi";
314 reg = <0x1880000 0x6080000>;
315 };
316
317 reserve@7900000 {
318 label = "reserve";
319 reg = <0x7900000 0x0700000>;
320 read-only;
321 };
322 };
323 };
324 };
325
326 &mdio0 {
327 status = "okay";
328
329 pinctrl-0 = <&mdio0_pins>;
330 pinctrl-names = "default";
331
332 phy0: ethernet-phy@0 {
333 reg = <0>;
334 qca,ar8327-initvals = <
335 0x00004 0x7600000 /* PAD0_MODE */
336 0x00008 0x1000000 /* PAD5_MODE */
337 0x0000c 0x80 /* PAD6_MODE */
338 0x000e4 0xaa545 /* MAC_POWER_SEL */
339 0x000e0 0xc74164de /* SGMII_CTRL */
340 0x0007c 0x4e /* PORT0_STATUS */
341 0x00094 0x4e /* PORT6_STATUS */
342 0x00970 0x1e864443 /* QM_PORT0_CTRL0 */
343 0x00974 0x000001c6 /* QM_PORT0_CTRL1 */
344 0x00978 0x19008643 /* QM_PORT1_CTRL0 */
345 0x0097c 0x000001c6 /* QM_PORT1_CTRL1 */
346 0x00980 0x19008643 /* QM_PORT2_CTRL0 */
347 0x00984 0x000001c6 /* QM_PORT2_CTRL1 */
348 0x00988 0x19008643 /* QM_PORT3_CTRL0 */
349 0x0098c 0x000001c6 /* QM_PORT3_CTRL1 */
350 0x00990 0x19008643 /* QM_PORT4_CTRL0 */
351 0x00994 0x000001c6 /* QM_PORT4_CTRL1 */
352 0x00998 0x1e864443 /* QM_PORT5_CTRL0 */
353 0x0099c 0x000001c6 /* QM_PORT5_CTRL1 */
354 0x009a0 0x1e864443 /* QM_PORT6_CTRL0 */
355 0x009a4 0x000001c6 /* QM_PORT6_CTRL1 */
356 >;
357 qca,ar8327-vlans = <
358 0x1 0x5e /* VLAN1 Ports 1/2/3/4/6 */
359 0x2 0x21 /* VLAN2 Ports 0/5 */
360 >;
361 };
362
363 phy4: ethernet-phy@4 {
364 reg = <4>;
365 qca,ar8327-initvals = <
366 0x000e4 0x6a545 /* MAC_POWER_SEL */
367 0x0000c 0x80 /* PAD6_MODE */
368 >;
369 };
370 };
371
372 &gmac1 {
373 status = "okay";
374 phy-mode = "rgmii";
375 qcom,id = <1>;
376 qcom,phy_mdio_addr = <4>;
377 qcom,poll_required = <0>;
378 qcom,rgmii_delay = <1>;
379 qcom,phy_mii_type = <0>;
380 qcom,emulation = <0>;
381 qcom,irq = <255>;
382 mdiobus = <&mdio0>;
383
384 pinctrl-0 = <&rgmii2_pins>;
385 pinctrl-names = "default";
386
387 mtd-mac-address = <&art 6>;
388
389 fixed-link {
390 speed = <1000>;
391 full-duplex;
392 };
393 };
394
395 &gmac2 {
396 status = "okay";
397 phy-mode = "sgmii";
398 qcom,id = <2>;
399 qcom,phy_mdio_addr = <0>; /* none */
400 qcom,poll_required = <0>; /* no polling */
401 qcom,rgmii_delay = <0>;
402 qcom,phy_mii_type = <1>;
403 qcom,emulation = <0>;
404 qcom,irq = <258>;
405 mdiobus = <&mdio0>;
406
407 mtd-mac-address = <&art 0>;
408
409 fixed-link {
410 speed = <1000>;
411 full-duplex;
412 };
413 };
414
415 &adm_dma {
416 status = "okay";
417 };
418
419 &sata_phy {
420 status = "okay";
421 };
422
423 &sata {
424 ports-implemented = <0x1>;
425 status = "okay";
426 };
427
428 &usb3_0 {
429 status = "okay";
430
431 pinctrl-0 = <&usb0_pwr_en_pins>;
432 pinctrl-names = "default";
433 };
434
435 &usb3_1 {
436 status = "okay";
437
438 pinctrl-0 = <&usb1_pwr_en_pins>;
439 pinctrl-names = "default";
440 };
441
442 &pcie0 {
443 status = "okay";
444
445 bridge@0,0 {
446 reg = <0x00000000 0 0 0 0>;
447 #address-cells = <3>;
448 #size-cells = <2>;
449 ranges;
450
451 wifi@1,0 {
452 compatible = "pci168c,0046";
453 reg = <0x00010000 0 0 0 0>;
454
455 mtd-mac-address = <&art 6>;
456 mtd-mac-address-increment = <(1)>;
457 };
458 };
459 };
460
461 &pcie1 {
462 status = "okay";
463 force_gen1 = <1>;
464
465 bridge@0,0 {
466 reg = <0x00000000 0 0 0 0>;
467 #address-cells = <3>;
468 #size-cells = <2>;
469 ranges;
470
471 wifi@1,0 {
472 compatible = "pci168c,0046";
473 reg = <0x00010000 0 0 0 0>;
474
475 mtd-mac-address = <&art 6>;
476 mtd-mac-address-increment = <(2)>;
477 };
478 };
479 };