blob: c50d4e8c11504df38ca59f660f35e4b67cf74023 [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 *
21 * You should have received a copy of the GNU General Public
Maxime Ripard5186d832014-10-17 11:38:23 +020022 * License along with this file; if not, write to the Free
Maxime Ripard6c3ba722014-09-02 19:25:26 +020023 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
24 * MA 02110-1301 USA
25 *
26 * Or, alternatively,
27 *
28 * b) Permission is hereby granted, free of charge, to any person
29 * obtaining a copy of this software and associated documentation
30 * files (the "Software"), to deal in the Software without
31 * restriction, including without limitation the rights to use,
32 * copy, modify, merge, publish, distribute, sublicense, and/or
33 * sell copies of the Software, and to permit persons to whom the
34 * Software is furnished to do so, subject to the following
35 * conditions:
36 *
37 * The above copyright notice and this permission notice shall be
38 * included in all copies or substantial portions of the Software.
39 *
40 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
41 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
42 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
43 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
44 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
45 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
46 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
47 * OTHER DEALINGS IN THE SOFTWARE.
Maxime Ripard8aed3b32013-03-10 16:09:06 +010048 */
49
50/include/ "skeleton.dtsi"
51
52/ {
53 interrupt-parent = <&gic>;
54
Maxime Ripard54428d42014-01-02 22:05:04 +010055 aliases {
56 serial0 = &uart0;
57 serial1 = &uart1;
58 serial2 = &uart2;
59 serial3 = &uart3;
60 serial4 = &uart4;
61 serial5 = &uart5;
Chen-Yu Tsaie5073fd2014-07-16 01:15:46 +080062 ethernet0 = &gmac;
Maxime Ripard54428d42014-01-02 22:05:04 +010063 };
64
Hans de Goedee53a8b22014-11-14 16:34:36 +010065 chosen {
66 #address-cells = <1>;
67 #size-cells = <1>;
68 ranges;
69
Hans de Goedea9f8cda2014-11-18 12:07:13 +010070 framebuffer@0 {
71 compatible = "allwinner,simple-framebuffer", "simple-framebuffer";
72 allwinner,pipeline = "de_be0-lcd0-hdmi";
Hans de Goede678e75d2014-11-16 17:09:32 +010073 clocks = <&pll6 0>;
Hans de Goedee53a8b22014-11-14 16:34:36 +010074 status = "disabled";
75 };
76 };
Maxime Ripard54428d42014-01-02 22:05:04 +010077
Maxime Ripard8aed3b32013-03-10 16:09:06 +010078 cpus {
Maxime Ripardce78e352014-04-18 21:01:52 +020079 enable-method = "allwinner,sun6i-a31";
Maxime Ripard8aed3b32013-03-10 16:09:06 +010080 #address-cells = <1>;
81 #size-cells = <0>;
82
83 cpu@0 {
84 compatible = "arm,cortex-a7";
85 device_type = "cpu";
86 reg = <0>;
87 };
88
89 cpu@1 {
90 compatible = "arm,cortex-a7";
91 device_type = "cpu";
92 reg = <1>;
93 };
94
95 cpu@2 {
96 compatible = "arm,cortex-a7";
97 device_type = "cpu";
98 reg = <2>;
99 };
100
101 cpu@3 {
102 compatible = "arm,cortex-a7";
103 device_type = "cpu";
104 reg = <3>;
105 };
106 };
107
108 memory {
109 reg = <0x40000000 0x80000000>;
110 };
111
Maxime Ripardb5a10b72014-04-17 21:54:41 +0200112 pmu {
113 compatible = "arm,cortex-a7-pmu", "arm,cortex-a15-pmu";
114 interrupts = <0 120 4>,
115 <0 121 4>,
116 <0 122 4>,
117 <0 123 4>;
118 };
119
Maxime Ripard8aed3b32013-03-10 16:09:06 +0100120 clocks {
121 #address-cells = <1>;
Maxime Ripard98096562013-07-23 23:54:19 +0200122 #size-cells = <1>;
123 ranges;
Maxime Ripard8aed3b32013-03-10 16:09:06 +0100124
Maxime Ripard98096562013-07-23 23:54:19 +0200125 osc24M: osc24M {
Maxime Ripard8aed3b32013-03-10 16:09:06 +0100126 #clock-cells = <0>;
127 compatible = "fixed-clock";
128 clock-frequency = <24000000>;
129 };
Maxime Ripard98096562013-07-23 23:54:19 +0200130
Chen-Yu Tsai7b5b2902014-02-03 09:51:43 +0800131 osc32k: clk@0 {
Maxime Ripard98096562013-07-23 23:54:19 +0200132 #clock-cells = <0>;
133 compatible = "fixed-clock";
134 clock-frequency = <32768>;
Chen-Yu Tsai7b5b2902014-02-03 09:51:43 +0800135 clock-output-names = "osc32k";
Maxime Ripard98096562013-07-23 23:54:19 +0200136 };
137
Chen-Yu Tsai7b5b2902014-02-03 09:51:43 +0800138 pll1: clk@01c20000 {
Maxime Ripard98096562013-07-23 23:54:19 +0200139 #clock-cells = <0>;
140 compatible = "allwinner,sun6i-a31-pll1-clk";
141 reg = <0x01c20000 0x4>;
142 clocks = <&osc24M>;
Chen-Yu Tsai7b5b2902014-02-03 09:51:43 +0800143 clock-output-names = "pll1";
Maxime Ripard98096562013-07-23 23:54:19 +0200144 };
145
Maxime Ripardb0a09c72014-02-05 14:05:04 +0100146 pll6: clk@01c20028 {
Chen-Yu Tsaif6c3b042014-11-13 02:08:32 +0800147 #clock-cells = <1>;
Maxime Ripardb0a09c72014-02-05 14:05:04 +0100148 compatible = "allwinner,sun6i-a31-pll6-clk";
149 reg = <0x01c20028 0x4>;
150 clocks = <&osc24M>;
Chen-Yu Tsaif6c3b042014-11-13 02:08:32 +0800151 clock-output-names = "pll6", "pll6x2";
Maxime Ripard98096562013-07-23 23:54:19 +0200152 };
153
154 cpu: cpu@01c20050 {
155 #clock-cells = <0>;
Maxime Ripardbf6534a2014-02-06 09:55:58 +0100156 compatible = "allwinner,sun4i-a10-cpu-clk";
Maxime Ripard98096562013-07-23 23:54:19 +0200157 reg = <0x01c20050 0x4>;
158
159 /*
160 * PLL1 is listed twice here.
161 * While it looks suspicious, it's actually documented
162 * that way both in the datasheet and in the code from
163 * Allwinner.
164 */
165 clocks = <&osc32k>, <&osc24M>, <&pll1>, <&pll1>;
Chen-Yu Tsai7b5b2902014-02-03 09:51:43 +0800166 clock-output-names = "cpu";
Maxime Ripard98096562013-07-23 23:54:19 +0200167 };
168
169 axi: axi@01c20050 {
170 #clock-cells = <0>;
Maxime Ripardbf6534a2014-02-06 09:55:58 +0100171 compatible = "allwinner,sun4i-a10-axi-clk";
Maxime Ripard98096562013-07-23 23:54:19 +0200172 reg = <0x01c20050 0x4>;
173 clocks = <&cpu>;
Chen-Yu Tsai7b5b2902014-02-03 09:51:43 +0800174 clock-output-names = "axi";
Maxime Ripard98096562013-07-23 23:54:19 +0200175 };
176
177 ahb1_mux: ahb1_mux@01c20054 {
178 #clock-cells = <0>;
179 compatible = "allwinner,sun6i-a31-ahb1-mux-clk";
180 reg = <0x01c20054 0x4>;
Chen-Yu Tsaif6c3b042014-11-13 02:08:32 +0800181 clocks = <&osc32k>, <&osc24M>, <&axi>, <&pll6 0>;
Chen-Yu Tsai7b5b2902014-02-03 09:51:43 +0800182 clock-output-names = "ahb1_mux";
Maxime Ripard98096562013-07-23 23:54:19 +0200183 };
184
185 ahb1: ahb1@01c20054 {
186 #clock-cells = <0>;
Maxime Ripardbf6534a2014-02-06 09:55:58 +0100187 compatible = "allwinner,sun4i-a10-ahb-clk";
Maxime Ripard98096562013-07-23 23:54:19 +0200188 reg = <0x01c20054 0x4>;
189 clocks = <&ahb1_mux>;
Chen-Yu Tsai7b5b2902014-02-03 09:51:43 +0800190 clock-output-names = "ahb1";
Maxime Ripard98096562013-07-23 23:54:19 +0200191 };
192
Chen-Yu Tsai7b5b2902014-02-03 09:51:43 +0800193 ahb1_gates: clk@01c20060 {
Maxime Ripard98096562013-07-23 23:54:19 +0200194 #clock-cells = <1>;
195 compatible = "allwinner,sun6i-a31-ahb1-gates-clk";
196 reg = <0x01c20060 0x8>;
197 clocks = <&ahb1>;
198 clock-output-names = "ahb1_mipidsi", "ahb1_ss",
199 "ahb1_dma", "ahb1_mmc0", "ahb1_mmc1",
200 "ahb1_mmc2", "ahb1_mmc3", "ahb1_nand1",
201 "ahb1_nand0", "ahb1_sdram",
202 "ahb1_gmac", "ahb1_ts", "ahb1_hstimer",
203 "ahb1_spi0", "ahb1_spi1", "ahb1_spi2",
204 "ahb1_spi3", "ahb1_otg", "ahb1_ehci0",
205 "ahb1_ehci1", "ahb1_ohci0",
206 "ahb1_ohci1", "ahb1_ohci2", "ahb1_ve",
207 "ahb1_lcd0", "ahb1_lcd1", "ahb1_csi",
208 "ahb1_hdmi", "ahb1_de0", "ahb1_de1",
209 "ahb1_fe0", "ahb1_fe1", "ahb1_mp",
210 "ahb1_gpu", "ahb1_deu0", "ahb1_deu1",
211 "ahb1_drc0", "ahb1_drc1";
212 };
213
214 apb1: apb1@01c20054 {
215 #clock-cells = <0>;
Maxime Ripardbf6534a2014-02-06 09:55:58 +0100216 compatible = "allwinner,sun4i-a10-apb0-clk";
Maxime Ripard98096562013-07-23 23:54:19 +0200217 reg = <0x01c20054 0x4>;
218 clocks = <&ahb1>;
Chen-Yu Tsai7b5b2902014-02-03 09:51:43 +0800219 clock-output-names = "apb1";
Maxime Ripard98096562013-07-23 23:54:19 +0200220 };
221
Chen-Yu Tsai7b5b2902014-02-03 09:51:43 +0800222 apb1_gates: clk@01c20068 {
Maxime Ripard98096562013-07-23 23:54:19 +0200223 #clock-cells = <1>;
224 compatible = "allwinner,sun6i-a31-apb1-gates-clk";
225 reg = <0x01c20068 0x4>;
226 clocks = <&apb1>;
227 clock-output-names = "apb1_codec", "apb1_digital_mic",
228 "apb1_pio", "apb1_daudio0",
229 "apb1_daudio1";
230 };
231
Chen-Yu Tsai74c947a2014-11-06 11:40:31 +0800232 apb2: clk@01c20058 {
Maxime Ripard98096562013-07-23 23:54:19 +0200233 #clock-cells = <0>;
Chen-Yu Tsai74c947a2014-11-06 11:40:31 +0800234 compatible = "allwinner,sun4i-a10-apb1-clk";
Maxime Ripard98096562013-07-23 23:54:19 +0200235 reg = <0x01c20058 0x4>;
Chen-Yu Tsaif6c3b042014-11-13 02:08:32 +0800236 clocks = <&osc32k>, <&osc24M>, <&pll6 0>, <&pll6 0>;
Chen-Yu Tsai7b5b2902014-02-03 09:51:43 +0800237 clock-output-names = "apb2";
Maxime Ripard98096562013-07-23 23:54:19 +0200238 };
239
Chen-Yu Tsai7b5b2902014-02-03 09:51:43 +0800240 apb2_gates: clk@01c2006c {
Maxime Ripard98096562013-07-23 23:54:19 +0200241 #clock-cells = <1>;
242 compatible = "allwinner,sun6i-a31-apb2-gates-clk";
Maxime Ripard439d9f52013-09-24 16:30:05 +0300243 reg = <0x01c2006c 0x4>;
Maxime Ripard98096562013-07-23 23:54:19 +0200244 clocks = <&apb2>;
245 clock-output-names = "apb2_i2c0", "apb2_i2c1",
246 "apb2_i2c2", "apb2_i2c3", "apb2_uart0",
247 "apb2_uart1", "apb2_uart2", "apb2_uart3",
248 "apb2_uart4", "apb2_uart5";
249 };
Maxime Ripardb0a09c72014-02-05 14:05:04 +0100250
Hans de Goedeadc54c82014-05-02 17:57:23 +0200251 mmc0_clk: clk@01c20088 {
252 #clock-cells = <0>;
253 compatible = "allwinner,sun4i-a10-mod0-clk";
254 reg = <0x01c20088 0x4>;
Chen-Yu Tsaif6c3b042014-11-13 02:08:32 +0800255 clocks = <&osc24M>, <&pll6 0>;
Hans de Goedeadc54c82014-05-02 17:57:23 +0200256 clock-output-names = "mmc0";
257 };
258
259 mmc1_clk: clk@01c2008c {
260 #clock-cells = <0>;
261 compatible = "allwinner,sun4i-a10-mod0-clk";
262 reg = <0x01c2008c 0x4>;
Chen-Yu Tsaif6c3b042014-11-13 02:08:32 +0800263 clocks = <&osc24M>, <&pll6 0>;
Hans de Goedeadc54c82014-05-02 17:57:23 +0200264 clock-output-names = "mmc1";
265 };
266
267 mmc2_clk: clk@01c20090 {
268 #clock-cells = <0>;
269 compatible = "allwinner,sun4i-a10-mod0-clk";
270 reg = <0x01c20090 0x4>;
Chen-Yu Tsaif6c3b042014-11-13 02:08:32 +0800271 clocks = <&osc24M>, <&pll6 0>;
Hans de Goedeadc54c82014-05-02 17:57:23 +0200272 clock-output-names = "mmc2";
273 };
274
275 mmc3_clk: clk@01c20094 {
276 #clock-cells = <0>;
277 compatible = "allwinner,sun4i-a10-mod0-clk";
278 reg = <0x01c20094 0x4>;
Chen-Yu Tsaif6c3b042014-11-13 02:08:32 +0800279 clocks = <&osc24M>, <&pll6 0>;
Hans de Goedeadc54c82014-05-02 17:57:23 +0200280 clock-output-names = "mmc3";
281 };
282
Maxime Ripardb0a09c72014-02-05 14:05:04 +0100283 spi0_clk: clk@01c200a0 {
284 #clock-cells = <0>;
Maxime Ripard225b0212014-02-24 17:29:06 +0100285 compatible = "allwinner,sun4i-a10-mod0-clk";
Maxime Ripardb0a09c72014-02-05 14:05:04 +0100286 reg = <0x01c200a0 0x4>;
Chen-Yu Tsaif6c3b042014-11-13 02:08:32 +0800287 clocks = <&osc24M>, <&pll6 0>;
Maxime Ripardb0a09c72014-02-05 14:05:04 +0100288 clock-output-names = "spi0";
289 };
290
291 spi1_clk: clk@01c200a4 {
292 #clock-cells = <0>;
Maxime Ripard225b0212014-02-24 17:29:06 +0100293 compatible = "allwinner,sun4i-a10-mod0-clk";
Maxime Ripardb0a09c72014-02-05 14:05:04 +0100294 reg = <0x01c200a4 0x4>;
Chen-Yu Tsaif6c3b042014-11-13 02:08:32 +0800295 clocks = <&osc24M>, <&pll6 0>;
Maxime Ripardb0a09c72014-02-05 14:05:04 +0100296 clock-output-names = "spi1";
297 };
298
299 spi2_clk: clk@01c200a8 {
300 #clock-cells = <0>;
Maxime Ripard225b0212014-02-24 17:29:06 +0100301 compatible = "allwinner,sun4i-a10-mod0-clk";
Maxime Ripardb0a09c72014-02-05 14:05:04 +0100302 reg = <0x01c200a8 0x4>;
Chen-Yu Tsaif6c3b042014-11-13 02:08:32 +0800303 clocks = <&osc24M>, <&pll6 0>;
Maxime Ripardb0a09c72014-02-05 14:05:04 +0100304 clock-output-names = "spi2";
305 };
306
307 spi3_clk: clk@01c200ac {
308 #clock-cells = <0>;
Maxime Ripard225b0212014-02-24 17:29:06 +0100309 compatible = "allwinner,sun4i-a10-mod0-clk";
Maxime Ripardb0a09c72014-02-05 14:05:04 +0100310 reg = <0x01c200ac 0x4>;
Chen-Yu Tsaif6c3b042014-11-13 02:08:32 +0800311 clocks = <&osc24M>, <&pll6 0>;
Maxime Ripardb0a09c72014-02-05 14:05:04 +0100312 clock-output-names = "spi3";
313 };
Maxime Ripard94a1cd12014-05-13 17:44:16 +0200314
315 usb_clk: clk@01c200cc {
316 #clock-cells = <1>;
317 #reset-cells = <1>;
318 compatible = "allwinner,sun6i-a31-usb-clk";
319 reg = <0x01c200cc 0x4>;
320 clocks = <&osc24M>;
321 clock-output-names = "usb_phy0", "usb_phy1", "usb_phy2",
322 "usb_ohci0", "usb_ohci1",
323 "usb_ohci2";
324 };
Chen-Yu Tsaied298612014-07-16 01:15:44 +0800325
326 /*
327 * The following two are dummy clocks, placeholders used in the gmac_tx
328 * clock. The gmac driver will choose one parent depending on the PHY
329 * interface mode, using clk_set_rate auto-reparenting.
330 * The actual TX clock rate is not controlled by the gmac_tx clock.
331 */
332 mii_phy_tx_clk: clk@1 {
333 #clock-cells = <0>;
334 compatible = "fixed-clock";
335 clock-frequency = <25000000>;
336 clock-output-names = "mii_phy_tx";
337 };
338
339 gmac_int_tx_clk: clk@2 {
340 #clock-cells = <0>;
341 compatible = "fixed-clock";
342 clock-frequency = <125000000>;
343 clock-output-names = "gmac_int_tx";
344 };
345
346 gmac_tx_clk: clk@01c200d0 {
347 #clock-cells = <0>;
348 compatible = "allwinner,sun7i-a20-gmac-clk";
349 reg = <0x01c200d0 0x4>;
350 clocks = <&mii_phy_tx_clk>, <&gmac_int_tx_clk>;
351 clock-output-names = "gmac_tx";
352 };
Maxime Ripard8aed3b32013-03-10 16:09:06 +0100353 };
354
355 soc@01c00000 {
356 compatible = "simple-bus";
357 #address-cells = <1>;
358 #size-cells = <1>;
359 ranges;
360
Maxime Ripardd2d878c2014-01-30 15:41:23 +0100361 dma: dma-controller@01c02000 {
362 compatible = "allwinner,sun6i-a31-dma";
363 reg = <0x01c02000 0x1000>;
364 interrupts = <0 50 4>;
365 clocks = <&ahb1_gates 6>;
366 resets = <&ahb1_rst 6>;
367 #dma-cells = <1>;
Chen-Yu Tsai532425a2014-11-06 19:56:49 +0800368
369 /* DMA controller requires AHB1 clocked from PLL6 */
370 assigned-clocks = <&ahb1_mux>;
Chen-Yu Tsaif6c3b042014-11-13 02:08:32 +0800371 assigned-clock-parents = <&pll6 0>;
Maxime Ripardd2d878c2014-01-30 15:41:23 +0100372 };
373
Hans de Goede5b753f02014-05-02 17:57:24 +0200374 mmc0: mmc@01c0f000 {
375 compatible = "allwinner,sun5i-a13-mmc";
376 reg = <0x01c0f000 0x1000>;
377 clocks = <&ahb1_gates 8>, <&mmc0_clk>;
378 clock-names = "ahb", "mmc";
379 resets = <&ahb1_rst 8>;
380 reset-names = "ahb";
381 interrupts = <0 60 4>;
382 status = "disabled";
383 };
384
385 mmc1: mmc@01c10000 {
386 compatible = "allwinner,sun5i-a13-mmc";
387 reg = <0x01c10000 0x1000>;
388 clocks = <&ahb1_gates 9>, <&mmc1_clk>;
389 clock-names = "ahb", "mmc";
390 resets = <&ahb1_rst 9>;
391 reset-names = "ahb";
392 interrupts = <0 61 4>;
393 status = "disabled";
394 };
395
396 mmc2: mmc@01c11000 {
397 compatible = "allwinner,sun5i-a13-mmc";
398 reg = <0x01c11000 0x1000>;
399 clocks = <&ahb1_gates 10>, <&mmc2_clk>;
400 clock-names = "ahb", "mmc";
401 resets = <&ahb1_rst 10>;
402 reset-names = "ahb";
403 interrupts = <0 62 4>;
404 status = "disabled";
405 };
406
407 mmc3: mmc@01c12000 {
408 compatible = "allwinner,sun5i-a13-mmc";
409 reg = <0x01c12000 0x1000>;
410 clocks = <&ahb1_gates 11>, <&mmc3_clk>;
411 clock-names = "ahb", "mmc";
412 resets = <&ahb1_rst 11>;
413 reset-names = "ahb";
414 interrupts = <0 63 4>;
415 status = "disabled";
416 };
417
Maxime Ripardef964082014-05-13 17:44:21 +0200418 usbphy: phy@01c19400 {
419 compatible = "allwinner,sun6i-a31-usb-phy";
420 reg = <0x01c19400 0x10>,
421 <0x01c1a800 0x4>,
422 <0x01c1b800 0x4>;
423 reg-names = "phy_ctrl",
424 "pmu1",
425 "pmu2";
426 clocks = <&usb_clk 8>,
427 <&usb_clk 9>,
428 <&usb_clk 10>;
429 clock-names = "usb0_phy",
430 "usb1_phy",
431 "usb2_phy";
432 resets = <&usb_clk 0>,
433 <&usb_clk 1>,
434 <&usb_clk 2>;
435 reset-names = "usb0_reset",
436 "usb1_reset",
437 "usb2_reset";
438 status = "disabled";
439 #phy-cells = <1>;
440 };
441
442 ehci0: usb@01c1a000 {
443 compatible = "allwinner,sun6i-a31-ehci", "generic-ehci";
444 reg = <0x01c1a000 0x100>;
445 interrupts = <0 72 4>;
446 clocks = <&ahb1_gates 26>;
447 resets = <&ahb1_rst 26>;
448 phys = <&usbphy 1>;
449 phy-names = "usb";
450 status = "disabled";
451 };
452
453 ohci0: usb@01c1a400 {
454 compatible = "allwinner,sun6i-a31-ohci", "generic-ohci";
455 reg = <0x01c1a400 0x100>;
456 interrupts = <0 73 4>;
457 clocks = <&ahb1_gates 29>, <&usb_clk 16>;
458 resets = <&ahb1_rst 29>;
459 phys = <&usbphy 1>;
460 phy-names = "usb";
461 status = "disabled";
462 };
463
464 ehci1: usb@01c1b000 {
465 compatible = "allwinner,sun6i-a31-ehci", "generic-ehci";
466 reg = <0x01c1b000 0x100>;
467 interrupts = <0 74 4>;
468 clocks = <&ahb1_gates 27>;
469 resets = <&ahb1_rst 27>;
470 phys = <&usbphy 2>;
471 phy-names = "usb";
472 status = "disabled";
473 };
474
475 ohci1: usb@01c1b400 {
476 compatible = "allwinner,sun6i-a31-ohci", "generic-ohci";
477 reg = <0x01c1b400 0x100>;
478 interrupts = <0 75 4>;
479 clocks = <&ahb1_gates 30>, <&usb_clk 17>;
480 resets = <&ahb1_rst 30>;
481 phys = <&usbphy 2>;
482 phy-names = "usb";
483 status = "disabled";
484 };
485
Maxime Ripardb294ebb2014-05-20 13:59:58 +0200486 ohci2: usb@01c1c400 {
Maxime Ripardef964082014-05-13 17:44:21 +0200487 compatible = "allwinner,sun6i-a31-ohci", "generic-ohci";
488 reg = <0x01c1c400 0x100>;
489 interrupts = <0 77 4>;
490 clocks = <&ahb1_gates 31>, <&usb_clk 18>;
491 resets = <&ahb1_rst 31>;
492 status = "disabled";
493 };
494
Maxime Ripard140e1722013-03-12 22:16:05 +0100495 pio: pinctrl@01c20800 {
496 compatible = "allwinner,sun6i-a31-pinctrl";
497 reg = <0x01c20800 0x400>;
Maxime Ripard6f97dc82013-12-10 19:37:22 +0100498 interrupts = <0 11 4>,
499 <0 15 4>,
500 <0 16 4>,
501 <0 17 4>;
Maxime Ripard98096562013-07-23 23:54:19 +0200502 clocks = <&apb1_gates 5>;
Maxime Ripard140e1722013-03-12 22:16:05 +0100503 gpio-controller;
504 interrupt-controller;
Chen-Yu Tsai7d4ff962014-06-30 23:57:51 +0200505 #interrupt-cells = <2>;
Maxime Ripard140e1722013-03-12 22:16:05 +0100506 #size-cells = <0>;
507 #gpio-cells = <3>;
Maxime Ripardab4238c2013-06-22 23:56:40 +0200508
509 uart0_pins_a: uart0@0 {
510 allwinner,pins = "PH20", "PH21";
511 allwinner,function = "uart0";
512 allwinner,drive = <0>;
513 allwinner,pull = <0>;
514 };
Maxime Ripard8be188b2014-03-04 17:28:40 +0100515
516 i2c0_pins_a: i2c0@0 {
517 allwinner,pins = "PH14", "PH15";
518 allwinner,function = "i2c0";
519 allwinner,drive = <0>;
520 allwinner,pull = <0>;
521 };
522
523 i2c1_pins_a: i2c1@0 {
524 allwinner,pins = "PH16", "PH17";
525 allwinner,function = "i2c1";
526 allwinner,drive = <0>;
527 allwinner,pull = <0>;
528 };
529
530 i2c2_pins_a: i2c2@0 {
531 allwinner,pins = "PH18", "PH19";
532 allwinner,function = "i2c2";
533 allwinner,drive = <0>;
534 allwinner,pull = <0>;
535 };
Hans de Goede9797eb82014-04-26 12:16:16 +0200536
537 mmc0_pins_a: mmc0@0 {
538 allwinner,pins = "PF0","PF1","PF2","PF3","PF4","PF5";
539 allwinner,function = "mmc0";
540 allwinner,drive = <2>;
541 allwinner,pull = <0>;
542 };
Chen-Yu Tsaiee39a3e2014-07-16 01:15:43 +0800543
544 gmac_pins_mii_a: gmac_mii@0 {
545 allwinner,pins = "PA0", "PA1", "PA2", "PA3",
546 "PA8", "PA9", "PA11",
547 "PA12", "PA13", "PA14", "PA19",
548 "PA20", "PA21", "PA22", "PA23",
549 "PA24", "PA26", "PA27";
550 allwinner,function = "gmac";
551 allwinner,drive = <0>;
552 allwinner,pull = <0>;
553 };
554
555 gmac_pins_gmii_a: gmac_gmii@0 {
556 allwinner,pins = "PA0", "PA1", "PA2", "PA3",
557 "PA4", "PA5", "PA6", "PA7",
558 "PA8", "PA9", "PA10", "PA11",
559 "PA12", "PA13", "PA14", "PA15",
560 "PA16", "PA17", "PA18", "PA19",
561 "PA20", "PA21", "PA22", "PA23",
562 "PA24", "PA25", "PA26", "PA27";
563 allwinner,function = "gmac";
564 /*
565 * data lines in GMII mode run at 125MHz and
566 * might need a higher signal drive strength
567 */
568 allwinner,drive = <2>;
569 allwinner,pull = <0>;
570 };
571
572 gmac_pins_rgmii_a: gmac_rgmii@0 {
573 allwinner,pins = "PA0", "PA1", "PA2", "PA3",
574 "PA9", "PA10", "PA11",
575 "PA12", "PA13", "PA14", "PA19",
576 "PA20", "PA25", "PA26", "PA27";
577 allwinner,function = "gmac";
578 /*
579 * data lines in RGMII mode use DDR mode
580 * and need a higher signal drive strength
581 */
582 allwinner,drive = <3>;
583 allwinner,pull = <0>;
584 };
Maxime Ripard140e1722013-03-12 22:16:05 +0100585 };
586
Maxime Ripard24a661e92013-09-24 11:10:41 +0300587 ahb1_rst: reset@01c202c0 {
588 #reset-cells = <1>;
589 compatible = "allwinner,sun6i-a31-ahb1-reset";
590 reg = <0x01c202c0 0xc>;
591 };
592
593 apb1_rst: reset@01c202d0 {
594 #reset-cells = <1>;
595 compatible = "allwinner,sun6i-a31-clock-reset";
596 reg = <0x01c202d0 0x4>;
597 };
598
599 apb2_rst: reset@01c202d8 {
600 #reset-cells = <1>;
601 compatible = "allwinner,sun6i-a31-clock-reset";
602 reg = <0x01c202d8 0x4>;
603 };
604
Maxime Ripard8aed3b32013-03-10 16:09:06 +0100605 timer@01c20c00 {
Maxime Ripardb4f26442014-02-06 10:40:32 +0100606 compatible = "allwinner,sun4i-a10-timer";
Maxime Ripard8aed3b32013-03-10 16:09:06 +0100607 reg = <0x01c20c00 0xa0>;
Maxime Ripard6f97dc82013-12-10 19:37:22 +0100608 interrupts = <0 18 4>,
609 <0 19 4>,
610 <0 20 4>,
611 <0 21 4>,
612 <0 22 4>;
Maxime Ripard98096562013-07-23 23:54:19 +0200613 clocks = <&osc24M>;
Maxime Ripard8aed3b32013-03-10 16:09:06 +0100614 };
615
616 wdt1: watchdog@01c20ca0 {
Maxime Ripardca5d04d2014-02-07 22:29:26 +0100617 compatible = "allwinner,sun6i-a31-wdt";
Maxime Ripard8aed3b32013-03-10 16:09:06 +0100618 reg = <0x01c20ca0 0x20>;
619 };
620
621 uart0: serial@01c28000 {
622 compatible = "snps,dw-apb-uart";
623 reg = <0x01c28000 0x400>;
Maxime Ripard6f97dc82013-12-10 19:37:22 +0100624 interrupts = <0 0 4>;
Maxime Ripard8aed3b32013-03-10 16:09:06 +0100625 reg-shift = <2>;
626 reg-io-width = <4>;
Maxime Ripard98096562013-07-23 23:54:19 +0200627 clocks = <&apb2_gates 16>;
Maxime Ripard24a661e92013-09-24 11:10:41 +0300628 resets = <&apb2_rst 16>;
Maxime Ripardd2d878c2014-01-30 15:41:23 +0100629 dmas = <&dma 6>, <&dma 6>;
630 dma-names = "rx", "tx";
Maxime Ripard8aed3b32013-03-10 16:09:06 +0100631 status = "disabled";
632 };
633
634 uart1: serial@01c28400 {
635 compatible = "snps,dw-apb-uart";
636 reg = <0x01c28400 0x400>;
Maxime Ripard6f97dc82013-12-10 19:37:22 +0100637 interrupts = <0 1 4>;
Maxime Ripard8aed3b32013-03-10 16:09:06 +0100638 reg-shift = <2>;
639 reg-io-width = <4>;
Maxime Ripard98096562013-07-23 23:54:19 +0200640 clocks = <&apb2_gates 17>;
Maxime Ripard24a661e92013-09-24 11:10:41 +0300641 resets = <&apb2_rst 17>;
Maxime Ripardd2d878c2014-01-30 15:41:23 +0100642 dmas = <&dma 7>, <&dma 7>;
643 dma-names = "rx", "tx";
Maxime Ripard8aed3b32013-03-10 16:09:06 +0100644 status = "disabled";
645 };
646
647 uart2: serial@01c28800 {
648 compatible = "snps,dw-apb-uart";
649 reg = <0x01c28800 0x400>;
Maxime Ripard6f97dc82013-12-10 19:37:22 +0100650 interrupts = <0 2 4>;
Maxime Ripard8aed3b32013-03-10 16:09:06 +0100651 reg-shift = <2>;
652 reg-io-width = <4>;
Maxime Ripard98096562013-07-23 23:54:19 +0200653 clocks = <&apb2_gates 18>;
Maxime Ripard24a661e92013-09-24 11:10:41 +0300654 resets = <&apb2_rst 18>;
Maxime Ripardd2d878c2014-01-30 15:41:23 +0100655 dmas = <&dma 8>, <&dma 8>;
656 dma-names = "rx", "tx";
Maxime Ripard8aed3b32013-03-10 16:09:06 +0100657 status = "disabled";
658 };
659
660 uart3: serial@01c28c00 {
661 compatible = "snps,dw-apb-uart";
662 reg = <0x01c28c00 0x400>;
Maxime Ripard6f97dc82013-12-10 19:37:22 +0100663 interrupts = <0 3 4>;
Maxime Ripard8aed3b32013-03-10 16:09:06 +0100664 reg-shift = <2>;
665 reg-io-width = <4>;
Maxime Ripard98096562013-07-23 23:54:19 +0200666 clocks = <&apb2_gates 19>;
Maxime Ripard24a661e92013-09-24 11:10:41 +0300667 resets = <&apb2_rst 19>;
Maxime Ripardd2d878c2014-01-30 15:41:23 +0100668 dmas = <&dma 9>, <&dma 9>;
669 dma-names = "rx", "tx";
Maxime Ripard8aed3b32013-03-10 16:09:06 +0100670 status = "disabled";
671 };
672
673 uart4: serial@01c29000 {
674 compatible = "snps,dw-apb-uart";
675 reg = <0x01c29000 0x400>;
Maxime Ripard6f97dc82013-12-10 19:37:22 +0100676 interrupts = <0 4 4>;
Maxime Ripard8aed3b32013-03-10 16:09:06 +0100677 reg-shift = <2>;
678 reg-io-width = <4>;
Maxime Ripard98096562013-07-23 23:54:19 +0200679 clocks = <&apb2_gates 20>;
Maxime Ripard24a661e92013-09-24 11:10:41 +0300680 resets = <&apb2_rst 20>;
Maxime Ripardd2d878c2014-01-30 15:41:23 +0100681 dmas = <&dma 10>, <&dma 10>;
682 dma-names = "rx", "tx";
Maxime Ripard8aed3b32013-03-10 16:09:06 +0100683 status = "disabled";
684 };
685
686 uart5: serial@01c29400 {
687 compatible = "snps,dw-apb-uart";
688 reg = <0x01c29400 0x400>;
Maxime Ripard6f97dc82013-12-10 19:37:22 +0100689 interrupts = <0 5 4>;
Maxime Ripard8aed3b32013-03-10 16:09:06 +0100690 reg-shift = <2>;
691 reg-io-width = <4>;
Maxime Ripard98096562013-07-23 23:54:19 +0200692 clocks = <&apb2_gates 21>;
Maxime Ripard24a661e92013-09-24 11:10:41 +0300693 resets = <&apb2_rst 21>;
Maxime Ripardd2d878c2014-01-30 15:41:23 +0100694 dmas = <&dma 22>, <&dma 22>;
695 dma-names = "rx", "tx";
Maxime Ripard8aed3b32013-03-10 16:09:06 +0100696 status = "disabled";
697 };
698
Maxime Ripard96c7cc92014-03-04 17:28:39 +0100699 i2c0: i2c@01c2ac00 {
700 compatible = "allwinner,sun6i-a31-i2c";
701 reg = <0x01c2ac00 0x400>;
702 interrupts = <0 6 4>;
703 clocks = <&apb2_gates 0>;
Maxime Ripard96c7cc92014-03-04 17:28:39 +0100704 resets = <&apb2_rst 0>;
705 status = "disabled";
Chen-Yu Tsai495bccf2014-07-21 22:54:27 +0800706 #address-cells = <1>;
707 #size-cells = <0>;
Maxime Ripard96c7cc92014-03-04 17:28:39 +0100708 };
709
710 i2c1: i2c@01c2b000 {
711 compatible = "allwinner,sun6i-a31-i2c";
712 reg = <0x01c2b000 0x400>;
713 interrupts = <0 7 4>;
714 clocks = <&apb2_gates 1>;
Maxime Ripard96c7cc92014-03-04 17:28:39 +0100715 resets = <&apb2_rst 1>;
716 status = "disabled";
Chen-Yu Tsai495bccf2014-07-21 22:54:27 +0800717 #address-cells = <1>;
718 #size-cells = <0>;
Maxime Ripard96c7cc92014-03-04 17:28:39 +0100719 };
720
721 i2c2: i2c@01c2b400 {
722 compatible = "allwinner,sun6i-a31-i2c";
723 reg = <0x01c2b400 0x400>;
724 interrupts = <0 8 4>;
725 clocks = <&apb2_gates 2>;
Maxime Ripard96c7cc92014-03-04 17:28:39 +0100726 resets = <&apb2_rst 2>;
727 status = "disabled";
Chen-Yu Tsai495bccf2014-07-21 22:54:27 +0800728 #address-cells = <1>;
729 #size-cells = <0>;
Maxime Ripard96c7cc92014-03-04 17:28:39 +0100730 };
731
732 i2c3: i2c@01c2b800 {
733 compatible = "allwinner,sun6i-a31-i2c";
734 reg = <0x01c2b800 0x400>;
735 interrupts = <0 9 4>;
736 clocks = <&apb2_gates 3>;
Maxime Ripard96c7cc92014-03-04 17:28:39 +0100737 resets = <&apb2_rst 3>;
738 status = "disabled";
Chen-Yu Tsai495bccf2014-07-21 22:54:27 +0800739 #address-cells = <1>;
740 #size-cells = <0>;
Maxime Ripard96c7cc92014-03-04 17:28:39 +0100741 };
742
Chen-Yu Tsai3dca65f2014-07-16 01:15:45 +0800743 gmac: ethernet@01c30000 {
744 compatible = "allwinner,sun7i-a20-gmac";
745 reg = <0x01c30000 0x1054>;
746 interrupts = <0 82 4>;
747 interrupt-names = "macirq";
748 clocks = <&ahb1_gates 17>, <&gmac_tx_clk>;
749 clock-names = "stmmaceth", "allwinner_gmac_tx";
750 resets = <&ahb1_rst 17>;
751 reset-names = "stmmaceth";
752 snps,pbl = <2>;
753 snps,fixed-burst;
754 snps,force_sf_dma_mode;
755 status = "disabled";
756 #address-cells = <1>;
757 #size-cells = <0>;
758 };
759
Maxime Ripard8cffcb02014-04-17 11:06:46 +0200760 timer@01c60000 {
761 compatible = "allwinner,sun6i-a31-hstimer", "allwinner,sun7i-a20-hstimer";
762 reg = <0x01c60000 0x1000>;
763 interrupts = <0 51 4>,
764 <0 52 4>,
765 <0 53 4>,
766 <0 54 4>;
767 clocks = <&ahb1_gates 19>;
768 resets = <&ahb1_rst 19>;
769 };
770
Maxime Ripard0d6efe32014-02-05 14:05:06 +0100771 spi0: spi@01c68000 {
772 compatible = "allwinner,sun6i-a31-spi";
773 reg = <0x01c68000 0x1000>;
774 interrupts = <0 65 4>;
775 clocks = <&ahb1_gates 20>, <&spi0_clk>;
776 clock-names = "ahb", "mod";
Maxime Ripardd2d878c2014-01-30 15:41:23 +0100777 dmas = <&dma 23>, <&dma 23>;
778 dma-names = "rx", "tx";
Maxime Ripard0d6efe32014-02-05 14:05:06 +0100779 resets = <&ahb1_rst 20>;
780 status = "disabled";
781 };
782
783 spi1: spi@01c69000 {
784 compatible = "allwinner,sun6i-a31-spi";
785 reg = <0x01c69000 0x1000>;
786 interrupts = <0 66 4>;
787 clocks = <&ahb1_gates 21>, <&spi1_clk>;
788 clock-names = "ahb", "mod";
Maxime Ripardd2d878c2014-01-30 15:41:23 +0100789 dmas = <&dma 24>, <&dma 24>;
790 dma-names = "rx", "tx";
Maxime Ripard0d6efe32014-02-05 14:05:06 +0100791 resets = <&ahb1_rst 21>;
792 status = "disabled";
793 };
794
795 spi2: spi@01c6a000 {
796 compatible = "allwinner,sun6i-a31-spi";
797 reg = <0x01c6a000 0x1000>;
798 interrupts = <0 67 4>;
799 clocks = <&ahb1_gates 22>, <&spi2_clk>;
800 clock-names = "ahb", "mod";
Maxime Ripardd2d878c2014-01-30 15:41:23 +0100801 dmas = <&dma 25>, <&dma 25>;
802 dma-names = "rx", "tx";
Maxime Ripard0d6efe32014-02-05 14:05:06 +0100803 resets = <&ahb1_rst 22>;
804 status = "disabled";
805 };
806
807 spi3: spi@01c6b000 {
808 compatible = "allwinner,sun6i-a31-spi";
809 reg = <0x01c6b000 0x1000>;
810 interrupts = <0 68 4>;
811 clocks = <&ahb1_gates 23>, <&spi3_clk>;
812 clock-names = "ahb", "mod";
Maxime Ripardd2d878c2014-01-30 15:41:23 +0100813 dmas = <&dma 26>, <&dma 26>;
814 dma-names = "rx", "tx";
Maxime Ripard0d6efe32014-02-05 14:05:06 +0100815 resets = <&ahb1_rst 23>;
816 status = "disabled";
817 };
818
Maxime Ripard8aed3b32013-03-10 16:09:06 +0100819 gic: interrupt-controller@01c81000 {
820 compatible = "arm,cortex-a7-gic", "arm,cortex-a15-gic";
821 reg = <0x01c81000 0x1000>,
822 <0x01c82000 0x1000>,
823 <0x01c84000 0x2000>,
824 <0x01c86000 0x2000>;
825 interrupt-controller;
826 #interrupt-cells = <3>;
827 interrupts = <1 9 0xf04>;
828 };
Maxime Ripard81ee4292013-11-03 10:30:12 +0100829
Chen-Yu Tsai5e700432014-07-30 20:56:06 +0800830 rtc: rtc@01f00000 {
831 compatible = "allwinner,sun6i-a31-rtc";
832 reg = <0x01f00000 0x54>;
833 interrupts = <0 40 4>, <0 41 4>;
834 };
835
Maxime Ripard28240d22014-04-17 10:29:35 +0200836 nmi_intc: interrupt-controller@01f00c0c {
837 compatible = "allwinner,sun6i-a31-sc-nmi";
838 interrupt-controller;
839 #interrupt-cells = <2>;
840 reg = <0x01f00c0c 0x38>;
841 interrupts = <0 32 4>;
842 };
843
Hans de Goedea42ea602014-04-13 13:41:02 +0200844 prcm@01f01400 {
845 compatible = "allwinner,sun6i-a31-prcm";
846 reg = <0x01f01400 0x200>;
Boris BREZILLONcc08f5e2014-05-14 14:38:21 +0200847
848 ar100: ar100_clk {
849 compatible = "allwinner,sun6i-a31-ar100-clk";
850 #clock-cells = <0>;
Chen-Yu Tsaif6c3b042014-11-13 02:08:32 +0800851 clocks = <&osc32k>, <&osc24M>, <&pll6 0>, <&pll6 0>;
Boris BREZILLONcc08f5e2014-05-14 14:38:21 +0200852 clock-output-names = "ar100";
853 };
854
855 ahb0: ahb0_clk {
856 compatible = "fixed-factor-clock";
857 #clock-cells = <0>;
858 clock-div = <1>;
859 clock-mult = <1>;
860 clocks = <&ar100>;
861 clock-output-names = "ahb0";
862 };
863
864 apb0: apb0_clk {
865 compatible = "allwinner,sun6i-a31-apb0-clk";
866 #clock-cells = <0>;
867 clocks = <&ahb0>;
868 clock-output-names = "apb0";
869 };
870
871 apb0_gates: apb0_gates_clk {
872 compatible = "allwinner,sun6i-a31-apb0-gates-clk";
873 #clock-cells = <1>;
874 clocks = <&apb0>;
875 clock-output-names = "apb0_pio", "apb0_ir",
876 "apb0_timer", "apb0_p2wi",
877 "apb0_uart", "apb0_1wire",
878 "apb0_i2c";
879 };
880
Hans de Goede9b5c6e02014-12-17 18:18:19 +0100881 ir_clk: ir_clk {
882 #clock-cells = <0>;
883 compatible = "allwinner,sun4i-a10-mod0-clk";
884 clocks = <&osc32k>, <&osc24M>;
885 clock-output-names = "ir";
886 };
887
Boris BREZILLONcc08f5e2014-05-14 14:38:21 +0200888 apb0_rst: apb0_rst {
889 compatible = "allwinner,sun6i-a31-clock-reset";
890 #reset-cells = <1>;
891 };
Hans de Goedea42ea602014-04-13 13:41:02 +0200892 };
893
Maxime Ripard81ee4292013-11-03 10:30:12 +0100894 cpucfg@01f01c00 {
895 compatible = "allwinner,sun6i-a31-cpuconfig";
896 reg = <0x01f01c00 0x300>;
897 };
Boris BREZILLON209394a2014-05-13 16:03:03 +0200898
Hans de Goede4ac367b2014-12-29 12:09:24 +0100899 ir: ir@01f02000 {
900 compatible = "allwinner,sun5i-a13-ir";
901 clocks = <&apb0_gates 1>, <&ir_clk>;
902 clock-names = "apb", "ir";
903 resets = <&apb0_rst 1>;
904 interrupts = <0 37 4>;
905 reg = <0x01f02000 0x40>;
906 status = "disabled";
907 };
908
Boris BREZILLON209394a2014-05-13 16:03:03 +0200909 r_pio: pinctrl@01f02c00 {
910 compatible = "allwinner,sun6i-a31-r-pinctrl";
911 reg = <0x01f02c00 0x400>;
912 interrupts = <0 45 4>,
913 <0 46 4>;
914 clocks = <&apb0_gates 0>;
915 resets = <&apb0_rst 0>;
916 gpio-controller;
917 interrupt-controller;
Chen-Yu Tsai7d4ff962014-06-30 23:57:51 +0200918 #interrupt-cells = <2>;
Boris BREZILLON209394a2014-05-13 16:03:03 +0200919 #size-cells = <0>;
920 #gpio-cells = <3>;
Hans de Goededbbcd882014-11-23 14:38:14 +0100921
922 ir_pins_a: ir@0 {
923 allwinner,pins = "PL4";
924 allwinner,function = "s_ir";
925 allwinner,drive = <0>;
926 allwinner,pull = <0>;
927 };
Boris BREZILLON209394a2014-05-13 16:03:03 +0200928 };
Maxime Ripard8aed3b32013-03-10 16:09:06 +0100929 };
930};