blob: 9ba135eda4af45b4e308e9b0fd3c2ae41e3900ed [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,mt7986a-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
280 pio: pinctrl@1001f000 {
281 compatible = "mediatek,mt7986-pinctrl";
282 reg = <0 0x1001f000 0 0x1000>,
283 <0 0x11c30000 0 0x1000>,
284 <0 0x11c40000 0 0x1000>,
285 <0 0x11e20000 0 0x1000>,
286 <0 0x11e30000 0 0x1000>,
287 <0 0x11f00000 0 0x1000>,
288 <0 0x11f10000 0 0x1000>,
289 <0 0x1000b000 0 0x1000>;
290 reg-names = "gpio_base", "iocfg_rt_base", "iocfg_rb_base",
291 "iocfg_lt_base", "iocfg_lb_base", "iocfg_tr_base",
292 "iocfg_tl_base", "eint";
293 gpio-controller;
294 #gpio-cells = <2>;
295 gpio-ranges = <&pio 0 0 100>;
296 interrupt-controller;
297 interrupts = <GIC_SPI 153 IRQ_TYPE_LEVEL_HIGH>;
298 interrupt-parent = <&gic>;
299 #interrupt-cells = <2>;
300 };
301
302 ethsys: syscon@15000000 {
303 #address-cells = <1>;
304 #size-cells = <1>;
305 compatible = "mediatek,mt7986-ethsys",
306 "syscon";
307 reg = <0 0x15000000 0 0x1000>;
308 #clock-cells = <1>;
309 #reset-cells = <1>;
310
311 ethsysrst: reset-controller {
312 compatible = "ti,syscon-reset";
313 #reset-cells = <1>;
314 ti,reset-bits = <0x34 4 0x34 4 0x34 4 (ASSERT_SET | DEASSERT_CLEAR | STATUS_SET)>;
315 };
316 };
317
318 eth: ethernet@15100000 {
319 compatible = "mediatek,mt7986-eth";
320 reg = <0 0x15100000 0 0x80000>;
321 interrupts = <GIC_SPI 196 IRQ_TYPE_LEVEL_HIGH>,
322 <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH>,
323 <GIC_SPI 198 IRQ_TYPE_LEVEL_HIGH>,
324 <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH>;
325 clocks = <&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 <&system_clk>,
337 <&system_clk>;
338 clock-names = "fe", "gp2", "gp1", "wocpu1", "wocpu0",
339 "sgmii_tx250m", "sgmii_rx250m",
340 "sgmii_cdr_ref", "sgmii_cdr_fb",
341 "sgmii2_tx250m", "sgmii2_rx250m",
342 "sgmii2_cdr_ref", "sgmii2_cdr_fb";
343 mediatek,ethsys = <&ethsys>;
344 mediatek,sgmiisys = <&sgmiisys0>, <&sgmiisys1>;
345 #reset-cells = <1>;
346 #address-cells = <1>;
347 #size-cells = <0>;
348 status = "disabled";
349 };
350
351 hnat: hnat@15000000 {
352 compatible = "mediatek,mtk-hnat_v4";
353 reg = <0 0x15100000 0 0x80000>;
354 resets = <&ethsys 0>;
355 reset-names = "mtketh";
356 status = "disabled";
357 };
358
359 sgmiisys0: syscon@10060000 {
360 compatible = "mediatek,mt7986-sgmiisys", "syscon";
361 reg = <0 0x10060000 0 0x1000>;
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 snand: snfi@11005000 {
372 compatible = "mediatek,mt7986-snand";
373 reg = <0 0x11005000 0 0x1000>, <0 0x11006000 0 0x1000>;
374 reg-names = "nfi", "ecc";
375 interrupts = <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>;
376 clocks = <&system_clk>,
377 <&system_clk>,
378 <&system_clk>;
379 clock-names = "nfi_clk", "pad_clk", "ecc_clk";
380 #address-cells = <1>;
381 #size-cells = <0>;
382 status = "disabled";
383 };
384
385 wbsys: wbsys@18000000 {
386 compatible = "mediatek,wbsys";
387 reg = <0 0x18000000 0 0x1000000>;
388 interrupts = <GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH>,
389 <GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH>,
390 <GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH>,
391 <GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH>;
392 chip_id = <0x7986>;
393 };
394
395 wed_pcie: wed_pcie@10003000 {
396 compatible = "mediatek,wed_pcie";
397 reg = <0 0x10003000 0 0x10>;
398 };
399
400 spi0: spi@1100a000 {
401 compatible = "mediatek,ipm-spi";
402 reg = <0 0x1100a000 0 0x100>;
403 interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>;
404 clocks = <&spi0_clk>,
405 <&spi0_clk>,
406 <&spi0_clk>;
407 clock-names = "parent-clk", "sel-clk", "spi-clk";
408 status = "disabled";
409 };
410
411 spi1: spi@1100b000 {
412 compatible = "mediatek,ipm-spi";
413 reg = <0 0x1100b000 0 0x100>;
414 interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>;
415 clocks = <&spi1_clk>,
416 <&spi1_clk>,
417 <&spi1_clk>;
418 clock-names = "parent-clk", "sel-clk", "spi-clk";
419 status = "disabled";
420 };
421
422 consys: consys@10000000 {
423 compatible = "mediatek,mt7986-consys";
424 reg = <0 0x10000000 0 0x8600000>;
425 memory-region = <&wmcpu_emi>;
426 };
427
428 xhci: xhci@11200000 {
429 compatible = "mediatek,mt7986-xhci",
430 "mediatek,mtk-xhci";
431 reg = <0 0x11200000 0 0x2e00>,
432 <0 0x11203e00 0 0x0100>;
433 reg-names = "mac", "ippc";
434 interrupts = <GIC_SPI 173 IRQ_TYPE_LEVEL_HIGH>;
435 phys = <&u2port0 PHY_TYPE_USB2>,
436 <&u3port0 PHY_TYPE_USB3>,
437 <&u2port1 PHY_TYPE_USB2>;
438 clocks = <&system_clk>,
439 <&system_clk>,
440 <&system_clk>,
441 <&system_clk>,
442 <&system_clk>;
443 clock-names = "sys_ck",
444 "xhci_ck",
445 "ref_ck",
446 "mcu_ck",
447 "dma_ck";
448 #address-cells = <2>;
449 #size-cells = <2>;
450 status = "okay";
451 };
452
453 usbtphy: usb-phy@11e10000 {
454 compatible = "mediatek,mt7986",
455 "mediatek,generic-tphy-v2";
456 #address-cells = <2>;
457 #size-cells = <2>;
458 ranges;
459 status = "okay";
460
461 u2port0: usb-phy@11e10000 {
462 reg = <0 0x11e10000 0 0x700>;
463 clocks = <&system_clk>;
464 clock-names = "ref";
465 #phy-cells = <1>;
466 status = "okay";
467 };
468
469 u3port0: usb-phy@11e10700 {
470 reg = <0 0x11e10700 0 0x900>;
471 clocks = <&system_clk>;
472 clock-names = "ref";
473 #phy-cells = <1>;
474 status = "okay";
475 };
476
477 u2port1: usb-phy@11e11000 {
478 reg = <0 0x11e11000 0 0x700>;
479 clocks = <&system_clk>;
480 clock-names = "ref";
481 #phy-cells = <1>;
482 status = "okay";
483 };
484 };
485};