blob: c7f669f5884f910c6e4be44ac1dd09a216cb97f0 [file] [log] [blame]
Siarhei Siamashka26c50fb2016-03-29 17:29:10 +02001/*
2 * Copyright (C) 2016 ARM Ltd.
3 * based on the Allwinner H3 dtsi:
Andre Przywara36748112016-05-04 22:15:33 +01004 * Copyright (C) 2015 Jens Kuske <jenskuske@gmail.com>
Siarhei Siamashka26c50fb2016-03-29 17:29:10 +02005 *
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
9 * whole.
10 *
11 * a) This file 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.
15 *
16 * This file 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.
20 *
21 * Or, alternatively,
22 *
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
30 * conditions:
31 *
32 * The above copyright notice and this permission notice shall be
33 * included in all copies or substantial portions of the Software.
34 *
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.
43 */
44
Andre Przywara8d65e613e2017-05-24 10:34:56 +010045#include <dt-bindings/clock/sun50i-a64-ccu.h>
Siarhei Siamashka26c50fb2016-03-29 17:29:10 +020046#include <dt-bindings/interrupt-controller/arm-gic.h>
Andre Przywara8d65e613e2017-05-24 10:34:56 +010047#include <dt-bindings/reset/sun50i-a64-ccu.h>
Siarhei Siamashka26c50fb2016-03-29 17:29:10 +020048
49/ {
Siarhei Siamashka26c50fb2016-03-29 17:29:10 +020050 interrupt-parent = <&gic>;
51 #address-cells = <1>;
52 #size-cells = <1>;
53
Siarhei Siamashka26c50fb2016-03-29 17:29:10 +020054 cpus {
55 #address-cells = <1>;
56 #size-cells = <0>;
57
Andre Przywara8d65e613e2017-05-24 10:34:56 +010058 cpu0: cpu@0 {
Siarhei Siamashka26c50fb2016-03-29 17:29:10 +020059 compatible = "arm,cortex-a53", "arm,armv8";
60 device_type = "cpu";
61 reg = <0>;
62 enable-method = "psci";
63 };
64
Andre Przywara8d65e613e2017-05-24 10:34:56 +010065 cpu1: cpu@1 {
Siarhei Siamashka26c50fb2016-03-29 17:29:10 +020066 compatible = "arm,cortex-a53", "arm,armv8";
67 device_type = "cpu";
68 reg = <1>;
69 enable-method = "psci";
70 };
71
Andre Przywara8d65e613e2017-05-24 10:34:56 +010072 cpu2: cpu@2 {
Siarhei Siamashka26c50fb2016-03-29 17:29:10 +020073 compatible = "arm,cortex-a53", "arm,armv8";
74 device_type = "cpu";
75 reg = <2>;
76 enable-method = "psci";
77 };
78
Andre Przywara8d65e613e2017-05-24 10:34:56 +010079 cpu3: cpu@3 {
Siarhei Siamashka26c50fb2016-03-29 17:29:10 +020080 compatible = "arm,cortex-a53", "arm,armv8";
81 device_type = "cpu";
82 reg = <3>;
83 enable-method = "psci";
84 };
85 };
86
Andre Przywara8d65e613e2017-05-24 10:34:56 +010087 osc24M: osc24M_clk {
88 #clock-cells = <0>;
89 compatible = "fixed-clock";
90 clock-frequency = <24000000>;
91 clock-output-names = "osc24M";
Siarhei Siamashka26c50fb2016-03-29 17:29:10 +020092 };
93
Andre Przywara8d65e613e2017-05-24 10:34:56 +010094 osc32k: osc32k_clk {
95 #clock-cells = <0>;
96 compatible = "fixed-clock";
97 clock-frequency = <32768>;
98 clock-output-names = "osc32k";
Siarhei Siamashka26c50fb2016-03-29 17:29:10 +020099 };
100
Andre Przywara8d65e613e2017-05-24 10:34:56 +0100101 iosc: internal-osc-clk {
102 #clock-cells = <0>;
103 compatible = "fixed-clock";
104 clock-frequency = <16000000>;
105 clock-accuracy = <300000000>;
106 clock-output-names = "iosc";
107 };
Andre Przywara36748112016-05-04 22:15:33 +0100108
Andre Przywara8d65e613e2017-05-24 10:34:56 +0100109 psci {
110 compatible = "arm,psci-0.2";
111 method = "smc";
Andre Przywara36748112016-05-04 22:15:33 +0100112 };
113
Siarhei Siamashka26c50fb2016-03-29 17:29:10 +0200114 timer {
115 compatible = "arm,armv8-timer";
116 interrupts = <GIC_PPI 13
117 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
118 <GIC_PPI 14
119 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
120 <GIC_PPI 11
121 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
122 <GIC_PPI 10
123 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
124 };
125
Siarhei Siamashka26c50fb2016-03-29 17:29:10 +0200126 soc {
127 compatible = "simple-bus";
128 #address-cells = <1>;
129 #size-cells = <1>;
130 ranges;
131
Andre Przywara36748112016-05-04 22:15:33 +0100132 mmc0: mmc@1c0f000 {
Andre Przywara8d65e613e2017-05-24 10:34:56 +0100133 compatible = "allwinner,sun50i-a64-mmc";
Siarhei Siamashka26c50fb2016-03-29 17:29:10 +0200134 reg = <0x01c0f000 0x1000>;
Andre Przywara8d65e613e2017-05-24 10:34:56 +0100135 clocks = <&ccu CLK_BUS_MMC0>, <&ccu CLK_MMC0>;
136 clock-names = "ahb", "mmc";
137 resets = <&ccu RST_BUS_MMC0>;
Siarhei Siamashka26c50fb2016-03-29 17:29:10 +0200138 reset-names = "ahb";
139 interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
Andre Przywara8d65e613e2017-05-24 10:34:56 +0100140 max-frequency = <150000000>;
Siarhei Siamashka26c50fb2016-03-29 17:29:10 +0200141 status = "disabled";
142 #address-cells = <1>;
143 #size-cells = <0>;
144 };
145
Andre Przywara36748112016-05-04 22:15:33 +0100146 mmc1: mmc@1c10000 {
Andre Przywara8d65e613e2017-05-24 10:34:56 +0100147 compatible = "allwinner,sun50i-a64-mmc";
Siarhei Siamashka26c50fb2016-03-29 17:29:10 +0200148 reg = <0x01c10000 0x1000>;
Andre Przywara8d65e613e2017-05-24 10:34:56 +0100149 clocks = <&ccu CLK_BUS_MMC1>, <&ccu CLK_MMC1>;
150 clock-names = "ahb", "mmc";
151 resets = <&ccu RST_BUS_MMC1>;
Siarhei Siamashka26c50fb2016-03-29 17:29:10 +0200152 reset-names = "ahb";
153 interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
Andre Przywara8d65e613e2017-05-24 10:34:56 +0100154 max-frequency = <150000000>;
Siarhei Siamashka26c50fb2016-03-29 17:29:10 +0200155 status = "disabled";
156 #address-cells = <1>;
157 #size-cells = <0>;
158 };
159
Andre Przywara36748112016-05-04 22:15:33 +0100160 mmc2: mmc@1c11000 {
Andre Przywara8d65e613e2017-05-24 10:34:56 +0100161 compatible = "allwinner,sun50i-a64-emmc";
Siarhei Siamashka26c50fb2016-03-29 17:29:10 +0200162 reg = <0x01c11000 0x1000>;
Andre Przywara8d65e613e2017-05-24 10:34:56 +0100163 clocks = <&ccu CLK_BUS_MMC2>, <&ccu CLK_MMC2>;
164 clock-names = "ahb", "mmc";
165 resets = <&ccu RST_BUS_MMC2>;
Siarhei Siamashka26c50fb2016-03-29 17:29:10 +0200166 reset-names = "ahb";
167 interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
Andre Przywara8d65e613e2017-05-24 10:34:56 +0100168 max-frequency = <200000000>;
Siarhei Siamashka26c50fb2016-03-29 17:29:10 +0200169 status = "disabled";
170 #address-cells = <1>;
171 #size-cells = <0>;
172 };
173
Andre Przywara8d65e613e2017-05-24 10:34:56 +0100174 usb_otg: usb@01c19000 {
175 compatible = "allwinner,sun8i-a33-musb";
176 reg = <0x01c19000 0x0400>;
177 clocks = <&ccu CLK_BUS_OTG>;
178 resets = <&ccu RST_BUS_OTG>;
179 interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
180 interrupt-names = "mc";
181 phys = <&usbphy 0>;
182 phy-names = "usb";
183 extcon = <&usbphy 0>;
184 status = "disabled";
185 };
186
187 usbphy: phy@01c19400 {
188 compatible = "allwinner,sun50i-a64-usb-phy";
189 reg = <0x01c19400 0x14>,
190 <0x01c1a800 0x4>,
191 <0x01c1b800 0x4>;
192 reg-names = "phy_ctrl",
193 "pmu0",
194 "pmu1";
195 clocks = <&ccu CLK_USB_PHY0>,
196 <&ccu CLK_USB_PHY1>;
197 clock-names = "usb0_phy",
198 "usb1_phy";
199 resets = <&ccu RST_USB_PHY0>,
200 <&ccu RST_USB_PHY1>;
201 reset-names = "usb0_reset",
202 "usb1_reset";
203 status = "disabled";
204 #phy-cells = <1>;
205 };
206
207 ehci1: usb@01c1b000 {
208 compatible = "allwinner,sun50i-a64-ehci", "generic-ehci";
209 reg = <0x01c1b000 0x100>;
210 interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
211 clocks = <&ccu CLK_BUS_OHCI1>,
212 <&ccu CLK_BUS_EHCI1>,
213 <&ccu CLK_USB_OHCI1>;
214 resets = <&ccu RST_BUS_OHCI1>,
215 <&ccu RST_BUS_EHCI1>;
216 phys = <&usbphy 1>;
217 phy-names = "usb";
218 status = "disabled";
219 };
220
221 ohci1: usb@01c1b400 {
222 compatible = "allwinner,sun50i-a64-ohci", "generic-ohci";
223 reg = <0x01c1b400 0x100>;
224 interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
225 clocks = <&ccu CLK_BUS_OHCI1>,
226 <&ccu CLK_USB_OHCI1>;
227 resets = <&ccu RST_BUS_OHCI1>;
228 phys = <&usbphy 1>;
229 phy-names = "usb";
230 status = "disabled";
231 };
232
233 ccu: clock@01c20000 {
234 compatible = "allwinner,sun50i-a64-ccu";
235 reg = <0x01c20000 0x400>;
236 clocks = <&osc24M>, <&osc32k>;
237 clock-names = "hosc", "losc";
238 #clock-cells = <1>;
239 #reset-cells = <1>;
240 };
241
Andre Przywara36748112016-05-04 22:15:33 +0100242 pio: pinctrl@1c20800 {
243 compatible = "allwinner,sun50i-a64-pinctrl";
Siarhei Siamashka26c50fb2016-03-29 17:29:10 +0200244 reg = <0x01c20800 0x400>;
245 interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>,
246 <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>,
247 <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
Andre Przywara8d65e613e2017-05-24 10:34:56 +0100248 clocks = <&ccu 58>;
Siarhei Siamashka26c50fb2016-03-29 17:29:10 +0200249 gpio-controller;
250 #gpio-cells = <3>;
251 interrupt-controller;
Andre Przywara8d65e613e2017-05-24 10:34:56 +0100252 #interrupt-cells = <3>;
Andre Przywara36748112016-05-04 22:15:33 +0100253
Andre Przywara8d65e613e2017-05-24 10:34:56 +0100254 i2c1_pins: i2c1_pins {
255 pins = "PH2", "PH3";
256 function = "i2c1";
Siarhei Siamashka26c50fb2016-03-29 17:29:10 +0200257 };
258
Andre Przywara8d65e613e2017-05-24 10:34:56 +0100259 mmc0_pins: mmc0-pins {
260 pins = "PF0", "PF1", "PF2", "PF3",
261 "PF4", "PF5";
262 function = "mmc0";
263 drive-strength = <30>;
264 bias-pull-up;
Siarhei Siamashka26c50fb2016-03-29 17:29:10 +0200265 };
Andre Przywara36748112016-05-04 22:15:33 +0100266
Andre Przywara8d65e613e2017-05-24 10:34:56 +0100267 mmc1_pins: mmc1-pins {
268 pins = "PG0", "PG1", "PG2", "PG3",
269 "PG4", "PG5";
270 function = "mmc1";
271 drive-strength = <30>;
272 bias-pull-up;
Andre Przywara36748112016-05-04 22:15:33 +0100273 };
274
Andre Przywara8d65e613e2017-05-24 10:34:56 +0100275 mmc2_pins: mmc2-pins {
276 pins = "PC1", "PC5", "PC6", "PC8", "PC9",
277 "PC10","PC11", "PC12", "PC13",
278 "PC14", "PC15", "PC16";
279 function = "mmc2";
280 drive-strength = <30>;
281 bias-pull-up;
Andre Przywara36748112016-05-04 22:15:33 +0100282 };
283
Andre Przywara8d65e613e2017-05-24 10:34:56 +0100284 uart0_pins_a: uart0@0 {
285 pins = "PB8", "PB9";
286 function = "uart0";
Andre Przywara36748112016-05-04 22:15:33 +0100287 };
Amit Singh Tomard194c0e2016-07-06 17:59:44 +0530288
Andre Przywara8d65e613e2017-05-24 10:34:56 +0100289 uart1_pins: uart1_pins {
290 pins = "PG6", "PG7";
291 function = "uart1";
Amit Singh Tomard194c0e2016-07-06 17:59:44 +0530292 };
293
Andre Przywara8d65e613e2017-05-24 10:34:56 +0100294 uart1_rts_cts_pins: uart1_rts_cts_pins {
295 pins = "PG8", "PG9";
296 function = "uart1";
Amit Singh Tomard194c0e2016-07-06 17:59:44 +0530297 };
Siarhei Siamashka26c50fb2016-03-29 17:29:10 +0200298 };
299
Andre Przywara36748112016-05-04 22:15:33 +0100300 uart0: serial@1c28000 {
Siarhei Siamashka26c50fb2016-03-29 17:29:10 +0200301 compatible = "snps,dw-apb-uart";
302 reg = <0x01c28000 0x400>;
303 interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
304 reg-shift = <2>;
305 reg-io-width = <4>;
Andre Przywara8d65e613e2017-05-24 10:34:56 +0100306 clocks = <&ccu 67>;
307 resets = <&ccu 46>;
Siarhei Siamashka26c50fb2016-03-29 17:29:10 +0200308 status = "disabled";
309 };
310
Andre Przywara36748112016-05-04 22:15:33 +0100311 uart1: serial@1c28400 {
Siarhei Siamashka26c50fb2016-03-29 17:29:10 +0200312 compatible = "snps,dw-apb-uart";
313 reg = <0x01c28400 0x400>;
314 interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
315 reg-shift = <2>;
316 reg-io-width = <4>;
Andre Przywara8d65e613e2017-05-24 10:34:56 +0100317 clocks = <&ccu 68>;
318 resets = <&ccu 47>;
Siarhei Siamashka26c50fb2016-03-29 17:29:10 +0200319 status = "disabled";
320 };
321
Andre Przywara36748112016-05-04 22:15:33 +0100322 uart2: serial@1c28800 {
Siarhei Siamashka26c50fb2016-03-29 17:29:10 +0200323 compatible = "snps,dw-apb-uart";
324 reg = <0x01c28800 0x400>;
325 interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
326 reg-shift = <2>;
327 reg-io-width = <4>;
Andre Przywara8d65e613e2017-05-24 10:34:56 +0100328 clocks = <&ccu 69>;
329 resets = <&ccu 48>;
Siarhei Siamashka26c50fb2016-03-29 17:29:10 +0200330 status = "disabled";
331 };
332
Andre Przywara36748112016-05-04 22:15:33 +0100333 uart3: serial@1c28c00 {
Siarhei Siamashka26c50fb2016-03-29 17:29:10 +0200334 compatible = "snps,dw-apb-uart";
335 reg = <0x01c28c00 0x400>;
336 interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
337 reg-shift = <2>;
338 reg-io-width = <4>;
Andre Przywara8d65e613e2017-05-24 10:34:56 +0100339 clocks = <&ccu 70>;
340 resets = <&ccu 49>;
Siarhei Siamashka26c50fb2016-03-29 17:29:10 +0200341 status = "disabled";
342 };
343
Andre Przywara36748112016-05-04 22:15:33 +0100344 uart4: serial@1c29000 {
Siarhei Siamashka26c50fb2016-03-29 17:29:10 +0200345 compatible = "snps,dw-apb-uart";
346 reg = <0x01c29000 0x400>;
347 interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
348 reg-shift = <2>;
349 reg-io-width = <4>;
Andre Przywara8d65e613e2017-05-24 10:34:56 +0100350 clocks = <&ccu 71>;
351 resets = <&ccu 50>;
Siarhei Siamashka26c50fb2016-03-29 17:29:10 +0200352 status = "disabled";
353 };
354
Andre Przywara36748112016-05-04 22:15:33 +0100355 i2c0: i2c@1c2ac00 {
356 compatible = "allwinner,sun6i-a31-i2c";
357 reg = <0x01c2ac00 0x400>;
358 interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
Andre Przywara8d65e613e2017-05-24 10:34:56 +0100359 clocks = <&ccu 63>;
360 resets = <&ccu 42>;
Andre Przywara36748112016-05-04 22:15:33 +0100361 status = "disabled";
362 #address-cells = <1>;
363 #size-cells = <0>;
364 };
Siarhei Siamashka26c50fb2016-03-29 17:29:10 +0200365
Andre Przywara36748112016-05-04 22:15:33 +0100366 i2c1: i2c@1c2b000 {
367 compatible = "allwinner,sun6i-a31-i2c";
368 reg = <0x01c2b000 0x400>;
369 interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
Andre Przywara8d65e613e2017-05-24 10:34:56 +0100370 clocks = <&ccu 64>;
371 resets = <&ccu 43>;
Andre Przywara36748112016-05-04 22:15:33 +0100372 status = "disabled";
373 #address-cells = <1>;
374 #size-cells = <0>;
375 };
376
377 i2c2: i2c@1c2b400 {
378 compatible = "allwinner,sun6i-a31-i2c";
379 reg = <0x01c2b400 0x400>;
380 interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
Andre Przywara8d65e613e2017-05-24 10:34:56 +0100381 clocks = <&ccu 65>;
382 resets = <&ccu 44>;
Andre Przywara36748112016-05-04 22:15:33 +0100383 status = "disabled";
384 #address-cells = <1>;
385 #size-cells = <0>;
386 };
Amit Singh Tomard194c0e2016-07-06 17:59:44 +0530387
Andre Przywara8d65e613e2017-05-24 10:34:56 +0100388 gic: interrupt-controller@1c81000 {
389 compatible = "arm,gic-400";
390 reg = <0x01c81000 0x1000>,
391 <0x01c82000 0x2000>,
392 <0x01c84000 0x2000>,
393 <0x01c86000 0x2000>;
394 interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
395 interrupt-controller;
396 #interrupt-cells = <3>;
Amit Singh Tomard194c0e2016-07-06 17:59:44 +0530397 };
Amit Singh Tomarbd732d02016-10-21 02:24:30 +0100398
Andre Przywara8d65e613e2017-05-24 10:34:56 +0100399 rtc: rtc@1f00000 {
400 compatible = "allwinner,sun6i-a31-rtc";
401 reg = <0x01f00000 0x54>;
402 interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
403 <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
Amit Singh Tomarbd732d02016-10-21 02:24:30 +0100404 };
405
Andre Przywara8d65e613e2017-05-24 10:34:56 +0100406 r_ccu: clock@1f01400 {
407 compatible = "allwinner,sun50i-a64-r-ccu";
408 reg = <0x01f01400 0x100>;
409 clocks = <&osc24M>, <&osc32k>, <&iosc>;
410 clock-names = "hosc", "losc", "iosc";
411 #clock-cells = <1>;
412 #reset-cells = <1>;
Amit Singh Tomarbd732d02016-10-21 02:24:30 +0100413 };
414
Andre Przywara8d65e613e2017-05-24 10:34:56 +0100415 r_pio: pinctrl@01f02c00 {
416 compatible = "allwinner,sun50i-a64-r-pinctrl";
417 reg = <0x01f02c00 0x400>;
418 interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
419 clocks = <&r_ccu 3>, <&osc24M>, <&osc32k>;
420 clock-names = "apb", "hosc", "losc";
421 gpio-controller;
422 #gpio-cells = <3>;
423 interrupt-controller;
424 #interrupt-cells = <3>;
Amit Singh Tomarbd732d02016-10-21 02:24:30 +0100425 };
Siarhei Siamashka26c50fb2016-03-29 17:29:10 +0200426 };
427};