2 * Copyright 2012-2015 Maxime Ripard
4 * Maxime Ripard <maxime.ripard@free-electrons.com>
6 * 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
11 * a) This library is free software; you can redistribute it and/or
12 * 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.
16 * This library is distributed in the hope that it will be useful,
17 * 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.
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
32 * The above copyright notice and this permission notice shall be
33 * included in all copies or substantial portions of the Software.
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.
45 #include "skeleton.dtsi"
47 #include <dt-bindings/clock/sun4i-a10-pll2.h>
48 #include <dt-bindings/dma/sun4i-a10.h>
49 #include <dt-bindings/pinctrl/sun4i-a10.h>
52 interrupt-parent = <&intc>;
60 compatible = "arm,cortex-a8";
72 * This is a dummy clock, to be used as placeholder on
73 * other mux clocks when a specific parent clock is not
74 * yet implemented. It should be dropped when the driver
79 compatible = "fixed-clock";
80 clock-frequency = <0>;
83 osc24M: clk@01c20050 {
85 compatible = "allwinner,sun4i-a10-osc-clk";
86 reg = <0x01c20050 0x4>;
87 clock-frequency = <24000000>;
88 clock-output-names = "osc24M";
93 compatible = "fixed-clock";
94 clock-frequency = <32768>;
95 clock-output-names = "osc32k";
100 compatible = "allwinner,sun4i-a10-pll1-clk";
101 reg = <0x01c20000 0x4>;
103 clock-output-names = "pll1";
108 compatible = "allwinner,sun5i-a13-pll2-clk";
109 reg = <0x01c20008 0x8>;
111 clock-output-names = "pll2-1x", "pll2-2x",
112 "pll2-4x", "pll2-8x";
117 compatible = "allwinner,sun4i-a10-pll1-clk";
118 reg = <0x01c20018 0x4>;
120 clock-output-names = "pll4";
125 compatible = "allwinner,sun4i-a10-pll5-clk";
126 reg = <0x01c20020 0x4>;
128 clock-output-names = "pll5_ddr", "pll5_other";
133 compatible = "allwinner,sun4i-a10-pll6-clk";
134 reg = <0x01c20028 0x4>;
136 clock-output-names = "pll6_sata", "pll6_other", "pll6";
142 compatible = "allwinner,sun4i-a10-cpu-clk";
143 reg = <0x01c20054 0x4>;
144 clocks = <&osc32k>, <&osc24M>, <&pll1>, <&dummy>;
145 clock-output-names = "cpu";
150 compatible = "allwinner,sun4i-a10-axi-clk";
151 reg = <0x01c20054 0x4>;
153 clock-output-names = "axi";
158 compatible = "allwinner,sun5i-a13-ahb-clk";
159 reg = <0x01c20054 0x4>;
160 clocks = <&axi>, <&cpu>, <&pll6 1>;
161 clock-output-names = "ahb";
163 * Use PLL6 as parent, instead of CPU/AXI
164 * which has rate changes due to cpufreq
166 assigned-clocks = <&ahb>;
167 assigned-clock-parents = <&pll6 1>;
170 apb0: apb0@01c20054 {
172 compatible = "allwinner,sun4i-a10-apb0-clk";
173 reg = <0x01c20054 0x4>;
175 clock-output-names = "apb0";
180 compatible = "allwinner,sun4i-a10-apb1-clk";
181 reg = <0x01c20058 0x4>;
182 clocks = <&osc24M>, <&pll6 1>, <&osc32k>;
183 clock-output-names = "apb1";
186 axi_gates: clk@01c2005c {
188 compatible = "allwinner,sun4i-a10-axi-gates-clk";
189 reg = <0x01c2005c 0x4>;
192 clock-output-names = "axi_dram";
195 nand_clk: clk@01c20080 {
197 compatible = "allwinner,sun4i-a10-mod0-clk";
198 reg = <0x01c20080 0x4>;
199 clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
200 clock-output-names = "nand";
203 ms_clk: clk@01c20084 {
205 compatible = "allwinner,sun4i-a10-mod0-clk";
206 reg = <0x01c20084 0x4>;
207 clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
208 clock-output-names = "ms";
211 mmc0_clk: clk@01c20088 {
213 compatible = "allwinner,sun4i-a10-mmc-clk";
214 reg = <0x01c20088 0x4>;
215 clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
216 clock-output-names = "mmc0",
221 mmc1_clk: clk@01c2008c {
223 compatible = "allwinner,sun4i-a10-mmc-clk";
224 reg = <0x01c2008c 0x4>;
225 clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
226 clock-output-names = "mmc1",
231 mmc2_clk: clk@01c20090 {
233 compatible = "allwinner,sun4i-a10-mmc-clk";
234 reg = <0x01c20090 0x4>;
235 clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
236 clock-output-names = "mmc2",
241 ts_clk: clk@01c20098 {
243 compatible = "allwinner,sun4i-a10-mod0-clk";
244 reg = <0x01c20098 0x4>;
245 clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
246 clock-output-names = "ts";
249 ss_clk: clk@01c2009c {
251 compatible = "allwinner,sun4i-a10-mod0-clk";
252 reg = <0x01c2009c 0x4>;
253 clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
254 clock-output-names = "ss";
257 spi0_clk: clk@01c200a0 {
259 compatible = "allwinner,sun4i-a10-mod0-clk";
260 reg = <0x01c200a0 0x4>;
261 clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
262 clock-output-names = "spi0";
265 spi1_clk: clk@01c200a4 {
267 compatible = "allwinner,sun4i-a10-mod0-clk";
268 reg = <0x01c200a4 0x4>;
269 clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
270 clock-output-names = "spi1";
273 spi2_clk: clk@01c200a8 {
275 compatible = "allwinner,sun4i-a10-mod0-clk";
276 reg = <0x01c200a8 0x4>;
277 clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
278 clock-output-names = "spi2";
281 ir0_clk: clk@01c200b0 {
283 compatible = "allwinner,sun4i-a10-mod0-clk";
284 reg = <0x01c200b0 0x4>;
285 clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
286 clock-output-names = "ir0";
289 usb_clk: clk@01c200cc {
292 compatible = "allwinner,sun5i-a13-usb-clk";
293 reg = <0x01c200cc 0x4>;
295 clock-output-names = "usb_ohci0", "usb_phy";
298 codec_clk: clk@01c20140 {
300 compatible = "allwinner,sun4i-a10-codec-clk";
301 reg = <0x01c20140 0x4>;
302 clocks = <&pll2 SUN4I_A10_PLL2_1X>;
303 clock-output-names = "codec";
306 mbus_clk: clk@01c2015c {
308 compatible = "allwinner,sun5i-a13-mbus-clk";
309 reg = <0x01c2015c 0x4>;
310 clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
311 clock-output-names = "mbus";
316 compatible = "simple-bus";
317 #address-cells = <1>;
321 sram-controller@01c00000 {
322 compatible = "allwinner,sun4i-a10-sram-controller";
323 reg = <0x01c00000 0x30>;
324 #address-cells = <1>;
328 sram_a: sram@00000000 {
329 compatible = "mmio-sram";
330 reg = <0x00000000 0xc000>;
331 #address-cells = <1>;
333 ranges = <0 0x00000000 0xc000>;
336 sram_d: sram@00010000 {
337 compatible = "mmio-sram";
338 reg = <0x00010000 0x1000>;
339 #address-cells = <1>;
341 ranges = <0 0x00010000 0x1000>;
343 otg_sram: sram-section@0000 {
344 compatible = "allwinner,sun4i-a10-sram-d";
345 reg = <0x0000 0x1000>;
351 dma: dma-controller@01c02000 {
352 compatible = "allwinner,sun4i-a10-dma";
353 reg = <0x01c02000 0x1000>;
355 clocks = <&ahb_gates 6>;
360 compatible = "allwinner,sun4i-a10-spi";
361 reg = <0x01c05000 0x1000>;
363 clocks = <&ahb_gates 20>, <&spi0_clk>;
364 clock-names = "ahb", "mod";
365 dmas = <&dma SUN4I_DMA_DEDICATED 27>,
366 <&dma SUN4I_DMA_DEDICATED 26>;
367 dma-names = "rx", "tx";
369 #address-cells = <1>;
374 compatible = "allwinner,sun4i-a10-spi";
375 reg = <0x01c06000 0x1000>;
377 clocks = <&ahb_gates 21>, <&spi1_clk>;
378 clock-names = "ahb", "mod";
379 dmas = <&dma SUN4I_DMA_DEDICATED 9>,
380 <&dma SUN4I_DMA_DEDICATED 8>;
381 dma-names = "rx", "tx";
383 #address-cells = <1>;
388 compatible = "allwinner,sun5i-a13-mmc";
389 reg = <0x01c0f000 0x1000>;
390 clocks = <&ahb_gates 8>,
400 #address-cells = <1>;
405 compatible = "allwinner,sun5i-a13-mmc";
406 reg = <0x01c10000 0x1000>;
407 clocks = <&ahb_gates 9>,
417 #address-cells = <1>;
422 compatible = "allwinner,sun5i-a13-mmc";
423 reg = <0x01c11000 0x1000>;
424 clocks = <&ahb_gates 10>,
434 #address-cells = <1>;
438 usb_otg: usb@01c13000 {
439 compatible = "allwinner,sun4i-a10-musb";
440 reg = <0x01c13000 0x0400>;
441 clocks = <&ahb_gates 0>;
443 interrupt-names = "mc";
446 extcon = <&usbphy 0>;
447 allwinner,sram = <&otg_sram 1>;
451 usbphy: phy@01c13400 {
453 compatible = "allwinner,sun5i-a13-usb-phy";
454 reg = <0x01c13400 0x10 0x01c14800 0x4>;
455 reg-names = "phy_ctrl", "pmu1";
456 clocks = <&usb_clk 8>;
457 clock-names = "usb_phy";
458 resets = <&usb_clk 0>, <&usb_clk 1>;
459 reset-names = "usb0_reset", "usb1_reset";
463 ehci0: usb@01c14000 {
464 compatible = "allwinner,sun5i-a13-ehci", "generic-ehci";
465 reg = <0x01c14000 0x100>;
467 clocks = <&ahb_gates 1>;
473 ohci0: usb@01c14400 {
474 compatible = "allwinner,sun5i-a13-ohci", "generic-ohci";
475 reg = <0x01c14400 0x100>;
477 clocks = <&usb_clk 6>, <&ahb_gates 2>;
484 compatible = "allwinner,sun4i-a10-spi";
485 reg = <0x01c17000 0x1000>;
487 clocks = <&ahb_gates 22>, <&spi2_clk>;
488 clock-names = "ahb", "mod";
489 dmas = <&dma SUN4I_DMA_DEDICATED 29>,
490 <&dma SUN4I_DMA_DEDICATED 28>;
491 dma-names = "rx", "tx";
493 #address-cells = <1>;
497 intc: interrupt-controller@01c20400 {
498 compatible = "allwinner,sun4i-a10-ic";
499 reg = <0x01c20400 0x400>;
500 interrupt-controller;
501 #interrupt-cells = <1>;
504 pio: pinctrl@01c20800 {
505 reg = <0x01c20800 0x400>;
507 clocks = <&apb0_gates 5>;
509 interrupt-controller;
510 #interrupt-cells = <3>;
513 i2c0_pins_a: i2c0@0 {
514 allwinner,pins = "PB0", "PB1";
515 allwinner,function = "i2c0";
516 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
517 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
520 i2c1_pins_a: i2c1@0 {
521 allwinner,pins = "PB15", "PB16";
522 allwinner,function = "i2c1";
523 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
524 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
527 i2c2_pins_a: i2c2@0 {
528 allwinner,pins = "PB17", "PB18";
529 allwinner,function = "i2c2";
530 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
531 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
534 mmc0_pins_a: mmc0@0 {
535 allwinner,pins = "PF0", "PF1", "PF2", "PF3",
537 allwinner,function = "mmc0";
538 allwinner,drive = <SUN4I_PINCTRL_30_MA>;
539 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
542 mmc2_pins_a: mmc2@0 {
543 allwinner,pins = "PC6", "PC7", "PC8", "PC9",
544 "PC10", "PC11", "PC12", "PC13",
546 allwinner,function = "mmc2";
547 allwinner,drive = <SUN4I_PINCTRL_30_MA>;
548 allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
551 uart3_pins_a: uart3@0 {
552 allwinner,pins = "PG9", "PG10";
553 allwinner,function = "uart3";
554 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
555 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
558 uart3_pins_cts_rts_a: uart3-cts-rts@0 {
559 allwinner,pins = "PG11", "PG12";
560 allwinner,function = "uart3";
561 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
562 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
566 allwinner,pins = "PB2";
567 allwinner,function = "pwm";
568 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
569 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
574 compatible = "allwinner,sun4i-a10-timer";
575 reg = <0x01c20c00 0x90>;
580 wdt: watchdog@01c20c90 {
581 compatible = "allwinner,sun4i-a10-wdt";
582 reg = <0x01c20c90 0x10>;
585 lradc: lradc@01c22800 {
586 compatible = "allwinner,sun4i-a10-lradc-keys";
587 reg = <0x01c22800 0x100>;
592 codec: codec@01c22c00 {
593 #sound-dai-cells = <0>;
594 compatible = "allwinner,sun4i-a10-codec";
595 reg = <0x01c22c00 0x40>;
597 clocks = <&apb0_gates 0>, <&codec_clk>;
598 clock-names = "apb", "codec";
599 dmas = <&dma SUN4I_DMA_NORMAL 19>,
600 <&dma SUN4I_DMA_NORMAL 19>;
601 dma-names = "rx", "tx";
605 sid: eeprom@01c23800 {
606 compatible = "allwinner,sun4i-a10-sid";
607 reg = <0x01c23800 0x10>;
611 compatible = "allwinner,sun5i-a13-ts";
612 reg = <0x01c25000 0x100>;
614 #thermal-sensor-cells = <0>;
617 uart1: serial@01c28400 {
618 compatible = "snps,dw-apb-uart";
619 reg = <0x01c28400 0x400>;
623 clocks = <&apb1_gates 17>;
627 uart3: serial@01c28c00 {
628 compatible = "snps,dw-apb-uart";
629 reg = <0x01c28c00 0x400>;
633 clocks = <&apb1_gates 19>;
638 compatible = "allwinner,sun4i-a10-i2c";
639 reg = <0x01c2ac00 0x400>;
641 clocks = <&apb1_gates 0>;
643 #address-cells = <1>;
648 compatible = "allwinner,sun4i-a10-i2c";
649 reg = <0x01c2b000 0x400>;
651 clocks = <&apb1_gates 1>;
653 #address-cells = <1>;
658 compatible = "allwinner,sun4i-a10-i2c";
659 reg = <0x01c2b400 0x400>;
661 clocks = <&apb1_gates 2>;
663 #address-cells = <1>;
668 compatible = "allwinner,sun5i-a13-hstimer";
669 reg = <0x01c60000 0x1000>;
670 interrupts = <82>, <83>;
671 clocks = <&ahb_gates 28>;