blob: 718716e23f2d8fca42bf823983f721c6413595e3 [file] [log] [blame]
developer2cdaeb12022-10-04 20:25:05 +08001// SPDX-License-Identifier: (GPL-2.0 OR MIT)
2/*
3 * Copyright (C) 2021 MediaTek Inc.
4 * Author: Sam.Shih <sam.shih@mediatek.com>
5 */
6
7#include <dt-bindings/interrupt-controller/irq.h>
8#include <dt-bindings/interrupt-controller/arm-gic.h>
9#include <dt-bindings/phy/phy.h>
10#include <dt-bindings/reset/ti-syscon.h>
11#include <dt-bindings/clock/mt7988-clk.h>
12#include <dt-bindings/pinctrl/mt65xx.h>
13#include <dt-bindings/thermal/thermal.h>
14#include <dt-bindings/regulator/richtek,rt5190a-regulator.h>
15#include <dt-bindings/power/mt7988-power.h>
16
17/ {
18 compatible = "mediatek,mt7988-rfb";
19 interrupt-parent = <&gic>;
20 #address-cells = <2>;
21 #size-cells = <2>;
22 cpus {
23 #address-cells = <1>;
24 #size-cells = <0>;
25 cpu@0 {
26 device_type = "cpu";
27 compatible = "arm,cortex-a73";
28 enable-method = "psci";
29 reg = <0x0>;
30 clocks = <&mcusys CK_MCU_ARM_DIV_SEL>,
31 <&topckgen CK_TOP_CB_NET1_D4>,
32 <&apmixedsys CK_APMIXED_ARM_B>,
33 <&mcusys CK_MCU_BUS_DIV_SEL>,
34 <&apmixedsys CK_APMIXED_CCIPLL2_B>;
35 clock-names = "cpu", "intermediate", "armpll", "cci",
36 "ccipll";
37 operating-points-v2 = <&cluster0_opp>;
38 nvmem-cells = <&cpufreq_calibration>;
39 nvmem-cell-names = "calibration-data";
40 };
41
42 cpu@1 {
43 device_type = "cpu";
44 compatible = "arm,cortex-a73";
45 enable-method = "psci";
46 reg = <0x1>;
47 clocks = <&mcusys CK_MCU_ARM_DIV_SEL>,
48 <&topckgen CK_TOP_CB_NET1_D4>,
49 <&apmixedsys CK_APMIXED_ARM_B>,
50 <&mcusys CK_MCU_BUS_DIV_SEL>,
51 <&apmixedsys CK_APMIXED_CCIPLL2_B>;
52 clock-names = "cpu", "intermediate", "armpll", "cci",
53 "ccipll";
54 operating-points-v2 = <&cluster0_opp>;
55 nvmem-cells = <&cpufreq_calibration>;
56 nvmem-cell-names = "calibration-data";
57 };
58
59 cpu@2 {
60 device_type = "cpu";
61 compatible = "arm,cortex-a73";
62 enable-method = "psci";
63 reg = <0x2>;
64 clocks = <&mcusys CK_MCU_ARM_DIV_SEL>,
65 <&topckgen CK_TOP_CB_NET1_D4>,
66 <&apmixedsys CK_APMIXED_ARM_B>,
67 <&mcusys CK_MCU_BUS_DIV_SEL>,
68 <&apmixedsys CK_APMIXED_CCIPLL2_B>;
69 clock-names = "cpu", "intermediate", "armpll", "cci",
70 "ccipll";
71 operating-points-v2 = <&cluster0_opp>;
72 nvmem-cells = <&cpufreq_calibration>;
73 nvmem-cell-names = "calibration-data";
74 };
75
76 cpu@3 {
77 device_type = "cpu";
78 compatible = "arm,cortex-a73";
79 enable-method = "psci";
80 reg = <0x3>;
81 clocks = <&mcusys CK_MCU_ARM_DIV_SEL>,
82 <&topckgen CK_TOP_CB_NET1_D4>,
83 <&apmixedsys CK_APMIXED_ARM_B>,
84 <&mcusys CK_MCU_BUS_DIV_SEL>,
85 <&apmixedsys CK_APMIXED_CCIPLL2_B>;
86 clock-names = "cpu", "intermediate", "armpll", "cci",
87 "ccipll";
88 operating-points-v2 = <&cluster0_opp>;
89 nvmem-cells = <&cpufreq_calibration>;
90 nvmem-cell-names = "calibration-data";
91 };
92
93 cluster0_opp: opp_table0 {
94 compatible = "operating-points-v2";
95 opp-shared;
96 opp00 {
97 opp-hz = /bits/ 64 <800000000>;
98 opp-microvolt = <850000>;
99 };
100 opp01 {
101 opp-hz = /bits/ 64 <1100000000>;
102 opp-microvolt = <850000>;
103 };
104 opp02 {
105 opp-hz = /bits/ 64 <1500000000>;
106 opp-microvolt = <850000>;
107 };
108 opp03 {
109 opp-hz = /bits/ 64 <1800000000>;
110 opp-microvolt = <900000>;
111 };
112 };
113 };
114
115 thermal-zones {
116 cpu_thermal: cpu-thermal {
117 polling-delay-passive = <1000>;
118 polling-delay = <1000>;
119 thermal-sensors = <&lvts 0>;
120 trips {
121 cpu_trip_crit: crit {
122 temperature = <125000>;
123 hysteresis = <2000>;
124 type = "critical";
125 };
126
127 cpu_trip_hot: hot {
128 temperature = <120000>;
129 hysteresis = <2000>;
130 type = "hot";
131 };
132
133 cpu_trip_active_high: active-high {
134 temperature = <115000>;
135 hysteresis = <2000>;
136 type = "active";
137 };
138
139 cpu_trip_active_low: active-low {
140 temperature = <85000>;
141 hysteresis = <2000>;
142 type = "active";
143 };
144
145 cpu_trip_passive: passive {
146 temperature = <40000>;
147 hysteresis = <2000>;
148 type = "passive";
149 };
150 };
151
152 cooling-maps {
153 cpu-active-high {
154 /* active: set fan to cooling level 2 */
155 cooling-device = <&fan 2 2>;
156 trip = <&cpu_trip_active_high>;
157 };
158
159 cpu-active-low {
160 /* active: set fan to cooling level 1 */
161 cooling-device = <&fan 1 1>;
162 trip = <&cpu_trip_active_low>;
163 };
164
165 cpu-passive {
166 /* passive: set fan to cooling level 0 */
167 cooling-device = <&fan 0 0>;
168 trip = <&cpu_trip_passive>;
169 };
170 };
171
172 };
173 };
174
175 mmc0: mmc@11230000 {
176 compatible = "mediatek,mt7986-mmc";
177 reg = <0 0x11230000 0 0x1000>,
178 <0 0x11D60000 0 0x1000>;
179 interrupts = <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>;
180 clocks = <&infracfg_ao CK_INFRA_MSDC400>,
181 <&infracfg_ao CK_INFRA_MSDC2_HCK>,
182 <&infracfg_ao CK_INFRA_133M_MSDC_0_HCK>,
183 <&infracfg_ao CK_INFRA_66M_MSDC_0_HCK>;
184 clock-names = "source", "hclk", "ahb_cg", "axi_cg";
185 status = "disabled";
186 };
187
188 wed: wed@15010000 {
189 compatible = "mediatek,wed";
190 wed_num = <3>;
191 /* add this property for wed get the pci slot number. */
192 pci_slot_map = <0>, <1>, <2>;
193 reg = <0 0x15010000 0 0x2000>,
194 <0 0x15012000 0 0x2000>,
195 <0 0x15014000 0 0x2000>;
196 interrupt-parent = <&gic>;
197 interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>,
198 <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>,
199 <GIC_SPI 270 IRQ_TYPE_LEVEL_HIGH>;
200 };
201
202 wed2: wed2@15012000 {
203 compatible = "mediatek,wed2";
204 wed_num = <3>;
205 /* add this property for wed get the pci slot number. */
206 reg = <0 0x15010000 0 0x2000>,
207 <0 0x15012000 0 0x2000>,
208 <0 0x15014000 0 0x2000>;
209 interrupt-parent = <&gic>;
210 interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>,
211 <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>,
212 <GIC_SPI 270 IRQ_TYPE_LEVEL_HIGH>;
213 };
214
215 wed3: wed3@15014000 {
216 compatible = "mediatek,wed3";
217 wed_num = <3>;
218 /* add this property for wed get the pci slot number. */
219 reg = <0 0x15010000 0 0x2000>,
220 <0 0x15012000 0 0x2000>,
221 <0 0x15014000 0 0x2000>;
222 interrupt-parent = <&gic>;
223 interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>,
224 <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>,
225 <GIC_SPI 270 IRQ_TYPE_LEVEL_HIGH>;
226 };
227
228 wdma: wdma@15104800 {
229 compatible = "mediatek,wed-wdma";
230 reg = <0 0x15104800 0 0x400>,
231 <0 0x15104c00 0 0x400>,
232 <0 0x15105000 0 0x400>;
233 };
234
235 ap2woccif: ap2woccif@151A5000 {
236 compatible = "mediatek,ap2woccif";
237 reg = <0 0x151A5000 0 0x1000>,
238 <0 0x152A5000 0 0x1000>,
239 <0 0x153A5000 0 0x1000>;
240 interrupt-parent = <&gic>;
241 interrupts = <GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH>,
242 <GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH>,
243 <GIC_SPI 272 IRQ_TYPE_LEVEL_HIGH>;
244 };
245
246 wocpu0_ilm: wocpu0_ilm@151E0000 {
247 compatible = "mediatek,wocpu0_ilm";
248 reg = <0 0x151E0000 0 0x8000>;
249 };
250
251 wocpu1_ilm: wocpu1_ilm@152E0000 {
252 compatible = "mediatek,wocpu1_ilm";
253 reg = <0 0x152E0000 0 0x8000>;
254 };
255
256 wocpu2_ilm: wocpu2_ilm@153E0000 {
257 compatible = "mediatek,wocpu2_ilm";
258 reg = <0 0x153E0000 0 0x8000>;
259 };
260
261 wocpu_dlm: wocpu_dlm@151E8000 {
262 compatible = "mediatek,wocpu_dlm";
263 reg = <0 0x151E8000 0 0x2000>,
264 <0 0x152E8000 0 0x2000>,
265 <0 0x153E8000 0 0x2000>;
266
267 resets = <&ethsysrst 0>;
268 reset-names = "wocpu_rst";
269 };
270
271 cpu_boot: wocpu_boot@15194000 {
272 compatible = "mediatek,wocpu_boot";
273 reg = <0 0x15194000 0 0x1000>,
274 <0 0x15294000 0 0x1000>,
275 <0 0x15394000 0 0x1000>;
276 };
277
278 reserved-memory {
279 #address-cells = <2>;
280 #size-cells = <2>;
281 ranges;
282
283 /* 192 KiB reserved for ARM Trusted Firmware (BL31) */
284 secmon_reserved: secmon@43000000 {
285 reg = <0 0x43000000 0 0x30000>;
286 no-map;
287 };
288
289 wmcpu_emi: wmcpu-reserved@47CC0000 {
290 compatible = "mediatek,wmcpu-reserved";
291 no-map;
292 reg = <0 0x47CC0000 0 0x00100000>;
293 };
294
295 wocpu0_emi: wocpu0_emi@4F600000 {
296 compatible = "mediatek,wocpu0_emi";
297 no-map;
298 reg = <0 0x4F600000 0 0x40000>;
299 shared = <0>;
300 };
301
302 wocpu1_emi: wocpu1_emi@4F640000 {
303 compatible = "mediatek,wocpu1_emi";
304 no-map;
305 reg = <0 0x4F640000 0 0x40000>;
306 shared = <0>;
307 };
308
309 wocpu2_emi: wocpu2_emi@4F680000 {
310 compatible = "mediatek,wocpu2_emi";
311 no-map;
312 reg = <0 0x4F680000 0 0x40000>;
313 shared = <0>;
314 };
315
316 wocpu_data: wocpu_data@4F700000 {
317 compatible = "mediatek,wocpu_data";
318 no-map;
319 reg = <0 0x4F700000 0 0x800000>;
320 shared = <1>;
321 };
322 };
323
324 psci {
325 compatible = "arm,psci-0.2";
326 method = "smc";
327 };
328
329 system_clk: dummy_system_clk {
330 compatible = "fixed-clock";
331 clock-frequency = <40000000>;
332 #clock-cells = <0>;
333 };
334
335 uart_clk: dummy_uart_clk {
336 compatible = "fixed-clock";
337 clock-frequency = <40000000>;
338 #clock-cells = <0>;
339 };
340
341 timer {
342 compatible = "arm,armv8-timer";
343 interrupt-parent = <&gic>;
344 interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>,
345 <GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>,
346 <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>,
347 <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>;
348
349 };
350
351 tops: tops@09100000 {
352 compatible = "mediatek,tops";
353 reg = <0 0x09100000 0 0x01000000>;
354 reg-names = "tops-base";
355 clocks = <&topckgen CK_TOP_BUS_TOPS_SEL>,
356 <&topckgen CK_TOP_TOPS_P2_26M_SEL>,
357 <&topckgen CK_TOP_NETSYS_TOPS_400M_SEL>,
358 <&topckgen CK_TOP_NPU_TOPS_SEL>,
359 <&topckgen CK_TOP_CK_NPU_SEL_CM_TOPS_SEL>;
360 clock-names = "bus", "sram", "xdma", "offload", "mgmt";
developer94194c92022-10-14 14:02:25 +0800361 power-domains = <&topmisc MT7988_POWER_DOMAIN_TOPS0>,
362 <&topmisc MT7988_POWER_DOMAIN_TOPS1>;
363
developer2cdaeb12022-10-04 20:25:05 +0800364 interrupt-parent = <&gic>;
365 interrupts = <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH>,
366 <GIC_SPI 280 IRQ_TYPE_LEVEL_HIGH>;
367 interrupt-names = "tdma-tx-pause", "mbox";
developer94194c92022-10-14 14:02:25 +0800368
developer2cdaeb12022-10-04 20:25:05 +0800369 fe_mem = <&eth>;
developer2cdaeb12022-10-04 20:25:05 +0800370 };
developer94194c92022-10-14 14:02:25 +0800371
developer2cdaeb12022-10-04 20:25:05 +0800372 hpdma1: hpdma@09106000 {
373 compatible = "mediatek,hpdma-top";
374 reg = <0 0x09106000 0 0x1000>;
375 reg-names = "base";
376 };
developer94194c92022-10-14 14:02:25 +0800377
developer2cdaeb12022-10-04 20:25:05 +0800378 hpdma2: hpdma@09606000 {
379 compatible = "mediatek,hpdma-sub";
380 reg = <0 0x09606000 0 0x1000>;
381 reg-names = "base";
382 };
383
384 watchdog: watchdog@1001c000 {
385 compatible = "mediatek,mt7622-wdt",
386 "mediatek,mt6589-wdt",
387 "syscon";
388 reg = <0 0x1001c000 0 0x1000>;
389 interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
390 #reset-cells = <1>;
391 };
392
393 phyfw: phy-firmware@f000000 {
394 compatible = "mediatek,2p5gphy-fw";
395 reg = <0 0x0f000000 0 0x8000>,
396 <0 0x0f100000 0 0x20000>,
397 <0 0x0f0f0000 0 0x200>;
398 };
399
developer23021292022-10-21 19:10:10 +0800400 boottrap: boottrap@1001f6f0 {
401 compatible = "mediatek,boottrap";
402 reg = <0 0x1001f6f0 0 0x20>;
403 };
404
developer2cdaeb12022-10-04 20:25:05 +0800405 gic: interrupt-controller@c000000 {
406 compatible = "arm,gic-v3";
407 #interrupt-cells = <3>;
408 interrupt-parent = <&gic>;
409 interrupt-controller;
410 reg = <0 0x0c000000 0 0x40000>, /* GICD */
411 <0 0x0c080000 0 0x200000>; /* GICR */
412
413 interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
414 };
415
416 trng: trng@1020f000 {
417 compatible = "mediatek,mt7988-rng";
418 };
419
420 uart0: serial@11000000 {
421 compatible = "mediatek,mt7986-uart",
422 "mediatek,mt6577-uart";
423 reg = <0 0x11000000 0 0x100>;
424 interrupts = <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>;
425 clocks = <&uart_clk>;
426 status = "disabled";
427 };
428
429 uart1: serial@11000100 {
430 compatible = "mediatek,mt7986-uart",
431 "mediatek,mt6577-uart";
432 reg = <0 0x11000100 0 0x100>;
433 interrupts = <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>;
434 clocks = <&uart_clk>;
435 status = "disabled";
436 };
437
438 uart2: serial@11000200 {
439 compatible = "mediatek,mt7986-uart",
440 "mediatek,mt6577-uart";
441 reg = <0 0x11000200 0 0x100>;
442 interrupts = <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>;
443 clocks = <&uart_clk>;
444 status = "disabled";
445 };
446
447 i2c0: i2c@11003000 {
448 compatible = "mediatek,mt7988-i2c",
449 "mediatek,mt7981-i2c";
450 reg = <0 0x11003000 0 0x1000>,
451 <0 0x10217080 0 0x80>;
452 interrupts = <GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>;
453 clock-div = <1>;
454 clocks = <&system_clk>,
455 <&system_clk>;
456 clock-names = "main", "dma";
457 #address-cells = <1>;
458 #size-cells = <0>;
459 status = "disabled";
460 };
461
462 i2c1: i2c@11004000 {
463 compatible = "mediatek,mt7988-i2c",
464 "mediatek,mt7981-i2c";
465 reg = <0 0x11004000 0 0x1000>,
466 <0 0x10217100 0 0x80>;
467 interrupts = <GIC_SPI 144 IRQ_TYPE_LEVEL_HIGH>;
468 clock-div = <1>;
469 clocks = <&system_clk>,
470 <&system_clk>;
471 clock-names = "main", "dma";
472 #address-cells = <1>;
473 #size-cells = <0>;
474 status = "disabled";
475 };
476
477 i2c2: i2c@11005000 {
478 compatible = "mediatek,mt7988-i2c",
479 "mediatek,mt7981-i2c";
480 reg = <0 0x11005000 0 0x1000>,
481 <0 0x10217180 0 0x80>;
482 interrupts = <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>;
483 clock-div = <1>;
484 clocks = <&system_clk>,
485 <&system_clk>;
486 clock-names = "main", "dma";
487 #address-cells = <1>;
488 #size-cells = <0>;
489 status = "disabled";
490 };
491
492 pwm: pwm@10048000 {
493 compatible = "mediatek,mt7988-pwm";
494 reg = <0 0x10048000 0 0x1000>;
495 #pwm-cells = <2>;
496 clocks = <&system_clk>,
497 <&system_clk>,
498 <&system_clk>,
499 <&system_clk>,
500 <&system_clk>,
501 <&system_clk>,
502 <&system_clk>,
503 <&system_clk>,
504 <&system_clk>,
505 <&system_clk>;
506 clock-names = "top", "main", "pwm1", "pwm2", "pwm3",
507 "pwm4","pwm5","pwm6","pwm7","pwm8";
508 status = "disabled";
509 };
510
511 fan: pwm-fan {
512 compatible = "pwm-fan";
513 /* cooling level (0, 1, 2) : (0% duty, 50% duty, 100% duty) */
514 cooling-levels = <0 128 255>;
515 #cooling-cells = <2>;
516 #thermal-sensor-cells = <1>;
517 status = "disabled";
518 };
519
520 lvts: lvts@1100a000 {
521 compatible = "mediatek,mt7988-lvts";
522 #thermal-sensor-cells = <1>;
523 reg = <0 0x1100a000 0 0x1000>;
524 clocks = <&system_clk>;
525 clock-names = "lvts_clk";
526 nvmem-cells = <&lvts_calibration>;
527 nvmem-cell-names = "e_data1";
528 };
529
530 crypto: crypto@15600000 {
531 compatible = "inside-secure,safexcel-eip197b";
532 reg = <0 0x15600000 0 0x180000>;
533 interrupts = <GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH>,
534 <GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH>,
535 <GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH>,
536 <GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH>;
537 interrupt-names = "ring0", "ring1", "ring2", "ring3";
538 status = "okay";
539 };
540
developer3594afb2022-10-25 13:22:53 +0800541 afe: audio-controller@11210000 {
542 compatible = "mediatek,mt79xx-audio";
543 reg = <0 0x11210000 0 0x9000>;
544 interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>;
545 clocks = <&infracfg_ao CK_INFRA_66M_AUD_SLV_BCK>,
546 <&infracfg_ao CK_INFRA_AUD_26M>,
547 <&infracfg_ao CK_INFRA_AUD_L>,
548 <&infracfg_ao CK_INFRA_AUD_AUD>,
549 <&infracfg_ao CK_INFRA_AUD_EG2>,
550 <&topckgen CK_TOP_AUD_SEL>,
551 <&topckgen CK_TOP_AUD_I2S_M>;
552 clock-names = "aud_bus_ck",
553 "aud_26m_ck",
554 "aud_l_ck",
555 "aud_aud_ck",
556 "aud_eg2_ck",
557 "aud_sel",
558 "aud_i2s_m";
559 assigned-clocks = <&topckgen CK_TOP_AUD_SEL>,
560 <&topckgen CK_TOP_A1SYS_SEL>,
561 <&topckgen CK_TOP_AUD_L_SEL>,
562 <&topckgen CK_TOP_A_TUNER_SEL>;
563 assigned-clock-parents = <&topckgen CK_TOP_CB_APLL2_196M>,
564 <&topckgen CK_TOP_CB_APLL2_D4>,
565 <&topckgen CK_TOP_CB_APLL2_196M>,
566 <&topckgen CK_TOP_CB_APLL2_D4>;
567 status = "disabled";
568 };
569
developer2cdaeb12022-10-04 20:25:05 +0800570 pcie0: pcie@11300000 {
571 compatible = "mediatek,mt7988-pcie",
572 "mediatek,mt7986-pcie";
573 device_type = "pci";
574 #address-cells = <3>;
575 #size-cells = <2>;
576 reg = <0 0x11300000 0 0x2000>;
577 reg-names = "pcie-mac";
578 linux,pci-domain = <0>;
579 interrupts = <GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>;
580 bus-range = <0x00 0xff>;
581 ranges = <0x81000000 0x00 0x30000000 0x00
582 0x30000000 0x00 0x00200000>,
583 <0x82000000 0x00 0x30200000 0x00
584 0x30200000 0x00 0x07e00000>;
585 status = "disabled";
586
587 clocks = <&topckgen CK_TOP_PEXTP_P0_SEL>,
588 <&infracfg_ao CK_INFRA_PCIE_GFMUX_TL_P0>,
589 <&infracfg_ao CK_INFRA_PCIE_PIPE_P0>,
590 <&infracfg_ao CK_INFRA_133M_PCIE_CK_P0>,
591 <&infracfg_ao CK_INFRA_PCIE_PERI_26M_CK_P0>;
592
593 #interrupt-cells = <1>;
594 interrupt-map-mask = <0 0 0 0x7>;
595 interrupt-map = <0 0 0 1 &pcie_intc0 0>,
596 <0 0 0 2 &pcie_intc0 1>,
597 <0 0 0 3 &pcie_intc0 2>,
598 <0 0 0 4 &pcie_intc0 3>;
599 pcie_intc0: interrupt-controller {
600 #address-cells = <0>;
601 #interrupt-cells = <1>;
602 interrupt-controller;
603 };
604 };
605
606 pcie1: pcie@11310000 {
607 compatible = "mediatek,mt7988-pcie",
608 "mediatek,mt7986-pcie";
609 device_type = "pci";
610 #address-cells = <3>;
611 #size-cells = <2>;
612 reg = <0 0x11310000 0 0x2000>;
613 reg-names = "pcie-mac";
614 linux,pci-domain = <1>;
615 interrupts = <GIC_SPI 169 IRQ_TYPE_LEVEL_HIGH>;
616 bus-range = <0x00 0xff>;
617 ranges = <0x81000000 0x00 0x38000000 0x00
618 0x38000000 0x00 0x00200000>,
619 <0x82000000 0x00 0x38200000 0x00
620 0x38200000 0x00 0x07e00000>;
621 status = "disabled";
622
623 clocks = <&topckgen CK_TOP_PEXTP_P1_SEL>,
624 <&infracfg_ao CK_INFRA_PCIE_GFMUX_TL_P1>,
625 <&infracfg_ao CK_INFRA_PCIE_PIPE_P1>,
626 <&infracfg_ao CK_INFRA_133M_PCIE_CK_P1>,
627 <&infracfg_ao CK_INFRA_PCIE_PERI_26M_CK_P1>;
628
629 #interrupt-cells = <1>;
630 interrupt-map-mask = <0 0 0 0x7>;
631 interrupt-map = <0 0 0 1 &pcie_intc1 0>,
632 <0 0 0 2 &pcie_intc1 1>,
633 <0 0 0 3 &pcie_intc1 2>,
634 <0 0 0 4 &pcie_intc1 3>;
635 pcie_intc1: interrupt-controller {
636 #address-cells = <0>;
637 #interrupt-cells = <1>;
638 interrupt-controller;
639 };
640 };
641
642 pcie2: pcie@11280000 {
643 compatible = "mediatek,mt7988-pcie",
644 "mediatek,mt7986-pcie";
645 device_type = "pci";
646 #address-cells = <3>;
647 #size-cells = <2>;
648 reg = <0 0x11280000 0 0x2000>;
649 reg-names = "pcie-mac";
650 linux,pci-domain = <3>;
651 interrupts = <GIC_SPI 170 IRQ_TYPE_LEVEL_HIGH>;
652 bus-range = <0x00 0xff>;
653 ranges = <0x81000000 0x00 0x20000000 0x00
654 0x20000000 0x00 0x00200000>,
655 <0x82000000 0x00 0x20200000 0x00
656 0x20200000 0x00 0x07e00000>;
657 status = "disabled";
658
659 clocks = <&topckgen CK_TOP_PEXTP_P2_SEL>,
660 <&infracfg_ao CK_INFRA_PCIE_GFMUX_TL_P2>,
661 <&infracfg_ao CK_INFRA_PCIE_PIPE_P2>,
662 <&infracfg_ao CK_INFRA_133M_PCIE_CK_P2>,
663 <&infracfg_ao CK_INFRA_PCIE_PERI_26M_CK_P2>,
664 <&infracfg_ao CK_INFRA_PCIE_PERI_26M_CK_P3>;
665
666 phys = <&xphyu3port0 PHY_TYPE_PCIE>;
667 phy-names = "pcie-phy";
668
669 #interrupt-cells = <1>;
670 interrupt-map-mask = <0 0 0 0x7>;
671 interrupt-map = <0 0 0 1 &pcie_intc2 0>,
672 <0 0 0 2 &pcie_intc2 1>,
673 <0 0 0 3 &pcie_intc2 2>,
674 <0 0 0 4 &pcie_intc2 3>;
675 pcie_intc2: interrupt-controller {
676 #address-cells = <0>;
677 #interrupt-cells = <1>;
678 interrupt-controller;
679 };
680 };
681
682 pcie3: pcie@11290000 {
683 compatible = "mediatek,mt7988-pcie",
684 "mediatek,mt7986-pcie";
685 device_type = "pci";
686 #address-cells = <3>;
687 #size-cells = <2>;
688 reg = <0 0x11290000 0 0x2000>;
689 reg-names = "pcie-mac";
690 linux,pci-domain = <2>;
691 interrupts = <GIC_SPI 171 IRQ_TYPE_LEVEL_HIGH>;
692 bus-range = <0x00 0xff>;
693 ranges = <0x81000000 0x00 0x28000000 0x00
694 0x28000000 0x00 0x00200000>,
695 <0x82000000 0x00 0x28200000 0x00
696 0x28200000 0x00 0x07e00000>;
697 status = "disabled";
698
699 clocks = <&topckgen CK_TOP_PEXTP_P3_SEL>,
700 <&infracfg_ao CK_INFRA_PCIE_GFMUX_TL_P3>,
701 <&infracfg_ao CK_INFRA_PCIE_PIPE_P3>,
702 <&infracfg_ao CK_INFRA_133M_PCIE_CK_P3>,
703 <&infracfg_ao CK_INFRA_PCIE_PERI_26M_CK_P3>;
704
705 #interrupt-cells = <1>;
706 interrupt-map-mask = <0 0 0 0x7>;
707 interrupt-map = <0 0 0 1 &pcie_intc3 0>,
708 <0 0 0 2 &pcie_intc3 1>,
709 <0 0 0 3 &pcie_intc3 2>,
710 <0 0 0 4 &pcie_intc3 3>;
711 pcie_intc3: interrupt-controller {
712 #address-cells = <0>;
713 #interrupt-cells = <1>;
714 interrupt-controller;
715 };
716 };
717
718 pio: pinctrl@1001f000 {
719 compatible = "mediatek,mt7988-pinctrl";
720 reg = <0 0x1001f000 0 0x1000>,
721 <0 0x11c10000 0 0x1000>,
722 <0 0x11d00000 0 0x1000>,
723 <0 0x11d20000 0 0x1000>,
724 <0 0x11e00000 0 0x1000>,
725 <0 0x11f00000 0 0x1000>,
726 <0 0x1000b000 0 0x1000>;
727 reg-names = "gpio_base", "iocfg_tr_base", "iocfg_br_base",
728 "iocfg_rb_base", "iocfg_lb_base", "iocfg_tl_base",
729 "eint";
730 gpio-controller;
731 #gpio-cells = <2>;
732 gpio-ranges = <&pio 0 0 83>;
733 interrupt-controller;
734 interrupts = <GIC_SPI 153 IRQ_TYPE_LEVEL_HIGH>;
735 interrupt-parent = <&gic>;
736 #interrupt-cells = <2>;
737 };
738
739 ethsys: syscon@15000000 {
740 #address-cells = <1>;
741 #size-cells = <1>;
742 compatible = "mediatek,mt7988-ethsys",
743 "syscon";
744 reg = <0 0x15000000 0 0x1000>;
745 #clock-cells = <1>;
746 #reset-cells = <1>;
747
748 ethsysrst: reset-controller {
749 compatible = "ti,syscon-reset";
750 #reset-cells = <1>;
751 ti,reset-bits =
752 <0x34 4 0x34 4 0x34 4
753 (ASSERT_SET | DEASSERT_CLEAR | STATUS_SET)>;
754 };
755 };
756
757 ethwarp: syscon@15031000 {
758 compatible = "mediatek,mt7988-ethwarp", "syscon";
759 reg = <0 0x15031000 0 0x1000>;
760 #clock-cells = <1>;
761 };
762
763 switch0: switch0@15020000 {
764 #address-cells = <1>;
765 #size-cells = <1>;
766 compatible = "mediatek,mt7988-switch", "syscon";
767 reg = <0 0x15020000 0 0x8000>;
768 };
769
770 eth: ethernet@15100000 {
771 compatible = "mediatek,mt7988-eth";
772 reg = <0 0x15100000 0 0x80000>,
773 <0 0x15400000 0 0x380000>;
774 interrupts = <GIC_SPI 196 IRQ_TYPE_LEVEL_HIGH>,
775 <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH>,
776 <GIC_SPI 198 IRQ_TYPE_LEVEL_HIGH>,
777 <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH>;
778 clocks = <&system_clk>,
779 <&system_clk>,
780 <&system_clk>,
781 <&system_clk>,
782 <&system_clk>,
783 <&system_clk>,
784 <&system_clk>,
785 <&system_clk>,
786 <&system_clk>,
787 <&system_clk>,
788 <&system_clk>,
789 <&system_clk>,
790 <&system_clk>;
791 clock-names = "fe", "gp2", "gp1", "wocpu1", "wocpu0",
792 "sgmii_tx250m", "sgmii_rx250m",
793 "sgmii_cdr_ref", "sgmii_cdr_fb",
794 "sgmii2_tx250m", "sgmii2_rx250m",
795 "sgmii2_cdr_ref", "sgmii2_cdr_fb";
796 mediatek,ethsys = <&ethsys>;
797 mediatek,sgmiisys = <&sgmiisys0>, <&sgmiisys1>;
798 mediatek,usxgmiisys = <&usxgmiisys0>, <&usxgmiisys1>;
799 mediatek,xfi_pextp = <&xfi_pextp0>, <&xfi_pextp1>;
800 mediatek,xfi_pll = <&xfi_pll>;
801 mediatek,infracfg = <&topmisc>;
802 mediatek,toprgu = <&watchdog>;
803 #reset-cells = <1>;
804 #address-cells = <1>;
805 #size-cells = <0>;
806 status = "disabled";
807 };
808
809 hnat: hnat@15000000 {
810 compatible = "mediatek,mtk-hnat_v5";
811 reg = <0 0x15100000 0 0x80000>;
812 resets = <&ethsys 0>;
813 reset-names = "mtketh";
814 status = "disabled";
815 };
816
817 sgmiisys0: syscon@10060000 {
818 compatible = "mediatek,mt7988-sgmiisys",
819 "mediatek,mt7988-sgmiisys_0",
820 "syscon";
821 reg = <0 0x10060000 0 0x1000>;
822 #clock-cells = <1>;
823 };
824
825 sgmiisys1: syscon@10070000 {
826 compatible = "mediatek,mt7988-sgmiisys",
827 "mediatek,mt7988-sgmiisys_1",
828 "syscon";
829 reg = <0 0x10070000 0 0x1000>;
830 #clock-cells = <1>;
831 };
832
833 usxgmiisys0: usxgmiisys@10080000 {
834 compatible = "mediatek,mt7988-usxgmiisys",
835 "mediatek,mt7988-usxgmiisys_0",
836 "syscon";
837 reg = <0 0x10080000 0 0x1000>;
838 #clock-cells = <1>;
839 };
840
841 usxgmiisys1: usxgmiisys@10081000 {
842 compatible = "mediatek,mt7988-usxgmiisys",
843 "mediatek,mt7988-usxgmiisys_1",
844 "syscon";
845 reg = <0 0x10081000 0 0x1000>;
846 #clock-cells = <1>;
847 };
848
849 xfi_pextp0: xfi_pextp@11f20000 {
850 compatible = "mediatek,mt7988-xfi_pextp",
851 "mediatek,mt7988-xfi_pextp_0",
852 "syscon";
853 reg = <0 0x11f20000 0 0x10000>;
854 #clock-cells = <1>;
855 };
856
857 xfi_pextp1: xfi_pextp@11f30000 {
858 compatible = "mediatek,mt7988-xfi_pextp",
859 "mediatek,mt7988-xfi_pextp_1",
860 "syscon";
861 reg = <0 0x11f30000 0 0x10000>;
862 #clock-cells = <1>;
863 };
864
865 xfi_pll: xfi_pll@11f40000 {
866 compatible = "mediatek,mt7988-xfi_pll", "syscon";
867 reg = <0 0x11f40000 0 0x1000>;
868 #clock-cells = <1>;
869 };
870
871 topmisc: topmisc@11d10000 {
872 compatible = "mediatek,mt7988-topmisc", "syscon",
873 "mediatek,mt7988-power-controller";
874 reg = <0 0x11d10000 0 0x10000>;
875 #clock-cells = <1>;
876 #power-domain-cells = <1>;
877 #address-cells = <1>;
878 #size-cells = <0>;
879 /* power domain of the SoC */
880 tops0@MT7988_POWER_DOMAIN_TOPS0 {
881 reg = <MT7988_POWER_DOMAIN_TOPS0>;
882 #power-domain-cells = <0>;
883 };
884 tops1@MT7988_POWER_DOMAIN_TOPS1 {
885 reg = <MT7988_POWER_DOMAIN_TOPS1>;
886 #power-domain-cells = <0>;
887 };
888 eth2p5@MT7988_POWER_DOMAIN_ETH2P5 {
889 reg = <MT7988_POWER_DOMAIN_ETH2P5>;
890 #power-domain-cells = <0>;
891 };
892 };
893
894 snand: snfi@11001000 {
895 compatible = "mediatek,mt7986-snand";
896 reg = <0 0x11001000 0 0x1000>, <0 0x11002000 0 0x1000>;
897 reg-names = "nfi", "ecc";
898 interrupts = <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>;
899 clocks = <&system_clk>,
900 <&system_clk>,
901 <&system_clk>,
902 <&system_clk>;
903 clock-names = "nfi_clk", "pad_clk", "ecc_clk", "nfi_hclk";
904 #address-cells = <1>;
905 #size-cells = <0>;
906 status = "disabled";
907 };
908
909 wbsys: wbsys@18000000 {
910 compatible = "mediatek,wbsys";
911 reg = <0 0x18000000 0 0x1000000>;
912 linux,pci-domain = <4>;
913 interrupts = <GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH>,
914 <GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH>,
915 <GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH>,
916 <GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH>;
917 chip_id = <0x7981>;
918 };
919
920 wed_pcie: wed_pcie@10003000 {
921 compatible = "mediatek,wed_pcie";
922 reg = <0 0x10003000 0 0x10>;
923 };
924
925 spi0: spi@11007000 {
926 compatible = "mediatek,ipm-spi-quad";
927 reg = <0 0x11007000 0 0x100>;
928 interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>;
929 clocks = <&topckgen CK_TOP_CB_M_D2>,
930 <&topckgen CK_TOP_SPI_SEL>,
931 <&infracfg_ao CK_INFRA_104M_SPI0>,
932 <&infracfg_ao CK_INFRA_66M_SPI0_HCK>;
933 clock-names = "parent-clk", "sel-clk", "spi-clk", "spi-hclk";
934 status = "disabled";
935 };
936
937 spi1: spi@11008000 {
938 compatible = "mediatek,ipm-spi-single";
939 reg = <0 0x11008000 0 0x100>;
940 interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>;
941 clocks = <&topckgen CK_TOP_CB_M_D2>,
942 <&topckgen CK_TOP_SPI_SEL>,
943 <&infracfg_ao CK_INFRA_104M_SPI1>,
944 <&infracfg_ao CK_INFRA_66M_SPI1_HCK>;
945 clock-names = "parent-clk", "sel-clk", "spi-clk", "spi-hclk";
946 status = "disabled";
947 };
948
949 spi2: spi@11009000 {
950 compatible = "mediatek,ipm-spi-quad";
951 reg = <0 0x11009000 0 0x100>;
952 interrupts = <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>;
953 clocks = <&topckgen CK_TOP_CB_M_D2>,
954 <&topckgen CK_TOP_SPI_SEL>,
955 <&infracfg_ao CK_INFRA_104M_SPI2_BCK>,
956 <&infracfg_ao CK_INFRA_66M_SPI2_HCK>;
957 clock-names = "parent-clk", "sel-clk", "spi-clk", "spi-hclk";
958 status = "disabled";
959 };
960
961 consys: consys@10000000 {
962 compatible = "mediatek,mt7981-consys";
963 reg = <0 0x10000000 0 0x8600000>;
964 memory-region = <&wmcpu_emi>;
965 };
966
967 xhci0: xhci@11190000 {
968 compatible = "mediatek,mt7988-xhci",
969 "mediatek,mtk-xhci";
970 reg = <0 0x11190000 0 0x2e00>,
971 <0 0x11193e00 0 0x0100>;
972 reg-names = "mac", "ippc";
973 interrupts = <GIC_SPI 173 IRQ_TYPE_LEVEL_HIGH>;
974 phys = <&xphyu2port0 PHY_TYPE_USB2>,
975 <&xphyu3port0 PHY_TYPE_USB3>;
976 clocks = <&system_clk>,
977 <&system_clk>,
978 <&system_clk>,
979 <&system_clk>,
980 <&system_clk>;
981 clock-names = "sys_ck",
982 "xhci_ck",
983 "ref_ck",
984 "mcu_ck",
985 "dma_ck";
986 #address-cells = <2>;
987 #size-cells = <2>;
988 status = "okay";
989 };
990
991 usbxphy: usb-phy@11e10000 {
992 compatible = "mediatek,mt7988",
993 "mediatek,xsphy";
994 #address-cells = <2>;
995 #size-cells = <2>;
996 ranges;
997 status = "okay";
998
999 xphyu2port0: usb-phy@11e10000 {
1000 reg = <0 0x11e10000 0 0x400>;
1001 clocks = <&system_clk>;
1002 clock-names = "ref";
1003 #phy-cells = <1>;
1004 status = "okay";
1005 };
1006
1007 xphyu3port0: usb-phy@11e13000 {
1008 reg = <0 0x11e13400 0 0x500>;
1009 clocks = <&system_clk>;
1010 clock-names = "ref";
1011 #phy-cells = <1>;
1012 mediatek,syscon-type = <&topmisc 0x218 0>;
1013 status = "okay";
1014 };
1015 };
1016
1017 xhci1: xhci@11200000 {
1018 compatible = "mediatek,mt7988-xhci",
1019 "mediatek,mtk-xhci";
1020 reg = <0 0x11200000 0 0x2e00>,
1021 <0 0x11203e00 0 0x0100>;
1022 reg-names = "mac", "ippc";
1023 interrupts = <GIC_SPI 172 IRQ_TYPE_LEVEL_HIGH>;
1024 phys = <&tphyu2port0 PHY_TYPE_USB2>,
1025 <&tphyu3port0 PHY_TYPE_USB3>;
1026 clocks = <&system_clk>,
1027 <&system_clk>,
1028 <&system_clk>,
1029 <&system_clk>,
1030 <&system_clk>;
1031 clock-names = "sys_ck",
1032 "xhci_ck",
1033 "ref_ck",
1034 "mcu_ck",
1035 "dma_ck";
1036 #address-cells = <2>;
1037 #size-cells = <2>;
1038 status = "okay";
1039 };
1040
1041 usbtphy: usb-phy@11c50000 {
1042 compatible = "mediatek,mt7988",
1043 "mediatek,generic-tphy-v2";
1044 #address-cells = <2>;
1045 #size-cells = <2>;
1046 ranges;
1047 status = "okay";
1048
1049 tphyu2port0: usb-phy@11c50000 {
1050 reg = <0 0x11c50000 0 0x700>;
1051 clocks = <&system_clk>;
1052 clock-names = "ref";
1053 #phy-cells = <1>;
1054 status = "okay";
1055 };
1056
1057 tphyu3port0: usb-phy@11c50700 {
1058 reg = <0 0x11c50700 0 0x900>;
1059 clocks = <&system_clk>;
1060 clock-names = "ref";
1061 #phy-cells = <1>;
1062 status = "okay";
1063 };
1064 };
1065
1066 clk40m: oscillator@0 {
1067 compatible = "fixed-clock";
1068 #clock-cells = <0>;
1069 clock-frequency = <40000000>;
1070 clock-output-names = "clkxtal";
1071 };
1072
1073 infracfg_ao: infracfg_ao@10001000 {
1074 compatible = "mediatek,mt7988-infracfg_ao", "syscon";
1075 reg = <0 0x10001000 0 0x1000>;
1076 #clock-cells = <1>;
1077 };
1078
1079 infracfg: infracfg@10209000 {
1080 compatible = "mediatek,mt7988-infracfg", "syscon";
1081 reg = <0 0x10209000 0 0x1000>;
1082 #clock-cells = <1>;
1083 };
1084
1085 topckgen: topckgen@1001B000 {
1086 compatible = "mediatek,mt7988-topckgen", "syscon";
1087 reg = <0 0x1001B000 0 0x1000>;
1088 #clock-cells = <1>;
1089 };
1090
1091 apmixedsys: apmixedsys@1001E000 {
1092 compatible = "mediatek,mt7988-apmixedsys", "syscon";
1093 reg = <0 0x1001E000 0 0x1000>;
1094 #clock-cells = <1>;
1095 };
1096
1097 mcusys: mcusys@100E0000 {
1098 compatible = "mediatek,mt7988-mcusys", "syscon";
1099 reg = <0 0x100E0000 0 0x1000>;
1100 #clock-cells = <1>;
1101 };
1102
1103 clkitg: clkitg {
1104 compatible = "simple-bus";
1105 };
1106
1107 efuse: efuse@11f50000 {
1108 compatible = "mediatek,efuse";
1109 reg = <0 0x11f50000 0 0x1000>;
1110 #address-cells = <1>;
1111 #size-cells = <1>;
1112
1113 lvts_calibration: calib@918 {
1114 reg = <0x918 0x28>;
1115 };
1116 phy_calibration_p0: calib@940 {
1117 reg = <0x940 0x10>;
1118 };
1119 phy_calibration_p1: calib@954 {
1120 reg = <0x954 0x10>;
1121 };
1122 phy_calibration_p2: calib@968 {
1123 reg = <0x968 0x10>;
1124 };
1125 phy_calibration_p3: calib@97c {
1126 reg = <0x97c 0x10>;
1127 };
1128 cpufreq_calibration: calib@278 {
1129 reg = <0x278 0x1>;
1130 };
1131 };
1132};
1133
1134#include "mt7988-clkitg.dtsi"