blob: 2053e2ca00200ea7ecd8f7cfe00ae35074708c09 [file] [log] [blame]
Weijie Gaoed86e4f2022-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 Glass8c103c32023-02-13 08:56:33 -070039 bootph-all;
Weijie Gaoed86e4f2022-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 Glass8c103c32023-02-13 08:56:33 -070064 bootph-all;
Weijie Gaoed86e4f2022-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 Glass8c103c32023-02-13 08:56:33 -070090 bootph-all;
Weijie Gaoed86e4f2022-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 Glass8c103c32023-02-13 08:56:33 -070098 bootph-all;
Weijie Gaoed86e4f2022-09-09 19:59:11 +080099 };
100
101 infracfg_ao: infracfg_ao@10001000 {
102 compatible = "mediatek,mt7981-infracfg_ao";
103 reg = <0x10001000 0x80>;
104 clock-parent = <&infracfg>;
105 #clock-cells = <1>;
Simon Glass8c103c32023-02-13 08:56:33 -0700106 bootph-all;
Weijie Gaoed86e4f2022-09-09 19:59:11 +0800107 };
108
109 infracfg: infracfg@10001000 {
110 compatible = "mediatek,mt7981-infracfg";
111 reg = <0x10001000 0x30>;
112 clock-parent = <&topckgen>;
113 #clock-cells = <1>;
Simon Glass8c103c32023-02-13 08:56:33 -0700114 bootph-all;
Weijie Gaoed86e4f2022-09-09 19:59:11 +0800115 };
116
117 pinctrl: pinctrl@11d00000 {
118 compatible = "mediatek,mt7981-pinctrl";
119 reg = <0x11d00000 0x1000>,
120 <0x11c00000 0x1000>,
121 <0x11c10000 0x1000>,
122 <0x11d20000 0x1000>,
123 <0x11e00000 0x1000>,
124 <0x11e20000 0x1000>,
125 <0x11f00000 0x1000>,
126 <0x11f10000 0x1000>,
127 <0x1000b000 0x1000>;
128 reg-names = "gpio_base", "iocfg_rt_base", "iocfg_rm_base",
129 "iocfg_rb_base", "iocfg_lb_base", "iocfg_bl_base",
130 "iocfg_tm_base", "iocfg_tl_base", "eint";
131 gpio: gpio-controller {
132 gpio-controller;
133 #gpio-cells = <2>;
134 };
135 };
136
137 pwm: pwm@10048000 {
138 compatible = "mediatek,mt7981-pwm";
139 reg = <0x10048000 0x1000>;
140 #clock-cells = <1>;
141 #pwm-cells = <2>;
142 interrupts = <GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>;
143 clocks = <&infracfg CK_INFRA_PWM>,
144 <&infracfg_ao CK_INFRA_PWM_BSEL>,
145 <&infracfg_ao CK_INFRA_PWM1_CK>,
146 <&infracfg_ao CK_INFRA_PWM2_CK>,
147 /* FIXME */
148 <&infracfg_ao CK_INFRA_PWM2_CK>;
149 assigned-clocks = <&topckgen CK_TOP_PWM_SEL>;
150 assigned-clock-parents = <&topckgen CK_TOP_CB_CKSQ_40M>;
151 clock-names = "top", "main", "pwm1", "pwm2", "pwm3";
152 status = "disabled";
153 };
154
Weijie Gao0a648bd2023-07-19 17:16:19 +0800155 i2c0: i2c@11007000 {
156 compatible = "mediatek,mt7981-i2c";
157 reg = <0x11007000 0x1000>,
158 <0x10217080 0x80>;
159 interrupts = <GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>;
160 clock-div = <1>;
161 clocks = <&infracfg_ao CK_INFRA_I2CO_CK>,
162 <&infracfg_ao CK_INFRA_AP_DMA_CK>;
163 clock-names = "main", "dma";
164 #address-cells = <1>;
165 #size-cells = <0>;
166 status = "disabled";
167 };
168
Weijie Gaoed86e4f2022-09-09 19:59:11 +0800169 uart0: serial@11002000 {
170 compatible = "mediatek,hsuart";
171 reg = <0x11002000 0x400>;
172 interrupts = <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>;
173 clocks = <&infracfg_ao CK_INFRA_UART0_CK>;
174 assigned-clocks = <&topckgen CK_TOP_UART_SEL>,
175 <&infracfg_ao CK_INFRA_UART0_SEL>;
176 assigned-clock-parents = <&topckgen CK_TOP_CB_CKSQ_40M>,
177 <&infracfg CK_INFRA_UART>;
178 mediatek,force-highspeed;
179 status = "disabled";
Simon Glass8c103c32023-02-13 08:56:33 -0700180 bootph-all;
Weijie Gaoed86e4f2022-09-09 19:59:11 +0800181 };
182
183 uart1: serial@11003000 {
184 compatible = "mediatek,hsuart";
185 reg = <0x11003000 0x400>;
186 interrupts = <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>;
187 clocks = <&infracfg_ao CK_INFRA_UART1_CK>;
188 assigned-clocks = <&topckgen CK_TOP_UART_SEL>,
189 <&infracfg_ao CK_INFRA_UART1_SEL>;
190 assigned-clock-parents = <&topckgen CK_TOP_CB_CKSQ_40M>,
191 <&infracfg CK_INFRA_UART>;
192 mediatek,force-highspeed;
193 status = "disabled";
194 };
195
196 uart2: serial@11004000 {
197 compatible = "mediatek,hsuart";
198 reg = <0x11004000 0x400>;
199 interrupts = <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>;
200 clocks = <&infracfg_ao CK_INFRA_UART2_CK>;
201 assigned-clocks = <&topckgen CK_TOP_UART_SEL>,
202 <&infracfg_ao CK_INFRA_UART2_SEL>;
203 assigned-clock-parents = <&topckgen CK_TOP_CB_CKSQ_40M>,
204 <&infracfg CK_INFRA_UART>;
205 mediatek,force-highspeed;
206 status = "disabled";
207 };
208
209 snand: snand@11005000 {
210 compatible = "mediatek,mt7986-snand";
211 reg = <0x11005000 0x1000>,
212 <0x11006000 0x1000>;
213 reg-names = "nfi", "ecc";
214 clocks = <&infracfg_ao CK_INFRA_SPINFI1_CK>,
215 <&infracfg_ao CK_INFRA_NFI1_CK>,
216 <&infracfg_ao CK_INFRA_NFI_HCK_CK>;
217 clock-names = "pad_clk", "nfi_clk", "nfi_hclk";
218 assigned-clocks = <&topckgen CK_TOP_SPINFI_SEL>,
219 <&topckgen CK_TOP_NFI1X_SEL>;
220 assigned-clock-parents = <&topckgen CK_TOP_CB_M_D8>,
221 <&topckgen CK_TOP_CB_M_D8>;
222 status = "disabled";
223 };
224
225 ethsys: syscon@15000000 {
226 compatible = "mediatek,mt7981-ethsys", "syscon";
227 reg = <0x15000000 0x1000>;
228 clock-parent = <&topckgen>;
229 #clock-cells = <1>;
230 #reset-cells = <1>;
231 };
232
233 eth: ethernet@15100000 {
234 compatible = "mediatek,mt7981-eth", "syscon";
235 reg = <0x15100000 0x20000>;
236 resets = <&ethsys ETHSYS_FE_RST>;
237 reset-names = "fe";
238 mediatek,ethsys = <&ethsys>;
239 mediatek,sgmiisys = <&sgmiisys0>;
240 #address-cells = <1>;
241 #size-cells = <0>;
242 status = "disabled";
243 };
244
245 sgmiisys0: syscon@10060000 {
246 compatible = "mediatek,mt7986-sgmiisys", "syscon";
247 reg = <0x10060000 0x1000>;
248 pn_swap;
249 #clock-cells = <1>;
250 };
251
252 sgmiisys1: syscon@10070000 {
253 compatible = "mediatek,mt7986-sgmiisys", "syscon";
254 reg = <0x10070000 0x1000>;
255 #clock-cells = <1>;
256 };
257
258 spi0: spi@1100a000 {
259 compatible = "mediatek,ipm-spi";
260 reg = <0x1100a000 0x100>;
261 clocks = <&infracfg_ao CK_INFRA_SPI0_CK>,
262 <&topckgen CK_TOP_SPI_SEL>;
263 assigned-clocks = <&topckgen CK_TOP_SPI_SEL>,
264 <&infracfg CK_INFRA_SPI0_SEL>;
265 assigned-clock-parents = <&topckgen CK_TOP_CB_M_D2>,
266 <&topckgen CK_INFRA_ISPI0>;
267 clock-names = "sel-clk", "spi-clk";
268 interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>;
269 status = "disabled";
270 };
271
272 spi1: spi@1100b000 {
273 compatible = "mediatek,ipm-spi";
274 reg = <0x1100b000 0x100>;
275 interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>;
276 status = "disabled";
277 };
278
279 spi2: spi@11009000 {
280 compatible = "mediatek,ipm-spi";
281 reg = <0x11009000 0x100>;
282 clocks = <&infracfg_ao CK_INFRA_SPI0_CK>,
283 <&topckgen CK_TOP_SPI_SEL>;
284 assigned-clocks = <&topckgen CK_TOP_SPI_SEL>,
285 <&infracfg CK_INFRA_SPI0_SEL>;
286 assigned-clock-parents = <&topckgen CK_TOP_CB_M_D2>,
287 <&topckgen CK_INFRA_ISPI0>;
288 clock-names = "sel-clk", "spi-clk";
289 interrupts = <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>;
290 status = "disabled";
291 };
292
293 mmc0: mmc@11230000 {
294 compatible = "mediatek,mt7981-mmc";
295 reg = <0x11230000 0x1000>,
296 <0x11C20000 0x1000>;
297 interrupts = <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>;
298 clocks = <&topckgen CK_TOP_EMMC_400M>,
299 <&topckgen CK_TOP_EMMC_208M>,
300 <&infracfg_ao CK_INFRA_MSDC_CK>;
301 assigned-clocks = <&topckgen CK_TOP_EMMC_400M_SEL>,
302 <&topckgen CK_TOP_EMMC_208M_SEL>;
303 assigned-clock-parents = <&topckgen CK_TOP_CB_NET2_D2>,
304 <&topckgen CK_TOP_CB_M_D2>;
305 clock-names = "source", "hclk", "source_cg";
306 status = "disabled";
307 };
308
309};