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