2 * This file is dual-licensed: you can use it either under the terms
3 * of the GPL or the X11 license, at your option. Note that this dual
4 * licensing only applies to this file, and not this project as a
7 * a) This file is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; either version 2 of the
10 * License, or (at your option) any later version.
12 * This file is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
19 * b) Permission is hereby granted, free of charge, to any person
20 * obtaining a copy of this software and associated documentation
21 * files (the "Software"), to deal in the Software without
22 * restriction, including without limitation the rights to use,
23 * copy, modify, merge, publish, distribute, sublicense, and/or
24 * sell copies of the Software, and to permit persons to whom the
25 * Software is furnished to do so, subject to the following
28 * The above copyright notice and this permission notice shall be
29 * included in all copies or substantial portions of the Software.
31 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
32 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
33 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
34 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
35 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
36 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
37 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
38 * OTHER DEALINGS IN THE SOFTWARE.
41 #include <dt-bindings/gpio/gpio.h>
42 #include <dt-bindings/interrupt-controller/irq.h>
43 #include <dt-bindings/interrupt-controller/arm-gic.h>
44 #include <dt-bindings/pinctrl/rockchip.h>
45 #include <dt-bindings/clock/rk3228-cru.h>
46 #include <dt-bindings/thermal/thermal.h>
47 #include "skeleton.dtsi"
50 compatible = "rockchip,rk3228";
52 interrupt-parent = <&gic>;
66 compatible = "arm,cortex-a7";
68 resets = <&cru SRST_CORE0>;
73 #cooling-cells = <2>; /* min followed by max */
74 clock-latency = <40000>;
75 clocks = <&cru ARMCLK>;
80 compatible = "arm,cortex-a7";
82 resets = <&cru SRST_CORE1>;
87 compatible = "arm,cortex-a7";
89 resets = <&cru SRST_CORE2>;
94 compatible = "arm,cortex-a7";
96 resets = <&cru SRST_CORE3>;
101 compatible = "arm,amba-bus";
102 #address-cells = <1>;
106 pdma: pdma@110f0000 {
107 compatible = "arm,pl330", "arm,primecell";
108 reg = <0x110f0000 0x4000>;
109 interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,
110 <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
112 clocks = <&cru ACLK_DMAC>;
113 clock-names = "apb_pclk";
118 compatible = "arm,cortex-a7-pmu";
119 interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>,
120 <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>,
121 <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>,
122 <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
123 interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>;
127 compatible = "arm,armv7-timer";
128 arm,cpu-registers-not-fw-configured;
129 interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
130 <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
131 <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
132 <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
133 clock-frequency = <24000000>;
137 compatible = "fixed-clock";
138 clock-frequency = <24000000>;
139 clock-output-names = "xin24m";
143 grf: syscon@11000000 {
144 compatible = "syscon";
145 reg = <0x11000000 0x1000>;
148 uart0: serial@11010000 {
149 compatible = "snps,dw-apb-uart";
150 reg = <0x11010000 0x100>;
151 interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
152 clock-frequency = <24000000>;
153 clocks = <&cru SCLK_UART0>, <&cru PCLK_UART0>;
154 clock-names = "baudclk", "apb_pclk";
155 pinctrl-names = "default";
156 pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
162 uart1: serial@11020000 {
163 compatible = "snps,dw-apb-uart";
164 reg = <0x11020000 0x100>;
165 interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>;
166 clock-frequency = <24000000>;
167 clocks = <&cru SCLK_UART1>, <&cru PCLK_UART1>;
168 clock-names = "baudclk", "apb_pclk";
169 pinctrl-names = "default";
170 pinctrl-0 = <&uart1_xfer>;
176 uart2: serial@11030000 {
177 compatible = "snps,dw-apb-uart";
178 reg = <0x11030000 0x100>;
179 interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
180 clock-frequency = <24000000>;
181 clocks = <&cru SCLK_UART2>, <&cru PCLK_UART2>;
182 clock-names = "baudclk", "apb_pclk";
183 pinctrl-names = "default";
184 pinctrl-0 = <&uart2_xfer>;
191 compatible = "rockchip,rk3288-pwm";
192 reg = <0x110b0000 0x10>;
194 clocks = <&cru PCLK_PWM>;
196 pinctrl-names = "default";
197 pinctrl-0 = <&pwm0_pin>;
202 compatible = "rockchip,rk3288-pwm";
203 reg = <0x110b0010 0x10>;
205 clocks = <&cru PCLK_PWM>;
207 pinctrl-names = "default";
208 pinctrl-0 = <&pwm1_pin>;
213 compatible = "rockchip,rk3288-pwm";
214 reg = <0x110b0020 0x10>;
216 clocks = <&cru PCLK_PWM>;
218 pinctrl-names = "default";
219 pinctrl-0 = <&pwm2_pin>;
224 compatible = "rockchip,rk3288-pwm";
225 reg = <0x110b0030 0x10>;
227 clocks = <&cru PCLK_PWM>;
229 pinctrl-names = "default";
230 pinctrl-0 = <&pwm3_pin>;
234 timer: timer@110c0000 {
235 compatible = "rockchip,rk3288-timer";
236 reg = <0x110c0000 0x20>;
237 interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>;
238 clocks = <&xin24m>, <&cru PCLK_TIMER>;
239 clock-names = "timer", "pclk";
242 cru: clock-controller@110e0000 {
243 compatible = "rockchip,rk3228-cru";
244 reg = <0x110e0000 0x1000>;
245 rockchip,grf = <&grf>;
248 assigned-clocks = <&cru PLL_GPLL>;
249 assigned-clock-rates = <594000000>;
253 cpu_thermal: cpu-thermal {
254 polling-delay-passive = <100>; /* milliseconds */
255 polling-delay = <5000>; /* milliseconds */
257 thermal-sensors = <&tsadc 0>;
260 cpu_alert0: cpu_alert0 {
261 temperature = <70000>; /* millicelsius */
262 hysteresis = <2000>; /* millicelsius */
265 cpu_alert1: cpu_alert1 {
266 temperature = <75000>; /* millicelsius */
267 hysteresis = <2000>; /* millicelsius */
271 temperature = <90000>; /* millicelsius */
272 hysteresis = <2000>; /* millicelsius */
279 trip = <&cpu_alert0>;
281 <&cpu0 THERMAL_NO_LIMIT 6>;
284 trip = <&cpu_alert1>;
286 <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
292 tsadc: tsadc@11150000 {
293 compatible = "rockchip,rk3228-tsadc";
294 reg = <0x11150000 0x100>;
295 interrupts = <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>;
296 clocks = <&cru SCLK_TSADC>, <&cru PCLK_TSADC>;
297 clock-names = "tsadc", "apb_pclk";
298 resets = <&cru SRST_TSADC>;
299 reset-names = "tsadc-apb";
300 pinctrl-names = "init", "default", "sleep";
301 pinctrl-0 = <&otp_gpio>;
302 pinctrl-1 = <&otp_out>;
303 pinctrl-2 = <&otp_gpio>;
304 #thermal-sensor-cells = <0>;
305 rockchip,hw-tshut-temp = <95000>;
309 emmc: dwmmc@30020000 {
310 compatible = "rockchip,rk3288-dw-mshc";
311 reg = <0x30020000 0x4000>;
312 interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
313 clock-frequency = <37500000>;
314 clock-freq-min-max = <400000 37500000>;
315 clocks = <&cru HCLK_EMMC>, <&cru SCLK_EMMC>,
316 <&cru SCLK_EMMC_DRV>, <&cru SCLK_EMMC_SAMPLE>;
317 clock-names = "biu", "ciu", "ciu_drv", "ciu_sample";
319 default-sample-phase = <158>;
321 fifo-depth = <0x100>;
322 pinctrl-names = "default";
323 pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
327 gic: interrupt-controller@32010000 {
328 compatible = "arm,gic-400";
329 interrupt-controller;
330 #interrupt-cells = <3>;
331 #address-cells = <0>;
333 reg = <0x32011000 0x1000>,
337 interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
341 compatible = "rockchip,rk3228-pinctrl";
342 rockchip,grf = <&grf>;
343 #address-cells = <1>;
347 gpio0: gpio0@11110000 {
348 compatible = "rockchip,gpio-bank";
349 reg = <0x11110000 0x100>;
350 interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>;
351 clocks = <&cru PCLK_GPIO0>;
356 interrupt-controller;
357 #interrupt-cells = <2>;
360 gpio1: gpio1@11120000 {
361 compatible = "rockchip,gpio-bank";
362 reg = <0x11120000 0x100>;
363 interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
364 clocks = <&cru PCLK_GPIO1>;
369 interrupt-controller;
370 #interrupt-cells = <2>;
373 gpio2: gpio2@11130000 {
374 compatible = "rockchip,gpio-bank";
375 reg = <0x11130000 0x100>;
376 interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>;
377 clocks = <&cru PCLK_GPIO2>;
382 interrupt-controller;
383 #interrupt-cells = <2>;
386 gpio3: gpio3@11140000 {
387 compatible = "rockchip,gpio-bank";
388 reg = <0x11140000 0x100>;
389 interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
390 clocks = <&cru PCLK_GPIO3>;
395 interrupt-controller;
396 #interrupt-cells = <2>;
399 pcfg_pull_up: pcfg-pull-up {
403 pcfg_pull_down: pcfg-pull-down {
407 pcfg_pull_none: pcfg-pull-none {
413 rockchip,pins = <2 7 RK_FUNC_2 &pcfg_pull_none>;
417 rockchip,pins = <1 22 RK_FUNC_2 &pcfg_pull_none>;
420 emmc_bus8: emmc-bus8 {
421 rockchip,pins = <1 24 RK_FUNC_2 &pcfg_pull_none>,
422 <1 25 RK_FUNC_2 &pcfg_pull_none>,
423 <1 26 RK_FUNC_2 &pcfg_pull_none>,
424 <1 27 RK_FUNC_2 &pcfg_pull_none>,
425 <1 28 RK_FUNC_2 &pcfg_pull_none>,
426 <1 29 RK_FUNC_2 &pcfg_pull_none>,
427 <1 30 RK_FUNC_2 &pcfg_pull_none>,
428 <1 31 RK_FUNC_2 &pcfg_pull_none>;
434 rockchip,pins = <3 21 RK_FUNC_1 &pcfg_pull_none>;
440 rockchip,pins = <0 30 RK_FUNC_2 &pcfg_pull_none>;
446 rockchip,pins = <1 12 RK_FUNC_2 &pcfg_pull_none>;
452 rockchip,pins = <1 11 RK_FUNC_2 &pcfg_pull_none>;
458 rockchip,pins = <0 24 RK_FUNC_GPIO &pcfg_pull_none>;
462 rockchip,pins = <0 24 RK_FUNC_2 &pcfg_pull_none>;
467 uart0_xfer: uart0-xfer {
468 rockchip,pins = <2 26 RK_FUNC_1 &pcfg_pull_none>,
469 <2 27 RK_FUNC_1 &pcfg_pull_none>;
472 uart0_cts: uart0-cts {
473 rockchip,pins = <2 29 RK_FUNC_1 &pcfg_pull_none>;
476 uart0_rts: uart0-rts {
477 rockchip,pins = <0 17 RK_FUNC_1 &pcfg_pull_none>;
482 uart1_xfer: uart1-xfer {
483 rockchip,pins = <1 9 RK_FUNC_1 &pcfg_pull_none>,
484 <1 10 RK_FUNC_1 &pcfg_pull_none>;
487 uart1_cts: uart1-cts {
488 rockchip,pins = <1 8 RK_FUNC_1 &pcfg_pull_none>;
491 uart1_rts: uart1-rts {
492 rockchip,pins = <1 11 RK_FUNC_1 &pcfg_pull_none>;
497 uart2_xfer: uart2-xfer {
498 rockchip,pins = <1 18 RK_FUNC_2 &pcfg_pull_none>,
499 <1 19 RK_FUNC_2 &pcfg_pull_none>;
502 uart2_cts: uart2-cts {
503 rockchip,pins = <0 25 RK_FUNC_1 &pcfg_pull_none>;
506 uart2_rts: uart2-rts {
507 rockchip,pins = <0 24 RK_FUNC_1 &pcfg_pull_none>;