ipq806x: move common pinmux nodes to SoC DTSI
[openwrt/staging/chunkeey.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 led_pins: led_pins {
128 mux {
129 pins = "gpio6", "gpio7", "gpio8", "gpio9", "gpio26", "gpio33",
130 "gpio53", "gpio66";
131 function = "gpio";
132 drive-strength = <2>;
133 bias-pull-up;
134 };
135 };
136
137 spi_pins: spi_pins {
138 mux {
139 pins = "gpio18", "gpio19", "gpio21";
140 function = "gsbi5";
141 bias-pull-down;
142 };
143
144 data {
145 pins = "gpio18", "gpio19";
146 drive-strength = <10>;
147 };
148
149 cs {
150 pins = "gpio20";
151 function = "gpio";
152 drive-strength = <10>;
153 bias-pull-up;
154 };
155
156 clk {
157 pins = "gpio21";
158 drive-strength = <12>;
159 };
160 };
161
162 usb0_pwr_en_pin: usb0_pwr_en_pin {
163 mux {
164 pins = "gpio25";
165 function = "gpio";
166 drive-strength = <10>;
167 bias-pull-up;
168 output-high;
169 };
170 };
171
172 usb1_pwr_en_pin: usb1_pwr_en_pin {
173 mux {
174 pins = "gpio23";
175 function = "gpio";
176 drive-strength = <10>;
177 bias-pull-up;
178 output-high;
179 };
180 };
181 };
182
183 &gsbi4 {
184 qcom,mode = <GSBI_PROT_I2C_UART>;
185 status = "okay";
186 serial@16340000 {
187 status = "okay";
188 };
189 /*
190 * The i2c device on gsbi4 should not be enabled.
191 * On ipq806x designs gsbi4 i2c is meant for exclusive
192 * RPM usage. Turning this on in kernel manifests as
193 * i2c failure for the RPM.
194 */
195 };
196
197 &gsbi5 {
198 qcom,mode = <GSBI_PROT_SPI>;
199 status = "okay";
200
201 spi5: spi@1a280000 {
202 status = "okay";
203
204 pinctrl-0 = <&spi_pins>;
205 pinctrl-names = "default";
206
207 cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
208
209 m25p80@0 {
210 compatible = "jedec,spi-nor";
211 #address-cells = <1>;
212 #size-cells = <1>;
213 spi-max-frequency = <50000000>;
214 reg = <0>;
215
216 SBL1@0 {
217 label = "SBL1";
218 reg = <0x0 0x20000>;
219 read-only;
220 };
221
222 MIBIB@20000 {
223 label = "MIBIB";
224 reg = <0x20000 0x20000>;
225 read-only;
226 };
227
228 SBL2@40000 {
229 label = "SBL2";
230 reg = <0x40000 0x20000>;
231 read-only;
232 };
233
234 SBL3@60000 {
235 label = "SBL3";
236 reg = <0x60000 0x30000>;
237 read-only;
238 };
239
240 DDRCONFIG@90000 {
241 label = "DDRCONFIG";
242 reg = <0x90000 0x10000>;
243 read-only;
244 };
245
246 SSD@a0000 {
247 label = "SSD";
248 reg = <0xa0000 0x10000>;
249 read-only;
250 };
251
252 TZ@b0000 {
253 label = "TZ";
254 reg = <0xb0000 0x30000>;
255 read-only;
256 };
257
258 RPM@e0000 {
259 label = "RPM";
260 reg = <0xe0000 0x20000>;
261 read-only;
262 };
263
264 fs-uboot@100000 {
265 label = "fs-uboot";
266 reg = <0x100000 0x70000>;
267 read-only;
268 };
269
270 uboot-env@170000 {
271 label = "uboot-env";
272 reg = <0x170000 0x40000>;
273 read-only;
274 };
275
276 radio@1b0000 {
277 label = "radio";
278 reg = <0x1b0000 0x40000>;
279 read-only;
280 };
281
282 os-image@1f0000 {
283 label = "os-image";
284 reg = <0x1f0000 0x400000>;
285 };
286
287 rootfs@5f0000 {
288 label = "rootfs";
289 reg = <0x5f0000 0x1900000>;
290 };
291
292 defaultmac: default-mac@1ef0000 {
293 label = "default-mac";
294 reg = <0x1ef0000 0x00200>;
295 read-only;
296 };
297
298 pin@1ef0200 {
299 label = "pin";
300 reg = <0x1ef0200 0x00200>;
301 read-only;
302 };
303
304 product-info@1ef0400 {
305 label = "product-info";
306 reg = <0x1ef0400 0x0fc00>;
307 read-only;
308 };
309
310 partition-table@1f00000 {
311 label = "partition-table";
312 reg = <0x1f00000 0x10000>;
313 read-only;
314 };
315
316 soft-version@1f10000 {
317 label = "soft-version";
318 reg = <0x1f10000 0x10000>;
319 read-only;
320 };
321
322 support-list@1f20000 {
323 label = "support-list";
324 reg = <0x1f20000 0x10000>;
325 read-only;
326 };
327
328 profile@1f30000 {
329 label = "profile";
330 reg = <0x1f30000 0x10000>;
331 read-only;
332 };
333
334 default-config@1f40000 {
335 label = "default-config";
336 reg = <0x1f40000 0x10000>;
337 read-only;
338 };
339
340 user-config@1f50000 {
341 label = "user-config";
342 reg = <0x1f50000 0x40000>;
343 read-only;
344 };
345
346 qos-db@1f90000 {
347 label = "qos-db";
348 reg = <0x1f90000 0x40000>;
349 read-only;
350 };
351
352 usb-config@1fd0000 {
353 label = "usb-config";
354 reg = <0x1fd0000 0x10000>;
355 read-only;
356 };
357
358 log@1fe0000 {
359 label = "log";
360 reg = <0x1fe0000 0x20000>;
361 read-only;
362 };
363 };
364 };
365 };
366
367 &usb3_0 {
368 status = "okay";
369
370 pinctrl-0 = <&usb0_pwr_en_pin>;
371 pinctrl-names = "default";
372 };
373
374 &usb3_1 {
375 status = "okay";
376
377 pinctrl-0 = <&usb1_pwr_en_pin>;
378 pinctrl-names = "default";
379 };
380
381 &pcie0 {
382 status = "okay";
383 };
384
385 &pcie1 {
386 status = "okay";
387 force_gen1 = <1>;
388 };
389
390 &mdio0 {
391 status = "okay";
392
393 pinctrl-0 = <&mdio0_pins>;
394 pinctrl-names = "default";
395
396 phy0: ethernet-phy@0 {
397 reg = <0>;
398 qca,ar8327-initvals = <
399 0x00004 0x7600000 /* PAD0_MODE */
400 0x00008 0x1000000 /* PAD5_MODE */
401 0x0000c 0x80 /* PAD6_MODE */
402 0x000e4 0x6a545 /* MAC_POWER_SEL */
403 0x000e0 0xc74164de /* SGMII_CTRL */
404 0x0007c 0x4e /* PORT0_STATUS */
405 0x00094 0x4e /* PORT6_STATUS */
406 >;
407 };
408
409 phy4: ethernet-phy@4 {
410 reg = <4>;
411 };
412 };
413
414 &gmac1 {
415 status = "okay";
416 phy-mode = "rgmii";
417 qcom,id = <1>;
418
419 pinctrl-0 = <&rgmii2_pins>;
420 pinctrl-names = "default";
421
422 mtd-mac-address = <&defaultmac 0x8>;
423 mtd-mac-address-increment = <1>;
424
425 fixed-link {
426 speed = <1000>;
427 full-duplex;
428 };
429 };
430
431 &gmac2 {
432 status = "okay";
433 phy-mode = "sgmii";
434 qcom,id = <2>;
435
436 mtd-mac-address = <&defaultmac 0x8>;
437
438 fixed-link {
439 speed = <1000>;
440 full-duplex;
441 };
442 };
443
444 &adm_dma {
445 status = "okay";
446 };