blob: a803992c498dbb4f676941ae3edea24a381f951c [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/ {
20 compatible = "mediatek,mt7981-fpga";
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
42 auxadc: adc@1100d000 {
43 compatible = "mediatek,mt7981-auxadc",
44 "mediatek,mt7622-auxadc";
45 reg = <0 0x1100d000 0 0x1000>;
46 clocks = <&system_clk>;
47 clock-names = "main";
48 #io-channel-cells = <1>;
49 };
50
51 wed: wed@15010000 {
52 compatible = "mediatek,wed";
53 wed_num = <2>;
54 /* add this property for wed get the pci slot number. */
55 pci_slot_map = <0>, <1>;
56 reg = <0 0x15010000 0 0x1000>,
57 <0 0x15011000 0 0x1000>;
58 interrupt-parent = <&gic>;
59 interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>,
60 <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>;
61 };
62
63 wdma: wdma@15104800 {
64 compatible = "mediatek,wed-wdma";
65 reg = <0 0x15104800 0 0x400>,
66 <0 0x15104c00 0 0x400>;
67 };
68
69 ap2woccif: ap2woccif@151A5000 {
70 compatible = "mediatek,ap2woccif";
71 reg = <0 0x151A5000 0 0x1000>,
72 <0 0x151AD000 0 0x1000>;
73 interrupt-parent = <&gic>;
74 interrupts = <GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH>,
75 <GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH>;
76 };
77
78 wocpu0_ilm: wocpu0_ilm@151E0000 {
79 compatible = "mediatek,wocpu0_ilm";
80 reg = <0 0x151E0000 0 0x8000>;
81 };
82
83 wocpu_dlm: wocpu_dlm@151E8000 {
84 compatible = "mediatek,wocpu_dlm";
85 reg = <0 0x151E8000 0 0x2000>,
86 <0 0x151F8000 0 0x2000>;
87
88 resets = <&ethsysrst 0>;
89 reset-names = "wocpu_rst";
90 };
91
92 cpu_boot: wocpu_boot@15194000 {
93 compatible = "mediatek,wocpu_boot";
94 reg = <0 0x15194000 0 0x1000>;
95 };
96
97 reserved-memory {
98 #address-cells = <2>;
99 #size-cells = <2>;
100 ranges;
101
102 /* 192 KiB reserved for ARM Trusted Firmware (BL31) */
103 secmon_reserved: secmon@43000000 {
104 reg = <0 0x43000000 0 0x30000>;
105 no-map;
106 };
107
108 wmcpu_emi: wmcpu-reserved@47C80000 {
109 compatible = "mediatek,wmcpu-reserved";
110 no-map;
111 reg = <0 0x47C80000 0 0x00100000>;
112 };
113
114 wocpu0_emi: wocpu0_emi@47D80000 {
115 compatible = "mediatek,wocpu0_emi";
116 no-map;
117 reg = <0 0x47D80000 0 0x40000>;
118 shared = <0>;
119 };
120
121 wocpu_data: wocpu_data@47DC0000 {
122 compatible = "mediatek,wocpu_data";
123 no-map;
124 reg = <0 0x47DC0000 0 0x240000>;
125 shared = <1>;
126 };
127 };
128
129 psci {
130 compatible = "arm,psci-0.2";
131 method = "smc";
132 };
133
134 system_clk: dummy13m {
135 compatible = "fixed-clock";
136 clock-frequency = <13000000>;
137 #clock-cells = <0>;
138 };
139
140 rtc_clk: dummy32k {
141 compatible = "fixed-clock";
142 clock-frequency = <32000>;
143 #clock-cells = <0>;
144 };
145
146 uart_clk: dummy12m {
147 compatible = "fixed-clock";
148 clock-frequency = <12000000>;
149 #clock-cells = <0>;
150 };
151
152 gpt_clk: dummy6m {
153 compatible = "fixed-clock";
154 clock-frequency = <6000000>;
155 #clock-cells = <0>;
156 };
157
158 timer {
159 compatible = "arm,armv8-timer";
160 interrupt-parent = <&gic>;
161 clock-frequency = <12000000>;
162 interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>,
163 <GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>,
164 <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>,
165 <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>;
166
167 };
168
169 watchdog: watchdog@1001c000 {
170 compatible = "mediatek,mt7622-wdt",
171 "mediatek,mt6589-wdt";
172 reg = <0 0x1001c000 0 0x1000>;
173 interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
174 #reset-cells = <1>;
175 };
176
177 gic: interrupt-controller@c000000 {
178 compatible = "arm,gic-v3";
179 #interrupt-cells = <3>;
180 interrupt-parent = <&gic>;
181 interrupt-controller;
182 reg = <0 0x0c000000 0 0x40000>, /* GICD */
183 <0 0x0c080000 0 0x200000>; /* GICR */
184
185 interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
186 };
187
188 uart0: serial@11002000 {
189 compatible = "mediatek,mt7986-uart",
190 "mediatek,mt6577-uart";
191 reg = <0 0x11002000 0 0x400>;
192 interrupts = <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>;
193 clocks = <&uart_clk>;
194 status = "disabled";
195 };
196
197 uart1: serial@11003000 {
198 compatible = "mediatek,mt7986-uart",
199 "mediatek,mt6577-uart";
200 reg = <0 0x11003000 0 0x400>;
201 interrupts = <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>;
202 clocks = <&uart_clk>;
203 status = "disabled";
204 };
205
206 uart2: serial@11004000 {
207 compatible = "mediatek,mt7986-uart",
208 "mediatek,mt6577-uart";
209 reg = <0 0x11004000 0 0x400>;
210 interrupts = <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>;
211 clocks = <&uart_clk>;
212 status = "disabled";
213 };
214
215 pcie: pcie@11280000 {
216 compatible = "mediatek,mt7981-pcie",
217 "mediatek,mt7986-pcie";
218 device_type = "pci";
219 reg = <0 0x11280000 0 0x4000>;
220 reg-names = "pcie-mac";
221 #address-cells = <3>;
222 #size-cells = <2>;
223 interrupts = <GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>;
224 bus-range = <0x00 0xff>;
225 ranges = <0x82000000 0 0x20000000
226 0x0 0x20000000 0 0x10000000>;
227 status = "disabled";
228
229 #interrupt-cells = <1>;
230 interrupt-map-mask = <0 0 0 7>;
231 interrupt-map = <0 0 0 1 &pcie_intc 0>,
232 <0 0 0 2 &pcie_intc 1>,
233 <0 0 0 3 &pcie_intc 2>,
234 <0 0 0 4 &pcie_intc 3>;
235 pcie_intc: interrupt-controller {
236 interrupt-controller;
237 #address-cells = <0>;
238 #interrupt-cells = <1>;
239 };
240 };
241
242 pio: pinctrl@11d00000 {
243 compatible = "mediatek,mt7981-pinctrl";
244 reg = <0 0x11d00000 0 0x1000>,
245 <0 0x11c00000 0 0x1000>,
246 <0 0x11c10000 0 0x1000>,
247 <0 0x11d20000 0 0x1000>,
248 <0 0x11e00000 0 0x1000>,
249 <0 0x11e20000 0 0x1000>,
250 <0 0x11f00000 0 0x1000>,
251 <0 0x11f10000 0 0x1000>,
252 <0 0x1000b000 0 0x1000>;
253 reg-names = "gpio_base", "iocfg_rt_base", "iocfg_rm_base",
254 "iocfg_rb_base", "iocfg_lb_base", "iocfg_bl_base",
255 "iocfg_tm_base", "iocfg_tl_base", "eint";
256 gpio-controller;
257 #gpio-cells = <2>;
258 gpio-ranges = <&pio 0 0 56>;
259 interrupt-controller;
260 interrupts = <GIC_SPI 153 IRQ_TYPE_LEVEL_HIGH>;
261 interrupt-parent = <&gic>;
262 #interrupt-cells = <2>;
263 };
264
265 ethsys: syscon@15000000 {
266 #address-cells = <1>;
267 #size-cells = <1>;
268 compatible = "mediatek,mt7986-ethsys",
269 "syscon";
270 reg = <0 0x15000000 0 0x1000>;
271 #clock-cells = <1>;
272 #reset-cells = <1>;
273
274 ethsysrst: reset-controller {
275 compatible = "ti,syscon-reset";
276 #reset-cells = <1>;
277 ti,reset-bits = <0x34 4 0x34 4 0x34 4 (ASSERT_SET | DEASSERT_CLEAR | STATUS_SET)>;
278 };
279 };
280
281 eth: ethernet@15100000 {
282 compatible = "mediatek,mt7981-eth";
283 reg = <0 0x15100000 0 0x80000>;
284 interrupts = <GIC_SPI 196 IRQ_TYPE_LEVEL_HIGH>,
285 <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH>,
286 <GIC_SPI 198 IRQ_TYPE_LEVEL_HIGH>,
287 <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH>;
288 mediatek,ethsys = <&ethsys>;
289 mediatek,infracfg = <&ethsys>;
290 #reset-cells = <1>;
291 #address-cells = <1>;
292 #size-cells = <0>;
293 status = "disabled";
294 };
295
296 hnat: hnat@15000000 {
297 compatible = "mediatek,mtk-hnat_v4";
298 reg = <0 0x15100000 0 0x80000>;
299 resets = <&ethsys 0>;
300 reset-names = "mtketh";
301 status = "disabled";
302 };
303
304 snand: snfi@11005000 {
305 compatible = "mediatek,mt7986-snand";
306 reg = <0 0x11005000 0 0x1000>, <0 0x11006000 0 0x1000>;
307 reg-names = "nfi", "ecc";
308 interrupts = <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>;
309 clocks = <&system_clk>,
310 <&system_clk>,
311 <&system_clk>;
312 clock-names = "pad_clk", "nfi_clk", "nfi_hclk";
313 #address-cells = <1>;
314 #size-cells = <0>;
315 status = "disabled";
316 };
317
318 mmc0: mmc@11230000 {
319 compatible = "mediatek,mt7986-mmc";
320 reg = <0 0x11230000 0 0x1000>, <0 0x11c20000 0 0x1000>;
321 interrupts = <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>;
322 clocks = <&system_clk>,
323 <&system_clk>,
324 <&system_clk>;
325 clock-names = "source", "hclk", "source_cg";
326 status = "disabled";
327 };
328
329 wed_pcie: wed_pcie@10003000 {
330 compatible = "mediatek,wed_pcie";
331 reg = <0 0x10003000 0 0x10>;
332 };
333
334 wbsys: wbsys@18000000 {
335 compatible = "mediatek,wbsys";
336 reg = <0 0x18000000 0 0x1000000>;
337 interrupts = <GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH>,
338 <GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH>,
339 <GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH>,
340 <GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH>;
341 chip_id = <0x7981>;
342 };
343
344 spi0: spi@1100a000 {
345 compatible = "mediatek,ipm-spi-quad";
346 reg = <0 0x1100a000 0 0x100>;
347 interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>;
348 clocks = <&uart_clk>,
349 <&uart_clk>,
350 <&uart_clk>,
351 <&uart_clk>;
352 clock-names = "parent-clk", "sel-clk", "spi-clk", "spi-hclk";
353 status = "disabled";
354 };
355
356 spi1: spi@1100b000 {
357 compatible = "mediatek,ipm-spi-single";
358 reg = <0 0x1100b000 0 0x100>;
359 interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>;
360 clocks = <&uart_clk>,
361 <&uart_clk>,
362 <&uart_clk>,
363 <&uart_clk>;
364 clock-names = "parent-clk", "sel-clk", "spi-clk", "spi-hclk";
365 status = "disabled";
366 };
367
368 spi2: spi@11009000 {
369 compatible = "mediatek,ipm-spi-quad";
370 reg = <0 0x11009000 0 0x100>;
371 interrupts = <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>;
372 clocks = <&uart_clk>,
373 <&uart_clk>,
374 <&uart_clk>,
375 <&uart_clk>;
376 clock-names = "parent-clk", "sel-clk", "spi-clk", "spi-hclk";
377 status = "disabled";
378 };
379
380 consys: consys@10000000 {
381 compatible = "mediatek,mt7981-consys";
382 reg = <0 0x10000000 0 0x8600000>;
383 memory-region = <&wmcpu_emi>;
384 };
385
386 xhci: xhci@11200000 {
387 compatible = "mediatek,mt7981-xhci",
388 "mediatek,mtk-xhci";
389 reg = <0 0x11200000 0 0x2e00>,
390 <0 0x11203e00 0 0x0100>;
391 reg-names = "mac", "ippc";
392 interrupts = <GIC_SPI 173 IRQ_TYPE_LEVEL_HIGH>;
393 phys = <&u2port0 PHY_TYPE_USB2>;
394 clocks = <&system_clk>,
395 <&system_clk>,
396 <&system_clk>,
397 <&system_clk>,
398 <&system_clk>;
399 clock-names = "sys_ck",
400 "xhci_ck",
401 "ref_ck",
402 "mcu_ck",
403 "dma_ck";
404 #address-cells = <2>;
405 #size-cells = <2>;
406 mediatek,u3p-dis-msk=<0x01>;
407 status = "okay";
408 };
409
410 usbtphy: usb-phy@11203e00 {
411 compatible = "mediatek,a60810-u2phy",
412 "mediatek,a60931-u3phy",
413 "mediatek,a60xxx-usbphy";
414 #address-cells = <2>;
415 #size-cells = <2>;
416 ranges;
417 status = "okay";
418
419 u2port0: usb-phy@11203ed0 {
420 reg = <0 0x11203ed0 0 0x008>;
421 clocks = <&system_clk>;
422 clock-names = "ref";
423 #phy-cells = <1>;
424 status = "okay";
425 };
426
427 u3port0: usb-phy@11203ed8 {
428 reg = <0 0x11203ed8 0 0x008>;
429 clocks = <&system_clk>;
430 clock-names = "ref";
431 #phy-cells = <1>;
432 status = "disabled";
433 };
434
435 u2port1: usb-phy@11203ee0 {
436 reg = <0 0x11203ee0 0 0x008>;
437 clocks = <&system_clk>;
438 clock-names = "ref";
439 #phy-cells = <1>;
440 status = "disabled";
441 };
442 };
443};