blob: 604f5aab6def5d8371271f12ccc3434431879843 [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
541 pcie0: pcie@11300000 {
542 compatible = "mediatek,mt7988-pcie",
543 "mediatek,mt7986-pcie";
544 device_type = "pci";
545 #address-cells = <3>;
546 #size-cells = <2>;
547 reg = <0 0x11300000 0 0x2000>;
548 reg-names = "pcie-mac";
549 linux,pci-domain = <0>;
550 interrupts = <GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>;
551 bus-range = <0x00 0xff>;
552 ranges = <0x81000000 0x00 0x30000000 0x00
553 0x30000000 0x00 0x00200000>,
554 <0x82000000 0x00 0x30200000 0x00
555 0x30200000 0x00 0x07e00000>;
556 status = "disabled";
557
558 clocks = <&topckgen CK_TOP_PEXTP_P0_SEL>,
559 <&infracfg_ao CK_INFRA_PCIE_GFMUX_TL_P0>,
560 <&infracfg_ao CK_INFRA_PCIE_PIPE_P0>,
561 <&infracfg_ao CK_INFRA_133M_PCIE_CK_P0>,
562 <&infracfg_ao CK_INFRA_PCIE_PERI_26M_CK_P0>;
563
564 #interrupt-cells = <1>;
565 interrupt-map-mask = <0 0 0 0x7>;
566 interrupt-map = <0 0 0 1 &pcie_intc0 0>,
567 <0 0 0 2 &pcie_intc0 1>,
568 <0 0 0 3 &pcie_intc0 2>,
569 <0 0 0 4 &pcie_intc0 3>;
570 pcie_intc0: interrupt-controller {
571 #address-cells = <0>;
572 #interrupt-cells = <1>;
573 interrupt-controller;
574 };
575 };
576
577 pcie1: pcie@11310000 {
578 compatible = "mediatek,mt7988-pcie",
579 "mediatek,mt7986-pcie";
580 device_type = "pci";
581 #address-cells = <3>;
582 #size-cells = <2>;
583 reg = <0 0x11310000 0 0x2000>;
584 reg-names = "pcie-mac";
585 linux,pci-domain = <1>;
586 interrupts = <GIC_SPI 169 IRQ_TYPE_LEVEL_HIGH>;
587 bus-range = <0x00 0xff>;
588 ranges = <0x81000000 0x00 0x38000000 0x00
589 0x38000000 0x00 0x00200000>,
590 <0x82000000 0x00 0x38200000 0x00
591 0x38200000 0x00 0x07e00000>;
592 status = "disabled";
593
594 clocks = <&topckgen CK_TOP_PEXTP_P1_SEL>,
595 <&infracfg_ao CK_INFRA_PCIE_GFMUX_TL_P1>,
596 <&infracfg_ao CK_INFRA_PCIE_PIPE_P1>,
597 <&infracfg_ao CK_INFRA_133M_PCIE_CK_P1>,
598 <&infracfg_ao CK_INFRA_PCIE_PERI_26M_CK_P1>;
599
600 #interrupt-cells = <1>;
601 interrupt-map-mask = <0 0 0 0x7>;
602 interrupt-map = <0 0 0 1 &pcie_intc1 0>,
603 <0 0 0 2 &pcie_intc1 1>,
604 <0 0 0 3 &pcie_intc1 2>,
605 <0 0 0 4 &pcie_intc1 3>;
606 pcie_intc1: interrupt-controller {
607 #address-cells = <0>;
608 #interrupt-cells = <1>;
609 interrupt-controller;
610 };
611 };
612
613 pcie2: pcie@11280000 {
614 compatible = "mediatek,mt7988-pcie",
615 "mediatek,mt7986-pcie";
616 device_type = "pci";
617 #address-cells = <3>;
618 #size-cells = <2>;
619 reg = <0 0x11280000 0 0x2000>;
620 reg-names = "pcie-mac";
621 linux,pci-domain = <3>;
622 interrupts = <GIC_SPI 170 IRQ_TYPE_LEVEL_HIGH>;
623 bus-range = <0x00 0xff>;
624 ranges = <0x81000000 0x00 0x20000000 0x00
625 0x20000000 0x00 0x00200000>,
626 <0x82000000 0x00 0x20200000 0x00
627 0x20200000 0x00 0x07e00000>;
628 status = "disabled";
629
630 clocks = <&topckgen CK_TOP_PEXTP_P2_SEL>,
631 <&infracfg_ao CK_INFRA_PCIE_GFMUX_TL_P2>,
632 <&infracfg_ao CK_INFRA_PCIE_PIPE_P2>,
633 <&infracfg_ao CK_INFRA_133M_PCIE_CK_P2>,
634 <&infracfg_ao CK_INFRA_PCIE_PERI_26M_CK_P2>,
635 <&infracfg_ao CK_INFRA_PCIE_PERI_26M_CK_P3>;
636
637 phys = <&xphyu3port0 PHY_TYPE_PCIE>;
638 phy-names = "pcie-phy";
639
640 #interrupt-cells = <1>;
641 interrupt-map-mask = <0 0 0 0x7>;
642 interrupt-map = <0 0 0 1 &pcie_intc2 0>,
643 <0 0 0 2 &pcie_intc2 1>,
644 <0 0 0 3 &pcie_intc2 2>,
645 <0 0 0 4 &pcie_intc2 3>;
646 pcie_intc2: interrupt-controller {
647 #address-cells = <0>;
648 #interrupt-cells = <1>;
649 interrupt-controller;
650 };
651 };
652
653 pcie3: pcie@11290000 {
654 compatible = "mediatek,mt7988-pcie",
655 "mediatek,mt7986-pcie";
656 device_type = "pci";
657 #address-cells = <3>;
658 #size-cells = <2>;
659 reg = <0 0x11290000 0 0x2000>;
660 reg-names = "pcie-mac";
661 linux,pci-domain = <2>;
662 interrupts = <GIC_SPI 171 IRQ_TYPE_LEVEL_HIGH>;
663 bus-range = <0x00 0xff>;
664 ranges = <0x81000000 0x00 0x28000000 0x00
665 0x28000000 0x00 0x00200000>,
666 <0x82000000 0x00 0x28200000 0x00
667 0x28200000 0x00 0x07e00000>;
668 status = "disabled";
669
670 clocks = <&topckgen CK_TOP_PEXTP_P3_SEL>,
671 <&infracfg_ao CK_INFRA_PCIE_GFMUX_TL_P3>,
672 <&infracfg_ao CK_INFRA_PCIE_PIPE_P3>,
673 <&infracfg_ao CK_INFRA_133M_PCIE_CK_P3>,
674 <&infracfg_ao CK_INFRA_PCIE_PERI_26M_CK_P3>;
675
676 #interrupt-cells = <1>;
677 interrupt-map-mask = <0 0 0 0x7>;
678 interrupt-map = <0 0 0 1 &pcie_intc3 0>,
679 <0 0 0 2 &pcie_intc3 1>,
680 <0 0 0 3 &pcie_intc3 2>,
681 <0 0 0 4 &pcie_intc3 3>;
682 pcie_intc3: interrupt-controller {
683 #address-cells = <0>;
684 #interrupt-cells = <1>;
685 interrupt-controller;
686 };
687 };
688
689 pio: pinctrl@1001f000 {
690 compatible = "mediatek,mt7988-pinctrl";
691 reg = <0 0x1001f000 0 0x1000>,
692 <0 0x11c10000 0 0x1000>,
693 <0 0x11d00000 0 0x1000>,
694 <0 0x11d20000 0 0x1000>,
695 <0 0x11e00000 0 0x1000>,
696 <0 0x11f00000 0 0x1000>,
697 <0 0x1000b000 0 0x1000>;
698 reg-names = "gpio_base", "iocfg_tr_base", "iocfg_br_base",
699 "iocfg_rb_base", "iocfg_lb_base", "iocfg_tl_base",
700 "eint";
701 gpio-controller;
702 #gpio-cells = <2>;
703 gpio-ranges = <&pio 0 0 83>;
704 interrupt-controller;
705 interrupts = <GIC_SPI 153 IRQ_TYPE_LEVEL_HIGH>;
706 interrupt-parent = <&gic>;
707 #interrupt-cells = <2>;
708 };
709
710 ethsys: syscon@15000000 {
711 #address-cells = <1>;
712 #size-cells = <1>;
713 compatible = "mediatek,mt7988-ethsys",
714 "syscon";
715 reg = <0 0x15000000 0 0x1000>;
716 #clock-cells = <1>;
717 #reset-cells = <1>;
718
719 ethsysrst: reset-controller {
720 compatible = "ti,syscon-reset";
721 #reset-cells = <1>;
722 ti,reset-bits =
723 <0x34 4 0x34 4 0x34 4
724 (ASSERT_SET | DEASSERT_CLEAR | STATUS_SET)>;
725 };
726 };
727
728 ethwarp: syscon@15031000 {
729 compatible = "mediatek,mt7988-ethwarp", "syscon";
730 reg = <0 0x15031000 0 0x1000>;
731 #clock-cells = <1>;
732 };
733
734 switch0: switch0@15020000 {
735 #address-cells = <1>;
736 #size-cells = <1>;
737 compatible = "mediatek,mt7988-switch", "syscon";
738 reg = <0 0x15020000 0 0x8000>;
739 };
740
741 eth: ethernet@15100000 {
742 compatible = "mediatek,mt7988-eth";
743 reg = <0 0x15100000 0 0x80000>,
744 <0 0x15400000 0 0x380000>;
745 interrupts = <GIC_SPI 196 IRQ_TYPE_LEVEL_HIGH>,
746 <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH>,
747 <GIC_SPI 198 IRQ_TYPE_LEVEL_HIGH>,
748 <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH>;
749 clocks = <&system_clk>,
750 <&system_clk>,
751 <&system_clk>,
752 <&system_clk>,
753 <&system_clk>,
754 <&system_clk>,
755 <&system_clk>,
756 <&system_clk>,
757 <&system_clk>,
758 <&system_clk>,
759 <&system_clk>,
760 <&system_clk>,
761 <&system_clk>;
762 clock-names = "fe", "gp2", "gp1", "wocpu1", "wocpu0",
763 "sgmii_tx250m", "sgmii_rx250m",
764 "sgmii_cdr_ref", "sgmii_cdr_fb",
765 "sgmii2_tx250m", "sgmii2_rx250m",
766 "sgmii2_cdr_ref", "sgmii2_cdr_fb";
767 mediatek,ethsys = <&ethsys>;
768 mediatek,sgmiisys = <&sgmiisys0>, <&sgmiisys1>;
769 mediatek,usxgmiisys = <&usxgmiisys0>, <&usxgmiisys1>;
770 mediatek,xfi_pextp = <&xfi_pextp0>, <&xfi_pextp1>;
771 mediatek,xfi_pll = <&xfi_pll>;
772 mediatek,infracfg = <&topmisc>;
773 mediatek,toprgu = <&watchdog>;
774 #reset-cells = <1>;
775 #address-cells = <1>;
776 #size-cells = <0>;
777 status = "disabled";
778 };
779
780 hnat: hnat@15000000 {
781 compatible = "mediatek,mtk-hnat_v5";
782 reg = <0 0x15100000 0 0x80000>;
783 resets = <&ethsys 0>;
784 reset-names = "mtketh";
785 status = "disabled";
786 };
787
788 sgmiisys0: syscon@10060000 {
789 compatible = "mediatek,mt7988-sgmiisys",
790 "mediatek,mt7988-sgmiisys_0",
791 "syscon";
792 reg = <0 0x10060000 0 0x1000>;
793 #clock-cells = <1>;
794 };
795
796 sgmiisys1: syscon@10070000 {
797 compatible = "mediatek,mt7988-sgmiisys",
798 "mediatek,mt7988-sgmiisys_1",
799 "syscon";
800 reg = <0 0x10070000 0 0x1000>;
801 #clock-cells = <1>;
802 };
803
804 usxgmiisys0: usxgmiisys@10080000 {
805 compatible = "mediatek,mt7988-usxgmiisys",
806 "mediatek,mt7988-usxgmiisys_0",
807 "syscon";
808 reg = <0 0x10080000 0 0x1000>;
809 #clock-cells = <1>;
810 };
811
812 usxgmiisys1: usxgmiisys@10081000 {
813 compatible = "mediatek,mt7988-usxgmiisys",
814 "mediatek,mt7988-usxgmiisys_1",
815 "syscon";
816 reg = <0 0x10081000 0 0x1000>;
817 #clock-cells = <1>;
818 };
819
820 xfi_pextp0: xfi_pextp@11f20000 {
821 compatible = "mediatek,mt7988-xfi_pextp",
822 "mediatek,mt7988-xfi_pextp_0",
823 "syscon";
824 reg = <0 0x11f20000 0 0x10000>;
825 #clock-cells = <1>;
826 };
827
828 xfi_pextp1: xfi_pextp@11f30000 {
829 compatible = "mediatek,mt7988-xfi_pextp",
830 "mediatek,mt7988-xfi_pextp_1",
831 "syscon";
832 reg = <0 0x11f30000 0 0x10000>;
833 #clock-cells = <1>;
834 };
835
836 xfi_pll: xfi_pll@11f40000 {
837 compatible = "mediatek,mt7988-xfi_pll", "syscon";
838 reg = <0 0x11f40000 0 0x1000>;
839 #clock-cells = <1>;
840 };
841
842 topmisc: topmisc@11d10000 {
843 compatible = "mediatek,mt7988-topmisc", "syscon",
844 "mediatek,mt7988-power-controller";
845 reg = <0 0x11d10000 0 0x10000>;
846 #clock-cells = <1>;
847 #power-domain-cells = <1>;
848 #address-cells = <1>;
849 #size-cells = <0>;
850 /* power domain of the SoC */
851 tops0@MT7988_POWER_DOMAIN_TOPS0 {
852 reg = <MT7988_POWER_DOMAIN_TOPS0>;
853 #power-domain-cells = <0>;
854 };
855 tops1@MT7988_POWER_DOMAIN_TOPS1 {
856 reg = <MT7988_POWER_DOMAIN_TOPS1>;
857 #power-domain-cells = <0>;
858 };
859 eth2p5@MT7988_POWER_DOMAIN_ETH2P5 {
860 reg = <MT7988_POWER_DOMAIN_ETH2P5>;
861 #power-domain-cells = <0>;
862 };
863 };
864
865 snand: snfi@11001000 {
866 compatible = "mediatek,mt7986-snand";
867 reg = <0 0x11001000 0 0x1000>, <0 0x11002000 0 0x1000>;
868 reg-names = "nfi", "ecc";
869 interrupts = <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>;
870 clocks = <&system_clk>,
871 <&system_clk>,
872 <&system_clk>,
873 <&system_clk>;
874 clock-names = "nfi_clk", "pad_clk", "ecc_clk", "nfi_hclk";
875 #address-cells = <1>;
876 #size-cells = <0>;
877 status = "disabled";
878 };
879
880 wbsys: wbsys@18000000 {
881 compatible = "mediatek,wbsys";
882 reg = <0 0x18000000 0 0x1000000>;
883 linux,pci-domain = <4>;
884 interrupts = <GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH>,
885 <GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH>,
886 <GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH>,
887 <GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH>;
888 chip_id = <0x7981>;
889 };
890
891 wed_pcie: wed_pcie@10003000 {
892 compatible = "mediatek,wed_pcie";
893 reg = <0 0x10003000 0 0x10>;
894 };
895
896 spi0: spi@11007000 {
897 compatible = "mediatek,ipm-spi-quad";
898 reg = <0 0x11007000 0 0x100>;
899 interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>;
900 clocks = <&topckgen CK_TOP_CB_M_D2>,
901 <&topckgen CK_TOP_SPI_SEL>,
902 <&infracfg_ao CK_INFRA_104M_SPI0>,
903 <&infracfg_ao CK_INFRA_66M_SPI0_HCK>;
904 clock-names = "parent-clk", "sel-clk", "spi-clk", "spi-hclk";
905 status = "disabled";
906 };
907
908 spi1: spi@11008000 {
909 compatible = "mediatek,ipm-spi-single";
910 reg = <0 0x11008000 0 0x100>;
911 interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>;
912 clocks = <&topckgen CK_TOP_CB_M_D2>,
913 <&topckgen CK_TOP_SPI_SEL>,
914 <&infracfg_ao CK_INFRA_104M_SPI1>,
915 <&infracfg_ao CK_INFRA_66M_SPI1_HCK>;
916 clock-names = "parent-clk", "sel-clk", "spi-clk", "spi-hclk";
917 status = "disabled";
918 };
919
920 spi2: spi@11009000 {
921 compatible = "mediatek,ipm-spi-quad";
922 reg = <0 0x11009000 0 0x100>;
923 interrupts = <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>;
924 clocks = <&topckgen CK_TOP_CB_M_D2>,
925 <&topckgen CK_TOP_SPI_SEL>,
926 <&infracfg_ao CK_INFRA_104M_SPI2_BCK>,
927 <&infracfg_ao CK_INFRA_66M_SPI2_HCK>;
928 clock-names = "parent-clk", "sel-clk", "spi-clk", "spi-hclk";
929 status = "disabled";
930 };
931
932 consys: consys@10000000 {
933 compatible = "mediatek,mt7981-consys";
934 reg = <0 0x10000000 0 0x8600000>;
935 memory-region = <&wmcpu_emi>;
936 };
937
938 xhci0: xhci@11190000 {
939 compatible = "mediatek,mt7988-xhci",
940 "mediatek,mtk-xhci";
941 reg = <0 0x11190000 0 0x2e00>,
942 <0 0x11193e00 0 0x0100>;
943 reg-names = "mac", "ippc";
944 interrupts = <GIC_SPI 173 IRQ_TYPE_LEVEL_HIGH>;
945 phys = <&xphyu2port0 PHY_TYPE_USB2>,
946 <&xphyu3port0 PHY_TYPE_USB3>;
947 clocks = <&system_clk>,
948 <&system_clk>,
949 <&system_clk>,
950 <&system_clk>,
951 <&system_clk>;
952 clock-names = "sys_ck",
953 "xhci_ck",
954 "ref_ck",
955 "mcu_ck",
956 "dma_ck";
957 #address-cells = <2>;
958 #size-cells = <2>;
959 status = "okay";
960 };
961
962 usbxphy: usb-phy@11e10000 {
963 compatible = "mediatek,mt7988",
964 "mediatek,xsphy";
965 #address-cells = <2>;
966 #size-cells = <2>;
967 ranges;
968 status = "okay";
969
970 xphyu2port0: usb-phy@11e10000 {
971 reg = <0 0x11e10000 0 0x400>;
972 clocks = <&system_clk>;
973 clock-names = "ref";
974 #phy-cells = <1>;
975 status = "okay";
976 };
977
978 xphyu3port0: usb-phy@11e13000 {
979 reg = <0 0x11e13400 0 0x500>;
980 clocks = <&system_clk>;
981 clock-names = "ref";
982 #phy-cells = <1>;
983 mediatek,syscon-type = <&topmisc 0x218 0>;
984 status = "okay";
985 };
986 };
987
988 xhci1: xhci@11200000 {
989 compatible = "mediatek,mt7988-xhci",
990 "mediatek,mtk-xhci";
991 reg = <0 0x11200000 0 0x2e00>,
992 <0 0x11203e00 0 0x0100>;
993 reg-names = "mac", "ippc";
994 interrupts = <GIC_SPI 172 IRQ_TYPE_LEVEL_HIGH>;
995 phys = <&tphyu2port0 PHY_TYPE_USB2>,
996 <&tphyu3port0 PHY_TYPE_USB3>;
997 clocks = <&system_clk>,
998 <&system_clk>,
999 <&system_clk>,
1000 <&system_clk>,
1001 <&system_clk>;
1002 clock-names = "sys_ck",
1003 "xhci_ck",
1004 "ref_ck",
1005 "mcu_ck",
1006 "dma_ck";
1007 #address-cells = <2>;
1008 #size-cells = <2>;
1009 status = "okay";
1010 };
1011
1012 usbtphy: usb-phy@11c50000 {
1013 compatible = "mediatek,mt7988",
1014 "mediatek,generic-tphy-v2";
1015 #address-cells = <2>;
1016 #size-cells = <2>;
1017 ranges;
1018 status = "okay";
1019
1020 tphyu2port0: usb-phy@11c50000 {
1021 reg = <0 0x11c50000 0 0x700>;
1022 clocks = <&system_clk>;
1023 clock-names = "ref";
1024 #phy-cells = <1>;
1025 status = "okay";
1026 };
1027
1028 tphyu3port0: usb-phy@11c50700 {
1029 reg = <0 0x11c50700 0 0x900>;
1030 clocks = <&system_clk>;
1031 clock-names = "ref";
1032 #phy-cells = <1>;
1033 status = "okay";
1034 };
1035 };
1036
1037 clk40m: oscillator@0 {
1038 compatible = "fixed-clock";
1039 #clock-cells = <0>;
1040 clock-frequency = <40000000>;
1041 clock-output-names = "clkxtal";
1042 };
1043
1044 infracfg_ao: infracfg_ao@10001000 {
1045 compatible = "mediatek,mt7988-infracfg_ao", "syscon";
1046 reg = <0 0x10001000 0 0x1000>;
1047 #clock-cells = <1>;
1048 };
1049
1050 infracfg: infracfg@10209000 {
1051 compatible = "mediatek,mt7988-infracfg", "syscon";
1052 reg = <0 0x10209000 0 0x1000>;
1053 #clock-cells = <1>;
1054 };
1055
1056 topckgen: topckgen@1001B000 {
1057 compatible = "mediatek,mt7988-topckgen", "syscon";
1058 reg = <0 0x1001B000 0 0x1000>;
1059 #clock-cells = <1>;
1060 };
1061
1062 apmixedsys: apmixedsys@1001E000 {
1063 compatible = "mediatek,mt7988-apmixedsys", "syscon";
1064 reg = <0 0x1001E000 0 0x1000>;
1065 #clock-cells = <1>;
1066 };
1067
1068 mcusys: mcusys@100E0000 {
1069 compatible = "mediatek,mt7988-mcusys", "syscon";
1070 reg = <0 0x100E0000 0 0x1000>;
1071 #clock-cells = <1>;
1072 };
1073
1074 clkitg: clkitg {
1075 compatible = "simple-bus";
1076 };
1077
1078 efuse: efuse@11f50000 {
1079 compatible = "mediatek,efuse";
1080 reg = <0 0x11f50000 0 0x1000>;
1081 #address-cells = <1>;
1082 #size-cells = <1>;
1083
1084 lvts_calibration: calib@918 {
1085 reg = <0x918 0x28>;
1086 };
1087 phy_calibration_p0: calib@940 {
1088 reg = <0x940 0x10>;
1089 };
1090 phy_calibration_p1: calib@954 {
1091 reg = <0x954 0x10>;
1092 };
1093 phy_calibration_p2: calib@968 {
1094 reg = <0x968 0x10>;
1095 };
1096 phy_calibration_p3: calib@97c {
1097 reg = <0x97c 0x10>;
1098 };
1099 cpufreq_calibration: calib@278 {
1100 reg = <0x278 0x1>;
1101 };
1102 };
1103};
1104
1105#include "mt7988-clkitg.dtsi"