1464c510fSMars Cheng/*
2464c510fSMars Cheng * Copyright (c) 2017 MediaTek Inc.
3464c510fSMars Cheng * Author: Mars.C <mars.cheng@mediatek.com>
4464c510fSMars Cheng *
5464c510fSMars Cheng * This program is free software; you can redistribute it and/or modify
6464c510fSMars Cheng * it under the terms of the GNU General Public License version 2 as
7464c510fSMars Cheng * published by the Free Software Foundation.
8464c510fSMars Cheng *
9464c510fSMars Cheng * This program is distributed in the hope that it will be useful,
10464c510fSMars Cheng * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11464c510fSMars Cheng * GNU General Public License for more details.
12464c510fSMars Cheng */
13464c510fSMars Cheng
14003f5d0cSMars Cheng#include <dt-bindings/clock/mt6797-clk.h>
15003f5d0cSMars Cheng#include <dt-bindings/power/mt6797-power.h>
16464c510fSMars Cheng#include <dt-bindings/interrupt-controller/irq.h>
17464c510fSMars Cheng#include <dt-bindings/interrupt-controller/arm-gic.h>
18464c510fSMars Cheng
19464c510fSMars Cheng/ {
20464c510fSMars Cheng	compatible = "mediatek,mt6797";
21464c510fSMars Cheng	interrupt-parent = <&sysirq>;
22464c510fSMars Cheng	#address-cells = <2>;
23464c510fSMars Cheng	#size-cells = <2>;
24464c510fSMars Cheng
25464c510fSMars Cheng	psci {
26464c510fSMars Cheng		compatible = "arm,psci-0.2";
27464c510fSMars Cheng		method = "smc";
28464c510fSMars Cheng	};
29464c510fSMars Cheng
30464c510fSMars Cheng	cpus {
31464c510fSMars Cheng		#address-cells = <1>;
32464c510fSMars Cheng		#size-cells = <0>;
33464c510fSMars Cheng
34464c510fSMars Cheng		cpu0: cpu@0 {
35464c510fSMars Cheng			device_type = "cpu";
36464c510fSMars Cheng			compatible = "arm,cortex-a53";
37464c510fSMars Cheng			enable-method = "psci";
38464c510fSMars Cheng			reg = <0x000>;
39464c510fSMars Cheng		};
40464c510fSMars Cheng
41464c510fSMars Cheng		cpu1: cpu@1 {
42464c510fSMars Cheng			device_type = "cpu";
43464c510fSMars Cheng			compatible = "arm,cortex-a53";
44464c510fSMars Cheng			enable-method = "psci";
45464c510fSMars Cheng			reg = <0x001>;
46464c510fSMars Cheng		};
47464c510fSMars Cheng
48464c510fSMars Cheng		cpu2: cpu@2 {
49464c510fSMars Cheng			device_type = "cpu";
50464c510fSMars Cheng			compatible = "arm,cortex-a53";
51464c510fSMars Cheng			enable-method = "psci";
52464c510fSMars Cheng			reg = <0x002>;
53464c510fSMars Cheng		};
54464c510fSMars Cheng
55464c510fSMars Cheng		cpu3: cpu@3 {
56464c510fSMars Cheng			device_type = "cpu";
57464c510fSMars Cheng			compatible = "arm,cortex-a53";
58464c510fSMars Cheng			enable-method = "psci";
59464c510fSMars Cheng			reg = <0x003>;
60464c510fSMars Cheng		};
61464c510fSMars Cheng
62464c510fSMars Cheng		cpu4: cpu@100 {
63464c510fSMars Cheng			device_type = "cpu";
64464c510fSMars Cheng			compatible = "arm,cortex-a53";
65464c510fSMars Cheng			enable-method = "psci";
66464c510fSMars Cheng			reg = <0x100>;
67464c510fSMars Cheng		};
68464c510fSMars Cheng
69464c510fSMars Cheng		cpu5: cpu@101 {
70464c510fSMars Cheng			device_type = "cpu";
71464c510fSMars Cheng			compatible = "arm,cortex-a53";
72464c510fSMars Cheng			enable-method = "psci";
73464c510fSMars Cheng			reg = <0x101>;
74464c510fSMars Cheng		};
75464c510fSMars Cheng
76464c510fSMars Cheng		cpu6: cpu@102 {
77464c510fSMars Cheng			device_type = "cpu";
78464c510fSMars Cheng			compatible = "arm,cortex-a53";
79464c510fSMars Cheng			enable-method = "psci";
80464c510fSMars Cheng			reg = <0x102>;
81464c510fSMars Cheng		};
82464c510fSMars Cheng
83464c510fSMars Cheng		cpu7: cpu@103 {
84464c510fSMars Cheng			device_type = "cpu";
85464c510fSMars Cheng			compatible = "arm,cortex-a53";
86464c510fSMars Cheng			enable-method = "psci";
87464c510fSMars Cheng			reg = <0x103>;
88464c510fSMars Cheng		};
89464c510fSMars Cheng
90464c510fSMars Cheng		cpu8: cpu@200 {
91464c510fSMars Cheng			device_type = "cpu";
92464c510fSMars Cheng			compatible = "arm,cortex-a72";
93464c510fSMars Cheng			enable-method = "psci";
94464c510fSMars Cheng			reg = <0x200>;
95464c510fSMars Cheng		};
96464c510fSMars Cheng
97464c510fSMars Cheng		cpu9: cpu@201 {
98464c510fSMars Cheng			device_type = "cpu";
99464c510fSMars Cheng			compatible = "arm,cortex-a72";
100464c510fSMars Cheng			enable-method = "psci";
101464c510fSMars Cheng			reg = <0x201>;
102464c510fSMars Cheng		};
103464c510fSMars Cheng	};
104464c510fSMars Cheng
105464c510fSMars Cheng	clk26m: oscillator@0 {
106464c510fSMars Cheng		compatible = "fixed-clock";
107464c510fSMars Cheng		#clock-cells = <0>;
108464c510fSMars Cheng		clock-frequency = <26000000>;
109464c510fSMars Cheng		clock-output-names = "clk26m";
110464c510fSMars Cheng	};
111464c510fSMars Cheng
112464c510fSMars Cheng	clk32k: oscillator@1 {
113464c510fSMars Cheng		compatible = "fixed-clock";
114464c510fSMars Cheng		#clock-cells = <0>;
115464c510fSMars Cheng		clock-frequency = <32000>;
116464c510fSMars Cheng		clock-output-names = "clk32k";
117464c510fSMars Cheng	};
118464c510fSMars Cheng
119464c510fSMars Cheng	timer {
120464c510fSMars Cheng		compatible = "arm,armv8-timer";
121464c510fSMars Cheng		interrupt-parent = <&gic>;
122464c510fSMars Cheng		interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>,
123464c510fSMars Cheng			     <GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>,
124464c510fSMars Cheng			     <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>,
125464c510fSMars Cheng			     <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>;
126464c510fSMars Cheng	};
127464c510fSMars Cheng
128003f5d0cSMars Cheng	topckgen: topckgen@10000000 {
129003f5d0cSMars Cheng		compatible = "mediatek,mt6797-topckgen";
130003f5d0cSMars Cheng		reg = <0 0x10000000 0 0x1000>;
131003f5d0cSMars Cheng		#clock-cells = <1>;
132003f5d0cSMars Cheng	};
133003f5d0cSMars Cheng
134003f5d0cSMars Cheng	infrasys: infracfg_ao@10001000 {
135003f5d0cSMars Cheng		compatible = "mediatek,mt6797-infracfg", "syscon";
136003f5d0cSMars Cheng		reg = <0 0x10001000 0 0x1000>;
137003f5d0cSMars Cheng		#clock-cells = <1>;
138003f5d0cSMars Cheng	};
139003f5d0cSMars Cheng
140003f5d0cSMars Cheng	scpsys: scpsys@10006000 {
141003f5d0cSMars Cheng		compatible = "mediatek,mt6797-scpsys";
142003f5d0cSMars Cheng		#power-domain-cells = <1>;
143003f5d0cSMars Cheng		reg = <0 0x10006000 0 0x1000>;
144003f5d0cSMars Cheng		clocks = <&topckgen CLK_TOP_MUX_MFG>,
145003f5d0cSMars Cheng			 <&topckgen CLK_TOP_MUX_MM>,
146003f5d0cSMars Cheng			 <&topckgen CLK_TOP_MUX_VDEC>;
147003f5d0cSMars Cheng		clock-names = "mfg", "mm", "vdec";
148003f5d0cSMars Cheng		infracfg = <&infrasys>;
149003f5d0cSMars Cheng	};
150003f5d0cSMars Cheng
151003f5d0cSMars Cheng	apmixedsys: apmixed@1000c000 {
152003f5d0cSMars Cheng		compatible = "mediatek,mt6797-apmixedsys";
153003f5d0cSMars Cheng		reg = <0 0x1000c000 0 0x1000>;
154003f5d0cSMars Cheng		#clock-cells = <1>;
155003f5d0cSMars Cheng	};
156003f5d0cSMars Cheng
157464c510fSMars Cheng	sysirq: intpol-controller@10200620 {
158464c510fSMars Cheng		compatible = "mediatek,mt6797-sysirq",
159464c510fSMars Cheng			     "mediatek,mt6577-sysirq";
160464c510fSMars Cheng		interrupt-controller;
161464c510fSMars Cheng		#interrupt-cells = <3>;
162464c510fSMars Cheng		interrupt-parent = <&gic>;
163464c510fSMars Cheng		reg = <0 0x10220620 0 0x20>,
164464c510fSMars Cheng		      <0 0x10220690 0 0x10>;
165464c510fSMars Cheng	};
166464c510fSMars Cheng
167464c510fSMars Cheng	uart0: serial@11002000 {
168464c510fSMars Cheng		compatible = "mediatek,mt6797-uart",
169464c510fSMars Cheng			     "mediatek,mt6577-uart";
170464c510fSMars Cheng		reg = <0 0x11002000 0 0x400>;
171464c510fSMars Cheng		interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_LOW>;
172003f5d0cSMars Cheng		clocks = <&infrasys CLK_INFRA_UART0>,
173003f5d0cSMars Cheng			 <&infrasys CLK_INFRA_AP_DMA>;
174003f5d0cSMars Cheng		clock-names = "baud", "bus";
175464c510fSMars Cheng		status = "disabled";
176464c510fSMars Cheng	};
177464c510fSMars Cheng
178464c510fSMars Cheng	uart1: serial@11003000 {
179464c510fSMars Cheng		compatible = "mediatek,mt6797-uart",
180464c510fSMars Cheng			     "mediatek,mt6577-uart";
181464c510fSMars Cheng		reg = <0 0x11003000 0 0x400>;
182464c510fSMars Cheng		interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_LOW>;
183003f5d0cSMars Cheng		clocks = <&infrasys CLK_INFRA_UART1>,
184003f5d0cSMars Cheng			 <&infrasys CLK_INFRA_AP_DMA>;
185003f5d0cSMars Cheng		clock-names = "baud", "bus";
186464c510fSMars Cheng		status = "disabled";
187464c510fSMars Cheng	};
188464c510fSMars Cheng
189464c510fSMars Cheng	uart2: serial@11004000 {
190464c510fSMars Cheng		compatible = "mediatek,mt6797-uart",
191464c510fSMars Cheng			     "mediatek,mt6577-uart";
192464c510fSMars Cheng		reg = <0 0x11004000 0 0x400>;
193464c510fSMars Cheng		interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_LOW>;
194003f5d0cSMars Cheng		clocks = <&infrasys CLK_INFRA_UART2>,
195003f5d0cSMars Cheng			 <&infrasys CLK_INFRA_AP_DMA>;
196003f5d0cSMars Cheng		clock-names = "baud", "bus";
197464c510fSMars Cheng		status = "disabled";
198464c510fSMars Cheng	};
199464c510fSMars Cheng
200464c510fSMars Cheng	uart3: serial@11005000 {
201464c510fSMars Cheng		compatible = "mediatek,mt6797-uart",
202464c510fSMars Cheng			     "mediatek,mt6577-uart";
203464c510fSMars Cheng		reg = <0 0x11005000 0 0x400>;
204464c510fSMars Cheng		interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_LOW>;
205003f5d0cSMars Cheng		clocks = <&infrasys CLK_INFRA_UART3>,
206003f5d0cSMars Cheng			 <&infrasys CLK_INFRA_AP_DMA>;
207003f5d0cSMars Cheng		clock-names = "baud", "bus";
208464c510fSMars Cheng		status = "disabled";
209464c510fSMars Cheng	};
210464c510fSMars Cheng
211003f5d0cSMars Cheng	mmsys: mmsys_config@14000000 {
212003f5d0cSMars Cheng		compatible = "mediatek,mt6797-mmsys", "syscon";
213003f5d0cSMars Cheng		reg = <0 0x14000000 0 0x1000>;
214003f5d0cSMars Cheng		#clock-cells = <1>;
215003f5d0cSMars Cheng	};
216003f5d0cSMars Cheng
217003f5d0cSMars Cheng	imgsys: imgsys_config@15000000  {
218003f5d0cSMars Cheng		compatible = "mediatek,mt6797-imgsys", "syscon";
219003f5d0cSMars Cheng		reg = <0 0x15000000 0 0x1000>;
220003f5d0cSMars Cheng		#clock-cells = <1>;
221003f5d0cSMars Cheng	};
222003f5d0cSMars Cheng
223003f5d0cSMars Cheng	vdecsys: vdec_gcon@16000000 {
224003f5d0cSMars Cheng		compatible = "mediatek,mt6797-vdecsys", "syscon";
225003f5d0cSMars Cheng		reg = <0 0x16000000 0 0x10000>;
226003f5d0cSMars Cheng		#clock-cells = <1>;
227003f5d0cSMars Cheng	};
228003f5d0cSMars Cheng
229003f5d0cSMars Cheng	vencsys: venc_gcon@17000000 {
230003f5d0cSMars Cheng		compatible = "mediatek,mt6797-vencsys", "syscon";
231003f5d0cSMars Cheng		reg = <0 0x17000000 0 0x1000>;
232003f5d0cSMars Cheng		#clock-cells = <1>;
233003f5d0cSMars Cheng	};
234003f5d0cSMars Cheng
235464c510fSMars Cheng	gic: interrupt-controller@19000000 {
236464c510fSMars Cheng		compatible = "arm,gic-v3";
237464c510fSMars Cheng		#interrupt-cells = <3>;
238464c510fSMars Cheng		interrupt-parent = <&gic>;
239464c510fSMars Cheng		interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
240464c510fSMars Cheng		interrupt-controller;
241464c510fSMars Cheng		reg = <0 0x19000000 0 0x10000>,    /* GICD */
242464c510fSMars Cheng		      <0 0x19200000 0 0x200000>,   /* GICR */
243464c510fSMars Cheng		      <0 0x10240000 0 0x2000>;     /* GICC */
244464c510fSMars Cheng	};
245464c510fSMars Cheng};
246