blob: 7cd10e4a5e2eb087e12f32be073ea1a104068ecc [file] [log] [blame]
Clément Péron012af552019-12-09 19:20:22 +01001// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
Clément Péroncabbaed72019-12-14 14:26:42 +01002// Copyright (C) 2017 Icenowy Zheng <icenowy@aosc.io>
Icenowy Zhenge54be322018-03-16 22:02:14 +08003
4#include <dt-bindings/interrupt-controller/arm-gic.h>
Icenowy Zheng95beb932018-04-03 21:40:24 +08005#include <dt-bindings/clock/sun50i-h6-ccu.h>
Chen-Yu Tsaide2b5552018-07-13 00:04:51 +08006#include <dt-bindings/clock/sun50i-h6-r-ccu.h>
Jernej Skrabec209065c2018-11-04 19:27:04 +01007#include <dt-bindings/clock/sun8i-de2.h>
8#include <dt-bindings/clock/sun8i-tcon-top.h>
Icenowy Zheng95beb932018-04-03 21:40:24 +08009#include <dt-bindings/reset/sun50i-h6-ccu.h>
Chen-Yu Tsaide2b5552018-07-13 00:04:51 +080010#include <dt-bindings/reset/sun50i-h6-r-ccu.h>
Jernej Skrabec209065c2018-11-04 19:27:04 +010011#include <dt-bindings/reset/sun8i-de2.h>
Ondrej Jirmand7cfb662019-12-19 09:28:22 -080012#include <dt-bindings/thermal/thermal.h>
Icenowy Zhenge54be322018-03-16 22:02:14 +080013
14/ {
15 interrupt-parent = <&gic>;
16 #address-cells = <1>;
17 #size-cells = <1>;
18
19 cpus {
20 #address-cells = <1>;
21 #size-cells = <0>;
22
23 cpu0: cpu@0 {
Rob Herring31af04c2019-01-14 11:45:33 -060024 compatible = "arm,cortex-a53";
Icenowy Zhenge54be322018-03-16 22:02:14 +080025 device_type = "cpu";
26 reg = <0>;
27 enable-method = "psci";
Yangtao Li8a3a9532020-04-20 15:00:13 +020028 clocks = <&ccu CLK_CPUX>;
29 clock-latency-ns = <244144>; /* 8 32k periods */
Ondrej Jirman9f8a93b2020-04-20 15:00:14 +020030 #cooling-cells = <2>;
Icenowy Zhenge54be322018-03-16 22:02:14 +080031 };
32
33 cpu1: cpu@1 {
Rob Herring31af04c2019-01-14 11:45:33 -060034 compatible = "arm,cortex-a53";
Icenowy Zhenge54be322018-03-16 22:02:14 +080035 device_type = "cpu";
36 reg = <1>;
37 enable-method = "psci";
Yangtao Li8a3a9532020-04-20 15:00:13 +020038 clocks = <&ccu CLK_CPUX>;
39 clock-latency-ns = <244144>; /* 8 32k periods */
Ondrej Jirman9f8a93b2020-04-20 15:00:14 +020040 #cooling-cells = <2>;
Icenowy Zhenge54be322018-03-16 22:02:14 +080041 };
42
43 cpu2: cpu@2 {
Rob Herring31af04c2019-01-14 11:45:33 -060044 compatible = "arm,cortex-a53";
Icenowy Zhenge54be322018-03-16 22:02:14 +080045 device_type = "cpu";
46 reg = <2>;
47 enable-method = "psci";
Yangtao Li8a3a9532020-04-20 15:00:13 +020048 clocks = <&ccu CLK_CPUX>;
49 clock-latency-ns = <244144>; /* 8 32k periods */
Ondrej Jirman9f8a93b2020-04-20 15:00:14 +020050 #cooling-cells = <2>;
Icenowy Zhenge54be322018-03-16 22:02:14 +080051 };
52
53 cpu3: cpu@3 {
Rob Herring31af04c2019-01-14 11:45:33 -060054 compatible = "arm,cortex-a53";
Icenowy Zhenge54be322018-03-16 22:02:14 +080055 device_type = "cpu";
56 reg = <3>;
57 enable-method = "psci";
Yangtao Li8a3a9532020-04-20 15:00:13 +020058 clocks = <&ccu CLK_CPUX>;
59 clock-latency-ns = <244144>; /* 8 32k periods */
Ondrej Jirman9f8a93b2020-04-20 15:00:14 +020060 #cooling-cells = <2>;
Icenowy Zhenge54be322018-03-16 22:02:14 +080061 };
62 };
63
Jernej Skrabec209065c2018-11-04 19:27:04 +010064 de: display-engine {
65 compatible = "allwinner,sun50i-h6-display-engine";
66 allwinner,pipelines = <&mixer0>;
67 status = "disabled";
68 };
69
Icenowy Zhenge54be322018-03-16 22:02:14 +080070 osc24M: osc24M_clk {
71 #clock-cells = <0>;
72 compatible = "fixed-clock";
73 clock-frequency = <24000000>;
74 clock-output-names = "osc24M";
75 };
76
Andre Przywara7aa9b9e2019-11-21 01:18:33 +000077 pmu {
Maxime Ripard4c7eeb92020-02-10 10:56:00 +010078 compatible = "arm,cortex-a53-pmu";
Andre Przywara7aa9b9e2019-11-21 01:18:33 +000079 interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>,
80 <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>,
81 <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>,
82 <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>;
83 interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>;
84 };
85
Icenowy Zhenge54be322018-03-16 22:02:14 +080086 psci {
87 compatible = "arm,psci-0.2";
88 method = "smc";
89 };
90
91 timer {
92 compatible = "arm,armv8-timer";
93 interrupts = <GIC_PPI 13
94 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
95 <GIC_PPI 14
96 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
97 <GIC_PPI 11
98 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
99 <GIC_PPI 10
100 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
101 };
102
103 soc {
104 compatible = "simple-bus";
105 #address-cells = <1>;
106 #size-cells = <1>;
107 ranges;
108
Maxime Ripard275b6312019-04-16 10:57:46 +0200109 bus@1000000 {
Jernej Skrabec209065c2018-11-04 19:27:04 +0100110 compatible = "allwinner,sun50i-h6-de3",
111 "allwinner,sun50i-a64-de2";
112 reg = <0x1000000 0x400000>;
113 allwinner,sram = <&de2_sram 1>;
114 #address-cells = <1>;
115 #size-cells = <1>;
116 ranges = <0 0x1000000 0x400000>;
117
118 display_clocks: clock@0 {
119 compatible = "allwinner,sun50i-h6-de3-clk";
120 reg = <0x0 0x10000>;
121 clocks = <&ccu CLK_DE>,
122 <&ccu CLK_BUS_DE>;
123 clock-names = "mod",
124 "bus";
125 resets = <&ccu RST_BUS_DE>;
126 #clock-cells = <1>;
127 #reset-cells = <1>;
128 };
129
130 mixer0: mixer@100000 {
131 compatible = "allwinner,sun50i-h6-de3-mixer-0";
132 reg = <0x100000 0x100000>;
133 clocks = <&display_clocks CLK_BUS_MIXER0>,
134 <&display_clocks CLK_MIXER0>;
135 clock-names = "bus",
136 "mod";
137 resets = <&display_clocks RST_MIXER0>;
138
139 ports {
140 #address-cells = <1>;
141 #size-cells = <0>;
142
143 mixer0_out: port@1 {
144 reg = <1>;
145
146 mixer0_out_tcon_top_mixer0: endpoint {
147 remote-endpoint = <&tcon_top_mixer0_in_mixer0>;
148 };
149 };
150 };
151 };
152 };
153
Jernej Skrabecb5425702019-01-28 21:55:04 +0100154 video-codec@1c0e000 {
155 compatible = "allwinner,sun50i-h6-video-engine";
156 reg = <0x01c0e000 0x2000>;
157 clocks = <&ccu CLK_BUS_VE>, <&ccu CLK_VE>,
158 <&ccu CLK_MBUS_VE>;
159 clock-names = "ahb", "mod", "ram";
160 resets = <&ccu RST_BUS_VE>;
161 interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
162 allwinner,sram = <&ve_sram 1>;
163 };
164
Clément Péron4acc24b2019-10-30 16:07:41 +0100165 gpu: gpu@1800000 {
166 compatible = "allwinner,sun50i-h6-mali",
167 "arm,mali-t720";
168 reg = <0x01800000 0x4000>;
169 interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>,
170 <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>,
171 <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
172 interrupt-names = "job", "mmu", "gpu";
173 clocks = <&ccu CLK_GPU>, <&ccu CLK_BUS_GPU>;
174 clock-names = "core", "bus";
175 resets = <&ccu RST_BUS_GPU>;
176 status = "disabled";
177 };
178
Corentin Labbe709b86f2019-10-23 22:05:10 +0200179 crypto: crypto@1904000 {
180 compatible = "allwinner,sun50i-h6-crypto";
181 reg = <0x01904000 0x1000>;
182 interrupts = <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>;
183 clocks = <&ccu CLK_BUS_CE>, <&ccu CLK_CE>, <&ccu CLK_MBUS_CE>;
184 clock-names = "bus", "mod", "ram";
185 resets = <&ccu RST_BUS_CE>;
186 };
187
Icenowy Zhengb2ad66f2018-09-02 09:26:18 +0200188 syscon: syscon@3000000 {
189 compatible = "allwinner,sun50i-h6-system-control",
190 "allwinner,sun50i-a64-system-control";
191 reg = <0x03000000 0x1000>;
192 #address-cells = <1>;
193 #size-cells = <1>;
194 ranges;
195
196 sram_c: sram@28000 {
197 compatible = "mmio-sram";
198 reg = <0x00028000 0x1e000>;
199 #address-cells = <1>;
200 #size-cells = <1>;
201 ranges = <0 0x00028000 0x1e000>;
202
203 de2_sram: sram-section@0 {
204 compatible = "allwinner,sun50i-h6-sram-c",
205 "allwinner,sun50i-a64-sram-c";
206 reg = <0x0000 0x1e000>;
207 };
208 };
Jernej Skrabec24dd8ae2019-01-28 21:55:03 +0100209
210 sram_c1: sram@1a00000 {
211 compatible = "mmio-sram";
212 reg = <0x01a00000 0x200000>;
213 #address-cells = <1>;
214 #size-cells = <1>;
215 ranges = <0 0x01a00000 0x200000>;
216
217 ve_sram: sram-section@0 {
218 compatible = "allwinner,sun50i-h6-sram-c1",
219 "allwinner,sun4i-a10-sram-c1";
220 reg = <0x000000 0x200000>;
221 };
222 };
Icenowy Zhengb2ad66f2018-09-02 09:26:18 +0200223 };
224
Icenowy Zhenge54be322018-03-16 22:02:14 +0800225 ccu: clock@3001000 {
226 compatible = "allwinner,sun50i-h6-ccu";
227 reg = <0x03001000 0x1000>;
Ondrej Jirman4cdc12a2019-08-20 17:19:34 +0200228 clocks = <&osc24M>, <&rtc 0>, <&rtc 2>;
Icenowy Zhenge54be322018-03-16 22:02:14 +0800229 clock-names = "hosc", "losc", "iosc";
230 #clock-cells = <1>;
231 #reset-cells = <1>;
232 };
233
Jernej Skrabec91646652019-06-11 23:40:55 +0200234 dma: dma-controller@3002000 {
235 compatible = "allwinner,sun50i-h6-dma";
236 reg = <0x03002000 0x1000>;
237 interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>;
238 clocks = <&ccu CLK_BUS_DMA>, <&ccu CLK_MBUS_DMA>;
239 clock-names = "bus", "mbus";
240 dma-channels = <16>;
241 dma-requests = <46>;
242 resets = <&ccu RST_BUS_DMA>;
243 #dma-cells = <1>;
244 };
245
Samuel Hollande7d52602020-02-22 22:08:53 -0600246 msgbox: mailbox@3003000 {
247 compatible = "allwinner,sun50i-h6-msgbox",
248 "allwinner,sun6i-a31-msgbox";
249 reg = <0x03003000 0x1000>;
250 clocks = <&ccu CLK_BUS_MSGBOX>;
251 resets = <&ccu RST_BUS_MSGBOX>;
252 interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
253 #mbox-cells = <1>;
254 };
255
Maxime Ripard042c8052019-07-22 16:08:17 +0200256 sid: efuse@3006000 {
Yangtao Lifcf041f2019-04-04 13:01:46 -0400257 compatible = "allwinner,sun50i-h6-sid";
258 reg = <0x03006000 0x400>;
Ondrej Jirmand7cfb662019-12-19 09:28:22 -0800259 #address-cells = <1>;
260 #size-cells = <1>;
261
262 ths_calibration: thermal-sensor-calibration@14 {
263 reg = <0x14 0x8>;
264 };
Yangtao Lifcf041f2019-04-04 13:01:46 -0400265 };
266
Clément Péronb6cebb12019-05-23 17:10:48 +0200267 watchdog: watchdog@30090a0 {
268 compatible = "allwinner,sun50i-h6-wdt",
269 "allwinner,sun6i-a31-wdt";
270 reg = <0x030090a0 0x20>;
271 interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
Maxime Ripard9e1975f2019-08-21 16:38:35 +0200272 clocks = <&osc24M>;
Clément Péronb6cebb12019-05-23 17:10:48 +0200273 /* Broken on some H6 boards */
274 status = "disabled";
275 };
276
Jernej Skrabec88432f52019-11-19 18:53:18 +0100277 pwm: pwm@300a000 {
278 compatible = "allwinner,sun50i-h6-pwm";
279 reg = <0x0300a000 0x400>;
280 clocks = <&osc24M>, <&ccu CLK_BUS_PWM>;
281 clock-names = "mod", "bus";
282 resets = <&ccu RST_BUS_PWM>;
283 #pwm-cells = <3>;
284 status = "disabled";
285 };
286
Icenowy Zhenge54be322018-03-16 22:02:14 +0800287 pio: pinctrl@300b000 {
288 compatible = "allwinner,sun50i-h6-pinctrl";
289 reg = <0x0300b000 0x400>;
290 interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>,
291 <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>,
292 <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>,
293 <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>;
Ondrej Jirman4cdc12a2019-08-20 17:19:34 +0200294 clocks = <&ccu CLK_APB1>, <&osc24M>, <&rtc 0>;
Icenowy Zhenge54be322018-03-16 22:02:14 +0800295 clock-names = "apb", "hosc", "losc";
296 gpio-controller;
297 #gpio-cells = <3>;
298 interrupt-controller;
299 #interrupt-cells = <3>;
300
Maxime Ripard54eac67b2019-03-25 14:52:51 +0100301 ext_rgmii_pins: rgmii-pins {
Icenowy Zhengc8ced552018-11-03 20:32:37 +0800302 pins = "PD0", "PD1", "PD2", "PD3", "PD4",
303 "PD5", "PD7", "PD8", "PD9", "PD10",
304 "PD11", "PD12", "PD13", "PD19", "PD20";
305 function = "emac";
306 drive-strength = <40>;
307 };
308
Jernej Skrabec209065c2018-11-04 19:27:04 +0100309 hdmi_pins: hdmi-pins {
310 pins = "PH8", "PH9", "PH10";
311 function = "hdmi";
312 };
313
Bhushan Shah89336e12019-08-16 14:13:09 +0530314 i2c0_pins: i2c0-pins {
315 pins = "PD25", "PD26";
316 function = "i2c0";
317 };
318
319 i2c1_pins: i2c1-pins {
320 pins = "PH5", "PH6";
321 function = "i2c1";
322 };
323
324 i2c2_pins: i2c2-pins {
325 pins = "PD23", "PD24";
326 function = "i2c2";
327 };
328
Icenowy Zheng8f54bd152018-07-19 12:28:09 +0800329 mmc0_pins: mmc0-pins {
330 pins = "PF0", "PF1", "PF2", "PF3",
331 "PF4", "PF5";
332 function = "mmc0";
333 drive-strength = <30>;
334 bias-pull-up;
335 };
336
Ondrej Jirman7cf875b2019-04-13 18:54:18 +0200337 /omit-if-no-ref/
338 mmc1_pins: mmc1-pins {
339 pins = "PG0", "PG1", "PG2", "PG3",
340 "PG4", "PG5";
341 function = "mmc1";
342 drive-strength = <30>;
343 bias-pull-up;
344 };
345
Icenowy Zheng8f54bd152018-07-19 12:28:09 +0800346 mmc2_pins: mmc2-pins {
347 pins = "PC1", "PC4", "PC5", "PC6",
348 "PC7", "PC8", "PC9", "PC10",
349 "PC11", "PC12", "PC13", "PC14";
350 function = "mmc2";
351 drive-strength = <30>;
352 bias-pull-up;
353 };
354
Andre Przywara30bd02b2020-01-16 23:11:46 +0000355 /omit-if-no-ref/
356 spi0_pins: spi0-pins {
357 pins = "PC0", "PC2", "PC3";
358 function = "spi0";
359 };
360
361 /* pin shared with MMC2-CMD (eMMC) */
362 /omit-if-no-ref/
363 spi0_cs_pin: spi0-cs-pin {
364 pins = "PC5";
365 function = "spi0";
366 };
367
368 /omit-if-no-ref/
369 spi1_pins: spi1-pins {
370 pins = "PH4", "PH5", "PH6";
371 function = "spi1";
372 };
373
374 /omit-if-no-ref/
375 spi1_cs_pin: spi1-cs-pin {
376 pins = "PH3";
377 function = "spi1";
378 };
379
Clément Péronf95b5982019-08-12 12:51:14 +0200380 spdif_tx_pin: spdif-tx-pin {
381 pins = "PH7";
382 function = "spdif";
383 };
384
Maxime Ripard54eac67b2019-03-25 14:52:51 +0100385 uart0_ph_pins: uart0-ph-pins {
Icenowy Zhenge54be322018-03-16 22:02:14 +0800386 pins = "PH0", "PH1";
387 function = "uart0";
388 };
Ondrej Jirmancd380e02019-10-07 22:31:51 +0200389
390 uart1_pins: uart1-pins {
391 pins = "PG6", "PG7";
392 function = "uart1";
393 };
394
395 uart1_rts_cts_pins: uart1-rts-cts-pins {
396 pins = "PG8", "PG9";
397 function = "uart1";
398 };
Icenowy Zhenge54be322018-03-16 22:02:14 +0800399 };
400
Chen-Yu Tsai52d9bcb2019-01-28 00:39:30 +0800401 gic: interrupt-controller@3021000 {
402 compatible = "arm,gic-400";
403 reg = <0x03021000 0x1000>,
404 <0x03022000 0x2000>,
405 <0x03024000 0x2000>,
406 <0x03026000 0x2000>;
407 interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
408 interrupt-controller;
409 #interrupt-cells = <3>;
410 };
411
Icenowy Zheng8f54bd152018-07-19 12:28:09 +0800412 mmc0: mmc@4020000 {
413 compatible = "allwinner,sun50i-h6-mmc",
414 "allwinner,sun50i-a64-mmc";
415 reg = <0x04020000 0x1000>;
416 clocks = <&ccu CLK_BUS_MMC0>, <&ccu CLK_MMC0>;
417 clock-names = "ahb", "mmc";
418 resets = <&ccu RST_BUS_MMC0>;
419 reset-names = "ahb";
420 interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
Clément Péron6ba2e452019-04-08 17:27:50 +0200421 pinctrl-names = "default";
422 pinctrl-0 = <&mmc0_pins>;
Icenowy Zheng8f54bd152018-07-19 12:28:09 +0800423 status = "disabled";
424 #address-cells = <1>;
425 #size-cells = <0>;
426 };
427
428 mmc1: mmc@4021000 {
429 compatible = "allwinner,sun50i-h6-mmc",
430 "allwinner,sun50i-a64-mmc";
431 reg = <0x04021000 0x1000>;
432 clocks = <&ccu CLK_BUS_MMC1>, <&ccu CLK_MMC1>;
433 clock-names = "ahb", "mmc";
434 resets = <&ccu RST_BUS_MMC1>;
435 reset-names = "ahb";
436 interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
Ondrej Jirman7cf875b2019-04-13 18:54:18 +0200437 pinctrl-names = "default";
438 pinctrl-0 = <&mmc1_pins>;
Icenowy Zheng8f54bd152018-07-19 12:28:09 +0800439 status = "disabled";
440 #address-cells = <1>;
441 #size-cells = <0>;
442 };
443
444 mmc2: mmc@4022000 {
445 compatible = "allwinner,sun50i-h6-emmc",
446 "allwinner,sun50i-a64-emmc";
447 reg = <0x04022000 0x1000>;
448 clocks = <&ccu CLK_BUS_MMC2>, <&ccu CLK_MMC2>;
449 clock-names = "ahb", "mmc";
450 resets = <&ccu RST_BUS_MMC2>;
451 reset-names = "ahb";
452 interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
Clément Péron6ba2e452019-04-08 17:27:50 +0200453 pinctrl-names = "default";
454 pinctrl-0 = <&mmc2_pins>;
Icenowy Zheng8f54bd152018-07-19 12:28:09 +0800455 status = "disabled";
456 #address-cells = <1>;
457 #size-cells = <0>;
458 };
459
Icenowy Zhenge54be322018-03-16 22:02:14 +0800460 uart0: serial@5000000 {
461 compatible = "snps,dw-apb-uart";
462 reg = <0x05000000 0x400>;
463 interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
464 reg-shift = <2>;
465 reg-io-width = <4>;
Icenowy Zheng95beb932018-04-03 21:40:24 +0800466 clocks = <&ccu CLK_BUS_UART0>;
467 resets = <&ccu RST_BUS_UART0>;
Icenowy Zhenge54be322018-03-16 22:02:14 +0800468 status = "disabled";
469 };
470
471 uart1: serial@5000400 {
472 compatible = "snps,dw-apb-uart";
473 reg = <0x05000400 0x400>;
474 interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
475 reg-shift = <2>;
476 reg-io-width = <4>;
Icenowy Zheng95beb932018-04-03 21:40:24 +0800477 clocks = <&ccu CLK_BUS_UART1>;
478 resets = <&ccu RST_BUS_UART1>;
Icenowy Zhenge54be322018-03-16 22:02:14 +0800479 status = "disabled";
480 };
481
482 uart2: serial@5000800 {
483 compatible = "snps,dw-apb-uart";
484 reg = <0x05000800 0x400>;
485 interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
486 reg-shift = <2>;
487 reg-io-width = <4>;
Icenowy Zheng95beb932018-04-03 21:40:24 +0800488 clocks = <&ccu CLK_BUS_UART2>;
489 resets = <&ccu RST_BUS_UART2>;
Icenowy Zhenge54be322018-03-16 22:02:14 +0800490 status = "disabled";
491 };
492
493 uart3: serial@5000c00 {
494 compatible = "snps,dw-apb-uart";
495 reg = <0x05000c00 0x400>;
496 interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
497 reg-shift = <2>;
498 reg-io-width = <4>;
Icenowy Zheng95beb932018-04-03 21:40:24 +0800499 clocks = <&ccu CLK_BUS_UART3>;
500 resets = <&ccu RST_BUS_UART3>;
Icenowy Zhenge54be322018-03-16 22:02:14 +0800501 status = "disabled";
502 };
Icenowy Zheng05bdee32018-05-04 02:38:42 +0800503
Bhushan Shah89336e12019-08-16 14:13:09 +0530504 i2c0: i2c@5002000 {
505 compatible = "allwinner,sun50i-h6-i2c",
506 "allwinner,sun6i-a31-i2c";
507 reg = <0x05002000 0x400>;
508 interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
509 clocks = <&ccu CLK_BUS_I2C0>;
510 resets = <&ccu RST_BUS_I2C0>;
511 pinctrl-names = "default";
512 pinctrl-0 = <&i2c0_pins>;
513 status = "disabled";
514 #address-cells = <1>;
515 #size-cells = <0>;
516 };
517
518 i2c1: i2c@5002400 {
519 compatible = "allwinner,sun50i-h6-i2c",
520 "allwinner,sun6i-a31-i2c";
521 reg = <0x05002400 0x400>;
522 interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
523 clocks = <&ccu CLK_BUS_I2C1>;
524 resets = <&ccu RST_BUS_I2C1>;
525 pinctrl-names = "default";
526 pinctrl-0 = <&i2c1_pins>;
527 status = "disabled";
528 #address-cells = <1>;
529 #size-cells = <0>;
530 };
531
532 i2c2: i2c@5002800 {
533 compatible = "allwinner,sun50i-h6-i2c",
534 "allwinner,sun6i-a31-i2c";
535 reg = <0x05002800 0x400>;
536 interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
537 clocks = <&ccu CLK_BUS_I2C2>;
538 resets = <&ccu RST_BUS_I2C2>;
539 pinctrl-names = "default";
540 pinctrl-0 = <&i2c2_pins>;
541 status = "disabled";
542 #address-cells = <1>;
543 #size-cells = <0>;
544 };
545
Andre Przywara30bd02b2020-01-16 23:11:46 +0000546 spi0: spi@5010000 {
547 compatible = "allwinner,sun50i-h6-spi",
548 "allwinner,sun8i-h3-spi";
549 reg = <0x05010000 0x1000>;
550 interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
551 clocks = <&ccu CLK_BUS_SPI0>, <&ccu CLK_SPI0>;
552 clock-names = "ahb", "mod";
553 dmas = <&dma 22>, <&dma 22>;
554 dma-names = "rx", "tx";
555 resets = <&ccu RST_BUS_SPI0>;
556 status = "disabled";
557 #address-cells = <1>;
558 #size-cells = <0>;
559 };
560
561 spi1: spi@5011000 {
562 compatible = "allwinner,sun50i-h6-spi",
563 "allwinner,sun8i-h3-spi";
564 reg = <0x05011000 0x1000>;
565 interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
566 clocks = <&ccu CLK_BUS_SPI1>, <&ccu CLK_SPI1>;
567 clock-names = "ahb", "mod";
568 dmas = <&dma 23>, <&dma 23>;
569 dma-names = "rx", "tx";
570 resets = <&ccu RST_BUS_SPI1>;
571 status = "disabled";
572 #address-cells = <1>;
573 #size-cells = <0>;
574 };
575
Icenowy Zhengc8ced552018-11-03 20:32:37 +0800576 emac: ethernet@5020000 {
Icenowy Zheng29ce4e42018-11-15 11:15:51 +0800577 compatible = "allwinner,sun50i-h6-emac",
578 "allwinner,sun50i-a64-emac";
Icenowy Zhengc8ced552018-11-03 20:32:37 +0800579 syscon = <&syscon>;
580 reg = <0x05020000 0x10000>;
581 interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>;
582 interrupt-names = "macirq";
583 resets = <&ccu RST_BUS_EMAC>;
584 reset-names = "stmmaceth";
585 clocks = <&ccu CLK_BUS_EMAC>;
586 clock-names = "stmmaceth";
587 status = "disabled";
588
589 mdio: mdio {
590 compatible = "snps,dwmac-mdio";
591 #address-cells = <1>;
592 #size-cells = <0>;
593 };
594 };
595
Clément Péronf95b5982019-08-12 12:51:14 +0200596 spdif: spdif@5093000 {
597 #sound-dai-cells = <0>;
598 compatible = "allwinner,sun50i-h6-spdif";
599 reg = <0x05093000 0x400>;
600 interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
601 clocks = <&ccu CLK_BUS_SPDIF>, <&ccu CLK_SPDIF>;
602 clock-names = "apb", "spdif";
603 resets = <&ccu RST_BUS_SPDIF>;
604 dmas = <&dma 2>;
605 dma-names = "tx";
606 pinctrl-names = "default";
607 pinctrl-0 = <&spdif_tx_pin>;
608 status = "disabled";
609 };
610
Icenowy Zhengeabb3d42018-10-04 20:28:49 +0800611 usb2otg: usb@5100000 {
612 compatible = "allwinner,sun50i-h6-musb",
613 "allwinner,sun8i-a33-musb";
614 reg = <0x05100000 0x0400>;
615 clocks = <&ccu CLK_BUS_OTG>;
616 resets = <&ccu RST_BUS_OTG>;
617 interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
618 interrupt-names = "mc";
619 phys = <&usb2phy 0>;
620 phy-names = "usb";
621 extcon = <&usb2phy 0>;
622 status = "disabled";
623 };
624
625 usb2phy: phy@5100400 {
626 compatible = "allwinner,sun50i-h6-usb-phy";
627 reg = <0x05100400 0x24>,
628 <0x05101800 0x4>,
629 <0x05311800 0x4>;
630 reg-names = "phy_ctrl",
631 "pmu0",
632 "pmu3";
633 clocks = <&ccu CLK_USB_PHY0>,
634 <&ccu CLK_USB_PHY3>;
635 clock-names = "usb0_phy",
636 "usb3_phy";
637 resets = <&ccu RST_USB_PHY0>,
638 <&ccu RST_USB_PHY3>;
639 reset-names = "usb0_reset",
640 "usb3_reset";
641 status = "disabled";
642 #phy-cells = <1>;
643 };
644
645 ehci0: usb@5101000 {
646 compatible = "allwinner,sun50i-h6-ehci", "generic-ehci";
647 reg = <0x05101000 0x100>;
648 interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
649 clocks = <&ccu CLK_BUS_OHCI0>,
650 <&ccu CLK_BUS_EHCI0>,
651 <&ccu CLK_USB_OHCI0>;
652 resets = <&ccu RST_BUS_OHCI0>,
653 <&ccu RST_BUS_EHCI0>;
654 status = "disabled";
655 };
656
657 ohci0: usb@5101400 {
658 compatible = "allwinner,sun50i-h6-ohci", "generic-ohci";
659 reg = <0x05101400 0x100>;
660 interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
661 clocks = <&ccu CLK_BUS_OHCI0>,
662 <&ccu CLK_USB_OHCI0>;
663 resets = <&ccu RST_BUS_OHCI0>;
664 status = "disabled";
665 };
666
Icenowy Zheng0b6f7012019-10-20 15:42:28 +0200667 dwc3: dwc3@5200000 {
668 compatible = "snps,dwc3";
669 reg = <0x05200000 0x10000>;
670 interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
671 clocks = <&ccu CLK_BUS_XHCI>,
672 <&ccu CLK_BUS_XHCI>,
673 <&rtc 0>;
674 clock-names = "ref", "bus_early", "suspend";
675 resets = <&ccu RST_BUS_XHCI>;
676 /*
677 * The datasheet of the chip doesn't declare the
678 * peripheral function, and there's no boards known
679 * to have a USB Type-B port routed to the port.
680 * In addition, no one has tested the peripheral
681 * function yet.
682 * So set the dr_mode to "host" in the DTSI file.
683 */
684 dr_mode = "host";
685 phys = <&usb3phy>;
686 phy-names = "usb3-phy";
687 status = "disabled";
688 };
689
690 usb3phy: phy@5210000 {
691 compatible = "allwinner,sun50i-h6-usb3-phy";
692 reg = <0x5210000 0x10000>;
693 clocks = <&ccu CLK_USB_PHY1>;
694 resets = <&ccu RST_USB_PHY1>;
695 #phy-cells = <0>;
696 status = "disabled";
697 };
698
Icenowy Zhengeabb3d42018-10-04 20:28:49 +0800699 ehci3: usb@5311000 {
700 compatible = "allwinner,sun50i-h6-ehci", "generic-ehci";
701 reg = <0x05311000 0x100>;
702 interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
703 clocks = <&ccu CLK_BUS_OHCI3>,
704 <&ccu CLK_BUS_EHCI3>,
705 <&ccu CLK_USB_OHCI3>;
706 resets = <&ccu RST_BUS_OHCI3>,
707 <&ccu RST_BUS_EHCI3>;
708 phys = <&usb2phy 3>;
Maxime Riparde6064cf2019-10-02 13:26:50 +0200709 phy-names = "usb";
Icenowy Zhengeabb3d42018-10-04 20:28:49 +0800710 status = "disabled";
711 };
712
713 ohci3: usb@5311400 {
714 compatible = "allwinner,sun50i-h6-ohci", "generic-ohci";
715 reg = <0x05311400 0x100>;
716 interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
717 clocks = <&ccu CLK_BUS_OHCI3>,
718 <&ccu CLK_USB_OHCI3>;
719 resets = <&ccu RST_BUS_OHCI3>;
720 phys = <&usb2phy 3>;
Maxime Riparde6064cf2019-10-02 13:26:50 +0200721 phy-names = "usb";
Icenowy Zhengeabb3d42018-10-04 20:28:49 +0800722 status = "disabled";
723 };
724
Jernej Skrabec209065c2018-11-04 19:27:04 +0100725 hdmi: hdmi@6000000 {
726 compatible = "allwinner,sun50i-h6-dw-hdmi";
727 reg = <0x06000000 0x10000>;
728 reg-io-width = <1>;
729 interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>;
730 clocks = <&ccu CLK_BUS_HDMI>, <&ccu CLK_HDMI_SLOW>,
731 <&ccu CLK_HDMI>, <&ccu CLK_HDMI_CEC>,
732 <&ccu CLK_HDCP>, <&ccu CLK_BUS_HDCP>;
733 clock-names = "iahb", "isfr", "tmds", "cec", "hdcp",
734 "hdcp-bus";
735 resets = <&ccu RST_BUS_HDMI_SUB>, <&ccu RST_BUS_HDCP>;
736 reset-names = "ctrl", "hdcp";
737 phys = <&hdmi_phy>;
Maxime Ripardd40113f2019-07-23 10:44:07 +0200738 phy-names = "phy";
Jernej Skrabec209065c2018-11-04 19:27:04 +0100739 pinctrl-names = "default";
740 pinctrl-0 = <&hdmi_pins>;
741 status = "disabled";
742
743 ports {
744 #address-cells = <1>;
745 #size-cells = <0>;
746
747 hdmi_in: port@0 {
748 reg = <0>;
749
750 hdmi_in_tcon_top: endpoint {
751 remote-endpoint = <&tcon_top_hdmi_out_hdmi>;
752 };
753 };
754
755 hdmi_out: port@1 {
756 reg = <1>;
757 };
758 };
759 };
760
761 hdmi_phy: hdmi-phy@6010000 {
762 compatible = "allwinner,sun50i-h6-hdmi-phy";
763 reg = <0x06010000 0x10000>;
764 clocks = <&ccu CLK_BUS_HDMI>, <&ccu CLK_HDMI_SLOW>;
765 clock-names = "bus", "mod";
766 resets = <&ccu RST_BUS_HDMI>;
767 reset-names = "phy";
768 #phy-cells = <0>;
769 };
770
771 tcon_top: tcon-top@6510000 {
772 compatible = "allwinner,sun50i-h6-tcon-top";
773 reg = <0x06510000 0x1000>;
774 clocks = <&ccu CLK_BUS_TCON_TOP>,
775 <&ccu CLK_TCON_TV0>;
776 clock-names = "bus",
777 "tcon-tv0";
778 clock-output-names = "tcon-top-tv0";
779 resets = <&ccu RST_BUS_TCON_TOP>;
Jernej Skrabec209065c2018-11-04 19:27:04 +0100780 #clock-cells = <1>;
781
782 ports {
783 #address-cells = <1>;
784 #size-cells = <0>;
785
786 tcon_top_mixer0_in: port@0 {
787 #address-cells = <1>;
788 #size-cells = <0>;
789 reg = <0>;
790
791 tcon_top_mixer0_in_mixer0: endpoint@0 {
792 reg = <0>;
793 remote-endpoint = <&mixer0_out_tcon_top_mixer0>;
794 };
795 };
796
797 tcon_top_mixer0_out: port@1 {
798 #address-cells = <1>;
799 #size-cells = <0>;
800 reg = <1>;
801
802 tcon_top_mixer0_out_tcon_tv: endpoint@2 {
803 reg = <2>;
804 remote-endpoint = <&tcon_tv_in_tcon_top_mixer0>;
805 };
806 };
807
808 tcon_top_hdmi_in: port@4 {
809 #address-cells = <1>;
810 #size-cells = <0>;
811 reg = <4>;
812
813 tcon_top_hdmi_in_tcon_tv: endpoint@0 {
814 reg = <0>;
815 remote-endpoint = <&tcon_tv_out_tcon_top>;
816 };
817 };
818
819 tcon_top_hdmi_out: port@5 {
820 reg = <5>;
821
822 tcon_top_hdmi_out_hdmi: endpoint {
823 remote-endpoint = <&hdmi_in_tcon_top>;
824 };
825 };
826 };
827 };
828
829 tcon_tv: lcd-controller@6515000 {
830 compatible = "allwinner,sun50i-h6-tcon-tv",
831 "allwinner,sun8i-r40-tcon-tv";
832 reg = <0x06515000 0x1000>;
833 interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>;
834 clocks = <&ccu CLK_BUS_TCON_TV0>,
835 <&tcon_top CLK_TCON_TOP_TV0>;
836 clock-names = "ahb",
837 "tcon-ch1";
838 resets = <&ccu RST_BUS_TCON_TV0>;
839 reset-names = "lcd";
840
841 ports {
842 #address-cells = <1>;
843 #size-cells = <0>;
844
845 tcon_tv_in: port@0 {
846 reg = <0>;
847
848 tcon_tv_in_tcon_top_mixer0: endpoint {
849 remote-endpoint = <&tcon_top_mixer0_out_tcon_tv>;
850 };
851 };
852
853 tcon_tv_out: port@1 {
854 #address-cells = <1>;
855 #size-cells = <0>;
856 reg = <1>;
857
858 tcon_tv_out_tcon_top: endpoint@1 {
859 reg = <1>;
860 remote-endpoint = <&tcon_top_hdmi_in_tcon_tv>;
861 };
862 };
863 };
864 };
865
Ondrej Jirman4cdc12a2019-08-20 17:19:34 +0200866 rtc: rtc@7000000 {
867 compatible = "allwinner,sun50i-h6-rtc";
868 reg = <0x07000000 0x400>;
869 interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>,
870 <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>;
871 clock-output-names = "osc32k", "osc32k-out", "iosc";
Ondrej Jirman4cdc12a2019-08-20 17:19:34 +0200872 #clock-cells = <1>;
873 };
874
Icenowy Zheng05bdee32018-05-04 02:38:42 +0800875 r_ccu: clock@7010000 {
876 compatible = "allwinner,sun50i-h6-r-ccu";
877 reg = <0x07010000 0x400>;
Ondrej Jirman4cdc12a2019-08-20 17:19:34 +0200878 clocks = <&osc24M>, <&rtc 0>, <&rtc 2>,
Icenowy Zheng05bdee32018-05-04 02:38:42 +0800879 <&ccu CLK_PLL_PERIPH0>;
880 clock-names = "hosc", "losc", "iosc", "pll-periph";
881 #clock-cells = <1>;
882 #reset-cells = <1>;
883 };
Icenowy Zheng71f9bdb2018-05-04 02:38:44 +0800884
Clément Péronae3ceed2019-05-23 17:10:49 +0200885 r_watchdog: watchdog@7020400 {
886 compatible = "allwinner,sun50i-h6-wdt",
887 "allwinner,sun6i-a31-wdt";
888 reg = <0x07020400 0x20>;
889 interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
Maxime Ripard9e1975f2019-08-21 16:38:35 +0200890 clocks = <&osc24M>;
Clément Péronae3ceed2019-05-23 17:10:49 +0200891 };
892
Icenowy Zheng1ecefb82018-05-04 02:38:45 +0800893 r_intc: interrupt-controller@7021000 {
894 compatible = "allwinner,sun50i-h6-r-intc",
895 "allwinner,sun6i-a31-r-intc";
896 interrupt-controller;
897 #interrupt-cells = <2>;
898 reg = <0x07021000 0x400>;
899 interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>;
900 };
901
Icenowy Zheng71f9bdb2018-05-04 02:38:44 +0800902 r_pio: pinctrl@7022000 {
903 compatible = "allwinner,sun50i-h6-r-pinctrl";
904 reg = <0x07022000 0x400>;
905 interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>,
906 <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>;
Ondrej Jirman4cdc12a2019-08-20 17:19:34 +0200907 clocks = <&r_ccu CLK_R_APB1>, <&osc24M>, <&rtc 0>;
Icenowy Zheng71f9bdb2018-05-04 02:38:44 +0800908 clock-names = "apb", "hosc", "losc";
909 gpio-controller;
910 #gpio-cells = <3>;
911 interrupt-controller;
912 #interrupt-cells = <3>;
Icenowy Zhenge9a23362018-05-04 02:38:46 +0800913
Maxime Ripard54eac67b2019-03-25 14:52:51 +0100914 r_i2c_pins: r-i2c-pins {
Icenowy Zhenge9a23362018-05-04 02:38:46 +0800915 pins = "PL0", "PL1";
916 function = "s_i2c";
917 };
Clément Péron92678112019-06-08 01:10:58 +0200918
919 r_ir_rx_pin: r-ir-rx-pin {
920 pins = "PL9";
921 function = "s_cir_rx";
922 };
923 };
924
925 r_ir: ir@7040000 {
926 compatible = "allwinner,sun50i-h6-ir",
927 "allwinner,sun6i-a31-ir";
928 reg = <0x07040000 0x400>;
929 interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
930 clocks = <&r_ccu CLK_R_APB1_IR>,
931 <&r_ccu CLK_IR>;
932 clock-names = "apb", "ir";
933 resets = <&r_ccu RST_R_APB1_IR>;
934 pinctrl-names = "default";
935 pinctrl-0 = <&r_ir_rx_pin>;
936 status = "disabled";
Icenowy Zhenge9a23362018-05-04 02:38:46 +0800937 };
938
939 r_i2c: i2c@7081400 {
Bhushan Shah89336e12019-08-16 14:13:09 +0530940 compatible = "allwinner,sun50i-h6-i2c",
941 "allwinner,sun6i-a31-i2c";
Icenowy Zhenge9a23362018-05-04 02:38:46 +0800942 reg = <0x07081400 0x400>;
943 interrupts = <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
Chen-Yu Tsaide2b5552018-07-13 00:04:51 +0800944 clocks = <&r_ccu CLK_R_APB2_I2C>;
945 resets = <&r_ccu RST_R_APB2_I2C>;
Icenowy Zhenge9a23362018-05-04 02:38:46 +0800946 pinctrl-names = "default";
947 pinctrl-0 = <&r_i2c_pins>;
948 status = "disabled";
949 #address-cells = <1>;
950 #size-cells = <0>;
Icenowy Zheng71f9bdb2018-05-04 02:38:44 +0800951 };
Ondrej Jirmand7cfb662019-12-19 09:28:22 -0800952
953 ths: thermal-sensor@5070400 {
954 compatible = "allwinner,sun50i-h6-ths";
955 reg = <0x05070400 0x100>;
956 interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
957 clocks = <&ccu CLK_BUS_THS>;
958 clock-names = "bus";
959 resets = <&ccu RST_BUS_THS>;
960 nvmem-cells = <&ths_calibration>;
961 nvmem-cell-names = "calibration";
962 #thermal-sensor-cells = <1>;
963 };
964 };
965
966 thermal-zones {
967 cpu-thermal {
968 polling-delay-passive = <0>;
969 polling-delay = <0>;
970 thermal-sensors = <&ths 0>;
Ondrej Jirman9f8a93b2020-04-20 15:00:14 +0200971
972 trips {
973 cpu_alert: cpu-alert {
974 temperature = <85000>;
975 hysteresis = <2000>;
976 type = "passive";
977 };
978
979 cpu-crit {
980 temperature = <100000>;
981 hysteresis = <0>;
982 type = "critical";
983 };
984 };
985
986 cooling-maps {
987 map0 {
988 trip = <&cpu_alert>;
989 cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
990 <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
991 <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
992 <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
993 };
994 };
Ondrej Jirmand7cfb662019-12-19 09:28:22 -0800995 };
996
997 gpu-thermal {
998 polling-delay-passive = <0>;
999 polling-delay = <0>;
1000 thermal-sensors = <&ths 1>;
1001 };
Icenowy Zhenge54be322018-03-16 22:02:14 +08001002 };
1003};