ipq40xx: convert some boards to DSA
[openwrt/staging/noltari.git] / target / linux / ipq40xx / files / arch / arm / boot / dts / qcom-ipq4019-mf286d.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 // Copyright (c) 2022, Pawel Dembicki <paweldembicki@gmail.com>.
3
4 #include "qcom-ipq4019.dtsi"
5 #include <dt-bindings/soc/qcom,tcsr.h>
6 #include <dt-bindings/gpio/gpio.h>
7 #include <dt-bindings/input/input.h>
8 #include <dt-bindings/leds/common.h>
9
10 / {
11 model = "ZTE MF286D";
12 compatible = "zte,mf286d";
13
14 aliases {
15 led-boot = &led_internal;
16 led-failsafe = &led_internal;
17 led-running = &led_internal;
18 led-upgrade = &led_internal;
19 };
20
21 chosen {
22 /*
23 * bootargs forced by u-boot bootipq command:
24 * 'ubi.mtd=rootfs root=mtd:ubi_rootfs rootfstype=squashfs rootwait'
25 */
26 bootargs-append = " root=/dev/ubiblock0_1";
27 };
28
29 gpio-restart {
30 compatible = "gpio-restart";
31 gpios = <&tlmm 8 GPIO_ACTIVE_HIGH>;
32 };
33
34 leds {
35 compatible = "gpio-leds";
36
37 led_internal: led-0 {
38 function = LED_FUNCTION_STATUS;
39 color = <LED_COLOR_ID_BLUE>;
40 gpios = <&tlmm 10 GPIO_ACTIVE_LOW>;
41 label = "blue:internal_led";
42 default-state = "keep";
43 };
44
45 led-1 {
46 function = LED_FUNCTION_WLAN;
47 color = <LED_COLOR_ID_BLUE>;
48 gpios = <&tlmm 61 GPIO_ACTIVE_LOW>;
49 linux,default-trigger = "phy0tpt";
50 };
51 };
52
53 keys {
54 compatible = "gpio-keys";
55
56 wifi {
57 label = "wifi";
58 linux,code = <KEY_RFKILL>;
59 gpios = <&tlmm 11 GPIO_ACTIVE_LOW>;
60 };
61
62 reset {
63 label = "reset";
64 linux,code = <KEY_RESTART>;
65 gpios = <&tlmm 18 GPIO_ACTIVE_LOW>;
66 };
67
68 wps {
69 label = "wps";
70 linux,code = <KEY_WPS_BUTTON>;
71 gpios = <&tlmm 68 GPIO_ACTIVE_LOW>;
72 };
73 };
74
75 soc {
76 rng@22000 {
77 status = "okay";
78 };
79
80 mdio@90000 {
81 status = "okay";
82 pinctrl-0 = <&mdio_pins>;
83 pinctrl-names = "default";
84 reset-gpios = <&tlmm 47 GPIO_ACTIVE_LOW>;
85 reset-delay-us = <2000>;
86 };
87
88 ess-psgmii@98000 {
89 status = "okay";
90 };
91
92 tcsr@1949000 {
93 compatible = "qcom,tcsr";
94 reg = <0x1949000 0x100>;
95 qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
96 };
97
98 tcsr@194b000 {
99 /* select hostmode */
100 compatible = "qcom,tcsr";
101 reg = <0x194b000 0x100>;
102 qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
103 status = "okay";
104 };
105
106 ess_tcsr@1953000 {
107 compatible = "qcom,tcsr";
108 reg = <0x1953000 0x1000>;
109 qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
110 };
111
112 tcsr@1957000 {
113 compatible = "qcom,tcsr";
114 reg = <0x1957000 0x100>;
115 qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
116 };
117
118 usb2@60f8800 {
119 status = "okay";
120 };
121
122 usb3@8af8800 {
123 status = "okay";
124 };
125
126 crypto@8e3a000 {
127 status = "okay";
128 };
129
130 watchdog@b017000 {
131 status = "okay";
132 };
133 };
134 };
135
136 &blsp_dma {
137 status = "okay";
138 };
139
140 &blsp1_spi1 {
141 pinctrl-0 = <&spi_0_pins>;
142 pinctrl-names = "default";
143 status = "okay";
144 cs-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>;
145
146 flash@0 {
147 /* u-boot is looking for "n25q128a11" property */
148 compatible = "jedec,spi-nor", "n25q128a11";
149 #address-cells = <1>;
150 #size-cells = <1>;
151 reg = <0>;
152 spi-max-frequency = <24000000>;
153
154 partitions {
155 compatible = "fixed-partitions";
156 #address-cells = <1>;
157 #size-cells = <1>;
158
159 partition@0 {
160 label = "0:SBL1";
161 reg = <0x0 0x40000>;
162 read-only;
163 };
164
165 partition@40000 {
166 label = "0:MIBIB";
167 reg = <0x40000 0x20000>;
168 read-only;
169 };
170
171 partition@60000 {
172 label = "0:QSEE";
173 reg = <0x60000 0x60000>;
174 read-only;
175 };
176
177 partition@c0000 {
178 label = "0:CDT";
179 reg = <0xc0000 0x10000>;
180 read-only;
181 };
182
183 partition@d0000 {
184 label = "0:DDRPARAMS";
185 reg = <0xd0000 0x10000>;
186 read-only;
187 };
188
189 partition@e0000 {
190 label = "0:APPSBLENV";
191 reg = <0xe0000 0x10000>;
192 read-only;
193 };
194
195 partition@f0000 {
196 label = "0:APPSBL";
197 reg = <0xf0000 0xc0000>;
198 read-only;
199 };
200
201 partition@1b0000 {
202 label = "0:reserved1";
203 reg = <0x1b0000 0x50000>;
204 read-only;
205 };
206 };
207 };
208 };
209
210 &blsp1_uart1 {
211 pinctrl-0 = <&serial_pins>;
212 pinctrl-names = "default";
213 status = "okay";
214 };
215
216 &cryptobam {
217 status = "okay";
218 };
219
220 &gmac {
221 status = "okay";
222 nvmem-cell-names = "mac-address";
223 nvmem-cells = <&macaddr_config_0>;
224 };
225
226 &nand {
227 pinctrl-0 = <&nand_pins>;
228 pinctrl-names = "default";
229 status = "okay";
230
231 nand@0 {
232 partitions {
233 compatible = "fixed-partitions";
234 #address-cells = <1>;
235 #size-cells = <1>;
236
237 partition@0 {
238 label = "fota-flag";
239 reg = <0x0 0xa0000>;
240 read-only;
241 };
242
243 partition@a0000 {
244 label = "ART";
245 reg = <0xa0000 0x80000>;
246 read-only;
247 compatible = "nvmem-cells";
248 #address-cells = <1>;
249 #size-cells = <1>;
250
251 precal_art_1000: precal@1000 {
252 reg = <0x1000 0x2f20>;
253 };
254
255 precal_art_5000: precal@5000 {
256 reg = <0x5000 0x2f20>;
257 };
258 };
259
260 partition@120000 {
261 label = "mac";
262 reg = <0x120000 0x80000>;
263 read-only;
264 compatible = "nvmem-cells";
265 #address-cells = <1>;
266 #size-cells = <1>;
267
268 macaddr_config_0: macaddr@0 {
269 reg = <0x0 0x6>;
270 };
271 };
272
273 partition@1a0000 {
274 label = "reserved2";
275 reg = <0x1a0000 0xc0000>;
276 read-only;
277 };
278
279 partition@260000 {
280 label = "cfg-param";
281 reg = <0x260000 0x400000>;
282 read-only;
283 };
284
285 partition@660000 {
286 label = "log";
287 reg = <0x660000 0x400000>;
288 };
289
290 partition@a60000 {
291 label = "oops";
292 reg = <0xa60000 0xa0000>;
293 };
294
295 partition@b00000 {
296 label = "reserved3";
297 reg = <0xb00000 0x500000>;
298 read-only;
299 };
300
301 partition@1000000 {
302 label = "web";
303 reg = <0x1000000 0x800000>;
304 };
305
306 partition@1800000 {
307 label = "rootfs";
308 reg = <0x1800000 0x1d00000>;
309 };
310
311 partition@3500000 {
312 label = "data";
313 reg = <0x3500000 0x1900000>;
314 };
315
316 partition@4e00000 {
317 label = "fota";
318 reg = <0x4e00000 0x3200000>;
319 };
320 };
321 };
322 };
323
324 &qpic_bam {
325 status = "okay";
326 };
327
328 &switch {
329 status = "okay";
330 };
331
332 &swport2 {
333 status = "okay";
334
335 label = "lan4";
336 };
337
338 &swport3 {
339 status = "okay";
340
341 label = "lan3";
342 };
343
344 &swport4 {
345 status = "okay";
346
347 label = "lan2";
348 };
349
350 &swport5 {
351 status = "okay";
352
353 nvmem-cell-names = "mac-address";
354 nvmem-cells = <&macaddr_config_0>;
355 mac-address-increment = <1>;
356 };
357
358 &tlmm {
359 i2c_0_pins: i2c_0_pinmux {
360 mux {
361 pins = "gpio20", "gpio21";
362 function = "blsp_i2c0";
363 bias-disable;
364 };
365 };
366
367 mdio_pins: mdio_pinmux {
368 mux_1 {
369 pins = "gpio6";
370 function = "mdio";
371 bias-pull-up;
372 };
373
374 mux_2 {
375 pins = "gpio7";
376 function = "mdc";
377 bias-pull-up;
378 };
379 };
380
381 nand_pins: nand_pins {
382 pullups {
383 pins = "gpio52", "gpio53", "gpio58",
384 "gpio59";
385 function = "qpic";
386 bias-pull-up;
387 };
388
389 pulldowns {
390 pins = "gpio54", "gpio55", "gpio56",
391 "gpio57", "gpio60",
392 "gpio62", "gpio63", "gpio64",
393 "gpio65", "gpio66", "gpio67",
394 "gpio69";
395 function = "qpic";
396 bias-pull-down;
397 };
398 };
399
400 serial_pins: serial_pinmux {
401 mux {
402 pins = "gpio16", "gpio17";
403 function = "blsp_uart0";
404 bias-disable;
405 };
406 };
407
408 spi_0_pins: spi_0_pinmux {
409 pinmux {
410 function = "blsp_spi0";
411 pins = "gpio13", "gpio14", "gpio15";
412 drive-strength = <12>;
413 bias-disable;
414 };
415
416 pinmux_cs {
417 function = "gpio";
418 pins = "gpio12";
419 drive-strength = <2>;
420 bias-disable;
421 output-high;
422 };
423 };
424 };
425
426 &usb2_hs_phy {
427 status = "okay";
428 };
429
430 &usb3_ss_phy {
431 status = "okay";
432 };
433
434 &usb3_hs_phy {
435 status = "okay";
436 };
437
438 &wifi0 {
439 status = "okay";
440 nvmem-cell-names = "pre-calibration", "mac-address";
441 nvmem-cells = <&precal_art_1000>, <&macaddr_config_0>;
442 mac-address-increment = <2>;
443 qcom,ath10k-calibration-variant = "zte,mf286d";
444 };
445
446 &wifi1 {
447 status = "okay";
448 nvmem-cell-names = "pre-calibration", "mac-address";
449 nvmem-cells = <&precal_art_5000>, <&macaddr_config_0>;
450 mac-address-increment = <3>;
451 qcom,ath10k-calibration-variant = "zte,mf286d";
452 };