bd50d2d0fc2f2419c079fbe3617495926336fcc1
[openwrt/staging/lynxis.git] / target / linux / ipq806x / files / arch / arm / boot / dts / qcom-ipq8064-ad7200.dts
1 //SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 #include "qcom-ipq8064-v2.0.dtsi"
3
4 #include <dt-bindings/input/input.h>
5
6 / {
7 model = "TP-Link Talon AD7200";
8 compatible = "tplink,ad7200", "qcom,ipq8064";
9
10 memory@0 {
11 reg = <0x42000000 0x1e000000>;
12 device_type = "memory";
13 };
14
15 aliases {
16 mdio-gpio0 = &mdio0;
17
18 led-boot = &led_status;
19 led-failsafe = &led_status;
20 led-running = &led_status;
21 led-upgrade = &led_status;
22 label-mac-device = &gmac2;
23 };
24
25 keys {
26 compatible = "gpio-keys";
27 pinctrl-0 = <&button_pins>;
28 pinctrl-names = "default";
29
30 wifi {
31 label = "wifi";
32 gpios = <&qcom_pinmux 54 GPIO_ACTIVE_LOW>;
33 linux,code = <KEY_RFKILL>;
34 };
35
36 reset {
37 label = "reset";
38 gpios = <&qcom_pinmux 7 GPIO_ACTIVE_LOW>;
39 linux,code = <KEY_RESTART>;
40 };
41
42 wps {
43 label = "wps";
44 gpios = <&qcom_pinmux 67 GPIO_ACTIVE_LOW>;
45 linux,code = <KEY_WPS_BUTTON>;
46 };
47
48 led_enable {
49 label = "led-enable";
50 gpios = <&qcom_pinmux 53 GPIO_ACTIVE_LOW>;
51 linux,code = <KEY_LIGHTS_TOGGLE>;
52 };
53 };
54
55 leds {
56 compatible = "gpio-leds";
57 pinctrl-0 = <&led_pins>;
58 pinctrl-names = "default";
59
60 lan {
61 label = "blue:lan";
62 gpios = <&qcom_pinmux 2 GPIO_ACTIVE_HIGH>;
63 };
64
65 usb1 {
66 label = "blue:usb1";
67 gpios = <&qcom_pinmux 8 GPIO_ACTIVE_HIGH>;
68 };
69
70 wlan5g {
71 label = "blue:wlan5g";
72 gpios = <&qcom_pinmux 15 GPIO_ACTIVE_HIGH>;
73 };
74
75 usb3 {
76 label = "blue:usb3";
77 gpios = <&qcom_pinmux 16 GPIO_ACTIVE_HIGH>;
78 };
79
80 wlan2g {
81 label = "blue:wlan2g";
82 gpios = <&qcom_pinmux 17 GPIO_ACTIVE_HIGH>;
83 };
84
85 wan_orange {
86 label = "orange:wan";
87 gpios = <&qcom_pinmux 26 GPIO_ACTIVE_LOW>;
88 };
89
90 wan_blue {
91 label = "blue:wan";
92 gpios = <&qcom_pinmux 33 GPIO_ACTIVE_LOW>;
93 };
94
95 wps {
96 label = "blue:wps";
97 gpios = <&qcom_pinmux 55 GPIO_ACTIVE_HIGH>;
98 };
99
100 wlan60g {
101 label = "blue:wlan60g";
102 gpios = <&qcom_pinmux 56 GPIO_ACTIVE_HIGH>;
103 };
104
105 led_status: status {
106 label = "blue:status";
107 gpios = <&qcom_pinmux 66 GPIO_ACTIVE_HIGH>;
108 };
109 };
110 };
111
112 &qcom_pinmux {
113 button_pins: button_pins {
114 mux {
115 pins = "gpio53", "gpio54", "gpio67";
116 function = "gpio";
117 drive-strength = <2>;
118 bias-pull-up;
119 };
120 };
121
122 led_pins: led_pins {
123 mux {
124 pins = "gpio2", "gpio8", "gpio15", "gpio16", "gpio17", "gpio26",
125 "gpio33", "gpio55", "gpio56", "gpio66";
126 function = "gpio";
127 drive-strength = <2>;
128 bias-pull-up;
129 };
130 };
131
132 spi_pins: spi_pins {
133 mux {
134 pins = "gpio18", "gpio19", "gpio21";
135 function = "gsbi5";
136 bias-pull-down;
137 };
138
139 data {
140 pins = "gpio18", "gpio19";
141 drive-strength = <10>;
142 };
143
144 cs {
145 pins = "gpio20";
146 function = "gpio";
147 drive-strength = <10>;
148 bias-pull-up;
149 };
150
151 clk {
152 pins = "gpio21";
153 drive-strength = <12>;
154 };
155 };
156
157 usb0_pwr_en_pin: usb0_pwr_en_pin {
158 mux {
159 pins = "gpio25";
160 function = "gpio";
161 drive-strength = <10>;
162 bias-pull-up;
163 output-high;
164 };
165 };
166
167 usb1_pwr_en_pin: usb1_pwr_en_pin {
168 mux {
169 pins = "gpio23";
170 function = "gpio";
171 drive-strength = <10>;
172 bias-pull-up;
173 output-high;
174 };
175 };
176 };
177
178 &gsbi5 {
179 qcom,mode = <GSBI_PROT_SPI>;
180 status = "okay";
181
182 spi@1a280000 {
183 status = "okay";
184
185 pinctrl-0 = <&spi_pins>;
186 pinctrl-names = "default";
187
188 cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
189
190 flash@0 {
191 compatible = "jedec,spi-nor";
192 #address-cells = <1>;
193 #size-cells = <1>;
194 spi-max-frequency = <50000000>;
195 reg = <0>;
196
197 partition@0 {
198 label = "SBL1";
199 reg = <0x0 0x20000>;
200 read-only;
201 };
202
203 partition@20000 {
204 label = "MIBIB";
205 reg = <0x20000 0x20000>;
206 read-only;
207 };
208
209 partition@40000 {
210 label = "SBL2";
211 reg = <0x40000 0x20000>;
212 read-only;
213 };
214
215 partition@60000 {
216 label = "SBL3";
217 reg = <0x60000 0x30000>;
218 read-only;
219 };
220
221 partition@90000 {
222 label = "DDRCONFIG";
223 reg = <0x90000 0x10000>;
224 read-only;
225 };
226
227 partition@a0000 {
228 label = "SSD";
229 reg = <0xa0000 0x10000>;
230 read-only;
231 };
232
233 partition@b0000 {
234 label = "TZ";
235 reg = <0xb0000 0x30000>;
236 read-only;
237 };
238
239 partition@e0000 {
240 label = "RPM";
241 reg = <0xe0000 0x20000>;
242 read-only;
243 };
244
245 partition@100000 {
246 label = "fs-uboot";
247 reg = <0x100000 0x70000>;
248 read-only;
249 };
250
251 partition@170000 {
252 label = "uboot-env";
253 reg = <0x170000 0x40000>;
254 read-only;
255 };
256
257 partition@1b0000 {
258 label = "radio";
259 reg = <0x1b0000 0x40000>;
260 read-only;
261 };
262
263 partition@1f0000 {
264 label = "os-image";
265 reg = <0x1f0000 0x400000>;
266 };
267
268 partition@5f0000 {
269 label = "rootfs";
270 reg = <0x5f0000 0x1900000>;
271 };
272
273 defaultmac: partition@1ef0000 {
274 label = "default-mac";
275 reg = <0x1ef0000 0x00200>;
276 read-only;
277 };
278
279 partition@1ef0200 {
280 label = "pin";
281 reg = <0x1ef0200 0x00200>;
282 read-only;
283 };
284
285 partition@1ef0400 {
286 label = "device-id";
287 reg = <0x1ef0400 0x00200>;
288 read-only;
289 };
290
291 partition@1ef0600 {
292 label = "product-info";
293 reg = <0x1ef0600 0x0fa00>;
294 read-only;
295 };
296
297 partition@1f00000 {
298 label = "partition-table";
299 reg = <0x1f00000 0x10000>;
300 read-only;
301 };
302
303 partition@1f10000 {
304 label = "soft-version";
305 reg = <0x1f10000 0x10000>;
306 read-only;
307 };
308
309 partition@1f20000 {
310 label = "support-list";
311 reg = <0x1f20000 0x10000>;
312 read-only;
313 };
314
315 partition@1f30000 {
316 label = "profile";
317 reg = <0x1f30000 0x10000>;
318 read-only;
319 };
320
321 partition@1f40000 {
322 label = "default-config";
323 reg = <0x1f40000 0x10000>;
324 read-only;
325 };
326
327 partition@1f50000 {
328 label = "user-config";
329 reg = <0x1f50000 0x40000>;
330 read-only;
331 };
332
333 partition@1f90000 {
334 label = "qos-db";
335 reg = <0x1f90000 0x40000>;
336 read-only;
337 };
338
339 partition@1fd0000 {
340 label = "usb-config";
341 reg = <0x1fd0000 0x10000>;
342 read-only;
343 };
344
345 partition@1fe0000 {
346 label = "log";
347 reg = <0x1fe0000 0x20000>;
348 read-only;
349 };
350 };
351 };
352 };
353
354 &usb3_0 {
355 status = "okay";
356
357 pinctrl-0 = <&usb0_pwr_en_pin>;
358 pinctrl-names = "default";
359 };
360
361 &usb3_1 {
362 status = "okay";
363
364 pinctrl-0 = <&usb1_pwr_en_pin>;
365 pinctrl-names = "default";
366 };
367
368 &pcie0 {
369 status = "okay";
370 };
371
372 &pcie1 {
373 status = "okay";
374 max-link-speed = <1>;
375 };
376
377 &pcie2 {
378 status = "okay";
379 max-link-speed = <1>;
380 };
381
382 &mdio0 {
383 status = "okay";
384
385 pinctrl-0 = <&mdio0_pins>;
386 pinctrl-names = "default";
387
388 phy0: ethernet-phy@0 {
389 reg = <0>;
390 qca,ar8327-initvals = <
391 0x00004 0x7600000 /* PAD0_MODE */
392 0x00008 0x1000000 /* PAD5_MODE */
393 0x0000c 0x80 /* PAD6_MODE */
394 0x000e4 0x6a545 /* MAC_POWER_SEL */
395 0x000e0 0xc74164de /* SGMII_CTRL */
396 0x0007c 0x4e /* PORT0_STATUS */
397 0x00094 0x4e /* PORT6_STATUS */
398 >;
399 };
400
401 phy4: ethernet-phy@4 {
402 reg = <4>;
403 };
404 };
405
406 &gmac1 {
407 status = "okay";
408 phy-mode = "rgmii";
409 qcom,id = <1>;
410
411 pinctrl-0 = <&rgmii2_pins>;
412 pinctrl-names = "default";
413
414 mtd-mac-address = <&defaultmac 0x8>;
415 mtd-mac-address-increment = <1>;
416
417 fixed-link {
418 speed = <1000>;
419 full-duplex;
420 };
421 };
422
423 &gmac2 {
424 status = "okay";
425 phy-mode = "sgmii";
426 qcom,id = <2>;
427
428 mtd-mac-address = <&defaultmac 0x8>;
429
430 fixed-link {
431 speed = <1000>;
432 full-duplex;
433 };
434 };
435
436 &adm_dma {
437 status = "okay";
438 };