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