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