ipq806x: add support for Netgear Nighthawk Pro Gaming XR500
[openwrt/staging/hauke.git] / target / linux / ipq806x / files / arch / arm / boot / dts / qcom-ipq8065-nighthawk.dtsi
1 #include "qcom-ipq8065.dtsi"
2
3 #include <dt-bindings/input/input.h>
4
5 / {
6 memory@0 {
7 reg = <0x42000000 0x1e000000>;
8 device_type = "memory";
9 };
10
11 reserved-memory {
12 rsvd@5fe00000 {
13 reg = <0x5fe00000 0x200000>;
14 reusable;
15 };
16 };
17
18 aliases {
19 label-mac-device = &gmac2;
20
21 led-boot = &power_white;
22 led-failsafe = &power_amber;
23 led-running = &power_white;
24 led-upgrade = &power_amber;
25
26 mdio-gpio0 = &mdio0;
27 };
28
29 keys {
30 compatible = "gpio-keys";
31 pinctrl-0 = <&button_pins>;
32 pinctrl-names = "default";
33
34 wifi {
35 label = "wifi";
36 gpios = <&qcom_pinmux 6 GPIO_ACTIVE_LOW>;
37 linux,code = <KEY_RFKILL>;
38 debounce-interval = <60>;
39 wakeup-source;
40 };
41
42 reset {
43 label = "reset";
44 gpios = <&qcom_pinmux 54 GPIO_ACTIVE_LOW>;
45 linux,code = <KEY_RESTART>;
46 debounce-interval = <60>;
47 wakeup-source;
48 };
49
50 wps {
51 label = "wps";
52 gpios = <&qcom_pinmux 65 GPIO_ACTIVE_LOW>;
53 linux,code = <KEY_WPS_BUTTON>;
54 debounce-interval = <60>;
55 wakeup-source;
56 };
57 };
58
59 leds: leds {
60 compatible = "gpio-leds";
61 pinctrl-0 = <&led_pins>;
62 pinctrl-names = "default";
63
64 power_white: power_white {
65 label = "white:power";
66 gpios = <&qcom_pinmux 53 GPIO_ACTIVE_HIGH>;
67 default-state = "keep";
68 };
69
70 power_amber: power_amber {
71 label = "amber:power";
72 gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
73 };
74
75 wan_white {
76 label = "white:wan";
77 gpios = <&qcom_pinmux 22 GPIO_ACTIVE_HIGH>;
78 };
79
80 wan_amber {
81 label = "amber:wan";
82 gpios = <&qcom_pinmux 23 GPIO_ACTIVE_HIGH>;
83 };
84
85 wifi {
86 label = "white:wifi";
87 gpios = <&qcom_pinmux 64 GPIO_ACTIVE_HIGH>;
88 };
89
90 wps {
91 label = "white:wps";
92 gpios = <&qcom_pinmux 24 GPIO_ACTIVE_HIGH>;
93 };
94 };
95 };
96
97 &qcom_pinmux {
98 button_pins: button_pins {
99 mux {
100 pins = "gpio6", "gpio54", "gpio65";
101 function = "gpio";
102 drive-strength = <2>;
103 bias-pull-up;
104 };
105 };
106
107 led_pins: led_pins {
108 mux {
109 pins = "gpio7", "gpio8", "gpio9",
110 "gpio22", "gpio23", "gpio24",
111 "gpio26", "gpio53", "gpio64";
112 function = "gpio";
113 drive-strength = <2>;
114 bias-pull-down;
115 };
116 };
117
118 mdio0_pins: mdio0_pins {
119 clk {
120 pins = "gpio1";
121 input-disable;
122 };
123 };
124
125 rgmii2_pins: rgmii2_pins {
126 tx {
127 pins = "gpio27", "gpio28", "gpio29",
128 "gpio30", "gpio31", "gpio32";
129 input-disable;
130 };
131 };
132
133 spi_pins: spi_pins {
134 mux {
135 pins = "gpio18", "gpio19", "gpio21";
136 function = "gsbi5";
137 bias-pull-down;
138 };
139
140 data {
141 pins = "gpio18", "gpio19";
142 drive-strength = <10>;
143 };
144
145 cs {
146 pins = "gpio20";
147 drive-strength = <10>;
148 bias-pull-up;
149 };
150
151 clk {
152 pins = "gpio21";
153 drive-strength = <12>;
154 };
155 };
156
157 spi6_pins: spi6_pins {
158 mux {
159 pins = "gpio55", "gpio56", "gpio58";
160 function = "gsbi6";
161 bias-pull-down;
162 };
163
164 mosi {
165 pins = "gpio55";
166 drive-strength = <12>;
167 };
168
169 miso {
170 pins = "gpio56";
171 drive-strength = <14>;
172 };
173
174 cs {
175 pins = "gpio57";
176 drive-strength = <12>;
177 bias-pull-up;
178 };
179
180 clk {
181 pins = "gpio58";
182 drive-strength = <12>;
183 };
184
185 reset {
186 pins = "gpio33";
187 drive-strength = <10>;
188 bias-pull-down;
189 output-high;
190 };
191 };
192
193 usb0_pwr_en_pins: usb0_pwr_en_pins {
194 mux {
195 pins = "gpio15";
196 function = "gpio";
197 drive-strength = <12>;
198 bias-pull-down;
199 output-high;
200 };
201 };
202
203 usb1_pwr_en_pins: usb1_pwr_en_pins {
204 mux {
205 pins = "gpio16", "gpio68";
206 function = "gpio";
207 drive-strength = <12>;
208 bias-pull-down;
209 output-high;
210 };
211 };
212 };
213
214 &nand_controller {
215 status = "okay";
216
217 pinctrl-0 = <&nand_pins>;
218 pinctrl-names = "default";
219
220 nand@0 {
221 reg = <0>;
222 compatible = "qcom,nandcs";
223
224 nand-ecc-strength = <4>;
225 nand-bus-width = <8>;
226 nand-ecc-step-size = <512>;
227
228 nand-is-boot-medium;
229 qcom,boot_pages_size = <0x1180000>;
230
231 partitions: partitions {
232 compatible = "fixed-partitions";
233 #address-cells = <1>;
234 #size-cells = <1>;
235
236 partition@0 {
237 label = "qcadata";
238 reg = <0x0000000 0x0c80000>;
239 read-only;
240 };
241
242 partition@c80000 {
243 label = "APPSBL";
244 reg = <0x0c80000 0x0500000>;
245 read-only;
246 };
247
248 partition@1180000 {
249 label = "APPSBLENV";
250 reg = <0x1180000 0x0080000>;
251 read-only;
252 };
253
254 art: partition@1200000 {
255 label = "art";
256 reg = <0x1200000 0x0140000>;
257 read-only;
258 };
259
260 partition@1340000 {
261 label = "artbak";
262 reg = <0x1340000 0x0140000>;
263 read-only;
264 };
265
266 partition@1480000 {
267 label = "kernel";
268 reg = <0x1480000 0x0400000>;
269 };
270 };
271 };
272 };
273
274 &mdio0 {
275 status = "okay";
276
277 pinctrl-0 = <&mdio0_pins>;
278 pinctrl-names = "default";
279
280 phy0: ethernet-phy@0 {
281 reg = <0>;
282 qca,ar8327-initvals = <
283 0x00004 0x7600000 /* PAD0_MODE */
284 0x00008 0x1000000 /* PAD5_MODE */
285 0x0000c 0x80 /* PAD6_MODE */
286 0x000e4 0xaa545 /* MAC_POWER_SEL */
287 0x000e0 0xc74164de /* SGMII_CTRL */
288 0x0007c 0x4e /* PORT0_STATUS */
289 0x00094 0x4e /* PORT6_STATUS */
290 0x00970 0x1e864443 /* QM_PORT0_CTRL0 */
291 0x00974 0x000001c6 /* QM_PORT0_CTRL1 */
292 0x00978 0x19008643 /* QM_PORT1_CTRL0 */
293 0x0097c 0x000001c6 /* QM_PORT1_CTRL1 */
294 0x00980 0x19008643 /* QM_PORT2_CTRL0 */
295 0x00984 0x000001c6 /* QM_PORT2_CTRL1 */
296 0x00988 0x19008643 /* QM_PORT3_CTRL0 */
297 0x0098c 0x000001c6 /* QM_PORT3_CTRL1 */
298 0x00990 0x19008643 /* QM_PORT4_CTRL0 */
299 0x00994 0x000001c6 /* QM_PORT4_CTRL1 */
300 0x00998 0x1e864443 /* QM_PORT5_CTRL0 */
301 0x0099c 0x000001c6 /* QM_PORT5_CTRL1 */
302 0x009a0 0x1e864443 /* QM_PORT6_CTRL0 */
303 0x009a4 0x000001c6 /* QM_PORT6_CTRL1 */
304 >;
305 qca,ar8327-vlans = <
306 0x1 0x5e /* VLAN1 Ports 1/2/3/4/6 */
307 0x2 0x21 /* VLAN2 Ports 0/5 */
308 >;
309 };
310
311 phy4: ethernet-phy@4 {
312 reg = <4>;
313 qca,ar8327-initvals = <
314 0x000e4 0x6a545 /* MAC_POWER_SEL */
315 0x0000c 0x80 /* PAD6_MODE */
316 >;
317 };
318 };
319
320 &gmac1 {
321 status = "okay";
322
323 phy-mode = "rgmii";
324 qcom,id = <1>;
325 qcom,phy_mdio_addr = <4>;
326 qcom,poll_required = <0>;
327 qcom,rgmii_delay = <1>;
328 qcom,phy_mii_type = <0>;
329 qcom,emulation = <0>;
330 qcom,irq = <255>;
331 mdiobus = <&mdio0>;
332
333 pinctrl-0 = <&rgmii2_pins>;
334 pinctrl-names = "default";
335
336 nvmem-cells = <&macaddr_art_6>;
337 nvmem-cell-names = "mac-address";
338
339 fixed-link {
340 speed = <1000>;
341 full-duplex;
342 };
343 };
344
345 &gmac2 {
346 status = "okay";
347
348 phy-mode = "sgmii";
349 qcom,id = <2>;
350 qcom,phy_mdio_addr = <0>; /* none */
351 qcom,poll_required = <0>; /* no polling */
352 qcom,rgmii_delay = <0>;
353 qcom,phy_mii_type = <1>;
354 qcom,emulation = <0>;
355 qcom,irq = <258>;
356 mdiobus = <&mdio0>;
357
358 nvmem-cells = <&macaddr_art_0>;
359 nvmem-cell-names = "mac-address";
360
361 fixed-link {
362 speed = <1000>;
363 full-duplex;
364 };
365 };
366
367 &adm_dma {
368 status = "okay";
369 };
370
371 &sata_phy {
372 status = "okay";
373 };
374
375 &sata {
376 status = "okay";
377 };
378
379 &usb3_0 {
380 status = "okay";
381
382 pinctrl-0 = <&usb0_pwr_en_pins>;
383 pinctrl-names = "default";
384 };
385
386 &usb3_1 {
387 status = "okay";
388
389 pinctrl-0 = <&usb1_pwr_en_pins>;
390 pinctrl-names = "default";
391 };
392
393 &pcie0 {
394 status = "okay";
395
396 bridge@0,0 {
397 reg = <0x00000000 0 0 0 0>;
398 #address-cells = <3>;
399 #size-cells = <2>;
400 ranges;
401
402 wifi0: wifi@1,0 {
403 compatible = "pci168c,0046";
404 reg = <0x00010000 0 0 0 0>;
405 };
406 };
407 };
408
409 &pcie1 {
410 status = "okay";
411
412 max-link-speed = <1>;
413
414 bridge@0,0 {
415 reg = <0x00000000 0 0 0 0>;
416 #address-cells = <3>;
417 #size-cells = <2>;
418 ranges;
419
420 wifi1: wifi@1,0 {
421 compatible = "pci168c,0046";
422 reg = <0x00010000 0 0 0 0>;
423 };
424 };
425 };
426
427 &art {
428 compatible = "nvmem-cells";
429 #address-cells = <1>;
430 #size-cells = <1>;
431
432 macaddr_art_0: macaddr@0 {
433 reg = <0x0 0x6>;
434 };
435
436 macaddr_art_6: macaddr@6 {
437 reg = <0x6 0x6>;
438 };
439 };