blob: 6850e0058d485f54387de29bec0ad351120e1819 [file] [log] [blame]
developera37ad462018-11-15 10:07:50 +08001/*
2 * Copyright (C) 2018 MediaTek Inc.
3 * Author: Ryder Lee <ryder.lee@mediatek.com>
4 *
5 * SPDX-License-Identifier: (GPL-2.0 OR MIT)
6 */
7
8#include <dt-bindings/clock/mt7629-clk.h>
9#include <dt-bindings/gpio/gpio.h>
10#include <dt-bindings/interrupt-controller/irq.h>
11#include <dt-bindings/interrupt-controller/arm-gic.h>
12#include <dt-bindings/power/mt7629-power.h>
developercc0b4c02019-08-22 12:26:52 +020013#include <dt-bindings/reset/mt7629-reset.h>
developerfeaa8822020-05-02 11:35:19 +020014#include <dt-bindings/phy/phy.h>
developera37ad462018-11-15 10:07:50 +080015#include "skeleton.dtsi"
16
17/ {
18 compatible = "mediatek,mt7629";
19 interrupt-parent = <&sysirq>;
20 #address-cells = <1>;
21 #size-cells = <1>;
22
23 cpus {
24 #address-cells = <1>;
25 #size-cells = <0>;
26 enable-method = "mediatek,mt6589-smp";
27
28 cpu@0 {
29 device_type = "cpu";
30 compatible = "arm,cortex-a7";
31 reg = <0x0>;
32 clock-frequency = <1250000000>;
33 };
34
35 cpu@1 {
36 device_type = "cpu";
37 compatible = "arm,cortex-a7";
38 reg = <0x1>;
39 clock-frequency = <1250000000>;
40 };
41 };
42
43 clk20m: oscillator@0 {
44 compatible = "fixed-clock";
45 #clock-cells = <0>;
46 clock-frequency = <20000000>;
47 clock-output-names = "clk20m";
48 };
49
50 clk40m: oscillator@1 {
51 compatible = "fixed-clock";
52 #clock-cells = <0>;
53 clock-frequency = <40000000>;
54 clock-output-names = "clkxtal";
55 };
56
57 timer {
58 compatible = "arm,armv7-timer";
59 interrupt-parent = <&gic>;
60 interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
61 <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
62 <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
63 <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
64 clock-frequency = <20000000>;
65 arm,cpu-registers-not-fw-configured;
66 };
67
68 infracfg: syscon@10000000 {
69 compatible = "mediatek,mt7629-infracfg", "syscon";
70 reg = <0x10000000 0x1000>;
71 #clock-cells = <1>;
developera37ad462018-11-15 10:07:50 +080072 };
73
74 pericfg: syscon@10002000 {
75 compatible = "mediatek,mt7629-pericfg", "syscon";
76 reg = <0x10002000 0x1000>;
77 #clock-cells = <1>;
developera37ad462018-11-15 10:07:50 +080078 };
79
80 timer0: timer@10004000 {
81 compatible = "mediatek,timer";
82 reg = <0x10004000 0x80>;
83 interrupts = <GIC_SPI 152 IRQ_TYPE_LEVEL_LOW>;
developer6a779972019-07-11 14:26:24 +080084 clocks = <&topckgen CLK_TOP_CLKXTAL_D4>,
85 <&topckgen CLK_TOP_10M_SEL>;
developera37ad462018-11-15 10:07:50 +080086 clock-names = "mux", "src";
developera37ad462018-11-15 10:07:50 +080087 };
88
89 scpsys: scpsys@10006000 {
90 compatible = "mediatek,mt7629-scpsys";
91 reg = <0x10006000 0x1000>;
92 clocks = <&topckgen CLK_TOP_HIF_SEL>;
93 clock-names = "hif_sel";
94 assigned-clocks = <&topckgen CLK_TOP_HIF_SEL>;
95 assigned-clock-parents = <&topckgen CLK_TOP_UNIVPLL1_D2>;
96 #power-domain-cells = <1>;
97 infracfg = <&infracfg>;
98 };
99
100 mcucfg: syscon@10200000 {
101 compatible = "mediatek,mt7629-mcucfg", "syscon";
102 reg = <0x10200000 0x1000>;
103 #clock-cells = <1>;
developera37ad462018-11-15 10:07:50 +0800104 };
105
106 sysirq: interrupt-controller@10200a80 {
107 compatible = "mediatek,sysirq";
108 reg = <0x10200a80 0x20>;
109 interrupt-controller;
110 #interrupt-cells = <3>;
111 interrupt-parent = <&gic>;
112 };
113
114 dramc: dramc@10203000 {
115 compatible = "mediatek,mt7629-dramc";
116 reg = <0x10203000 0x600>, /* EMI */
117 <0x10213000 0x1000>, /* DDRPHY */
118 <0x10214000 0xd00>; /* DRAMC_AO */
119 clocks = <&topckgen CLK_TOP_DDRPHYCFG_SEL>,
120 <&topckgen CLK_TOP_SYSPLL1_D8>,
121 <&topckgen CLK_TOP_MEM_SEL>,
122 <&topckgen CLK_TOP_DMPLL>;
123 clock-names = "phy", "phy_mux", "mem", "mem_mux";
developera37ad462018-11-15 10:07:50 +0800124 };
125
126 apmixedsys: clock-controller@10209000 {
127 compatible = "mediatek,mt7629-apmixedsys";
128 reg = <0x10209000 0x1000>;
129 #clock-cells = <1>;
developera37ad462018-11-15 10:07:50 +0800130 };
131
132 topckgen: clock-controller@10210000 {
133 compatible = "mediatek,mt7629-topckgen";
134 reg = <0x10210000 0x1000>;
135 #clock-cells = <1>;
developera37ad462018-11-15 10:07:50 +0800136 };
137
138 watchdog: watchdog@10212000 {
139 compatible = "mediatek,wdt";
140 reg = <0x10212000 0x600>;
141 interrupts = <GIC_SPI 128 IRQ_TYPE_EDGE_FALLING>;
142 #reset-cells = <1>;
143 status = "disabled";
144 };
145
146 wdt-reboot {
147 compatible = "wdt-reboot";
148 wdt = <&watchdog>;
149 };
150
151 pinctrl: pinctrl@10217000 {
152 compatible = "mediatek,mt7629-pinctrl";
153 reg = <0x10217000 0x8000>;
154
155 gpio: gpio-controller {
156 gpio-controller;
157 #gpio-cells = <2>;
158 };
159 };
160
161 gic: interrupt-controller@10300000 {
162 compatible = "arm,gic-400";
163 interrupt-controller;
164 #interrupt-cells = <3>;
165 interrupt-parent = <&gic>;
166 reg = <0x10310000 0x1000>,
167 <0x10320000 0x1000>,
168 <0x10340000 0x2000>,
169 <0x10360000 0x2000>;
170 };
171
172 uart0: serial@11002000 {
173 compatible = "mediatek,hsuart";
174 reg = <0x11002000 0x400>;
175 reg-shift = <2>;
176 interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_LOW>;
177 clocks = <&topckgen CLK_TOP_UART_SEL>,
178 <&pericfg CLK_PERI_UART0_PD>;
179 clock-names = "baud", "bus";
180 status = "disabled";
181 assigned-clocks = <&topckgen CLK_TOP_AXI_SEL>;
182 assigned-clock-parents = <&topckgen CLK_TOP_SYSPLL1_D2>;
developera37ad462018-11-15 10:07:50 +0800183 };
184
185 uart1: serial@11003000 {
186 compatible = "mediatek,hsuart";
187 reg = <0x11003000 0x400>;
188 reg-shift = <2>;
189 interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_LOW>;
190 clocks = <&topckgen CLK_TOP_UART_SEL>,
191 <&pericfg CLK_PERI_UART1_PD>;
192 clock-names = "baud", "bus";
193 assigned-clocks = <&topckgen CLK_TOP_AXI_SEL>;
194 assigned-clock-parents = <&topckgen CLK_TOP_SYSPLL1_D2>;
195 status = "disabled";
196 };
197
198 uart2: serial@11004000 {
199 compatible = "mediatek,hsuart";
200 reg = <0x11004000 0x400>;
201 reg-shift = <2>;
202 interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_LOW>;
203 clocks = <&topckgen CLK_TOP_UART_SEL>,
204 <&pericfg CLK_PERI_UART2_PD>;
205 clock-names = "baud", "bus";
206 assigned-clocks = <&topckgen CLK_TOP_AXI_SEL>;
207 assigned-clock-parents = <&topckgen CLK_TOP_SYSPLL1_D2>;
208 status = "disabled";
209 };
210
developer68743392019-07-22 10:35:10 +0800211 snfi: snfi@1100d000 {
212 compatible = "mediatek,mtk-snfi-spi";
213 reg = <0x1100d000 0x2000>;
214 clocks = <&pericfg CLK_PERI_NFI_PD>,
215 <&pericfg CLK_PERI_SNFI_PD>;
216 clock-names = "nfi_clk", "pad_clk";
217 assigned-clocks = <&topckgen CLK_TOP_AXI_SEL>,
218 <&topckgen CLK_TOP_NFI_INFRA_SEL>;
219 assigned-clock-parents = <&topckgen CLK_TOP_SYSPLL1_D2>,
220 <&topckgen CLK_TOP_UNIVPLL2_D8>;
developera37ad462018-11-15 10:07:50 +0800221 status = "disabled";
222 #address-cells = <1>;
223 #size-cells = <0>;
developera37ad462018-11-15 10:07:50 +0800224 };
225
developerfeaa8822020-05-02 11:35:19 +0200226 ssusbsys: ssusbsys@1a000000 {
227 compatible = "mediatek,mt7629-ssusbsys", "syscon";
228 reg = <0x1a000000 0x1000>;
229 #clock-cells = <1>;
230 };
231
232 xhci: usb@1a0c0000 {
233 compatible = "mediatek,mt7629-xhci", "mediatek,mtk-xhci";
234 reg = <0x1a0c0000 0x1000>, <0x1a0c3e00 0x0100>;
235 reg-names = "mac", "ippc";
236 power-domains = <&scpsys MT7629_POWER_DOMAIN_HIF1>;
237 clocks = <&ssusbsys CLK_SSUSB_SYS_EN>,
238 <&ssusbsys CLK_SSUSB_REF_EN>,
239 <&ssusbsys CLK_SSUSB_MCU_EN>,
240 <&ssusbsys CLK_SSUSB_DMA_EN>;
241 clock-names = "sys_ck", "ref_ck", "mcu_ck", "dma_ck";
242 phys = <&u2port0 PHY_TYPE_USB2>, <&u3port0 PHY_TYPE_USB3>;
243 status = "disabled";
244 };
245
246 u3phy: usb-phy@1a0c4000 {
247 compatible = "mediatek,mt7629-tphy", "mediatek,generic-tphy-v2";
248 #address-cells = <1>;
249 #size-cells = <1>;
250 ranges = <0 0x1a0c4000 0x1000>;
251 status = "disabled";
252
253 u2port0: usb-phy@0 {
254 reg = <0x0 0x0700>;
255 #phy-cells = <1>;
256 clocks = <&ssusbsys CLK_SSUSB_U2_PHY_EN>;
257 clock-names = "ref";
258 };
259
260 u3port0: usb-phy@700 {
261 reg = <0x0700 0x0700>;
262 #phy-cells = <1>;
263 };
264 };
265
developera37ad462018-11-15 10:07:50 +0800266 ethsys: syscon@1b000000 {
267 compatible = "mediatek,mt7629-ethsys", "syscon";
268 reg = <0x1b000000 0x1000>;
269 #clock-cells = <1>;
developere43f3c72018-12-20 16:12:55 +0800270 #reset-cells = <1>;
271 };
272
273 eth: ethernet@1b100000 {
274 compatible = "mediatek,mt7629-eth", "syscon";
275 reg = <0x1b100000 0x20000>;
276 clocks = <&topckgen CLK_TOP_ETH_SEL>,
277 <&topckgen CLK_TOP_F10M_REF_SEL>,
278 <&ethsys CLK_ETH_ESW_EN>,
279 <&ethsys CLK_ETH_GP0_EN>,
280 <&ethsys CLK_ETH_GP1_EN>,
281 <&ethsys CLK_ETH_GP2_EN>,
282 <&ethsys CLK_ETH_FE_EN>,
283 <&sgmiisys0 CLK_SGMII_TX_EN>,
284 <&sgmiisys0 CLK_SGMII_RX_EN>,
285 <&sgmiisys0 CLK_SGMII_CDR_REF>,
286 <&sgmiisys0 CLK_SGMII_CDR_FB>,
287 <&sgmiisys1 CLK_SGMII_TX_EN>,
288 <&sgmiisys1 CLK_SGMII_RX_EN>,
289 <&sgmiisys1 CLK_SGMII_CDR_REF>,
290 <&sgmiisys1 CLK_SGMII_CDR_FB>,
291 <&apmixedsys CLK_APMIXED_SGMIPLL>,
292 <&apmixedsys CLK_APMIXED_ETH2PLL>;
293 clock-names = "ethif", "sgmiitop", "esw", "gp0", "gp1", "gp2",
294 "fe", "sgmii_tx250m", "sgmii_rx250m",
295 "sgmii_cdr_ref", "sgmii_cdr_fb",
296 "sgmii2_tx250m", "sgmii2_rx250m",
297 "sgmii2_cdr_ref", "sgmii2_cdr_fb",
298 "sgmii_ck", "eth2pll";
299 assigned-clocks = <&topckgen CLK_TOP_ETH_SEL>,
300 <&topckgen CLK_TOP_F10M_REF_SEL>;
301 assigned-clock-parents = <&topckgen CLK_TOP_UNIVPLL1_D2>,
302 <&topckgen CLK_TOP_SGMIIPLL_D2>;
303 power-domains = <&scpsys MT7629_POWER_DOMAIN_ETHSYS>;
304 resets = <&ethsys ETHSYS_FE_RST>;
305 reset-names = "fe";
306 mediatek,ethsys = <&ethsys>;
307 mediatek,sgmiisys = <&sgmiisys0>;
308 mediatek,infracfg = <&infracfg>;
309 #address-cells = <1>;
310 #size-cells = <0>;
311 status = "disabled";
developera37ad462018-11-15 10:07:50 +0800312 };
313
314 sgmiisys0: syscon@1b128000 {
315 compatible = "mediatek,mt7629-sgmiisys", "syscon";
316 reg = <0x1b128000 0x1000>;
317 #clock-cells = <1>;
318 };
319
320 sgmiisys1: syscon@1b130000 {
321 compatible = "mediatek,mt7629-sgmiisys", "syscon";
322 reg = <0x1b130000 0x1000>;
323 #clock-cells = <1>;
324 };
developer44c04092020-02-21 21:01:47 +0800325
326 pwm: pwm@11006000 {
327 compatible = "mediatek,mt7629-pwm";
328 reg = <0x11006000 0x1000>;
329 #clock-cells = <1>;
330 #pwm-cells = <2>;
331 interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_LOW>;
332 clocks = <&topckgen CLK_TOP_PWM_SEL>,
333 <&pericfg CLK_PERI_PWM_PD>,
334 <&pericfg CLK_PERI_PWM1_PD>;
335 clock-names = "top", "main", "pwm1";
336 assigned-clocks = <&topckgen CLK_TOP_PWM_SEL>;
337 assigned-clock-parents = <&topckgen CLK_TOP_UNIVPLL2_D4>;
338 status = "disabled";
339 };
340
developera37ad462018-11-15 10:07:50 +0800341};