ipq806x: add support for indicating the boot and upgrade state using four leds
[openwrt/staging/chunkeey.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 0>;
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 MIBIB@20000 {
139 label = "MIBIB";
140 reg = <0x20000 0x20000>;
141 read-only;
142 };
143 SBL2@40000 {
144 label = "SBL2";
145 reg = <0x40000 0x20000>;
146 read-only;
147 };
148 SBL3@60000 {
149 label = "SBL3";
150 reg = <0x60000 0x30000>;
151 read-only;
152 };
153 DDRCONFIG@90000 {
154 label = "DDRCONFIG";
155 reg = <0x90000 0x10000>;
156 read-only;
157 };
158 SSD@a0000 {
159 label = "SSD";
160 reg = <0xa0000 0x10000>;
161 read-only;
162 };
163 TZ@b0000 {
164 label = "TZ";
165 reg = <0xb0000 0x30000>;
166 read-only;
167 };
168 RPM@e0000 {
169 label = "RPM";
170 reg = <0xe0000 0x20000>;
171 read-only;
172 };
173 fs-uboot@100000 {
174 label = "fs-uboot";
175 reg = <0x100000 0x70000>;
176 read-only;
177 };
178 uboot-env@170000 {
179 label = "uboot-env";
180 reg = <0x170000 0x40000>;
181 read-only;
182 };
183 radio@1b0000 {
184 label = "radio";
185 reg = <0x1b0000 0x40000>;
186 read-only;
187 };
188 os-image@1f0000 {
189 label = "os-image";
190 reg = <0x1f0000 0x200000>;
191 };
192 rootfs@3f0000 {
193 label = "rootfs";
194 reg = <0x3f0000 0x1b00000>;
195 };
196 defaultmac: default-mac@1ef0000 {
197 label = "default-mac";
198 reg = <0x1ef0000 0x00200>;
199 read-only;
200 };
201 pin@1ef0200 {
202 label = "pin";
203 reg = <0x1ef0200 0x00200>;
204 read-only;
205 };
206 product-info@1ef0400 {
207 label = "product-info";
208 reg = <0x1ef0400 0x0fc00>;
209 read-only;
210 };
211 partition-table@1f00000 {
212 label = "partition-table";
213 reg = <0x1f00000 0x10000>;
214 read-only;
215 };
216 soft-version@1f10000 {
217 label = "soft-version";
218 reg = <0x1f10000 0x10000>;
219 read-only;
220 };
221 support-list@1f20000 {
222 label = "support-list";
223 reg = <0x1f20000 0x10000>;
224 read-only;
225 };
226 profile@1f30000 {
227 label = "profile";
228 reg = <0x1f30000 0x10000>;
229 read-only;
230 };
231 default-config@1f40000 {
232 label = "default-config";
233 reg = <0x1f40000 0x10000>;
234 read-only;
235 };
236 user-config@1f50000 {
237 label = "user-config";
238 reg = <0x1f50000 0x40000>;
239 read-only;
240 };
241 qos-db@1f90000 {
242 label = "qos-db";
243 reg = <0x1f90000 0x40000>;
244 read-only;
245 };
246 usb-config@1fd0000 {
247 label = "usb-config";
248 reg = <0x1fd0000 0x10000>;
249 read-only;
250 };
251 log@1fe0000 {
252 label = "log";
253 reg = <0x1fe0000 0x20000>;
254 read-only;
255 };
256 };
257 };
258 };
259
260 phy@100f8800 { /* USB3 port 1 HS phy */
261 status = "ok";
262 };
263
264 phy@100f8830 { /* USB3 port 1 SS phy */
265 status = "ok";
266 };
267
268 phy@110f8800 { /* USB3 port 0 HS phy */
269 status = "ok";
270 };
271
272 phy@110f8830 { /* USB3 port 0 SS phy */
273 status = "ok";
274 };
275
276 usb30@0 {
277 status = "ok";
278 };
279
280 usb30@1 {
281 status = "ok";
282 };
283
284 pcie0: pci@1b500000 {
285 status = "ok";
286 phy-tx0-term-offset = <7>;
287 };
288
289 pcie1: pci@1b700000 {
290 status = "ok";
291 phy-tx0-term-offset = <7>;
292 };
293
294 mdio0: mdio {
295 compatible = "virtual,mdio-gpio";
296 #address-cells = <1>;
297 #size-cells = <0>;
298 gpios = <&qcom_pinmux 1 0 &qcom_pinmux 0 0>;
299 pinctrl-0 = <&mdio0_pins>;
300 pinctrl-names = "default";
301
302 phy0: ethernet-phy@0 {
303 device_type = "ethernet-phy";
304 reg = <0>;
305 qca,ar8327-initvals = <
306 0x00004 0x7600000 /* PAD0_MODE */
307 0x00008 0x1000000 /* PAD5_MODE */
308 0x0000c 0x80 /* PAD6_MODE */
309 0x000e4 0x6a545 /* MAC_POWER_SEL */
310 0x000e0 0xc74164de /* SGMII_CTRL */
311 0x0007c 0x4e /* PORT0_STATUS */
312 0x00094 0x4e /* PORT6_STATUS */
313 >;
314 };
315
316 phy4: ethernet-phy@4 {
317 device_type = "ethernet-phy";
318 reg = <4>;
319 };
320 };
321
322 gmac1: ethernet@37200000 {
323 status = "ok";
324 phy-mode = "rgmii";
325 qcom,id = <1>;
326
327 pinctrl-0 = <&rgmii2_pins>;
328 pinctrl-names = "default";
329
330 mtd-mac-address = <&defaultmac 0x8>;
331 mtd-mac-address-increment = <1>;
332
333 fixed-link {
334 speed = <1000>;
335 full-duplex;
336 };
337 };
338
339 gmac2: ethernet@37400000 {
340 status = "ok";
341 phy-mode = "sgmii";
342 qcom,id = <2>;
343
344 mtd-mac-address = <&defaultmac 0x8>;
345
346 fixed-link {
347 speed = <1000>;
348 full-duplex;
349 };
350 };
351 };
352
353 gpio-keys {
354 compatible = "gpio-keys";
355
356 wifi {
357 label = "wifi";
358 gpios = <&qcom_pinmux 49 1>;
359 linux,code = <KEY_WLAN>;
360 };
361
362 reset {
363 label = "reset";
364 gpios = <&qcom_pinmux 64 1>;
365 linux,code = <KEY_RESTART>;
366 };
367
368 wps {
369 label = "wps";
370 gpios = <&qcom_pinmux 65 1>;
371 linux,code = <KEY_WPS_BUTTON>;
372 };
373 ledgeneral {
374 label = "ledgeneral";
375 gpios = <&qcom_pinmux 16 1>;
376 linux,code = <KEY_DOLLAR>;
377 };
378 };
379
380 gpio-leds {
381 compatible = "gpio-leds";
382
383 lan {
384 label = "c2600:blue:lan";
385 gpios = <&qcom_pinmux 6 0>;
386 };
387 usb4 {
388 label = "c2600:blue:usb_4";
389 gpios = <&qcom_pinmux 7 0>;
390 };
391 usb2 {
392 label = "c2600:blue:usb_2";
393 gpios = <&qcom_pinmux 8 0>;
394 };
395 wps {
396 label = "c2600:blue:wps";
397 gpios = <&qcom_pinmux 9 0>;
398 };
399 wan_blue {
400 label = "c2600:blue:wan";
401 gpios = <&qcom_pinmux 33 1>;
402 };
403 power: status {
404 label = "c2600:blue:status";
405 gpios = <&qcom_pinmux 53 0>;
406 default-state = "on";
407 };
408 ledgnr: ledgnr {
409 label = "c2600:blue:ledgnr";
410 gpios = <&qcom_pinmux 66 0>;
411 };
412 };
413 };
414
415 &adm_dma {
416 status = "ok";
417 };