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