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