6c285f4b8adaa4c524a5fa324ccd70539ea1d390
[openwrt/staging/neocturne.git] / target / linux / ipq40xx / files / arch / arm / boot / dts / qcom-ipq4018-mf287plus.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 // Copyright (c) 2022, Pawel Dembicki <paweldembicki@gmail.com>.
3 // Copyright (c) 2022, Giammarco Marzano <stich86@gmail.com>.
4 // Copyright (c) 2023, Andreas Böhler <dev@aboehler.at>
5
6 #include "qcom-ipq4019.dtsi"
7 #include <dt-bindings/soc/qcom,tcsr.h>
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 MF287Plus";
14 compatible = "zte,mf287plus";
15
16 aliases {
17 led-boot = &led_status;
18 led-failsafe = &led_status;
19 led-running = &led_status;
20 led-upgrade = &led_status;
21 };
22
23 chosen {
24 /*
25 * bootargs forced by u-boot bootipq command:
26 * 'ubi.mtd=rootfs root=mtd:ubi_rootfs rootfstype=squashfs rootwait'
27 */
28 bootargs-append = " root=/dev/ubiblock0_1";
29 };
30
31 /*
32 * This node is used to restart modem module to avoid anomalous
33 * behaviours on initial communication.
34 */
35 gpio-restart {
36 compatible = "gpio-restart";
37 gpios = <&tlmm 5 GPIO_ACTIVE_HIGH>;
38 };
39
40 leds {
41 compatible = "gpio-leds";
42
43 led_status: led-0 {
44 label = "blue:power";
45 function = LED_FUNCTION_POWER;
46 color = <LED_COLOR_ID_BLUE>;
47 gpios = <&tlmm 0 GPIO_ACTIVE_LOW>;
48 };
49 };
50
51 keys {
52 compatible = "gpio-keys";
53
54 key-reset {
55 label = "reset";
56 linux,code = <KEY_RESTART>;
57 gpios = <&tlmm 63 GPIO_ACTIVE_LOW>;
58 };
59
60 key-wps {
61 label = "wps";
62 linux,code = <KEY_WPS_BUTTON>;
63 gpios = <&tlmm 2 GPIO_ACTIVE_LOW>;
64 };
65 };
66
67 soc {
68 rng@22000 {
69 status = "okay";
70 };
71
72 tcsr@1949000 {
73 compatible = "qcom,tcsr";
74 reg = <0x1949000 0x100>;
75 qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
76 };
77
78 tcsr@194b000 {
79 /* select hostmode */
80 compatible = "qcom,tcsr";
81 reg = <0x194b000 0x100>;
82 qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
83 status = "okay";
84 };
85
86 ess_tcsr@1953000 {
87 compatible = "qcom,tcsr";
88 reg = <0x1953000 0x1000>;
89 qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
90 };
91
92 tcsr@1957000 {
93 compatible = "qcom,tcsr";
94 reg = <0x1957000 0x100>;
95 qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
96 };
97 };
98 };
99
100 &mdio {
101 status = "okay";
102 };
103
104 &watchdog {
105 status = "okay";
106 };
107
108 &blsp_dma {
109 status = "okay";
110 };
111
112 &usb2 {
113 status = "okay";
114 };
115
116 &usb3 {
117 status = "okay";
118 };
119
120 &blsp1_spi1 {
121 pinctrl-0 = <&spi_0_pins>;
122 pinctrl-names = "default";
123 status = "okay";
124 cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>,
125 <&tlmm 59 GPIO_ACTIVE_HIGH>,
126 <&tlmm 1 GPIO_ACTIVE_HIGH>;
127
128 flash@0 {
129 compatible = "jedec,spi-nor";
130 #address-cells = <1>;
131 #size-cells = <1>;
132 reg = <0>;
133 spi-max-frequency = <24000000>;
134
135 partitions {
136 compatible = "fixed-partitions";
137 #address-cells = <1>;
138 #size-cells = <1>;
139
140 partition@0 {
141 label = "0:SBL1";
142 reg = <0x0 0x40000>;
143 read-only;
144 };
145
146 partition@40000 {
147 label = "0:MIBIB";
148 reg = <0x40000 0x20000>;
149 read-only;
150 };
151
152 partition@60000 {
153 label = "0:QSEE";
154 reg = <0x60000 0x60000>;
155 read-only;
156 };
157
158 partition@c0000 {
159 label = "0:CDT";
160 reg = <0xc0000 0x10000>;
161 read-only;
162 };
163
164 partition@d0000 {
165 label = "0:DDRPARAMS";
166 reg = <0xd0000 0x10000>;
167 read-only;
168 };
169
170 partition@e0000 {
171 label = "0:APPSBLENV";
172 reg = <0xe0000 0x10000>;
173 read-only;
174 };
175
176 partition@f0000 {
177 label = "0:APPSBL";
178 reg = <0xf0000 0xc0000>;
179 read-only;
180 };
181
182 partition@1b0000 {
183 label = "0:reserved1";
184 reg = <0x1b0000 0x50000>;
185 read-only;
186 };
187 };
188 };
189
190 spi-nand@1 { /* flash@1 ? */
191 compatible = "spi-nand";
192 reg = <1>;
193 spi-max-frequency = <24000000>;
194
195 partitions {
196 compatible = "fixed-partitions";
197 #address-cells = <1>;
198 #size-cells = <1>;
199
200 partition@0 {
201 label = "fota-flag";
202 reg = <0x0 0x140000>;
203 read-only;
204 };
205
206 partition@140000 {
207 label = "ART";
208 reg = <0x140000 0x140000>;
209 read-only;
210 compatible = "nvmem-cells";
211 #address-cells = <1>;
212 #size-cells = <1>;
213
214 precal_art_1000: precal@1000 {
215 reg = <0x1000 0x2f20>;
216 };
217
218 precal_art_5000: precal@5000 {
219 reg = <0x5000 0x2f20>;
220 };
221 };
222
223 partition@280000 {
224 label = "mac";
225 reg = <0x280000 0x140000>;
226 read-only;
227 compatible = "nvmem-cells";
228 #address-cells = <1>;
229 #size-cells = <1>;
230
231 macaddr_mac_0: macaddr@0 {
232 reg = <0x0 0x6>;
233 };
234 };
235
236 partition@3c0000 {
237 label = "cfg-param";
238 reg = <0x3c0000 0x600000>;
239 read-only;
240 };
241
242 partition@9c0000 {
243 label = "oops";
244 reg = <0x9c0000 0x140000>;
245 };
246
247 partition@b00000 {
248 label = "web";
249 reg = <0xb00000 0x800000>;
250 };
251
252 partition@1300000 {
253 label = "rootfs";
254 reg = <0x1300000 0x2200000>;
255 };
256
257 partition@3500000 {
258 label = "data";
259 reg = <0x3500000 0x1900000>;
260 };
261
262 partition@4e00000 {
263 label = "fota";
264 reg = <0x4e00000 0x3200000>;
265 };
266 };
267 };
268
269 zigbee@2 {
270 #address-cells = <1>;
271 #size-cells = <0>;
272
273 compatible = "silabs,em3581";
274 reg = <2>;
275 spi-max-frequency = <12000000>;
276 };
277 };
278
279 &blsp1_uart1 {
280 pinctrl-0 = <&serial_pins>;
281 pinctrl-names = "default";
282 status = "okay";
283 };
284
285 &crypto {
286 status = "okay";
287 };
288
289 &cryptobam {
290 status = "okay";
291 };
292
293 &gmac {
294 status = "okay";
295 nvmem-cell-names = "mac-address";
296 nvmem-cells = <&macaddr_mac_0>;
297 mac-address-increment = <2>;
298 };
299
300 &switch {
301 status = "okay";
302 };
303
304 &swport2 {
305 status = "okay";
306
307 label = "lan1";
308 };
309
310 &swport3 {
311 status = "okay";
312
313 label = "lan2";
314 };
315
316 &swport4 {
317 status = "okay";
318
319 label = "lan3";
320 };
321
322 &swport5 {
323 status = "okay";
324
325 label = "lan4";
326 };
327
328 &qpic_bam {
329 status = "okay";
330 };
331
332 &tlmm {
333 serial_pins: serial_pinmux {
334 mux {
335 pins = "gpio60", "gpio61";
336 function = "blsp_uart0";
337 bias-disable;
338 };
339 };
340
341 spi_0_pins: spi_0_pinmux {
342 pinmux {
343 function = "blsp_spi0";
344 pins = "gpio55", "gpio56", "gpio57";
345 drive-strength = <12>;
346 bias-disable;
347 };
348
349 pinmux_cs {
350 function = "gpio";
351 pins = "gpio54", "gpio59", "gpio1";
352 drive-strength = <2>;
353 bias-disable;
354 output-high;
355 };
356 };
357 };
358
359 &usb2_hs_phy {
360 status = "okay";
361 };
362
363 &usb3_ss_phy {
364 status = "okay";
365 };
366
367 &usb3_hs_phy {
368 status = "okay";
369 };
370
371 &wifi0 {
372 status = "okay";
373 nvmem-cell-names = "pre-calibration", "mac-address";
374 nvmem-cells = <&precal_art_1000>, <&macaddr_mac_0>;
375 qcom,ath10k-calibration-variant = "zte,mf287plus";
376 };
377
378 &wifi1 {
379 status = "okay";
380 nvmem-cell-names = "pre-calibration", "mac-address";
381 nvmem-cells = <&precal_art_5000>, <&macaddr_mac_0>;
382 mac-address-increment = <1>;
383 qcom,ath10k-calibration-variant = "zte,mf287plus";
384 };