blob: 6cea57e07f8add3db1f59b6edd8c408f59c51687 [file] [log] [blame]
Andre Przywara7514ed32018-07-04 14:16:36 +01001/*
2 * Copyright (C) 2015 Jens Kuske <jenskuske@gmail.com>
3 *
4 * This file is dual-licensed: you can use it either under the terms
5 * of the GPL or the X11 license, at your option. Note that this dual
6 * licensing only applies to this file, and not this project as a
7 * whole.
8 *
9 * a) This file is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of the
12 * License, or (at your option) any later version.
13 *
14 * This file is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * Or, alternatively,
20 *
21 * b) Permission is hereby granted, free of charge, to any person
22 * obtaining a copy of this software and associated documentation
23 * files (the "Software"), to deal in the Software without
24 * restriction, including without limitation the rights to use,
25 * copy, modify, merge, publish, distribute, sublicense, and/or
26 * sell copies of the Software, and to permit persons to whom the
27 * Software is furnished to do so, subject to the following
28 * conditions:
29 *
30 * The above copyright notice and this permission notice shall be
31 * included in all copies or substantial portions of the Software.
32 *
33 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
34 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
35 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
36 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
37 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
38 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
39 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
40 * OTHER DEALINGS IN THE SOFTWARE.
41 */
42
43#include <dt-bindings/clock/sun8i-de2.h>
44#include <dt-bindings/clock/sun8i-h3-ccu.h>
45#include <dt-bindings/clock/sun8i-r-ccu.h>
46#include <dt-bindings/interrupt-controller/arm-gic.h>
47#include <dt-bindings/reset/sun8i-de2.h>
48#include <dt-bindings/reset/sun8i-h3-ccu.h>
49#include <dt-bindings/reset/sun8i-r-ccu.h>
50
51/ {
52 interrupt-parent = <&gic>;
53 #address-cells = <1>;
54 #size-cells = <1>;
55
56 chosen {
57 #address-cells = <1>;
58 #size-cells = <1>;
59 ranges;
60
61 framebuffer-hdmi {
62 compatible = "allwinner,simple-framebuffer",
63 "simple-framebuffer";
64 allwinner,pipeline = "mixer0-lcd0-hdmi";
65 clocks = <&display_clocks CLK_MIXER0>,
66 <&ccu CLK_TCON0>, <&ccu CLK_HDMI>;
67 status = "disabled";
68 };
69
70 framebuffer-tve {
71 compatible = "allwinner,simple-framebuffer",
72 "simple-framebuffer";
73 allwinner,pipeline = "mixer1-lcd1-tve";
74 clocks = <&display_clocks CLK_MIXER1>,
75 <&ccu CLK_TVE>;
76 status = "disabled";
77 };
78 };
79
80 clocks {
81 #address-cells = <1>;
82 #size-cells = <1>;
83 ranges;
84
85 osc24M: osc24M_clk {
86 #clock-cells = <0>;
87 compatible = "fixed-clock";
88 clock-frequency = <24000000>;
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +080089 clock-accuracy = <50000>;
Andre Przywara7514ed32018-07-04 14:16:36 +010090 clock-output-names = "osc24M";
91 };
92
93 osc32k: osc32k_clk {
94 #clock-cells = <0>;
95 compatible = "fixed-clock";
96 clock-frequency = <32768>;
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +080097 clock-accuracy = <50000>;
98 clock-output-names = "ext_osc32k";
Andre Przywara7514ed32018-07-04 14:16:36 +010099 };
100 };
101
102 de: display-engine {
103 compatible = "allwinner,sun8i-h3-display-engine";
104 allwinner,pipelines = <&mixer0>;
105 status = "disabled";
106 };
107
108 soc {
109 compatible = "simple-bus";
110 #address-cells = <1>;
111 #size-cells = <1>;
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800112 dma-ranges;
Andre Przywara7514ed32018-07-04 14:16:36 +0100113 ranges;
114
115 display_clocks: clock@1000000 {
116 /* compatible is in per SoC .dtsi file */
Andre Przywara58f68612021-05-25 01:20:25 +0100117 reg = <0x01000000 0x10000>;
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800118 clocks = <&ccu CLK_BUS_DE>,
119 <&ccu CLK_DE>;
120 clock-names = "bus",
121 "mod";
Andre Przywara7514ed32018-07-04 14:16:36 +0100122 resets = <&ccu RST_BUS_DE>;
123 #clock-cells = <1>;
124 #reset-cells = <1>;
125 };
126
127 mixer0: mixer@1100000 {
128 compatible = "allwinner,sun8i-h3-de2-mixer-0";
129 reg = <0x01100000 0x100000>;
130 clocks = <&display_clocks CLK_BUS_MIXER0>,
131 <&display_clocks CLK_MIXER0>;
132 clock-names = "bus",
133 "mod";
134 resets = <&display_clocks RST_MIXER0>;
135
136 ports {
137 #address-cells = <1>;
138 #size-cells = <0>;
139
140 mixer0_out: port@1 {
141 reg = <1>;
142
143 mixer0_out_tcon0: endpoint {
144 remote-endpoint = <&tcon0_in_mixer0>;
145 };
146 };
147 };
148 };
149
Andre Przywara7514ed32018-07-04 14:16:36 +0100150 dma: dma-controller@1c02000 {
151 compatible = "allwinner,sun8i-h3-dma";
152 reg = <0x01c02000 0x1000>;
153 interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
154 clocks = <&ccu CLK_BUS_DMA>;
155 resets = <&ccu RST_BUS_DMA>;
156 #dma-cells = <1>;
157 };
158
159 tcon0: lcd-controller@1c0c000 {
160 compatible = "allwinner,sun8i-h3-tcon-tv",
161 "allwinner,sun8i-a83t-tcon-tv";
162 reg = <0x01c0c000 0x1000>;
163 interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
164 clocks = <&ccu CLK_BUS_TCON0>, <&ccu CLK_TCON0>;
165 clock-names = "ahb", "tcon-ch1";
166 resets = <&ccu RST_BUS_TCON0>;
167 reset-names = "lcd";
168
169 ports {
170 #address-cells = <1>;
171 #size-cells = <0>;
172
173 tcon0_in: port@0 {
174 reg = <0>;
175
176 tcon0_in_mixer0: endpoint {
177 remote-endpoint = <&mixer0_out_tcon0>;
178 };
179 };
180
181 tcon0_out: port@1 {
182 #address-cells = <1>;
183 #size-cells = <0>;
184 reg = <1>;
185
186 tcon0_out_hdmi: endpoint@1 {
187 reg = <1>;
188 remote-endpoint = <&hdmi_in_tcon0>;
189 };
190 };
191 };
192 };
193
194 mmc0: mmc@1c0f000 {
195 /* compatible and clocks are in per SoC .dtsi file */
196 reg = <0x01c0f000 0x1000>;
197 pinctrl-names = "default";
198 pinctrl-0 = <&mmc0_pins>;
199 resets = <&ccu RST_BUS_MMC0>;
200 reset-names = "ahb";
201 interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
202 status = "disabled";
203 #address-cells = <1>;
204 #size-cells = <0>;
205 };
206
207 mmc1: mmc@1c10000 {
208 /* compatible and clocks are in per SoC .dtsi file */
209 reg = <0x01c10000 0x1000>;
210 pinctrl-names = "default";
211 pinctrl-0 = <&mmc1_pins>;
212 resets = <&ccu RST_BUS_MMC1>;
213 reset-names = "ahb";
214 interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
215 status = "disabled";
216 #address-cells = <1>;
217 #size-cells = <0>;
218 };
219
220 mmc2: mmc@1c11000 {
221 /* compatible and clocks are in per SoC .dtsi file */
222 reg = <0x01c11000 0x1000>;
223 resets = <&ccu RST_BUS_MMC2>;
224 reset-names = "ahb";
225 interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
226 status = "disabled";
227 #address-cells = <1>;
228 #size-cells = <0>;
229 };
230
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800231 sid: eeprom@1c14000 {
232 /* compatible is in per SoC .dtsi file */
233 reg = <0x1c14000 0x400>;
234 #address-cells = <1>;
235 #size-cells = <1>;
236
237 ths_calibration: thermal-sensor-calibration@34 {
238 reg = <0x34 4>;
239 };
240 };
241
Andre Przywara58f68612021-05-25 01:20:25 +0100242 msgbox: mailbox@1c17000 {
243 compatible = "allwinner,sun8i-h3-msgbox",
244 "allwinner,sun6i-a31-msgbox";
245 reg = <0x01c17000 0x1000>;
246 clocks = <&ccu CLK_BUS_MSGBOX>;
247 resets = <&ccu RST_BUS_MSGBOX>;
248 interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>;
249 #mbox-cells = <1>;
250 };
251
Andre Przywara7514ed32018-07-04 14:16:36 +0100252 usb_otg: usb@1c19000 {
253 compatible = "allwinner,sun8i-h3-musb";
254 reg = <0x01c19000 0x400>;
255 clocks = <&ccu CLK_BUS_OTG>;
256 resets = <&ccu RST_BUS_OTG>;
257 interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
258 interrupt-names = "mc";
259 phys = <&usbphy 0>;
260 phy-names = "usb";
261 extcon = <&usbphy 0>;
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800262 dr_mode = "otg";
Andre Przywara7514ed32018-07-04 14:16:36 +0100263 status = "disabled";
264 };
265
266 usbphy: phy@1c19400 {
267 compatible = "allwinner,sun8i-h3-usb-phy";
268 reg = <0x01c19400 0x2c>,
269 <0x01c1a800 0x4>,
270 <0x01c1b800 0x4>,
271 <0x01c1c800 0x4>,
272 <0x01c1d800 0x4>;
273 reg-names = "phy_ctrl",
274 "pmu0",
275 "pmu1",
276 "pmu2",
277 "pmu3";
278 clocks = <&ccu CLK_USB_PHY0>,
279 <&ccu CLK_USB_PHY1>,
280 <&ccu CLK_USB_PHY2>,
281 <&ccu CLK_USB_PHY3>;
282 clock-names = "usb0_phy",
283 "usb1_phy",
284 "usb2_phy",
285 "usb3_phy";
286 resets = <&ccu RST_USB_PHY0>,
287 <&ccu RST_USB_PHY1>,
288 <&ccu RST_USB_PHY2>,
289 <&ccu RST_USB_PHY3>;
290 reset-names = "usb0_reset",
291 "usb1_reset",
292 "usb2_reset",
293 "usb3_reset";
294 status = "disabled";
295 #phy-cells = <1>;
296 };
297
298 ehci0: usb@1c1a000 {
299 compatible = "allwinner,sun8i-h3-ehci", "generic-ehci";
300 reg = <0x01c1a000 0x100>;
301 interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
302 clocks = <&ccu CLK_BUS_EHCI0>, <&ccu CLK_BUS_OHCI0>;
303 resets = <&ccu RST_BUS_EHCI0>, <&ccu RST_BUS_OHCI0>;
304 status = "disabled";
305 };
306
307 ohci0: usb@1c1a400 {
308 compatible = "allwinner,sun8i-h3-ohci", "generic-ohci";
309 reg = <0x01c1a400 0x100>;
310 interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
311 clocks = <&ccu CLK_BUS_EHCI0>, <&ccu CLK_BUS_OHCI0>,
312 <&ccu CLK_USB_OHCI0>;
313 resets = <&ccu RST_BUS_EHCI0>, <&ccu RST_BUS_OHCI0>;
314 status = "disabled";
315 };
316
317 ehci1: usb@1c1b000 {
318 compatible = "allwinner,sun8i-h3-ehci", "generic-ehci";
319 reg = <0x01c1b000 0x100>;
320 interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
321 clocks = <&ccu CLK_BUS_EHCI1>, <&ccu CLK_BUS_OHCI1>;
322 resets = <&ccu RST_BUS_EHCI1>, <&ccu RST_BUS_OHCI1>;
323 phys = <&usbphy 1>;
324 phy-names = "usb";
325 status = "disabled";
326 };
327
328 ohci1: usb@1c1b400 {
329 compatible = "allwinner,sun8i-h3-ohci", "generic-ohci";
330 reg = <0x01c1b400 0x100>;
331 interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
332 clocks = <&ccu CLK_BUS_EHCI1>, <&ccu CLK_BUS_OHCI1>,
333 <&ccu CLK_USB_OHCI1>;
334 resets = <&ccu RST_BUS_EHCI1>, <&ccu RST_BUS_OHCI1>;
335 phys = <&usbphy 1>;
336 phy-names = "usb";
337 status = "disabled";
338 };
339
340 ehci2: usb@1c1c000 {
341 compatible = "allwinner,sun8i-h3-ehci", "generic-ehci";
342 reg = <0x01c1c000 0x100>;
343 interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
344 clocks = <&ccu CLK_BUS_EHCI2>, <&ccu CLK_BUS_OHCI2>;
345 resets = <&ccu RST_BUS_EHCI2>, <&ccu RST_BUS_OHCI2>;
346 phys = <&usbphy 2>;
347 phy-names = "usb";
348 status = "disabled";
349 };
350
351 ohci2: usb@1c1c400 {
352 compatible = "allwinner,sun8i-h3-ohci", "generic-ohci";
353 reg = <0x01c1c400 0x100>;
354 interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
355 clocks = <&ccu CLK_BUS_EHCI2>, <&ccu CLK_BUS_OHCI2>,
356 <&ccu CLK_USB_OHCI2>;
357 resets = <&ccu RST_BUS_EHCI2>, <&ccu RST_BUS_OHCI2>;
358 phys = <&usbphy 2>;
359 phy-names = "usb";
360 status = "disabled";
361 };
362
363 ehci3: usb@1c1d000 {
364 compatible = "allwinner,sun8i-h3-ehci", "generic-ehci";
365 reg = <0x01c1d000 0x100>;
366 interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
367 clocks = <&ccu CLK_BUS_EHCI3>, <&ccu CLK_BUS_OHCI3>;
368 resets = <&ccu RST_BUS_EHCI3>, <&ccu RST_BUS_OHCI3>;
369 phys = <&usbphy 3>;
370 phy-names = "usb";
371 status = "disabled";
372 };
373
374 ohci3: usb@1c1d400 {
375 compatible = "allwinner,sun8i-h3-ohci", "generic-ohci";
376 reg = <0x01c1d400 0x100>;
377 interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
378 clocks = <&ccu CLK_BUS_EHCI3>, <&ccu CLK_BUS_OHCI3>,
379 <&ccu CLK_USB_OHCI3>;
380 resets = <&ccu RST_BUS_EHCI3>, <&ccu RST_BUS_OHCI3>;
381 phys = <&usbphy 3>;
382 phy-names = "usb";
383 status = "disabled";
384 };
385
386 ccu: clock@1c20000 {
387 /* compatible is in per SoC .dtsi file */
388 reg = <0x01c20000 0x400>;
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800389 clocks = <&osc24M>, <&rtc 0>;
Andre Przywara7514ed32018-07-04 14:16:36 +0100390 clock-names = "hosc", "losc";
391 #clock-cells = <1>;
392 #reset-cells = <1>;
393 };
394
395 pio: pinctrl@1c20800 {
396 /* compatible is in per SoC .dtsi file */
397 reg = <0x01c20800 0x400>;
398 interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>,
399 <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800400 clocks = <&ccu CLK_BUS_PIO>, <&osc24M>, <&rtc 0>;
Andre Przywara7514ed32018-07-04 14:16:36 +0100401 clock-names = "apb", "hosc", "losc";
402 gpio-controller;
403 #gpio-cells = <3>;
404 interrupt-controller;
405 #interrupt-cells = <3>;
406
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800407 csi_pins: csi-pins {
408 pins = "PE0", "PE2", "PE3", "PE4", "PE5",
409 "PE6", "PE7", "PE8", "PE9", "PE10",
410 "PE11";
411 function = "csi";
412 };
413
414 emac_rgmii_pins: emac-rgmii-pins {
Andre Przywara7514ed32018-07-04 14:16:36 +0100415 pins = "PD0", "PD1", "PD2", "PD3", "PD4",
416 "PD5", "PD7", "PD8", "PD9", "PD10",
417 "PD12", "PD13", "PD15", "PD16", "PD17";
418 function = "emac";
419 drive-strength = <40>;
420 };
421
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800422 i2c0_pins: i2c0-pins {
Andre Przywara7514ed32018-07-04 14:16:36 +0100423 pins = "PA11", "PA12";
424 function = "i2c0";
425 };
426
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800427 i2c1_pins: i2c1-pins {
Andre Przywara7514ed32018-07-04 14:16:36 +0100428 pins = "PA18", "PA19";
429 function = "i2c1";
430 };
431
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800432 i2c2_pins: i2c2-pins {
Andre Przywara7514ed32018-07-04 14:16:36 +0100433 pins = "PE12", "PE13";
434 function = "i2c2";
435 };
436
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800437 mmc0_pins: mmc0-pins {
Andre Przywara7514ed32018-07-04 14:16:36 +0100438 pins = "PF0", "PF1", "PF2", "PF3",
439 "PF4", "PF5";
440 function = "mmc0";
441 drive-strength = <30>;
442 bias-pull-up;
443 };
444
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800445 mmc1_pins: mmc1-pins {
Andre Przywara7514ed32018-07-04 14:16:36 +0100446 pins = "PG0", "PG1", "PG2", "PG3",
447 "PG4", "PG5";
448 function = "mmc1";
449 drive-strength = <30>;
450 bias-pull-up;
451 };
452
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800453 mmc2_8bit_pins: mmc2-8bit-pins {
Andre Przywara7514ed32018-07-04 14:16:36 +0100454 pins = "PC5", "PC6", "PC8",
455 "PC9", "PC10", "PC11",
456 "PC12", "PC13", "PC14",
457 "PC15", "PC16";
458 function = "mmc2";
459 drive-strength = <30>;
460 bias-pull-up;
461 };
462
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800463 spdif_tx_pin: spdif-tx-pin {
Andre Przywara7514ed32018-07-04 14:16:36 +0100464 pins = "PA17";
465 function = "spdif";
466 };
467
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800468 spi0_pins: spi0-pins {
Andre Przywara7514ed32018-07-04 14:16:36 +0100469 pins = "PC0", "PC1", "PC2", "PC3";
470 function = "spi0";
471 };
472
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800473 spi1_pins: spi1-pins {
Andre Przywara7514ed32018-07-04 14:16:36 +0100474 pins = "PA15", "PA16", "PA14", "PA13";
475 function = "spi1";
476 };
477
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800478 uart0_pa_pins: uart0-pa-pins {
Andre Przywara7514ed32018-07-04 14:16:36 +0100479 pins = "PA4", "PA5";
480 function = "uart0";
481 };
482
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800483 uart1_pins: uart1-pins {
Andre Przywara7514ed32018-07-04 14:16:36 +0100484 pins = "PG6", "PG7";
485 function = "uart1";
486 };
487
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800488 uart1_rts_cts_pins: uart1-rts-cts-pins {
Andre Przywara7514ed32018-07-04 14:16:36 +0100489 pins = "PG8", "PG9";
490 function = "uart1";
491 };
492
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800493 uart2_pins: uart2-pins {
Andre Przywara7514ed32018-07-04 14:16:36 +0100494 pins = "PA0", "PA1";
495 function = "uart2";
496 };
497
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800498 uart2_rts_cts_pins: uart2-rts-cts-pins {
499 pins = "PA2", "PA3";
500 function = "uart2";
501 };
502
503 uart3_pins: uart3-pins {
Andre Przywara7514ed32018-07-04 14:16:36 +0100504 pins = "PA13", "PA14";
505 function = "uart3";
506 };
507
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800508 uart3_rts_cts_pins: uart3-rts-cts-pins {
Andre Przywara7514ed32018-07-04 14:16:36 +0100509 pins = "PA15", "PA16";
510 function = "uart3";
511 };
512 };
513
514 timer@1c20c00 {
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800515 compatible = "allwinner,sun8i-a23-timer";
Andre Przywara7514ed32018-07-04 14:16:36 +0100516 reg = <0x01c20c00 0xa0>;
517 interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>,
518 <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
519 clocks = <&osc24M>;
520 };
521
522 emac: ethernet@1c30000 {
523 compatible = "allwinner,sun8i-h3-emac";
524 syscon = <&syscon>;
525 reg = <0x01c30000 0x10000>;
526 interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
527 interrupt-names = "macirq";
528 resets = <&ccu RST_BUS_EMAC>;
529 reset-names = "stmmaceth";
530 clocks = <&ccu CLK_BUS_EMAC>;
531 clock-names = "stmmaceth";
Andre Przywara7514ed32018-07-04 14:16:36 +0100532 status = "disabled";
533
534 mdio: mdio {
535 #address-cells = <1>;
536 #size-cells = <0>;
537 compatible = "snps,dwmac-mdio";
538 };
539
540 mdio-mux {
541 compatible = "allwinner,sun8i-h3-mdio-mux";
542 #address-cells = <1>;
543 #size-cells = <0>;
544
545 mdio-parent-bus = <&mdio>;
546 /* Only one MDIO is usable at the time */
547 internal_mdio: mdio@1 {
548 compatible = "allwinner,sun8i-h3-mdio-internal";
549 reg = <1>;
550 #address-cells = <1>;
551 #size-cells = <0>;
552
553 int_mii_phy: ethernet-phy@1 {
554 compatible = "ethernet-phy-ieee802.3-c22";
555 reg = <1>;
556 clocks = <&ccu CLK_BUS_EPHY>;
557 resets = <&ccu RST_BUS_EPHY>;
558 };
559 };
560
561 external_mdio: mdio@2 {
562 reg = <2>;
563 #address-cells = <1>;
564 #size-cells = <0>;
565 };
566 };
567 };
568
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800569 mbus: dram-controller@1c62000 {
Samuel Holland2c597852022-04-27 15:31:27 -0500570 /* compatible is in per SoC .dtsi file */
571 reg = <0x01c62000 0x1000>,
572 <0x01c63000 0x1000>;
573 reg-names = "mbus", "dram";
574 clocks = <&ccu CLK_MBUS>,
575 <&ccu CLK_DRAM>,
576 <&ccu CLK_BUS_DRAM>;
577 clock-names = "mbus", "dram", "bus";
Andre Przywara58f68612021-05-25 01:20:25 +0100578 #address-cells = <1>;
579 #size-cells = <1>;
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800580 dma-ranges = <0x00000000 0x40000000 0xc0000000>;
581 #interconnect-cells = <1>;
582 };
583
Andre Przywara7514ed32018-07-04 14:16:36 +0100584 spi0: spi@1c68000 {
585 compatible = "allwinner,sun8i-h3-spi";
586 reg = <0x01c68000 0x1000>;
587 interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>;
588 clocks = <&ccu CLK_BUS_SPI0>, <&ccu CLK_SPI0>;
589 clock-names = "ahb", "mod";
590 dmas = <&dma 23>, <&dma 23>;
591 dma-names = "rx", "tx";
592 pinctrl-names = "default";
593 pinctrl-0 = <&spi0_pins>;
594 resets = <&ccu RST_BUS_SPI0>;
595 status = "disabled";
596 #address-cells = <1>;
597 #size-cells = <0>;
598 };
599
600 spi1: spi@1c69000 {
601 compatible = "allwinner,sun8i-h3-spi";
602 reg = <0x01c69000 0x1000>;
603 interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>;
604 clocks = <&ccu CLK_BUS_SPI1>, <&ccu CLK_SPI1>;
605 clock-names = "ahb", "mod";
606 dmas = <&dma 24>, <&dma 24>;
607 dma-names = "rx", "tx";
608 pinctrl-names = "default";
609 pinctrl-0 = <&spi1_pins>;
610 resets = <&ccu RST_BUS_SPI1>;
611 status = "disabled";
612 #address-cells = <1>;
613 #size-cells = <0>;
614 };
615
616 wdt0: watchdog@1c20ca0 {
617 compatible = "allwinner,sun6i-a31-wdt";
618 reg = <0x01c20ca0 0x20>;
619 interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800620 clocks = <&osc24M>;
Andre Przywara7514ed32018-07-04 14:16:36 +0100621 };
622
623 spdif: spdif@1c21000 {
624 #sound-dai-cells = <0>;
625 compatible = "allwinner,sun8i-h3-spdif";
626 reg = <0x01c21000 0x400>;
627 interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>;
628 clocks = <&ccu CLK_BUS_SPDIF>, <&ccu CLK_SPDIF>;
629 resets = <&ccu RST_BUS_SPDIF>;
630 clock-names = "apb", "spdif";
631 dmas = <&dma 2>;
632 dma-names = "tx";
633 status = "disabled";
634 };
635
636 pwm: pwm@1c21400 {
637 compatible = "allwinner,sun8i-h3-pwm";
638 reg = <0x01c21400 0x8>;
639 clocks = <&osc24M>;
640 #pwm-cells = <3>;
641 status = "disabled";
642 };
643
644 i2s0: i2s@1c22000 {
645 #sound-dai-cells = <0>;
646 compatible = "allwinner,sun8i-h3-i2s";
647 reg = <0x01c22000 0x400>;
648 interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>;
649 clocks = <&ccu CLK_BUS_I2S0>, <&ccu CLK_I2S0>;
650 clock-names = "apb", "mod";
651 dmas = <&dma 3>, <&dma 3>;
652 resets = <&ccu RST_BUS_I2S0>;
653 dma-names = "rx", "tx";
654 status = "disabled";
655 };
656
657 i2s1: i2s@1c22400 {
658 #sound-dai-cells = <0>;
659 compatible = "allwinner,sun8i-h3-i2s";
660 reg = <0x01c22400 0x400>;
661 interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
662 clocks = <&ccu CLK_BUS_I2S1>, <&ccu CLK_I2S1>;
663 clock-names = "apb", "mod";
664 dmas = <&dma 4>, <&dma 4>;
665 resets = <&ccu RST_BUS_I2S1>;
666 dma-names = "rx", "tx";
667 status = "disabled";
668 };
669
Andre Przywara58f68612021-05-25 01:20:25 +0100670 i2s2: i2s@1c22800 {
671 #sound-dai-cells = <0>;
672 compatible = "allwinner,sun8i-h3-i2s";
673 reg = <0x01c22800 0x400>;
674 interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
675 clocks = <&ccu CLK_BUS_I2S2>, <&ccu CLK_I2S2>;
676 clock-names = "apb", "mod";
677 dmas = <&dma 27>;
678 resets = <&ccu RST_BUS_I2S2>;
679 dma-names = "tx";
680 status = "disabled";
681 };
682
Andre Przywara7514ed32018-07-04 14:16:36 +0100683 codec: codec@1c22c00 {
684 #sound-dai-cells = <0>;
685 compatible = "allwinner,sun8i-h3-codec";
686 reg = <0x01c22c00 0x400>;
687 interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
688 clocks = <&ccu CLK_BUS_CODEC>, <&ccu CLK_AC_DIG>;
689 clock-names = "apb", "codec";
690 resets = <&ccu RST_BUS_CODEC>;
691 dmas = <&dma 15>, <&dma 15>;
692 dma-names = "rx", "tx";
693 allwinner,codec-analog-controls = <&codec_analog>;
694 status = "disabled";
695 };
696
697 uart0: serial@1c28000 {
698 compatible = "snps,dw-apb-uart";
699 reg = <0x01c28000 0x400>;
700 interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
701 reg-shift = <2>;
702 reg-io-width = <4>;
703 clocks = <&ccu CLK_BUS_UART0>;
704 resets = <&ccu RST_BUS_UART0>;
705 dmas = <&dma 6>, <&dma 6>;
706 dma-names = "rx", "tx";
707 status = "disabled";
708 };
709
710 uart1: serial@1c28400 {
711 compatible = "snps,dw-apb-uart";
712 reg = <0x01c28400 0x400>;
713 interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
714 reg-shift = <2>;
715 reg-io-width = <4>;
716 clocks = <&ccu CLK_BUS_UART1>;
717 resets = <&ccu RST_BUS_UART1>;
718 dmas = <&dma 7>, <&dma 7>;
719 dma-names = "rx", "tx";
720 status = "disabled";
721 };
722
723 uart2: serial@1c28800 {
724 compatible = "snps,dw-apb-uart";
725 reg = <0x01c28800 0x400>;
726 interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
727 reg-shift = <2>;
728 reg-io-width = <4>;
729 clocks = <&ccu CLK_BUS_UART2>;
730 resets = <&ccu RST_BUS_UART2>;
731 dmas = <&dma 8>, <&dma 8>;
732 dma-names = "rx", "tx";
733 status = "disabled";
734 };
735
736 uart3: serial@1c28c00 {
737 compatible = "snps,dw-apb-uart";
738 reg = <0x01c28c00 0x400>;
739 interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
740 reg-shift = <2>;
741 reg-io-width = <4>;
742 clocks = <&ccu CLK_BUS_UART3>;
743 resets = <&ccu RST_BUS_UART3>;
744 dmas = <&dma 9>, <&dma 9>;
745 dma-names = "rx", "tx";
746 status = "disabled";
747 };
748
749 i2c0: i2c@1c2ac00 {
750 compatible = "allwinner,sun6i-a31-i2c";
751 reg = <0x01c2ac00 0x400>;
752 interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
753 clocks = <&ccu CLK_BUS_I2C0>;
754 resets = <&ccu RST_BUS_I2C0>;
755 pinctrl-names = "default";
756 pinctrl-0 = <&i2c0_pins>;
757 status = "disabled";
758 #address-cells = <1>;
759 #size-cells = <0>;
760 };
761
762 i2c1: i2c@1c2b000 {
763 compatible = "allwinner,sun6i-a31-i2c";
764 reg = <0x01c2b000 0x400>;
765 interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
766 clocks = <&ccu CLK_BUS_I2C1>;
767 resets = <&ccu RST_BUS_I2C1>;
768 pinctrl-names = "default";
769 pinctrl-0 = <&i2c1_pins>;
770 status = "disabled";
771 #address-cells = <1>;
772 #size-cells = <0>;
773 };
774
775 i2c2: i2c@1c2b400 {
776 compatible = "allwinner,sun6i-a31-i2c";
777 reg = <0x01c2b400 0x400>;
778 interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
779 clocks = <&ccu CLK_BUS_I2C2>;
780 resets = <&ccu RST_BUS_I2C2>;
781 pinctrl-names = "default";
782 pinctrl-0 = <&i2c2_pins>;
783 status = "disabled";
784 #address-cells = <1>;
785 #size-cells = <0>;
786 };
787
788 gic: interrupt-controller@1c81000 {
789 compatible = "arm,gic-400";
790 reg = <0x01c81000 0x1000>,
791 <0x01c82000 0x2000>,
792 <0x01c84000 0x2000>,
793 <0x01c86000 0x2000>;
794 interrupt-controller;
795 #interrupt-cells = <3>;
796 interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
797 };
798
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800799 csi: camera@1cb0000 {
800 compatible = "allwinner,sun8i-h3-csi";
801 reg = <0x01cb0000 0x1000>;
802 interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
803 clocks = <&ccu CLK_BUS_CSI>,
804 <&ccu CLK_CSI_SCLK>,
805 <&ccu CLK_DRAM_CSI>;
806 clock-names = "bus", "mod", "ram";
807 resets = <&ccu RST_BUS_CSI>;
808 pinctrl-names = "default";
809 pinctrl-0 = <&csi_pins>;
810 status = "disabled";
811 };
812
Andre Przywara7514ed32018-07-04 14:16:36 +0100813 hdmi: hdmi@1ee0000 {
814 compatible = "allwinner,sun8i-h3-dw-hdmi",
815 "allwinner,sun8i-a83t-dw-hdmi";
816 reg = <0x01ee0000 0x10000>;
817 reg-io-width = <1>;
818 interrupts = <GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH>;
819 clocks = <&ccu CLK_BUS_HDMI>, <&ccu CLK_HDMI_DDC>,
Samuel Holland2c597852022-04-27 15:31:27 -0500820 <&ccu CLK_HDMI>, <&rtc 0>;
821 clock-names = "iahb", "isfr", "tmds", "cec";
Andre Przywara7514ed32018-07-04 14:16:36 +0100822 resets = <&ccu RST_BUS_HDMI1>;
823 reset-names = "ctrl";
824 phys = <&hdmi_phy>;
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800825 phy-names = "phy";
Andre Przywara7514ed32018-07-04 14:16:36 +0100826 status = "disabled";
827
828 ports {
829 #address-cells = <1>;
830 #size-cells = <0>;
831
832 hdmi_in: port@0 {
833 reg = <0>;
834
835 hdmi_in_tcon0: endpoint {
836 remote-endpoint = <&tcon0_out_hdmi>;
837 };
838 };
839
840 hdmi_out: port@1 {
841 reg = <1>;
842 };
843 };
844 };
845
846 hdmi_phy: hdmi-phy@1ef0000 {
847 compatible = "allwinner,sun8i-h3-hdmi-phy";
848 reg = <0x01ef0000 0x10000>;
849 clocks = <&ccu CLK_BUS_HDMI>, <&ccu CLK_HDMI_DDC>,
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800850 <&ccu CLK_PLL_VIDEO>;
Andre Przywara7514ed32018-07-04 14:16:36 +0100851 clock-names = "bus", "mod", "pll-0";
852 resets = <&ccu RST_BUS_HDMI0>;
853 reset-names = "phy";
854 #phy-cells = <0>;
855 };
856
857 rtc: rtc@1f00000 {
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800858 /* compatible is in per SoC .dtsi file */
859 reg = <0x01f00000 0x400>;
Andre Przywara7514ed32018-07-04 14:16:36 +0100860 interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
861 <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800862 clock-output-names = "osc32k", "osc32k-out", "iosc";
863 clocks = <&osc32k>;
864 #clock-cells = <1>;
Andre Przywara7514ed32018-07-04 14:16:36 +0100865 };
866
Samuel Holland2c597852022-04-27 15:31:27 -0500867 r_intc: interrupt-controller@1f00c00 {
868 compatible = "allwinner,sun8i-h3-r-intc",
869 "allwinner,sun6i-a31-r-intc";
870 interrupt-controller;
871 #interrupt-cells = <3>;
872 reg = <0x01f00c00 0x400>;
873 interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
874 };
875
Andre Przywara7514ed32018-07-04 14:16:36 +0100876 r_ccu: clock@1f01400 {
877 compatible = "allwinner,sun8i-h3-r-ccu";
878 reg = <0x01f01400 0x100>;
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800879 clocks = <&osc24M>, <&rtc 0>, <&rtc 2>,
880 <&ccu CLK_PLL_PERIPH0>;
Andre Przywara7514ed32018-07-04 14:16:36 +0100881 clock-names = "hosc", "losc", "iosc", "pll-periph";
882 #clock-cells = <1>;
883 #reset-cells = <1>;
884 };
885
886 codec_analog: codec-analog@1f015c0 {
887 compatible = "allwinner,sun8i-h3-codec-analog";
888 reg = <0x01f015c0 0x4>;
889 };
890
891 ir: ir@1f02000 {
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800892 compatible = "allwinner,sun6i-a31-ir";
Andre Przywara7514ed32018-07-04 14:16:36 +0100893 clocks = <&r_ccu CLK_APB0_IR>, <&r_ccu CLK_IR>;
894 clock-names = "apb", "ir";
895 resets = <&r_ccu RST_APB0_IR>;
896 interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800897 reg = <0x01f02000 0x400>;
Andre Przywara7514ed32018-07-04 14:16:36 +0100898 status = "disabled";
899 };
900
901 r_i2c: i2c@1f02400 {
902 compatible = "allwinner,sun6i-a31-i2c";
903 reg = <0x01f02400 0x400>;
904 interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
905 pinctrl-names = "default";
906 pinctrl-0 = <&r_i2c_pins>;
907 clocks = <&r_ccu CLK_APB0_I2C>;
908 resets = <&r_ccu RST_APB0_I2C>;
909 status = "disabled";
910 #address-cells = <1>;
911 #size-cells = <0>;
912 };
913
Samuel Holland2c597852022-04-27 15:31:27 -0500914 r_uart: serial@1f02800 {
915 compatible = "snps,dw-apb-uart";
916 reg = <0x01f02800 0x400>;
917 interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
918 reg-shift = <2>;
919 reg-io-width = <4>;
920 clocks = <&r_ccu CLK_APB0_UART>;
921 resets = <&r_ccu RST_APB0_UART>;
922 pinctrl-names = "default";
923 pinctrl-0 = <&r_uart_pins>;
924 status = "disabled";
925 };
926
Andre Przywara7514ed32018-07-04 14:16:36 +0100927 r_pio: pinctrl@1f02c00 {
928 compatible = "allwinner,sun8i-h3-r-pinctrl";
929 reg = <0x01f02c00 0x400>;
930 interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800931 clocks = <&r_ccu CLK_APB0_PIO>, <&osc24M>, <&rtc 0>;
Andre Przywara7514ed32018-07-04 14:16:36 +0100932 clock-names = "apb", "hosc", "losc";
933 gpio-controller;
934 #gpio-cells = <3>;
935 interrupt-controller;
936 #interrupt-cells = <3>;
937
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800938 r_ir_rx_pin: r-ir-rx-pin {
Andre Przywara7514ed32018-07-04 14:16:36 +0100939 pins = "PL11";
940 function = "s_cir_rx";
941 };
942
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800943 r_i2c_pins: r-i2c-pins {
Andre Przywara7514ed32018-07-04 14:16:36 +0100944 pins = "PL0", "PL1";
945 function = "s_i2c";
946 };
Andre Przywara58f68612021-05-25 01:20:25 +0100947
948 r_pwm_pin: r-pwm-pin {
949 pins = "PL10";
950 function = "s_pwm";
951 };
Samuel Holland2c597852022-04-27 15:31:27 -0500952
953 r_uart_pins: r-uart-pins {
954 pins = "PL2", "PL3";
955 function = "s_uart";
956 };
Andre Przywara58f68612021-05-25 01:20:25 +0100957 };
958
959 r_pwm: pwm@1f03800 {
960 compatible = "allwinner,sun8i-h3-pwm";
961 reg = <0x01f03800 0x8>;
962 pinctrl-names = "default";
963 pinctrl-0 = <&r_pwm_pin>;
964 clocks = <&osc24M>;
965 #pwm-cells = <3>;
966 status = "disabled";
Andre Przywara7514ed32018-07-04 14:16:36 +0100967 };
968 };
969};