e4bd72c532c2686936f44cecfafc1accfb66dae7
[openwrt/staging/robimarko.git] / target / linux / qualcommax / files / arch / arm64 / boot / dts / qcom / ipq8072-wpq873.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /* Copyright 2023 Nokia */
3
4 /dts-v1/;
5
6 #include "ipq8074.dtsi"
7 #include "ipq8074-hk-cpu.dtsi"
8 #include "ipq8074-ess.dtsi"
9 #include <dt-bindings/gpio/gpio.h>
10 #include <dt-bindings/input/input.h>
11 #include <dt-bindings/leds/common.h>
12
13 / {
14 model = "Compex WPQ873";
15 compatible = "compex,wpq873", "qcom,ipq8074";
16
17 aliases {
18 serial0 = &blsp1_uart5;
19 led-boot = &led_power_blue;
20 led-failsafe = &led_power_red;
21 led-running = &led_system_green;
22 led-upgrade = &led_system_blue;
23 /* Aliases as required by u-boot to patch MAC addresses */
24 ethernet0 = &dp6;
25 ethernet1 = &dp2;
26 ethernet2 = &dp3;
27 ethernet3 = &dp4;
28 label-mac-device = &dp6;
29 };
30
31 chosen {
32 stdout-path = "serial0:115200n8";
33 bootargs-append = " root=/dev/ubiblock0_1";
34 };
35
36 keys {
37 compatible = "gpio-keys";
38
39 reset {
40 label = "reset";
41 gpios = <&tlmm 21 GPIO_ACTIVE_LOW>;
42 linux,code = <KEY_RESTART>;
43 };
44 };
45
46 leds {
47 compatible = "gpio-leds";
48
49 led_power_red: power-red {
50 gpios = <&tlmm 42 GPIO_ACTIVE_HIGH>;
51 color = <LED_COLOR_ID_RED>;
52 };
53
54 led_power_blue: power-blue {
55 gpios = <&tlmm 43 GPIO_ACTIVE_HIGH>;
56 color = <LED_COLOR_ID_BLUE>;
57 };
58
59 led_system_red: system-red {
60 gpios = <&tlmm 28 GPIO_ACTIVE_HIGH>;
61 color = <LED_COLOR_ID_RED>;
62 };
63
64 led_system_green: system-green {
65 gpios = <&tlmm 18 GPIO_ACTIVE_HIGH>;
66 color = <LED_COLOR_ID_GREEN>;
67 };
68
69 led_system_blue: system-blue {
70 gpios = <&tlmm 19 GPIO_ACTIVE_HIGH>;
71 color = <LED_COLOR_ID_BLUE>;
72 };
73 };
74 };
75
76 &tlmm {
77 mdio_pins: mdio-pins {
78 mdc {
79 pins = "gpio68";
80 function = "mdc";
81 drive-strength = <8>;
82 bias-pull-up;
83 };
84
85 mdio {
86 pins = "gpio69";
87 function = "mdio";
88 drive-strength = <8>;
89 bias-pull-up;
90 };
91 };
92
93 i2c_pins: i2c-pins {
94 pins = "gpio0", "gpio2";
95 function = "blsp5_i2c";
96 drive-strength = <8>;
97 bias-disable;
98 };
99 };
100
101 &blsp1_uart5 {
102 status = "okay";
103 };
104
105 &blsp1_i2c6 {
106 status = "okay";
107
108 pinctrl-0 = <&i2c_pins>;
109 pinctrl-names = "default";
110 };
111
112 &prng {
113 status = "okay";
114 };
115
116 &cryptobam {
117 status = "okay";
118 };
119
120 &crypto {
121 status = "okay";
122 };
123
124 &qpic_bam {
125 status = "okay";
126 };
127
128 &blsp1_spi1 {
129 status = "okay";
130 };
131
132 &tlmm {
133 mdio_pins: mdio-pins {
134 mdc {
135 pins = "gpio68";
136 function = "mdc";
137 drive-strength = <8>;
138 bias-pull-up;
139 };
140
141 mdio {
142 pins = "gpio69";
143 function = "mdio";
144 drive-strength = <8>;
145 bias-pull-up;
146 };
147 };
148
149 button_pins: button_pins {
150 reset_button {
151 pins = "gpio66";
152 function = "gpio";
153 drive-strength = <8>;
154 bias-pull-up;
155 };
156 };
157 };
158
159 &blsp1_spi1 {
160 status = "okay";
161
162 flash@0 {
163 #address-cells = <1>;
164 #size-cells = <1>;
165 reg = <0>;
166 compatible = "jedec,spi-nor";
167 spi-max-frequency = <50000000>;
168
169 partitions {
170 compatible = "fixed-partitions";
171 #address-cells = <1>;
172 #size-cells = <1>;
173
174 partition@0 {
175 label = "0:sbl1";
176 reg = <0x0 0x50000>;
177 read-only;
178 };
179
180 partition@50000 {
181 label = "0:mibib";
182 reg = <0x50000 0x10000>;
183 read-only;
184 };
185
186 partition@60000 {
187 label = "0:bootconfig";
188 reg = <0x60000 0x20000>;
189 read-only;
190 };
191
192 partition@80000 {
193 label = "0:bootconfig1";
194 reg = <0x80000 0x20000>;
195 read-only;
196 };
197
198 partition@a0000 {
199 label = "0:qsee";
200 reg = <0xa0000 0x180000>;
201 read-only;
202 };
203
204 partition@220000 {
205 label = "0:qsee_1";
206 reg = <0x220000 0x180000>;
207 read-only;
208 };
209
210 partition@3a0000 {
211 label = "0:devcfg";
212 reg = <0x3a0000 0x10000>;
213 read-only;
214 };
215
216 partition@3b0000 {
217 label = "0:devcfg_1";
218 reg = <0x3b0000 0x10000>;
219 read-only;
220 };
221
222 partition@3c0000 {
223 label = "0:apdp";
224 reg = <0x3c0000 0x10000>;
225 read-only;
226 };
227
228 partition@3d0000 {
229 label = "0:apdp_1";
230 reg = <0x3d0000 0x10000>;
231 read-only;
232 };
233
234 partition@3e0000 {
235 label = "0:rpm";
236 reg = <0x3e0000 0x40000>;
237 read-only;
238 };
239
240 partition@420000 {
241 label = "0:rpm_1";
242 reg = <0x420000 0x40000>;
243 read-only;
244 };
245
246 partition@460000 {
247 label = "0:cdt";
248 reg = <0x460000 0x10000>;
249 read-only;
250 };
251
252 partition@470000 {
253 label = "0:cdt_1";
254 reg = <0x470000 0x10000>;
255 read-only;
256 };
257
258 partition@480000 {
259 label = "0:appsblenv";
260 reg = <0x480000 0x10000>;
261 };
262
263 partition@490000 {
264 label = "0:appsbl";
265 reg = <0x490000 0xa0000>;
266 read-only;
267 };
268
269 partition@550000 {
270 label = "0:appsbl_1";
271 reg = <0x530000 0xa0000>;
272 read-only;
273 };
274
275 partition@610000 {
276 label = "0:art";
277 reg = <0x5d0000 0x40000>;
278 read-only;
279 };
280
281 partition@650000 {
282 label = "0:ethphyfw";
283 reg = <0x610000 0x80000>;
284 read-only;
285 };
286 };
287 };
288 };
289
290 &qpic_nand {
291 status = "okay";
292
293 nand@0 {
294 reg = <0>;
295 nand-ecc-strength = <8>;
296 nand-ecc-step-size = <512>;
297 nand-bus-width = <8>;
298
299 partitions {
300 compatible = "fixed-partitions";
301 #address-cells = <1>;
302 #size-cells = <1>;
303
304 partition@0 {
305 label = "rootfs";
306 reg = <0x0000000 0x3400000>;
307 };
308
309 partition@3400000 {
310 label = "0:wififw";
311 reg = <0x3400000 0x800000>;
312 read-only;
313 };
314
315 partition@3c00000 {
316 label = "rootfs_1";
317 reg = <0x3c00000 0x3400000>;
318 };
319
320 partition@7000000 {
321 label = "0:wififw_1";
322 reg = <0x7000000 0x800000>;
323 read-only;
324 };
325 };
326 };
327 };
328
329 &qusb_phy_0 {
330 status = "okay";
331 };
332
333 &qusb_phy_1 {
334 status = "okay";
335 };
336
337 &ssphy_0 {
338 status = "okay";
339 };
340
341 &ssphy_1 {
342 status = "okay";
343 };
344
345 &usb_0 {
346 status = "okay";
347 };
348
349 &usb_1 {
350 status = "okay";
351 };
352
353
354 &mdio {
355 status = "okay";
356 pinctrl-0 = <&mdio_pins>;
357 pinctrl-names = "default";
358 reset-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;
359
360 qca8075_1: ethernet-phy@1 {
361 compatible = "ethernet-phy-ieee802.3-c22";
362 reg = <1>;
363 };
364
365 qca8075_2: ethernet-phy@2 {
366 compatible = "ethernet-phy-ieee802.3-c22";
367 reg = <2>;
368 };
369
370 qca8075_3: ethernet-phy@3 {
371 compatible = "ethernet-phy-ieee802.3-c22";
372 reg = <3>;
373 };
374
375 qca8081: ethernet-phy@28 {
376 compatible = "ethernet-phy-ieee802.3-c22";
377 reg = <28>;
378 reset-gpios = <&tlmm 44 GPIO_ACTIVE_LOW>;
379 };
380
381 };
382
383 &switch {
384 status = "okay";
385
386 switch_lan_bmp = <(ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; /* lan port bitmap */
387 switch_wan_bmp = <ESS_PORT6>; /* wan port bitmap */
388 switch_mac_mode = <MAC_MODE_PSGMII>; /* mac mode for uniphy instance0*/
389 switch_mac_mode1 = <MAC_MODE_SGMII_CHANNEL0>; /* mac mode for uniphy instance1*/
390 switch_mac_mode2 = <MAC_MODE_SGMII_CHANNEL0>; /* mac mode for uniphy instance2*/
391
392 qcom,port_phyinfo {
393 port@2 {
394 port_id = <2>;
395 phy_address = <1>;
396 };
397 port@3 {
398 port_id = <3>;
399 phy_address = <2>;
400 };
401 port@4 {
402 port_id = <4>;
403 phy_address = <3>;
404 };
405 port@6 {
406 port_id = <6>;
407 phy_address = <28>;
408 port_mac_sel = "QGMAC_PORT";
409 };
410 };
411 };
412
413 &edma {
414 status = "okay";
415 };
416
417 &dp2 {
418 status = "okay";
419 phy-handle = <&qca8075_1>;
420 label = "lan1";
421 };
422
423 &dp3 {
424 status = "okay";
425 phy-handle = <&qca8075_2>;
426 label = "lan2";
427 };
428
429 &dp4 {
430 status = "okay";
431 phy-handle = <&qca8075_3>;
432 label = "lan3";
433 };
434
435 &dp6 {
436 status = "okay";
437 phy-handle = <&qca8081>;
438 label = "wan";
439 };
440
441 &pcie_qmp0 {
442 status = "okay";
443 };
444
445 &pcie0 {
446 status = "okay";
447
448 perst-gpio = <&tlmm 58 GPIO_ACTIVE_LOW>;
449
450 bridge@0,0 {
451 reg = <0x00020000 0 0 0 0>;
452 #address-cells = <3>;
453 #size-cells = <2>;
454 ranges;
455 };
456 };
457
458 &pcie_qmp1 {
459 status = "okay";
460 };
461
462 &pcie1 {
463 status = "okay";
464
465 perst-gpio = <&tlmm 62 GPIO_ACTIVE_HIGH>;
466
467 bridge@1,0 {
468 reg = <0x00010000 0 0 0 0>;
469 #address-cells = <3>;
470 #size-cells = <2>;
471 ranges;
472 };
473 };
474
475 &wifi {
476 status = "okay";
477
478 qcom,ath11k-calibration-variant = "Compex-WPQ873";
479 };