8d1505cfe95841bd094f43bb932413b12145f43b
[openwrt/staging/chunkeey.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 ess-switch@c000000 {
135 status = "okay";
136 };
137
138 edma@c080000 {
139 status = "okay";
140 };
141 };
142 };
143
144 &blsp_dma {
145 status = "okay";
146 };
147
148 &blsp1_spi1 {
149 pinctrl-0 = <&spi_0_pins>;
150 pinctrl-names = "default";
151 status = "okay";
152 cs-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>;
153
154 flash@0 {
155 /* u-boot is looking for "n25q128a11" property */
156 compatible = "jedec,spi-nor", "n25q128a11";
157 #address-cells = <1>;
158 #size-cells = <1>;
159 reg = <0>;
160 spi-max-frequency = <24000000>;
161
162 partitions {
163 compatible = "fixed-partitions";
164 #address-cells = <1>;
165 #size-cells = <1>;
166
167 partition@0 {
168 label = "0:SBL1";
169 reg = <0x0 0x40000>;
170 read-only;
171 };
172
173 partition@40000 {
174 label = "0:MIBIB";
175 reg = <0x40000 0x20000>;
176 read-only;
177 };
178
179 partition@60000 {
180 label = "0:QSEE";
181 reg = <0x60000 0x60000>;
182 read-only;
183 };
184
185 partition@c0000 {
186 label = "0:CDT";
187 reg = <0xc0000 0x10000>;
188 read-only;
189 };
190
191 partition@d0000 {
192 label = "0:DDRPARAMS";
193 reg = <0xd0000 0x10000>;
194 read-only;
195 };
196
197 partition@e0000 {
198 label = "0:APPSBLENV";
199 reg = <0xe0000 0x10000>;
200 read-only;
201 };
202
203 partition@f0000 {
204 label = "0:APPSBL";
205 reg = <0xf0000 0xc0000>;
206 read-only;
207 };
208
209 partition@1b0000 {
210 label = "0:reserved1";
211 reg = <0x1b0000 0x50000>;
212 read-only;
213 };
214 };
215 };
216 };
217
218 &blsp1_uart1 {
219 pinctrl-0 = <&serial_pins>;
220 pinctrl-names = "default";
221 status = "okay";
222 };
223
224 &cryptobam {
225 status = "okay";
226 };
227
228 &gmac0 {
229 nvmem-cell-names = "mac-address";
230 nvmem-cells = <&macaddr_config_0>;
231 };
232
233 &gmac1 {
234 nvmem-cell-names = "mac-address";
235 nvmem-cells = <&macaddr_config_0>;
236 mac-address-increment = <1>;
237 };
238
239 &nand {
240 pinctrl-0 = <&nand_pins>;
241 pinctrl-names = "default";
242 status = "okay";
243
244 nand@0 {
245 partitions {
246 compatible = "fixed-partitions";
247 #address-cells = <1>;
248 #size-cells = <1>;
249
250 partition@0 {
251 label = "fota-flag";
252 reg = <0x0 0xa0000>;
253 read-only;
254 };
255
256 partition@a0000 {
257 label = "ART";
258 reg = <0xa0000 0x80000>;
259 read-only;
260 compatible = "nvmem-cells";
261 #address-cells = <1>;
262 #size-cells = <1>;
263
264 precal_art_1000: precal@1000 {
265 reg = <0x1000 0x2f20>;
266 };
267
268 precal_art_5000: precal@5000 {
269 reg = <0x5000 0x2f20>;
270 };
271 };
272
273 partition@120000 {
274 label = "mac";
275 reg = <0x120000 0x80000>;
276 read-only;
277 compatible = "nvmem-cells";
278 #address-cells = <1>;
279 #size-cells = <1>;
280
281 macaddr_config_0: macaddr@0 {
282 reg = <0x0 0x6>;
283 };
284 };
285
286 partition@1a0000 {
287 label = "reserved2";
288 reg = <0x1a0000 0xc0000>;
289 read-only;
290 };
291
292 partition@260000 {
293 label = "cfg-param";
294 reg = <0x260000 0x400000>;
295 read-only;
296 };
297
298 partition@660000 {
299 label = "log";
300 reg = <0x660000 0x400000>;
301 };
302
303 partition@a60000 {
304 label = "oops";
305 reg = <0xa60000 0xa0000>;
306 };
307
308 partition@b00000 {
309 label = "reserved3";
310 reg = <0xb00000 0x500000>;
311 read-only;
312 };
313
314 partition@1000000 {
315 label = "web";
316 reg = <0x1000000 0x800000>;
317 };
318
319 partition@1800000 {
320 label = "rootfs";
321 reg = <0x1800000 0x1d00000>;
322 };
323
324 partition@3500000 {
325 label = "data";
326 reg = <0x3500000 0x1900000>;
327 };
328
329 partition@4e00000 {
330 label = "fota";
331 reg = <0x4e00000 0x3200000>;
332 };
333 };
334 };
335 };
336
337 &qpic_bam {
338 status = "okay";
339 };
340
341 &tlmm {
342 i2c_0_pins: i2c_0_pinmux {
343 mux {
344 pins = "gpio20", "gpio21";
345 function = "blsp_i2c0";
346 bias-disable;
347 };
348 };
349
350 mdio_pins: mdio_pinmux {
351 mux_1 {
352 pins = "gpio6";
353 function = "mdio";
354 bias-pull-up;
355 };
356
357 mux_2 {
358 pins = "gpio7";
359 function = "mdc";
360 bias-pull-up;
361 };
362 };
363
364 nand_pins: nand_pins {
365 pullups {
366 pins = "gpio52", "gpio53", "gpio58",
367 "gpio59";
368 function = "qpic";
369 bias-pull-up;
370 };
371
372 pulldowns {
373 pins = "gpio54", "gpio55", "gpio56",
374 "gpio57", "gpio60",
375 "gpio62", "gpio63", "gpio64",
376 "gpio65", "gpio66", "gpio67",
377 "gpio69";
378 function = "qpic";
379 bias-pull-down;
380 };
381 };
382
383 serial_pins: serial_pinmux {
384 mux {
385 pins = "gpio16", "gpio17";
386 function = "blsp_uart0";
387 bias-disable;
388 };
389 };
390
391 spi_0_pins: spi_0_pinmux {
392 pinmux {
393 function = "blsp_spi0";
394 pins = "gpio13", "gpio14", "gpio15";
395 drive-strength = <12>;
396 bias-disable;
397 };
398
399 pinmux_cs {
400 function = "gpio";
401 pins = "gpio12";
402 drive-strength = <2>;
403 bias-disable;
404 output-high;
405 };
406 };
407 };
408
409 &usb2_hs_phy {
410 status = "okay";
411 };
412
413 &usb3_ss_phy {
414 status = "okay";
415 };
416
417 &usb3_hs_phy {
418 status = "okay";
419 };
420
421 &wifi0 {
422 status = "okay";
423 nvmem-cell-names = "pre-calibration", "mac-address";
424 nvmem-cells = <&precal_art_1000>, <&macaddr_config_0>;
425 mac-address-increment = <2>;
426 qcom,ath10k-calibration-variant = "zte,mf286d";
427 };
428
429 &wifi1 {
430 status = "okay";
431 nvmem-cell-names = "pre-calibration", "mac-address";
432 nvmem-cells = <&precal_art_5000>, <&macaddr_config_0>;
433 mac-address-increment = <3>;
434 qcom,ath10k-calibration-variant = "zte,mf286d";
435 };