ipq806x: ubnt,unifi-ac-hd: reorder eth0 and eth1
[openwrt/openwrt.git] / target / linux / ipq806x / files / arch / arm / boot / dts / qcom-ipq8064-wpq864.dts
1 // SPDX-License-Identifier: BSD-3-Clause
2 /*
3 * Copyright (C) 2017 Christian Mehlis <christian@m3hlis.de>
4 * Copyright (C) 2018 Mathias Kresin <dev@kresin.me>
5 * All rights reserved.
6 */
7
8 #include "qcom-ipq8064-v1.0.dtsi"
9
10 #include <dt-bindings/input/input.h>
11 #include <dt-bindings/soc/qcom,tcsr.h>
12
13 / {
14 compatible = "compex,wpq864", "qcom,ipq8064";
15 model = "Compex WPQ864";
16
17 aliases {
18 mdio-gpio0 = &mdio0;
19 ethernet0 = &gmac1;
20 ethernet1 = &gmac0;
21
22 led-boot = &led_pass;
23 led-failsafe = &led_fail;
24 led-running = &led_pass;
25 led-upgrade = &led_pass;
26 };
27
28 leds {
29 compatible = "gpio-leds";
30
31 pinctrl-0 = <&led_pins>;
32 pinctrl-names = "default";
33
34 rss4 {
35 label = "green:rss4";
36 gpios = <&qcom_pinmux 23 GPIO_ACTIVE_HIGH>;
37 };
38
39 rss3 {
40 label = "green:rss3";
41 gpios = <&qcom_pinmux 24 GPIO_ACTIVE_HIGH>;
42 default-state = "keep";
43 };
44
45 rss2 {
46 label = "orange:rss2";
47 gpios = <&qcom_pinmux 25 GPIO_ACTIVE_HIGH>;
48 };
49
50 rss1 {
51 label = "red:rss1";
52 gpios = <&qcom_pinmux 22 GPIO_ACTIVE_HIGH>;
53 };
54
55 led_pass: pass {
56 label = "green:pass";
57 gpios = <&qcom_pinmux 53 GPIO_ACTIVE_HIGH>;
58 };
59
60 led_fail: fail {
61 label = "green:fail";
62 gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
63 };
64
65 usb {
66 label = "green:usb";
67 gpios = <&qcom_pinmux 7 GPIO_ACTIVE_HIGH>;
68 };
69
70 usb-pcie {
71 label = "green:usb-pcie";
72 gpios = <&qcom_pinmux 8 GPIO_ACTIVE_HIGH>;
73 };
74 };
75
76 keys {
77 compatible = "gpio-keys";
78
79 pinctrl-0 = <&button_pins>;
80 pinctrl-names = "default";
81
82 reset {
83 label = "reset";
84 gpios = <&qcom_pinmux 54 GPIO_ACTIVE_LOW>;
85 linux,code = <KEY_RESTART>;
86 };
87 };
88
89 beeper {
90 compatible = "gpio-beeper";
91
92 pinctrl-0 = <&beeper_pins>;
93 pinctrl-names = "default";
94
95 gpios = <&qcom_pinmux 55 GPIO_ACTIVE_HIGH>;
96 };
97 };
98
99 &rpm {
100 pinctrl-0 = <&rpm_pins>;
101 pinctrl-names = "default";
102 };
103
104 &nand_controller {
105 status = "okay";
106
107 pinctrl-0 = <&nand_pins>;
108 pinctrl-names = "default";
109
110 mt29f2g08abbeah4@0 {
111 compatible = "qcom,nandcs";
112
113 reg = <0>;
114
115 nand-ecc-strength = <4>;
116 nand-bus-width = <8>;
117 nand-ecc-step-size = <512>;
118
119 partitions {
120 compatible = "fixed-partitions";
121 #address-cells = <1>;
122 #size-cells = <1>;
123
124 SBL1@0 {
125 label = "SBL1";
126 reg = <0x0000000 0x0040000>;
127 read-only;
128 };
129
130 MIBIB@40000 {
131 label = "MIBIB";
132 reg = <0x0040000 0x0140000>;
133 read-only;
134 };
135
136 SBL2@180000 {
137 label = "SBL2";
138 reg = <0x0180000 0x0140000>;
139 read-only;
140 };
141
142 SBL3@2c0000 {
143 label = "SBL3";
144 reg = <0x02c0000 0x0280000>;
145 read-only;
146 };
147
148 DDRCONFIG@540000 {
149 label = "DDRCONFIG";
150 reg = <0x0540000 0x0120000>;
151 read-only;
152 };
153
154 SSD@660000 {
155 label = "SSD";
156 reg = <0x0660000 0x0120000>;
157 read-only;
158 };
159
160 TZ@780000 {
161 label = "TZ";
162 reg = <0x0780000 0x0280000>;
163 read-only;
164 };
165
166 RPM@a00000 {
167 label = "RPM";
168 reg = <0x0a00000 0x0280000>;
169 read-only;
170 };
171
172 APPSBL@c80000 {
173 label = "APPSBL";
174 reg = <0x0c80000 0x0500000>;
175 read-only;
176 };
177
178 APPSBLENV@1180000 {
179 label = "APPSBLENV";
180 reg = <0x1180000 0x0080000>;
181 };
182
183 ART@1200000 {
184 label = "ART";
185 reg = <0x1200000 0x0140000>;
186 };
187
188 ubi@1340000 {
189 label = "ubi";
190 reg = <0x1340000 0x4000000>;
191 };
192
193 BOOTCONFIG@5340000 {
194 label = "BOOTCONFIG";
195 reg = <0x5340000 0x0060000>;
196 };
197
198 SBL2-1@53a0000- {
199 label = "SBL2_1";
200 reg = <0x53a0000 0x0140000>;
201 read-only;
202 };
203
204 SBL3-1@54e0000 {
205 label = "SBL3_1";
206 reg = <0x54e0000 0x0280000>;
207 read-only;
208 };
209
210 DDRCONFIG-1@5760000 {
211 label = "DDRCONFIG_1";
212 reg = <0x5760000 0x0120000>;
213 read-only;
214 };
215
216 SSD-1@5880000 {
217 label = "SSD_1";
218 reg = <0x5880000 0x0120000>;
219 read-only;
220 };
221
222 TZ-1@59a0000 {
223 label = "TZ_1";
224 reg = <0x59a0000 0x0280000>;
225 read-only;
226 };
227
228 RPM-1@5c20000 {
229 label = "RPM_1";
230 reg = <0x5c20000 0x0280000>;
231 read-only;
232 };
233
234 BOOTCONFIG1@5ea0000 {
235 label = "BOOTCONFIG1";
236 reg = <0x5ea0000 0x0060000>;
237 };
238
239 APPSBL-1@5f00000 {
240 label = "APPSBL_1";
241 reg = <0x5f00000 0x0500000>;
242 read-only;
243 };
244
245 ubi-1@6400000 {
246 label = "ubi_1";
247 reg = <0x6400000 0x4000000>;
248 };
249
250 unused@a400000 {
251 label = "unused";
252 reg = <0xa400000 0x5c00000>;
253 };
254 };
255 };
256 };
257
258 &adm_dma {
259 status = "okay";
260 };
261
262 &mdio0 {
263 status = "okay";
264
265 pinctrl-0 = <&mdio0_pins>;
266 pinctrl-names = "default";
267
268 ethernet-phy@0 {
269 reg = <0>;
270 qca,ar8327-initvals = <
271 0x00004 0x7600000 /* PAD0_MODE */
272 0x00008 0x1000000 /* PAD5_MODE */
273 0x0000c 0x80 /* PAD6_MODE */
274 0x000e4 0x6a545 /* MAC_POWER_SEL */
275 0x000e0 0xc74164de /* SGMII_CTRL */
276 0x0007c 0x4e /* PORT0_STATUS */
277 0x00094 0x4e /* PORT6_STATUS */
278 >;
279 };
280
281 ethernet-phy@4 {
282 reg = <4>;
283 };
284 };
285
286 &gmac1 {
287 status = "okay";
288
289 pinctrl-0 = <&rgmii2_pins>;
290 pinctrl-names = "default";
291
292 phy-mode = "rgmii";
293 qcom,id = <1>;
294
295 fixed-link {
296 speed = <1000>;
297 full-duplex;
298 };
299 };
300
301 &gmac2 {
302 status = "okay";
303
304 phy-mode = "sgmii";
305 qcom,id = <2>;
306
307 fixed-link {
308 speed = <1000>;
309 full-duplex;
310 };
311 };
312
313 &gsbi4_serial {
314 pinctrl-0 = <&uart0_pins>;
315 pinctrl-names = "default";
316 };
317
318 &flash {
319 compatible = "jedec,spi-nor";
320 };
321
322 &sata_phy {
323 status = "disabled";
324 };
325
326 &sata {
327 status = "disabled";
328 };
329
330 &ss_phy_0 { /* USB3 port 0 SS phy */
331 status = "okay";
332
333 rx_eq = <2>;
334 tx_deamp_3_5db = <32>;
335 mpll = <160>;
336 };
337
338 &ss_phy_1 { /* USB3 port 1 SS phy */
339 status = "okay";
340
341 rx_eq = <2>;
342 tx_deamp_3_5db = <32>;
343 mpll = <160>;
344 };
345
346 &pcie0 {
347 status = "okay";
348
349 /delete-property/ pinctrl-0;
350 /delete-property/ pinctrl-names;
351 /delete-property/ perst-gpios;
352 };
353
354 &pcie1 {
355 status = "okay";
356 };
357
358 &pcie2 {
359 status = "okay";
360
361 /delete-property/ pinctrl-0;
362 /delete-property/ pinctrl-names;
363 /delete-property/ perst-gpios;
364 };
365
366 &qcom_pinmux {
367 pinctrl-names = "default";
368 pinctrl-0 = <&state_default>;
369
370 state_default: pinctrl0 {
371 pcie0_pcie2_perst {
372 pins = "gpio3";
373 function = "gpio";
374 drive-strength = <2>;
375 bias-disable;
376 output-high;
377 };
378 };
379
380 led_pins: led_pins {
381 mux {
382 pins = "gpio7", "gpio8", "gpio9", "gpio22",
383 "gpio23", "gpio24", "gpio25", "gpio53";
384 function = "gpio";
385 drive-strength = <2>;
386 bias-pull-up;
387 };
388 };
389
390 button_pins: button_pins {
391 mux {
392 pins = "gpio54";
393 function = "gpio";
394 drive-strength = <2>;
395 bias-pull-up;
396 };
397 };
398
399 beeper_pins: beeper_pins {
400 mux {
401 pins = "gpio55";
402 function = "gpio";
403 drive-strength = <2>;
404 bias-pull-up;
405 };
406 };
407
408 rpm_pins: rpm_pins {
409 mux {
410 pins = "gpio12", "gpio13";
411 function = "gsbi4";
412 drive-strength = <10>;
413 bias-disable;
414 };
415 };
416
417 uart0_pins: uart0_pins {
418 mux {
419 pins = "gpio10", "gpio11";
420 function = "gsbi4";
421 drive-strength = <10>;
422 bias-disable;
423 };
424 };
425
426 spi_pins: spi_pins {
427 mux {
428 pins = "gpio18", "gpio19";
429 function = "gsbi5";
430 drive-strength = <10>;
431 bias-pull-down;
432 };
433
434 clk {
435 pins = "gpio21";
436 function = "gsbi5";
437 drive-strength = <12>;
438 bias-pull-down;
439 };
440
441 cs {
442 pins = "gpio20";
443 function = "gpio";
444 drive-strength = <10>;
445 bias-pull-up;
446 };
447 };
448 };
449
450 &usb3_0 {
451 status = "okay";
452 };
453
454 &usb3_1 {
455 status = "okay";
456 };
457
458 &tcsr {
459 qcom,usb-ctrl-select = <TCSR_USB_SELECT_USB3_DUAL>;
460 };