qualcommax: dts: add reset delay to qca8081 phy
[openwrt/staging/dangole.git] / target / linux / qualcommax / files / arch / arm64 / boot / dts / qcom / ipq8071-mf269.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 /dts-v1/;
4
5 #include "ipq8074-512m.dtsi"
6 #include "ipq8074-ac-cpu.dtsi"
7 #include "ipq8074-ess.dtsi"
8 #include <dt-bindings/gpio/gpio.h>
9 #include <dt-bindings/input/input.h>
10
11 / {
12 model = "ZTE MF269";
13 compatible = "zte,mf269", "qcom,ipq8074";
14
15 aliases {
16 serial0 = &blsp1_uart5;
17 led-boot = &led_power;
18 led-failsafe = &led_power;
19 led-running = &led_power;
20 led-upgrade = &led_power;
21 label-mac-device = &dp6_syn;
22 };
23
24 chosen {
25 stdout-path = "serial0:115200n8";
26 bootargs-append = " root=/dev/ubiblock0_0";
27 };
28
29 keys {
30 compatible = "gpio-keys";
31 pinctrl-0 = <&button_pins>;
32 pinctrl-names = "default";
33
34 wps {
35 label = "wps";
36 linux,code = <KEY_WPS_BUTTON>;
37 gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;
38 };
39
40 reset {
41 label = "reset";
42 linux,code = <KEY_RESTART>;
43 gpios = <&tlmm 46 GPIO_ACTIVE_LOW>;
44 };
45 };
46
47 leds {
48 compatible = "gpio-leds";
49
50 led_power: power {
51 label = "white:power";
52 gpio = <&tlmm 56 GPIO_ACTIVE_HIGH>;
53 };
54 };
55 };
56
57 &tlmm {
58 button_pins: button_pins {
59 mux {
60 pins = "gpio37", "gpio46";
61 function = "gpio";
62 drive-strength = <8>;
63 bias-pull-up;
64 };
65 };
66
67 i2c_pins: i2c-pins {
68 pins = "gpio21", "gpio22";
69 function = "blsp4_i2c1";
70 drive-strength = <8>;
71 bias-disable;
72 };
73
74 mdio_pins: mdio-pins {
75 mdc {
76 pins = "gpio68";
77 function = "mdc";
78 drive-strength = <8>;
79 bias-pull-up;
80 };
81
82 mdio {
83 pins = "gpio69";
84 function = "mdio";
85 drive-strength = <8>;
86 bias-pull-up;
87 };
88 };
89
90 usb_pwr_pins: usb_pwr_pins {
91 mux {
92 pins = "gpio29";
93 function = "gpio";
94 drive-strength = <8>;
95 bias-disable;
96 output-high;
97 };
98 };
99 };
100
101 &blsp1_spi1 {
102 pinctrl-0 = <&spi_0_pins>;
103 pinctrl-names = "default";
104 cs-select = <0>;
105 status = "okay";
106
107 flash@0 {
108 compatible = "jedec,spi-nor";
109 #address-cells = <1>;
110 #size-cells = <1>;
111 reg = <0>;
112 spi-max-frequency = <50000000>;
113
114 partitions {
115 compatible = "fixed-partitions";
116 #address-cells = <1>;
117 #size-cells = <1>;
118
119 partition@0 {
120 label = "0:sbl1";
121 reg = <0x0 0x50000>;
122 read-only;
123 };
124
125 partition@50000 {
126 label = "0:mibib";
127 reg = <0x50000 0x10000>;
128 read-only;
129 };
130
131 partition@60000 {
132 label = "0:bootconfig";
133 reg = <0x60000 0x20000>;
134 read-only;
135 };
136
137 partition@80000 {
138 label = "0:bootconfig1";
139 reg = <0x80000 0x20000>;
140 read-only;
141 };
142
143 partition@a0000 {
144 label = "0:qsee";
145 reg = <0xa0000 0x180000>;
146 read-only;
147 };
148
149 partition@220000 {
150 label = "0:qsee_1";
151 reg = <0x220000 0x180000>;
152 read-only;
153 };
154
155 partition@3a0000 {
156 label = "0:devcfg";
157 reg = <0x3a0000 0x10000>;
158 read-only;
159 };
160
161 partition@3b0000 {
162 label = "0:devcfg_1";
163 reg = <0x3b0000 0x10000>;
164 read-only;
165 };
166
167 partition@3c0000 {
168 label = "0:apdp";
169 reg = <0x3c0000 0x10000>;
170 read-only;
171 };
172
173 partition@3d0000 {
174 label = "0:apdp_1";
175 reg = <0x3d0000 0x10000>;
176 read-only;
177 };
178
179 partition@3e0000 {
180 label = "0:rpm";
181 reg = <0x3e0000 0x40000>;
182 read-only;
183 };
184
185 partition@420000 {
186 label = "0:rpm_1";
187 reg = <0x420000 0x40000>;
188 read-only;
189 };
190
191 partition@460000 {
192 label = "0:cdt";
193 reg = <0x460000 0x10000>;
194 read-only;
195 };
196
197 partition@470000 {
198 label = "0:cdt_1";
199 reg = <0x470000 0x10000>;
200 read-only;
201 };
202
203 partition@480000 {
204 label = "0:appsblenv";
205 reg = <0x480000 0x10000>;
206 };
207
208 partition@490000 {
209 label = "0:appsbl";
210 reg = <0x490000 0xc0000>;
211 read-only;
212 };
213
214 partition@550000 {
215 label = "0:appsbl_1";
216 reg = <0x550000 0xc0000>;
217 read-only;
218 };
219
220 partition@610000 {
221 label = "0:art";
222 reg = <0x610000 0x40000>;
223 read-only;
224 };
225
226 partition@650000 {
227 label = "0:ethphyfw";
228 reg = <0x650000 0x80000>;
229 read-only;
230 };
231 };
232 };
233 };
234
235 &blsp1_i2c5 {
236 pinctrl-0 = <&i2c_pins>;
237 pinctrl-names = "default";
238 status = "okay";
239
240 /* No driver exists */
241 aw9106: gpio-expander@5b {
242 reg = <0x5b>;
243 reset-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;
244 };
245 };
246
247 &blsp1_uart5 {
248 status = "okay";
249 };
250
251 &cryptobam {
252 status = "okay";
253 };
254
255 &crypto {
256 status = "okay";
257 };
258
259 &prng {
260 status = "okay";
261 };
262
263 &qpic_bam {
264 status = "okay";
265 };
266
267 &qpic_nand {
268 status = "okay";
269
270 /*
271 * Bootloader will find the NAND DT node by the compatible and
272 * then "fixup" it by adding the partitions from the SMEM table
273 * using the legacy bindings thus making it impossible for us
274 * to change the partition table or utilize NVMEM for calibration.
275 * So add a dummy partitions node that bootloader will populate
276 * and set it as disabled so the kernel ignores it instead of
277 * printing warnings due to the broken way bootloader adds the
278 * partitions.
279 */
280 partitions {
281 status = "disabled";
282 };
283
284 nand@0 {
285 reg = <0>;
286 nand-ecc-strength = <4>;
287 nand-ecc-step-size = <512>;
288 nand-bus-width = <8>;
289
290 partitions {
291 compatible = "fixed-partitions";
292 #address-cells = <1>;
293 #size-cells = <1>;
294
295 partition@0 {
296 label = "fota-flag";
297 reg = <0x0000000 0x00a0000>;
298 read-only;
299 };
300
301 partition@a0000 {
302 label = "mac";
303 reg = <0x00a0000 0x0080000>;
304 read-only;
305
306 nvmem-layout {
307 compatible = "fixed-layout";
308 #address-cells = <1>;
309 #size-cells = <1>;
310
311 macaddr_mac_0: macaddr@0 {
312 compatible = "mac-base";
313 reg = <0x0 0x6>;
314 #nvmem-cell-cells = <1>;
315 };
316 };
317 };
318
319 partition@120000 {
320 label = "cfg-param";
321 reg = <0x0120000 0x1400000>;
322 read-only;
323 };
324
325 partition@1520000 {
326 label = "log";
327 reg = <0x1520000 0x0600000>;
328 read-only;
329 };
330
331 partition@1b20000 {
332 label = "oops";
333 reg = <0x1b20000 0x00a0000>;
334 read-only;
335 };
336
337 partition@1bc0000 {
338 label = "web";
339 reg = <0x1bc0000 0x0800000>;
340 read-only;
341 };
342
343 partition@23c0000 {
344 label = "ubi_kernel";
345 reg = <0x23c0000 0x3400000>;
346 };
347
348 partition@57c0000 {
349 label = "0:wififw";
350 reg = <0x57c0000 0x0800000>;
351 read-only;
352 };
353
354 /* rootfs partition is the result of squashing
355 * consecutive stock partitions:
356 * - openwrt_data (25 MiB)
357 * - data (30 MiB)
358 * - fota (99 MiB)
359 */
360 partition@5fc0000 {
361 label = "rootfs";
362 reg = <0x5fc0000 0x9a00000>;
363 };
364 };
365 };
366 };
367
368 &qusb_phy_0 {
369 status = "okay";
370 };
371
372 &ssphy_0 {
373 status = "okay";
374 };
375
376 &usb_0 {
377 pinctrl-0 = <&usb_pwr_pins>;
378 pinctrl-names = "default";
379 status = "okay";
380 };
381
382 &mdio {
383 status = "okay";
384
385 pinctrl-0 = <&mdio_pins>;
386 pinctrl-names = "default";
387
388 qca8081_24: ethernet-phy@24 {
389 compatible = "ethernet-phy-id004d.d101";
390 reg = <24>;
391 reset-deassert-us = <10000>;
392 reset-gpios = <&tlmm 25 GPIO_ACTIVE_LOW>;
393 };
394
395 qca8081_28: ethernet-phy@28 {
396 compatible = "ethernet-phy-id004d.d101";
397 reg = <28>;
398 reset-deassert-us = <10000>;
399 reset-gpios = <&tlmm 44 GPIO_ACTIVE_LOW>;
400 };
401 };
402
403 &switch {
404 status = "okay";
405
406 switch_lan_bmp = <ESS_PORT5>; /* lan port bitmap */
407 switch_wan_bmp = <ESS_PORT6>; /* wan port bitmap */
408 switch_mac_mode1 = <MAC_MODE_SGMII_PLUS>; /* mac mode for uniphy instance1*/
409 switch_mac_mode2 = <MAC_MODE_SGMII_PLUS>; /* mac mode for uniphy instance2*/
410
411 qcom,port_phyinfo {
412 port@5 {
413 port_id = <5>;
414 phy_address = <24>;
415 port_mac_sel = "QGMAC_PORT";
416 };
417 port@6 {
418 port_id = <6>;
419 phy_address = <28>;
420 port_mac_sel = "QGMAC_PORT";
421 };
422 };
423 };
424
425 &edma {
426 status = "okay";
427 };
428
429 &dp5_syn {
430 status = "okay";
431 phy-handle = <&qca8081_24>;
432 label = "lan";
433 nvmem-cell-names = "mac-address";
434 nvmem-cells = <&macaddr_mac_0 1>;
435 };
436
437 &dp6_syn {
438 status = "okay";
439 phy-handle = <&qca8081_28>;
440 label = "wan";
441 nvmem-cell-names = "mac-address";
442 nvmem-cells = <&macaddr_mac_0 0>;
443 };
444
445 &wifi {
446 status = "okay";
447
448 qcom,ath11k-calibration-variant = "ZTE-MF269";
449 qcom,ath11k-fw-memory-mode = <1>;
450 };