blob: 0184af243429c48ad68e97c35cfd663bcba33134 [file] [log] [blame]
developer24455dd2021-10-28 10:55:41 +08001/*
2 * Copyright (c) 2020 MediaTek Inc.
3 * Author: Sam.Shih <sam.shih@mediatek.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 */
14
15#include <dt-bindings/interrupt-controller/irq.h>
16#include <dt-bindings/interrupt-controller/arm-gic.h>
17#include <dt-bindings/phy/phy.h>
18#include <dt-bindings/reset/ti-syscon.h>
19#include <dt-bindings/clock/mt7981-clk.h>
20/ {
21 compatible = "mediatek,mt7981-rfb";
22 interrupt-parent = <&gic>;
23 #address-cells = <2>;
24 #size-cells = <2>;
25 cpus {
26 #address-cells = <1>;
27 #size-cells = <0>;
28 cpu@0 {
29 device_type = "cpu";
30 compatible = "arm,cortex-a53";
31 enable-method = "psci";
32 reg = <0x0>;
33 };
34
35 cpu@1 {
36 device_type = "cpu";
37 compatible = "arm,cortex-a53";
38 enable-method = "psci";
39 reg = <0x1>;
40 };
41 };
42
43 auxadc: adc@1100d000 {
44 compatible = "mediatek,mt7981-auxadc",
45 "mediatek,mt7622-auxadc";
46 reg = <0 0x1100d000 0 0x1000>;
47 clocks = <&system_clk>;
48 clock-names = "main";
49 #io-channel-cells = <1>;
50 };
51
52 wed: wed@15010000 {
53 compatible = "mediatek,wed";
54 wed_num = <2>;
55 /* add this property for wed get the pci slot number. */
56 pci_slot_map = <0>, <1>;
57 reg = <0 0x15010000 0 0x1000>,
58 <0 0x15011000 0 0x1000>;
59 interrupt-parent = <&gic>;
60 interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>,
61 <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>;
62 };
63
64 wdma: wdma@15104800 {
65 compatible = "mediatek,wed-wdma";
66 reg = <0 0x15104800 0 0x400>,
67 <0 0x15104c00 0 0x400>;
68 };
69
70 ap2woccif: ap2woccif@151A5000 {
71 compatible = "mediatek,ap2woccif";
72 reg = <0 0x151A5000 0 0x1000>,
73 <0 0x151AD000 0 0x1000>;
74 interrupt-parent = <&gic>;
75 interrupts = <GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH>,
76 <GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH>;
77 };
78
79 wocpu0_ilm: wocpu0_ilm@151E0000 {
80 compatible = "mediatek,wocpu0_ilm";
81 reg = <0 0x151E0000 0 0x8000>;
82 };
83
84 wocpu_dlm: wocpu_dlm@151E8000 {
85 compatible = "mediatek,wocpu_dlm";
86 reg = <0 0x151E8000 0 0x2000>,
87 <0 0x151F8000 0 0x2000>;
88
89 resets = <&ethsysrst 0>;
90 reset-names = "wocpu_rst";
91 };
92
93 cpu_boot: wocpu_boot@15194000 {
94 compatible = "mediatek,wocpu_boot";
95 reg = <0 0x15194000 0 0x1000>;
96 };
97
98 reserved-memory {
99 #address-cells = <2>;
100 #size-cells = <2>;
101 ranges;
102
103 /* 192 KiB reserved for ARM Trusted Firmware (BL31) */
104 secmon_reserved: secmon@43000000 {
105 reg = <0 0x43000000 0 0x30000>;
106 no-map;
107 };
108
109 wmcpu_emi: wmcpu-reserved@47C80000 {
110 compatible = "mediatek,wmcpu-reserved";
111 no-map;
112 reg = <0 0x47C80000 0 0x00100000>;
113 };
114
115 wocpu0_emi: wocpu0_emi@47D80000 {
116 compatible = "mediatek,wocpu0_emi";
117 no-map;
118 reg = <0 0x47D80000 0 0x40000>;
119 shared = <0>;
120 };
121
122 wocpu_data: wocpu_data@47DC0000 {
123 compatible = "mediatek,wocpu_data";
124 no-map;
125 reg = <0 0x47DC0000 0 0x240000>;
126 shared = <1>;
127 };
128 };
129
130 psci {
131 compatible = "arm,psci-0.2";
132 method = "smc";
133 };
134
135 clk40m: oscillator@0 {
136 compatible = "fixed-clock";
137 #clock-cells = <0>;
138 clock-frequency = <40000000>;
139 clock-output-names = "clkxtal";
140 };
141
142 infracfg_ao: infracfg_ao@10001000 {
143 compatible = "mediatek,mt7981-infracfg_ao", "syscon";
144 reg = <0 0x10001000 0 0x30>;
145 #clock-cells = <1>;
146 };
147
148 infracfg: infracfg@10001040 {
149 compatible = "mediatek,mt7981-infracfg", "syscon";
150 reg = <0 0x10001040 0 0x1000>;
151 #clock-cells = <1>;
152 };
153
154 topckgen: topckgen@1001B000 {
155 compatible = "mediatek,mt7981-topckgen", "syscon";
156 reg = <0 0x1001B000 0 0x1000>;
157 #clock-cells = <1>;
158 };
159
160 apmixedsys: apmixedsys@1001E000 {
161 compatible = "mediatek,mt7981-apmixedsys", "syscon";
162 reg = <0 0x1001E000 0 0x1000>;
163 #clock-cells = <1>;
164 };
165
166 system_clk: dummy_system_clk {
167 compatible = "fixed-clock";
168 clock-frequency = <40000000>;
169 #clock-cells = <0>;
170 };
171
172 uart_clk: dummy_uart_clk {
173 compatible = "fixed-clock";
174 clock-frequency = <40000000>;
175 #clock-cells = <0>;
176 };
177
178 gpt_clk: dummy_gpt_clk {
179 compatible = "fixed-clock";
180 clock-frequency = <20000000>;
181 #clock-cells = <0>;
182 };
183
developer33b0c632021-11-11 16:25:17 +0800184 spi_clk: dummy_spi_clk {
185 compatible = "fixed-clock";
186 clock-frequency = <208000000>;
187 #clock-cells = <0>;
188 };
189
developer24455dd2021-10-28 10:55:41 +0800190 timer {
191 compatible = "arm,armv8-timer";
192 interrupt-parent = <&gic>;
developer3f7ec6d2021-11-12 14:59:41 +0800193 clock-frequency = <13000000>;
developer24455dd2021-10-28 10:55:41 +0800194 interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>,
195 <GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>,
196 <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>,
197 <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>;
198
199 };
200
201 watchdog: watchdog@1001c000 {
202 compatible = "mediatek,mt7622-wdt",
203 "mediatek,mt6589-wdt";
204 reg = <0 0x1001c000 0 0x1000>;
205 interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
206 #reset-cells = <1>;
207 };
208
209 gic: interrupt-controller@c000000 {
210 compatible = "arm,gic-v3";
211 #interrupt-cells = <3>;
212 interrupt-parent = <&gic>;
213 interrupt-controller;
214 reg = <0 0x0c000000 0 0x40000>, /* GICD */
215 <0 0x0c080000 0 0x200000>; /* GICR */
216
217 interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
218 };
219
220 uart0: serial@11002000 {
221 compatible = "mediatek,mt7986-uart",
222 "mediatek,mt6577-uart";
223 reg = <0 0x11002000 0 0x400>;
224 interrupts = <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>;
225 clocks = <&uart_clk>;
226 status = "disabled";
227 };
228
229 uart1: serial@11003000 {
230 compatible = "mediatek,mt7986-uart",
231 "mediatek,mt6577-uart";
232 reg = <0 0x11003000 0 0x400>;
233 interrupts = <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>;
234 clocks = <&uart_clk>;
235 status = "disabled";
236 };
237
238 uart2: serial@11004000 {
239 compatible = "mediatek,mt7986-uart",
240 "mediatek,mt6577-uart";
241 reg = <0 0x11004000 0 0x400>;
242 interrupts = <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>;
243 clocks = <&uart_clk>;
244 status = "disabled";
245 };
246
247 pcie: pcie@11280000 {
248 compatible = "mediatek,mt7981-pcie",
249 "mediatek,mt7986-pcie";
250 device_type = "pci";
251 reg = <0 0x11280000 0 0x4000>;
252 reg-names = "pcie-mac";
253 #address-cells = <3>;
254 #size-cells = <2>;
255 interrupts = <GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>;
256 bus-range = <0x00 0xff>;
257 ranges = <0x82000000 0 0x20000000
258 0x0 0x20000000 0 0x10000000>;
259 status = "disabled";
260
261 phys = <&u3port0 PHY_TYPE_PCIE>;
262 phy-names = "pcie-phy";
263
264 #interrupt-cells = <1>;
265 interrupt-map-mask = <0 0 0 7>;
266 interrupt-map = <0 0 0 1 &pcie_intc 0>,
267 <0 0 0 2 &pcie_intc 1>,
268 <0 0 0 3 &pcie_intc 2>,
269 <0 0 0 4 &pcie_intc 3>;
270 pcie_intc: interrupt-controller {
271 interrupt-controller;
272 #address-cells = <0>;
273 #interrupt-cells = <1>;
274 };
275 };
276
277 pio: pinctrl@11d00000 {
278 compatible = "mediatek,mt7981-pinctrl";
279 reg = <0 0x11d00000 0 0x1000>,
280 <0 0x11c00000 0 0x1000>,
281 <0 0x11c10000 0 0x1000>,
282 <0 0x11d20000 0 0x1000>,
283 <0 0x11e00000 0 0x1000>,
284 <0 0x11e20000 0 0x1000>,
285 <0 0x11f00000 0 0x1000>,
286 <0 0x11f10000 0 0x1000>,
287 <0 0x1000b000 0 0x1000>;
288 reg-names = "gpio_base", "iocfg_rt_base", "iocfg_rm_base",
289 "iocfg_rb_base", "iocfg_lb_base", "iocfg_bl_base",
290 "iocfg_tm_base", "iocfg_tl_base", "eint";
291 gpio-controller;
292 #gpio-cells = <2>;
293 gpio-ranges = <&pio 0 0 56>;
294 interrupt-controller;
295 interrupts = <GIC_SPI 153 IRQ_TYPE_LEVEL_HIGH>;
296 interrupt-parent = <&gic>;
297 #interrupt-cells = <2>;
298 };
299
300 ethsys: syscon@15000000 {
301 #address-cells = <1>;
302 #size-cells = <1>;
303 compatible = "mediatek,mt7986-ethsys",
304 "syscon";
305 reg = <0 0x15000000 0 0x1000>;
306 #clock-cells = <1>;
307 #reset-cells = <1>;
308
309 ethsysrst: reset-controller {
310 compatible = "ti,syscon-reset";
311 #reset-cells = <1>;
312 ti,reset-bits = <0x34 4 0x34 4 0x34 4 (ASSERT_SET | DEASSERT_CLEAR | STATUS_SET)>;
313 };
314 };
315
316 eth: ethernet@15100000 {
317 compatible = "mediatek,mt7981-eth";
318 reg = <0 0x15100000 0 0x80000>;
319 interrupts = <GIC_SPI 196 IRQ_TYPE_LEVEL_HIGH>,
320 <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH>,
321 <GIC_SPI 198 IRQ_TYPE_LEVEL_HIGH>,
322 <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH>;
323 clocks = <&system_clk>,
324 <&system_clk>,
325 <&system_clk>,
326 <&system_clk>,
327 <&system_clk>,
328 <&system_clk>,
329 <&system_clk>,
330 <&system_clk>,
331 <&system_clk>,
332 <&system_clk>,
333 <&system_clk>,
334 <&system_clk>,
335 <&system_clk>;
336 clock-names = "fe", "gp2", "gp1", "wocpu1", "wocpu0",
337 "sgmii_tx250m", "sgmii_rx250m",
338 "sgmii_cdr_ref", "sgmii_cdr_fb",
339 "sgmii2_tx250m", "sgmii2_rx250m",
340 "sgmii2_cdr_ref", "sgmii2_cdr_fb";
341 mediatek,ethsys = <&ethsys>;
342 mediatek,sgmiisys = <&sgmiisys0>, <&sgmiisys1>;
343 mediatek,infracfg = <&topmisc>;
344 #reset-cells = <1>;
345 #address-cells = <1>;
346 #size-cells = <0>;
347 status = "disabled";
348 };
349
350 hnat: hnat@15000000 {
351 compatible = "mediatek,mtk-hnat_v4";
352 reg = <0 0x15100000 0 0x80000>;
353 resets = <&ethsys 0>;
354 reset-names = "mtketh";
355 status = "disabled";
356 };
357
358 sgmiisys0: syscon@10060000 {
359 compatible = "mediatek,mt7986-sgmiisys", "syscon";
360 reg = <0 0x10060000 0 0x1000>;
361 pn_swap;
362 #clock-cells = <1>;
363 };
364
365 sgmiisys1: syscon@10070000 {
366 compatible = "mediatek,mt7986-sgmiisys", "syscon";
367 reg = <0 0x10070000 0 0x1000>;
368 #clock-cells = <1>;
369 };
370
371 topmisc: topmisc@11d10000 {
372 compatible = "mediatek,mt7981-topmisc", "syscon";
373 reg = <0 0x11d10000 0 0x10000>;
374 #clock-cells = <1>;
375 };
376
377 snand: snfi@11005000 {
378 compatible = "mediatek,mt7986-snand";
379 reg = <0 0x11005000 0 0x1000>, <0 0x11006000 0 0x1000>;
380 reg-names = "nfi", "ecc";
381 interrupts = <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>;
developeraf7c3502021-11-10 20:49:31 +0800382 clocks = <&infracfg_ao CK_INFRA_SPINFI1_CK>,
383 <&infracfg_ao CK_INFRA_NFI1_CK>,
384 <&infracfg_ao CK_INFRA_NFI_HCK_CK>;
385 clock-names = "pad_clk", "nfi_clk", "nfi_hclk";
386 assigned-clocks = <&topckgen CK_TOP_SPINFI_SEL>,
387 <&topckgen CK_TOP_NFI1X_SEL>;
388 assigned-clock-parents = <&topckgen CK_TOP_CB_M_D8>,
389 <&topckgen CK_TOP_CB_M_D8>;
developer24455dd2021-10-28 10:55:41 +0800390 #address-cells = <1>;
391 #size-cells = <0>;
392 status = "disabled";
393 };
394
395 mmc0: mmc@11230000 {
396 compatible = "mediatek,mt7986-mmc";
397 reg = <0 0x11230000 0 0x1000>, <0 0x11c20000 0 0x1000>;
398 interrupts = <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>;
399 clocks = <&system_clk>,
400 <&system_clk>,
401 <&system_clk>;
402 clock-names = "source", "hclk", "source_cg";
403 status = "disabled";
404 };
405
406 wbsys: wbsys@18000000 {
407 compatible = "mediatek,wbsys";
408 reg = <0 0x18000000 0 0x1000000>;
409 interrupts = <GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH>,
410 <GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH>,
411 <GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH>,
412 <GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH>;
413 chip_id = <0x7981>;
414 };
415
416 wed_pcie: wed_pcie@10003000 {
417 compatible = "mediatek,wed_pcie";
418 reg = <0 0x10003000 0 0x10>;
419 };
420
421 spi0: spi@1100a000 {
422 compatible = "mediatek,ipm-spi-quad";
423 reg = <0 0x1100a000 0 0x100>;
424 interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>;
developer33b0c632021-11-11 16:25:17 +0800425 clocks = <&spi_clk>,
426 <&spi_clk>,
427 <&spi_clk>,
428 <&spi_clk>;
developer24455dd2021-10-28 10:55:41 +0800429 clock-names = "parent-clk", "sel-clk", "spi-clk", "spi-hclk";
430 status = "disabled";
431 };
432
433 spi1: spi@1100b000 {
434 compatible = "mediatek,ipm-spi-single";
435 reg = <0 0x1100b000 0 0x100>;
436 interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>;
developer33b0c632021-11-11 16:25:17 +0800437 clocks = <&spi_clk>,
438 <&spi_clk>,
439 <&spi_clk>,
440 <&spi_clk>;
developer24455dd2021-10-28 10:55:41 +0800441 clock-names = "parent-clk", "sel-clk", "spi-clk", "spi-hclk";
442 status = "disabled";
443 };
444
445 spi2: spi@11009000 {
446 compatible = "mediatek,ipm-spi-quad";
447 reg = <0 0x11009000 0 0x100>;
448 interrupts = <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>;
developer33b0c632021-11-11 16:25:17 +0800449 clocks = <&spi_clk>,
450 <&spi_clk>,
451 <&spi_clk>,
452 <&spi_clk>;
developer24455dd2021-10-28 10:55:41 +0800453 clock-names = "parent-clk", "sel-clk", "spi-clk", "spi-hclk";
454 status = "disabled";
455 };
456
457
458 consys: consys@10000000 {
459 compatible = "mediatek,mt7981-consys";
460 reg = <0 0x10000000 0 0x8600000>;
461 memory-region = <&wmcpu_emi>;
462 };
463
464 xhci: xhci@11200000 {
465 compatible = "mediatek,mt7986-xhci",
466 "mediatek,mtk-xhci";
467 reg = <0 0x11200000 0 0x2e00>,
468 <0 0x11203e00 0 0x0100>;
469 reg-names = "mac", "ippc";
470 interrupts = <GIC_SPI 173 IRQ_TYPE_LEVEL_HIGH>;
471 phys = <&u2port0 PHY_TYPE_USB2>;
472 clocks = <&system_clk>,
473 <&system_clk>,
474 <&system_clk>,
475 <&system_clk>,
476 <&system_clk>;
477 clock-names = "sys_ck",
478 "xhci_ck",
479 "ref_ck",
480 "mcu_ck",
481 "dma_ck";
482 #address-cells = <2>;
483 #size-cells = <2>;
484 mediatek,u3p-dis-msk = <0x01>;
485 status = "disabled";
486 };
487
488 usbtphy: usb-phy@11e10000 {
489 compatible = "mediatek,mt7986",
490 "mediatek,generic-tphy-v2";
491 #address-cells = <2>;
492 #size-cells = <2>;
493 ranges;
494 status = "okay";
495
496 u2port0: usb-phy@11e10000 {
497 reg = <0 0x11e10000 0 0x700>;
498 clocks = <&system_clk>;
499 clock-names = "ref";
500 #phy-cells = <1>;
501 status = "okay";
502 };
503
504 u3port0: usb-phy@11e10700 {
505 reg = <0 0x11e10700 0 0x900>;
506 clocks = <&system_clk>;
507 clock-names = "ref";
508 #phy-cells = <1>;
509 mediatek,syscon-type = <&topmisc 0x218 0>;
510 status = "okay";
511 };
512 };
513
514 reg_3p3v: regulator-3p3v {
515 compatible = "regulator-fixed";
516 regulator-name = "fixed-3.3V";
517 regulator-min-microvolt = <3300000>;
518 regulator-max-microvolt = <3300000>;
519 regulator-boot-on;
520 regulator-always-on;
521 };
522
523 clkitg: clkitg {
524 compatible = "simple-bus";
525 };
526};
527#include "mt7981-clkitg.dtsi"