ipq806x: fix leds, sata port for Netgear R7800 and minor fixes - renamed leds in...
[openwrt/openwrt.git] / target / linux / ipq806x / files / arch / arm / boot / dts / qcom-ipq8065-r7800.dts
1 #include "qcom-ipq8065-v1.0.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 = &uart4;
31 mdio-gpio0 = &mdio0;
32
33 led-boot = &power_white;
34 led-failsafe = &power_white;
35 led-running = &power_white;
36 led-upgrade = &power_amber;
37 };
38
39 chosen {
40 linux,stdout-path = "serial0:115200n8";
41 };
42
43 soc {
44 pinmux@800000 {
45 pinctrl-0 = <&mdio0_pins &rgmii2_pins>;
46 pinctrl-names = "default";
47
48 i2c4_pins: i2c4_pinmux {
49 mux {
50 pins = "gpio12", "gpio13";
51 function = "gsbi4";
52 drive-strength = <12>;
53 bias-disable;
54 };
55 };
56
57 nand_pins: nand_pins {
58 mux {
59 pins = "gpio34", "gpio35", "gpio36",
60 "gpio37", "gpio38", "gpio39",
61 "gpio40", "gpio41", "gpio42",
62 "gpio43", "gpio44", "gpio45",
63 "gpio46", "gpio47";
64 function = "nand";
65 drive-strength = <10>;
66 bias-disable;
67 };
68 pullups {
69 pins = "gpio39";
70 bias-pull-up;
71 };
72 hold {
73 pins = "gpio40", "gpio41", "gpio42",
74 "gpio43", "gpio44", "gpio45",
75 "gpio46", "gpio47";
76 bias-bus-hold;
77 };
78 };
79
80 mdio0_pins: mdio0_pins {
81 mux {
82 pins = "gpio0", "gpio1";
83 function = "gpio";
84 drive-strength = <8>;
85 bias-disable;
86 };
87
88 clk {
89 pins = "gpio1";
90 input-disable;
91 };
92 };
93
94 rgmii2_pins: rgmii2_pins {
95 mux {
96 pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32",
97 "gpio51", "gpio52", "gpio59", "gpio60", "gpio61", "gpio62" ;
98 function = "rgmii2";
99 drive-strength = <8>;
100 bias-disable;
101 };
102
103 tx {
104 pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32" ;
105 input-disable;
106 };
107 };
108
109 spi_pins: spi_pins {
110 mux {
111 pins = "gpio18", "gpio19", "gpio21";
112 function = "gsbi5";
113 drive-strength = <10>;
114 bias-none;
115 };
116
117 cs {
118 pins = "gpio20";
119 drive-strength = <12>;
120 };
121 };
122 };
123
124 gsbi@16300000 {
125 qcom,mode = <GSBI_PROT_I2C_UART>;
126 status = "ok";
127 serial@16340000 {
128 status = "ok";
129 };
130 /*
131 * The i2c device on gsbi4 should not be enabled.
132 * On ipq806x designs gsbi4 i2c is meant for exclusive
133 * RPM usage. Turning this on in kernel manifests as
134 * i2c failure for the RPM.
135 */
136 };
137
138 gsbi5: gsbi@1a200000 {
139 qcom,mode = <GSBI_PROT_SPI>;
140 status = "ok";
141
142 spi4: spi@1a280000 {
143 status = "ok";
144 spi-max-frequency = <50000000>;
145 pinctrl-0 = <&spi_pins>;
146 pinctrl-names = "default";
147
148 cs-gpios = <&qcom_pinmux 20 0>;
149
150 flash: m25p80@0 {
151 compatible = "s25fl512s";
152 #address-cells = <1>;
153 #size-cells = <1>;
154 spi-max-frequency = <51200000>;
155 reg = <0>;
156
157 linux,part-probe = "qcom-smem";
158 };
159 };
160 };
161
162 sata-phy@1b400000 {
163 status = "ok";
164 };
165
166 sata@29000000 {
167 ports-implemented = <0x1>;
168 status = "ok";
169 };
170
171 phy@100f8800 { /* USB3 port 1 HS phy */
172 status = "ok";
173 };
174
175 phy@100f8830 { /* USB3 port 1 SS phy */
176 status = "ok";
177 };
178
179 phy@110f8800 { /* USB3 port 0 HS phy */
180 status = "ok";
181 };
182
183 phy@110f8830 { /* USB3 port 0 SS phy */
184 status = "ok";
185 };
186
187 usb30@0 {
188 status = "ok";
189 };
190
191 usb30@1 {
192 status = "ok";
193 };
194
195 pcie0: pci@1b500000 {
196 status = "ok";
197 phy-tx0-term-offset = <7>;
198 };
199
200 pcie1: pci@1b700000 {
201 status = "ok";
202 phy-tx0-term-offset = <7>;
203 };
204
205 nand@1ac00000 {
206 status = "ok";
207
208 pinctrl-0 = <&nand_pins>;
209 pinctrl-names = "default";
210
211 nand-ecc-strength = <4>;
212 nand-ecc-step-size = <512>;
213 nand-bus-width = <8>;
214
215 #address-cells = <1>;
216 #size-cells = <1>;
217
218 qcadata@0 {
219 label = "qcadata";
220 reg = <0x0000000 0x0c80000>;
221 read-only;
222 };
223
224 APPSBL@c80000 {
225 label = "APPSBL";
226 reg = <0x0c80000 0x0500000>;
227 read-only;
228 };
229
230 APPSBLENV@1180000 {
231 label = "APPSBLENV";
232 reg = <0x1180000 0x0080000>;
233 read-only;
234 };
235
236 art: art@1200000 {
237 label = "art";
238 reg = <0x1200000 0x0140000>;
239 read-only;
240 };
241
242 artbak: art@1340000 {
243 label = "artbak";
244 reg = <0x1340000 0x0140000>;
245 read-only;
246 };
247
248 kernel@1480000 {
249 label = "kernel";
250 reg = <0x1480000 0x0200000>;
251 };
252
253 ubi@1680000 {
254 label = "ubi";
255 reg = <0x1680000 0x1E00000>;
256 };
257
258 netgear@3480000 {
259 label = "netgear";
260 reg = <0x3480000 0x4480000>;
261 read-only;
262 };
263
264 reserve@7900000 {
265 label = "reserve";
266 reg = <0x7900000 0x0700000>;
267 read-only;
268 };
269
270 firmware@1480000 {
271 label = "firmware";
272 reg = <0x1480000 0x2000000>;
273 };
274
275 };
276
277 mdio0: mdio {
278 compatible = "virtual,mdio-gpio";
279 #address-cells = <1>;
280 #size-cells = <0>;
281 gpios = <&qcom_pinmux 1 0 &qcom_pinmux 0 0>;
282
283 phy0: ethernet-phy@0 {
284 device_type = "ethernet-phy";
285 reg = <0>;
286 qca,ar8327-initvals = <
287 0x00004 0x7600000 /* PAD0_MODE */
288 0x00008 0x1000000 /* PAD5_MODE */
289 0x0000c 0x80 /* PAD6_MODE */
290 0x000e4 0xaa545 /* MAC_POWER_SEL */
291 0x000e0 0xc74164de /* SGMII_CTRL */
292 0x0007c 0x4e /* PORT0_STATUS */
293 0x00094 0x4e /* PORT6_STATUS */
294 0x00970 0x1e864443 /* QM_PORT0_CTRL0 */
295 0x00974 0x000001c6 /* QM_PORT0_CTRL1 */
296 0x00978 0x19008643 /* QM_PORT1_CTRL0 */
297 0x0097c 0x000001c6 /* QM_PORT1_CTRL1 */
298 0x00980 0x19008643 /* QM_PORT2_CTRL0 */
299 0x00984 0x000001c6 /* QM_PORT2_CTRL1 */
300 0x00988 0x19008643 /* QM_PORT3_CTRL0 */
301 0x0098c 0x000001c6 /* QM_PORT3_CTRL1 */
302 0x00990 0x19008643 /* QM_PORT4_CTRL0 */
303 0x00994 0x000001c6 /* QM_PORT4_CTRL1 */
304 0x00998 0x1e864443 /* QM_PORT5_CTRL0 */
305 0x0099c 0x000001c6 /* QM_PORT5_CTRL1 */
306 0x009a0 0x1e864443 /* QM_PORT6_CTRL0 */
307 0x009a4 0x000001c6 /* QM_PORT6_CTRL1 */
308 >;
309 };
310
311 phy4: ethernet-phy@4 {
312 device_type = "ethernet-phy";
313 reg = <4>;
314 qca,ar8327-initvals = <
315 0x000e4 0x6a545 /* MAC_POWER_SEL */
316 0x0000c 0x80 /* PAD6_MODE */
317 >;
318 };
319 };
320
321 gmac1: ethernet@37200000 {
322 status = "ok";
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 mtd-mac-address = <&art 6>;
334
335 fixed-link {
336 speed = <1000>;
337 full-duplex;
338 };
339 };
340
341 gmac2: ethernet@37400000 {
342 status = "ok";
343 phy-mode = "sgmii";
344 qcom,id = <2>;
345 qcom,phy_mdio_addr = <0>; /* none */
346 qcom,poll_required = <0>; /* no polling */
347 qcom,rgmii_delay = <0>;
348 qcom,phy_mii_type = <1>;
349 qcom,emulation = <0>;
350 qcom,irq = <258>;
351 mdiobus = <&mdio0>;
352
353 mtd-mac-address = <&art 0>;
354
355 fixed-link {
356 speed = <1000>;
357 full-duplex;
358 };
359 };
360
361 rpm@108000 {
362 pinctrl-0 = <&i2c4_pins>;
363 pinctrl-names = "default";
364 };
365 };
366
367 gpio-keys {
368 compatible = "gpio-keys";
369
370 wifi {
371 label = "wifi";
372 gpios = <&qcom_pinmux 6 1>;
373 linux,code = <KEY_RFKILL>;
374 };
375
376 reset {
377 label = "reset";
378 gpios = <&qcom_pinmux 54 1>;
379 linux,code = <KEY_RESTART>;
380 };
381
382 wps {
383 label = "wps";
384 gpios = <&qcom_pinmux 65 1>;
385 linux,code = <KEY_WPS_BUTTON>;
386 };
387 };
388
389 gpio-leds {
390 compatible = "gpio-leds";
391
392 power_white: power_white {
393 label = "r7800:white:power";
394 gpios = <&qcom_pinmux 53 0>;
395 default-state = "on";
396 };
397
398 power_amber: power_amber {
399 label = "r7800:amber:power";
400 gpios = <&qcom_pinmux 9 0>;
401 };
402
403 wan_white {
404 label = "r7800:white:wan";
405 gpios = <&qcom_pinmux 22 0>;
406 };
407
408 wan_amber {
409 label = "r7800:amber:wan";
410 gpios = <&qcom_pinmux 23 0>;
411 };
412
413 usb1 {
414 label = "r7800:white:usb1";
415 gpios = <&qcom_pinmux 7 0>;
416 };
417
418 usb2 {
419 label = "r7800:white:usb2";
420 gpios = <&qcom_pinmux 8 0>;
421 };
422
423 esata {
424 label = "r7800:white:esata";
425 gpios = <&qcom_pinmux 26 0>;
426 };
427
428 rfkill {
429 label = "r7800:white:rfkill";
430 gpios = <&qcom_pinmux 64 0>;
431 };
432
433 wps {
434 label = "r7800:white:wps";
435 gpios = <&qcom_pinmux 24 0>;
436 };
437
438 wifi {
439 label = "r7800:white:wifi";
440 gpios = <&qcom_pinmux 67 0>;
441 };
442 };
443
444 gpio_export {
445 compatible = "gpio-export";
446 #size-cells = <0>;
447
448 display_data {
449 gpio-export,name = "usb0";
450 gpio-export,output = <1>;
451 gpios = <&qcom_pinmux 15 0>;
452 };
453
454 display_clock {
455 gpio-export,name = "usb1";
456 gpio-export,output = <1>;
457 gpios = <&qcom_pinmux 16 0>;
458 };
459 };
460 };
461
462 &adm_dma {
463 status = "ok";
464 };