qualcommax: dts: add reset delay to qca8081 phy
[openwrt/staging/dangole.git] / target / linux / qualcommax / files / arch / arm64 / boot / dts / qcom / ipq8072-ax9000.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /* Copyright (c) 2021, Robert Marko <robimarko@gmail.com> */
3
4 /dts-v1/;
5
6 #include "ipq8074.dtsi"
7 #include "ipq8074-hk-cpu.dtsi"
8 #include "ipq8074-ess.dtsi"
9 #include <dt-bindings/gpio/gpio.h>
10 #include <dt-bindings/input/input.h>
11 #include <dt-bindings/leds/common.h>
12
13 / {
14 model = "Xiaomi AX9000";
15 compatible = "xiaomi,ax9000", "qcom,ipq8074";
16
17 aliases {
18 serial0 = &blsp1_uart5;
19 led-boot = &led_system_yellow;
20 led-failsafe = &led_system_yellow;
21 led-running = &led_system_blue;
22 led-upgrade = &led_system_yellow;
23 label-mac-device = &dp5;
24 };
25
26 chosen {
27 stdout-path = "serial0:115200n8";
28 bootargs-append = " root=/dev/ubiblock0_0";
29 };
30
31 keys {
32 compatible = "gpio-keys";
33
34 reset {
35 label = "reset";
36 gpios = <&tlmm 47 GPIO_ACTIVE_LOW>;
37 linux,code = <KEY_RESTART>;
38 };
39
40 wps {
41 label = "wps"; /* Labeled Mesh on the device */
42 gpios = <&tlmm 46 GPIO_ACTIVE_LOW>;
43 linux,code = <KEY_WPS_BUTTON>;
44 };
45 };
46
47 leds {
48 compatible = "gpio-leds";
49
50 led_system_blue: system-blue {
51 label = "blue:system";
52 gpios = <&tlmm 48 GPIO_ACTIVE_HIGH>;
53 color = <LED_COLOR_ID_BLUE>;
54 };
55
56 led_system_yellow: system-yellow {
57 label = "yellow:system";
58 gpios = <&tlmm 52 GPIO_ACTIVE_HIGH>;
59 color = <LED_COLOR_ID_YELLOW>;
60 };
61
62 network-yellow {
63 label = "yellow:network";
64 gpios = <&tlmm 50 GPIO_ACTIVE_HIGH>;
65 color = <LED_COLOR_ID_YELLOW>;
66 };
67
68 network-blue {
69 label = "blue:network";
70 gpios = <&tlmm 51 GPIO_ACTIVE_HIGH>;
71 color = <LED_COLOR_ID_BLUE>;
72 };
73
74 top-red {
75 label = "red:top";
76 gpios = <&tlmm 63 GPIO_ACTIVE_HIGH>;
77 color = <LED_COLOR_ID_RED>;
78 default-state = "keep";
79 };
80
81 top-green {
82 label = "green:top";
83 gpios = <&tlmm 64 GPIO_ACTIVE_HIGH>;
84 color = <LED_COLOR_ID_GREEN>;
85 default-state = "keep";
86 };
87
88 top-blue {
89 label = "blue:top";
90 gpios = <&tlmm 66 GPIO_ACTIVE_HIGH>;
91 color = <LED_COLOR_ID_BLUE>;
92 default-state = "keep";
93 };
94 };
95 };
96
97 &tlmm {
98 mdio_pins: mdio-pins {
99 mdc {
100 pins = "gpio68";
101 function = "mdc";
102 drive-strength = <8>;
103 bias-pull-up;
104 };
105
106 mdio {
107 pins = "gpio69";
108 function = "mdio";
109 drive-strength = <8>;
110 bias-pull-up;
111 };
112 };
113
114 i2c_pins: i2c-pins {
115 pins = "gpio0", "gpio2";
116 function = "blsp5_i2c";
117 drive-strength = <8>;
118 bias-disable;
119 };
120 };
121
122 &blsp1_uart5 {
123 status = "okay";
124 };
125
126 &blsp1_i2c6 {
127 status = "okay";
128
129 pinctrl-0 = <&i2c_pins>;
130 pinctrl-names = "default";
131 };
132
133 &prng {
134 status = "okay";
135 };
136
137 &cryptobam {
138 status = "okay";
139 };
140
141 &crypto {
142 status = "okay";
143 };
144
145 &qpic_bam {
146 status = "okay";
147 };
148
149 &qpic_nand {
150 status = "okay";
151
152 /*
153 * Bootloader will find the NAND DT node by the compatible and
154 * then "fixup" it by adding the partitions from the SMEM table
155 * using the legacy bindings thus making it impossible for us
156 * to change the partition table or utilize NVMEM for calibration.
157 * So add a dummy partitions node that bootloader will populate
158 * and set it as disabled so the kernel ignores it instead of
159 * printing warnings due to the broken way bootloader adds the
160 * partitions.
161 */
162 partitions {
163 status = "disabled";
164 };
165
166 nand@0 {
167 reg = <0>;
168 nand-ecc-strength = <4>;
169 nand-ecc-step-size = <512>;
170 nand-bus-width = <8>;
171
172 partitions {
173 compatible = "fixed-partitions";
174 #address-cells = <1>;
175 #size-cells = <1>;
176
177 partition@0 {
178 label = "0:sbl1";
179 reg = <0x0 0x100000>;
180 read-only;
181 };
182
183 partition@100000 {
184 label = "0:mibib";
185 reg = <0x100000 0x100000>;
186 read-only;
187 };
188
189 partition@200000 {
190 label = "0:bootconfig";
191 reg = <0x200000 0x80000>;
192 read-only;
193 };
194
195 partition@280000 {
196 label = "0:bootconfig1";
197 reg = <0x280000 0x80000>;
198 read-only;
199 };
200
201 partition@300000 {
202 label = "0:qsee";
203 reg = <0x300000 0x300000>;
204 read-only;
205 };
206
207 partition@600000 {
208 label = "0:qsee_1";
209 reg = <0x600000 0x300000>;
210 read-only;
211 };
212
213 partition@900000 {
214 label = "0:devcfg";
215 reg = <0x900000 0x80000>;
216 read-only;
217 };
218
219 partition@980000 {
220 label = "0:devcfg_1";
221 reg = <0x980000 0x80000>;
222 read-only;
223 };
224
225 partition@a00000 {
226 label = "0:apdp";
227 reg = <0xa00000 0x80000>;
228 read-only;
229 };
230
231 partition@a80000 {
232 label = "0:apdp_1";
233 reg = <0xa80000 0x80000>;
234 read-only;
235 };
236
237 partition@b00000 {
238 label = "0:rpm";
239 reg = <0xb00000 0x80000>;
240 read-only;
241 };
242
243 partition@b80000 {
244 label = "0:rpm_1";
245 reg = <0xb80000 0x80000>;
246 read-only;
247 };
248
249 partition@c00000 {
250 label = "0:cdt";
251 reg = <0xc00000 0x80000>;
252 read-only;
253 };
254
255 partition@c80000 {
256 label = "0:cdt_1";
257 reg = <0xc80000 0x80000>;
258 read-only;
259 };
260
261 partition@d00000 {
262 label = "0:appsblenv";
263 reg = <0xd00000 0x80000>;
264 };
265
266 partition@d80000 {
267 label = "0:appsbl";
268 reg = <0xd80000 0x100000>;
269 read-only;
270 };
271
272 partition@e80000 {
273 label = "0:appsbl_1";
274 reg = <0xe80000 0x100000>;
275 read-only;
276 };
277
278 partition@f80000 {
279 label = "0:art";
280 reg = <0xf80000 0x80000>;
281 read-only;
282
283 nvmem-layout {
284 compatible = "fixed-layout";
285 #address-cells = <1>;
286 #size-cells = <1>;
287
288 macaddr_dp1: macaddr@0 {
289 reg = <0x0 0x6>;
290 };
291
292 macaddr_dp2: macaddr@6 {
293 reg = <0x6 0x6>;
294 };
295
296 macaddr_dp3: macaddr@c {
297 reg = <0xc 0x6>;
298 };
299
300 macaddr_dp4: macaddr@12 {
301 reg = <0x12 0x6>;
302 };
303
304 macaddr_dp5: macaddr@18 {
305 reg = <0x18 0x6>;
306 };
307
308 caldata_qca9889: caldata@4d000 {
309 reg = <0x4d000 0x844>;
310 };
311 };
312 };
313
314 partition@1000000 {
315 label = "bdata";
316 reg = <0x1000000 0x80000>;
317 };
318
319 partition@1080000 {
320 /* This is crash + crash_syslog parts combined */
321 label = "pstore";
322 reg = <0x1080000 0x100000>;
323 };
324
325 partition@1180000 {
326 label = "ubi_kernel";
327 reg = <0x1180000 0x3800000>;
328 };
329
330 partition@4980000 {
331 label = "rootfs";
332 reg = <0x4980000 0xb680000>;
333 };
334 };
335 };
336 };
337
338 &qusb_phy_0 {
339 status = "okay";
340 };
341
342 &ssphy_0 {
343 status = "okay";
344 };
345
346 &usb_0 {
347 status = "okay";
348 };
349
350 &mdio {
351 status = "okay";
352
353 pinctrl-0 = <&mdio_pins>;
354 pinctrl-names = "default";
355 reset-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;
356
357 qca8075_0: ethernet-phy@0 {
358 compatible = "ethernet-phy-ieee802.3-c22";
359 reg = <0>;
360 };
361
362 qca8075_1: ethernet-phy@1 {
363 compatible = "ethernet-phy-ieee802.3-c22";
364 reg = <1>;
365 };
366
367 qca8075_2: ethernet-phy@2 {
368 compatible = "ethernet-phy-ieee802.3-c22";
369 reg = <2>;
370 };
371
372 qca8075_3: ethernet-phy@3 {
373 compatible = "ethernet-phy-ieee802.3-c22";
374 reg = <3>;
375 };
376
377 qca8081: ethernet-phy@24 {
378 compatible = "ethernet-phy-id004d.d101";
379 reg = <24>;
380 reset-deassert-us = <10000>;
381 reset-gpios = <&tlmm 44 GPIO_ACTIVE_LOW>;
382
383 leds {
384 #address-cells = <1>;
385 #size-cells = <0>;
386
387 led@0 {
388 reg = <0>;
389 color = <LED_COLOR_ID_GREEN>;
390 function = LED_FUNCTION_WAN;
391 default-state = "keep";
392 };
393 };
394 };
395 };
396
397 &switch {
398 status = "okay";
399
400 switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; /* lan port bitmap */
401 switch_wan_bmp = <ESS_PORT5>; /* wan port bitmap */
402 switch_mac_mode = <MAC_MODE_QSGMII>; /* mac mode for uniphy instance0*/
403 switch_mac_mode1 = <MAC_MODE_SGMII_PLUS>; /* mac mode for uniphy instance1*/
404
405 qcom,port_phyinfo {
406 port@1 {
407 port_id = <1>;
408 phy_address = <0>;
409 };
410 port@2 {
411 port_id = <2>;
412 phy_address = <1>;
413 };
414 port@3 {
415 port_id = <3>;
416 phy_address = <2>;
417 };
418 port@4 {
419 port_id = <4>;
420 phy_address = <3>;
421 };
422 port@5 {
423 port_id = <5>;
424 phy_address = <24>;
425 port_mac_sel = "QGMAC_PORT";
426 };
427 };
428 };
429
430 &edma {
431 status = "okay";
432 };
433
434 &dp1 {
435 status = "okay";
436 phy-handle = <&qca8075_0>;
437 label = "lan4";
438 nvmem-cells = <&macaddr_dp1>;
439 nvmem-cell-names = "mac-address";
440 };
441
442 &dp2 {
443 status = "okay";
444 phy-handle = <&qca8075_1>;
445 label = "lan3";
446 nvmem-cells = <&macaddr_dp2>;
447 nvmem-cell-names = "mac-address";
448 };
449
450 &dp3 {
451 status = "okay";
452 phy-handle = <&qca8075_2>;
453 label = "lan2";
454 nvmem-cells = <&macaddr_dp3>;
455 nvmem-cell-names = "mac-address";
456 };
457
458 &dp4 {
459 status = "okay";
460 phy-handle = <&qca8075_3>;
461 label = "lan1";
462 nvmem-cells = <&macaddr_dp4>;
463 nvmem-cell-names = "mac-address";
464 };
465
466 &dp5 {
467 status = "okay";
468 phy-handle = <&qca8081>;
469 label = "wan";
470 nvmem-cells = <&macaddr_dp5>;
471 nvmem-cell-names = "mac-address";
472 };
473
474 &pcie_qmp0 {
475 status = "okay";
476 };
477
478 &pcie0 {
479 status = "okay";
480
481 perst-gpio = <&tlmm 58 GPIO_ACTIVE_LOW>;
482
483 bridge@0,0 {
484 reg = <0x00000000 0 0 0 0>;
485 #address-cells = <3>;
486 #size-cells = <2>;
487 ranges;
488
489 wifi@1,0 {
490 status = "okay";
491
492 /* ath11k has no DT compatible for PCI cards */
493 compatible = "pci17cb,1104";
494 reg = <0x00010000 0 0 0 0>;
495
496 qcom,ath11k-calibration-variant = "Xiaomi-AX9000";
497 };
498 };
499 };
500
501 &pcie_qmp1 {
502 status = "okay";
503 };
504
505 &pcie1 {
506 status = "okay";
507
508 perst-gpio = <&tlmm 62 GPIO_ACTIVE_HIGH>;
509
510 bridge@1,0 {
511 reg = <0x00010000 0 0 0 0>;
512 #address-cells = <3>;
513 #size-cells = <2>;
514 ranges;
515
516 wifi@1,0 {
517 status = "okay";
518
519 compatible = "qcom,ath10k";
520 reg = <0x00010000 0 0 0 0>;
521
522 qcom,ath10k-calibration-variant = "Xiaomi-AX9000";
523 nvmem-cell-names = "calibration";
524 nvmem-cells = <&caldata_qca9889>;
525 };
526 };
527 };
528
529 &wifi {
530 status = "okay";
531
532 qcom,ath11k-calibration-variant = "Xiaomi-AX9000";
533 };