blob: 643914186092b8c0105a9a2af00c0b15e56204af [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
Andre Przywaraceda40a2022-09-13 00:52:52 +010043#include <dt-bindings/clock/sun6i-rtc.h>
Andre Przywara7514ed32018-07-04 14:16:36 +010044#include <dt-bindings/clock/sun8i-de2.h>
45#include <dt-bindings/clock/sun8i-h3-ccu.h>
46#include <dt-bindings/clock/sun8i-r-ccu.h>
47#include <dt-bindings/interrupt-controller/arm-gic.h>
48#include <dt-bindings/reset/sun8i-de2.h>
49#include <dt-bindings/reset/sun8i-h3-ccu.h>
50#include <dt-bindings/reset/sun8i-r-ccu.h>
51
52/ {
53 interrupt-parent = <&gic>;
54 #address-cells = <1>;
55 #size-cells = <1>;
56
57 chosen {
58 #address-cells = <1>;
59 #size-cells = <1>;
60 ranges;
61
62 framebuffer-hdmi {
63 compatible = "allwinner,simple-framebuffer",
64 "simple-framebuffer";
65 allwinner,pipeline = "mixer0-lcd0-hdmi";
66 clocks = <&display_clocks CLK_MIXER0>,
67 <&ccu CLK_TCON0>, <&ccu CLK_HDMI>;
68 status = "disabled";
69 };
70
71 framebuffer-tve {
72 compatible = "allwinner,simple-framebuffer",
73 "simple-framebuffer";
74 allwinner,pipeline = "mixer1-lcd1-tve";
75 clocks = <&display_clocks CLK_MIXER1>,
76 <&ccu CLK_TVE>;
77 status = "disabled";
78 };
79 };
80
81 clocks {
82 #address-cells = <1>;
83 #size-cells = <1>;
84 ranges;
85
86 osc24M: osc24M_clk {
87 #clock-cells = <0>;
88 compatible = "fixed-clock";
89 clock-frequency = <24000000>;
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +080090 clock-accuracy = <50000>;
Andre Przywara7514ed32018-07-04 14:16:36 +010091 clock-output-names = "osc24M";
92 };
93
94 osc32k: osc32k_clk {
95 #clock-cells = <0>;
96 compatible = "fixed-clock";
97 clock-frequency = <32768>;
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +080098 clock-accuracy = <50000>;
99 clock-output-names = "ext_osc32k";
Andre Przywara7514ed32018-07-04 14:16:36 +0100100 };
101 };
102
103 de: display-engine {
104 compatible = "allwinner,sun8i-h3-display-engine";
105 allwinner,pipelines = <&mixer0>;
106 status = "disabled";
107 };
108
109 soc {
110 compatible = "simple-bus";
111 #address-cells = <1>;
112 #size-cells = <1>;
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800113 dma-ranges;
Andre Przywara7514ed32018-07-04 14:16:36 +0100114 ranges;
115
116 display_clocks: clock@1000000 {
117 /* compatible is in per SoC .dtsi file */
Andre Przywara58f68612021-05-25 01:20:25 +0100118 reg = <0x01000000 0x10000>;
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800119 clocks = <&ccu CLK_BUS_DE>,
120 <&ccu CLK_DE>;
121 clock-names = "bus",
122 "mod";
Andre Przywara7514ed32018-07-04 14:16:36 +0100123 resets = <&ccu RST_BUS_DE>;
124 #clock-cells = <1>;
125 #reset-cells = <1>;
126 };
127
128 mixer0: mixer@1100000 {
129 compatible = "allwinner,sun8i-h3-de2-mixer-0";
130 reg = <0x01100000 0x100000>;
131 clocks = <&display_clocks CLK_BUS_MIXER0>,
132 <&display_clocks CLK_MIXER0>;
133 clock-names = "bus",
134 "mod";
135 resets = <&display_clocks RST_MIXER0>;
136
137 ports {
138 #address-cells = <1>;
139 #size-cells = <0>;
140
141 mixer0_out: port@1 {
142 reg = <1>;
143
144 mixer0_out_tcon0: endpoint {
145 remote-endpoint = <&tcon0_in_mixer0>;
146 };
147 };
148 };
149 };
150
Andre Przywara7514ed32018-07-04 14:16:36 +0100151 dma: dma-controller@1c02000 {
152 compatible = "allwinner,sun8i-h3-dma";
153 reg = <0x01c02000 0x1000>;
154 interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
155 clocks = <&ccu CLK_BUS_DMA>;
156 resets = <&ccu RST_BUS_DMA>;
157 #dma-cells = <1>;
158 };
159
160 tcon0: lcd-controller@1c0c000 {
161 compatible = "allwinner,sun8i-h3-tcon-tv",
162 "allwinner,sun8i-a83t-tcon-tv";
163 reg = <0x01c0c000 0x1000>;
164 interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
165 clocks = <&ccu CLK_BUS_TCON0>, <&ccu CLK_TCON0>;
166 clock-names = "ahb", "tcon-ch1";
167 resets = <&ccu RST_BUS_TCON0>;
168 reset-names = "lcd";
169
170 ports {
171 #address-cells = <1>;
172 #size-cells = <0>;
173
174 tcon0_in: port@0 {
175 reg = <0>;
176
177 tcon0_in_mixer0: endpoint {
178 remote-endpoint = <&mixer0_out_tcon0>;
179 };
180 };
181
182 tcon0_out: port@1 {
183 #address-cells = <1>;
184 #size-cells = <0>;
185 reg = <1>;
186
187 tcon0_out_hdmi: endpoint@1 {
188 reg = <1>;
189 remote-endpoint = <&hdmi_in_tcon0>;
190 };
191 };
192 };
193 };
194
195 mmc0: mmc@1c0f000 {
196 /* compatible and clocks are in per SoC .dtsi file */
197 reg = <0x01c0f000 0x1000>;
198 pinctrl-names = "default";
199 pinctrl-0 = <&mmc0_pins>;
200 resets = <&ccu RST_BUS_MMC0>;
201 reset-names = "ahb";
202 interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
203 status = "disabled";
204 #address-cells = <1>;
205 #size-cells = <0>;
206 };
207
208 mmc1: mmc@1c10000 {
209 /* compatible and clocks are in per SoC .dtsi file */
210 reg = <0x01c10000 0x1000>;
211 pinctrl-names = "default";
212 pinctrl-0 = <&mmc1_pins>;
213 resets = <&ccu RST_BUS_MMC1>;
214 reset-names = "ahb";
215 interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
216 status = "disabled";
217 #address-cells = <1>;
218 #size-cells = <0>;
219 };
220
221 mmc2: mmc@1c11000 {
222 /* compatible and clocks are in per SoC .dtsi file */
223 reg = <0x01c11000 0x1000>;
224 resets = <&ccu RST_BUS_MMC2>;
225 reset-names = "ahb";
226 interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
227 status = "disabled";
228 #address-cells = <1>;
229 #size-cells = <0>;
230 };
231
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800232 sid: eeprom@1c14000 {
233 /* compatible is in per SoC .dtsi file */
234 reg = <0x1c14000 0x400>;
235 #address-cells = <1>;
236 #size-cells = <1>;
237
238 ths_calibration: thermal-sensor-calibration@34 {
239 reg = <0x34 4>;
240 };
241 };
242
Andre Przywara58f68612021-05-25 01:20:25 +0100243 msgbox: mailbox@1c17000 {
244 compatible = "allwinner,sun8i-h3-msgbox",
245 "allwinner,sun6i-a31-msgbox";
246 reg = <0x01c17000 0x1000>;
247 clocks = <&ccu CLK_BUS_MSGBOX>;
248 resets = <&ccu RST_BUS_MSGBOX>;
249 interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>;
250 #mbox-cells = <1>;
251 };
252
Andre Przywara7514ed32018-07-04 14:16:36 +0100253 usb_otg: usb@1c19000 {
254 compatible = "allwinner,sun8i-h3-musb";
255 reg = <0x01c19000 0x400>;
256 clocks = <&ccu CLK_BUS_OTG>;
257 resets = <&ccu RST_BUS_OTG>;
258 interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
259 interrupt-names = "mc";
260 phys = <&usbphy 0>;
261 phy-names = "usb";
262 extcon = <&usbphy 0>;
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800263 dr_mode = "otg";
Andre Przywara7514ed32018-07-04 14:16:36 +0100264 status = "disabled";
265 };
266
267 usbphy: phy@1c19400 {
268 compatible = "allwinner,sun8i-h3-usb-phy";
269 reg = <0x01c19400 0x2c>,
270 <0x01c1a800 0x4>,
271 <0x01c1b800 0x4>,
272 <0x01c1c800 0x4>,
273 <0x01c1d800 0x4>;
274 reg-names = "phy_ctrl",
275 "pmu0",
276 "pmu1",
277 "pmu2",
278 "pmu3";
279 clocks = <&ccu CLK_USB_PHY0>,
280 <&ccu CLK_USB_PHY1>,
281 <&ccu CLK_USB_PHY2>,
282 <&ccu CLK_USB_PHY3>;
283 clock-names = "usb0_phy",
284 "usb1_phy",
285 "usb2_phy",
286 "usb3_phy";
287 resets = <&ccu RST_USB_PHY0>,
288 <&ccu RST_USB_PHY1>,
289 <&ccu RST_USB_PHY2>,
290 <&ccu RST_USB_PHY3>;
291 reset-names = "usb0_reset",
292 "usb1_reset",
293 "usb2_reset",
294 "usb3_reset";
295 status = "disabled";
296 #phy-cells = <1>;
297 };
298
299 ehci0: usb@1c1a000 {
300 compatible = "allwinner,sun8i-h3-ehci", "generic-ehci";
301 reg = <0x01c1a000 0x100>;
302 interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
303 clocks = <&ccu CLK_BUS_EHCI0>, <&ccu CLK_BUS_OHCI0>;
304 resets = <&ccu RST_BUS_EHCI0>, <&ccu RST_BUS_OHCI0>;
305 status = "disabled";
306 };
307
308 ohci0: usb@1c1a400 {
309 compatible = "allwinner,sun8i-h3-ohci", "generic-ohci";
310 reg = <0x01c1a400 0x100>;
311 interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
312 clocks = <&ccu CLK_BUS_EHCI0>, <&ccu CLK_BUS_OHCI0>,
313 <&ccu CLK_USB_OHCI0>;
314 resets = <&ccu RST_BUS_EHCI0>, <&ccu RST_BUS_OHCI0>;
315 status = "disabled";
316 };
317
318 ehci1: usb@1c1b000 {
319 compatible = "allwinner,sun8i-h3-ehci", "generic-ehci";
320 reg = <0x01c1b000 0x100>;
321 interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
322 clocks = <&ccu CLK_BUS_EHCI1>, <&ccu CLK_BUS_OHCI1>;
323 resets = <&ccu RST_BUS_EHCI1>, <&ccu RST_BUS_OHCI1>;
324 phys = <&usbphy 1>;
325 phy-names = "usb";
326 status = "disabled";
327 };
328
329 ohci1: usb@1c1b400 {
330 compatible = "allwinner,sun8i-h3-ohci", "generic-ohci";
331 reg = <0x01c1b400 0x100>;
332 interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
333 clocks = <&ccu CLK_BUS_EHCI1>, <&ccu CLK_BUS_OHCI1>,
334 <&ccu CLK_USB_OHCI1>;
335 resets = <&ccu RST_BUS_EHCI1>, <&ccu RST_BUS_OHCI1>;
336 phys = <&usbphy 1>;
337 phy-names = "usb";
338 status = "disabled";
339 };
340
341 ehci2: usb@1c1c000 {
342 compatible = "allwinner,sun8i-h3-ehci", "generic-ehci";
343 reg = <0x01c1c000 0x100>;
344 interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
345 clocks = <&ccu CLK_BUS_EHCI2>, <&ccu CLK_BUS_OHCI2>;
346 resets = <&ccu RST_BUS_EHCI2>, <&ccu RST_BUS_OHCI2>;
347 phys = <&usbphy 2>;
348 phy-names = "usb";
349 status = "disabled";
350 };
351
352 ohci2: usb@1c1c400 {
353 compatible = "allwinner,sun8i-h3-ohci", "generic-ohci";
354 reg = <0x01c1c400 0x100>;
355 interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
356 clocks = <&ccu CLK_BUS_EHCI2>, <&ccu CLK_BUS_OHCI2>,
357 <&ccu CLK_USB_OHCI2>;
358 resets = <&ccu RST_BUS_EHCI2>, <&ccu RST_BUS_OHCI2>;
359 phys = <&usbphy 2>;
360 phy-names = "usb";
361 status = "disabled";
362 };
363
364 ehci3: usb@1c1d000 {
365 compatible = "allwinner,sun8i-h3-ehci", "generic-ehci";
366 reg = <0x01c1d000 0x100>;
367 interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
368 clocks = <&ccu CLK_BUS_EHCI3>, <&ccu CLK_BUS_OHCI3>;
369 resets = <&ccu RST_BUS_EHCI3>, <&ccu RST_BUS_OHCI3>;
370 phys = <&usbphy 3>;
371 phy-names = "usb";
372 status = "disabled";
373 };
374
375 ohci3: usb@1c1d400 {
376 compatible = "allwinner,sun8i-h3-ohci", "generic-ohci";
377 reg = <0x01c1d400 0x100>;
378 interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
379 clocks = <&ccu CLK_BUS_EHCI3>, <&ccu CLK_BUS_OHCI3>,
380 <&ccu CLK_USB_OHCI3>;
381 resets = <&ccu RST_BUS_EHCI3>, <&ccu RST_BUS_OHCI3>;
382 phys = <&usbphy 3>;
383 phy-names = "usb";
384 status = "disabled";
385 };
386
387 ccu: clock@1c20000 {
388 /* compatible is in per SoC .dtsi file */
389 reg = <0x01c20000 0x400>;
Andre Przywaraceda40a2022-09-13 00:52:52 +0100390 clocks = <&osc24M>, <&rtc CLK_OSC32K>;
Andre Przywara7514ed32018-07-04 14:16:36 +0100391 clock-names = "hosc", "losc";
392 #clock-cells = <1>;
393 #reset-cells = <1>;
394 };
395
396 pio: pinctrl@1c20800 {
397 /* compatible is in per SoC .dtsi file */
398 reg = <0x01c20800 0x400>;
399 interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>,
400 <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
Andre Przywaraceda40a2022-09-13 00:52:52 +0100401 clocks = <&ccu CLK_BUS_PIO>, <&osc24M>,
402 <&rtc CLK_OSC32K>;
Andre Przywara7514ed32018-07-04 14:16:36 +0100403 clock-names = "apb", "hosc", "losc";
404 gpio-controller;
405 #gpio-cells = <3>;
406 interrupt-controller;
407 #interrupt-cells = <3>;
408
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800409 csi_pins: csi-pins {
410 pins = "PE0", "PE2", "PE3", "PE4", "PE5",
411 "PE6", "PE7", "PE8", "PE9", "PE10",
412 "PE11";
413 function = "csi";
414 };
415
416 emac_rgmii_pins: emac-rgmii-pins {
Andre Przywara7514ed32018-07-04 14:16:36 +0100417 pins = "PD0", "PD1", "PD2", "PD3", "PD4",
418 "PD5", "PD7", "PD8", "PD9", "PD10",
419 "PD12", "PD13", "PD15", "PD16", "PD17";
420 function = "emac";
421 drive-strength = <40>;
422 };
423
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800424 i2c0_pins: i2c0-pins {
Andre Przywara7514ed32018-07-04 14:16:36 +0100425 pins = "PA11", "PA12";
426 function = "i2c0";
427 };
428
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800429 i2c1_pins: i2c1-pins {
Andre Przywara7514ed32018-07-04 14:16:36 +0100430 pins = "PA18", "PA19";
431 function = "i2c1";
432 };
433
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800434 i2c2_pins: i2c2-pins {
Andre Przywara7514ed32018-07-04 14:16:36 +0100435 pins = "PE12", "PE13";
436 function = "i2c2";
437 };
438
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800439 mmc0_pins: mmc0-pins {
Andre Przywara7514ed32018-07-04 14:16:36 +0100440 pins = "PF0", "PF1", "PF2", "PF3",
441 "PF4", "PF5";
442 function = "mmc0";
443 drive-strength = <30>;
444 bias-pull-up;
445 };
446
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800447 mmc1_pins: mmc1-pins {
Andre Przywara7514ed32018-07-04 14:16:36 +0100448 pins = "PG0", "PG1", "PG2", "PG3",
449 "PG4", "PG5";
450 function = "mmc1";
451 drive-strength = <30>;
452 bias-pull-up;
453 };
454
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800455 mmc2_8bit_pins: mmc2-8bit-pins {
Andre Przywara7514ed32018-07-04 14:16:36 +0100456 pins = "PC5", "PC6", "PC8",
457 "PC9", "PC10", "PC11",
458 "PC12", "PC13", "PC14",
459 "PC15", "PC16";
460 function = "mmc2";
461 drive-strength = <30>;
462 bias-pull-up;
463 };
464
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800465 spdif_tx_pin: spdif-tx-pin {
Andre Przywara7514ed32018-07-04 14:16:36 +0100466 pins = "PA17";
467 function = "spdif";
468 };
469
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800470 spi0_pins: spi0-pins {
Andre Przywara7514ed32018-07-04 14:16:36 +0100471 pins = "PC0", "PC1", "PC2", "PC3";
472 function = "spi0";
473 };
474
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800475 spi1_pins: spi1-pins {
Andre Przywara7514ed32018-07-04 14:16:36 +0100476 pins = "PA15", "PA16", "PA14", "PA13";
477 function = "spi1";
478 };
479
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800480 uart0_pa_pins: uart0-pa-pins {
Andre Przywara7514ed32018-07-04 14:16:36 +0100481 pins = "PA4", "PA5";
482 function = "uart0";
483 };
484
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800485 uart1_pins: uart1-pins {
Andre Przywara7514ed32018-07-04 14:16:36 +0100486 pins = "PG6", "PG7";
487 function = "uart1";
488 };
489
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800490 uart1_rts_cts_pins: uart1-rts-cts-pins {
Andre Przywara7514ed32018-07-04 14:16:36 +0100491 pins = "PG8", "PG9";
492 function = "uart1";
493 };
494
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800495 uart2_pins: uart2-pins {
Andre Przywara7514ed32018-07-04 14:16:36 +0100496 pins = "PA0", "PA1";
497 function = "uart2";
498 };
499
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800500 uart2_rts_cts_pins: uart2-rts-cts-pins {
501 pins = "PA2", "PA3";
502 function = "uart2";
503 };
504
505 uart3_pins: uart3-pins {
Andre Przywara7514ed32018-07-04 14:16:36 +0100506 pins = "PA13", "PA14";
507 function = "uart3";
508 };
509
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800510 uart3_rts_cts_pins: uart3-rts-cts-pins {
Andre Przywara7514ed32018-07-04 14:16:36 +0100511 pins = "PA15", "PA16";
512 function = "uart3";
513 };
514 };
515
516 timer@1c20c00 {
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800517 compatible = "allwinner,sun8i-a23-timer";
Andre Przywara7514ed32018-07-04 14:16:36 +0100518 reg = <0x01c20c00 0xa0>;
519 interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>,
520 <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
521 clocks = <&osc24M>;
522 };
523
524 emac: ethernet@1c30000 {
525 compatible = "allwinner,sun8i-h3-emac";
526 syscon = <&syscon>;
527 reg = <0x01c30000 0x10000>;
528 interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
529 interrupt-names = "macirq";
530 resets = <&ccu RST_BUS_EMAC>;
531 reset-names = "stmmaceth";
532 clocks = <&ccu CLK_BUS_EMAC>;
533 clock-names = "stmmaceth";
Andre Przywara7514ed32018-07-04 14:16:36 +0100534 status = "disabled";
535
536 mdio: mdio {
537 #address-cells = <1>;
538 #size-cells = <0>;
539 compatible = "snps,dwmac-mdio";
540 };
541
542 mdio-mux {
543 compatible = "allwinner,sun8i-h3-mdio-mux";
544 #address-cells = <1>;
545 #size-cells = <0>;
546
547 mdio-parent-bus = <&mdio>;
548 /* Only one MDIO is usable at the time */
549 internal_mdio: mdio@1 {
550 compatible = "allwinner,sun8i-h3-mdio-internal";
551 reg = <1>;
552 #address-cells = <1>;
553 #size-cells = <0>;
554
555 int_mii_phy: ethernet-phy@1 {
556 compatible = "ethernet-phy-ieee802.3-c22";
557 reg = <1>;
558 clocks = <&ccu CLK_BUS_EPHY>;
559 resets = <&ccu RST_BUS_EPHY>;
560 };
561 };
562
563 external_mdio: mdio@2 {
564 reg = <2>;
565 #address-cells = <1>;
566 #size-cells = <0>;
567 };
568 };
569 };
570
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800571 mbus: dram-controller@1c62000 {
Samuel Holland2c597852022-04-27 15:31:27 -0500572 /* compatible is in per SoC .dtsi file */
573 reg = <0x01c62000 0x1000>,
574 <0x01c63000 0x1000>;
575 reg-names = "mbus", "dram";
576 clocks = <&ccu CLK_MBUS>,
577 <&ccu CLK_DRAM>,
578 <&ccu CLK_BUS_DRAM>;
579 clock-names = "mbus", "dram", "bus";
Andre Przywara58f68612021-05-25 01:20:25 +0100580 #address-cells = <1>;
581 #size-cells = <1>;
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800582 dma-ranges = <0x00000000 0x40000000 0xc0000000>;
583 #interconnect-cells = <1>;
584 };
585
Andre Przywara7514ed32018-07-04 14:16:36 +0100586 spi0: spi@1c68000 {
587 compatible = "allwinner,sun8i-h3-spi";
588 reg = <0x01c68000 0x1000>;
589 interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>;
590 clocks = <&ccu CLK_BUS_SPI0>, <&ccu CLK_SPI0>;
591 clock-names = "ahb", "mod";
592 dmas = <&dma 23>, <&dma 23>;
593 dma-names = "rx", "tx";
594 pinctrl-names = "default";
595 pinctrl-0 = <&spi0_pins>;
596 resets = <&ccu RST_BUS_SPI0>;
597 status = "disabled";
598 #address-cells = <1>;
599 #size-cells = <0>;
600 };
601
602 spi1: spi@1c69000 {
603 compatible = "allwinner,sun8i-h3-spi";
604 reg = <0x01c69000 0x1000>;
605 interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>;
606 clocks = <&ccu CLK_BUS_SPI1>, <&ccu CLK_SPI1>;
607 clock-names = "ahb", "mod";
608 dmas = <&dma 24>, <&dma 24>;
609 dma-names = "rx", "tx";
610 pinctrl-names = "default";
611 pinctrl-0 = <&spi1_pins>;
612 resets = <&ccu RST_BUS_SPI1>;
613 status = "disabled";
614 #address-cells = <1>;
615 #size-cells = <0>;
616 };
617
618 wdt0: watchdog@1c20ca0 {
619 compatible = "allwinner,sun6i-a31-wdt";
620 reg = <0x01c20ca0 0x20>;
621 interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800622 clocks = <&osc24M>;
Andre Przywara7514ed32018-07-04 14:16:36 +0100623 };
624
625 spdif: spdif@1c21000 {
626 #sound-dai-cells = <0>;
627 compatible = "allwinner,sun8i-h3-spdif";
628 reg = <0x01c21000 0x400>;
629 interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>;
630 clocks = <&ccu CLK_BUS_SPDIF>, <&ccu CLK_SPDIF>;
631 resets = <&ccu RST_BUS_SPDIF>;
632 clock-names = "apb", "spdif";
633 dmas = <&dma 2>;
634 dma-names = "tx";
635 status = "disabled";
636 };
637
638 pwm: pwm@1c21400 {
639 compatible = "allwinner,sun8i-h3-pwm";
640 reg = <0x01c21400 0x8>;
641 clocks = <&osc24M>;
642 #pwm-cells = <3>;
643 status = "disabled";
644 };
645
646 i2s0: i2s@1c22000 {
647 #sound-dai-cells = <0>;
648 compatible = "allwinner,sun8i-h3-i2s";
649 reg = <0x01c22000 0x400>;
650 interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>;
651 clocks = <&ccu CLK_BUS_I2S0>, <&ccu CLK_I2S0>;
652 clock-names = "apb", "mod";
653 dmas = <&dma 3>, <&dma 3>;
654 resets = <&ccu RST_BUS_I2S0>;
655 dma-names = "rx", "tx";
656 status = "disabled";
657 };
658
659 i2s1: i2s@1c22400 {
660 #sound-dai-cells = <0>;
661 compatible = "allwinner,sun8i-h3-i2s";
662 reg = <0x01c22400 0x400>;
663 interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
664 clocks = <&ccu CLK_BUS_I2S1>, <&ccu CLK_I2S1>;
665 clock-names = "apb", "mod";
666 dmas = <&dma 4>, <&dma 4>;
667 resets = <&ccu RST_BUS_I2S1>;
668 dma-names = "rx", "tx";
669 status = "disabled";
670 };
671
Andre Przywara58f68612021-05-25 01:20:25 +0100672 i2s2: i2s@1c22800 {
673 #sound-dai-cells = <0>;
674 compatible = "allwinner,sun8i-h3-i2s";
675 reg = <0x01c22800 0x400>;
676 interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
677 clocks = <&ccu CLK_BUS_I2S2>, <&ccu CLK_I2S2>;
678 clock-names = "apb", "mod";
679 dmas = <&dma 27>;
680 resets = <&ccu RST_BUS_I2S2>;
681 dma-names = "tx";
682 status = "disabled";
683 };
684
Andre Przywara7514ed32018-07-04 14:16:36 +0100685 codec: codec@1c22c00 {
686 #sound-dai-cells = <0>;
687 compatible = "allwinner,sun8i-h3-codec";
688 reg = <0x01c22c00 0x400>;
689 interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
690 clocks = <&ccu CLK_BUS_CODEC>, <&ccu CLK_AC_DIG>;
691 clock-names = "apb", "codec";
692 resets = <&ccu RST_BUS_CODEC>;
693 dmas = <&dma 15>, <&dma 15>;
694 dma-names = "rx", "tx";
695 allwinner,codec-analog-controls = <&codec_analog>;
696 status = "disabled";
697 };
698
699 uart0: serial@1c28000 {
700 compatible = "snps,dw-apb-uart";
701 reg = <0x01c28000 0x400>;
702 interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
703 reg-shift = <2>;
704 reg-io-width = <4>;
705 clocks = <&ccu CLK_BUS_UART0>;
706 resets = <&ccu RST_BUS_UART0>;
707 dmas = <&dma 6>, <&dma 6>;
708 dma-names = "rx", "tx";
709 status = "disabled";
710 };
711
712 uart1: serial@1c28400 {
713 compatible = "snps,dw-apb-uart";
714 reg = <0x01c28400 0x400>;
715 interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
716 reg-shift = <2>;
717 reg-io-width = <4>;
718 clocks = <&ccu CLK_BUS_UART1>;
719 resets = <&ccu RST_BUS_UART1>;
720 dmas = <&dma 7>, <&dma 7>;
721 dma-names = "rx", "tx";
722 status = "disabled";
723 };
724
725 uart2: serial@1c28800 {
726 compatible = "snps,dw-apb-uart";
727 reg = <0x01c28800 0x400>;
728 interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
729 reg-shift = <2>;
730 reg-io-width = <4>;
731 clocks = <&ccu CLK_BUS_UART2>;
732 resets = <&ccu RST_BUS_UART2>;
733 dmas = <&dma 8>, <&dma 8>;
734 dma-names = "rx", "tx";
735 status = "disabled";
736 };
737
738 uart3: serial@1c28c00 {
739 compatible = "snps,dw-apb-uart";
740 reg = <0x01c28c00 0x400>;
741 interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
742 reg-shift = <2>;
743 reg-io-width = <4>;
744 clocks = <&ccu CLK_BUS_UART3>;
745 resets = <&ccu RST_BUS_UART3>;
746 dmas = <&dma 9>, <&dma 9>;
747 dma-names = "rx", "tx";
748 status = "disabled";
749 };
750
751 i2c0: i2c@1c2ac00 {
752 compatible = "allwinner,sun6i-a31-i2c";
753 reg = <0x01c2ac00 0x400>;
754 interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
755 clocks = <&ccu CLK_BUS_I2C0>;
756 resets = <&ccu RST_BUS_I2C0>;
757 pinctrl-names = "default";
758 pinctrl-0 = <&i2c0_pins>;
759 status = "disabled";
760 #address-cells = <1>;
761 #size-cells = <0>;
762 };
763
764 i2c1: i2c@1c2b000 {
765 compatible = "allwinner,sun6i-a31-i2c";
766 reg = <0x01c2b000 0x400>;
767 interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
768 clocks = <&ccu CLK_BUS_I2C1>;
769 resets = <&ccu RST_BUS_I2C1>;
770 pinctrl-names = "default";
771 pinctrl-0 = <&i2c1_pins>;
772 status = "disabled";
773 #address-cells = <1>;
774 #size-cells = <0>;
775 };
776
777 i2c2: i2c@1c2b400 {
778 compatible = "allwinner,sun6i-a31-i2c";
779 reg = <0x01c2b400 0x400>;
780 interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
781 clocks = <&ccu CLK_BUS_I2C2>;
782 resets = <&ccu RST_BUS_I2C2>;
783 pinctrl-names = "default";
784 pinctrl-0 = <&i2c2_pins>;
785 status = "disabled";
786 #address-cells = <1>;
787 #size-cells = <0>;
788 };
789
790 gic: interrupt-controller@1c81000 {
791 compatible = "arm,gic-400";
792 reg = <0x01c81000 0x1000>,
793 <0x01c82000 0x2000>,
794 <0x01c84000 0x2000>,
795 <0x01c86000 0x2000>;
796 interrupt-controller;
797 #interrupt-cells = <3>;
798 interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
799 };
800
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800801 csi: camera@1cb0000 {
802 compatible = "allwinner,sun8i-h3-csi";
803 reg = <0x01cb0000 0x1000>;
804 interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
805 clocks = <&ccu CLK_BUS_CSI>,
806 <&ccu CLK_CSI_SCLK>,
807 <&ccu CLK_DRAM_CSI>;
808 clock-names = "bus", "mod", "ram";
809 resets = <&ccu RST_BUS_CSI>;
810 pinctrl-names = "default";
811 pinctrl-0 = <&csi_pins>;
812 status = "disabled";
813 };
814
Andre Przywara7514ed32018-07-04 14:16:36 +0100815 hdmi: hdmi@1ee0000 {
816 compatible = "allwinner,sun8i-h3-dw-hdmi",
817 "allwinner,sun8i-a83t-dw-hdmi";
818 reg = <0x01ee0000 0x10000>;
819 reg-io-width = <1>;
820 interrupts = <GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH>;
821 clocks = <&ccu CLK_BUS_HDMI>, <&ccu CLK_HDMI_DDC>,
Andre Przywaraceda40a2022-09-13 00:52:52 +0100822 <&ccu CLK_HDMI>, <&rtc CLK_OSC32K>;
Samuel Holland2c597852022-04-27 15:31:27 -0500823 clock-names = "iahb", "isfr", "tmds", "cec";
Andre Przywara7514ed32018-07-04 14:16:36 +0100824 resets = <&ccu RST_BUS_HDMI1>;
825 reset-names = "ctrl";
826 phys = <&hdmi_phy>;
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800827 phy-names = "phy";
Andre Przywara7514ed32018-07-04 14:16:36 +0100828 status = "disabled";
829
830 ports {
831 #address-cells = <1>;
832 #size-cells = <0>;
833
834 hdmi_in: port@0 {
835 reg = <0>;
836
837 hdmi_in_tcon0: endpoint {
838 remote-endpoint = <&tcon0_out_hdmi>;
839 };
840 };
841
842 hdmi_out: port@1 {
843 reg = <1>;
844 };
845 };
846 };
847
848 hdmi_phy: hdmi-phy@1ef0000 {
849 compatible = "allwinner,sun8i-h3-hdmi-phy";
850 reg = <0x01ef0000 0x10000>;
851 clocks = <&ccu CLK_BUS_HDMI>, <&ccu CLK_HDMI_DDC>,
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800852 <&ccu CLK_PLL_VIDEO>;
Andre Przywara7514ed32018-07-04 14:16:36 +0100853 clock-names = "bus", "mod", "pll-0";
854 resets = <&ccu RST_BUS_HDMI0>;
855 reset-names = "phy";
856 #phy-cells = <0>;
857 };
858
859 rtc: rtc@1f00000 {
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800860 /* compatible is in per SoC .dtsi file */
861 reg = <0x01f00000 0x400>;
Andre Przywara7514ed32018-07-04 14:16:36 +0100862 interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
863 <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800864 clock-output-names = "osc32k", "osc32k-out", "iosc";
865 clocks = <&osc32k>;
866 #clock-cells = <1>;
Andre Przywara7514ed32018-07-04 14:16:36 +0100867 };
868
Samuel Holland2c597852022-04-27 15:31:27 -0500869 r_intc: interrupt-controller@1f00c00 {
870 compatible = "allwinner,sun8i-h3-r-intc",
871 "allwinner,sun6i-a31-r-intc";
872 interrupt-controller;
873 #interrupt-cells = <3>;
874 reg = <0x01f00c00 0x400>;
875 interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
876 };
877
Andre Przywara7514ed32018-07-04 14:16:36 +0100878 r_ccu: clock@1f01400 {
879 compatible = "allwinner,sun8i-h3-r-ccu";
880 reg = <0x01f01400 0x100>;
Andre Przywaraceda40a2022-09-13 00:52:52 +0100881 clocks = <&osc24M>, <&rtc CLK_OSC32K>, <&rtc CLK_IOSC>,
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800882 <&ccu CLK_PLL_PERIPH0>;
Andre Przywara7514ed32018-07-04 14:16:36 +0100883 clock-names = "hosc", "losc", "iosc", "pll-periph";
884 #clock-cells = <1>;
885 #reset-cells = <1>;
886 };
887
888 codec_analog: codec-analog@1f015c0 {
889 compatible = "allwinner,sun8i-h3-codec-analog";
890 reg = <0x01f015c0 0x4>;
891 };
892
893 ir: ir@1f02000 {
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800894 compatible = "allwinner,sun6i-a31-ir";
Andre Przywara7514ed32018-07-04 14:16:36 +0100895 clocks = <&r_ccu CLK_APB0_IR>, <&r_ccu CLK_IR>;
896 clock-names = "apb", "ir";
897 resets = <&r_ccu RST_APB0_IR>;
898 interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800899 reg = <0x01f02000 0x400>;
Andre Przywara7514ed32018-07-04 14:16:36 +0100900 status = "disabled";
901 };
902
903 r_i2c: i2c@1f02400 {
904 compatible = "allwinner,sun6i-a31-i2c";
905 reg = <0x01f02400 0x400>;
906 interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
907 pinctrl-names = "default";
908 pinctrl-0 = <&r_i2c_pins>;
909 clocks = <&r_ccu CLK_APB0_I2C>;
910 resets = <&r_ccu RST_APB0_I2C>;
911 status = "disabled";
912 #address-cells = <1>;
913 #size-cells = <0>;
914 };
915
Samuel Holland2c597852022-04-27 15:31:27 -0500916 r_uart: serial@1f02800 {
917 compatible = "snps,dw-apb-uart";
918 reg = <0x01f02800 0x400>;
919 interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
920 reg-shift = <2>;
921 reg-io-width = <4>;
922 clocks = <&r_ccu CLK_APB0_UART>;
923 resets = <&r_ccu RST_APB0_UART>;
924 pinctrl-names = "default";
925 pinctrl-0 = <&r_uart_pins>;
926 status = "disabled";
927 };
928
Andre Przywara7514ed32018-07-04 14:16:36 +0100929 r_pio: pinctrl@1f02c00 {
930 compatible = "allwinner,sun8i-h3-r-pinctrl";
931 reg = <0x01f02c00 0x400>;
932 interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
Andre Przywaraceda40a2022-09-13 00:52:52 +0100933 clocks = <&r_ccu CLK_APB0_PIO>, <&osc24M>,
934 <&rtc CLK_OSC32K>;
Andre Przywara7514ed32018-07-04 14:16:36 +0100935 clock-names = "apb", "hosc", "losc";
936 gpio-controller;
937 #gpio-cells = <3>;
938 interrupt-controller;
939 #interrupt-cells = <3>;
940
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800941 r_ir_rx_pin: r-ir-rx-pin {
Andre Przywara7514ed32018-07-04 14:16:36 +0100942 pins = "PL11";
943 function = "s_cir_rx";
944 };
945
Chen-Yu Tsaib5fe5232020-01-12 23:36:13 +0800946 r_i2c_pins: r-i2c-pins {
Andre Przywara7514ed32018-07-04 14:16:36 +0100947 pins = "PL0", "PL1";
948 function = "s_i2c";
949 };
Andre Przywara58f68612021-05-25 01:20:25 +0100950
951 r_pwm_pin: r-pwm-pin {
952 pins = "PL10";
953 function = "s_pwm";
954 };
Samuel Holland2c597852022-04-27 15:31:27 -0500955
956 r_uart_pins: r-uart-pins {
957 pins = "PL2", "PL3";
958 function = "s_uart";
959 };
Andre Przywara58f68612021-05-25 01:20:25 +0100960 };
961
962 r_pwm: pwm@1f03800 {
963 compatible = "allwinner,sun8i-h3-pwm";
964 reg = <0x01f03800 0x8>;
965 pinctrl-names = "default";
966 pinctrl-0 = <&r_pwm_pin>;
967 clocks = <&osc24M>;
968 #pwm-cells = <3>;
969 status = "disabled";
Andre Przywara7514ed32018-07-04 14:16:36 +0100970 };
971 };
972};