blob: b2c4cd7b54abf73d449fa8081b8e0056ec6a996f [file] [log] [blame]
developerff9f2d42022-09-09 19:59:11 +08001// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (c) 2022 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/clock/mt7981-clk.h>
10#include <dt-bindings/reset/mt7629-reset.h>
11#include <dt-bindings/pinctrl/mt65xx.h>
12
13/ {
14 compatible = "mediatek,mt7981";
15 interrupt-parent = <&gic>;
16 #address-cells = <1>;
17 #size-cells = <1>;
18 cpus {
19 #address-cells = <1>;
20 #size-cells = <0>;
21 cpu0: cpu@0 {
22 device_type = "cpu";
23 compatible = "arm,cortex-a53";
24 reg = <0x0>;
25 mediatek,hwver = <&hwver>;
26 };
27 cpu1: cpu@1 {
28 device_type = "cpu";
29 compatible = "arm,cortex-a53";
30 reg = <0x1>;
31 mediatek,hwver = <&hwver>;
32 };
33 };
34
35 gpt_clk: gpt_dummy20m {
36 compatible = "fixed-clock";
37 clock-frequency = <13000000>;
38 #clock-cells = <0>;
Simon Glassd3a98cb2023-02-13 08:56:33 -070039 bootph-all;
developerff9f2d42022-09-09 19:59:11 +080040 };
41
42 hwver: hwver {
43 compatible = "mediatek,hwver", "syscon";
44 reg = <0x8000000 0x1000>;
45 };
46
47 timer {
48 compatible = "arm,armv8-timer";
49 interrupt-parent = <&gic>;
50 clock-frequency = <13000000>;
51 interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>,
52 <GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>,
53 <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>,
54 <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>;
55 arm,cpu-registers-not-fw-configured;
56 };
57
58 timer0: timer@10008000 {
59 compatible = "mediatek,mt7986-timer";
60 reg = <0x10008000 0x1000>;
61 interrupts = <GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>;
62 clocks = <&gpt_clk>;
63 clock-names = "gpt-clk";
Simon Glassd3a98cb2023-02-13 08:56:33 -070064 bootph-all;
developerff9f2d42022-09-09 19:59:11 +080065 };
66
67 watchdog: watchdog@1001c000 {
68 compatible = "mediatek,mt7986-wdt";
69 reg = <0x1001c000 0x1000>;
70 interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
71 #reset-cells = <1>;
72 status = "disabled";
73 };
74
75 gic: interrupt-controller@c000000 {
76 compatible = "arm,gic-v3";
77 #interrupt-cells = <3>;
78 interrupt-parent = <&gic>;
79 interrupt-controller;
80 reg = <0x0c000000 0x40000>, /* GICD */
81 <0x0c080000 0x200000>; /* GICR */
82
83 interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
84 };
85
86 fixed_plls: apmixedsys@1001e000 {
87 compatible = "mediatek,mt7981-fixed-plls";
88 reg = <0x1001e000 0x1000>;
89 #clock-cells = <1>;
Simon Glassd3a98cb2023-02-13 08:56:33 -070090 bootph-all;
developerff9f2d42022-09-09 19:59:11 +080091 };
92
93 topckgen: topckgen@1001b000 {
94 compatible = "mediatek,mt7981-topckgen";
95 reg = <0x1001b000 0x1000>;
96 clock-parent = <&fixed_plls>;
97 #clock-cells = <1>;
Simon Glassd3a98cb2023-02-13 08:56:33 -070098 bootph-all;
developerff9f2d42022-09-09 19:59:11 +080099 };
100
developerff9f2d42022-09-09 19:59:11 +0800101 infracfg: infracfg@10001000 {
102 compatible = "mediatek,mt7981-infracfg";
103 reg = <0x10001000 0x30>;
104 clock-parent = <&topckgen>;
105 #clock-cells = <1>;
Simon Glassd3a98cb2023-02-13 08:56:33 -0700106 bootph-all;
developerff9f2d42022-09-09 19:59:11 +0800107 };
108
Christian Marangi68d05782025-01-27 14:40:43 +0100109 pio: pinctrl@11d00000 {
developerff9f2d42022-09-09 19:59:11 +0800110 compatible = "mediatek,mt7981-pinctrl";
111 reg = <0x11d00000 0x1000>,
112 <0x11c00000 0x1000>,
113 <0x11c10000 0x1000>,
114 <0x11d20000 0x1000>,
115 <0x11e00000 0x1000>,
116 <0x11e20000 0x1000>,
117 <0x11f00000 0x1000>,
118 <0x11f10000 0x1000>,
119 <0x1000b000 0x1000>;
Christian Marangid205efa2025-01-27 14:40:38 +0100120 reg-names = "gpio", "iocfg_rt", "iocfg_rm",
121 "iocfg_rb", "iocfg_lb", "iocfg_bl",
122 "iocfg_tm", "iocfg_tl", "eint";
Christian Marangi68d05782025-01-27 14:40:43 +0100123 gpio-controller;
124 #gpio-cells = <2>;
developerff9f2d42022-09-09 19:59:11 +0800125 };
126
127 pwm: pwm@10048000 {
128 compatible = "mediatek,mt7981-pwm";
129 reg = <0x10048000 0x1000>;
130 #clock-cells = <1>;
131 #pwm-cells = <2>;
132 interrupts = <GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>;
Christian Marangif2451642024-08-02 15:53:15 +0200133 clocks = <&topckgen CLK_TOP_PWM_SEL>,
134 <&infracfg CLK_INFRA_PWM_BSEL>,
135 <&infracfg CLK_INFRA_PWM1_CK>,
136 <&infracfg CLK_INFRA_PWM2_CK>,
137 <&infracfg CLK_INFRA_PWM3_CK>;
developerd24fd7e2025-01-17 17:18:06 +0800138 assigned-clocks = <&topckgen CLK_TOP_PWM_SEL>,
139 <&infracfg CLK_INFRA_PWM1_SEL>,
140 <&infracfg CLK_INFRA_PWM2_SEL>,
141 <&infracfg CLK_INFRA_PWM3_SEL>;
142 assigned-clock-parents = <&topckgen CLK_TOP_CB_CKSQ_40M>,
143 <&topckgen CLK_TOP_PWM_SEL>,
144 <&topckgen CLK_TOP_PWM_SEL>,
145 <&topckgen CLK_TOP_PWM_SEL>;
developerff9f2d42022-09-09 19:59:11 +0800146 clock-names = "top", "main", "pwm1", "pwm2", "pwm3";
147 status = "disabled";
148 };
149
developera98189e2023-07-19 17:16:19 +0800150 i2c0: i2c@11007000 {
151 compatible = "mediatek,mt7981-i2c";
152 reg = <0x11007000 0x1000>,
153 <0x10217080 0x80>;
154 interrupts = <GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>;
155 clock-div = <1>;
Christian Marangif2451642024-08-02 15:53:15 +0200156 clocks = <&infracfg CLK_INFRA_I2C0_CK>,
157 <&infracfg CLK_INFRA_AP_DMA_CK>;
developera98189e2023-07-19 17:16:19 +0800158 clock-names = "main", "dma";
159 #address-cells = <1>;
160 #size-cells = <0>;
161 status = "disabled";
162 };
163
developerff9f2d42022-09-09 19:59:11 +0800164 uart0: serial@11002000 {
165 compatible = "mediatek,hsuart";
166 reg = <0x11002000 0x400>;
167 interrupts = <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>;
Christian Marangif2451642024-08-02 15:53:15 +0200168 clocks = <&infracfg CLK_INFRA_UART0_CK>;
169 assigned-clocks = <&topckgen CLK_TOP_UART_SEL>,
170 <&infracfg CLK_INFRA_UART0_SEL>;
171 assigned-clock-parents = <&topckgen CLK_TOP_CB_CKSQ_40M>,
172 <&topckgen CLK_TOP_UART_SEL>;
developerff9f2d42022-09-09 19:59:11 +0800173 mediatek,force-highspeed;
174 status = "disabled";
Simon Glassd3a98cb2023-02-13 08:56:33 -0700175 bootph-all;
developerff9f2d42022-09-09 19:59:11 +0800176 };
177
178 uart1: serial@11003000 {
179 compatible = "mediatek,hsuart";
180 reg = <0x11003000 0x400>;
181 interrupts = <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>;
Christian Marangif2451642024-08-02 15:53:15 +0200182 clocks = <&infracfg CLK_INFRA_UART1_CK>;
183 assigned-clocks = <&topckgen CLK_TOP_UART_SEL>,
184 <&infracfg CLK_INFRA_UART1_SEL>;
185 assigned-clock-parents = <&topckgen CLK_TOP_CB_CKSQ_40M>,
186 <&topckgen CLK_TOP_UART_SEL>;
developerff9f2d42022-09-09 19:59:11 +0800187 mediatek,force-highspeed;
188 status = "disabled";
189 };
190
191 uart2: serial@11004000 {
192 compatible = "mediatek,hsuart";
193 reg = <0x11004000 0x400>;
194 interrupts = <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>;
Christian Marangif2451642024-08-02 15:53:15 +0200195 clocks = <&infracfg CLK_INFRA_UART2_CK>;
196 assigned-clocks = <&topckgen CLK_TOP_UART_SEL>,
197 <&infracfg CLK_INFRA_UART2_SEL>;
198 assigned-clock-parents = <&topckgen CLK_TOP_CB_CKSQ_40M>,
199 <&topckgen CLK_TOP_UART_SEL>;
developerff9f2d42022-09-09 19:59:11 +0800200 mediatek,force-highspeed;
201 status = "disabled";
202 };
203
204 snand: snand@11005000 {
205 compatible = "mediatek,mt7986-snand";
206 reg = <0x11005000 0x1000>,
207 <0x11006000 0x1000>;
208 reg-names = "nfi", "ecc";
Christian Marangif2451642024-08-02 15:53:15 +0200209 clocks = <&infracfg CLK_INFRA_SPINFI1_CK>,
210 <&infracfg CLK_INFRA_NFI1_CK>,
211 <&infracfg CLK_INFRA_NFI_HCK_CK>;
developerff9f2d42022-09-09 19:59:11 +0800212 clock-names = "pad_clk", "nfi_clk", "nfi_hclk";
Christian Marangif2451642024-08-02 15:53:15 +0200213 assigned-clocks = <&topckgen CLK_TOP_SPINFI_SEL>,
214 <&topckgen CLK_TOP_NFI1X_SEL>;
215 assigned-clock-parents = <&topckgen CLK_TOP_CB_M_D8>,
216 <&topckgen CLK_TOP_CB_M_D8>;
developerff9f2d42022-09-09 19:59:11 +0800217 status = "disabled";
218 };
219
220 ethsys: syscon@15000000 {
221 compatible = "mediatek,mt7981-ethsys", "syscon";
222 reg = <0x15000000 0x1000>;
223 clock-parent = <&topckgen>;
224 #clock-cells = <1>;
225 #reset-cells = <1>;
226 };
227
228 eth: ethernet@15100000 {
229 compatible = "mediatek,mt7981-eth", "syscon";
230 reg = <0x15100000 0x20000>;
231 resets = <&ethsys ETHSYS_FE_RST>;
232 reset-names = "fe";
233 mediatek,ethsys = <&ethsys>;
234 mediatek,sgmiisys = <&sgmiisys0>;
developercdb1f3102023-07-19 17:17:27 +0800235 mediatek,infracfg = <&topmisc>;
developerff9f2d42022-09-09 19:59:11 +0800236 #address-cells = <1>;
237 #size-cells = <0>;
238 status = "disabled";
239 };
240
241 sgmiisys0: syscon@10060000 {
Christian Marangibe9dbee2024-08-02 15:53:10 +0200242 compatible = "mediatek,mt7981-sgmiisys_0", "syscon";
developerff9f2d42022-09-09 19:59:11 +0800243 reg = <0x10060000 0x1000>;
244 pn_swap;
245 #clock-cells = <1>;
246 };
247
248 sgmiisys1: syscon@10070000 {
Christian Marangibe9dbee2024-08-02 15:53:10 +0200249 compatible = "mediatek,mt7981-sgmiisys_1", "syscon";
developerff9f2d42022-09-09 19:59:11 +0800250 reg = <0x10070000 0x1000>;
251 #clock-cells = <1>;
252 };
253
developercdb1f3102023-07-19 17:17:27 +0800254 topmisc: topmisc@11d10000 {
255 compatible = "mediatek,mt7981-topmisc", "syscon";
256 reg = <0x11d10000 0x10000>;
257 #clock-cells = <1>;
258 };
259
developerff9f2d42022-09-09 19:59:11 +0800260 spi0: spi@1100a000 {
261 compatible = "mediatek,ipm-spi";
262 reg = <0x1100a000 0x100>;
Christian Marangif2451642024-08-02 15:53:15 +0200263 clocks = <&infracfg CLK_INFRA_SPI0_CK>,
264 <&topckgen CLK_TOP_SPI_SEL>;
265 assigned-clocks = <&topckgen CLK_TOP_SPI_SEL>,
266 <&infracfg CLK_INFRA_SPI0_SEL>;
267 assigned-clock-parents = <&topckgen CLK_TOP_CB_M_D2>,
268 <&topckgen CLK_TOP_SPI_SEL>;
Christian Marangi821358e2024-08-02 15:53:07 +0200269 clock-names = "spi-clk", "sel-clk";
developerff9f2d42022-09-09 19:59:11 +0800270 interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>;
271 status = "disabled";
272 };
273
274 spi1: spi@1100b000 {
275 compatible = "mediatek,ipm-spi";
276 reg = <0x1100b000 0x100>;
277 interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>;
Christian Marangif2451642024-08-02 15:53:15 +0200278 clocks = <&infracfg CLK_INFRA_SPI1_CK>,
279 <&topckgen CLK_TOP_SPIM_MST_SEL>;
280 assigned-clocks = <&topckgen CLK_TOP_SPIM_MST_SEL>,
281 <&infracfg CLK_INFRA_SPI1_SEL>;
282 assigned-clock-parents = <&topckgen CLK_TOP_CB_M_D2>,
283 <&topckgen CLK_TOP_SPIM_MST_SEL>;
Christian Marangi821358e2024-08-02 15:53:07 +0200284 clock-names = "spi-clk", "sel-clk";
developerff9f2d42022-09-09 19:59:11 +0800285 status = "disabled";
286 };
287
288 spi2: spi@11009000 {
289 compatible = "mediatek,ipm-spi";
290 reg = <0x11009000 0x100>;
Christian Marangif2451642024-08-02 15:53:15 +0200291 clocks = <&infracfg CLK_INFRA_SPI2_CK>,
292 <&topckgen CLK_TOP_SPI_SEL>;
293 assigned-clocks = <&topckgen CLK_TOP_SPI_SEL>,
294 <&infracfg CLK_INFRA_SPI2_SEL>;
295 assigned-clock-parents = <&topckgen CLK_TOP_CB_M_D2>,
296 <&topckgen CLK_TOP_SPI_SEL>;
Christian Marangi821358e2024-08-02 15:53:07 +0200297 clock-names = "spi-clk", "sel-clk";
developerff9f2d42022-09-09 19:59:11 +0800298 interrupts = <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>;
299 status = "disabled";
300 };
301
302 mmc0: mmc@11230000 {
303 compatible = "mediatek,mt7981-mmc";
304 reg = <0x11230000 0x1000>,
305 <0x11C20000 0x1000>;
306 interrupts = <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>;
developera6f49362025-01-17 17:18:55 +0800307 clocks = <&topckgen CLK_TOP_EMMC_208M>,
308 <&topckgen CLK_TOP_EMMC_400M>,
Christian Marangif2451642024-08-02 15:53:15 +0200309 <&infracfg CLK_INFRA_MSDC_CK>;
developera6f49362025-01-17 17:18:55 +0800310 assigned-clocks = <&topckgen CLK_TOP_EMMC_208M_SEL>,
311 <&topckgen CLK_TOP_EMMC_400M_SEL>;
312 assigned-clock-parents = <&topckgen CLK_TOP_CB_M_D2>,
313 <&topckgen CLK_TOP_CB_NET2_D2>;
developerff9f2d42022-09-09 19:59:11 +0800314 clock-names = "source", "hclk", "source_cg";
315 status = "disabled";
316 };
317
318};