blob: 0ceb10ba5407f0aebf6f7aa9c83ff7ee6446552c [file] [log] [blame]
developerfd40db22021-04-29 10:08:25 +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/ {
20 compatible = "mediatek,mt7986b-rfb";
21 interrupt-parent = <&gic>;
22 #address-cells = <2>;
23 #size-cells = <2>;
24 cpus {
25 #address-cells = <1>;
26 #size-cells = <0>;
27 cpu@0 {
28 device_type = "cpu";
29 compatible = "arm,cortex-a53";
30 enable-method = "psci";
31 reg = <0x0>;
32 };
33
34 cpu@1 {
35 device_type = "cpu";
36 compatible = "arm,cortex-a53";
37 enable-method = "psci";
38 reg = <0x1>;
39 };
40
41 cpu@2 {
42 device_type = "cpu";
43 compatible = "arm,cortex-a53";
44 enable-method = "psci";
45 reg = <0x2>;
46 };
47
48 cpu@3 {
49 device_type = "cpu";
50 enable-method = "psci";
51 compatible = "arm,cortex-a53";
52 reg = <0x3>;
53 };
54 };
55
56 wed: wed@15010000 {
57 compatible = "mediatek,wed";
58 wed_num = <2>;
59 /* add this property for wed get the pci slot number. */
60 pci_slot_map = <0>, <1>;
61 reg = <0 0x15010000 0 0x1000>,
62 <0 0x15011000 0 0x1000>;
63 interrupt-parent = <&gic>;
64 interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>,
65 <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>;
66 };
67
68 wed2: wed2@15011000 {
69 compatible = "mediatek,wed2";
70 wed_num = <2>;
71 reg = <0 0x15010000 0 0x1000>,
72 <0 0x15011000 0 0x1000>;
73 interrupt-parent = <&gic>;
74 interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>,
75 <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>;
76 };
77
78 wdma: wdma@15104800 {
79 compatible = "mediatek,wed-wdma";
80 reg = <0 0x15104800 0 0x400>,
81 <0 0x15104c00 0 0x400>;
82 };
83
84 ap2woccif: ap2woccif@151A5000 {
85 compatible = "mediatek,ap2woccif";
86 reg = <0 0x151A5000 0 0x1000>,
87 <0 0x151AD000 0 0x1000>;
88 interrupt-parent = <&gic>;
89 interrupts = <GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH>,
90 <GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH>;
91 };
92
93 wocpu0_ilm: wocpu0_ilm@151E0000 {
94 compatible = "mediatek,wocpu0_ilm";
95 reg = <0 0x151E0000 0 0x8000>;
96 };
97
98 wocpu1_ilm: wocpu1_ilm@151F0000 {
99 compatible = "mediatek,wocpu1_ilm";
100 reg = <0 0x151F0000 0 0x8000>;
101 };
102
103 wocpu_dlm: wocpu_dlm@151E8000 {
104 compatible = "mediatek,wocpu_dlm";
105 reg = <0 0x151E8000 0 0x2000>,
106 <0 0x151F8000 0 0x2000>;
107
108 resets = <&ethsysrst 0>;
109 reset-names = "wocpu_rst";
110 };
111
112 cpu_boot: wocpu_boot@15194000 {
113 compatible = "mediatek,wocpu_boot";
114 reg = <0 0x15194000 0 0x1000>;
115 };
116
117 reserved-memory {
118 #address-cells = <2>;
119 #size-cells = <2>;
120 ranges;
121
122 /* 192 KiB reserved for ARM Trusted Firmware (BL31) */
123 secmon_reserved: secmon@43000000 {
124 reg = <0 0x43000000 0 0x30000>;
125 no-map;
126 };
127
128 wmcpu_emi: wmcpu-reserved@4FC00000 {
129 compatible = "mediatek,wmcpu-reserved";
130 no-map;
131 reg = <0 0x4FC00000 0 0x00100000>;
132 };
133
134 wocpu0_emi: wocpu0_emi@4FD00000 {
135 compatible = "mediatek,wocpu0_emi";
136 no-map;
137 reg = <0 0x4FD00000 0 0x40000>;
138 shared = <0>;
139 };
140
141 wocpu1_emi: wocpu1_emi@4FD80000 {
142 compatible = "mediatek,wocpu1_emi";
143 no-map;
144 reg = <0 0x4FD40000 0 0x40000>;
145 shared = <0>;
146 };
147
148 wocpu_data: wocpu_data@4FE00000 {
149 compatible = "mediatek,wocpu_data";
150 no-map;
151 reg = <0 0x4FD80000 0 0x200000>;
152 shared = <1>;
153 };
154 };
155
156 psci {
157 compatible = "arm,psci-0.2";
158 method = "smc";
159 };
160
161 system_clk: dummy_system_clk {
162 compatible = "fixed-clock";
163 clock-frequency = <40000000>;
164 #clock-cells = <0>;
165 };
166
167 spi0_clk: dummy_spi0_clk {
168 compatible = "fixed-clock";
169 clock-frequency = <208000000>;
170 #clock-cells = <0>;
171 };
172
173 spi1_clk: dummy_spi1_clk {
174 compatible = "fixed-clock";
175 clock-frequency = <40000000>;
176 #clock-cells = <0>;
177 };
178
179 uart_clk: dummy_uart_clk {
180 compatible = "fixed-clock";
181 clock-frequency = <40000000>;
182 #clock-cells = <0>;
183 };
184
185 gpt_clk: dummy_gpt_clk {
186 compatible = "fixed-clock";
developerf39022a2021-05-06 13:31:52 +0800187 clock-frequency = <13000000>;
developerfd40db22021-04-29 10:08:25 +0800188 #clock-cells = <0>;
189 };
190
191 timer {
192 compatible = "arm,armv8-timer";
193 interrupt-parent = <&gic>;
developerf39022a2021-05-06 13:31:52 +0800194 clock-frequency = <13000000>;
developerfd40db22021-04-29 10:08:25 +0800195 interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>,
196 <GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>,
197 <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>,
198 <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>;
199
200 };
201
202 watchdog: watchdog@1001c000 {
203 compatible = "mediatek,mt7622-wdt",
204 "mediatek,mt6589-wdt";
205 reg = <0 0x1001c000 0 0x1000>;
206 interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
207 #reset-cells = <1>;
208 };
209
210 gic: interrupt-controller@c000000 {
211 compatible = "arm,gic-v3";
212 #interrupt-cells = <3>;
213 interrupt-parent = <&gic>;
214 interrupt-controller;
215 reg = <0 0x0c000000 0 0x40000>, /* GICD */
216 <0 0x0c080000 0 0x200000>; /* GICR */
217
218 interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
219 };
220
221 uart0: serial@11002000 {
222 compatible = "mediatek,mt7986-uart",
223 "mediatek,mt6577-uart";
224 reg = <0 0x11002000 0 0x400>;
225 interrupts = <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>;
226 clocks = <&uart_clk>;
227 status = "disabled";
228 };
229
230 uart1: serial@11003000 {
231 compatible = "mediatek,mt7986-uart",
232 "mediatek,mt6577-uart";
233 reg = <0 0x11003000 0 0x400>;
234 interrupts = <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>;
235 clocks = <&uart_clk>;
236 status = "disabled";
237 };
238
239 uart2: serial@11004000 {
240 compatible = "mediatek,mt7986-uart",
241 "mediatek,mt6577-uart";
242 reg = <0 0x11004000 0 0x400>;
243 interrupts = <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>;
244 clocks = <&uart_clk>;
245 status = "disabled";
246 };
247
248 pcie: pcie@11280000 {
249 compatible = "mediatek,mt7986-pcie";
250 device_type = "pci";
251 reg = <0 0x11280000 0 0x5000>;
252 reg-names = "port0";
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
260 pcie0: pcie@0,0 {
261 device_type = "pci";
262 reg = <0x0000 0 0 0 0>;
263 #address-cells = <3>;
264 #size-cells = <2>;
265 ranges;
266 #interrupt-cells = <1>;
267 interrupt-map-mask = <0 0 0 7>;
268 interrupt-map = <0 0 0 1 &pcie_intc0 0>,
269 <0 0 0 2 &pcie_intc0 1>,
270 <0 0 0 3 &pcie_intc0 2>,
271 <0 0 0 4 &pcie_intc0 3>;
272 pcie_intc0: interrupt-controller {
273 interrupt-controller;
274 #address-cells = <0>;
275 #interrupt-cells = <1>;
276 };
277 };
278 };
279
developer3e916422021-05-27 16:40:29 +0800280 crypto: crypto@10320000 {
281 compatible = "inside-secure,safexcel-eip97";
282 reg = <0 0x10320000 0 0x40000>;
283 interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>,
284 <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>,
285 <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>,
286 <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>;
287 interrupt-names = "ring0", "ring1", "ring2", "ring3";
288 };
289
developerfd40db22021-04-29 10:08:25 +0800290 pio: pinctrl@1001f000 {
291 compatible = "mediatek,mt7986-pinctrl";
292 reg = <0 0x1001f000 0 0x1000>,
293 <0 0x11c30000 0 0x1000>,
294 <0 0x11c40000 0 0x1000>,
295 <0 0x11e20000 0 0x1000>,
296 <0 0x11e30000 0 0x1000>,
297 <0 0x11f00000 0 0x1000>,
298 <0 0x11f10000 0 0x1000>,
299 <0 0x1000b000 0 0x1000>;
300 reg-names = "gpio_base", "iocfg_rt_base", "iocfg_rb_base",
301 "iocfg_lt_base", "iocfg_lb_base", "iocfg_tr_base",
302 "iocfg_tl_base", "eint";
303 gpio-controller;
304 #gpio-cells = <2>;
305 gpio-ranges = <&pio 0 0 100>;
306 interrupt-controller;
307 interrupts = <GIC_SPI 153 IRQ_TYPE_LEVEL_HIGH>;
308 interrupt-parent = <&gic>;
309 #interrupt-cells = <2>;
310 };
311
312 ethsys: syscon@15000000 {
313 #address-cells = <1>;
314 #size-cells = <1>;
315 compatible = "mediatek,mt7986-ethsys",
316 "syscon";
317 reg = <0 0x15000000 0 0x1000>;
318 #clock-cells = <1>;
319 #reset-cells = <1>;
320
321 ethsysrst: reset-controller {
322 compatible = "ti,syscon-reset";
323 #reset-cells = <1>;
324 ti,reset-bits = <0x34 4 0x34 4 0x34 4 (ASSERT_SET | DEASSERT_CLEAR | STATUS_SET)>;
325 };
326 };
327
328 eth: ethernet@15100000 {
329 compatible = "mediatek,mt7986-eth";
330 reg = <0 0x15100000 0 0x80000>;
331 interrupts = <GIC_SPI 196 IRQ_TYPE_LEVEL_HIGH>,
332 <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH>,
333 <GIC_SPI 198 IRQ_TYPE_LEVEL_HIGH>,
334 <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH>;
335 clocks = <&system_clk>,
336 <&system_clk>,
337 <&system_clk>,
338 <&system_clk>,
339 <&system_clk>,
340 <&system_clk>,
341 <&system_clk>,
342 <&system_clk>,
343 <&system_clk>,
344 <&system_clk>,
345 <&system_clk>,
346 <&system_clk>,
347 <&system_clk>;
348 clock-names = "fe", "gp2", "gp1", "wocpu1", "wocpu0",
349 "sgmii_tx250m", "sgmii_rx250m",
350 "sgmii_cdr_ref", "sgmii_cdr_fb",
351 "sgmii2_tx250m", "sgmii2_rx250m",
352 "sgmii2_cdr_ref", "sgmii2_cdr_fb";
353 mediatek,ethsys = <&ethsys>;
354 mediatek,sgmiisys = <&sgmiisys0>, <&sgmiisys1>;
355 #reset-cells = <1>;
356 #address-cells = <1>;
357 #size-cells = <0>;
358 status = "disabled";
359 };
360
361 hnat: hnat@15000000 {
362 compatible = "mediatek,mtk-hnat_v4";
363 reg = <0 0x15100000 0 0x80000>;
364 resets = <&ethsys 0>;
365 reset-names = "mtketh";
366 status = "disabled";
367 };
368
369 sgmiisys0: syscon@10060000 {
370 compatible = "mediatek,mt7986-sgmiisys", "syscon";
371 reg = <0 0x10060000 0 0x1000>;
372 #clock-cells = <1>;
373 };
374
375 sgmiisys1: syscon@10070000 {
376 compatible = "mediatek,mt7986-sgmiisys", "syscon";
377 reg = <0 0x10070000 0 0x1000>;
378 #clock-cells = <1>;
379 };
380
381 snand: snfi@11005000 {
382 compatible = "mediatek,mt7986-snand";
383 reg = <0 0x11005000 0 0x1000>, <0 0x11006000 0 0x1000>;
384 reg-names = "nfi", "ecc";
385 interrupts = <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>;
386 clocks = <&system_clk>,
387 <&system_clk>,
388 <&system_clk>;
389 clock-names = "nfi_clk", "pad_clk", "ecc_clk";
390 #address-cells = <1>;
391 #size-cells = <0>;
392 status = "disabled";
393 };
394
395 wbsys: wbsys@18000000 {
396 compatible = "mediatek,wbsys";
397 reg = <0 0x18000000 0 0x1000000>;
398 interrupts = <GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH>,
399 <GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH>,
400 <GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH>,
401 <GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH>;
402 chip_id = <0x7986>;
403 };
404
405 wed_pcie: wed_pcie@10003000 {
406 compatible = "mediatek,wed_pcie";
407 reg = <0 0x10003000 0 0x10>;
408 };
409
410 spi0: spi@1100a000 {
411 compatible = "mediatek,ipm-spi";
412 reg = <0 0x1100a000 0 0x100>;
413 interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>;
414 clocks = <&spi0_clk>,
415 <&spi0_clk>,
416 <&spi0_clk>;
417 clock-names = "parent-clk", "sel-clk", "spi-clk";
418 status = "disabled";
419 };
420
421 spi1: spi@1100b000 {
422 compatible = "mediatek,ipm-spi";
423 reg = <0 0x1100b000 0 0x100>;
424 interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>;
425 clocks = <&spi1_clk>,
426 <&spi1_clk>,
427 <&spi1_clk>;
428 clock-names = "parent-clk", "sel-clk", "spi-clk";
429 status = "disabled";
430 };
431
432 consys: consys@10000000 {
433 compatible = "mediatek,mt7986-consys";
434 reg = <0 0x10000000 0 0x8600000>;
435 memory-region = <&wmcpu_emi>;
436 };
437
438 xhci: xhci@11200000 {
439 compatible = "mediatek,mt7986-xhci",
440 "mediatek,mtk-xhci";
441 reg = <0 0x11200000 0 0x2e00>,
442 <0 0x11203e00 0 0x0100>;
443 reg-names = "mac", "ippc";
444 interrupts = <GIC_SPI 173 IRQ_TYPE_LEVEL_HIGH>;
445 phys = <&u2port0 PHY_TYPE_USB2>,
446 <&u3port0 PHY_TYPE_USB3>,
447 <&u2port1 PHY_TYPE_USB2>;
448 clocks = <&system_clk>,
449 <&system_clk>,
450 <&system_clk>,
451 <&system_clk>,
452 <&system_clk>;
453 clock-names = "sys_ck",
454 "xhci_ck",
455 "ref_ck",
456 "mcu_ck",
457 "dma_ck";
458 #address-cells = <2>;
459 #size-cells = <2>;
460 status = "okay";
461 };
462
463 usbtphy: usb-phy@11e10000 {
464 compatible = "mediatek,mt7986",
465 "mediatek,generic-tphy-v2";
466 #address-cells = <2>;
467 #size-cells = <2>;
468 ranges;
469 status = "okay";
470
471 u2port0: usb-phy@11e10000 {
472 reg = <0 0x11e10000 0 0x700>;
473 clocks = <&system_clk>;
474 clock-names = "ref";
475 #phy-cells = <1>;
476 status = "okay";
477 };
478
479 u3port0: usb-phy@11e10700 {
480 reg = <0 0x11e10700 0 0x900>;
481 clocks = <&system_clk>;
482 clock-names = "ref";
483 #phy-cells = <1>;
484 status = "okay";
485 };
486
487 u2port1: usb-phy@11e11000 {
488 reg = <0 0x11e11000 0 0x700>;
489 clocks = <&system_clk>;
490 clock-names = "ref";
491 #phy-cells = <1>;
492 status = "okay";
493 };
494 };
495};