blob: ba46fe5a4a568938b51d3e991bf56d8b0b86da75 [file] [log] [blame]
Eddie Huangb3a37242015-12-01 10:14:00 +01001/*
2 * Copyright (c) 2014 MediaTek Inc.
3 * Author: Eddie Huang <eddie.huang@mediatek.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 */
13
Sascha Hauerf2ce7012015-05-20 15:32:44 +020014#include <dt-bindings/clock/mt8173-clk.h>
Eddie Huangb3a37242015-12-01 10:14:00 +010015#include <dt-bindings/interrupt-controller/irq.h>
16#include <dt-bindings/interrupt-controller/arm-gic.h>
Sascha Hauer6cf15fc2015-05-20 15:32:46 +020017#include <dt-bindings/reset-controller/mt8173-resets.h>
Hongzhou Yang359f9362015-03-09 21:54:39 -070018#include "mt8173-pinfunc.h"
Eddie Huangb3a37242015-12-01 10:14:00 +010019
20/ {
21 compatible = "mediatek,mt8173";
22 interrupt-parent = <&sysirq>;
23 #address-cells = <2>;
24 #size-cells = <2>;
25
26 cpus {
27 #address-cells = <1>;
28 #size-cells = <0>;
29
30 cpu-map {
31 cluster0 {
32 core0 {
33 cpu = <&cpu0>;
34 };
35 core1 {
36 cpu = <&cpu1>;
37 };
38 };
39
40 cluster1 {
41 core0 {
42 cpu = <&cpu2>;
43 };
44 core1 {
45 cpu = <&cpu3>;
46 };
47 };
48 };
49
50 cpu0: cpu@0 {
51 device_type = "cpu";
52 compatible = "arm,cortex-a53";
53 reg = <0x000>;
54 };
55
56 cpu1: cpu@1 {
57 device_type = "cpu";
58 compatible = "arm,cortex-a53";
59 reg = <0x001>;
60 enable-method = "psci";
61 };
62
63 cpu2: cpu@100 {
64 device_type = "cpu";
65 compatible = "arm,cortex-a57";
66 reg = <0x100>;
67 enable-method = "psci";
68 };
69
70 cpu3: cpu@101 {
71 device_type = "cpu";
72 compatible = "arm,cortex-a57";
73 reg = <0x101>;
74 enable-method = "psci";
75 };
76 };
77
78 psci {
79 compatible = "arm,psci";
80 method = "smc";
81 cpu_suspend = <0x84000001>;
82 cpu_off = <0x84000002>;
83 cpu_on = <0x84000003>;
84 };
85
Sascha Hauerf2ce7012015-05-20 15:32:44 +020086 clk26m: oscillator@0 {
87 compatible = "fixed-clock";
88 #clock-cells = <0>;
89 clock-frequency = <26000000>;
90 clock-output-names = "clk26m";
91 };
92
93 clk32k: oscillator@1 {
94 compatible = "fixed-clock";
95 #clock-cells = <0>;
96 clock-frequency = <32000>;
97 clock-output-names = "clk32k";
98 };
99
Eddie Huangb3a37242015-12-01 10:14:00 +0100100 timer {
101 compatible = "arm,armv8-timer";
102 interrupt-parent = <&gic>;
103 interrupts = <GIC_PPI 13
Daniel Kurtze881ad12015-05-20 18:20:07 +0800104 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
Eddie Huangb3a37242015-12-01 10:14:00 +0100105 <GIC_PPI 14
Daniel Kurtze881ad12015-05-20 18:20:07 +0800106 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
Eddie Huangb3a37242015-12-01 10:14:00 +0100107 <GIC_PPI 11
Daniel Kurtze881ad12015-05-20 18:20:07 +0800108 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
Eddie Huangb3a37242015-12-01 10:14:00 +0100109 <GIC_PPI 10
Daniel Kurtze881ad12015-05-20 18:20:07 +0800110 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
Eddie Huangb3a37242015-12-01 10:14:00 +0100111 };
112
113 soc {
114 #address-cells = <2>;
115 #size-cells = <2>;
116 compatible = "simple-bus";
117 ranges;
118
Sascha Hauerf2ce7012015-05-20 15:32:44 +0200119 topckgen: clock-controller@10000000 {
120 compatible = "mediatek,mt8173-topckgen";
121 reg = <0 0x10000000 0 0x1000>;
122 #clock-cells = <1>;
123 };
124
125 infracfg: power-controller@10001000 {
126 compatible = "mediatek,mt8173-infracfg", "syscon";
127 reg = <0 0x10001000 0 0x1000>;
128 #clock-cells = <1>;
129 #reset-cells = <1>;
130 };
131
132 pericfg: power-controller@10003000 {
133 compatible = "mediatek,mt8173-pericfg", "syscon";
134 reg = <0 0x10003000 0 0x1000>;
135 #clock-cells = <1>;
136 #reset-cells = <1>;
137 };
138
139 syscfg_pctl_a: syscfg_pctl_a@10005000 {
140 compatible = "mediatek,mt8173-pctl-a-syscfg", "syscon";
141 reg = <0 0x10005000 0 0x1000>;
142 };
143
144 pio: pinctrl@0x10005000 {
Hongzhou Yang359f9362015-03-09 21:54:39 -0700145 compatible = "mediatek,mt8173-pinctrl";
Yingjoe Chen6769b932015-05-01 14:49:31 +0800146 reg = <0 0x1000b000 0 0x1000>;
Hongzhou Yang359f9362015-03-09 21:54:39 -0700147 mediatek,pctl-regmap = <&syscfg_pctl_a>;
148 pins-are-numbered;
149 gpio-controller;
150 #gpio-cells = <2>;
151 interrupt-controller;
152 #interrupt-cells = <2>;
153 interrupts = <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>,
Yingjoe Chen6769b932015-05-01 14:49:31 +0800154 <GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH>,
155 <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>;
156 };
157
158 syscfg_pctl_a: syscfg_pctl_a@10005000 {
159 compatible = "mediatek,mt8173-pctl-a-syscfg", "syscon";
160 reg = <0 0x10005000 0 0x1000>;
Hongzhou Yang359f9362015-03-09 21:54:39 -0700161 };
162
Sascha Hauer6cf15fc2015-05-20 15:32:46 +0200163 pwrap: pwrap@1000d000 {
164 compatible = "mediatek,mt8173-pwrap";
165 reg = <0 0x1000d000 0 0x1000>;
166 reg-names = "pwrap";
167 interrupts = <GIC_SPI 153 IRQ_TYPE_LEVEL_HIGH>;
168 resets = <&infracfg MT8173_INFRA_PMIC_WRAP_RST>;
169 reset-names = "pwrap";
170 clocks = <&infracfg CLK_INFRA_PMICSPI>, <&infracfg CLK_INFRA_PMICWRAP>;
171 clock-names = "spi", "wrap";
172 };
173
Eddie Huangb3a37242015-12-01 10:14:00 +0100174 sysirq: intpol-controller@10200620 {
175 compatible = "mediatek,mt8173-sysirq",
Daniel Kurtze881ad12015-05-20 18:20:07 +0800176 "mediatek,mt6577-sysirq";
Eddie Huangb3a37242015-12-01 10:14:00 +0100177 interrupt-controller;
178 #interrupt-cells = <3>;
179 interrupt-parent = <&gic>;
180 reg = <0 0x10200620 0 0x20>;
181 };
182
Sascha Hauerf2ce7012015-05-20 15:32:44 +0200183 apmixedsys: clock-controller@10209000 {
184 compatible = "mediatek,mt8173-apmixedsys";
185 reg = <0 0x10209000 0 0x1000>;
186 #clock-cells = <1>;
187 };
188
Eddie Huangb3a37242015-12-01 10:14:00 +0100189 gic: interrupt-controller@10220000 {
190 compatible = "arm,gic-400";
191 #interrupt-cells = <3>;
192 interrupt-parent = <&gic>;
193 interrupt-controller;
194 reg = <0 0x10221000 0 0x1000>,
195 <0 0x10222000 0 0x2000>,
196 <0 0x10224000 0 0x2000>,
197 <0 0x10226000 0 0x2000>;
198 interrupts = <GIC_PPI 9
199 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
200 };
201
202 uart0: serial@11002000 {
203 compatible = "mediatek,mt8173-uart",
Daniel Kurtze881ad12015-05-20 18:20:07 +0800204 "mediatek,mt6577-uart";
Eddie Huangb3a37242015-12-01 10:14:00 +0100205 reg = <0 0x11002000 0 0x400>;
206 interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_LOW>;
Sascha Hauer0e84faa2015-05-20 15:32:45 +0200207 clocks = <&pericfg CLK_PERI_UART0_SEL>, <&pericfg CLK_PERI_UART0>;
208 clock-names = "baud", "bus";
Eddie Huangb3a37242015-12-01 10:14:00 +0100209 status = "disabled";
210 };
211
212 uart1: serial@11003000 {
213 compatible = "mediatek,mt8173-uart",
Daniel Kurtze881ad12015-05-20 18:20:07 +0800214 "mediatek,mt6577-uart";
Eddie Huangb3a37242015-12-01 10:14:00 +0100215 reg = <0 0x11003000 0 0x400>;
216 interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_LOW>;
Sascha Hauer0e84faa2015-05-20 15:32:45 +0200217 clocks = <&pericfg CLK_PERI_UART1_SEL>, <&pericfg CLK_PERI_UART1>;
218 clock-names = "baud", "bus";
Eddie Huangb3a37242015-12-01 10:14:00 +0100219 status = "disabled";
220 };
221
222 uart2: serial@11004000 {
223 compatible = "mediatek,mt8173-uart",
Daniel Kurtze881ad12015-05-20 18:20:07 +0800224 "mediatek,mt6577-uart";
Eddie Huangb3a37242015-12-01 10:14:00 +0100225 reg = <0 0x11004000 0 0x400>;
226 interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_LOW>;
Sascha Hauer0e84faa2015-05-20 15:32:45 +0200227 clocks = <&pericfg CLK_PERI_UART2_SEL>, <&pericfg CLK_PERI_UART2>;
228 clock-names = "baud", "bus";
Eddie Huangb3a37242015-12-01 10:14:00 +0100229 status = "disabled";
230 };
231
232 uart3: serial@11005000 {
233 compatible = "mediatek,mt8173-uart",
Daniel Kurtze881ad12015-05-20 18:20:07 +0800234 "mediatek,mt6577-uart";
Eddie Huangb3a37242015-12-01 10:14:00 +0100235 reg = <0 0x11005000 0 0x400>;
236 interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_LOW>;
Sascha Hauer0e84faa2015-05-20 15:32:45 +0200237 clocks = <&pericfg CLK_PERI_UART3_SEL>, <&pericfg CLK_PERI_UART3>;
238 clock-names = "baud", "bus";
Eddie Huangb3a37242015-12-01 10:14:00 +0100239 status = "disabled";
240 };
241 };
Eddie Huangb3a37242015-12-01 10:14:00 +0100242};
243