f5ac4da1f93bb0fea70140bc5a273ef7c200f0ea
[oweals/openwrt.git] / target / linux / ipq806x / files-4.9 / 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         };
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                 };
350
351                 pcie1: pci@1b700000 {
352                         status = "ok";
353                         force_gen1 = <1>;
354                 };
355
356                 mdio0: mdio {
357                         compatible = "virtual,mdio-gpio";
358                         #address-cells = <1>;
359                         #size-cells = <0>;
360                         gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH &qcom_pinmux 0 GPIO_ACTIVE_HIGH>;
361                         pinctrl-0 = <&mdio0_pins>;
362                         pinctrl-names = "default";
363
364                         phy0: ethernet-phy@0 {
365                                 device_type = "ethernet-phy";
366                                 reg = <0>;
367                                 qca,ar8327-initvals = <
368                                         0x00004 0x7600000   /* PAD0_MODE */
369                                         0x00008 0x1000000   /* PAD5_MODE */
370                                         0x0000c 0x80        /* PAD6_MODE */
371                                         0x000e4 0x6a545     /* MAC_POWER_SEL */
372                                         0x000e0 0xc74164de  /* SGMII_CTRL */
373                                         0x0007c 0x4e        /* PORT0_STATUS */
374                                         0x00094 0x4e        /* PORT6_STATUS */
375                                         >;
376                         };
377
378                         phy4: ethernet-phy@4 {
379                                 device_type = "ethernet-phy";
380                                 reg = <4>;
381                         };
382                 };
383
384                 gmac1: ethernet@37200000 {
385                         status = "ok";
386                         phy-mode = "rgmii";
387                         qcom,id = <1>;
388
389                         pinctrl-0 = <&rgmii2_pins>;
390                         pinctrl-names = "default";
391
392                         mtd-mac-address = <&defaultmac 0x8>;
393                         mtd-mac-address-increment = <1>;
394
395                         fixed-link {
396                                 speed = <1000>;
397                                 full-duplex;
398                         };
399                 };
400
401                 gmac2: ethernet@37400000 {
402                         status = "ok";
403                         phy-mode = "sgmii";
404                         qcom,id = <2>;
405
406                         mtd-mac-address = <&defaultmac 0x8>;
407
408                         fixed-link {
409                                 speed = <1000>;
410                                 full-duplex;
411                         };
412                 };
413
414                 rpm@108000 {
415                         pinctrl-0 = <&i2c4_pins>;
416                         pinctrl-names = "default";
417                 };
418         };
419
420         gpio-keys {
421                 compatible = "gpio-keys";
422                 pinctrl-0 = <&button_pins>;
423                 pinctrl-names = "default";
424
425                 wifi {
426                         label = "wifi";
427                         gpios = <&qcom_pinmux 49 GPIO_ACTIVE_LOW>;
428                         linux,code = <KEY_RFKILL>;
429                 };
430
431                 reset {
432                         label = "reset";
433                         gpios = <&qcom_pinmux 64 GPIO_ACTIVE_LOW>;
434                         linux,code = <KEY_RESTART>;
435                 };
436
437                 wps {
438                         label = "wps";
439                         gpios = <&qcom_pinmux 65 GPIO_ACTIVE_LOW>;
440                         linux,code = <KEY_WPS_BUTTON>;
441                 };
442
443                 ledswitch {
444                         label = "ledswitch";
445                         gpios = <&qcom_pinmux 16 GPIO_ACTIVE_LOW>;
446                         linux,code = <KEY_LIGHTS_TOGGLE>;
447                 };
448         };
449
450         gpio-leds {
451                 compatible = "gpio-leds";
452                 pinctrl-0 = <&led_pins>;
453                 pinctrl-names = "default";
454
455                 lan {
456                         label = "c2600:white:lan";
457                         gpios = <&qcom_pinmux 6 GPIO_ACTIVE_HIGH>;
458                 };
459
460                 usb4 {
461                         label = "c2600:white:usb_4";
462                         gpios = <&qcom_pinmux 7 GPIO_ACTIVE_HIGH>;
463                 };
464
465                 usb2 {
466                         label = "c2600:white:usb_2";
467                         gpios = <&qcom_pinmux 8 GPIO_ACTIVE_HIGH>;
468                 };
469
470                 wps {
471                         label = "c2600:white:wps";
472                         gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
473                 };
474
475                 wan_amber {
476                         label = "c2600:amber:wan";
477                         gpios = <&qcom_pinmux 26 GPIO_ACTIVE_LOW>;
478                 };
479
480                 wan_white {
481                         label = "c2600:white:wan";
482                         gpios = <&qcom_pinmux 33 GPIO_ACTIVE_LOW>;
483                 };
484
485                 power: power {
486                         label = "c2600:white:power";
487                         gpios = <&qcom_pinmux 53 GPIO_ACTIVE_HIGH>;
488                         default-state = "keep";
489                 };
490
491                 general: general {
492                         label = "c2600:white:general";
493                         gpios = <&qcom_pinmux 66 GPIO_ACTIVE_HIGH>;
494                 };
495         };
496 };
497
498 &adm_dma {
499         status = "ok";
500 };