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";
92 compatible = "fixed-factor-clock";
97 clock-output-names = "osc3M";
102 compatible = "fixed-clock";
103 clock-frequency = <32768>;
104 clock-output-names = "osc32k";
109 compatible = "allwinner,sun4i-a10-pll1-clk";
110 reg = <0x01c20000 0x4>;
112 clock-output-names = "pll1";
117 compatible = "allwinner,sun5i-a13-pll2-clk";
118 reg = <0x01c20008 0x8>;
120 clock-output-names = "pll2-1x", "pll2-2x",
121 "pll2-4x", "pll2-8x";
126 compatible = "allwinner,sun4i-a10-pll3-clk";
127 reg = <0x01c20010 0x4>;
129 clock-output-names = "pll3";
133 compatible = "allwinner,sun4i-a10-pll3-2x-clk", "fixed-factor-clock";
138 clock-output-names = "pll3-2x";
143 compatible = "allwinner,sun4i-a10-pll1-clk";
144 reg = <0x01c20018 0x4>;
146 clock-output-names = "pll4";
151 compatible = "allwinner,sun4i-a10-pll5-clk";
152 reg = <0x01c20020 0x4>;
154 clock-output-names = "pll5_ddr", "pll5_other";
159 compatible = "allwinner,sun4i-a10-pll6-clk";
160 reg = <0x01c20028 0x4>;
162 clock-output-names = "pll6_sata", "pll6_other", "pll6";
167 compatible = "allwinner,sun4i-a10-pll3-clk";
168 reg = <0x01c20030 0x4>;
170 clock-output-names = "pll7";
174 compatible = "fixed-factor-clock";
179 clock-output-names = "pll7-2x";
185 compatible = "allwinner,sun4i-a10-cpu-clk";
186 reg = <0x01c20054 0x4>;
187 clocks = <&osc32k>, <&osc24M>, <&pll1>, <&dummy>;
188 clock-output-names = "cpu";
193 compatible = "allwinner,sun4i-a10-axi-clk";
194 reg = <0x01c20054 0x4>;
196 clock-output-names = "axi";
201 compatible = "allwinner,sun5i-a13-ahb-clk";
202 reg = <0x01c20054 0x4>;
203 clocks = <&axi>, <&cpu>, <&pll6 1>;
204 clock-output-names = "ahb";
206 * Use PLL6 as parent, instead of CPU/AXI
207 * which has rate changes due to cpufreq
209 assigned-clocks = <&ahb>;
210 assigned-clock-parents = <&pll6 1>;
213 apb0: apb0@01c20054 {
215 compatible = "allwinner,sun4i-a10-apb0-clk";
216 reg = <0x01c20054 0x4>;
218 clock-output-names = "apb0";
223 compatible = "allwinner,sun4i-a10-apb1-clk";
224 reg = <0x01c20058 0x4>;
225 clocks = <&osc24M>, <&pll6 1>, <&osc32k>;
226 clock-output-names = "apb1";
229 axi_gates: clk@01c2005c {
231 compatible = "allwinner,sun4i-a10-axi-gates-clk";
232 reg = <0x01c2005c 0x4>;
235 clock-output-names = "axi_dram";
238 nand_clk: clk@01c20080 {
240 compatible = "allwinner,sun4i-a10-mod0-clk";
241 reg = <0x01c20080 0x4>;
242 clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
243 clock-output-names = "nand";
246 ms_clk: clk@01c20084 {
248 compatible = "allwinner,sun4i-a10-mod0-clk";
249 reg = <0x01c20084 0x4>;
250 clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
251 clock-output-names = "ms";
254 mmc0_clk: clk@01c20088 {
256 compatible = "allwinner,sun4i-a10-mmc-clk";
257 reg = <0x01c20088 0x4>;
258 clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
259 clock-output-names = "mmc0",
264 mmc1_clk: clk@01c2008c {
266 compatible = "allwinner,sun4i-a10-mmc-clk";
267 reg = <0x01c2008c 0x4>;
268 clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
269 clock-output-names = "mmc1",
274 mmc2_clk: clk@01c20090 {
276 compatible = "allwinner,sun4i-a10-mmc-clk";
277 reg = <0x01c20090 0x4>;
278 clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
279 clock-output-names = "mmc2",
284 ts_clk: clk@01c20098 {
286 compatible = "allwinner,sun4i-a10-mod0-clk";
287 reg = <0x01c20098 0x4>;
288 clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
289 clock-output-names = "ts";
292 ss_clk: clk@01c2009c {
294 compatible = "allwinner,sun4i-a10-mod0-clk";
295 reg = <0x01c2009c 0x4>;
296 clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
297 clock-output-names = "ss";
300 spi0_clk: clk@01c200a0 {
302 compatible = "allwinner,sun4i-a10-mod0-clk";
303 reg = <0x01c200a0 0x4>;
304 clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
305 clock-output-names = "spi0";
308 spi1_clk: clk@01c200a4 {
310 compatible = "allwinner,sun4i-a10-mod0-clk";
311 reg = <0x01c200a4 0x4>;
312 clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
313 clock-output-names = "spi1";
316 spi2_clk: clk@01c200a8 {
318 compatible = "allwinner,sun4i-a10-mod0-clk";
319 reg = <0x01c200a8 0x4>;
320 clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
321 clock-output-names = "spi2";
324 ir0_clk: clk@01c200b0 {
326 compatible = "allwinner,sun4i-a10-mod0-clk";
327 reg = <0x01c200b0 0x4>;
328 clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
329 clock-output-names = "ir0";
332 usb_clk: clk@01c200cc {
335 compatible = "allwinner,sun5i-a13-usb-clk";
336 reg = <0x01c200cc 0x4>;
338 clock-output-names = "usb_ohci0", "usb_phy";
341 codec_clk: clk@01c20140 {
343 compatible = "allwinner,sun4i-a10-codec-clk";
344 reg = <0x01c20140 0x4>;
345 clocks = <&pll2 SUN4I_A10_PLL2_1X>;
346 clock-output-names = "codec";
349 mbus_clk: clk@01c2015c {
351 compatible = "allwinner,sun5i-a13-mbus-clk";
352 reg = <0x01c2015c 0x4>;
353 clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
354 clock-output-names = "mbus";
359 compatible = "simple-bus";
360 #address-cells = <1>;
364 sram-controller@01c00000 {
365 compatible = "allwinner,sun4i-a10-sram-controller";
366 reg = <0x01c00000 0x30>;
367 #address-cells = <1>;
371 sram_a: sram@00000000 {
372 compatible = "mmio-sram";
373 reg = <0x00000000 0xc000>;
374 #address-cells = <1>;
376 ranges = <0 0x00000000 0xc000>;
379 sram_d: sram@00010000 {
380 compatible = "mmio-sram";
381 reg = <0x00010000 0x1000>;
382 #address-cells = <1>;
384 ranges = <0 0x00010000 0x1000>;
386 otg_sram: sram-section@0000 {
387 compatible = "allwinner,sun4i-a10-sram-d";
388 reg = <0x0000 0x1000>;
394 dma: dma-controller@01c02000 {
395 compatible = "allwinner,sun4i-a10-dma";
396 reg = <0x01c02000 0x1000>;
398 clocks = <&ahb_gates 6>;
403 compatible = "allwinner,sun4i-a10-spi";
404 reg = <0x01c05000 0x1000>;
406 clocks = <&ahb_gates 20>, <&spi0_clk>;
407 clock-names = "ahb", "mod";
408 dmas = <&dma SUN4I_DMA_DEDICATED 27>,
409 <&dma SUN4I_DMA_DEDICATED 26>;
410 dma-names = "rx", "tx";
412 #address-cells = <1>;
417 compatible = "allwinner,sun4i-a10-spi";
418 reg = <0x01c06000 0x1000>;
420 clocks = <&ahb_gates 21>, <&spi1_clk>;
421 clock-names = "ahb", "mod";
422 dmas = <&dma SUN4I_DMA_DEDICATED 9>,
423 <&dma SUN4I_DMA_DEDICATED 8>;
424 dma-names = "rx", "tx";
426 #address-cells = <1>;
431 compatible = "allwinner,sun5i-a13-mmc";
432 reg = <0x01c0f000 0x1000>;
433 clocks = <&ahb_gates 8>,
443 #address-cells = <1>;
448 compatible = "allwinner,sun5i-a13-mmc";
449 reg = <0x01c10000 0x1000>;
450 clocks = <&ahb_gates 9>,
460 #address-cells = <1>;
465 compatible = "allwinner,sun5i-a13-mmc";
466 reg = <0x01c11000 0x1000>;
467 clocks = <&ahb_gates 10>,
477 #address-cells = <1>;
481 usb_otg: usb@01c13000 {
482 compatible = "allwinner,sun4i-a10-musb";
483 reg = <0x01c13000 0x0400>;
484 clocks = <&ahb_gates 0>;
486 interrupt-names = "mc";
489 extcon = <&usbphy 0>;
490 allwinner,sram = <&otg_sram 1>;
494 usbphy: phy@01c13400 {
496 compatible = "allwinner,sun5i-a13-usb-phy";
497 reg = <0x01c13400 0x10 0x01c14800 0x4>;
498 reg-names = "phy_ctrl", "pmu1";
499 clocks = <&usb_clk 8>;
500 clock-names = "usb_phy";
501 resets = <&usb_clk 0>, <&usb_clk 1>;
502 reset-names = "usb0_reset", "usb1_reset";
506 ehci0: usb@01c14000 {
507 compatible = "allwinner,sun5i-a13-ehci", "generic-ehci";
508 reg = <0x01c14000 0x100>;
510 clocks = <&ahb_gates 1>;
516 ohci0: usb@01c14400 {
517 compatible = "allwinner,sun5i-a13-ohci", "generic-ohci";
518 reg = <0x01c14400 0x100>;
520 clocks = <&usb_clk 6>, <&ahb_gates 2>;
527 compatible = "allwinner,sun4i-a10-spi";
528 reg = <0x01c17000 0x1000>;
530 clocks = <&ahb_gates 22>, <&spi2_clk>;
531 clock-names = "ahb", "mod";
532 dmas = <&dma SUN4I_DMA_DEDICATED 29>,
533 <&dma SUN4I_DMA_DEDICATED 28>;
534 dma-names = "rx", "tx";
536 #address-cells = <1>;
540 intc: interrupt-controller@01c20400 {
541 compatible = "allwinner,sun4i-a10-ic";
542 reg = <0x01c20400 0x400>;
543 interrupt-controller;
544 #interrupt-cells = <1>;
547 pio: pinctrl@01c20800 {
548 reg = <0x01c20800 0x400>;
550 clocks = <&apb0_gates 5>;
552 interrupt-controller;
553 #interrupt-cells = <3>;
556 i2c0_pins_a: i2c0@0 {
557 allwinner,pins = "PB0", "PB1";
558 allwinner,function = "i2c0";
559 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
560 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
563 i2c1_pins_a: i2c1@0 {
564 allwinner,pins = "PB15", "PB16";
565 allwinner,function = "i2c1";
566 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
567 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
570 i2c2_pins_a: i2c2@0 {
571 allwinner,pins = "PB17", "PB18";
572 allwinner,function = "i2c2";
573 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
574 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
577 mmc0_pins_a: mmc0@0 {
578 allwinner,pins = "PF0", "PF1", "PF2", "PF3",
580 allwinner,function = "mmc0";
581 allwinner,drive = <SUN4I_PINCTRL_30_MA>;
582 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
585 mmc2_pins_a: mmc2@0 {
586 allwinner,pins = "PC6", "PC7", "PC8", "PC9",
587 "PC10", "PC11", "PC12", "PC13",
589 allwinner,function = "mmc2";
590 allwinner,drive = <SUN4I_PINCTRL_30_MA>;
591 allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
594 uart3_pins_a: uart3@0 {
595 allwinner,pins = "PG9", "PG10";
596 allwinner,function = "uart3";
597 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
598 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
601 uart3_pins_cts_rts_a: uart3-cts-rts@0 {
602 allwinner,pins = "PG11", "PG12";
603 allwinner,function = "uart3";
604 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
605 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
609 allwinner,pins = "PB2";
610 allwinner,function = "pwm";
611 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
612 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
617 compatible = "allwinner,sun4i-a10-timer";
618 reg = <0x01c20c00 0x90>;
623 wdt: watchdog@01c20c90 {
624 compatible = "allwinner,sun4i-a10-wdt";
625 reg = <0x01c20c90 0x10>;
628 lradc: lradc@01c22800 {
629 compatible = "allwinner,sun4i-a10-lradc-keys";
630 reg = <0x01c22800 0x100>;
635 codec: codec@01c22c00 {
636 #sound-dai-cells = <0>;
637 compatible = "allwinner,sun4i-a10-codec";
638 reg = <0x01c22c00 0x40>;
640 clocks = <&apb0_gates 0>, <&codec_clk>;
641 clock-names = "apb", "codec";
642 dmas = <&dma SUN4I_DMA_NORMAL 19>,
643 <&dma SUN4I_DMA_NORMAL 19>;
644 dma-names = "rx", "tx";
648 sid: eeprom@01c23800 {
649 compatible = "allwinner,sun4i-a10-sid";
650 reg = <0x01c23800 0x10>;
654 compatible = "allwinner,sun5i-a13-ts";
655 reg = <0x01c25000 0x100>;
657 #thermal-sensor-cells = <0>;
660 uart1: serial@01c28400 {
661 compatible = "snps,dw-apb-uart";
662 reg = <0x01c28400 0x400>;
666 clocks = <&apb1_gates 17>;
670 uart3: serial@01c28c00 {
671 compatible = "snps,dw-apb-uart";
672 reg = <0x01c28c00 0x400>;
676 clocks = <&apb1_gates 19>;
681 compatible = "allwinner,sun4i-a10-i2c";
682 reg = <0x01c2ac00 0x400>;
684 clocks = <&apb1_gates 0>;
686 #address-cells = <1>;
691 compatible = "allwinner,sun4i-a10-i2c";
692 reg = <0x01c2b000 0x400>;
694 clocks = <&apb1_gates 1>;
696 #address-cells = <1>;
701 compatible = "allwinner,sun4i-a10-i2c";
702 reg = <0x01c2b400 0x400>;
704 clocks = <&apb1_gates 2>;
706 #address-cells = <1>;
711 compatible = "allwinner,sun5i-a13-hstimer";
712 reg = <0x01c60000 0x1000>;
713 interrupts = <82>, <83>;
714 clocks = <&ahb_gates 28>;