blob: 4ebb0a7a78fb82047e0010a618c38c62b63c516a [file] [log] [blame]
Hans de Goede6ef1be32015-06-02 15:53:40 +02001/*
2 * Copyright 2014 Chen-Yu Tsai
3 *
4 * Chen-Yu Tsai <wens@csie.org>
5 *
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
Hans de Goede6ef1be32015-06-02 15:53:40 +020045#include <dt-bindings/interrupt-controller/arm-gic.h>
46
Andre Przywarafa15e502022-09-13 00:52:52 +010047#include <dt-bindings/clock/sun6i-rtc.h>
Maxime Ripardcacb69f2017-09-05 20:59:04 +020048#include <dt-bindings/clock/sun8i-a23-a33-ccu.h>
49#include <dt-bindings/reset/sun8i-a23-a33-ccu.h>
Hans de Goede6ef1be32015-06-02 15:53:40 +020050
51/ {
52 interrupt-parent = <&gic>;
Samuel Holland8d6fe612022-04-27 15:31:24 -050053 #address-cells = <1>;
54 #size-cells = <1>;
Hans de Goede6ef1be32015-06-02 15:53:40 +020055
56 chosen {
57 #address-cells = <1>;
58 #size-cells = <1>;
59 ranges;
60
Samuel Holland8d6fe612022-04-27 15:31:24 -050061 simplefb_lcd: framebuffer-lcd0 {
Hans de Goede6ef1be32015-06-02 15:53:40 +020062 compatible = "allwinner,simple-framebuffer",
63 "simple-framebuffer";
64 allwinner,pipeline = "de_be0-lcd0";
Maxime Ripardcacb69f2017-09-05 20:59:04 +020065 clocks = <&ccu CLK_BUS_LCD>, <&ccu CLK_BUS_DE_BE>,
66 <&ccu CLK_LCD_CH0>, <&ccu CLK_DE_BE>,
67 <&ccu CLK_DRAM_DE_BE>, <&ccu CLK_DRC>;
Hans de Goede6ef1be32015-06-02 15:53:40 +020068 status = "disabled";
69 };
70 };
71
Samuel Holland8d6fe612022-04-27 15:31:24 -050072 de: display-engine {
73 /* compatible gets set in SoC specific dtsi file */
74 allwinner,pipelines = <&fe0>;
75 status = "disabled";
76 };
77
Hans de Goede6ef1be32015-06-02 15:53:40 +020078 timer {
79 compatible = "arm,armv7-timer";
80 interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
81 <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
82 <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
83 <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
84 clock-frequency = <24000000>;
85 arm,cpu-registers-not-fw-configured;
86 };
87
88 cpus {
89 enable-method = "allwinner,sun8i-a23";
90 #address-cells = <1>;
91 #size-cells = <0>;
92
Maxime Ripardcacb69f2017-09-05 20:59:04 +020093 cpu0: cpu@0 {
Hans de Goede6ef1be32015-06-02 15:53:40 +020094 compatible = "arm,cortex-a7";
95 device_type = "cpu";
96 reg = <0>;
97 };
98
99 cpu@1 {
100 compatible = "arm,cortex-a7";
101 device_type = "cpu";
102 reg = <1>;
103 };
104 };
105
106 clocks {
107 #address-cells = <1>;
108 #size-cells = <1>;
109 ranges;
110
Andre Przywara3b798212024-04-19 17:59:52 +0100111 osc24M: osc24M-clk {
Hans de Goede6ef1be32015-06-02 15:53:40 +0200112 #clock-cells = <0>;
113 compatible = "fixed-clock";
114 clock-frequency = <24000000>;
Maxime Ripardcacb69f2017-09-05 20:59:04 +0200115 clock-accuracy = <50000>;
Hans de Goede6ef1be32015-06-02 15:53:40 +0200116 clock-output-names = "osc24M";
117 };
118
Andre Przywara3b798212024-04-19 17:59:52 +0100119 ext_osc32k: ext-osc32k-clk {
Hans de Goede6ef1be32015-06-02 15:53:40 +0200120 #clock-cells = <0>;
121 compatible = "fixed-clock";
122 clock-frequency = <32768>;
Maxime Ripardcacb69f2017-09-05 20:59:04 +0200123 clock-accuracy = <50000>;
124 clock-output-names = "ext-osc32k";
Hans de Goede6ef1be32015-06-02 15:53:40 +0200125 };
126 };
127
Samuel Holland8d6fe612022-04-27 15:31:24 -0500128 soc {
Hans de Goede6ef1be32015-06-02 15:53:40 +0200129 compatible = "simple-bus";
130 #address-cells = <1>;
131 #size-cells = <1>;
132 ranges;
133
Samuel Holland8d6fe612022-04-27 15:31:24 -0500134 system-control@1c00000 {
135 compatible = "allwinner,sun8i-a23-system-control";
136 reg = <0x01c00000 0x30>;
137 #address-cells = <1>;
138 #size-cells = <1>;
139 ranges;
140
141 sram_c: sram@1d00000 {
142 compatible = "mmio-sram";
143 reg = <0x01d00000 0x80000>;
144 #address-cells = <1>;
145 #size-cells = <1>;
146 ranges = <0 0x01d00000 0x80000>;
147
148 ve_sram: sram-section@0 {
149 compatible = "allwinner,sun8i-a23-sram-c1",
150 "allwinner,sun4i-a10-sram-c1";
151 reg = <0x000000 0x80000>;
152 };
153 };
154 };
155
Jagan Teki72e94982018-08-05 00:40:11 +0530156 dma: dma-controller@1c02000 {
Hans de Goede6ef1be32015-06-02 15:53:40 +0200157 compatible = "allwinner,sun8i-a23-dma";
158 reg = <0x01c02000 0x1000>;
159 interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
Maxime Ripardcacb69f2017-09-05 20:59:04 +0200160 clocks = <&ccu CLK_BUS_DMA>;
161 resets = <&ccu RST_BUS_DMA>;
Hans de Goede6ef1be32015-06-02 15:53:40 +0200162 #dma-cells = <1>;
163 };
164
Samuel Holland8d6fe612022-04-27 15:31:24 -0500165 nfc: nand-controller@1c03000 {
166 compatible = "allwinner,sun8i-a23-nand-controller";
167 reg = <0x01c03000 0x1000>;
168 interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>;
169 clocks = <&ccu CLK_BUS_NAND>, <&ccu CLK_NAND>;
170 clock-names = "ahb", "mod";
171 resets = <&ccu RST_BUS_NAND>;
172 reset-names = "ahb";
173 dmas = <&dma 5>;
174 dma-names = "rxtx";
175 pinctrl-names = "default";
176 pinctrl-0 = <&nand_pins &nand_cs0_pin &nand_rb0_pin>;
177 status = "disabled";
178 #address-cells = <1>;
179 #size-cells = <0>;
180 };
181
182 tcon0: lcd-controller@1c0c000 {
183 /* compatible gets set in SoC specific dtsi file */
184 reg = <0x01c0c000 0x1000>;
185 interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
186 dmas = <&dma 12>;
187 clocks = <&ccu CLK_BUS_LCD>,
188 <&ccu CLK_LCD_CH0>,
189 <&ccu 13>;
190 clock-names = "ahb",
191 "tcon-ch0",
192 "lvds-alt";
Andre Przywara3cb77572023-10-19 15:45:32 +0100193 clock-output-names = "tcon-data-clock";
Samuel Holland8d6fe612022-04-27 15:31:24 -0500194 #clock-cells = <0>;
195 resets = <&ccu RST_BUS_LCD>,
196 <&ccu RST_BUS_LVDS>;
197 reset-names = "lcd",
198 "lvds";
199 status = "disabled";
200
201 ports {
202 #address-cells = <1>;
203 #size-cells = <0>;
204
205 tcon0_in: port@0 {
206 reg = <0>;
207
208 tcon0_in_drc0: endpoint {
209 remote-endpoint = <&drc0_out_tcon0>;
210 };
211 };
212
213 tcon0_out: port@1 {
214 reg = <1>;
215 };
216 };
217 };
218
Jagan Teki72e94982018-08-05 00:40:11 +0530219 mmc0: mmc@1c0f000 {
Maxime Ripardcacb69f2017-09-05 20:59:04 +0200220 compatible = "allwinner,sun7i-a20-mmc";
Hans de Goede6ef1be32015-06-02 15:53:40 +0200221 reg = <0x01c0f000 0x1000>;
Maxime Ripardcacb69f2017-09-05 20:59:04 +0200222 clocks = <&ccu CLK_BUS_MMC0>,
223 <&ccu CLK_MMC0>,
224 <&ccu CLK_MMC0_OUTPUT>,
225 <&ccu CLK_MMC0_SAMPLE>;
Hans de Goede6ef1be32015-06-02 15:53:40 +0200226 clock-names = "ahb",
227 "mmc",
228 "output",
229 "sample";
Maxime Ripardcacb69f2017-09-05 20:59:04 +0200230 resets = <&ccu RST_BUS_MMC0>;
Hans de Goede6ef1be32015-06-02 15:53:40 +0200231 reset-names = "ahb";
232 interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
Samuel Holland8d6fe612022-04-27 15:31:24 -0500233 pinctrl-names = "default";
234 pinctrl-0 = <&mmc0_pins>;
Hans de Goede6ef1be32015-06-02 15:53:40 +0200235 status = "disabled";
236 #address-cells = <1>;
237 #size-cells = <0>;
238 };
239
Jagan Teki72e94982018-08-05 00:40:11 +0530240 mmc1: mmc@1c10000 {
Maxime Ripardcacb69f2017-09-05 20:59:04 +0200241 compatible = "allwinner,sun7i-a20-mmc";
Hans de Goede6ef1be32015-06-02 15:53:40 +0200242 reg = <0x01c10000 0x1000>;
Maxime Ripardcacb69f2017-09-05 20:59:04 +0200243 clocks = <&ccu CLK_BUS_MMC1>,
244 <&ccu CLK_MMC1>,
245 <&ccu CLK_MMC1_OUTPUT>,
246 <&ccu CLK_MMC1_SAMPLE>;
Hans de Goede6ef1be32015-06-02 15:53:40 +0200247 clock-names = "ahb",
248 "mmc",
249 "output",
250 "sample";
Maxime Ripardcacb69f2017-09-05 20:59:04 +0200251 resets = <&ccu RST_BUS_MMC1>;
Hans de Goede6ef1be32015-06-02 15:53:40 +0200252 reset-names = "ahb";
253 interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
254 status = "disabled";
255 #address-cells = <1>;
256 #size-cells = <0>;
257 };
258
Jagan Teki72e94982018-08-05 00:40:11 +0530259 mmc2: mmc@1c11000 {
Maxime Ripardcacb69f2017-09-05 20:59:04 +0200260 compatible = "allwinner,sun7i-a20-mmc";
Hans de Goede6ef1be32015-06-02 15:53:40 +0200261 reg = <0x01c11000 0x1000>;
Maxime Ripardcacb69f2017-09-05 20:59:04 +0200262 clocks = <&ccu CLK_BUS_MMC2>,
263 <&ccu CLK_MMC2>,
264 <&ccu CLK_MMC2_OUTPUT>,
265 <&ccu CLK_MMC2_SAMPLE>;
Hans de Goede6ef1be32015-06-02 15:53:40 +0200266 clock-names = "ahb",
267 "mmc",
268 "output",
269 "sample";
Maxime Ripardcacb69f2017-09-05 20:59:04 +0200270 resets = <&ccu RST_BUS_MMC2>;
Hans de Goede6ef1be32015-06-02 15:53:40 +0200271 reset-names = "ahb";
272 interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
273 status = "disabled";
274 #address-cells = <1>;
275 #size-cells = <0>;
276 };
277
Jagan Teki72e94982018-08-05 00:40:11 +0530278 usb_otg: usb@1c19000 {
Maxime Ripardcacb69f2017-09-05 20:59:04 +0200279 /* compatible gets set in SoC specific dtsi file */
280 reg = <0x01c19000 0x0400>;
281 clocks = <&ccu CLK_BUS_OTG>;
282 resets = <&ccu RST_BUS_OTG>;
283 interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
284 interrupt-names = "mc";
285 phys = <&usbphy 0>;
286 phy-names = "usb";
287 extcon = <&usbphy 0>;
Samuel Holland8d6fe612022-04-27 15:31:24 -0500288 dr_mode = "otg";
Maxime Ripardcacb69f2017-09-05 20:59:04 +0200289 status = "disabled";
290 };
291
Jagan Teki72e94982018-08-05 00:40:11 +0530292 usbphy: phy@1c19400 {
Maxime Ripardcacb69f2017-09-05 20:59:04 +0200293 /*
294 * compatible and address regions get set in
295 * SoC specific dtsi file
296 */
297 clocks = <&ccu CLK_USB_PHY0>,
298 <&ccu CLK_USB_PHY1>;
299 clock-names = "usb0_phy",
300 "usb1_phy";
301 resets = <&ccu RST_USB_PHY0>,
302 <&ccu RST_USB_PHY1>;
303 reset-names = "usb0_reset",
304 "usb1_reset";
305 status = "disabled";
306 #phy-cells = <1>;
307 };
308
Jagan Teki72e94982018-08-05 00:40:11 +0530309 ehci0: usb@1c1a000 {
Hans de Goede0c86ceb2015-06-17 21:16:59 +0200310 compatible = "allwinner,sun8i-a23-ehci", "generic-ehci";
311 reg = <0x01c1a000 0x100>;
312 interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
Maxime Ripardcacb69f2017-09-05 20:59:04 +0200313 clocks = <&ccu CLK_BUS_EHCI>;
314 resets = <&ccu RST_BUS_EHCI>;
Hans de Goede7d831822015-08-05 17:39:14 +0200315 phys = <&usbphy 1>;
316 phy-names = "usb";
Hans de Goede0c86ceb2015-06-17 21:16:59 +0200317 status = "disabled";
318 };
319
Jagan Teki72e94982018-08-05 00:40:11 +0530320 ohci0: usb@1c1a400 {
Hans de Goede0c86ceb2015-06-17 21:16:59 +0200321 compatible = "allwinner,sun8i-a23-ohci", "generic-ohci";
322 reg = <0x01c1a400 0x100>;
323 interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
Maxime Ripardcacb69f2017-09-05 20:59:04 +0200324 clocks = <&ccu CLK_BUS_OHCI>, <&ccu CLK_USB_OHCI>;
325 resets = <&ccu RST_BUS_OHCI>;
Hans de Goede7d831822015-08-05 17:39:14 +0200326 phys = <&usbphy 1>;
327 phy-names = "usb";
Hans de Goede0c86ceb2015-06-17 21:16:59 +0200328 status = "disabled";
329 };
330
Jagan Teki72e94982018-08-05 00:40:11 +0530331 ccu: clock@1c20000 {
Maxime Ripardcacb69f2017-09-05 20:59:04 +0200332 reg = <0x01c20000 0x400>;
Andre Przywarafa15e502022-09-13 00:52:52 +0100333 clocks = <&osc24M>, <&rtc CLK_OSC32K>;
Maxime Ripardcacb69f2017-09-05 20:59:04 +0200334 clock-names = "hosc", "losc";
335 #clock-cells = <1>;
336 #reset-cells = <1>;
337 };
338
Jagan Teki72e94982018-08-05 00:40:11 +0530339 pio: pinctrl@1c20800 {
Hans de Goede6ef1be32015-06-02 15:53:40 +0200340 /* compatible gets set in SoC specific dtsi file */
341 reg = <0x01c20800 0x400>;
342 /* interrupts get set in SoC specific dtsi file */
Andre Przywarafa15e502022-09-13 00:52:52 +0100343 clocks = <&ccu CLK_BUS_PIO>, <&osc24M>,
344 <&rtc CLK_OSC32K>;
Maxime Ripardcacb69f2017-09-05 20:59:04 +0200345 clock-names = "apb", "hosc", "losc";
Hans de Goede6ef1be32015-06-02 15:53:40 +0200346 gpio-controller;
347 interrupt-controller;
Hans de Goede7d831822015-08-05 17:39:14 +0200348 #interrupt-cells = <3>;
Hans de Goede6ef1be32015-06-02 15:53:40 +0200349 #gpio-cells = <3>;
350
Samuel Holland8d6fe612022-04-27 15:31:24 -0500351 i2c0_pins: i2c0-pins {
352 pins = "PH2", "PH3";
353 function = "i2c0";
Maxime Ripardcacb69f2017-09-05 20:59:04 +0200354 };
355
Samuel Holland8d6fe612022-04-27 15:31:24 -0500356 i2c1_pins: i2c1-pins {
357 pins = "PH4", "PH5";
358 function = "i2c1";
Maxime Ripardcacb69f2017-09-05 20:59:04 +0200359 };
360
Samuel Holland8d6fe612022-04-27 15:31:24 -0500361 i2c2_pins: i2c2-pins {
362 pins = "PE12", "PE13";
363 function = "i2c2";
364 };
365
366 lcd_rgb666_pins: lcd-rgb666-pins {
367 pins = "PD2", "PD3", "PD4", "PD5", "PD6", "PD7",
368 "PD10", "PD11", "PD12", "PD13", "PD14", "PD15",
369 "PD18", "PD19", "PD20", "PD21", "PD22", "PD23",
370 "PD24", "PD25", "PD26", "PD27";
371 function = "lcd0";
Hans de Goede6ef1be32015-06-02 15:53:40 +0200372 };
373
Samuel Holland8d6fe612022-04-27 15:31:24 -0500374 mmc0_pins: mmc0-pins {
Maxime Ripardcacb69f2017-09-05 20:59:04 +0200375 pins = "PF0", "PF1", "PF2",
376 "PF3", "PF4", "PF5";
377 function = "mmc0";
378 drive-strength = <30>;
379 bias-pull-up;
Hans de Goede6ef1be32015-06-02 15:53:40 +0200380 };
381
Samuel Holland8d6fe612022-04-27 15:31:24 -0500382 mmc1_pg_pins: mmc1-pg-pins {
Maxime Ripardcacb69f2017-09-05 20:59:04 +0200383 pins = "PG0", "PG1", "PG2",
384 "PG3", "PG4", "PG5";
385 function = "mmc1";
386 drive-strength = <30>;
387 bias-pull-up;
Hans de Goede6ef1be32015-06-02 15:53:40 +0200388 };
389
Samuel Holland8d6fe612022-04-27 15:31:24 -0500390 mmc2_8bit_pins: mmc2-8bit-pins {
Maxime Ripardcacb69f2017-09-05 20:59:04 +0200391 pins = "PC5", "PC6", "PC8",
392 "PC9", "PC10", "PC11",
393 "PC12", "PC13", "PC14",
394 "PC15", "PC16";
395 function = "mmc2";
396 drive-strength = <30>;
397 bias-pull-up;
Chen-Yu Tsai075567e2015-06-23 19:57:26 +0800398 };
399
Jagan Teki72e94982018-08-05 00:40:11 +0530400 nand_pins: nand-pins {
401 pins = "PC0", "PC1", "PC2", "PC5",
402 "PC8", "PC9", "PC10", "PC11",
403 "PC12", "PC13", "PC14", "PC15";
404 function = "nand0";
405 };
406
Samuel Holland8d6fe612022-04-27 15:31:24 -0500407 nand_cs0_pin: nand-cs0-pin {
Jagan Teki72e94982018-08-05 00:40:11 +0530408 pins = "PC4";
409 function = "nand0";
410 bias-pull-up;
411 };
412
Samuel Holland8d6fe612022-04-27 15:31:24 -0500413 nand_cs1_pin: nand-cs1-pin {
Jagan Teki72e94982018-08-05 00:40:11 +0530414 pins = "PC3";
415 function = "nand0";
416 bias-pull-up;
417 };
418
Samuel Holland8d6fe612022-04-27 15:31:24 -0500419 nand_rb0_pin: nand-rb0-pin {
Jagan Teki72e94982018-08-05 00:40:11 +0530420 pins = "PC6";
421 function = "nand0";
422 bias-pull-up;
423 };
424
Samuel Holland8d6fe612022-04-27 15:31:24 -0500425 nand_rb1_pin: nand-rb1-pin {
Jagan Teki72e94982018-08-05 00:40:11 +0530426 pins = "PC7";
427 function = "nand0";
428 bias-pull-up;
429 };
430
Samuel Holland8d6fe612022-04-27 15:31:24 -0500431 pwm0_pin: pwm0-pin {
Maxime Ripardcacb69f2017-09-05 20:59:04 +0200432 pins = "PH0";
433 function = "pwm0";
Hans de Goede19888a42016-03-14 17:37:09 +0100434 };
435
Samuel Holland8d6fe612022-04-27 15:31:24 -0500436 uart0_pf_pins: uart0-pf-pins {
437 pins = "PF2", "PF4";
438 function = "uart0";
Hans de Goede6ef1be32015-06-02 15:53:40 +0200439 };
440
Samuel Holland8d6fe612022-04-27 15:31:24 -0500441 uart1_pg_pins: uart1-pg-pins {
442 pins = "PG6", "PG7";
443 function = "uart1";
Hans de Goede6ef1be32015-06-02 15:53:40 +0200444 };
Hans de Goede6ef1be32015-06-02 15:53:40 +0200445
Samuel Holland8d6fe612022-04-27 15:31:24 -0500446 uart1_cts_rts_pg_pins: uart1-cts-rts-pg-pins {
447 pins = "PG8", "PG9";
448 function = "uart1";
Maxime Ripardcacb69f2017-09-05 20:59:04 +0200449 };
Hans de Goede6ef1be32015-06-02 15:53:40 +0200450 };
451
Jagan Teki72e94982018-08-05 00:40:11 +0530452 timer@1c20c00 {
Samuel Holland8d6fe612022-04-27 15:31:24 -0500453 compatible = "allwinner,sun8i-a23-timer";
Hans de Goede6ef1be32015-06-02 15:53:40 +0200454 reg = <0x01c20c00 0xa0>;
455 interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>,
456 <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
457 clocks = <&osc24M>;
458 };
459
Jagan Teki72e94982018-08-05 00:40:11 +0530460 wdt0: watchdog@1c20ca0 {
Hans de Goede6ef1be32015-06-02 15:53:40 +0200461 compatible = "allwinner,sun6i-a31-wdt";
462 reg = <0x01c20ca0 0x20>;
463 interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
Samuel Holland8d6fe612022-04-27 15:31:24 -0500464 clocks = <&osc24M>;
Hans de Goede6ef1be32015-06-02 15:53:40 +0200465 };
466
Jagan Teki72e94982018-08-05 00:40:11 +0530467 pwm: pwm@1c21400 {
Hans de Goede19888a42016-03-14 17:37:09 +0100468 compatible = "allwinner,sun7i-a20-pwm";
469 reg = <0x01c21400 0xc>;
470 clocks = <&osc24M>;
471 #pwm-cells = <3>;
472 status = "disabled";
473 };
474
Jagan Teki72e94982018-08-05 00:40:11 +0530475 lradc: lradc@1c22800 {
Hans de Goede6ef1be32015-06-02 15:53:40 +0200476 compatible = "allwinner,sun4i-a10-lradc-keys";
477 reg = <0x01c22800 0x100>;
478 interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
479 status = "disabled";
480 };
481
Jagan Teki72e94982018-08-05 00:40:11 +0530482 uart0: serial@1c28000 {
Hans de Goede6ef1be32015-06-02 15:53:40 +0200483 compatible = "snps,dw-apb-uart";
484 reg = <0x01c28000 0x400>;
485 interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
486 reg-shift = <2>;
487 reg-io-width = <4>;
Maxime Ripardcacb69f2017-09-05 20:59:04 +0200488 clocks = <&ccu CLK_BUS_UART0>;
489 resets = <&ccu RST_BUS_UART0>;
Hans de Goede6ef1be32015-06-02 15:53:40 +0200490 dmas = <&dma 6>, <&dma 6>;
Andre Przywara3e435d12023-04-02 01:17:07 +0100491 dma-names = "tx", "rx";
Hans de Goede6ef1be32015-06-02 15:53:40 +0200492 status = "disabled";
493 };
494
Jagan Teki72e94982018-08-05 00:40:11 +0530495 uart1: serial@1c28400 {
Hans de Goede6ef1be32015-06-02 15:53:40 +0200496 compatible = "snps,dw-apb-uart";
497 reg = <0x01c28400 0x400>;
498 interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
499 reg-shift = <2>;
500 reg-io-width = <4>;
Maxime Ripardcacb69f2017-09-05 20:59:04 +0200501 clocks = <&ccu CLK_BUS_UART1>;
502 resets = <&ccu RST_BUS_UART1>;
Hans de Goede6ef1be32015-06-02 15:53:40 +0200503 dmas = <&dma 7>, <&dma 7>;
Andre Przywara3e435d12023-04-02 01:17:07 +0100504 dma-names = "tx", "rx";
Hans de Goede6ef1be32015-06-02 15:53:40 +0200505 status = "disabled";
506 };
507
Jagan Teki72e94982018-08-05 00:40:11 +0530508 uart2: serial@1c28800 {
Hans de Goede6ef1be32015-06-02 15:53:40 +0200509 compatible = "snps,dw-apb-uart";
510 reg = <0x01c28800 0x400>;
511 interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
512 reg-shift = <2>;
513 reg-io-width = <4>;
Maxime Ripardcacb69f2017-09-05 20:59:04 +0200514 clocks = <&ccu CLK_BUS_UART2>;
515 resets = <&ccu RST_BUS_UART2>;
Hans de Goede6ef1be32015-06-02 15:53:40 +0200516 dmas = <&dma 8>, <&dma 8>;
Andre Przywara3e435d12023-04-02 01:17:07 +0100517 dma-names = "tx", "rx";
Hans de Goede6ef1be32015-06-02 15:53:40 +0200518 status = "disabled";
519 };
520
Jagan Teki72e94982018-08-05 00:40:11 +0530521 uart3: serial@1c28c00 {
Hans de Goede6ef1be32015-06-02 15:53:40 +0200522 compatible = "snps,dw-apb-uart";
523 reg = <0x01c28c00 0x400>;
524 interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
525 reg-shift = <2>;
526 reg-io-width = <4>;
Maxime Ripardcacb69f2017-09-05 20:59:04 +0200527 clocks = <&ccu CLK_BUS_UART3>;
528 resets = <&ccu RST_BUS_UART3>;
Hans de Goede6ef1be32015-06-02 15:53:40 +0200529 dmas = <&dma 9>, <&dma 9>;
Andre Przywara3e435d12023-04-02 01:17:07 +0100530 dma-names = "tx", "rx";
Hans de Goede6ef1be32015-06-02 15:53:40 +0200531 status = "disabled";
532 };
533
Jagan Teki72e94982018-08-05 00:40:11 +0530534 uart4: serial@1c29000 {
Hans de Goede6ef1be32015-06-02 15:53:40 +0200535 compatible = "snps,dw-apb-uart";
536 reg = <0x01c29000 0x400>;
537 interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
538 reg-shift = <2>;
539 reg-io-width = <4>;
Maxime Ripardcacb69f2017-09-05 20:59:04 +0200540 clocks = <&ccu CLK_BUS_UART4>;
541 resets = <&ccu RST_BUS_UART4>;
Hans de Goede6ef1be32015-06-02 15:53:40 +0200542 dmas = <&dma 10>, <&dma 10>;
Andre Przywara3e435d12023-04-02 01:17:07 +0100543 dma-names = "tx", "rx";
Hans de Goede6ef1be32015-06-02 15:53:40 +0200544 status = "disabled";
545 };
546
Jagan Teki72e94982018-08-05 00:40:11 +0530547 i2c0: i2c@1c2ac00 {
Hans de Goede6ef1be32015-06-02 15:53:40 +0200548 compatible = "allwinner,sun6i-a31-i2c";
549 reg = <0x01c2ac00 0x400>;
550 interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
Maxime Ripardcacb69f2017-09-05 20:59:04 +0200551 clocks = <&ccu CLK_BUS_I2C0>;
552 resets = <&ccu RST_BUS_I2C0>;
Samuel Holland8d6fe612022-04-27 15:31:24 -0500553 pinctrl-names = "default";
554 pinctrl-0 = <&i2c0_pins>;
Hans de Goede6ef1be32015-06-02 15:53:40 +0200555 status = "disabled";
556 #address-cells = <1>;
557 #size-cells = <0>;
558 };
559
Jagan Teki72e94982018-08-05 00:40:11 +0530560 i2c1: i2c@1c2b000 {
Hans de Goede6ef1be32015-06-02 15:53:40 +0200561 compatible = "allwinner,sun6i-a31-i2c";
562 reg = <0x01c2b000 0x400>;
563 interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
Maxime Ripardcacb69f2017-09-05 20:59:04 +0200564 clocks = <&ccu CLK_BUS_I2C1>;
565 resets = <&ccu RST_BUS_I2C1>;
Samuel Holland8d6fe612022-04-27 15:31:24 -0500566 pinctrl-names = "default";
567 pinctrl-0 = <&i2c1_pins>;
Hans de Goede6ef1be32015-06-02 15:53:40 +0200568 status = "disabled";
569 #address-cells = <1>;
570 #size-cells = <0>;
571 };
572
Jagan Teki72e94982018-08-05 00:40:11 +0530573 i2c2: i2c@1c2b400 {
Hans de Goede6ef1be32015-06-02 15:53:40 +0200574 compatible = "allwinner,sun6i-a31-i2c";
575 reg = <0x01c2b400 0x400>;
576 interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
Maxime Ripardcacb69f2017-09-05 20:59:04 +0200577 clocks = <&ccu CLK_BUS_I2C2>;
578 resets = <&ccu RST_BUS_I2C2>;
Samuel Holland8d6fe612022-04-27 15:31:24 -0500579 pinctrl-names = "default";
580 pinctrl-0 = <&i2c2_pins>;
Hans de Goede6ef1be32015-06-02 15:53:40 +0200581 status = "disabled";
582 #address-cells = <1>;
583 #size-cells = <0>;
584 };
585
Maxime Ripardcacb69f2017-09-05 20:59:04 +0200586 mali: gpu@1c40000 {
587 compatible = "allwinner,sun8i-a23-mali",
588 "allwinner,sun7i-a20-mali", "arm,mali-400";
589 reg = <0x01c40000 0x10000>;
590 interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>,
591 <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>,
592 <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>,
593 <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
594 <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
595 <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>,
596 <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
597 interrupt-names = "gp",
598 "gpmmu",
599 "pp0",
600 "ppmmu0",
601 "pp1",
602 "ppmmu1",
603 "pmu";
604 clocks = <&ccu CLK_BUS_GPU>, <&ccu CLK_GPU>;
605 clock-names = "bus", "core";
606 resets = <&ccu RST_BUS_GPU>;
607 #cooling-cells = <2>;
608
609 assigned-clocks = <&ccu CLK_GPU>;
610 assigned-clock-rates = <384000000>;
611 };
612
Jagan Teki72e94982018-08-05 00:40:11 +0530613 gic: interrupt-controller@1c81000 {
Samuel Holland8d6fe612022-04-27 15:31:24 -0500614 compatible = "arm,gic-400";
Hans de Goede6ef1be32015-06-02 15:53:40 +0200615 reg = <0x01c81000 0x1000>,
Maxime Ripardcacb69f2017-09-05 20:59:04 +0200616 <0x01c82000 0x2000>,
Hans de Goede6ef1be32015-06-02 15:53:40 +0200617 <0x01c84000 0x2000>,
618 <0x01c86000 0x2000>;
619 interrupt-controller;
620 #interrupt-cells = <3>;
621 interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
622 };
623
Samuel Holland8d6fe612022-04-27 15:31:24 -0500624 fe0: display-frontend@1e00000 {
625 /* compatible gets set in SoC specific dtsi file */
626 reg = <0x01e00000 0x20000>;
627 interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>;
628 clocks = <&ccu CLK_BUS_DE_FE>, <&ccu CLK_DE_FE>,
629 <&ccu CLK_DRAM_DE_FE>;
630 clock-names = "ahb", "mod",
631 "ram";
632 resets = <&ccu RST_BUS_DE_FE>;
633
634 ports {
635 #address-cells = <1>;
636 #size-cells = <0>;
637
638 fe0_out: port@1 {
639 reg = <1>;
640
641 fe0_out_be0: endpoint {
642 remote-endpoint = <&be0_in_fe0>;
643 };
644 };
645 };
646 };
647
648 be0: display-backend@1e60000 {
649 /* compatible gets set in SoC specific dtsi file */
650 reg = <0x01e60000 0x10000>;
651 interrupts = <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>;
652 clocks = <&ccu CLK_BUS_DE_BE>, <&ccu CLK_DE_BE>,
653 <&ccu CLK_DRAM_DE_BE>;
654 clock-names = "ahb", "mod",
655 "ram";
656 resets = <&ccu RST_BUS_DE_BE>;
657
658 ports {
659 #address-cells = <1>;
660 #size-cells = <0>;
661
662 be0_in: port@0 {
663 reg = <0>;
664
665 be0_in_fe0: endpoint {
666 remote-endpoint = <&fe0_out_be0>;
667 };
668 };
669
670 be0_out: port@1 {
671 reg = <1>;
672
673 be0_out_drc0: endpoint {
674 remote-endpoint = <&drc0_in_be0>;
675 };
676 };
677 };
678 };
679
680 drc0: drc@1e70000 {
681 /* compatible gets set in SoC specific dtsi file */
682 reg = <0x01e70000 0x10000>;
683 interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>;
684 clocks = <&ccu CLK_BUS_DRC>, <&ccu CLK_DRC>,
685 <&ccu CLK_DRAM_DRC>;
686 clock-names = "ahb", "mod", "ram";
687 resets = <&ccu RST_BUS_DRC>;
688
689 ports {
690 #address-cells = <1>;
691 #size-cells = <0>;
692
693 drc0_in: port@0 {
694 reg = <0>;
695
696 drc0_in_be0: endpoint {
697 remote-endpoint = <&be0_out_drc0>;
698 };
699 };
700
701 drc0_out: port@1 {
702 reg = <1>;
703
704 drc0_out_tcon0: endpoint {
705 remote-endpoint = <&tcon0_in_drc0>;
706 };
707 };
708 };
709 };
710
Jagan Teki72e94982018-08-05 00:40:11 +0530711 rtc: rtc@1f00000 {
Samuel Holland8d6fe612022-04-27 15:31:24 -0500712 compatible = "allwinner,sun8i-a23-rtc";
713 reg = <0x01f00000 0x400>;
Hans de Goede6ef1be32015-06-02 15:53:40 +0200714 interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
715 <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
Samuel Holland8d6fe612022-04-27 15:31:24 -0500716 clock-output-names = "osc32k", "osc32k-out";
Maxime Ripardcacb69f2017-09-05 20:59:04 +0200717 clocks = <&ext_osc32k>;
718 #clock-cells = <1>;
Hans de Goede6ef1be32015-06-02 15:53:40 +0200719 };
720
Samuel Holland8d6fe612022-04-27 15:31:24 -0500721 r_intc: interrupt-controller@1f00c00 {
Maxime Ripardcacb69f2017-09-05 20:59:04 +0200722 compatible = "allwinner,sun6i-a31-r-intc";
Hans de Goede19888a42016-03-14 17:37:09 +0100723 interrupt-controller;
724 #interrupt-cells = <2>;
Maxime Ripardcacb69f2017-09-05 20:59:04 +0200725 reg = <0x01f00c00 0x400>;
Hans de Goede19888a42016-03-14 17:37:09 +0100726 interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
727 };
728
Jagan Teki72e94982018-08-05 00:40:11 +0530729 prcm@1f01400 {
Hans de Goede6ef1be32015-06-02 15:53:40 +0200730 compatible = "allwinner,sun8i-a23-prcm";
731 reg = <0x01f01400 0x200>;
732
Andre Przywara3b798212024-04-19 17:59:52 +0100733 ar100: ar100-clk {
Hans de Goede6ef1be32015-06-02 15:53:40 +0200734 compatible = "fixed-factor-clock";
735 #clock-cells = <0>;
736 clock-div = <1>;
737 clock-mult = <1>;
738 clocks = <&osc24M>;
739 clock-output-names = "ar100";
740 };
741
Andre Przywara3b798212024-04-19 17:59:52 +0100742 ahb0: ahb0-clk {
Hans de Goede6ef1be32015-06-02 15:53:40 +0200743 compatible = "fixed-factor-clock";
744 #clock-cells = <0>;
745 clock-div = <1>;
746 clock-mult = <1>;
747 clocks = <&ar100>;
748 clock-output-names = "ahb0";
749 };
750
Andre Przywara3b798212024-04-19 17:59:52 +0100751 apb0: apb0-clk {
Hans de Goede6ef1be32015-06-02 15:53:40 +0200752 compatible = "allwinner,sun8i-a23-apb0-clk";
753 #clock-cells = <0>;
754 clocks = <&ahb0>;
755 clock-output-names = "apb0";
756 };
757
Andre Przywara3b798212024-04-19 17:59:52 +0100758 apb0_gates: apb0-gates-clk {
Hans de Goede6ef1be32015-06-02 15:53:40 +0200759 compatible = "allwinner,sun8i-a23-apb0-gates-clk";
760 #clock-cells = <1>;
761 clocks = <&apb0>;
762 clock-output-names = "apb0_pio", "apb0_timer",
763 "apb0_rsb", "apb0_uart",
764 "apb0_i2c";
765 };
766
Andre Przywara3b798212024-04-19 17:59:52 +0100767 apb0_rst: apb0-rst {
Hans de Goede6ef1be32015-06-02 15:53:40 +0200768 compatible = "allwinner,sun6i-a31-clock-reset";
769 #reset-cells = <1>;
770 };
Maxime Ripardcacb69f2017-09-05 20:59:04 +0200771
772 codec_analog: codec-analog {
773 compatible = "allwinner,sun8i-a23-codec-analog";
774 };
Hans de Goede6ef1be32015-06-02 15:53:40 +0200775 };
776
Jagan Teki72e94982018-08-05 00:40:11 +0530777 cpucfg@1f01c00 {
Hans de Goede6ef1be32015-06-02 15:53:40 +0200778 compatible = "allwinner,sun8i-a23-cpuconfig";
779 reg = <0x01f01c00 0x300>;
780 };
781
Jagan Teki72e94982018-08-05 00:40:11 +0530782 r_uart: serial@1f02800 {
Hans de Goede6ef1be32015-06-02 15:53:40 +0200783 compatible = "snps,dw-apb-uart";
784 reg = <0x01f02800 0x400>;
785 interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
786 reg-shift = <2>;
787 reg-io-width = <4>;
788 clocks = <&apb0_gates 4>;
789 resets = <&apb0_rst 4>;
790 status = "disabled";
791 };
792
Samuel Holland8d6fe612022-04-27 15:31:24 -0500793 r_i2c: i2c@1f02400 {
794 compatible = "allwinner,sun8i-a23-i2c",
795 "allwinner,sun6i-a31-i2c";
796 reg = <0x01f02400 0x400>;
797 interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
798 pinctrl-names = "default";
799 pinctrl-0 = <&r_i2c_pins>;
800 clocks = <&apb0_gates 6>;
801 resets = <&apb0_rst 6>;
802 status = "disabled";
803 #address-cells = <1>;
804 #size-cells = <0>;
805 };
806
Jagan Teki72e94982018-08-05 00:40:11 +0530807 r_pio: pinctrl@1f02c00 {
Hans de Goede6ef1be32015-06-02 15:53:40 +0200808 compatible = "allwinner,sun8i-a23-r-pinctrl";
809 reg = <0x01f02c00 0x400>;
810 interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
Andre Przywarafa15e502022-09-13 00:52:52 +0100811 clocks = <&apb0_gates 0>, <&osc24M>, <&rtc CLK_OSC32K>;
Maxime Ripardcacb69f2017-09-05 20:59:04 +0200812 clock-names = "apb", "hosc", "losc";
Hans de Goede6ef1be32015-06-02 15:53:40 +0200813 gpio-controller;
814 interrupt-controller;
Hans de Goede19888a42016-03-14 17:37:09 +0100815 #interrupt-cells = <3>;
Hans de Goede6ef1be32015-06-02 15:53:40 +0200816 #gpio-cells = <3>;
817
Samuel Holland8d6fe612022-04-27 15:31:24 -0500818 r_i2c_pins: r-i2c-pins {
819 pins = "PL0", "PL1";
820 function = "s_i2c";
821 bias-pull-up;
822 };
823
824 r_rsb_pins: r-rsb-pins {
Maxime Ripardcacb69f2017-09-05 20:59:04 +0200825 pins = "PL0", "PL1";
826 function = "s_rsb";
827 drive-strength = <20>;
828 bias-pull-up;
Hans de Goede19888a42016-03-14 17:37:09 +0100829 };
830
Samuel Holland8d6fe612022-04-27 15:31:24 -0500831 r_uart_pins_a: r-uart-pins {
Maxime Ripardcacb69f2017-09-05 20:59:04 +0200832 pins = "PL2", "PL3";
833 function = "s_uart";
Hans de Goede6ef1be32015-06-02 15:53:40 +0200834 };
835 };
Hans de Goede19888a42016-03-14 17:37:09 +0100836
Jagan Teki72e94982018-08-05 00:40:11 +0530837 r_rsb: rsb@1f03400 {
Hans de Goede19888a42016-03-14 17:37:09 +0100838 compatible = "allwinner,sun8i-a23-rsb";
839 reg = <0x01f03400 0x400>;
840 interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
841 clocks = <&apb0_gates 3>;
842 clock-frequency = <3000000>;
843 resets = <&apb0_rst 3>;
844 pinctrl-names = "default";
845 pinctrl-0 = <&r_rsb_pins>;
846 status = "disabled";
847 #address-cells = <1>;
848 #size-cells = <0>;
849 };
Hans de Goede6ef1be32015-06-02 15:53:40 +0200850 };
851};