ipq806x: fixes for R7800 and C2600
[openwrt/staging/zorun.git] / target / linux / ipq806x / files / arch / arm / boot / dts / qcom-ipq8064-c2600.dts
1 #include "qcom-ipq8064-v1.0.dtsi"
2 #include <dt-bindings/input/input.h>
3
4 / {
5 model = "TP-Link Archer C2600";
6 compatible = "tplink,c2600", "qcom,ipq8064";
7
8 memory@0 {
9 reg = <0x42000000 0x1e000000>;
10 device_type = "memory";
11 };
12
13 reserved-memory {
14 #address-cells = <1>;
15 #size-cells = <1>;
16 ranges;
17 rsvd@41200000 {
18 reg = <0x41200000 0x300000>;
19 no-map;
20 };
21 };
22
23 aliases {
24 serial0 = &uart4;
25 mdio-gpio0 = &mdio0;
26
27 led-boot = &power;
28 led-failsafe = &ledgnr;
29 led-running = &power;
30 led-upgrade = &ledgnr;
31 };
32
33 chosen {
34 linux,stdout-path = "serial0:115200n8";
35 };
36
37 soc {
38 pinmux@800000 {
39 i2c4_pins: i2c4_pinmux {
40 pins = "gpio12", "gpio13";
41 function = "gsbi4";
42 bias-disable;
43 };
44
45 spi_pins: spi_pins {
46 mux {
47 pins = "gpio18", "gpio19", "gpio21";
48 function = "gsbi5";
49 bias-pull-down;
50 };
51
52 data {
53 pins = "gpio18", "gpio19";
54 drive-strength = <10>;
55 };
56
57 cs {
58 pins = "gpio20";
59 drive-strength = <10>;
60 bias-pull-up;
61 };
62
63 clk {
64 pins = "gpio21";
65 drive-strength = <12>;
66 };
67 };
68
69 nand_pins: nand_pins {
70 mux {
71 pins = "gpio34", "gpio35", "gpio36",
72 "gpio37", "gpio38", "gpio39",
73 "gpio40", "gpio41", "gpio42",
74 "gpio43", "gpio44", "gpio45",
75 "gpio46", "gpio47";
76 function = "nand";
77 drive-strength = <10>;
78 bias-disable;
79 };
80
81 pullups {
82 pins = "gpio39";
83 bias-pull-up;
84 };
85
86 hold {
87 pins = "gpio40", "gpio41", "gpio42",
88 "gpio43", "gpio44", "gpio45",
89 "gpio46", "gpio47";
90 bias-bus-hold;
91 };
92 };
93
94 mdio0_pins: mdio0_pins {
95 mux {
96 pins = "gpio0", "gpio1";
97 function = "gpio";
98 drive-strength = <8>;
99 bias-disable;
100 };
101 };
102
103 rgmii2_pins: rgmii2_pins {
104 mux {
105 pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32",
106 "gpio51", "gpio52", "gpio59", "gpio60", "gpio61", "gpio62" ;
107 function = "rgmii2";
108 drive-strength = <8>;
109 bias-disable;
110 };
111 };
112 };
113
114 gsbi@16300000 {
115 qcom,mode = <GSBI_PROT_I2C_UART>;
116 status = "ok";
117 serial@16340000 {
118 status = "ok";
119 };
120 /*
121 * The i2c device on gsbi4 should not be enabled.
122 * On ipq806x designs gsbi4 i2c is meant for exclusive
123 * RPM usage. Turning this on in kernel manifests as
124 * i2c failure for the RPM.
125 */
126 };
127
128 gsbi5: gsbi@1a200000 {
129 qcom,mode = <GSBI_PROT_SPI>;
130 status = "ok";
131
132 spi5: spi@1a280000 {
133 status = "ok";
134 spi-max-frequency = <50000000>;
135
136 pinctrl-0 = <&spi_pins>;
137 pinctrl-names = "default";
138
139 cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
140
141 flash: m25p80@0 {
142 compatible = "jedec,spi-nor";
143 #address-cells = <1>;
144 #size-cells = <1>;
145 spi-max-frequency = <50000000>;
146 reg = <0>;
147
148 SBL1@0 {
149 label = "SBL1";
150 reg = <0x0 0x20000>;
151 read-only;
152 };
153
154 MIBIB@20000 {
155 label = "MIBIB";
156 reg = <0x20000 0x20000>;
157 read-only;
158 };
159
160 SBL2@40000 {
161 label = "SBL2";
162 reg = <0x40000 0x20000>;
163 read-only;
164 };
165
166 SBL3@60000 {
167 label = "SBL3";
168 reg = <0x60000 0x30000>;
169 read-only;
170 };
171
172 DDRCONFIG@90000 {
173 label = "DDRCONFIG";
174 reg = <0x90000 0x10000>;
175 read-only;
176 };
177
178 SSD@a0000 {
179 label = "SSD";
180 reg = <0xa0000 0x10000>;
181 read-only;
182 };
183
184 TZ@b0000 {
185 label = "TZ";
186 reg = <0xb0000 0x30000>;
187 read-only;
188 };
189
190 RPM@e0000 {
191 label = "RPM";
192 reg = <0xe0000 0x20000>;
193 read-only;
194 };
195
196 fs-uboot@100000 {
197 label = "fs-uboot";
198 reg = <0x100000 0x70000>;
199 read-only;
200 };
201
202 uboot-env@170000 {
203 label = "uboot-env";
204 reg = <0x170000 0x40000>;
205 read-only;
206 };
207
208 radio@1b0000 {
209 label = "radio";
210 reg = <0x1b0000 0x40000>;
211 read-only;
212 };
213
214 os-image@1f0000 {
215 label = "os-image";
216 reg = <0x1f0000 0x200000>;
217 };
218
219 rootfs@3f0000 {
220 label = "rootfs";
221 reg = <0x3f0000 0x1b00000>;
222 };
223
224 defaultmac: default-mac@1ef0000 {
225 label = "default-mac";
226 reg = <0x1ef0000 0x00200>;
227 read-only;
228 };
229
230 pin@1ef0200 {
231 label = "pin";
232 reg = <0x1ef0200 0x00200>;
233 read-only;
234 };
235
236 product-info@1ef0400 {
237 label = "product-info";
238 reg = <0x1ef0400 0x0fc00>;
239 read-only;
240 };
241
242 partition-table@1f00000 {
243 label = "partition-table";
244 reg = <0x1f00000 0x10000>;
245 read-only;
246 };
247
248 soft-version@1f10000 {
249 label = "soft-version";
250 reg = <0x1f10000 0x10000>;
251 read-only;
252 };
253
254 support-list@1f20000 {
255 label = "support-list";
256 reg = <0x1f20000 0x10000>;
257 read-only;
258 };
259
260 profile@1f30000 {
261 label = "profile";
262 reg = <0x1f30000 0x10000>;
263 read-only;
264 };
265
266 default-config@1f40000 {
267 label = "default-config";
268 reg = <0x1f40000 0x10000>;
269 read-only;
270 };
271
272 user-config@1f50000 {
273 label = "user-config";
274 reg = <0x1f50000 0x40000>;
275 read-only;
276 };
277
278 qos-db@1f90000 {
279 label = "qos-db";
280 reg = <0x1f90000 0x40000>;
281 read-only;
282 };
283
284 usb-config@1fd0000 {
285 label = "usb-config";
286 reg = <0x1fd0000 0x10000>;
287 read-only;
288 };
289
290 log@1fe0000 {
291 label = "log";
292 reg = <0x1fe0000 0x20000>;
293 read-only;
294 };
295 };
296 };
297 };
298
299 phy@100f8800 { /* USB3 port 1 HS phy */
300 status = "ok";
301 };
302
303 phy@100f8830 { /* USB3 port 1 SS phy */
304 status = "ok";
305 };
306
307 phy@110f8800 { /* USB3 port 0 HS phy */
308 status = "ok";
309 };
310
311 phy@110f8830 { /* USB3 port 0 SS phy */
312 status = "ok";
313 };
314
315 usb30@0 {
316 status = "ok";
317 };
318
319 usb30@1 {
320 status = "ok";
321 };
322
323 pcie0: pci@1b500000 {
324 status = "ok";
325 phy-tx0-term-offset = <7>;
326 };
327
328 pcie1: pci@1b700000 {
329 status = "ok";
330 phy-tx0-term-offset = <7>;
331 };
332
333 mdio0: mdio {
334 compatible = "virtual,mdio-gpio";
335 #address-cells = <1>;
336 #size-cells = <0>;
337 gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH &qcom_pinmux 0 GPIO_ACTIVE_HIGH>;
338 pinctrl-0 = <&mdio0_pins>;
339 pinctrl-names = "default";
340
341 phy0: ethernet-phy@0 {
342 device_type = "ethernet-phy";
343 reg = <0>;
344 qca,ar8327-initvals = <
345 0x00004 0x7600000 /* PAD0_MODE */
346 0x00008 0x1000000 /* PAD5_MODE */
347 0x0000c 0x80 /* PAD6_MODE */
348 0x000e4 0x6a545 /* MAC_POWER_SEL */
349 0x000e0 0xc74164de /* SGMII_CTRL */
350 0x0007c 0x4e /* PORT0_STATUS */
351 0x00094 0x4e /* PORT6_STATUS */
352 >;
353 };
354
355 phy4: ethernet-phy@4 {
356 device_type = "ethernet-phy";
357 reg = <4>;
358 };
359 };
360
361 gmac1: ethernet@37200000 {
362 status = "ok";
363 phy-mode = "rgmii";
364 qcom,id = <1>;
365
366 pinctrl-0 = <&rgmii2_pins>;
367 pinctrl-names = "default";
368
369 mtd-mac-address = <&defaultmac 0x8>;
370 mtd-mac-address-increment = <1>;
371
372 fixed-link {
373 speed = <1000>;
374 full-duplex;
375 };
376 };
377
378 gmac2: ethernet@37400000 {
379 status = "ok";
380 phy-mode = "sgmii";
381 qcom,id = <2>;
382
383 mtd-mac-address = <&defaultmac 0x8>;
384
385 fixed-link {
386 speed = <1000>;
387 full-duplex;
388 };
389 };
390 };
391
392 gpio-keys {
393 compatible = "gpio-keys";
394
395 wifi {
396 label = "wifi";
397 gpios = <&qcom_pinmux 49 GPIO_ACTIVE_LOW>;
398 linux,code = <KEY_RFKILL>;
399 };
400
401 reset {
402 label = "reset";
403 gpios = <&qcom_pinmux 64 GPIO_ACTIVE_LOW>;
404 linux,code = <KEY_RESTART>;
405 };
406
407 wps {
408 label = "wps";
409 gpios = <&qcom_pinmux 65 GPIO_ACTIVE_LOW>;
410 linux,code = <KEY_WPS_BUTTON>;
411 };
412
413 ledgeneral {
414 label = "ledgeneral";
415 gpios = <&qcom_pinmux 16 GPIO_ACTIVE_LOW>;
416 linux,code = <KEY_DOLLAR>;
417 };
418 };
419
420 gpio-leds {
421 compatible = "gpio-leds";
422
423 lan {
424 label = "c2600:white:lan";
425 gpios = <&qcom_pinmux 6 GPIO_ACTIVE_HIGH>;
426 };
427
428 usb4 {
429 label = "c2600:white:usb_4";
430 gpios = <&qcom_pinmux 7 GPIO_ACTIVE_HIGH>;
431 };
432
433 usb2 {
434 label = "c2600:white:usb_2";
435 gpios = <&qcom_pinmux 8 GPIO_ACTIVE_HIGH>;
436 };
437
438 wps {
439 label = "c2600:white:wps";
440 gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
441 };
442
443 wan_red {
444 label = "c2600:red:wan";
445 gpios = <&qcom_pinmux 26 GPIO_ACTIVE_LOW>;
446 };
447
448 wan_blue {
449 label = "c2600:white:wan";
450 gpios = <&qcom_pinmux 33 GPIO_ACTIVE_LOW>;
451 };
452
453 power: status {
454 label = "c2600:white:status";
455 gpios = <&qcom_pinmux 53 GPIO_ACTIVE_HIGH>;
456 };
457
458 ledgnr: ledgnr {
459 label = "c2600:white:ledgnr";
460 gpios = <&qcom_pinmux 66 GPIO_ACTIVE_HIGH>;
461 };
462 };
463
464 gpio_export {
465 compatible = "gpio-export";
466 #size-cells = <0>;
467
468 usb1_power {
469 gpio-export,name = "usb1_power";
470 gpio-export,output = <1>;
471 gpios = <&qcom_pinmux 25 GPIO_ACTIVE_HIGH>;
472 };
473 usb2_power {
474 gpio-export,name = "usb2_power";
475 gpio-export,output = <1>;
476 gpios = <&qcom_pinmux 23 GPIO_ACTIVE_HIGH>;
477 };
478 };
479 };
480
481 &adm_dma {
482 status = "ok";
483 };