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