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>
15464c510fSMars Cheng#include <dt-bindings/interrupt-controller/irq.h>
16464c510fSMars Cheng#include <dt-bindings/interrupt-controller/arm-gic.h>
179539c0c1SManivannan Sadhasivam#include <dt-bindings/pinctrl/mt6797-pinfunc.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	timer {
113464c510fSMars Cheng		compatible = "arm,armv8-timer";
114464c510fSMars Cheng		interrupt-parent = <&gic>;
115464c510fSMars Cheng		interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>,
116464c510fSMars Cheng			     <GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>,
117464c510fSMars Cheng			     <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>,
118464c510fSMars Cheng			     <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>;
119464c510fSMars Cheng	};
120464c510fSMars Cheng
121003f5d0cSMars Cheng	topckgen: topckgen@10000000 {
122003f5d0cSMars Cheng		compatible = "mediatek,mt6797-topckgen";
123003f5d0cSMars Cheng		reg = <0 0x10000000 0 0x1000>;
124003f5d0cSMars Cheng		#clock-cells = <1>;
125003f5d0cSMars Cheng	};
126003f5d0cSMars Cheng
127003f5d0cSMars Cheng	infrasys: infracfg_ao@10001000 {
128003f5d0cSMars Cheng		compatible = "mediatek,mt6797-infracfg", "syscon";
129003f5d0cSMars Cheng		reg = <0 0x10001000 0 0x1000>;
130003f5d0cSMars Cheng		#clock-cells = <1>;
131003f5d0cSMars Cheng	};
132003f5d0cSMars Cheng
1339539c0c1SManivannan Sadhasivam	pio: pinctrl@10005000 {
1349539c0c1SManivannan Sadhasivam		compatible = "mediatek,mt6797-pinctrl";
1359539c0c1SManivannan Sadhasivam		reg = <0 0x10005000 0 0x1000>,
1369539c0c1SManivannan Sadhasivam		      <0 0x10002000 0 0x400>,
1379539c0c1SManivannan Sadhasivam		      <0 0x10002400 0 0x400>,
1389539c0c1SManivannan Sadhasivam		      <0 0x10002800 0 0x400>,
1399539c0c1SManivannan Sadhasivam		      <0 0x10002C00 0 0x400>;
1409539c0c1SManivannan Sadhasivam		reg-names = "gpio", "iocfgl", "iocfgb",
1419539c0c1SManivannan Sadhasivam			    "iocfgr", "iocfgt";
1429539c0c1SManivannan Sadhasivam		gpio-controller;
1439539c0c1SManivannan Sadhasivam		#gpio-cells = <2>;
14458bef10eSManivannan Sadhasivam
14558bef10eSManivannan Sadhasivam		uart1_pins_a: uart1 {
14658bef10eSManivannan Sadhasivam			pins1 {
14758bef10eSManivannan Sadhasivam				pinmux = <MT6797_GPIO232__FUNC_URXD1>,
14858bef10eSManivannan Sadhasivam					 <MT6797_GPIO233__FUNC_UTXD1>;
14958bef10eSManivannan Sadhasivam			};
15058bef10eSManivannan Sadhasivam		};
1519539c0c1SManivannan Sadhasivam	};
1529539c0c1SManivannan Sadhasivam
153003f5d0cSMars Cheng	scpsys: scpsys@10006000 {
154003f5d0cSMars Cheng		compatible = "mediatek,mt6797-scpsys";
155003f5d0cSMars Cheng		#power-domain-cells = <1>;
156003f5d0cSMars Cheng		reg = <0 0x10006000 0 0x1000>;
157003f5d0cSMars Cheng		clocks = <&topckgen CLK_TOP_MUX_MFG>,
158003f5d0cSMars Cheng			 <&topckgen CLK_TOP_MUX_MM>,
159003f5d0cSMars Cheng			 <&topckgen CLK_TOP_MUX_VDEC>;
160003f5d0cSMars Cheng		clock-names = "mfg", "mm", "vdec";
161003f5d0cSMars Cheng		infracfg = <&infrasys>;
162003f5d0cSMars Cheng	};
163003f5d0cSMars Cheng
1646717728cSMatthias Brugger	watchdog: watchdog@10007000 {
1656717728cSMatthias Brugger		compatible = "mediatek,mt6797-wdt", "mediatek,mt6589-wdt";
1666717728cSMatthias Brugger		reg = <0 0x10007000 0 0x100>;
1676717728cSMatthias Brugger	};
1686717728cSMatthias Brugger
169003f5d0cSMars Cheng	apmixedsys: apmixed@1000c000 {
170003f5d0cSMars Cheng		compatible = "mediatek,mt6797-apmixedsys";
171003f5d0cSMars Cheng		reg = <0 0x1000c000 0 0x1000>;
172003f5d0cSMars Cheng		#clock-cells = <1>;
173003f5d0cSMars Cheng	};
174003f5d0cSMars Cheng
175464c510fSMars Cheng	sysirq: intpol-controller@10200620 {
176464c510fSMars Cheng		compatible = "mediatek,mt6797-sysirq",
177464c510fSMars Cheng			     "mediatek,mt6577-sysirq";
178464c510fSMars Cheng		interrupt-controller;
179464c510fSMars Cheng		#interrupt-cells = <3>;
180464c510fSMars Cheng		interrupt-parent = <&gic>;
181464c510fSMars Cheng		reg = <0 0x10220620 0 0x20>,
182464c510fSMars Cheng		      <0 0x10220690 0 0x10>;
183464c510fSMars Cheng	};
184464c510fSMars Cheng
185464c510fSMars Cheng	uart0: serial@11002000 {
186464c510fSMars Cheng		compatible = "mediatek,mt6797-uart",
187464c510fSMars Cheng			     "mediatek,mt6577-uart";
188464c510fSMars Cheng		reg = <0 0x11002000 0 0x400>;
189464c510fSMars Cheng		interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_LOW>;
190003f5d0cSMars Cheng		clocks = <&infrasys CLK_INFRA_UART0>,
191003f5d0cSMars Cheng			 <&infrasys CLK_INFRA_AP_DMA>;
192003f5d0cSMars Cheng		clock-names = "baud", "bus";
193464c510fSMars Cheng		status = "disabled";
194464c510fSMars Cheng	};
195464c510fSMars Cheng
196464c510fSMars Cheng	uart1: serial@11003000 {
197464c510fSMars Cheng		compatible = "mediatek,mt6797-uart",
198464c510fSMars Cheng			     "mediatek,mt6577-uart";
199464c510fSMars Cheng		reg = <0 0x11003000 0 0x400>;
200464c510fSMars Cheng		interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_LOW>;
201003f5d0cSMars Cheng		clocks = <&infrasys CLK_INFRA_UART1>,
202003f5d0cSMars Cheng			 <&infrasys CLK_INFRA_AP_DMA>;
203003f5d0cSMars Cheng		clock-names = "baud", "bus";
204464c510fSMars Cheng		status = "disabled";
205464c510fSMars Cheng	};
206464c510fSMars Cheng
207464c510fSMars Cheng	uart2: serial@11004000 {
208464c510fSMars Cheng		compatible = "mediatek,mt6797-uart",
209464c510fSMars Cheng			     "mediatek,mt6577-uart";
210464c510fSMars Cheng		reg = <0 0x11004000 0 0x400>;
211464c510fSMars Cheng		interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_LOW>;
212003f5d0cSMars Cheng		clocks = <&infrasys CLK_INFRA_UART2>,
213003f5d0cSMars Cheng			 <&infrasys CLK_INFRA_AP_DMA>;
214003f5d0cSMars Cheng		clock-names = "baud", "bus";
215464c510fSMars Cheng		status = "disabled";
216464c510fSMars Cheng	};
217464c510fSMars Cheng
218464c510fSMars Cheng	uart3: serial@11005000 {
219464c510fSMars Cheng		compatible = "mediatek,mt6797-uart",
220464c510fSMars Cheng			     "mediatek,mt6577-uart";
221464c510fSMars Cheng		reg = <0 0x11005000 0 0x400>;
222464c510fSMars Cheng		interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_LOW>;
223003f5d0cSMars Cheng		clocks = <&infrasys CLK_INFRA_UART3>,
224003f5d0cSMars Cheng			 <&infrasys CLK_INFRA_AP_DMA>;
225003f5d0cSMars Cheng		clock-names = "baud", "bus";
226464c510fSMars Cheng		status = "disabled";
227464c510fSMars Cheng	};
228464c510fSMars Cheng
229003f5d0cSMars Cheng	mmsys: mmsys_config@14000000 {
230003f5d0cSMars Cheng		compatible = "mediatek,mt6797-mmsys", "syscon";
231003f5d0cSMars Cheng		reg = <0 0x14000000 0 0x1000>;
232003f5d0cSMars Cheng		#clock-cells = <1>;
233003f5d0cSMars Cheng	};
234003f5d0cSMars Cheng
235003f5d0cSMars Cheng	imgsys: imgsys_config@15000000  {
236003f5d0cSMars Cheng		compatible = "mediatek,mt6797-imgsys", "syscon";
237003f5d0cSMars Cheng		reg = <0 0x15000000 0 0x1000>;
238003f5d0cSMars Cheng		#clock-cells = <1>;
239003f5d0cSMars Cheng	};
240003f5d0cSMars Cheng
241003f5d0cSMars Cheng	vdecsys: vdec_gcon@16000000 {
242003f5d0cSMars Cheng		compatible = "mediatek,mt6797-vdecsys", "syscon";
243003f5d0cSMars Cheng		reg = <0 0x16000000 0 0x10000>;
244003f5d0cSMars Cheng		#clock-cells = <1>;
245003f5d0cSMars Cheng	};
246003f5d0cSMars Cheng
247003f5d0cSMars Cheng	vencsys: venc_gcon@17000000 {
248003f5d0cSMars Cheng		compatible = "mediatek,mt6797-vencsys", "syscon";
249003f5d0cSMars Cheng		reg = <0 0x17000000 0 0x1000>;
250003f5d0cSMars Cheng		#clock-cells = <1>;
251003f5d0cSMars Cheng	};
252003f5d0cSMars Cheng
253464c510fSMars Cheng	gic: interrupt-controller@19000000 {
254464c510fSMars Cheng		compatible = "arm,gic-v3";
255464c510fSMars Cheng		#interrupt-cells = <3>;
256464c510fSMars Cheng		interrupt-parent = <&gic>;
257464c510fSMars Cheng		interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
258464c510fSMars Cheng		interrupt-controller;
259464c510fSMars Cheng		reg = <0 0x19000000 0 0x10000>,    /* GICD */
260464c510fSMars Cheng		      <0 0x19200000 0 0x200000>,   /* GICR */
261464c510fSMars Cheng		      <0 0x10240000 0 0x2000>;     /* GICC */
262464c510fSMars Cheng	};
263464c510fSMars Cheng};
264