blob: 2844ab010deb7a90d60f3f163632cf6e61fb170f [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
109 pinctrl: pinctrl@11d00000 {
110 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>;
120 reg-names = "gpio_base", "iocfg_rt_base", "iocfg_rm_base",
121 "iocfg_rb_base", "iocfg_lb_base", "iocfg_bl_base",
122 "iocfg_tm_base", "iocfg_tl_base", "eint";
123 gpio: gpio-controller {
124 gpio-controller;
125 #gpio-cells = <2>;
126 };
127 };
128
129 pwm: pwm@10048000 {
130 compatible = "mediatek,mt7981-pwm";
131 reg = <0x10048000 0x1000>;
132 #clock-cells = <1>;
133 #pwm-cells = <2>;
134 interrupts = <GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>;
Christian Marangif2451642024-08-02 15:53:15 +0200135 clocks = <&topckgen CLK_TOP_PWM_SEL>,
136 <&infracfg CLK_INFRA_PWM_BSEL>,
137 <&infracfg CLK_INFRA_PWM1_CK>,
138 <&infracfg CLK_INFRA_PWM2_CK>,
139 <&infracfg CLK_INFRA_PWM3_CK>;
developerd24fd7e2025-01-17 17:18:06 +0800140 assigned-clocks = <&topckgen CLK_TOP_PWM_SEL>,
141 <&infracfg CLK_INFRA_PWM1_SEL>,
142 <&infracfg CLK_INFRA_PWM2_SEL>,
143 <&infracfg CLK_INFRA_PWM3_SEL>;
144 assigned-clock-parents = <&topckgen CLK_TOP_CB_CKSQ_40M>,
145 <&topckgen CLK_TOP_PWM_SEL>,
146 <&topckgen CLK_TOP_PWM_SEL>,
147 <&topckgen CLK_TOP_PWM_SEL>;
developerff9f2d42022-09-09 19:59:11 +0800148 clock-names = "top", "main", "pwm1", "pwm2", "pwm3";
149 status = "disabled";
150 };
151
developera98189e2023-07-19 17:16:19 +0800152 i2c0: i2c@11007000 {
153 compatible = "mediatek,mt7981-i2c";
154 reg = <0x11007000 0x1000>,
155 <0x10217080 0x80>;
156 interrupts = <GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>;
157 clock-div = <1>;
Christian Marangif2451642024-08-02 15:53:15 +0200158 clocks = <&infracfg CLK_INFRA_I2C0_CK>,
159 <&infracfg CLK_INFRA_AP_DMA_CK>;
developera98189e2023-07-19 17:16:19 +0800160 clock-names = "main", "dma";
161 #address-cells = <1>;
162 #size-cells = <0>;
163 status = "disabled";
164 };
165
developerff9f2d42022-09-09 19:59:11 +0800166 uart0: serial@11002000 {
167 compatible = "mediatek,hsuart";
168 reg = <0x11002000 0x400>;
169 interrupts = <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>;
Christian Marangif2451642024-08-02 15:53:15 +0200170 clocks = <&infracfg CLK_INFRA_UART0_CK>;
171 assigned-clocks = <&topckgen CLK_TOP_UART_SEL>,
172 <&infracfg CLK_INFRA_UART0_SEL>;
173 assigned-clock-parents = <&topckgen CLK_TOP_CB_CKSQ_40M>,
174 <&topckgen CLK_TOP_UART_SEL>;
developerff9f2d42022-09-09 19:59:11 +0800175 mediatek,force-highspeed;
176 status = "disabled";
Simon Glassd3a98cb2023-02-13 08:56:33 -0700177 bootph-all;
developerff9f2d42022-09-09 19:59:11 +0800178 };
179
180 uart1: serial@11003000 {
181 compatible = "mediatek,hsuart";
182 reg = <0x11003000 0x400>;
183 interrupts = <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>;
Christian Marangif2451642024-08-02 15:53:15 +0200184 clocks = <&infracfg CLK_INFRA_UART1_CK>;
185 assigned-clocks = <&topckgen CLK_TOP_UART_SEL>,
186 <&infracfg CLK_INFRA_UART1_SEL>;
187 assigned-clock-parents = <&topckgen CLK_TOP_CB_CKSQ_40M>,
188 <&topckgen CLK_TOP_UART_SEL>;
developerff9f2d42022-09-09 19:59:11 +0800189 mediatek,force-highspeed;
190 status = "disabled";
191 };
192
193 uart2: serial@11004000 {
194 compatible = "mediatek,hsuart";
195 reg = <0x11004000 0x400>;
196 interrupts = <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>;
Christian Marangif2451642024-08-02 15:53:15 +0200197 clocks = <&infracfg CLK_INFRA_UART2_CK>;
198 assigned-clocks = <&topckgen CLK_TOP_UART_SEL>,
199 <&infracfg CLK_INFRA_UART2_SEL>;
200 assigned-clock-parents = <&topckgen CLK_TOP_CB_CKSQ_40M>,
201 <&topckgen CLK_TOP_UART_SEL>;
developerff9f2d42022-09-09 19:59:11 +0800202 mediatek,force-highspeed;
203 status = "disabled";
204 };
205
206 snand: snand@11005000 {
207 compatible = "mediatek,mt7986-snand";
208 reg = <0x11005000 0x1000>,
209 <0x11006000 0x1000>;
210 reg-names = "nfi", "ecc";
Christian Marangif2451642024-08-02 15:53:15 +0200211 clocks = <&infracfg CLK_INFRA_SPINFI1_CK>,
212 <&infracfg CLK_INFRA_NFI1_CK>,
213 <&infracfg CLK_INFRA_NFI_HCK_CK>;
developerff9f2d42022-09-09 19:59:11 +0800214 clock-names = "pad_clk", "nfi_clk", "nfi_hclk";
Christian Marangif2451642024-08-02 15:53:15 +0200215 assigned-clocks = <&topckgen CLK_TOP_SPINFI_SEL>,
216 <&topckgen CLK_TOP_NFI1X_SEL>;
217 assigned-clock-parents = <&topckgen CLK_TOP_CB_M_D8>,
218 <&topckgen CLK_TOP_CB_M_D8>;
developerff9f2d42022-09-09 19:59:11 +0800219 status = "disabled";
220 };
221
222 ethsys: syscon@15000000 {
223 compatible = "mediatek,mt7981-ethsys", "syscon";
224 reg = <0x15000000 0x1000>;
225 clock-parent = <&topckgen>;
226 #clock-cells = <1>;
227 #reset-cells = <1>;
228 };
229
230 eth: ethernet@15100000 {
231 compatible = "mediatek,mt7981-eth", "syscon";
232 reg = <0x15100000 0x20000>;
233 resets = <&ethsys ETHSYS_FE_RST>;
234 reset-names = "fe";
235 mediatek,ethsys = <&ethsys>;
236 mediatek,sgmiisys = <&sgmiisys0>;
developercdb1f3102023-07-19 17:17:27 +0800237 mediatek,infracfg = <&topmisc>;
developerff9f2d42022-09-09 19:59:11 +0800238 #address-cells = <1>;
239 #size-cells = <0>;
240 status = "disabled";
241 };
242
243 sgmiisys0: syscon@10060000 {
Christian Marangibe9dbee2024-08-02 15:53:10 +0200244 compatible = "mediatek,mt7981-sgmiisys_0", "syscon";
developerff9f2d42022-09-09 19:59:11 +0800245 reg = <0x10060000 0x1000>;
246 pn_swap;
247 #clock-cells = <1>;
248 };
249
250 sgmiisys1: syscon@10070000 {
Christian Marangibe9dbee2024-08-02 15:53:10 +0200251 compatible = "mediatek,mt7981-sgmiisys_1", "syscon";
developerff9f2d42022-09-09 19:59:11 +0800252 reg = <0x10070000 0x1000>;
253 #clock-cells = <1>;
254 };
255
developercdb1f3102023-07-19 17:17:27 +0800256 topmisc: topmisc@11d10000 {
257 compatible = "mediatek,mt7981-topmisc", "syscon";
258 reg = <0x11d10000 0x10000>;
259 #clock-cells = <1>;
260 };
261
developerff9f2d42022-09-09 19:59:11 +0800262 spi0: spi@1100a000 {
263 compatible = "mediatek,ipm-spi";
264 reg = <0x1100a000 0x100>;
Christian Marangif2451642024-08-02 15:53:15 +0200265 clocks = <&infracfg CLK_INFRA_SPI0_CK>,
266 <&topckgen CLK_TOP_SPI_SEL>;
267 assigned-clocks = <&topckgen CLK_TOP_SPI_SEL>,
268 <&infracfg CLK_INFRA_SPI0_SEL>;
269 assigned-clock-parents = <&topckgen CLK_TOP_CB_M_D2>,
270 <&topckgen CLK_TOP_SPI_SEL>;
Christian Marangi821358e2024-08-02 15:53:07 +0200271 clock-names = "spi-clk", "sel-clk";
developerff9f2d42022-09-09 19:59:11 +0800272 interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>;
273 status = "disabled";
274 };
275
276 spi1: spi@1100b000 {
277 compatible = "mediatek,ipm-spi";
278 reg = <0x1100b000 0x100>;
279 interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>;
Christian Marangif2451642024-08-02 15:53:15 +0200280 clocks = <&infracfg CLK_INFRA_SPI1_CK>,
281 <&topckgen CLK_TOP_SPIM_MST_SEL>;
282 assigned-clocks = <&topckgen CLK_TOP_SPIM_MST_SEL>,
283 <&infracfg CLK_INFRA_SPI1_SEL>;
284 assigned-clock-parents = <&topckgen CLK_TOP_CB_M_D2>,
285 <&topckgen CLK_TOP_SPIM_MST_SEL>;
Christian Marangi821358e2024-08-02 15:53:07 +0200286 clock-names = "spi-clk", "sel-clk";
developerff9f2d42022-09-09 19:59:11 +0800287 status = "disabled";
288 };
289
290 spi2: spi@11009000 {
291 compatible = "mediatek,ipm-spi";
292 reg = <0x11009000 0x100>;
Christian Marangif2451642024-08-02 15:53:15 +0200293 clocks = <&infracfg CLK_INFRA_SPI2_CK>,
294 <&topckgen CLK_TOP_SPI_SEL>;
295 assigned-clocks = <&topckgen CLK_TOP_SPI_SEL>,
296 <&infracfg CLK_INFRA_SPI2_SEL>;
297 assigned-clock-parents = <&topckgen CLK_TOP_CB_M_D2>,
298 <&topckgen CLK_TOP_SPI_SEL>;
Christian Marangi821358e2024-08-02 15:53:07 +0200299 clock-names = "spi-clk", "sel-clk";
developerff9f2d42022-09-09 19:59:11 +0800300 interrupts = <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>;
301 status = "disabled";
302 };
303
304 mmc0: mmc@11230000 {
305 compatible = "mediatek,mt7981-mmc";
306 reg = <0x11230000 0x1000>,
307 <0x11C20000 0x1000>;
308 interrupts = <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>;
developera6f49362025-01-17 17:18:55 +0800309 clocks = <&topckgen CLK_TOP_EMMC_208M>,
310 <&topckgen CLK_TOP_EMMC_400M>,
Christian Marangif2451642024-08-02 15:53:15 +0200311 <&infracfg CLK_INFRA_MSDC_CK>;
developera6f49362025-01-17 17:18:55 +0800312 assigned-clocks = <&topckgen CLK_TOP_EMMC_208M_SEL>,
313 <&topckgen CLK_TOP_EMMC_400M_SEL>;
314 assigned-clock-parents = <&topckgen CLK_TOP_CB_M_D2>,
315 <&topckgen CLK_TOP_CB_NET2_D2>;
developerff9f2d42022-09-09 19:59:11 +0800316 clock-names = "source", "hclk", "source_cg";
317 status = "disabled";
318 };
319
320};