blob: 16b872ed027cfcd10d5e7c0443f1bd1f96ac7f20 [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";
361 interrupt-parent = <&gic>;
362 interrupts = <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH>,
363 <GIC_SPI 280 IRQ_TYPE_LEVEL_HIGH>;
364 interrupt-names = "tdma-tx-pause", "mbox";
365 topmisc = <&topmisc>;
366 fe_mem = <&eth>;
367 topckgen = <&topckgen>;
368 };
369 hpdma1: hpdma@09106000 {
370 compatible = "mediatek,hpdma-top";
371 reg = <0 0x09106000 0 0x1000>;
372 reg-names = "base";
373 };
374 hpdma2: hpdma@09606000 {
375 compatible = "mediatek,hpdma-sub";
376 reg = <0 0x09606000 0 0x1000>;
377 reg-names = "base";
378 };
379
380 watchdog: watchdog@1001c000 {
381 compatible = "mediatek,mt7622-wdt",
382 "mediatek,mt6589-wdt",
383 "syscon";
384 reg = <0 0x1001c000 0 0x1000>;
385 interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
386 #reset-cells = <1>;
387 };
388
389 phyfw: phy-firmware@f000000 {
390 compatible = "mediatek,2p5gphy-fw";
391 reg = <0 0x0f000000 0 0x8000>,
392 <0 0x0f100000 0 0x20000>,
393 <0 0x0f0f0000 0 0x200>;
394 };
395
396 gic: interrupt-controller@c000000 {
397 compatible = "arm,gic-v3";
398 #interrupt-cells = <3>;
399 interrupt-parent = <&gic>;
400 interrupt-controller;
401 reg = <0 0x0c000000 0 0x40000>, /* GICD */
402 <0 0x0c080000 0 0x200000>; /* GICR */
403
404 interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
405 };
406
407 trng: trng@1020f000 {
408 compatible = "mediatek,mt7988-rng";
409 };
410
411 uart0: serial@11000000 {
412 compatible = "mediatek,mt7986-uart",
413 "mediatek,mt6577-uart";
414 reg = <0 0x11000000 0 0x100>;
415 interrupts = <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>;
416 clocks = <&uart_clk>;
417 status = "disabled";
418 };
419
420 uart1: serial@11000100 {
421 compatible = "mediatek,mt7986-uart",
422 "mediatek,mt6577-uart";
423 reg = <0 0x11000100 0 0x100>;
424 interrupts = <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>;
425 clocks = <&uart_clk>;
426 status = "disabled";
427 };
428
429 uart2: serial@11000200 {
430 compatible = "mediatek,mt7986-uart",
431 "mediatek,mt6577-uart";
432 reg = <0 0x11000200 0 0x100>;
433 interrupts = <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>;
434 clocks = <&uart_clk>;
435 status = "disabled";
436 };
437
438 i2c0: i2c@11003000 {
439 compatible = "mediatek,mt7988-i2c",
440 "mediatek,mt7981-i2c";
441 reg = <0 0x11003000 0 0x1000>,
442 <0 0x10217080 0 0x80>;
443 interrupts = <GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>;
444 clock-div = <1>;
445 clocks = <&system_clk>,
446 <&system_clk>;
447 clock-names = "main", "dma";
448 #address-cells = <1>;
449 #size-cells = <0>;
450 status = "disabled";
451 };
452
453 i2c1: i2c@11004000 {
454 compatible = "mediatek,mt7988-i2c",
455 "mediatek,mt7981-i2c";
456 reg = <0 0x11004000 0 0x1000>,
457 <0 0x10217100 0 0x80>;
458 interrupts = <GIC_SPI 144 IRQ_TYPE_LEVEL_HIGH>;
459 clock-div = <1>;
460 clocks = <&system_clk>,
461 <&system_clk>;
462 clock-names = "main", "dma";
463 #address-cells = <1>;
464 #size-cells = <0>;
465 status = "disabled";
466 };
467
468 i2c2: i2c@11005000 {
469 compatible = "mediatek,mt7988-i2c",
470 "mediatek,mt7981-i2c";
471 reg = <0 0x11005000 0 0x1000>,
472 <0 0x10217180 0 0x80>;
473 interrupts = <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>;
474 clock-div = <1>;
475 clocks = <&system_clk>,
476 <&system_clk>;
477 clock-names = "main", "dma";
478 #address-cells = <1>;
479 #size-cells = <0>;
480 status = "disabled";
481 };
482
483 pwm: pwm@10048000 {
484 compatible = "mediatek,mt7988-pwm";
485 reg = <0 0x10048000 0 0x1000>;
486 #pwm-cells = <2>;
487 clocks = <&system_clk>,
488 <&system_clk>,
489 <&system_clk>,
490 <&system_clk>,
491 <&system_clk>,
492 <&system_clk>,
493 <&system_clk>,
494 <&system_clk>,
495 <&system_clk>,
496 <&system_clk>;
497 clock-names = "top", "main", "pwm1", "pwm2", "pwm3",
498 "pwm4","pwm5","pwm6","pwm7","pwm8";
499 status = "disabled";
500 };
501
502 fan: pwm-fan {
503 compatible = "pwm-fan";
504 /* cooling level (0, 1, 2) : (0% duty, 50% duty, 100% duty) */
505 cooling-levels = <0 128 255>;
506 #cooling-cells = <2>;
507 #thermal-sensor-cells = <1>;
508 status = "disabled";
509 };
510
511 lvts: lvts@1100a000 {
512 compatible = "mediatek,mt7988-lvts";
513 #thermal-sensor-cells = <1>;
514 reg = <0 0x1100a000 0 0x1000>;
515 clocks = <&system_clk>;
516 clock-names = "lvts_clk";
517 nvmem-cells = <&lvts_calibration>;
518 nvmem-cell-names = "e_data1";
519 };
520
521 crypto: crypto@15600000 {
522 compatible = "inside-secure,safexcel-eip197b";
523 reg = <0 0x15600000 0 0x180000>;
524 interrupts = <GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH>,
525 <GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH>,
526 <GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH>,
527 <GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH>;
528 interrupt-names = "ring0", "ring1", "ring2", "ring3";
529 status = "okay";
530 };
531
532 pcie0: pcie@11300000 {
533 compatible = "mediatek,mt7988-pcie",
534 "mediatek,mt7986-pcie";
535 device_type = "pci";
536 #address-cells = <3>;
537 #size-cells = <2>;
538 reg = <0 0x11300000 0 0x2000>;
539 reg-names = "pcie-mac";
540 linux,pci-domain = <0>;
541 interrupts = <GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>;
542 bus-range = <0x00 0xff>;
543 ranges = <0x81000000 0x00 0x30000000 0x00
544 0x30000000 0x00 0x00200000>,
545 <0x82000000 0x00 0x30200000 0x00
546 0x30200000 0x00 0x07e00000>;
547 status = "disabled";
548
549 clocks = <&topckgen CK_TOP_PEXTP_P0_SEL>,
550 <&infracfg_ao CK_INFRA_PCIE_GFMUX_TL_P0>,
551 <&infracfg_ao CK_INFRA_PCIE_PIPE_P0>,
552 <&infracfg_ao CK_INFRA_133M_PCIE_CK_P0>,
553 <&infracfg_ao CK_INFRA_PCIE_PERI_26M_CK_P0>;
554
555 #interrupt-cells = <1>;
556 interrupt-map-mask = <0 0 0 0x7>;
557 interrupt-map = <0 0 0 1 &pcie_intc0 0>,
558 <0 0 0 2 &pcie_intc0 1>,
559 <0 0 0 3 &pcie_intc0 2>,
560 <0 0 0 4 &pcie_intc0 3>;
561 pcie_intc0: interrupt-controller {
562 #address-cells = <0>;
563 #interrupt-cells = <1>;
564 interrupt-controller;
565 };
566 };
567
568 pcie1: pcie@11310000 {
569 compatible = "mediatek,mt7988-pcie",
570 "mediatek,mt7986-pcie";
571 device_type = "pci";
572 #address-cells = <3>;
573 #size-cells = <2>;
574 reg = <0 0x11310000 0 0x2000>;
575 reg-names = "pcie-mac";
576 linux,pci-domain = <1>;
577 interrupts = <GIC_SPI 169 IRQ_TYPE_LEVEL_HIGH>;
578 bus-range = <0x00 0xff>;
579 ranges = <0x81000000 0x00 0x38000000 0x00
580 0x38000000 0x00 0x00200000>,
581 <0x82000000 0x00 0x38200000 0x00
582 0x38200000 0x00 0x07e00000>;
583 status = "disabled";
584
585 clocks = <&topckgen CK_TOP_PEXTP_P1_SEL>,
586 <&infracfg_ao CK_INFRA_PCIE_GFMUX_TL_P1>,
587 <&infracfg_ao CK_INFRA_PCIE_PIPE_P1>,
588 <&infracfg_ao CK_INFRA_133M_PCIE_CK_P1>,
589 <&infracfg_ao CK_INFRA_PCIE_PERI_26M_CK_P1>;
590
591 #interrupt-cells = <1>;
592 interrupt-map-mask = <0 0 0 0x7>;
593 interrupt-map = <0 0 0 1 &pcie_intc1 0>,
594 <0 0 0 2 &pcie_intc1 1>,
595 <0 0 0 3 &pcie_intc1 2>,
596 <0 0 0 4 &pcie_intc1 3>;
597 pcie_intc1: interrupt-controller {
598 #address-cells = <0>;
599 #interrupt-cells = <1>;
600 interrupt-controller;
601 };
602 };
603
604 pcie2: pcie@11280000 {
605 compatible = "mediatek,mt7988-pcie",
606 "mediatek,mt7986-pcie";
607 device_type = "pci";
608 #address-cells = <3>;
609 #size-cells = <2>;
610 reg = <0 0x11280000 0 0x2000>;
611 reg-names = "pcie-mac";
612 linux,pci-domain = <3>;
613 interrupts = <GIC_SPI 170 IRQ_TYPE_LEVEL_HIGH>;
614 bus-range = <0x00 0xff>;
615 ranges = <0x81000000 0x00 0x20000000 0x00
616 0x20000000 0x00 0x00200000>,
617 <0x82000000 0x00 0x20200000 0x00
618 0x20200000 0x00 0x07e00000>;
619 status = "disabled";
620
621 clocks = <&topckgen CK_TOP_PEXTP_P2_SEL>,
622 <&infracfg_ao CK_INFRA_PCIE_GFMUX_TL_P2>,
623 <&infracfg_ao CK_INFRA_PCIE_PIPE_P2>,
624 <&infracfg_ao CK_INFRA_133M_PCIE_CK_P2>,
625 <&infracfg_ao CK_INFRA_PCIE_PERI_26M_CK_P2>,
626 <&infracfg_ao CK_INFRA_PCIE_PERI_26M_CK_P3>;
627
628 phys = <&xphyu3port0 PHY_TYPE_PCIE>;
629 phy-names = "pcie-phy";
630
631 #interrupt-cells = <1>;
632 interrupt-map-mask = <0 0 0 0x7>;
633 interrupt-map = <0 0 0 1 &pcie_intc2 0>,
634 <0 0 0 2 &pcie_intc2 1>,
635 <0 0 0 3 &pcie_intc2 2>,
636 <0 0 0 4 &pcie_intc2 3>;
637 pcie_intc2: interrupt-controller {
638 #address-cells = <0>;
639 #interrupt-cells = <1>;
640 interrupt-controller;
641 };
642 };
643
644 pcie3: pcie@11290000 {
645 compatible = "mediatek,mt7988-pcie",
646 "mediatek,mt7986-pcie";
647 device_type = "pci";
648 #address-cells = <3>;
649 #size-cells = <2>;
650 reg = <0 0x11290000 0 0x2000>;
651 reg-names = "pcie-mac";
652 linux,pci-domain = <2>;
653 interrupts = <GIC_SPI 171 IRQ_TYPE_LEVEL_HIGH>;
654 bus-range = <0x00 0xff>;
655 ranges = <0x81000000 0x00 0x28000000 0x00
656 0x28000000 0x00 0x00200000>,
657 <0x82000000 0x00 0x28200000 0x00
658 0x28200000 0x00 0x07e00000>;
659 status = "disabled";
660
661 clocks = <&topckgen CK_TOP_PEXTP_P3_SEL>,
662 <&infracfg_ao CK_INFRA_PCIE_GFMUX_TL_P3>,
663 <&infracfg_ao CK_INFRA_PCIE_PIPE_P3>,
664 <&infracfg_ao CK_INFRA_133M_PCIE_CK_P3>,
665 <&infracfg_ao CK_INFRA_PCIE_PERI_26M_CK_P3>;
666
667 #interrupt-cells = <1>;
668 interrupt-map-mask = <0 0 0 0x7>;
669 interrupt-map = <0 0 0 1 &pcie_intc3 0>,
670 <0 0 0 2 &pcie_intc3 1>,
671 <0 0 0 3 &pcie_intc3 2>,
672 <0 0 0 4 &pcie_intc3 3>;
673 pcie_intc3: interrupt-controller {
674 #address-cells = <0>;
675 #interrupt-cells = <1>;
676 interrupt-controller;
677 };
678 };
679
680 pio: pinctrl@1001f000 {
681 compatible = "mediatek,mt7988-pinctrl";
682 reg = <0 0x1001f000 0 0x1000>,
683 <0 0x11c10000 0 0x1000>,
684 <0 0x11d00000 0 0x1000>,
685 <0 0x11d20000 0 0x1000>,
686 <0 0x11e00000 0 0x1000>,
687 <0 0x11f00000 0 0x1000>,
688 <0 0x1000b000 0 0x1000>;
689 reg-names = "gpio_base", "iocfg_tr_base", "iocfg_br_base",
690 "iocfg_rb_base", "iocfg_lb_base", "iocfg_tl_base",
691 "eint";
692 gpio-controller;
693 #gpio-cells = <2>;
694 gpio-ranges = <&pio 0 0 83>;
695 interrupt-controller;
696 interrupts = <GIC_SPI 153 IRQ_TYPE_LEVEL_HIGH>;
697 interrupt-parent = <&gic>;
698 #interrupt-cells = <2>;
699 };
700
701 ethsys: syscon@15000000 {
702 #address-cells = <1>;
703 #size-cells = <1>;
704 compatible = "mediatek,mt7988-ethsys",
705 "syscon";
706 reg = <0 0x15000000 0 0x1000>;
707 #clock-cells = <1>;
708 #reset-cells = <1>;
709
710 ethsysrst: reset-controller {
711 compatible = "ti,syscon-reset";
712 #reset-cells = <1>;
713 ti,reset-bits =
714 <0x34 4 0x34 4 0x34 4
715 (ASSERT_SET | DEASSERT_CLEAR | STATUS_SET)>;
716 };
717 };
718
719 ethwarp: syscon@15031000 {
720 compatible = "mediatek,mt7988-ethwarp", "syscon";
721 reg = <0 0x15031000 0 0x1000>;
722 #clock-cells = <1>;
723 };
724
725 switch0: switch0@15020000 {
726 #address-cells = <1>;
727 #size-cells = <1>;
728 compatible = "mediatek,mt7988-switch", "syscon";
729 reg = <0 0x15020000 0 0x8000>;
730 };
731
732 eth: ethernet@15100000 {
733 compatible = "mediatek,mt7988-eth";
734 reg = <0 0x15100000 0 0x80000>,
735 <0 0x15400000 0 0x380000>;
736 interrupts = <GIC_SPI 196 IRQ_TYPE_LEVEL_HIGH>,
737 <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH>,
738 <GIC_SPI 198 IRQ_TYPE_LEVEL_HIGH>,
739 <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH>;
740 clocks = <&system_clk>,
741 <&system_clk>,
742 <&system_clk>,
743 <&system_clk>,
744 <&system_clk>,
745 <&system_clk>,
746 <&system_clk>,
747 <&system_clk>,
748 <&system_clk>,
749 <&system_clk>,
750 <&system_clk>,
751 <&system_clk>,
752 <&system_clk>;
753 clock-names = "fe", "gp2", "gp1", "wocpu1", "wocpu0",
754 "sgmii_tx250m", "sgmii_rx250m",
755 "sgmii_cdr_ref", "sgmii_cdr_fb",
756 "sgmii2_tx250m", "sgmii2_rx250m",
757 "sgmii2_cdr_ref", "sgmii2_cdr_fb";
758 mediatek,ethsys = <&ethsys>;
759 mediatek,sgmiisys = <&sgmiisys0>, <&sgmiisys1>;
760 mediatek,usxgmiisys = <&usxgmiisys0>, <&usxgmiisys1>;
761 mediatek,xfi_pextp = <&xfi_pextp0>, <&xfi_pextp1>;
762 mediatek,xfi_pll = <&xfi_pll>;
763 mediatek,infracfg = <&topmisc>;
764 mediatek,toprgu = <&watchdog>;
765 #reset-cells = <1>;
766 #address-cells = <1>;
767 #size-cells = <0>;
768 status = "disabled";
769 };
770
771 hnat: hnat@15000000 {
772 compatible = "mediatek,mtk-hnat_v5";
773 reg = <0 0x15100000 0 0x80000>;
774 resets = <&ethsys 0>;
775 reset-names = "mtketh";
776 status = "disabled";
777 };
778
779 sgmiisys0: syscon@10060000 {
780 compatible = "mediatek,mt7988-sgmiisys",
781 "mediatek,mt7988-sgmiisys_0",
782 "syscon";
783 reg = <0 0x10060000 0 0x1000>;
784 #clock-cells = <1>;
785 };
786
787 sgmiisys1: syscon@10070000 {
788 compatible = "mediatek,mt7988-sgmiisys",
789 "mediatek,mt7988-sgmiisys_1",
790 "syscon";
791 reg = <0 0x10070000 0 0x1000>;
792 #clock-cells = <1>;
793 };
794
795 usxgmiisys0: usxgmiisys@10080000 {
796 compatible = "mediatek,mt7988-usxgmiisys",
797 "mediatek,mt7988-usxgmiisys_0",
798 "syscon";
799 reg = <0 0x10080000 0 0x1000>;
800 #clock-cells = <1>;
801 };
802
803 usxgmiisys1: usxgmiisys@10081000 {
804 compatible = "mediatek,mt7988-usxgmiisys",
805 "mediatek,mt7988-usxgmiisys_1",
806 "syscon";
807 reg = <0 0x10081000 0 0x1000>;
808 #clock-cells = <1>;
809 };
810
811 xfi_pextp0: xfi_pextp@11f20000 {
812 compatible = "mediatek,mt7988-xfi_pextp",
813 "mediatek,mt7988-xfi_pextp_0",
814 "syscon";
815 reg = <0 0x11f20000 0 0x10000>;
816 #clock-cells = <1>;
817 };
818
819 xfi_pextp1: xfi_pextp@11f30000 {
820 compatible = "mediatek,mt7988-xfi_pextp",
821 "mediatek,mt7988-xfi_pextp_1",
822 "syscon";
823 reg = <0 0x11f30000 0 0x10000>;
824 #clock-cells = <1>;
825 };
826
827 xfi_pll: xfi_pll@11f40000 {
828 compatible = "mediatek,mt7988-xfi_pll", "syscon";
829 reg = <0 0x11f40000 0 0x1000>;
830 #clock-cells = <1>;
831 };
832
833 topmisc: topmisc@11d10000 {
834 compatible = "mediatek,mt7988-topmisc", "syscon",
835 "mediatek,mt7988-power-controller";
836 reg = <0 0x11d10000 0 0x10000>;
837 #clock-cells = <1>;
838 #power-domain-cells = <1>;
839 #address-cells = <1>;
840 #size-cells = <0>;
841 /* power domain of the SoC */
842 tops0@MT7988_POWER_DOMAIN_TOPS0 {
843 reg = <MT7988_POWER_DOMAIN_TOPS0>;
844 #power-domain-cells = <0>;
845 };
846 tops1@MT7988_POWER_DOMAIN_TOPS1 {
847 reg = <MT7988_POWER_DOMAIN_TOPS1>;
848 #power-domain-cells = <0>;
849 };
850 eth2p5@MT7988_POWER_DOMAIN_ETH2P5 {
851 reg = <MT7988_POWER_DOMAIN_ETH2P5>;
852 #power-domain-cells = <0>;
853 };
854 };
855
856 snand: snfi@11001000 {
857 compatible = "mediatek,mt7986-snand";
858 reg = <0 0x11001000 0 0x1000>, <0 0x11002000 0 0x1000>;
859 reg-names = "nfi", "ecc";
860 interrupts = <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>;
861 clocks = <&system_clk>,
862 <&system_clk>,
863 <&system_clk>,
864 <&system_clk>;
865 clock-names = "nfi_clk", "pad_clk", "ecc_clk", "nfi_hclk";
866 #address-cells = <1>;
867 #size-cells = <0>;
868 status = "disabled";
869 };
870
871 wbsys: wbsys@18000000 {
872 compatible = "mediatek,wbsys";
873 reg = <0 0x18000000 0 0x1000000>;
874 linux,pci-domain = <4>;
875 interrupts = <GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH>,
876 <GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH>,
877 <GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH>,
878 <GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH>;
879 chip_id = <0x7981>;
880 };
881
882 wed_pcie: wed_pcie@10003000 {
883 compatible = "mediatek,wed_pcie";
884 reg = <0 0x10003000 0 0x10>;
885 };
886
887 spi0: spi@11007000 {
888 compatible = "mediatek,ipm-spi-quad";
889 reg = <0 0x11007000 0 0x100>;
890 interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>;
891 clocks = <&topckgen CK_TOP_CB_M_D2>,
892 <&topckgen CK_TOP_SPI_SEL>,
893 <&infracfg_ao CK_INFRA_104M_SPI0>,
894 <&infracfg_ao CK_INFRA_66M_SPI0_HCK>;
895 clock-names = "parent-clk", "sel-clk", "spi-clk", "spi-hclk";
896 status = "disabled";
897 };
898
899 spi1: spi@11008000 {
900 compatible = "mediatek,ipm-spi-single";
901 reg = <0 0x11008000 0 0x100>;
902 interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>;
903 clocks = <&topckgen CK_TOP_CB_M_D2>,
904 <&topckgen CK_TOP_SPI_SEL>,
905 <&infracfg_ao CK_INFRA_104M_SPI1>,
906 <&infracfg_ao CK_INFRA_66M_SPI1_HCK>;
907 clock-names = "parent-clk", "sel-clk", "spi-clk", "spi-hclk";
908 status = "disabled";
909 };
910
911 spi2: spi@11009000 {
912 compatible = "mediatek,ipm-spi-quad";
913 reg = <0 0x11009000 0 0x100>;
914 interrupts = <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>;
915 clocks = <&topckgen CK_TOP_CB_M_D2>,
916 <&topckgen CK_TOP_SPI_SEL>,
917 <&infracfg_ao CK_INFRA_104M_SPI2_BCK>,
918 <&infracfg_ao CK_INFRA_66M_SPI2_HCK>;
919 clock-names = "parent-clk", "sel-clk", "spi-clk", "spi-hclk";
920 status = "disabled";
921 };
922
923 consys: consys@10000000 {
924 compatible = "mediatek,mt7981-consys";
925 reg = <0 0x10000000 0 0x8600000>;
926 memory-region = <&wmcpu_emi>;
927 };
928
929 xhci0: xhci@11190000 {
930 compatible = "mediatek,mt7988-xhci",
931 "mediatek,mtk-xhci";
932 reg = <0 0x11190000 0 0x2e00>,
933 <0 0x11193e00 0 0x0100>;
934 reg-names = "mac", "ippc";
935 interrupts = <GIC_SPI 173 IRQ_TYPE_LEVEL_HIGH>;
936 phys = <&xphyu2port0 PHY_TYPE_USB2>,
937 <&xphyu3port0 PHY_TYPE_USB3>;
938 clocks = <&system_clk>,
939 <&system_clk>,
940 <&system_clk>,
941 <&system_clk>,
942 <&system_clk>;
943 clock-names = "sys_ck",
944 "xhci_ck",
945 "ref_ck",
946 "mcu_ck",
947 "dma_ck";
948 #address-cells = <2>;
949 #size-cells = <2>;
950 status = "okay";
951 };
952
953 usbxphy: usb-phy@11e10000 {
954 compatible = "mediatek,mt7988",
955 "mediatek,xsphy";
956 #address-cells = <2>;
957 #size-cells = <2>;
958 ranges;
959 status = "okay";
960
961 xphyu2port0: usb-phy@11e10000 {
962 reg = <0 0x11e10000 0 0x400>;
963 clocks = <&system_clk>;
964 clock-names = "ref";
965 #phy-cells = <1>;
966 status = "okay";
967 };
968
969 xphyu3port0: usb-phy@11e13000 {
970 reg = <0 0x11e13400 0 0x500>;
971 clocks = <&system_clk>;
972 clock-names = "ref";
973 #phy-cells = <1>;
974 mediatek,syscon-type = <&topmisc 0x218 0>;
975 status = "okay";
976 };
977 };
978
979 xhci1: xhci@11200000 {
980 compatible = "mediatek,mt7988-xhci",
981 "mediatek,mtk-xhci";
982 reg = <0 0x11200000 0 0x2e00>,
983 <0 0x11203e00 0 0x0100>;
984 reg-names = "mac", "ippc";
985 interrupts = <GIC_SPI 172 IRQ_TYPE_LEVEL_HIGH>;
986 phys = <&tphyu2port0 PHY_TYPE_USB2>,
987 <&tphyu3port0 PHY_TYPE_USB3>;
988 clocks = <&system_clk>,
989 <&system_clk>,
990 <&system_clk>,
991 <&system_clk>,
992 <&system_clk>;
993 clock-names = "sys_ck",
994 "xhci_ck",
995 "ref_ck",
996 "mcu_ck",
997 "dma_ck";
998 #address-cells = <2>;
999 #size-cells = <2>;
1000 status = "okay";
1001 };
1002
1003 usbtphy: usb-phy@11c50000 {
1004 compatible = "mediatek,mt7988",
1005 "mediatek,generic-tphy-v2";
1006 #address-cells = <2>;
1007 #size-cells = <2>;
1008 ranges;
1009 status = "okay";
1010
1011 tphyu2port0: usb-phy@11c50000 {
1012 reg = <0 0x11c50000 0 0x700>;
1013 clocks = <&system_clk>;
1014 clock-names = "ref";
1015 #phy-cells = <1>;
1016 status = "okay";
1017 };
1018
1019 tphyu3port0: usb-phy@11c50700 {
1020 reg = <0 0x11c50700 0 0x900>;
1021 clocks = <&system_clk>;
1022 clock-names = "ref";
1023 #phy-cells = <1>;
1024 status = "okay";
1025 };
1026 };
1027
1028 clk40m: oscillator@0 {
1029 compatible = "fixed-clock";
1030 #clock-cells = <0>;
1031 clock-frequency = <40000000>;
1032 clock-output-names = "clkxtal";
1033 };
1034
1035 infracfg_ao: infracfg_ao@10001000 {
1036 compatible = "mediatek,mt7988-infracfg_ao", "syscon";
1037 reg = <0 0x10001000 0 0x1000>;
1038 #clock-cells = <1>;
1039 };
1040
1041 infracfg: infracfg@10209000 {
1042 compatible = "mediatek,mt7988-infracfg", "syscon";
1043 reg = <0 0x10209000 0 0x1000>;
1044 #clock-cells = <1>;
1045 };
1046
1047 topckgen: topckgen@1001B000 {
1048 compatible = "mediatek,mt7988-topckgen", "syscon";
1049 reg = <0 0x1001B000 0 0x1000>;
1050 #clock-cells = <1>;
1051 };
1052
1053 apmixedsys: apmixedsys@1001E000 {
1054 compatible = "mediatek,mt7988-apmixedsys", "syscon";
1055 reg = <0 0x1001E000 0 0x1000>;
1056 #clock-cells = <1>;
1057 };
1058
1059 mcusys: mcusys@100E0000 {
1060 compatible = "mediatek,mt7988-mcusys", "syscon";
1061 reg = <0 0x100E0000 0 0x1000>;
1062 #clock-cells = <1>;
1063 };
1064
1065 clkitg: clkitg {
1066 compatible = "simple-bus";
1067 };
1068
1069 efuse: efuse@11f50000 {
1070 compatible = "mediatek,efuse";
1071 reg = <0 0x11f50000 0 0x1000>;
1072 #address-cells = <1>;
1073 #size-cells = <1>;
1074
1075 lvts_calibration: calib@918 {
1076 reg = <0x918 0x28>;
1077 };
1078 phy_calibration_p0: calib@940 {
1079 reg = <0x940 0x10>;
1080 };
1081 phy_calibration_p1: calib@954 {
1082 reg = <0x954 0x10>;
1083 };
1084 phy_calibration_p2: calib@968 {
1085 reg = <0x968 0x10>;
1086 };
1087 phy_calibration_p3: calib@97c {
1088 reg = <0x97c 0x10>;
1089 };
1090 cpufreq_calibration: calib@278 {
1091 reg = <0x278 0x1>;
1092 };
1093 };
1094};
1095
1096#include "mt7988-clkitg.dtsi"