blob: d0783bc9ff5db44ac3e53fc03bf094b751607996 [file] [log] [blame]
Sam Shihac57e2b2020-01-10 16:30:26 +08001// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (c) 2019 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/mt7622-clk.h>
MarkLee6efa4502020-01-21 19:31:59 +080010#include <dt-bindings/power/mt7629-power.h>
11#include <dt-bindings/reset/mt7629-reset.h>
12#include <dt-bindings/gpio/gpio.h>
Sam Shihac57e2b2020-01-10 16:30:26 +080013
14/ {
15 compatible = "mediatek,mt7622";
16 interrupt-parent = <&sysirq>;
17 #address-cells = <1>;
18 #size-cells = <1>;
19
20 cpus {
21 #address-cells = <1>;
22 #size-cells = <0>;
23
24 cpu0: cpu@0 {
25 device_type = "cpu";
26 compatible = "arm,cortex-a53";
27 reg = <0x0>;
28 clock-frequency = <1300000000>;
29 };
30
31 cpu1: cpu@1 {
32 device_type = "cpu";
33 compatible = "arm,cortex-a53";
34 reg = <0x1>;
35 clock-frequency = <1300000000>;
36 };
37 };
38
39 snfi: snfi@1100d000 {
40 compatible = "mediatek,mtk-snfi-spi";
41 reg = <0x1100d000 0x2000>;
42 clocks = <&pericfg CLK_PERI_NFI_PD>,
43 <&pericfg CLK_PERI_SNFI_PD>;
44 clock-names = "nfi_clk", "pad_clk";
45 assigned-clocks = <&topckgen CLK_TOP_AXI_SEL>,
46 <&topckgen CLK_TOP_NFI_INFRA_SEL>;
47
48 assigned-clock-parents = <&topckgen CLK_TOP_SYSPLL1_D2>,
49 <&topckgen CLK_TOP_UNIVPLL2_D8>;
50 status = "disabled";
51 #address-cells = <1>;
52 #size-cells = <0>;
53 };
54
55 timer {
56 compatible = "arm,armv8-timer";
57 interrupt-parent = <&gic>;
58 interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(2) |
59 IRQ_TYPE_LEVEL_HIGH)>,
60 <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(2) |
61 IRQ_TYPE_LEVEL_HIGH)>,
62 <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(2) |
63 IRQ_TYPE_LEVEL_HIGH)>,
64 <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(2) |
65 IRQ_TYPE_LEVEL_HIGH)>;
66 arm,cpu-registers-not-fw-configured;
67 };
68
69 timer0: timer@10004000 {
70 compatible = "mediatek,timer";
71 reg = <0x10004000 0x80>;
72 interrupts = <GIC_SPI 152 IRQ_TYPE_LEVEL_LOW>;
73 clocks = <&system_clk>;
74 clock-names = "system-clk";
75 };
76
77 system_clk: dummy13m {
78 compatible = "fixed-clock";
79 clock-frequency = <13000000>;
80 #clock-cells = <0>;
81 };
82
83 infracfg: infracfg@10000000 {
84 compatible = "mediatek,mt7622-infracfg",
85 "syscon";
86 reg = <0x10000000 0x1000>;
87 #clock-cells = <1>;
88 #reset-cells = <1>;
89 };
90
91 pericfg: pericfg@10002000 {
92 compatible = "mediatek,mt7622-pericfg", "syscon";
93 reg = <0x10002000 0x1000>;
94 #clock-cells = <1>;
95 };
96
97 scpsys: scpsys@10006000 {
98 compatible = "mediatek,mt7622-scpsys",
99 "syscon";
100 #power-domain-cells = <1>;
101 reg = <0x10006000 0x1000>;
102 interrupts = <GIC_SPI 165 IRQ_TYPE_LEVEL_LOW>,
103 <GIC_SPI 166 IRQ_TYPE_LEVEL_LOW>,
104 <GIC_SPI 167 IRQ_TYPE_LEVEL_LOW>,
105 <GIC_SPI 168 IRQ_TYPE_LEVEL_LOW>;
106 infracfg = <&infracfg>;
107 clocks = <&topckgen CLK_TOP_HIF_SEL>;
108 clock-names = "hif_sel";
109 };
110
111 sysirq: interrupt-controller@10200620 {
112 compatible = "mediatek,sysirq";
113 reg = <0x10200620 0x20>;
114 interrupt-controller;
115 #interrupt-cells = <3>;
116 interrupt-parent = <&gic>;
117 };
118
119 apmixedsys: apmixedsys@10209000 {
120 compatible = "mediatek,mt7622-apmixedsys";
121 reg = <0x10209000 0x1000>;
122 #clock-cells = <1>;
123 };
124
125 topckgen: topckgen@10210000 {
126 compatible = "mediatek,mt7622-topckgen";
127 reg = <0x10210000 0x1000>;
128 #clock-cells = <1>;
129 };
130
131 pinctrl: pinctrl@10211000 {
132 compatible = "mediatek,mt7622-pinctrl";
133 reg = <0x10211000 0x1000>;
134 gpio: gpio-controller {
135 gpio-controller;
136 #gpio-cells = <2>;
137 };
138 };
139
140 watchdog: watchdog@10212000 {
141 compatible = "mediatek,wdt";
142 reg = <0x10212000 0x800>;
143 };
144
145 gic: interrupt-controller@10300000 {
146 compatible = "arm,gic-400";
147 interrupt-controller;
148 #interrupt-cells = <3>;
149 interrupt-parent = <&gic>;
150 reg = <0x10310000 0x1000>,
151 <0x10320000 0x1000>,
152 <0x10340000 0x2000>,
153 <0x10360000 0x2000>;
154 };
155
156 uart0: serial@11002000 {
157 compatible = "mediatek,hsuart";
158 reg = <0x11002000 0x400>;
159 reg-shift = <2>;
160 interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_LOW>;
161 clocks = <&topckgen CLK_TOP_UART_SEL>,
162 <&pericfg CLK_PERI_UART0_PD>;
163 clock-names = "baud", "bus";
164 status = "disabled";
165 assigned-clocks = <&topckgen CLK_TOP_AXI_SEL>;
166 assigned-clock-parents = <&topckgen CLK_TOP_SYSPLL1_D2>;
167 };
168
169 mmc0: mmc@11230000 {
170 compatible = "mediatek,mt7622-mmc";
171 reg = <0x11230000 0x1000>;
172 interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_LOW>;
173 clocks = <&pericfg CLK_PERI_MSDC30_0_PD>,
174 <&topckgen CLK_TOP_MSDC50_0_SEL>;
175 clock-names = "source", "hclk";
176 status = "disabled";
177 };
178
179 mmc1: mmc@11240000 {
180 compatible = "mediatek,mt7622-mmc";
181 reg = <0x11240000 0x1000>;
182 interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_LOW>;
183 clocks = <&pericfg CLK_PERI_MSDC30_1_PD>,
184 <&topckgen CLK_TOP_AXI_SEL>;
185 clock-names = "source", "hclk";
186 status = "disabled";
187 };
MarkLee6efa4502020-01-21 19:31:59 +0800188
Chuanjia Liu0cc587d2020-08-10 16:17:09 +0800189 pciesys: pciesys@1a100800 {
190 compatible = "mediatek,mt7622-pciesys", "syscon";
191 reg = <0x1a100800 0x1000>;
192 #clock-cells = <1>;
193 #reset-cells = <1>;
194 };
195
Chuanjia Liubb9d3ad2020-08-10 16:17:11 +0800196 pcie: pcie@1a140000 {
197 compatible = "mediatek,mt7622-pcie";
198 device_type = "pci";
199 reg = <0x1a140000 0x1000>,
200 <0x1a143000 0x1000>,
201 <0x1a145000 0x1000>;
202 reg-names = "subsys", "port0", "port1";
203 #address-cells = <3>;
204 #size-cells = <2>;
205 interrupts = <GIC_SPI 228 IRQ_TYPE_LEVEL_LOW>,
206 <GIC_SPI 229 IRQ_TYPE_LEVEL_LOW>;
207 clocks = <&pciesys CLK_PCIE_P0_MAC_EN>,
208 <&pciesys CLK_PCIE_P1_MAC_EN>,
209 <&pciesys CLK_PCIE_P0_AHB_EN>,
210 <&pciesys CLK_PCIE_P0_AHB_EN>,
211 <&pciesys CLK_PCIE_P0_AUX_EN>,
212 <&pciesys CLK_PCIE_P1_AUX_EN>,
213 <&pciesys CLK_PCIE_P0_AXI_EN>,
214 <&pciesys CLK_PCIE_P1_AXI_EN>,
215 <&pciesys CLK_PCIE_P0_OBFF_EN>,
216 <&pciesys CLK_PCIE_P1_OBFF_EN>,
217 <&pciesys CLK_PCIE_P0_PIPE_EN>,
218 <&pciesys CLK_PCIE_P1_PIPE_EN>;
219 clock-names = "sys_ck0", "sys_ck1", "ahb_ck0", "ahb_ck1",
220 "aux_ck0", "aux_ck1", "axi_ck0", "axi_ck1",
221 "obff_ck0", "obff_ck1", "pipe_ck0", "pipe_ck1";
222 power-domains = <&scpsys MT7629_POWER_DOMAIN_HIF0>;
223 bus-range = <0x00 0xff>;
224 ranges = <0x82000000 0 0x20000000 0x20000000 0 0x10000000>;
225 status = "disabled";
226
227 pcie0: pcie@0,0 {
228 reg = <0x0000 0 0 0 0>;
229 #address-cells = <3>;
230 #size-cells = <2>;
231 #interrupt-cells = <1>;
232 ranges;
233 status = "disabled";
234
235 interrupt-map-mask = <0 0 0 7>;
236 interrupt-map = <0 0 0 1 &pcie_intc0 0>,
237 <0 0 0 2 &pcie_intc0 1>,
238 <0 0 0 3 &pcie_intc0 2>,
239 <0 0 0 4 &pcie_intc0 3>;
240 pcie_intc0: interrupt-controller {
241 interrupt-controller;
242 #address-cells = <0>;
243 #interrupt-cells = <1>;
244 };
245 };
246
247 pcie1: pcie@1,0 {
248 reg = <0x0800 0 0 0 0>;
249 #address-cells = <3>;
250 #size-cells = <2>;
251 #interrupt-cells = <1>;
252 ranges;
253 status = "disabled";
254
255 interrupt-map-mask = <0 0 0 7>;
256 interrupt-map = <0 0 0 1 &pcie_intc1 0>,
257 <0 0 0 2 &pcie_intc1 1>,
258 <0 0 0 3 &pcie_intc1 2>,
259 <0 0 0 4 &pcie_intc1 3>;
260 pcie_intc1: interrupt-controller {
261 interrupt-controller;
262 #address-cells = <0>;
263 #interrupt-cells = <1>;
264 };
265 };
266 };
267
MarkLee6efa4502020-01-21 19:31:59 +0800268 ethsys: syscon@1b000000 {
269 compatible = "mediatek,mt7622-ethsys", "syscon";
270 reg = <0x1b000000 0x1000>;
271 #clock-cells = <1>;
272 #reset-cells = <1>;
273 };
274
275 eth: ethernet@1b100000 {
276 compatible = "mediatek,mt7622-eth", "syscon";
277 reg = <0x1b100000 0x20000>;
278 clocks = <&topckgen CLK_TOP_ETH_SEL>,
279 <&ethsys CLK_ETH_ESW_EN>,
280 <&ethsys CLK_ETH_GP0_EN>,
281 <&ethsys CLK_ETH_GP1_EN>,
282 <&ethsys CLK_ETH_GP2_EN>,
283 <&sgmiisys CLK_SGMII_TX250M_EN>,
284 <&sgmiisys CLK_SGMII_RX250M_EN>,
285 <&sgmiisys CLK_SGMII_CDR_REF>,
286 <&sgmiisys CLK_SGMII_CDR_FB>,
287 <&topckgen CLK_TOP_SGMIIPLL>,
288 <&apmixedsys CLK_APMIXED_ETH2PLL>;
289 clock-names = "ethif", "esw", "gp0", "gp1", "gp2",
290 "sgmii_tx250m", "sgmii_rx250m",
291 "sgmii_cdr_ref", "sgmii_cdr_fb", "sgmii_ck",
292 "eth2pll";
293 power-domains = <&scpsys MT7629_POWER_DOMAIN_ETHSYS>;
294 resets = <&ethsys ETHSYS_FE_RST>;
295 reset-names = "fe";
296 mediatek,ethsys = <&ethsys>;
297 mediatek,sgmiisys = <&sgmiisys>;
298 #address-cells = <1>;
299 #size-cells = <0>;
300 status = "disabled";
301 };
302
303 sgmiisys: sgmiisys@1b128000 {
304 compatible = "mediatek,mt7622-sgmiisys", "syscon";
305 reg = <0x1b128000 0x3000>;
306 #clock-cells = <1>;
307 };
308
Sam Shih25a1b5e2020-02-21 21:01:47 +0800309 pwm: pwm@11006000 {
310 compatible = "mediatek,mt7622-pwm";
311 reg = <0x11006000 0x1000>;
312 #clock-cells = <1>;
313 #pwm-cells = <2>;
314 interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_LOW>;
315 clocks = <&topckgen CLK_TOP_PWM_SEL>,
316 <&pericfg CLK_PERI_PWM_PD>,
317 <&pericfg CLK_PERI_PWM1_PD>,
318 <&pericfg CLK_PERI_PWM2_PD>,
319 <&pericfg CLK_PERI_PWM3_PD>,
320 <&pericfg CLK_PERI_PWM4_PD>,
321 <&pericfg CLK_PERI_PWM5_PD>,
322 <&pericfg CLK_PERI_PWM6_PD>;
323 clock-names = "top", "main", "pwm1", "pwm2", "pwm3", "pwm4",
324 "pwm5", "pwm6";
325 status = "disabled";
326 };
327
Sam Shihac57e2b2020-01-10 16:30:26 +0800328};