blob: 98359f37bf1176a84c0699f80bdf386634ff5886 [file] [log] [blame]
Maxime Ripard8aed3b32013-03-10 16:09:06 +01001/*
2 * Copyright 2013 Maxime Ripard
3 *
4 * Maxime Ripard <maxime.ripard@free-electrons.com>
5 *
Maxime Ripard6c3ba722014-09-02 19:25:26 +02006 * This file is dual-licensed: you can use it either under the terms
7 * of the GPL or the X11 license, at your option. Note that this dual
8 * licensing only applies to this file, and not this project as a
9 * whole.
Maxime Ripard8aed3b32013-03-10 16:09:06 +010010 *
Maxime Ripard5186d832014-10-17 11:38:23 +020011 * a) This file is free software; you can redistribute it and/or
Maxime Ripard6c3ba722014-09-02 19:25:26 +020012 * modify it under the terms of the GNU General Public License as
13 * published by the Free Software Foundation; either version 2 of the
14 * License, or (at your option) any later version.
15 *
Maxime Ripard5186d832014-10-17 11:38:23 +020016 * This file is distributed in the hope that it will be useful,
Maxime Ripard6c3ba722014-09-02 19:25:26 +020017 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
Maxime Ripard6c3ba722014-09-02 19:25:26 +020021 * Or, alternatively,
22 *
23 * b) Permission is hereby granted, free of charge, to any person
24 * obtaining a copy of this software and associated documentation
25 * files (the "Software"), to deal in the Software without
26 * restriction, including without limitation the rights to use,
27 * copy, modify, merge, publish, distribute, sublicense, and/or
28 * sell copies of the Software, and to permit persons to whom the
29 * Software is furnished to do so, subject to the following
30 * conditions:
31 *
32 * The above copyright notice and this permission notice shall be
33 * included in all copies or substantial portions of the Software.
34 *
35 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
36 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
37 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
38 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
39 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
40 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
41 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
42 * OTHER DEALINGS IN THE SOFTWARE.
Maxime Ripard8aed3b32013-03-10 16:09:06 +010043 */
44
Maxime Ripard71455702014-12-16 22:59:54 +010045#include "skeleton.dtsi"
Maxime Ripard8aed3b32013-03-10 16:09:06 +010046
Maxime Ripard19882b82014-12-16 22:59:58 +010047#include <dt-bindings/interrupt-controller/arm-gic.h>
Chen-Yu Tsaieb58b402015-03-26 05:04:49 +080048#include <dt-bindings/thermal/thermal.h>
Maxime Ripard19882b82014-12-16 22:59:58 +010049
Maxime Ripard092a0c32014-12-16 22:59:57 +010050#include <dt-bindings/pinctrl/sun4i-a10.h>
Maxime Ripard8aed3b32013-03-10 16:09:06 +010051
52/ {
53 interrupt-parent = <&gic>;
54
Maxime Ripard54428d42014-01-02 22:05:04 +010055 aliases {
Chen-Yu Tsaie5073fd2014-07-16 01:15:46 +080056 ethernet0 = &gmac;
Maxime Ripard54428d42014-01-02 22:05:04 +010057 };
58
Hans de Goedee53a8b22014-11-14 16:34:36 +010059 chosen {
60 #address-cells = <1>;
61 #size-cells = <1>;
62 ranges;
63
Hans de Goedea9f8cda2014-11-18 12:07:13 +010064 framebuffer@0 {
Maxime Ripardd8cacaa2015-05-03 11:53:07 +020065 compatible = "allwinner,simple-framebuffer",
66 "simple-framebuffer";
Hans de Goedea9f8cda2014-11-18 12:07:13 +010067 allwinner,pipeline = "de_be0-lcd0-hdmi";
Hans de Goede678e75d2014-11-16 17:09:32 +010068 clocks = <&pll6 0>;
Hans de Goedee53a8b22014-11-14 16:34:36 +010069 status = "disabled";
70 };
Hans de Goedefd18c7e2015-01-19 14:05:12 +010071
72 framebuffer@1 {
73 compatible = "allwinner,simple-framebuffer",
74 "simple-framebuffer";
75 allwinner,pipeline = "de_be0-lcd0";
76 clocks = <&pll6 0>;
77 status = "disabled";
78 };
Hans de Goedee53a8b22014-11-14 16:34:36 +010079 };
Maxime Ripard54428d42014-01-02 22:05:04 +010080
Maxime Ripard121b96c2015-01-11 20:33:44 +010081 timer {
82 compatible = "arm,armv7-timer";
83 interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
84 <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
85 <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
86 <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
87 clock-frequency = <24000000>;
88 arm,cpu-registers-not-fw-configured;
Maxime Ripard8aed3b32013-03-10 16:09:06 +010089 };
90
91 cpus {
92 enable-method = "allwinner,sun6i-a31";
93 #address-cells = <1>;
94 #size-cells = <0>;
95
Chen-Yu Tsai3a2bc642015-03-26 05:04:48 +080096 cpu0: cpu@0 {
Maxime Ripard8aed3b32013-03-10 16:09:06 +010097 compatible = "arm,cortex-a7";
98 device_type = "cpu";
99 reg = <0>;
Chen-Yu Tsai3a2bc642015-03-26 05:04:48 +0800100 clocks = <&cpu>;
101 clock-latency = <244144>; /* 8 32k periods */
102 operating-points = <
Maxime Ripard8358aad2015-05-03 11:54:35 +0200103 /* kHz uV */
Chen-Yu Tsai3a2bc642015-03-26 05:04:48 +0800104 1008000 1200000
Maxime Ripard8358aad2015-05-03 11:54:35 +0200105 864000 1200000
106 720000 1100000
107 480000 1000000
Chen-Yu Tsai3a2bc642015-03-26 05:04:48 +0800108 >;
109 #cooling-cells = <2>;
110 cooling-min-level = <0>;
111 cooling-max-level = <3>;
Maxime Ripard8aed3b32013-03-10 16:09:06 +0100112 };
113
114 cpu@1 {
115 compatible = "arm,cortex-a7";
116 device_type = "cpu";
117 reg = <1>;
118 };
119
120 cpu@2 {
121 compatible = "arm,cortex-a7";
122 device_type = "cpu";
123 reg = <2>;
124 };
125
126 cpu@3 {
127 compatible = "arm,cortex-a7";
128 device_type = "cpu";
129 reg = <3>;
130 };
131 };
132
Chen-Yu Tsaieb58b402015-03-26 05:04:49 +0800133 thermal-zones {
134 cpu_thermal {
135 /* milliseconds */
136 polling-delay-passive = <250>;
137 polling-delay = <1000>;
138 thermal-sensors = <&rtp>;
139
140 cooling-maps {
141 map0 {
142 trip = <&cpu_alert0>;
143 cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
144 };
145 };
146
147 trips {
148 cpu_alert0: cpu_alert0 {
149 /* milliCelsius */
150 temperature = <70000>;
151 hysteresis = <2000>;
152 type = "passive";
153 };
154
155 cpu_crit: cpu_crit {
156 /* milliCelsius */
157 temperature = <100000>;
158 hysteresis = <2000>;
159 type = "critical";
160 };
161 };
162 };
163 };
164
Maxime Ripard8aed3b32013-03-10 16:09:06 +0100165 memory {
166 reg = <0x40000000 0x80000000>;
167 };
168
Maxime Ripardb5a10b72014-04-17 21:54:41 +0200169 pmu {
170 compatible = "arm,cortex-a7-pmu", "arm,cortex-a15-pmu";
Maxime Ripard19882b82014-12-16 22:59:58 +0100171 interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>,
172 <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>,
173 <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>,
174 <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>;
Maxime Ripardb5a10b72014-04-17 21:54:41 +0200175 };
176
Maxime Ripard8aed3b32013-03-10 16:09:06 +0100177 clocks {
178 #address-cells = <1>;
Maxime Ripard98096562013-07-23 23:54:19 +0200179 #size-cells = <1>;
180 ranges;
Maxime Ripard8aed3b32013-03-10 16:09:06 +0100181
Maxime Ripard98096562013-07-23 23:54:19 +0200182 osc24M: osc24M {
Maxime Ripard8aed3b32013-03-10 16:09:06 +0100183 #clock-cells = <0>;
184 compatible = "fixed-clock";
185 clock-frequency = <24000000>;
186 };
Maxime Ripard98096562013-07-23 23:54:19 +0200187
Chen-Yu Tsai7b5b2902014-02-03 09:51:43 +0800188 osc32k: clk@0 {
Maxime Ripard98096562013-07-23 23:54:19 +0200189 #clock-cells = <0>;
190 compatible = "fixed-clock";
191 clock-frequency = <32768>;
Chen-Yu Tsai7b5b2902014-02-03 09:51:43 +0800192 clock-output-names = "osc32k";
Maxime Ripard98096562013-07-23 23:54:19 +0200193 };
194
Chen-Yu Tsai7b5b2902014-02-03 09:51:43 +0800195 pll1: clk@01c20000 {
Maxime Ripard98096562013-07-23 23:54:19 +0200196 #clock-cells = <0>;
197 compatible = "allwinner,sun6i-a31-pll1-clk";
198 reg = <0x01c20000 0x4>;
199 clocks = <&osc24M>;
Chen-Yu Tsai7b5b2902014-02-03 09:51:43 +0800200 clock-output-names = "pll1";
Maxime Ripard98096562013-07-23 23:54:19 +0200201 };
202
Maxime Ripardb0a09c72014-02-05 14:05:04 +0100203 pll6: clk@01c20028 {
Chen-Yu Tsaif6c3b042014-11-13 02:08:32 +0800204 #clock-cells = <1>;
Maxime Ripardb0a09c72014-02-05 14:05:04 +0100205 compatible = "allwinner,sun6i-a31-pll6-clk";
206 reg = <0x01c20028 0x4>;
207 clocks = <&osc24M>;
Chen-Yu Tsaif6c3b042014-11-13 02:08:32 +0800208 clock-output-names = "pll6", "pll6x2";
Maxime Ripard98096562013-07-23 23:54:19 +0200209 };
210
211 cpu: cpu@01c20050 {
212 #clock-cells = <0>;
Maxime Ripardbf6534a2014-02-06 09:55:58 +0100213 compatible = "allwinner,sun4i-a10-cpu-clk";
Maxime Ripard98096562013-07-23 23:54:19 +0200214 reg = <0x01c20050 0x4>;
215
216 /*
217 * PLL1 is listed twice here.
218 * While it looks suspicious, it's actually documented
219 * that way both in the datasheet and in the code from
220 * Allwinner.
221 */
222 clocks = <&osc32k>, <&osc24M>, <&pll1>, <&pll1>;
Chen-Yu Tsai7b5b2902014-02-03 09:51:43 +0800223 clock-output-names = "cpu";
Maxime Ripard98096562013-07-23 23:54:19 +0200224 };
225
226 axi: axi@01c20050 {
227 #clock-cells = <0>;
Maxime Ripardbf6534a2014-02-06 09:55:58 +0100228 compatible = "allwinner,sun4i-a10-axi-clk";
Maxime Ripard98096562013-07-23 23:54:19 +0200229 reg = <0x01c20050 0x4>;
230 clocks = <&cpu>;
Chen-Yu Tsai7b5b2902014-02-03 09:51:43 +0800231 clock-output-names = "axi";
Maxime Ripard98096562013-07-23 23:54:19 +0200232 };
233
Maxime Ripard98096562013-07-23 23:54:19 +0200234 ahb1: ahb1@01c20054 {
235 #clock-cells = <0>;
Chen-Yu Tsai42cc7132014-11-26 15:16:53 +0800236 compatible = "allwinner,sun6i-a31-ahb1-clk";
Maxime Ripard98096562013-07-23 23:54:19 +0200237 reg = <0x01c20054 0x4>;
Chen-Yu Tsai42cc7132014-11-26 15:16:53 +0800238 clocks = <&osc32k>, <&osc24M>, <&axi>, <&pll6 0>;
Chen-Yu Tsai7b5b2902014-02-03 09:51:43 +0800239 clock-output-names = "ahb1";
Chen-Yu Tsaif22fe1c2015-03-26 05:04:47 +0800240
241 /*
242 * Clock AHB1 from PLL6, instead of CPU/AXI which
243 * has rate changes due to cpufreq. Also the DMA
244 * controller requires AHB1 clocked from PLL6.
245 */
246 assigned-clocks = <&ahb1>;
247 assigned-clock-parents = <&pll6 0>;
Maxime Ripard98096562013-07-23 23:54:19 +0200248 };
249
Chen-Yu Tsai7b5b2902014-02-03 09:51:43 +0800250 ahb1_gates: clk@01c20060 {
Maxime Ripard98096562013-07-23 23:54:19 +0200251 #clock-cells = <1>;
252 compatible = "allwinner,sun6i-a31-ahb1-gates-clk";
253 reg = <0x01c20060 0x8>;
254 clocks = <&ahb1>;
Maxime Riparddbbb6922015-07-31 19:46:18 +0200255 clock-indices = <1>, <5>,
256 <6>, <8>, <9>,
257 <10>, <11>, <12>,
258 <13>, <14>,
259 <17>, <18>, <19>,
260 <20>, <21>, <22>,
261 <23>, <24>, <26>,
262 <27>, <29>,
263 <30>, <31>, <32>,
264 <36>, <37>, <40>,
265 <43>, <44>, <45>,
266 <46>, <47>, <50>,
267 <52>, <55>, <56>,
268 <57>, <58>;
Maxime Ripard98096562013-07-23 23:54:19 +0200269 clock-output-names = "ahb1_mipidsi", "ahb1_ss",
270 "ahb1_dma", "ahb1_mmc0", "ahb1_mmc1",
271 "ahb1_mmc2", "ahb1_mmc3", "ahb1_nand1",
272 "ahb1_nand0", "ahb1_sdram",
273 "ahb1_gmac", "ahb1_ts", "ahb1_hstimer",
274 "ahb1_spi0", "ahb1_spi1", "ahb1_spi2",
275 "ahb1_spi3", "ahb1_otg", "ahb1_ehci0",
276 "ahb1_ehci1", "ahb1_ohci0",
277 "ahb1_ohci1", "ahb1_ohci2", "ahb1_ve",
278 "ahb1_lcd0", "ahb1_lcd1", "ahb1_csi",
279 "ahb1_hdmi", "ahb1_de0", "ahb1_de1",
280 "ahb1_fe0", "ahb1_fe1", "ahb1_mp",
281 "ahb1_gpu", "ahb1_deu0", "ahb1_deu1",
282 "ahb1_drc0", "ahb1_drc1";
283 };
284
285 apb1: apb1@01c20054 {
286 #clock-cells = <0>;
Maxime Ripardbf6534a2014-02-06 09:55:58 +0100287 compatible = "allwinner,sun4i-a10-apb0-clk";
Maxime Ripard98096562013-07-23 23:54:19 +0200288 reg = <0x01c20054 0x4>;
289 clocks = <&ahb1>;
Chen-Yu Tsai7b5b2902014-02-03 09:51:43 +0800290 clock-output-names = "apb1";
Maxime Ripard98096562013-07-23 23:54:19 +0200291 };
292
Chen-Yu Tsai7b5b2902014-02-03 09:51:43 +0800293 apb1_gates: clk@01c20068 {
Maxime Ripard98096562013-07-23 23:54:19 +0200294 #clock-cells = <1>;
295 compatible = "allwinner,sun6i-a31-apb1-gates-clk";
296 reg = <0x01c20068 0x4>;
297 clocks = <&apb1>;
Maxime Riparddbbb6922015-07-31 19:46:18 +0200298 clock-indices = <0>, <4>,
299 <5>, <12>,
300 <13>;
Maxime Ripard98096562013-07-23 23:54:19 +0200301 clock-output-names = "apb1_codec", "apb1_digital_mic",
302 "apb1_pio", "apb1_daudio0",
303 "apb1_daudio1";
304 };
305
Chen-Yu Tsai74c947a2014-11-06 11:40:31 +0800306 apb2: clk@01c20058 {
Maxime Ripard98096562013-07-23 23:54:19 +0200307 #clock-cells = <0>;
Chen-Yu Tsai74c947a2014-11-06 11:40:31 +0800308 compatible = "allwinner,sun4i-a10-apb1-clk";
Maxime Ripard98096562013-07-23 23:54:19 +0200309 reg = <0x01c20058 0x4>;
Chen-Yu Tsaif6c3b042014-11-13 02:08:32 +0800310 clocks = <&osc32k>, <&osc24M>, <&pll6 0>, <&pll6 0>;
Chen-Yu Tsai7b5b2902014-02-03 09:51:43 +0800311 clock-output-names = "apb2";
Maxime Ripard98096562013-07-23 23:54:19 +0200312 };
313
Chen-Yu Tsai7b5b2902014-02-03 09:51:43 +0800314 apb2_gates: clk@01c2006c {
Maxime Ripard98096562013-07-23 23:54:19 +0200315 #clock-cells = <1>;
316 compatible = "allwinner,sun6i-a31-apb2-gates-clk";
Maxime Ripard439d9f52013-09-24 16:30:05 +0300317 reg = <0x01c2006c 0x4>;
Maxime Ripard98096562013-07-23 23:54:19 +0200318 clocks = <&apb2>;
Maxime Riparddbbb6922015-07-31 19:46:18 +0200319 clock-indices = <0>, <1>,
320 <2>, <3>, <16>,
321 <17>, <18>, <19>,
322 <20>, <21>;
Maxime Ripard98096562013-07-23 23:54:19 +0200323 clock-output-names = "apb2_i2c0", "apb2_i2c1",
Maxime Ripardd8cacaa2015-05-03 11:53:07 +0200324 "apb2_i2c2", "apb2_i2c3",
325 "apb2_uart0", "apb2_uart1",
326 "apb2_uart2", "apb2_uart3",
327 "apb2_uart4", "apb2_uart5";
Maxime Ripard98096562013-07-23 23:54:19 +0200328 };
Maxime Ripardb0a09c72014-02-05 14:05:04 +0100329
Hans de Goedeadc54c82014-05-02 17:57:23 +0200330 mmc0_clk: clk@01c20088 {
Maxime Ripardd8c3a392014-07-11 19:39:06 +0200331 #clock-cells = <1>;
332 compatible = "allwinner,sun4i-a10-mmc-clk";
Hans de Goedeadc54c82014-05-02 17:57:23 +0200333 reg = <0x01c20088 0x4>;
Chen-Yu Tsaif6c3b042014-11-13 02:08:32 +0800334 clocks = <&osc24M>, <&pll6 0>;
Maxime Ripardd8c3a392014-07-11 19:39:06 +0200335 clock-output-names = "mmc0",
336 "mmc0_output",
337 "mmc0_sample";
Hans de Goedeadc54c82014-05-02 17:57:23 +0200338 };
339
340 mmc1_clk: clk@01c2008c {
Maxime Ripardd8c3a392014-07-11 19:39:06 +0200341 #clock-cells = <1>;
342 compatible = "allwinner,sun4i-a10-mmc-clk";
Hans de Goedeadc54c82014-05-02 17:57:23 +0200343 reg = <0x01c2008c 0x4>;
Chen-Yu Tsaif6c3b042014-11-13 02:08:32 +0800344 clocks = <&osc24M>, <&pll6 0>;
Maxime Ripardd8c3a392014-07-11 19:39:06 +0200345 clock-output-names = "mmc1",
346 "mmc1_output",
347 "mmc1_sample";
Hans de Goedeadc54c82014-05-02 17:57:23 +0200348 };
349
350 mmc2_clk: clk@01c20090 {
Maxime Ripardd8c3a392014-07-11 19:39:06 +0200351 #clock-cells = <1>;
352 compatible = "allwinner,sun4i-a10-mmc-clk";
Hans de Goedeadc54c82014-05-02 17:57:23 +0200353 reg = <0x01c20090 0x4>;
Chen-Yu Tsaif6c3b042014-11-13 02:08:32 +0800354 clocks = <&osc24M>, <&pll6 0>;
Maxime Ripardd8c3a392014-07-11 19:39:06 +0200355 clock-output-names = "mmc2",
356 "mmc2_output",
357 "mmc2_sample";
Hans de Goedeadc54c82014-05-02 17:57:23 +0200358 };
359
360 mmc3_clk: clk@01c20094 {
Maxime Ripardd8c3a392014-07-11 19:39:06 +0200361 #clock-cells = <1>;
362 compatible = "allwinner,sun4i-a10-mmc-clk";
Hans de Goedeadc54c82014-05-02 17:57:23 +0200363 reg = <0x01c20094 0x4>;
Chen-Yu Tsaif6c3b042014-11-13 02:08:32 +0800364 clocks = <&osc24M>, <&pll6 0>;
Maxime Ripardd8c3a392014-07-11 19:39:06 +0200365 clock-output-names = "mmc3",
366 "mmc3_output",
367 "mmc3_sample";
Hans de Goedeadc54c82014-05-02 17:57:23 +0200368 };
369
Chen-Yu Tsai14fee742015-08-11 13:32:57 +0800370 ss_clk: clk@01c2009c {
371 #clock-cells = <0>;
372 compatible = "allwinner,sun4i-a10-mod0-clk";
373 reg = <0x01c2009c 0x4>;
374 clocks = <&osc24M>, <&pll6 0>;
375 clock-output-names = "ss";
376 };
377
Maxime Ripardb0a09c72014-02-05 14:05:04 +0100378 spi0_clk: clk@01c200a0 {
379 #clock-cells = <0>;
Maxime Ripard225b0212014-02-24 17:29:06 +0100380 compatible = "allwinner,sun4i-a10-mod0-clk";
Maxime Ripardb0a09c72014-02-05 14:05:04 +0100381 reg = <0x01c200a0 0x4>;
Chen-Yu Tsaif6c3b042014-11-13 02:08:32 +0800382 clocks = <&osc24M>, <&pll6 0>;
Maxime Ripardb0a09c72014-02-05 14:05:04 +0100383 clock-output-names = "spi0";
384 };
385
386 spi1_clk: clk@01c200a4 {
387 #clock-cells = <0>;
Maxime Ripard225b0212014-02-24 17:29:06 +0100388 compatible = "allwinner,sun4i-a10-mod0-clk";
Maxime Ripardb0a09c72014-02-05 14:05:04 +0100389 reg = <0x01c200a4 0x4>;
Chen-Yu Tsaif6c3b042014-11-13 02:08:32 +0800390 clocks = <&osc24M>, <&pll6 0>;
Maxime Ripardb0a09c72014-02-05 14:05:04 +0100391 clock-output-names = "spi1";
392 };
393
394 spi2_clk: clk@01c200a8 {
395 #clock-cells = <0>;
Maxime Ripard225b0212014-02-24 17:29:06 +0100396 compatible = "allwinner,sun4i-a10-mod0-clk";
Maxime Ripardb0a09c72014-02-05 14:05:04 +0100397 reg = <0x01c200a8 0x4>;
Chen-Yu Tsaif6c3b042014-11-13 02:08:32 +0800398 clocks = <&osc24M>, <&pll6 0>;
Maxime Ripardb0a09c72014-02-05 14:05:04 +0100399 clock-output-names = "spi2";
400 };
401
402 spi3_clk: clk@01c200ac {
403 #clock-cells = <0>;
Maxime Ripard225b0212014-02-24 17:29:06 +0100404 compatible = "allwinner,sun4i-a10-mod0-clk";
Maxime Ripardb0a09c72014-02-05 14:05:04 +0100405 reg = <0x01c200ac 0x4>;
Chen-Yu Tsaif6c3b042014-11-13 02:08:32 +0800406 clocks = <&osc24M>, <&pll6 0>;
Maxime Ripardb0a09c72014-02-05 14:05:04 +0100407 clock-output-names = "spi3";
408 };
Maxime Ripard94a1cd12014-05-13 17:44:16 +0200409
410 usb_clk: clk@01c200cc {
411 #clock-cells = <1>;
Maxime Ripard8358aad2015-05-03 11:54:35 +0200412 #reset-cells = <1>;
Maxime Ripard94a1cd12014-05-13 17:44:16 +0200413 compatible = "allwinner,sun6i-a31-usb-clk";
414 reg = <0x01c200cc 0x4>;
415 clocks = <&osc24M>;
Maxime Riparddbbb6922015-07-31 19:46:18 +0200416 clock-indices = <8>, <9>, <10>,
417 <16>, <17>,
418 <18>;
Maxime Ripard94a1cd12014-05-13 17:44:16 +0200419 clock-output-names = "usb_phy0", "usb_phy1", "usb_phy2",
420 "usb_ohci0", "usb_ohci1",
421 "usb_ohci2";
422 };
Chen-Yu Tsaied298612014-07-16 01:15:44 +0800423
424 /*
Maxime Ripardd8cacaa2015-05-03 11:53:07 +0200425 * The following two are dummy clocks, placeholders
426 * used in the gmac_tx clock. The gmac driver will
427 * choose one parent depending on the PHY interface
428 * mode, using clk_set_rate auto-reparenting.
429 *
430 * The actual TX clock rate is not controlled by the
431 * gmac_tx clock.
Chen-Yu Tsaied298612014-07-16 01:15:44 +0800432 */
433 mii_phy_tx_clk: clk@1 {
434 #clock-cells = <0>;
435 compatible = "fixed-clock";
436 clock-frequency = <25000000>;
437 clock-output-names = "mii_phy_tx";
438 };
439
440 gmac_int_tx_clk: clk@2 {
441 #clock-cells = <0>;
442 compatible = "fixed-clock";
443 clock-frequency = <125000000>;
444 clock-output-names = "gmac_int_tx";
445 };
446
447 gmac_tx_clk: clk@01c200d0 {
448 #clock-cells = <0>;
449 compatible = "allwinner,sun7i-a20-gmac-clk";
450 reg = <0x01c200d0 0x4>;
451 clocks = <&mii_phy_tx_clk>, <&gmac_int_tx_clk>;
452 clock-output-names = "gmac_tx";
453 };
Maxime Ripard8aed3b32013-03-10 16:09:06 +0100454 };
455
456 soc@01c00000 {
457 compatible = "simple-bus";
458 #address-cells = <1>;
459 #size-cells = <1>;
460 ranges;
461
Maxime Ripardd2d878c2014-01-30 15:41:23 +0100462 dma: dma-controller@01c02000 {
463 compatible = "allwinner,sun6i-a31-dma";
464 reg = <0x01c02000 0x1000>;
Maxime Ripard19882b82014-12-16 22:59:58 +0100465 interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
Maxime Ripardd2d878c2014-01-30 15:41:23 +0100466 clocks = <&ahb1_gates 6>;
467 resets = <&ahb1_rst 6>;
468 #dma-cells = <1>;
469 };
470
Hans de Goede5b753f02014-05-02 17:57:24 +0200471 mmc0: mmc@01c0f000 {
472 compatible = "allwinner,sun5i-a13-mmc";
473 reg = <0x01c0f000 0x1000>;
Maxime Ripardd8c3a392014-07-11 19:39:06 +0200474 clocks = <&ahb1_gates 8>,
475 <&mmc0_clk 0>,
476 <&mmc0_clk 1>,
477 <&mmc0_clk 2>;
478 clock-names = "ahb",
479 "mmc",
480 "output",
481 "sample";
Hans de Goede5b753f02014-05-02 17:57:24 +0200482 resets = <&ahb1_rst 8>;
483 reset-names = "ahb";
Maxime Ripard19882b82014-12-16 22:59:58 +0100484 interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
Hans de Goede5b753f02014-05-02 17:57:24 +0200485 status = "disabled";
Hans de Goede4c1bb9c2015-03-10 16:27:09 +0100486 #address-cells = <1>;
487 #size-cells = <0>;
Hans de Goede5b753f02014-05-02 17:57:24 +0200488 };
489
490 mmc1: mmc@01c10000 {
491 compatible = "allwinner,sun5i-a13-mmc";
492 reg = <0x01c10000 0x1000>;
Maxime Ripardd8c3a392014-07-11 19:39:06 +0200493 clocks = <&ahb1_gates 9>,
494 <&mmc1_clk 0>,
495 <&mmc1_clk 1>,
496 <&mmc1_clk 2>;
497 clock-names = "ahb",
498 "mmc",
499 "output",
500 "sample";
Hans de Goede5b753f02014-05-02 17:57:24 +0200501 resets = <&ahb1_rst 9>;
502 reset-names = "ahb";
Maxime Ripard19882b82014-12-16 22:59:58 +0100503 interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
Hans de Goede5b753f02014-05-02 17:57:24 +0200504 status = "disabled";
Hans de Goede4c1bb9c2015-03-10 16:27:09 +0100505 #address-cells = <1>;
506 #size-cells = <0>;
Hans de Goede5b753f02014-05-02 17:57:24 +0200507 };
508
509 mmc2: mmc@01c11000 {
510 compatible = "allwinner,sun5i-a13-mmc";
511 reg = <0x01c11000 0x1000>;
Maxime Ripardd8c3a392014-07-11 19:39:06 +0200512 clocks = <&ahb1_gates 10>,
513 <&mmc2_clk 0>,
514 <&mmc2_clk 1>,
515 <&mmc2_clk 2>;
516 clock-names = "ahb",
517 "mmc",
518 "output",
519 "sample";
Hans de Goede5b753f02014-05-02 17:57:24 +0200520 resets = <&ahb1_rst 10>;
521 reset-names = "ahb";
Maxime Ripard19882b82014-12-16 22:59:58 +0100522 interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
Hans de Goede5b753f02014-05-02 17:57:24 +0200523 status = "disabled";
Hans de Goede4c1bb9c2015-03-10 16:27:09 +0100524 #address-cells = <1>;
525 #size-cells = <0>;
Hans de Goede5b753f02014-05-02 17:57:24 +0200526 };
527
528 mmc3: mmc@01c12000 {
529 compatible = "allwinner,sun5i-a13-mmc";
530 reg = <0x01c12000 0x1000>;
Maxime Ripardd8c3a392014-07-11 19:39:06 +0200531 clocks = <&ahb1_gates 11>,
532 <&mmc3_clk 0>,
533 <&mmc3_clk 1>,
534 <&mmc3_clk 2>;
535 clock-names = "ahb",
536 "mmc",
537 "output",
538 "sample";
Hans de Goede5b753f02014-05-02 17:57:24 +0200539 resets = <&ahb1_rst 11>;
540 reset-names = "ahb";
Maxime Ripard19882b82014-12-16 22:59:58 +0100541 interrupts = <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>;
Hans de Goede5b753f02014-05-02 17:57:24 +0200542 status = "disabled";
Hans de Goede4c1bb9c2015-03-10 16:27:09 +0100543 #address-cells = <1>;
544 #size-cells = <0>;
Hans de Goede5b753f02014-05-02 17:57:24 +0200545 };
546
Hans de Goeded208eaf2015-06-01 13:29:49 +0200547 usb_otg: usb@01c19000 {
548 compatible = "allwinner,sun6i-a31-musb";
549 reg = <0x01c19000 0x0400>;
550 clocks = <&ahb1_gates 24>;
551 resets = <&ahb1_rst 24>;
552 interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
553 interrupt-names = "mc";
554 phys = <&usbphy 0>;
555 phy-names = "usb";
556 extcon = <&usbphy 0>;
557 status = "disabled";
558 };
559
Maxime Ripardef964082014-05-13 17:44:21 +0200560 usbphy: phy@01c19400 {
561 compatible = "allwinner,sun6i-a31-usb-phy";
562 reg = <0x01c19400 0x10>,
563 <0x01c1a800 0x4>,
564 <0x01c1b800 0x4>;
565 reg-names = "phy_ctrl",
566 "pmu1",
567 "pmu2";
568 clocks = <&usb_clk 8>,
569 <&usb_clk 9>,
570 <&usb_clk 10>;
571 clock-names = "usb0_phy",
572 "usb1_phy",
573 "usb2_phy";
574 resets = <&usb_clk 0>,
575 <&usb_clk 1>,
576 <&usb_clk 2>;
577 reset-names = "usb0_reset",
578 "usb1_reset",
579 "usb2_reset";
580 status = "disabled";
581 #phy-cells = <1>;
582 };
583
584 ehci0: usb@01c1a000 {
585 compatible = "allwinner,sun6i-a31-ehci", "generic-ehci";
586 reg = <0x01c1a000 0x100>;
Maxime Ripard19882b82014-12-16 22:59:58 +0100587 interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
Maxime Ripardef964082014-05-13 17:44:21 +0200588 clocks = <&ahb1_gates 26>;
589 resets = <&ahb1_rst 26>;
590 phys = <&usbphy 1>;
591 phy-names = "usb";
592 status = "disabled";
593 };
594
595 ohci0: usb@01c1a400 {
596 compatible = "allwinner,sun6i-a31-ohci", "generic-ohci";
597 reg = <0x01c1a400 0x100>;
Maxime Ripard19882b82014-12-16 22:59:58 +0100598 interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
Maxime Ripardef964082014-05-13 17:44:21 +0200599 clocks = <&ahb1_gates 29>, <&usb_clk 16>;
600 resets = <&ahb1_rst 29>;
601 phys = <&usbphy 1>;
602 phy-names = "usb";
603 status = "disabled";
604 };
605
606 ehci1: usb@01c1b000 {
607 compatible = "allwinner,sun6i-a31-ehci", "generic-ehci";
608 reg = <0x01c1b000 0x100>;
Maxime Ripard19882b82014-12-16 22:59:58 +0100609 interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
Maxime Ripardef964082014-05-13 17:44:21 +0200610 clocks = <&ahb1_gates 27>;
611 resets = <&ahb1_rst 27>;
612 phys = <&usbphy 2>;
613 phy-names = "usb";
614 status = "disabled";
615 };
616
617 ohci1: usb@01c1b400 {
618 compatible = "allwinner,sun6i-a31-ohci", "generic-ohci";
619 reg = <0x01c1b400 0x100>;
Maxime Ripard19882b82014-12-16 22:59:58 +0100620 interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
Maxime Ripardef964082014-05-13 17:44:21 +0200621 clocks = <&ahb1_gates 30>, <&usb_clk 17>;
622 resets = <&ahb1_rst 30>;
623 phys = <&usbphy 2>;
624 phy-names = "usb";
625 status = "disabled";
626 };
627
Maxime Ripardb294ebb2014-05-20 13:59:58 +0200628 ohci2: usb@01c1c400 {
Maxime Ripardef964082014-05-13 17:44:21 +0200629 compatible = "allwinner,sun6i-a31-ohci", "generic-ohci";
630 reg = <0x01c1c400 0x100>;
Maxime Ripard19882b82014-12-16 22:59:58 +0100631 interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
Maxime Ripardef964082014-05-13 17:44:21 +0200632 clocks = <&ahb1_gates 31>, <&usb_clk 18>;
633 resets = <&ahb1_rst 31>;
634 status = "disabled";
635 };
636
Maxime Ripard140e1722013-03-12 22:16:05 +0100637 pio: pinctrl@01c20800 {
638 compatible = "allwinner,sun6i-a31-pinctrl";
639 reg = <0x01c20800 0x400>;
Maxime Ripard19882b82014-12-16 22:59:58 +0100640 interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>,
641 <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>,
642 <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>,
643 <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
Maxime Ripard98096562013-07-23 23:54:19 +0200644 clocks = <&apb1_gates 5>;
Maxime Ripard140e1722013-03-12 22:16:05 +0100645 gpio-controller;
646 interrupt-controller;
Maxime Ripardb03e0812015-06-17 11:44:24 +0200647 #interrupt-cells = <3>;
Maxime Ripard140e1722013-03-12 22:16:05 +0100648 #gpio-cells = <3>;
Maxime Ripardab4238c2013-06-22 23:56:40 +0200649
650 uart0_pins_a: uart0@0 {
651 allwinner,pins = "PH20", "PH21";
652 allwinner,function = "uart0";
Maxime Ripard092a0c32014-12-16 22:59:57 +0100653 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
654 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
Maxime Ripardab4238c2013-06-22 23:56:40 +0200655 };
Maxime Ripard8be188b2014-03-04 17:28:40 +0100656
657 i2c0_pins_a: i2c0@0 {
658 allwinner,pins = "PH14", "PH15";
659 allwinner,function = "i2c0";
Maxime Ripard092a0c32014-12-16 22:59:57 +0100660 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
661 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
Maxime Ripard8be188b2014-03-04 17:28:40 +0100662 };
663
664 i2c1_pins_a: i2c1@0 {
665 allwinner,pins = "PH16", "PH17";
666 allwinner,function = "i2c1";
Maxime Ripard092a0c32014-12-16 22:59:57 +0100667 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
668 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
Maxime Ripard8be188b2014-03-04 17:28:40 +0100669 };
670
671 i2c2_pins_a: i2c2@0 {
672 allwinner,pins = "PH18", "PH19";
673 allwinner,function = "i2c2";
Maxime Ripard092a0c32014-12-16 22:59:57 +0100674 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
675 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
Maxime Ripard8be188b2014-03-04 17:28:40 +0100676 };
Hans de Goede9797eb82014-04-26 12:16:16 +0200677
678 mmc0_pins_a: mmc0@0 {
Maxime Ripardd8cacaa2015-05-03 11:53:07 +0200679 allwinner,pins = "PF0", "PF1", "PF2",
680 "PF3", "PF4", "PF5";
Hans de Goede9797eb82014-04-26 12:16:16 +0200681 allwinner,function = "mmc0";
Maxime Ripard092a0c32014-12-16 22:59:57 +0100682 allwinner,drive = <SUN4I_PINCTRL_30_MA>;
683 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
Hans de Goede9797eb82014-04-26 12:16:16 +0200684 };
Chen-Yu Tsaiee39a3e2014-07-16 01:15:43 +0800685
Chen-Yu Tsai878c4de2015-03-10 19:59:22 +0800686 mmc1_pins_a: mmc1@0 {
687 allwinner,pins = "PG0", "PG1", "PG2", "PG3",
688 "PG4", "PG5";
689 allwinner,function = "mmc1";
690 allwinner,drive = <SUN4I_PINCTRL_30_MA>;
691 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
692 };
693
Chen-Yu Tsai4917c462015-08-28 17:54:37 +0800694 mmc2_8bit_emmc_pins: mmc2@0 {
695 allwinner,pins = "PC6", "PC7", "PC8", "PC9",
696 "PC10", "PC11", "PC12",
697 "PC13", "PC14", "PC15",
698 "PC24";
699 allwinner,function = "mmc2";
700 allwinner,drive = <SUN4I_PINCTRL_30_MA>;
701 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
702 };
703
Chen-Yu Tsaiee39a3e2014-07-16 01:15:43 +0800704 gmac_pins_mii_a: gmac_mii@0 {
705 allwinner,pins = "PA0", "PA1", "PA2", "PA3",
706 "PA8", "PA9", "PA11",
707 "PA12", "PA13", "PA14", "PA19",
708 "PA20", "PA21", "PA22", "PA23",
709 "PA24", "PA26", "PA27";
710 allwinner,function = "gmac";
Maxime Ripard092a0c32014-12-16 22:59:57 +0100711 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
712 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
Chen-Yu Tsaiee39a3e2014-07-16 01:15:43 +0800713 };
714
715 gmac_pins_gmii_a: gmac_gmii@0 {
716 allwinner,pins = "PA0", "PA1", "PA2", "PA3",
717 "PA4", "PA5", "PA6", "PA7",
718 "PA8", "PA9", "PA10", "PA11",
719 "PA12", "PA13", "PA14", "PA15",
720 "PA16", "PA17", "PA18", "PA19",
721 "PA20", "PA21", "PA22", "PA23",
722 "PA24", "PA25", "PA26", "PA27";
723 allwinner,function = "gmac";
724 /*
725 * data lines in GMII mode run at 125MHz and
726 * might need a higher signal drive strength
727 */
Maxime Ripard092a0c32014-12-16 22:59:57 +0100728 allwinner,drive = <SUN4I_PINCTRL_30_MA>;
729 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
Chen-Yu Tsaiee39a3e2014-07-16 01:15:43 +0800730 };
731
732 gmac_pins_rgmii_a: gmac_rgmii@0 {
733 allwinner,pins = "PA0", "PA1", "PA2", "PA3",
734 "PA9", "PA10", "PA11",
735 "PA12", "PA13", "PA14", "PA19",
736 "PA20", "PA25", "PA26", "PA27";
737 allwinner,function = "gmac";
738 /*
739 * data lines in RGMII mode use DDR mode
740 * and need a higher signal drive strength
741 */
Maxime Ripard092a0c32014-12-16 22:59:57 +0100742 allwinner,drive = <SUN4I_PINCTRL_40_MA>;
743 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
Chen-Yu Tsaiee39a3e2014-07-16 01:15:43 +0800744 };
Maxime Ripard140e1722013-03-12 22:16:05 +0100745 };
746
Maxime Ripard24a661e92013-09-24 11:10:41 +0300747 ahb1_rst: reset@01c202c0 {
748 #reset-cells = <1>;
749 compatible = "allwinner,sun6i-a31-ahb1-reset";
750 reg = <0x01c202c0 0xc>;
751 };
752
753 apb1_rst: reset@01c202d0 {
754 #reset-cells = <1>;
755 compatible = "allwinner,sun6i-a31-clock-reset";
756 reg = <0x01c202d0 0x4>;
757 };
758
759 apb2_rst: reset@01c202d8 {
760 #reset-cells = <1>;
761 compatible = "allwinner,sun6i-a31-clock-reset";
762 reg = <0x01c202d8 0x4>;
763 };
764
Maxime Ripard8aed3b32013-03-10 16:09:06 +0100765 timer@01c20c00 {
Maxime Ripardb4f26442014-02-06 10:40:32 +0100766 compatible = "allwinner,sun4i-a10-timer";
Maxime Ripard8aed3b32013-03-10 16:09:06 +0100767 reg = <0x01c20c00 0xa0>;
Maxime Ripard19882b82014-12-16 22:59:58 +0100768 interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>,
769 <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>,
770 <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>,
771 <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>,
772 <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
Maxime Ripard98096562013-07-23 23:54:19 +0200773 clocks = <&osc24M>;
Maxime Ripard8aed3b32013-03-10 16:09:06 +0100774 };
775
776 wdt1: watchdog@01c20ca0 {
Maxime Ripardca5d04d2014-02-07 22:29:26 +0100777 compatible = "allwinner,sun6i-a31-wdt";
Maxime Ripard8aed3b32013-03-10 16:09:06 +0100778 reg = <0x01c20ca0 0x20>;
779 };
780
Chen-Yu Tsai61d25952015-08-28 17:54:34 +0800781 lradc: lradc@01c22800 {
782 compatible = "allwinner,sun4i-a10-lradc-keys";
783 reg = <0x01c22800 0x100>;
784 interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
785 status = "disabled";
786 };
787
Chen-Yu Tsai4ec45cd2015-01-24 22:33:48 +0800788 rtp: rtp@01c25000 {
789 compatible = "allwinner,sun6i-a31-ts";
790 reg = <0x01c25000 0x100>;
791 interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
792 #thermal-sensor-cells = <0>;
793 };
794
Maxime Ripard8aed3b32013-03-10 16:09:06 +0100795 uart0: serial@01c28000 {
796 compatible = "snps,dw-apb-uart";
797 reg = <0x01c28000 0x400>;
Maxime Ripard19882b82014-12-16 22:59:58 +0100798 interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
Maxime Ripard8aed3b32013-03-10 16:09:06 +0100799 reg-shift = <2>;
800 reg-io-width = <4>;
Maxime Ripard98096562013-07-23 23:54:19 +0200801 clocks = <&apb2_gates 16>;
Maxime Ripard24a661e92013-09-24 11:10:41 +0300802 resets = <&apb2_rst 16>;
Maxime Ripardd2d878c2014-01-30 15:41:23 +0100803 dmas = <&dma 6>, <&dma 6>;
804 dma-names = "rx", "tx";
Maxime Ripard8aed3b32013-03-10 16:09:06 +0100805 status = "disabled";
806 };
807
808 uart1: serial@01c28400 {
809 compatible = "snps,dw-apb-uart";
810 reg = <0x01c28400 0x400>;
Maxime Ripard19882b82014-12-16 22:59:58 +0100811 interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
Maxime Ripard8aed3b32013-03-10 16:09:06 +0100812 reg-shift = <2>;
813 reg-io-width = <4>;
Maxime Ripard98096562013-07-23 23:54:19 +0200814 clocks = <&apb2_gates 17>;
Maxime Ripard24a661e92013-09-24 11:10:41 +0300815 resets = <&apb2_rst 17>;
Maxime Ripardd2d878c2014-01-30 15:41:23 +0100816 dmas = <&dma 7>, <&dma 7>;
817 dma-names = "rx", "tx";
Maxime Ripard8aed3b32013-03-10 16:09:06 +0100818 status = "disabled";
819 };
820
821 uart2: serial@01c28800 {
822 compatible = "snps,dw-apb-uart";
823 reg = <0x01c28800 0x400>;
Maxime Ripard19882b82014-12-16 22:59:58 +0100824 interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
Maxime Ripard8aed3b32013-03-10 16:09:06 +0100825 reg-shift = <2>;
826 reg-io-width = <4>;
Maxime Ripard98096562013-07-23 23:54:19 +0200827 clocks = <&apb2_gates 18>;
Maxime Ripard24a661e92013-09-24 11:10:41 +0300828 resets = <&apb2_rst 18>;
Maxime Ripardd2d878c2014-01-30 15:41:23 +0100829 dmas = <&dma 8>, <&dma 8>;
830 dma-names = "rx", "tx";
Maxime Ripard8aed3b32013-03-10 16:09:06 +0100831 status = "disabled";
832 };
833
834 uart3: serial@01c28c00 {
835 compatible = "snps,dw-apb-uart";
836 reg = <0x01c28c00 0x400>;
Maxime Ripard19882b82014-12-16 22:59:58 +0100837 interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
Maxime Ripard8aed3b32013-03-10 16:09:06 +0100838 reg-shift = <2>;
839 reg-io-width = <4>;
Maxime Ripard98096562013-07-23 23:54:19 +0200840 clocks = <&apb2_gates 19>;
Maxime Ripard24a661e92013-09-24 11:10:41 +0300841 resets = <&apb2_rst 19>;
Maxime Ripardd2d878c2014-01-30 15:41:23 +0100842 dmas = <&dma 9>, <&dma 9>;
843 dma-names = "rx", "tx";
Maxime Ripard8aed3b32013-03-10 16:09:06 +0100844 status = "disabled";
845 };
846
847 uart4: serial@01c29000 {
848 compatible = "snps,dw-apb-uart";
849 reg = <0x01c29000 0x400>;
Maxime Ripard19882b82014-12-16 22:59:58 +0100850 interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
Maxime Ripard8aed3b32013-03-10 16:09:06 +0100851 reg-shift = <2>;
852 reg-io-width = <4>;
Maxime Ripard98096562013-07-23 23:54:19 +0200853 clocks = <&apb2_gates 20>;
Maxime Ripard24a661e92013-09-24 11:10:41 +0300854 resets = <&apb2_rst 20>;
Maxime Ripardd2d878c2014-01-30 15:41:23 +0100855 dmas = <&dma 10>, <&dma 10>;
856 dma-names = "rx", "tx";
Maxime Ripard8aed3b32013-03-10 16:09:06 +0100857 status = "disabled";
858 };
859
860 uart5: serial@01c29400 {
861 compatible = "snps,dw-apb-uart";
862 reg = <0x01c29400 0x400>;
Maxime Ripard19882b82014-12-16 22:59:58 +0100863 interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
Maxime Ripard8aed3b32013-03-10 16:09:06 +0100864 reg-shift = <2>;
865 reg-io-width = <4>;
Maxime Ripard98096562013-07-23 23:54:19 +0200866 clocks = <&apb2_gates 21>;
Maxime Ripard24a661e92013-09-24 11:10:41 +0300867 resets = <&apb2_rst 21>;
Maxime Ripardd2d878c2014-01-30 15:41:23 +0100868 dmas = <&dma 22>, <&dma 22>;
869 dma-names = "rx", "tx";
Maxime Ripard8aed3b32013-03-10 16:09:06 +0100870 status = "disabled";
871 };
872
Maxime Ripard96c7cc92014-03-04 17:28:39 +0100873 i2c0: i2c@01c2ac00 {
874 compatible = "allwinner,sun6i-a31-i2c";
875 reg = <0x01c2ac00 0x400>;
Maxime Ripard19882b82014-12-16 22:59:58 +0100876 interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
Maxime Ripard96c7cc92014-03-04 17:28:39 +0100877 clocks = <&apb2_gates 0>;
Maxime Ripard96c7cc92014-03-04 17:28:39 +0100878 resets = <&apb2_rst 0>;
879 status = "disabled";
Chen-Yu Tsai495bccf2014-07-21 22:54:27 +0800880 #address-cells = <1>;
881 #size-cells = <0>;
Maxime Ripard96c7cc92014-03-04 17:28:39 +0100882 };
883
884 i2c1: i2c@01c2b000 {
885 compatible = "allwinner,sun6i-a31-i2c";
886 reg = <0x01c2b000 0x400>;
Maxime Ripard19882b82014-12-16 22:59:58 +0100887 interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
Maxime Ripard96c7cc92014-03-04 17:28:39 +0100888 clocks = <&apb2_gates 1>;
Maxime Ripard96c7cc92014-03-04 17:28:39 +0100889 resets = <&apb2_rst 1>;
890 status = "disabled";
Chen-Yu Tsai495bccf2014-07-21 22:54:27 +0800891 #address-cells = <1>;
892 #size-cells = <0>;
Maxime Ripard96c7cc92014-03-04 17:28:39 +0100893 };
894
895 i2c2: i2c@01c2b400 {
896 compatible = "allwinner,sun6i-a31-i2c";
897 reg = <0x01c2b400 0x400>;
Maxime Ripard19882b82014-12-16 22:59:58 +0100898 interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
Maxime Ripard96c7cc92014-03-04 17:28:39 +0100899 clocks = <&apb2_gates 2>;
Maxime Ripard96c7cc92014-03-04 17:28:39 +0100900 resets = <&apb2_rst 2>;
901 status = "disabled";
Chen-Yu Tsai495bccf2014-07-21 22:54:27 +0800902 #address-cells = <1>;
903 #size-cells = <0>;
Maxime Ripard96c7cc92014-03-04 17:28:39 +0100904 };
905
906 i2c3: i2c@01c2b800 {
907 compatible = "allwinner,sun6i-a31-i2c";
908 reg = <0x01c2b800 0x400>;
Maxime Ripard19882b82014-12-16 22:59:58 +0100909 interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
Maxime Ripard96c7cc92014-03-04 17:28:39 +0100910 clocks = <&apb2_gates 3>;
Maxime Ripard96c7cc92014-03-04 17:28:39 +0100911 resets = <&apb2_rst 3>;
912 status = "disabled";
Chen-Yu Tsai495bccf2014-07-21 22:54:27 +0800913 #address-cells = <1>;
914 #size-cells = <0>;
Maxime Ripard96c7cc92014-03-04 17:28:39 +0100915 };
916
Chen-Yu Tsai3dca65f2014-07-16 01:15:45 +0800917 gmac: ethernet@01c30000 {
918 compatible = "allwinner,sun7i-a20-gmac";
919 reg = <0x01c30000 0x1054>;
Maxime Ripard19882b82014-12-16 22:59:58 +0100920 interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
Chen-Yu Tsai3dca65f2014-07-16 01:15:45 +0800921 interrupt-names = "macirq";
922 clocks = <&ahb1_gates 17>, <&gmac_tx_clk>;
923 clock-names = "stmmaceth", "allwinner_gmac_tx";
924 resets = <&ahb1_rst 17>;
925 reset-names = "stmmaceth";
926 snps,pbl = <2>;
927 snps,fixed-burst;
928 snps,force_sf_dma_mode;
929 status = "disabled";
930 #address-cells = <1>;
931 #size-cells = <0>;
932 };
933
Chen-Yu Tsai14fee742015-08-11 13:32:57 +0800934 crypto: crypto-engine@01c15000 {
935 compatible = "allwinner,sun4i-a10-crypto";
936 reg = <0x01c15000 0x1000>;
937 interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
938 clocks = <&ahb1_gates 5>, <&ss_clk>;
939 clock-names = "ahb", "mod";
940 resets = <&ahb1_rst 5>;
941 reset-names = "ahb";
942 };
943
Maxime Ripard8cffcb02014-04-17 11:06:46 +0200944 timer@01c60000 {
Maxime Ripardd8cacaa2015-05-03 11:53:07 +0200945 compatible = "allwinner,sun6i-a31-hstimer",
946 "allwinner,sun7i-a20-hstimer";
Maxime Ripard8cffcb02014-04-17 11:06:46 +0200947 reg = <0x01c60000 0x1000>;
Maxime Ripard19882b82014-12-16 22:59:58 +0100948 interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>,
949 <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>,
950 <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>,
951 <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
Maxime Ripard8cffcb02014-04-17 11:06:46 +0200952 clocks = <&ahb1_gates 19>;
953 resets = <&ahb1_rst 19>;
954 };
955
Maxime Ripard0d6efe32014-02-05 14:05:06 +0100956 spi0: spi@01c68000 {
957 compatible = "allwinner,sun6i-a31-spi";
958 reg = <0x01c68000 0x1000>;
Maxime Ripard19882b82014-12-16 22:59:58 +0100959 interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>;
Maxime Ripard0d6efe32014-02-05 14:05:06 +0100960 clocks = <&ahb1_gates 20>, <&spi0_clk>;
961 clock-names = "ahb", "mod";
Maxime Ripardd2d878c2014-01-30 15:41:23 +0100962 dmas = <&dma 23>, <&dma 23>;
963 dma-names = "rx", "tx";
Maxime Ripard0d6efe32014-02-05 14:05:06 +0100964 resets = <&ahb1_rst 20>;
965 status = "disabled";
966 };
967
968 spi1: spi@01c69000 {
969 compatible = "allwinner,sun6i-a31-spi";
970 reg = <0x01c69000 0x1000>;
Maxime Ripard19882b82014-12-16 22:59:58 +0100971 interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>;
Maxime Ripard0d6efe32014-02-05 14:05:06 +0100972 clocks = <&ahb1_gates 21>, <&spi1_clk>;
973 clock-names = "ahb", "mod";
Maxime Ripardd2d878c2014-01-30 15:41:23 +0100974 dmas = <&dma 24>, <&dma 24>;
975 dma-names = "rx", "tx";
Maxime Ripard0d6efe32014-02-05 14:05:06 +0100976 resets = <&ahb1_rst 21>;
977 status = "disabled";
978 };
979
980 spi2: spi@01c6a000 {
981 compatible = "allwinner,sun6i-a31-spi";
982 reg = <0x01c6a000 0x1000>;
Maxime Ripard19882b82014-12-16 22:59:58 +0100983 interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>;
Maxime Ripard0d6efe32014-02-05 14:05:06 +0100984 clocks = <&ahb1_gates 22>, <&spi2_clk>;
985 clock-names = "ahb", "mod";
Maxime Ripardd2d878c2014-01-30 15:41:23 +0100986 dmas = <&dma 25>, <&dma 25>;
987 dma-names = "rx", "tx";
Maxime Ripard0d6efe32014-02-05 14:05:06 +0100988 resets = <&ahb1_rst 22>;
989 status = "disabled";
990 };
991
992 spi3: spi@01c6b000 {
993 compatible = "allwinner,sun6i-a31-spi";
994 reg = <0x01c6b000 0x1000>;
Maxime Ripard19882b82014-12-16 22:59:58 +0100995 interrupts = <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>;
Maxime Ripard0d6efe32014-02-05 14:05:06 +0100996 clocks = <&ahb1_gates 23>, <&spi3_clk>;
997 clock-names = "ahb", "mod";
Maxime Ripardd2d878c2014-01-30 15:41:23 +0100998 dmas = <&dma 26>, <&dma 26>;
999 dma-names = "rx", "tx";
Maxime Ripard0d6efe32014-02-05 14:05:06 +01001000 resets = <&ahb1_rst 23>;
1001 status = "disabled";
1002 };
1003
Maxime Ripard8aed3b32013-03-10 16:09:06 +01001004 gic: interrupt-controller@01c81000 {
1005 compatible = "arm,cortex-a7-gic", "arm,cortex-a15-gic";
1006 reg = <0x01c81000 0x1000>,
1007 <0x01c82000 0x1000>,
1008 <0x01c84000 0x2000>,
1009 <0x01c86000 0x2000>;
1010 interrupt-controller;
1011 #interrupt-cells = <3>;
Maxime Ripard19882b82014-12-16 22:59:58 +01001012 interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
Maxime Ripard8aed3b32013-03-10 16:09:06 +01001013 };
Maxime Ripard81ee4292013-11-03 10:30:12 +01001014
Chen-Yu Tsai5e700432014-07-30 20:56:06 +08001015 rtc: rtc@01f00000 {
1016 compatible = "allwinner,sun6i-a31-rtc";
1017 reg = <0x01f00000 0x54>;
Maxime Ripard19882b82014-12-16 22:59:58 +01001018 interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
1019 <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
Chen-Yu Tsai5e700432014-07-30 20:56:06 +08001020 };
1021
Maxime Ripard28240d22014-04-17 10:29:35 +02001022 nmi_intc: interrupt-controller@01f00c0c {
1023 compatible = "allwinner,sun6i-a31-sc-nmi";
1024 interrupt-controller;
1025 #interrupt-cells = <2>;
1026 reg = <0x01f00c0c 0x38>;
Maxime Ripard19882b82014-12-16 22:59:58 +01001027 interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
Maxime Ripard28240d22014-04-17 10:29:35 +02001028 };
1029
Hans de Goedea42ea602014-04-13 13:41:02 +02001030 prcm@01f01400 {
1031 compatible = "allwinner,sun6i-a31-prcm";
1032 reg = <0x01f01400 0x200>;
Boris BREZILLONcc08f5e2014-05-14 14:38:21 +02001033
1034 ar100: ar100_clk {
1035 compatible = "allwinner,sun6i-a31-ar100-clk";
1036 #clock-cells = <0>;
Maxime Ripardd8cacaa2015-05-03 11:53:07 +02001037 clocks = <&osc32k>, <&osc24M>, <&pll6 0>,
1038 <&pll6 0>;
Boris BREZILLONcc08f5e2014-05-14 14:38:21 +02001039 clock-output-names = "ar100";
1040 };
1041
1042 ahb0: ahb0_clk {
1043 compatible = "fixed-factor-clock";
1044 #clock-cells = <0>;
1045 clock-div = <1>;
1046 clock-mult = <1>;
1047 clocks = <&ar100>;
1048 clock-output-names = "ahb0";
1049 };
1050
1051 apb0: apb0_clk {
1052 compatible = "allwinner,sun6i-a31-apb0-clk";
1053 #clock-cells = <0>;
1054 clocks = <&ahb0>;
1055 clock-output-names = "apb0";
1056 };
1057
1058 apb0_gates: apb0_gates_clk {
1059 compatible = "allwinner,sun6i-a31-apb0-gates-clk";
1060 #clock-cells = <1>;
1061 clocks = <&apb0>;
1062 clock-output-names = "apb0_pio", "apb0_ir",
1063 "apb0_timer", "apb0_p2wi",
1064 "apb0_uart", "apb0_1wire",
1065 "apb0_i2c";
1066 };
1067
Hans de Goede9b5c6e02014-12-17 18:18:19 +01001068 ir_clk: ir_clk {
1069 #clock-cells = <0>;
1070 compatible = "allwinner,sun4i-a10-mod0-clk";
1071 clocks = <&osc32k>, <&osc24M>;
1072 clock-output-names = "ir";
1073 };
1074
Boris BREZILLONcc08f5e2014-05-14 14:38:21 +02001075 apb0_rst: apb0_rst {
1076 compatible = "allwinner,sun6i-a31-clock-reset";
1077 #reset-cells = <1>;
1078 };
Hans de Goedea42ea602014-04-13 13:41:02 +02001079 };
1080
Maxime Ripard81ee4292013-11-03 10:30:12 +01001081 cpucfg@01f01c00 {
1082 compatible = "allwinner,sun6i-a31-cpuconfig";
1083 reg = <0x01f01c00 0x300>;
1084 };
Boris BREZILLON209394a2014-05-13 16:03:03 +02001085
Hans de Goede4ac367b2014-12-29 12:09:24 +01001086 ir: ir@01f02000 {
1087 compatible = "allwinner,sun5i-a13-ir";
1088 clocks = <&apb0_gates 1>, <&ir_clk>;
1089 clock-names = "apb", "ir";
1090 resets = <&apb0_rst 1>;
Maxime Ripard19882b82014-12-16 22:59:58 +01001091 interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
Hans de Goede4ac367b2014-12-29 12:09:24 +01001092 reg = <0x01f02000 0x40>;
1093 status = "disabled";
1094 };
1095
Boris BREZILLON209394a2014-05-13 16:03:03 +02001096 r_pio: pinctrl@01f02c00 {
1097 compatible = "allwinner,sun6i-a31-r-pinctrl";
1098 reg = <0x01f02c00 0x400>;
Maxime Ripard19882b82014-12-16 22:59:58 +01001099 interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>,
1100 <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
Boris BREZILLON209394a2014-05-13 16:03:03 +02001101 clocks = <&apb0_gates 0>;
1102 resets = <&apb0_rst 0>;
1103 gpio-controller;
1104 interrupt-controller;
Chen-Yu Tsai7d4ff962014-06-30 23:57:51 +02001105 #interrupt-cells = <2>;
Boris BREZILLON209394a2014-05-13 16:03:03 +02001106 #size-cells = <0>;
1107 #gpio-cells = <3>;
Hans de Goededbbcd882014-11-23 14:38:14 +01001108
1109 ir_pins_a: ir@0 {
1110 allwinner,pins = "PL4";
1111 allwinner,function = "s_ir";
Maxime Ripard092a0c32014-12-16 22:59:57 +01001112 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
1113 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
Hans de Goededbbcd882014-11-23 14:38:14 +01001114 };
Boris BREZILLONfcd60132015-03-10 19:59:12 +08001115
1116 p2wi_pins: p2wi {
1117 allwinner,pins = "PL0", "PL1";
1118 allwinner,function = "s_p2wi";
1119 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
1120 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
1121 };
1122 };
1123
1124 p2wi: i2c@01f03400 {
1125 compatible = "allwinner,sun6i-a31-p2wi";
1126 reg = <0x01f03400 0x400>;
1127 interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
1128 clocks = <&apb0_gates 3>;
1129 clock-frequency = <100000>;
1130 resets = <&apb0_rst 3>;
1131 pinctrl-names = "default";
1132 pinctrl-0 = <&p2wi_pins>;
1133 status = "disabled";
1134 #address-cells = <1>;
1135 #size-cells = <0>;
Boris BREZILLON209394a2014-05-13 16:03:03 +02001136 };
Maxime Ripard8aed3b32013-03-10 16:09:06 +01001137 };
1138};