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