2 * Copyright (c) 2013 MundoReader S.L.
3 * Author: Heiko Stuebner <heiko@sntech.de>
5 * This file is dual-licensed: you can use it either under the terms
6 * of the GPL or the X11 license, at your option. Note that this dual
7 * licensing only applies to this file, and not this project as a
10 * a) This file is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License as
12 * published by the Free Software Foundation; either version 2 of the
13 * License, or (at your option) any later version.
15 * This file is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
22 * b) Permission is hereby granted, free of charge, to any person
23 * obtaining a copy of this software and associated documentation
24 * files (the "Software"), to deal in the Software without
25 * restriction, including without limitation the rights to use,
26 * copy, modify, merge, publish, distribute, sublicense, and/or
27 * sell copies of the Software, and to permit persons to whom the
28 * Software is furnished to do so, subject to the following
31 * The above copyright notice and this permission notice shall be
32 * included in all copies or substantial portions of the Software.
34 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
35 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
36 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
37 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
38 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
39 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
40 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
41 * OTHER DEALINGS IN THE SOFTWARE.
44 #include <dt-bindings/gpio/gpio.h>
45 #include <dt-bindings/pinctrl/rockchip.h>
46 #include <dt-bindings/clock/rk3188-cru.h>
47 #include "rk3xxx.dtsi"
50 compatible = "rockchip,rk3188";
55 enable-method = "rockchip,rk3066-smp";
59 compatible = "arm,cortex-a9";
60 next-level-cache = <&L2>;
73 clock-latency = <40000>;
74 clocks = <&cru ARMCLK>;
78 compatible = "arm,cortex-a9";
79 next-level-cache = <&L2>;
84 compatible = "arm,cortex-a9";
85 next-level-cache = <&L2>;
90 compatible = "arm,cortex-a9";
91 next-level-cache = <&L2>;
97 compatible = "mmio-sram";
98 reg = <0x10080000 0x8000>;
101 ranges = <0 0x10080000 0x8000>;
104 compatible = "rockchip,rk3066-smp-sram";
109 timer3: timer@2000e000 {
110 compatible = "rockchip,rk3188-timer", "rockchip,rk3288-timer";
111 reg = <0x2000e000 0x20>;
112 interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
113 clocks = <&cru SCLK_TIMER3>, <&cru PCLK_TIMER3>;
114 clock-names = "timer", "pclk";
117 timer6: timer@200380a0 {
118 compatible = "rockchip,rk3188-timer", "rockchip,rk3288-timer";
119 reg = <0x200380a0 0x20>;
120 interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>;
121 clocks = <&cru SCLK_TIMER6>, <&cru PCLK_TIMER0>;
122 clock-names = "timer", "pclk";
126 compatible = "rockchip,rk3188-i2s", "rockchip,rk3066-i2s";
127 reg = <0x1011a000 0x2000>;
128 interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
129 #address-cells = <1>;
131 pinctrl-names = "default";
132 pinctrl-0 = <&i2s0_bus>;
133 dmas = <&dmac1_s 6>, <&dmac1_s 7>;
134 dma-names = "tx", "rx";
135 clock-names = "i2s_hclk", "i2s_clk";
136 clocks = <&cru HCLK_I2S0>, <&cru SCLK_I2S0>;
137 rockchip,playback-channels = <2>;
138 rockchip,capture-channels = <2>;
142 spdif: sound@1011e000 {
143 compatible = "rockchip,rk3188-spdif", "rockchip,rk3066-spdif";
144 reg = <0x1011e000 0x2000>;
145 #sound-dai-cells = <0>;
146 clock-names = "hclk", "mclk";
147 clocks = <&cru HCLK_SPDIF>, <&cru SCLK_SPDIF>;
150 interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
151 pinctrl-names = "default";
152 pinctrl-0 = <&spdif_tx>;
156 cru: clock-controller@20000000 {
157 compatible = "rockchip,rk3188-cru";
158 reg = <0x20000000 0x1000>;
159 rockchip,grf = <&grf>;
165 efuse: efuse@20010000 {
166 compatible = "rockchip,rk3188-efuse";
167 reg = <0x20010000 0x4000>;
168 #address-cells = <1>;
170 clocks = <&cru PCLK_EFUSE>;
171 clock-names = "pclk_efuse";
173 cpu_leakage: cpu_leakage@17 {
179 compatible = "rockchip,rk3188-usb-phy", "rockchip,rk3288-usb-phy";
180 rockchip,grf = <&grf>;
181 #address-cells = <1>;
185 usbphy0: usb-phy@10c {
188 clocks = <&cru SCLK_OTGPHY0>;
189 clock-names = "phyclk";
193 usbphy1: usb-phy@11c {
196 clocks = <&cru SCLK_OTGPHY1>;
197 clock-names = "phyclk";
203 compatible = "rockchip,rk3188-pinctrl";
204 rockchip,grf = <&grf>;
205 rockchip,pmu = <&pmu>;
207 #address-cells = <1>;
211 gpio0: gpio0@2000a000 {
212 compatible = "rockchip,rk3188-gpio-bank0";
213 reg = <0x2000a000 0x100>;
214 interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
215 clocks = <&cru PCLK_GPIO0>;
220 interrupt-controller;
221 #interrupt-cells = <2>;
224 gpio1: gpio1@2003c000 {
225 compatible = "rockchip,gpio-bank";
226 reg = <0x2003c000 0x100>;
227 interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
228 clocks = <&cru PCLK_GPIO1>;
233 interrupt-controller;
234 #interrupt-cells = <2>;
237 gpio2: gpio2@2003e000 {
238 compatible = "rockchip,gpio-bank";
239 reg = <0x2003e000 0x100>;
240 interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>;
241 clocks = <&cru PCLK_GPIO2>;
246 interrupt-controller;
247 #interrupt-cells = <2>;
250 gpio3: gpio3@20080000 {
251 compatible = "rockchip,gpio-bank";
252 reg = <0x20080000 0x100>;
253 interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
254 clocks = <&cru PCLK_GPIO3>;
259 interrupt-controller;
260 #interrupt-cells = <2>;
263 pcfg_pull_up: pcfg_pull_up {
267 pcfg_pull_down: pcfg_pull_down {
271 pcfg_pull_none: pcfg_pull_none {
277 rockchip,pins = <RK_GPIO0 24 RK_FUNC_2 &pcfg_pull_none>;
281 rockchip,pins = <RK_GPIO0 26 RK_FUNC_2 &pcfg_pull_up>;
285 rockchip,pins = <RK_GPIO0 27 RK_FUNC_2 &pcfg_pull_none>;
289 * The data pins are shared between nandc and emmc and
290 * not accessible through pinctrl. Also they should've
291 * been already set correctly by firmware, as
292 * flash/emmc is the boot-device.
297 emac_xfer: emac-xfer {
298 rockchip,pins = <RK_GPIO3 16 RK_FUNC_2 &pcfg_pull_none>, /* tx_en */
299 <RK_GPIO3 17 RK_FUNC_2 &pcfg_pull_none>, /* txd1 */
300 <RK_GPIO3 18 RK_FUNC_2 &pcfg_pull_none>, /* txd0 */
301 <RK_GPIO3 19 RK_FUNC_2 &pcfg_pull_none>, /* rxd0 */
302 <RK_GPIO3 20 RK_FUNC_2 &pcfg_pull_none>, /* rxd1 */
303 <RK_GPIO3 21 RK_FUNC_2 &pcfg_pull_none>, /* mac_clk */
304 <RK_GPIO3 22 RK_FUNC_2 &pcfg_pull_none>, /* rx_err */
305 <RK_GPIO3 23 RK_FUNC_2 &pcfg_pull_none>; /* crs_dvalid */
308 emac_mdio: emac-mdio {
309 rockchip,pins = <RK_GPIO3 24 RK_FUNC_2 &pcfg_pull_none>,
310 <RK_GPIO3 25 RK_FUNC_2 &pcfg_pull_none>;
315 i2c0_xfer: i2c0-xfer {
316 rockchip,pins = <RK_GPIO1 24 RK_FUNC_1 &pcfg_pull_none>,
317 <RK_GPIO1 25 RK_FUNC_1 &pcfg_pull_none>;
322 i2c1_xfer: i2c1-xfer {
323 rockchip,pins = <RK_GPIO1 26 RK_FUNC_1 &pcfg_pull_none>,
324 <RK_GPIO1 27 RK_FUNC_1 &pcfg_pull_none>;
329 i2c2_xfer: i2c2-xfer {
330 rockchip,pins = <RK_GPIO1 28 RK_FUNC_1 &pcfg_pull_none>,
331 <RK_GPIO1 29 RK_FUNC_1 &pcfg_pull_none>;
336 i2c3_xfer: i2c3-xfer {
337 rockchip,pins = <RK_GPIO3 14 RK_FUNC_2 &pcfg_pull_none>,
338 <RK_GPIO3 15 RK_FUNC_2 &pcfg_pull_none>;
343 i2c4_xfer: i2c4-xfer {
344 rockchip,pins = <RK_GPIO1 30 RK_FUNC_1 &pcfg_pull_none>,
345 <RK_GPIO1 31 RK_FUNC_1 &pcfg_pull_none>;
351 rockchip,pins = <RK_GPIO3 27 RK_FUNC_1 &pcfg_pull_none>;
357 rockchip,pins = <RK_GPIO3 28 RK_FUNC_1 &pcfg_pull_none>;
363 rockchip,pins = <RK_GPIO3 29 RK_FUNC_1 &pcfg_pull_none>;
369 rockchip,pins = <RK_GPIO3 30 RK_FUNC_1 &pcfg_pull_none>;
375 rockchip,pins = <RK_GPIO1 6 RK_FUNC_2 &pcfg_pull_up>;
378 rockchip,pins = <RK_GPIO1 7 RK_FUNC_2 &pcfg_pull_up>;
381 rockchip,pins = <RK_GPIO1 5 RK_FUNC_2 &pcfg_pull_up>;
384 rockchip,pins = <RK_GPIO1 4 RK_FUNC_2 &pcfg_pull_up>;
387 rockchip,pins = <RK_GPIO1 15 RK_FUNC_1 &pcfg_pull_up>;
393 rockchip,pins = <RK_GPIO0 30 RK_FUNC_1 &pcfg_pull_up>;
396 rockchip,pins = <RK_GPIO0 31 RK_FUNC_1 &pcfg_pull_up>;
399 rockchip,pins = <RK_GPIO0 28 RK_FUNC_1 &pcfg_pull_up>;
402 rockchip,pins = <RK_GPIO0 29 RK_FUNC_1 &pcfg_pull_up>;
405 rockchip,pins = <RK_GPIO1 14 RK_FUNC_2 &pcfg_pull_up>;
410 uart0_xfer: uart0-xfer {
411 rockchip,pins = <RK_GPIO1 0 RK_FUNC_1 &pcfg_pull_up>,
412 <RK_GPIO1 1 RK_FUNC_1 &pcfg_pull_none>;
415 uart0_cts: uart0-cts {
416 rockchip,pins = <RK_GPIO1 2 RK_FUNC_1 &pcfg_pull_none>;
419 uart0_rts: uart0-rts {
420 rockchip,pins = <RK_GPIO1 3 RK_FUNC_1 &pcfg_pull_none>;
425 uart1_xfer: uart1-xfer {
426 rockchip,pins = <RK_GPIO1 4 RK_FUNC_1 &pcfg_pull_up>,
427 <RK_GPIO1 5 RK_FUNC_1 &pcfg_pull_none>;
430 uart1_cts: uart1-cts {
431 rockchip,pins = <RK_GPIO1 6 RK_FUNC_1 &pcfg_pull_none>;
434 uart1_rts: uart1-rts {
435 rockchip,pins = <RK_GPIO1 7 RK_FUNC_1 &pcfg_pull_none>;
440 uart2_xfer: uart2-xfer {
441 rockchip,pins = <RK_GPIO1 8 RK_FUNC_1 &pcfg_pull_up>,
442 <RK_GPIO1 9 RK_FUNC_1 &pcfg_pull_none>;
444 /* no rts / cts for uart2 */
448 uart3_xfer: uart3-xfer {
449 rockchip,pins = <RK_GPIO1 10 RK_FUNC_1 &pcfg_pull_up>,
450 <RK_GPIO1 11 RK_FUNC_1 &pcfg_pull_none>;
453 uart3_cts: uart3-cts {
454 rockchip,pins = <RK_GPIO1 12 RK_FUNC_1 &pcfg_pull_none>;
457 uart3_rts: uart3-rts {
458 rockchip,pins = <RK_GPIO1 13 RK_FUNC_1 &pcfg_pull_none>;
464 rockchip,pins = <RK_GPIO3 2 RK_FUNC_1 &pcfg_pull_none>;
468 rockchip,pins = <RK_GPIO3 3 RK_FUNC_1 &pcfg_pull_none>;
472 rockchip,pins = <RK_GPIO3 8 RK_FUNC_1 &pcfg_pull_none>;
476 rockchip,pins = <RK_GPIO3 9 RK_FUNC_1 &pcfg_pull_none>;
480 rockchip,pins = <RK_GPIO3 1 RK_FUNC_1 &pcfg_pull_none>;
483 sd0_bus1: sd0-bus-width1 {
484 rockchip,pins = <RK_GPIO3 4 RK_FUNC_1 &pcfg_pull_none>;
487 sd0_bus4: sd0-bus-width4 {
488 rockchip,pins = <RK_GPIO3 4 RK_FUNC_1 &pcfg_pull_none>,
489 <RK_GPIO3 5 RK_FUNC_1 &pcfg_pull_none>,
490 <RK_GPIO3 6 RK_FUNC_1 &pcfg_pull_none>,
491 <RK_GPIO3 7 RK_FUNC_1 &pcfg_pull_none>;
497 rockchip,pins = <RK_GPIO3 21 RK_FUNC_1 &pcfg_pull_none>;
501 rockchip,pins = <RK_GPIO3 16 RK_FUNC_1 &pcfg_pull_none>;
505 rockchip,pins = <RK_GPIO3 22 RK_FUNC_1 &pcfg_pull_none>;
509 rockchip,pins = <RK_GPIO3 23 RK_FUNC_1 &pcfg_pull_none>;
512 sd1_bus1: sd1-bus-width1 {
513 rockchip,pins = <RK_GPIO3 17 RK_FUNC_1 &pcfg_pull_none>;
516 sd1_bus4: sd1-bus-width4 {
517 rockchip,pins = <RK_GPIO3 17 RK_FUNC_1 &pcfg_pull_none>,
518 <RK_GPIO3 18 RK_FUNC_1 &pcfg_pull_none>,
519 <RK_GPIO3 19 RK_FUNC_1 &pcfg_pull_none>,
520 <RK_GPIO3 20 RK_FUNC_1 &pcfg_pull_none>;
526 rockchip,pins = <RK_GPIO1 16 RK_FUNC_1 &pcfg_pull_none>,
527 <RK_GPIO1 17 RK_FUNC_1 &pcfg_pull_none>,
528 <RK_GPIO1 18 RK_FUNC_1 &pcfg_pull_none>,
529 <RK_GPIO1 19 RK_FUNC_1 &pcfg_pull_none>,
530 <RK_GPIO1 20 RK_FUNC_1 &pcfg_pull_none>,
531 <RK_GPIO1 21 RK_FUNC_1 &pcfg_pull_none>;
537 rockchip,pins = <RK_GPIO1 14 RK_FUNC_1 &pcfg_pull_none>;
544 compatible = "rockchip,rk3188-emac";
548 interrupts = <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_EDGE_RISING)>;
553 interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_EDGE_RISING)>;
557 compatible = "rockchip,rk3188-i2c";
558 pinctrl-names = "default";
559 pinctrl-0 = <&i2c0_xfer>;
563 compatible = "rockchip,rk3188-i2c";
564 pinctrl-names = "default";
565 pinctrl-0 = <&i2c1_xfer>;
569 compatible = "rockchip,rk3188-i2c";
570 pinctrl-names = "default";
571 pinctrl-0 = <&i2c2_xfer>;
575 compatible = "rockchip,rk3188-i2c";
576 pinctrl-names = "default";
577 pinctrl-0 = <&i2c3_xfer>;
581 compatible = "rockchip,rk3188-i2c";
582 pinctrl-names = "default";
583 pinctrl-0 = <&i2c4_xfer>;
587 pinctrl-names = "default";
588 pinctrl-0 = <&pwm0_out>;
592 pinctrl-names = "default";
593 pinctrl-0 = <&pwm1_out>;
597 pinctrl-names = "default";
598 pinctrl-0 = <&pwm2_out>;
602 pinctrl-names = "default";
603 pinctrl-0 = <&pwm3_out>;
607 compatible = "rockchip,rk3188-spi", "rockchip,rk3066-spi";
608 pinctrl-names = "default";
609 pinctrl-0 = <&spi0_clk &spi0_tx &spi0_rx &spi0_cs0>;
613 compatible = "rockchip,rk3188-spi", "rockchip,rk3066-spi";
614 pinctrl-names = "default";
615 pinctrl-0 = <&spi1_clk &spi1_tx &spi1_rx &spi1_cs0>;
619 compatible = "rockchip,rk3188-uart", "snps,dw-apb-uart";
620 pinctrl-names = "default";
621 pinctrl-0 = <&uart0_xfer>;
625 compatible = "rockchip,rk3188-uart", "snps,dw-apb-uart";
626 pinctrl-names = "default";
627 pinctrl-0 = <&uart1_xfer>;
631 compatible = "rockchip,rk3188-uart", "snps,dw-apb-uart";
632 pinctrl-names = "default";
633 pinctrl-0 = <&uart2_xfer>;
637 compatible = "rockchip,rk3188-uart", "snps,dw-apb-uart";
638 pinctrl-names = "default";
639 pinctrl-0 = <&uart3_xfer>;
643 compatible = "rockchip,rk3188-wdt", "snps,dw-wdt";