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