blob: 3c85c8cc8eaaa292de7d3effa1f65913dc84a5f1 [file] [log] [blame]
Jernej Skrabec463304d2021-01-06 18:02:56 +01001// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2// Copyright (C) 2017 Icenowy Zheng <icenowy@aosc.io>
Icenowy Zheng0c01b962018-07-21 16:20:31 +08003
4#include <dt-bindings/interrupt-controller/arm-gic.h>
5#include <dt-bindings/clock/sun50i-h6-ccu.h>
6#include <dt-bindings/clock/sun50i-h6-r-ccu.h>
Andre Przywara5eb4bbe2022-09-11 00:04:41 +01007#include <dt-bindings/clock/sun6i-rtc.h>
Jagan Teki7d412cd2019-04-14 22:22:21 +05308#include <dt-bindings/clock/sun8i-de2.h>
9#include <dt-bindings/clock/sun8i-tcon-top.h>
Icenowy Zheng0c01b962018-07-21 16:20:31 +080010#include <dt-bindings/reset/sun50i-h6-ccu.h>
11#include <dt-bindings/reset/sun50i-h6-r-ccu.h>
Jagan Teki7d412cd2019-04-14 22:22:21 +053012#include <dt-bindings/reset/sun8i-de2.h>
Jernej Skrabec463304d2021-01-06 18:02:56 +010013#include <dt-bindings/thermal/thermal.h>
Icenowy Zheng0c01b962018-07-21 16:20:31 +080014
15/ {
16 interrupt-parent = <&gic>;
17 #address-cells = <1>;
18 #size-cells = <1>;
19
20 cpus {
21 #address-cells = <1>;
22 #size-cells = <0>;
23
24 cpu0: cpu@0 {
Jagan Teki7d412cd2019-04-14 22:22:21 +053025 compatible = "arm,cortex-a53";
Icenowy Zheng0c01b962018-07-21 16:20:31 +080026 device_type = "cpu";
27 reg = <0>;
28 enable-method = "psci";
Jernej Skrabec463304d2021-01-06 18:02:56 +010029 clocks = <&ccu CLK_CPUX>;
30 clock-latency-ns = <244144>; /* 8 32k periods */
31 #cooling-cells = <2>;
Icenowy Zheng0c01b962018-07-21 16:20:31 +080032 };
33
34 cpu1: cpu@1 {
Jagan Teki7d412cd2019-04-14 22:22:21 +053035 compatible = "arm,cortex-a53";
Icenowy Zheng0c01b962018-07-21 16:20:31 +080036 device_type = "cpu";
37 reg = <1>;
38 enable-method = "psci";
Jernej Skrabec463304d2021-01-06 18:02:56 +010039 clocks = <&ccu CLK_CPUX>;
40 clock-latency-ns = <244144>; /* 8 32k periods */
41 #cooling-cells = <2>;
Icenowy Zheng0c01b962018-07-21 16:20:31 +080042 };
43
44 cpu2: cpu@2 {
Jagan Teki7d412cd2019-04-14 22:22:21 +053045 compatible = "arm,cortex-a53";
Icenowy Zheng0c01b962018-07-21 16:20:31 +080046 device_type = "cpu";
47 reg = <2>;
48 enable-method = "psci";
Jernej Skrabec463304d2021-01-06 18:02:56 +010049 clocks = <&ccu CLK_CPUX>;
50 clock-latency-ns = <244144>; /* 8 32k periods */
51 #cooling-cells = <2>;
Icenowy Zheng0c01b962018-07-21 16:20:31 +080052 };
53
54 cpu3: cpu@3 {
Jagan Teki7d412cd2019-04-14 22:22:21 +053055 compatible = "arm,cortex-a53";
Icenowy Zheng0c01b962018-07-21 16:20:31 +080056 device_type = "cpu";
57 reg = <3>;
58 enable-method = "psci";
Jernej Skrabec463304d2021-01-06 18:02:56 +010059 clocks = <&ccu CLK_CPUX>;
60 clock-latency-ns = <244144>; /* 8 32k periods */
61 #cooling-cells = <2>;
Icenowy Zheng0c01b962018-07-21 16:20:31 +080062 };
63 };
64
Jagan Teki7d412cd2019-04-14 22:22:21 +053065 de: display-engine {
66 compatible = "allwinner,sun50i-h6-display-engine";
67 allwinner,pipelines = <&mixer0>;
68 status = "disabled";
69 };
70
Icenowy Zheng0c01b962018-07-21 16:20:31 +080071 osc24M: osc24M_clk {
72 #clock-cells = <0>;
73 compatible = "fixed-clock";
74 clock-frequency = <24000000>;
75 clock-output-names = "osc24M";
76 };
77
Jernej Skrabec463304d2021-01-06 18:02:56 +010078 pmu {
79 compatible = "arm,cortex-a53-pmu";
80 interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>,
81 <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>,
82 <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>,
83 <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>;
84 interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>;
Icenowy Zheng0c01b962018-07-21 16:20:31 +080085 };
86
87 psci {
88 compatible = "arm,psci-0.2";
89 method = "smc";
90 };
91
92 timer {
93 compatible = "arm,armv8-timer";
Jernej Skrabec463304d2021-01-06 18:02:56 +010094 arm,no-tick-in-suspend;
Icenowy Zheng0c01b962018-07-21 16:20:31 +080095 interrupts = <GIC_PPI 13
96 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
97 <GIC_PPI 14
98 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
99 <GIC_PPI 11
100 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
101 <GIC_PPI 10
102 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
103 };
104
105 soc {
106 compatible = "simple-bus";
107 #address-cells = <1>;
108 #size-cells = <1>;
109 ranges;
110
Clément Péron725089c2019-08-25 18:04:18 +0200111 bus@1000000 {
Jagan Teki7d412cd2019-04-14 22:22:21 +0530112 compatible = "allwinner,sun50i-h6-de3",
113 "allwinner,sun50i-a64-de2";
114 reg = <0x1000000 0x400000>;
115 allwinner,sram = <&de2_sram 1>;
116 #address-cells = <1>;
117 #size-cells = <1>;
118 ranges = <0 0x1000000 0x400000>;
119
120 display_clocks: clock@0 {
121 compatible = "allwinner,sun50i-h6-de3-clk";
122 reg = <0x0 0x10000>;
Samuel Holland399a01f2022-04-27 15:31:31 -0500123 clocks = <&ccu CLK_BUS_DE>,
124 <&ccu CLK_DE>;
125 clock-names = "bus",
126 "mod";
Jagan Teki7d412cd2019-04-14 22:22:21 +0530127 resets = <&ccu RST_BUS_DE>;
128 #clock-cells = <1>;
129 #reset-cells = <1>;
130 };
131
132 mixer0: mixer@100000 {
133 compatible = "allwinner,sun50i-h6-de3-mixer-0";
134 reg = <0x100000 0x100000>;
135 clocks = <&display_clocks CLK_BUS_MIXER0>,
136 <&display_clocks CLK_MIXER0>;
137 clock-names = "bus",
138 "mod";
139 resets = <&display_clocks RST_MIXER0>;
Jernej Skrabec463304d2021-01-06 18:02:56 +0100140 iommus = <&iommu 0>;
Jagan Teki7d412cd2019-04-14 22:22:21 +0530141
142 ports {
143 #address-cells = <1>;
144 #size-cells = <0>;
145
146 mixer0_out: port@1 {
147 reg = <1>;
148
149 mixer0_out_tcon_top_mixer0: endpoint {
150 remote-endpoint = <&tcon_top_mixer0_in_mixer0>;
151 };
152 };
153 };
154 };
155 };
156
Samuel Holland399a01f2022-04-27 15:31:31 -0500157 video-codec-g2@1c00000 {
158 compatible = "allwinner,sun50i-h6-vpu-g2";
159 reg = <0x01c00000 0x1000>;
160 interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
161 clocks = <&ccu CLK_BUS_VP9>, <&ccu CLK_VP9>;
162 clock-names = "bus", "mod";
163 resets = <&ccu RST_BUS_VP9>;
Andre Przywaraed2724b2023-01-12 11:22:20 +0000164 iommus = <&iommu 5>;
Samuel Holland399a01f2022-04-27 15:31:31 -0500165 };
166
Jagan Teki7d412cd2019-04-14 22:22:21 +0530167 video-codec@1c0e000 {
168 compatible = "allwinner,sun50i-h6-video-engine";
169 reg = <0x01c0e000 0x2000>;
170 clocks = <&ccu CLK_BUS_VE>, <&ccu CLK_VE>,
171 <&ccu CLK_MBUS_VE>;
172 clock-names = "ahb", "mod", "ram";
173 resets = <&ccu RST_BUS_VE>;
174 interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
175 allwinner,sram = <&ve_sram 1>;
Jernej Skrabec463304d2021-01-06 18:02:56 +0100176 iommus = <&iommu 3>;
Jagan Teki7d412cd2019-04-14 22:22:21 +0530177 };
178
Jernej Skrabec463304d2021-01-06 18:02:56 +0100179 gpu: gpu@1800000 {
180 compatible = "allwinner,sun50i-h6-mali",
181 "arm,mali-t720";
182 reg = <0x01800000 0x4000>;
183 interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>,
184 <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>,
185 <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
186 interrupt-names = "job", "mmu", "gpu";
187 clocks = <&ccu CLK_GPU>, <&ccu CLK_BUS_GPU>;
188 clock-names = "core", "bus";
189 resets = <&ccu RST_BUS_GPU>;
Andre Przywaraed2724b2023-01-12 11:22:20 +0000190 #cooling-cells = <2>;
Jernej Skrabec463304d2021-01-06 18:02:56 +0100191 status = "disabled";
192 };
193
194 crypto: crypto@1904000 {
195 compatible = "allwinner,sun50i-h6-crypto";
196 reg = <0x01904000 0x1000>;
197 interrupts = <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>;
198 clocks = <&ccu CLK_BUS_CE>, <&ccu CLK_CE>, <&ccu CLK_MBUS_CE>;
199 clock-names = "bus", "mod", "ram";
200 resets = <&ccu RST_BUS_CE>;
201 };
202
Jagan Teki7d412cd2019-04-14 22:22:21 +0530203 syscon: syscon@3000000 {
204 compatible = "allwinner,sun50i-h6-system-control",
205 "allwinner,sun50i-a64-system-control";
206 reg = <0x03000000 0x1000>;
207 #address-cells = <1>;
208 #size-cells = <1>;
209 ranges;
210
211 sram_c: sram@28000 {
212 compatible = "mmio-sram";
213 reg = <0x00028000 0x1e000>;
214 #address-cells = <1>;
215 #size-cells = <1>;
216 ranges = <0 0x00028000 0x1e000>;
217
218 de2_sram: sram-section@0 {
219 compatible = "allwinner,sun50i-h6-sram-c",
220 "allwinner,sun50i-a64-sram-c";
221 reg = <0x0000 0x1e000>;
222 };
223 };
224
225 sram_c1: sram@1a00000 {
226 compatible = "mmio-sram";
227 reg = <0x01a00000 0x200000>;
228 #address-cells = <1>;
229 #size-cells = <1>;
230 ranges = <0 0x01a00000 0x200000>;
231
232 ve_sram: sram-section@0 {
233 compatible = "allwinner,sun50i-h6-sram-c1",
234 "allwinner,sun4i-a10-sram-c1";
235 reg = <0x000000 0x200000>;
236 };
237 };
238 };
239
Icenowy Zheng0c01b962018-07-21 16:20:31 +0800240 ccu: clock@3001000 {
241 compatible = "allwinner,sun50i-h6-ccu";
242 reg = <0x03001000 0x1000>;
Andre Przywara5eb4bbe2022-09-11 00:04:41 +0100243 clocks = <&osc24M>, <&rtc CLK_OSC32K>, <&rtc CLK_IOSC>;
Icenowy Zheng0c01b962018-07-21 16:20:31 +0800244 clock-names = "hosc", "losc", "iosc";
245 #clock-cells = <1>;
246 #reset-cells = <1>;
247 };
248
Clément Péron725089c2019-08-25 18:04:18 +0200249 dma: dma-controller@3002000 {
250 compatible = "allwinner,sun50i-h6-dma";
251 reg = <0x03002000 0x1000>;
252 interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>;
253 clocks = <&ccu CLK_BUS_DMA>, <&ccu CLK_MBUS_DMA>;
254 clock-names = "bus", "mbus";
255 dma-channels = <16>;
256 dma-requests = <46>;
257 resets = <&ccu RST_BUS_DMA>;
258 #dma-cells = <1>;
259 };
260
Jernej Skrabec463304d2021-01-06 18:02:56 +0100261 msgbox: mailbox@3003000 {
262 compatible = "allwinner,sun50i-h6-msgbox",
263 "allwinner,sun6i-a31-msgbox";
264 reg = <0x03003000 0x1000>;
265 clocks = <&ccu CLK_BUS_MSGBOX>;
266 resets = <&ccu RST_BUS_MSGBOX>;
267 interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
268 #mbox-cells = <1>;
269 };
270
271 sid: efuse@3006000 {
Jagan Teki7d412cd2019-04-14 22:22:21 +0530272 compatible = "allwinner,sun50i-h6-sid";
273 reg = <0x03006000 0x400>;
Jernej Skrabec463304d2021-01-06 18:02:56 +0100274 #address-cells = <1>;
275 #size-cells = <1>;
276
277 ths_calibration: thermal-sensor-calibration@14 {
278 reg = <0x14 0x8>;
279 };
280
281 cpu_speed_grade: cpu-speed-grade@1c {
282 reg = <0x1c 0x4>;
283 };
Icenowy Zheng0c01b962018-07-21 16:20:31 +0800284 };
285
Samuel Holland399a01f2022-04-27 15:31:31 -0500286 timer@3009000 {
287 compatible = "allwinner,sun50i-h6-timer",
288 "allwinner,sun8i-a23-timer";
289 reg = <0x03009000 0xa0>;
290 interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>,
291 <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>;
292 clocks = <&osc24M>;
293 };
294
Clément Péron725089c2019-08-25 18:04:18 +0200295 watchdog: watchdog@30090a0 {
296 compatible = "allwinner,sun50i-h6-wdt",
297 "allwinner,sun6i-a31-wdt";
298 reg = <0x030090a0 0x20>;
299 interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
Jernej Skrabec463304d2021-01-06 18:02:56 +0100300 clocks = <&osc24M>;
Clément Péron725089c2019-08-25 18:04:18 +0200301 /* Broken on some H6 boards */
302 status = "disabled";
303 };
304
Jernej Skrabec463304d2021-01-06 18:02:56 +0100305 pwm: pwm@300a000 {
306 compatible = "allwinner,sun50i-h6-pwm";
307 reg = <0x0300a000 0x400>;
308 clocks = <&osc24M>, <&ccu CLK_BUS_PWM>;
309 clock-names = "mod", "bus";
310 resets = <&ccu RST_BUS_PWM>;
311 #pwm-cells = <3>;
312 status = "disabled";
313 };
314
Icenowy Zheng0c01b962018-07-21 16:20:31 +0800315 pio: pinctrl@300b000 {
316 compatible = "allwinner,sun50i-h6-pinctrl";
317 reg = <0x0300b000 0x400>;
318 interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>,
319 <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>,
320 <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>,
321 <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>;
Andre Przywara5eb4bbe2022-09-11 00:04:41 +0100322 clocks = <&ccu CLK_APB1>, <&osc24M>, <&rtc CLK_OSC32K>;
Icenowy Zheng0c01b962018-07-21 16:20:31 +0800323 clock-names = "apb", "hosc", "losc";
324 gpio-controller;
325 #gpio-cells = <3>;
326 interrupt-controller;
327 #interrupt-cells = <3>;
328
Jagan Teki7d412cd2019-04-14 22:22:21 +0530329 ext_rgmii_pins: rgmii-pins {
330 pins = "PD0", "PD1", "PD2", "PD3", "PD4",
331 "PD5", "PD7", "PD8", "PD9", "PD10",
332 "PD11", "PD12", "PD13", "PD19", "PD20";
333 function = "emac";
334 drive-strength = <40>;
335 };
336
337 hdmi_pins: hdmi-pins {
338 pins = "PH8", "PH9", "PH10";
339 function = "hdmi";
340 };
341
Jernej Skrabec463304d2021-01-06 18:02:56 +0100342 i2c0_pins: i2c0-pins {
343 pins = "PD25", "PD26";
344 function = "i2c0";
345 };
346
347 i2c1_pins: i2c1-pins {
348 pins = "PH5", "PH6";
349 function = "i2c1";
350 };
351
352 i2c2_pins: i2c2-pins {
353 pins = "PD23", "PD24";
354 function = "i2c2";
355 };
356
Icenowy Zheng0c01b962018-07-21 16:20:31 +0800357 mmc0_pins: mmc0-pins {
358 pins = "PF0", "PF1", "PF2", "PF3",
359 "PF4", "PF5";
360 function = "mmc0";
361 drive-strength = <30>;
362 bias-pull-up;
363 };
364
Jernej Skrabec463304d2021-01-06 18:02:56 +0100365 /omit-if-no-ref/
Clément Péron725089c2019-08-25 18:04:18 +0200366 mmc1_pins: mmc1-pins {
367 pins = "PG0", "PG1", "PG2", "PG3",
368 "PG4", "PG5";
369 function = "mmc1";
370 drive-strength = <30>;
371 bias-pull-up;
372 };
373
Icenowy Zheng0c01b962018-07-21 16:20:31 +0800374 mmc2_pins: mmc2-pins {
375 pins = "PC1", "PC4", "PC5", "PC6",
376 "PC7", "PC8", "PC9", "PC10",
377 "PC11", "PC12", "PC13", "PC14";
378 function = "mmc2";
379 drive-strength = <30>;
380 bias-pull-up;
381 };
382
Jernej Skrabec463304d2021-01-06 18:02:56 +0100383 /omit-if-no-ref/
384 spi0_pins: spi0-pins {
385 pins = "PC0", "PC2", "PC3";
386 function = "spi0";
387 };
388
389 /* pin shared with MMC2-CMD (eMMC) */
390 /omit-if-no-ref/
391 spi0_cs_pin: spi0-cs-pin {
392 pins = "PC5";
393 function = "spi0";
394 };
395
396 /omit-if-no-ref/
397 spi1_pins: spi1-pins {
398 pins = "PH4", "PH5", "PH6";
399 function = "spi1";
400 };
401
402 /omit-if-no-ref/
403 spi1_cs_pin: spi1-cs-pin {
404 pins = "PH3";
405 function = "spi1";
406 };
407
408 spdif_tx_pin: spdif-tx-pin {
409 pins = "PH7";
410 function = "spdif";
411 };
412
Jagan Teki7d412cd2019-04-14 22:22:21 +0530413 uart0_ph_pins: uart0-ph-pins {
Icenowy Zheng0c01b962018-07-21 16:20:31 +0800414 pins = "PH0", "PH1";
415 function = "uart0";
416 };
Jernej Skrabec463304d2021-01-06 18:02:56 +0100417
418 uart1_pins: uart1-pins {
419 pins = "PG6", "PG7";
420 function = "uart1";
421 };
422
423 uart1_rts_cts_pins: uart1-rts-cts-pins {
424 pins = "PG8", "PG9";
425 function = "uart1";
426 };
Icenowy Zheng0c01b962018-07-21 16:20:31 +0800427 };
428
Jagan Teki7d412cd2019-04-14 22:22:21 +0530429 gic: interrupt-controller@3021000 {
430 compatible = "arm,gic-400";
431 reg = <0x03021000 0x1000>,
432 <0x03022000 0x2000>,
433 <0x03024000 0x2000>,
434 <0x03026000 0x2000>;
435 interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
436 interrupt-controller;
437 #interrupt-cells = <3>;
438 };
439
Jernej Skrabec463304d2021-01-06 18:02:56 +0100440 iommu: iommu@30f0000 {
441 compatible = "allwinner,sun50i-h6-iommu";
442 reg = <0x030f0000 0x10000>;
443 interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
444 clocks = <&ccu CLK_BUS_IOMMU>;
445 resets = <&ccu RST_BUS_IOMMU>;
446 #iommu-cells = <1>;
447 };
448
Icenowy Zheng0c01b962018-07-21 16:20:31 +0800449 mmc0: mmc@4020000 {
450 compatible = "allwinner,sun50i-h6-mmc",
451 "allwinner,sun50i-a64-mmc";
452 reg = <0x04020000 0x1000>;
453 clocks = <&ccu CLK_BUS_MMC0>, <&ccu CLK_MMC0>;
454 clock-names = "ahb", "mmc";
455 resets = <&ccu RST_BUS_MMC0>;
456 reset-names = "ahb";
457 interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
Jagan Teki7d412cd2019-04-14 22:22:21 +0530458 pinctrl-names = "default";
459 pinctrl-0 = <&mmc0_pins>;
Andre Przywara787f5a02021-05-25 01:20:25 +0100460 max-frequency = <150000000>;
Icenowy Zheng0c01b962018-07-21 16:20:31 +0800461 status = "disabled";
462 #address-cells = <1>;
463 #size-cells = <0>;
464 };
465
466 mmc1: mmc@4021000 {
467 compatible = "allwinner,sun50i-h6-mmc",
468 "allwinner,sun50i-a64-mmc";
469 reg = <0x04021000 0x1000>;
470 clocks = <&ccu CLK_BUS_MMC1>, <&ccu CLK_MMC1>;
471 clock-names = "ahb", "mmc";
472 resets = <&ccu RST_BUS_MMC1>;
473 reset-names = "ahb";
474 interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
Clément Péron725089c2019-08-25 18:04:18 +0200475 pinctrl-names = "default";
476 pinctrl-0 = <&mmc1_pins>;
Andre Przywara787f5a02021-05-25 01:20:25 +0100477 max-frequency = <150000000>;
Icenowy Zheng0c01b962018-07-21 16:20:31 +0800478 status = "disabled";
479 #address-cells = <1>;
480 #size-cells = <0>;
481 };
482
483 mmc2: mmc@4022000 {
484 compatible = "allwinner,sun50i-h6-emmc",
485 "allwinner,sun50i-a64-emmc";
486 reg = <0x04022000 0x1000>;
487 clocks = <&ccu CLK_BUS_MMC2>, <&ccu CLK_MMC2>;
488 clock-names = "ahb", "mmc";
489 resets = <&ccu RST_BUS_MMC2>;
490 reset-names = "ahb";
491 interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
Jagan Teki7d412cd2019-04-14 22:22:21 +0530492 pinctrl-names = "default";
493 pinctrl-0 = <&mmc2_pins>;
Andre Przywara787f5a02021-05-25 01:20:25 +0100494 max-frequency = <150000000>;
Icenowy Zheng0c01b962018-07-21 16:20:31 +0800495 status = "disabled";
496 #address-cells = <1>;
497 #size-cells = <0>;
498 };
499
500 uart0: serial@5000000 {
501 compatible = "snps,dw-apb-uart";
502 reg = <0x05000000 0x400>;
503 interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
504 reg-shift = <2>;
505 reg-io-width = <4>;
506 clocks = <&ccu CLK_BUS_UART0>;
507 resets = <&ccu RST_BUS_UART0>;
508 status = "disabled";
509 };
510
511 uart1: serial@5000400 {
512 compatible = "snps,dw-apb-uart";
513 reg = <0x05000400 0x400>;
514 interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
515 reg-shift = <2>;
516 reg-io-width = <4>;
517 clocks = <&ccu CLK_BUS_UART1>;
518 resets = <&ccu RST_BUS_UART1>;
519 status = "disabled";
520 };
521
522 uart2: serial@5000800 {
523 compatible = "snps,dw-apb-uart";
524 reg = <0x05000800 0x400>;
525 interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
526 reg-shift = <2>;
527 reg-io-width = <4>;
528 clocks = <&ccu CLK_BUS_UART2>;
529 resets = <&ccu RST_BUS_UART2>;
530 status = "disabled";
531 };
532
533 uart3: serial@5000c00 {
534 compatible = "snps,dw-apb-uart";
535 reg = <0x05000c00 0x400>;
536 interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
537 reg-shift = <2>;
538 reg-io-width = <4>;
539 clocks = <&ccu CLK_BUS_UART3>;
540 resets = <&ccu RST_BUS_UART3>;
541 status = "disabled";
Jernej Skrabec463304d2021-01-06 18:02:56 +0100542 };
543
544 i2c0: i2c@5002000 {
545 compatible = "allwinner,sun50i-h6-i2c",
546 "allwinner,sun6i-a31-i2c";
547 reg = <0x05002000 0x400>;
548 interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
549 clocks = <&ccu CLK_BUS_I2C0>;
550 resets = <&ccu RST_BUS_I2C0>;
551 pinctrl-names = "default";
552 pinctrl-0 = <&i2c0_pins>;
553 status = "disabled";
554 #address-cells = <1>;
555 #size-cells = <0>;
556 };
557
558 i2c1: i2c@5002400 {
559 compatible = "allwinner,sun50i-h6-i2c",
560 "allwinner,sun6i-a31-i2c";
561 reg = <0x05002400 0x400>;
562 interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
563 clocks = <&ccu CLK_BUS_I2C1>;
564 resets = <&ccu RST_BUS_I2C1>;
565 pinctrl-names = "default";
566 pinctrl-0 = <&i2c1_pins>;
567 status = "disabled";
568 #address-cells = <1>;
569 #size-cells = <0>;
570 };
571
572 i2c2: i2c@5002800 {
573 compatible = "allwinner,sun50i-h6-i2c",
574 "allwinner,sun6i-a31-i2c";
575 reg = <0x05002800 0x400>;
576 interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
577 clocks = <&ccu CLK_BUS_I2C2>;
578 resets = <&ccu RST_BUS_I2C2>;
579 pinctrl-names = "default";
580 pinctrl-0 = <&i2c2_pins>;
581 status = "disabled";
582 #address-cells = <1>;
583 #size-cells = <0>;
Jagan Teki7d412cd2019-04-14 22:22:21 +0530584 };
585
Jernej Skrabec463304d2021-01-06 18:02:56 +0100586 spi0: spi@5010000 {
587 compatible = "allwinner,sun50i-h6-spi",
588 "allwinner,sun8i-h3-spi";
589 reg = <0x05010000 0x1000>;
590 interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
591 clocks = <&ccu CLK_BUS_SPI0>, <&ccu CLK_SPI0>;
592 clock-names = "ahb", "mod";
593 dmas = <&dma 22>, <&dma 22>;
594 dma-names = "rx", "tx";
595 resets = <&ccu RST_BUS_SPI0>;
596 status = "disabled";
597 #address-cells = <1>;
598 #size-cells = <0>;
599 };
600
601 spi1: spi@5011000 {
602 compatible = "allwinner,sun50i-h6-spi",
603 "allwinner,sun8i-h3-spi";
604 reg = <0x05011000 0x1000>;
605 interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
606 clocks = <&ccu CLK_BUS_SPI1>, <&ccu CLK_SPI1>;
607 clock-names = "ahb", "mod";
608 dmas = <&dma 23>, <&dma 23>;
609 dma-names = "rx", "tx";
610 resets = <&ccu RST_BUS_SPI1>;
611 status = "disabled";
612 #address-cells = <1>;
613 #size-cells = <0>;
614 };
615
Jagan Teki7d412cd2019-04-14 22:22:21 +0530616 emac: ethernet@5020000 {
617 compatible = "allwinner,sun50i-h6-emac",
618 "allwinner,sun50i-a64-emac";
619 syscon = <&syscon>;
620 reg = <0x05020000 0x10000>;
621 interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>;
622 interrupt-names = "macirq";
623 resets = <&ccu RST_BUS_EMAC>;
624 reset-names = "stmmaceth";
625 clocks = <&ccu CLK_BUS_EMAC>;
626 clock-names = "stmmaceth";
627 status = "disabled";
628
629 mdio: mdio {
630 compatible = "snps,dwmac-mdio";
631 #address-cells = <1>;
632 #size-cells = <0>;
633 };
634 };
635
Jernej Skrabec463304d2021-01-06 18:02:56 +0100636 i2s1: i2s@5091000 {
637 #sound-dai-cells = <0>;
638 compatible = "allwinner,sun50i-h6-i2s";
639 reg = <0x05091000 0x1000>;
640 interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
641 clocks = <&ccu CLK_BUS_I2S1>, <&ccu CLK_I2S1>;
642 clock-names = "apb", "mod";
643 dmas = <&dma 4>, <&dma 4>;
644 resets = <&ccu RST_BUS_I2S1>;
645 dma-names = "rx", "tx";
646 status = "disabled";
647 };
648
649 spdif: spdif@5093000 {
650 #sound-dai-cells = <0>;
651 compatible = "allwinner,sun50i-h6-spdif";
652 reg = <0x05093000 0x400>;
653 interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
654 clocks = <&ccu CLK_BUS_SPDIF>, <&ccu CLK_SPDIF>;
655 clock-names = "apb", "spdif";
656 resets = <&ccu RST_BUS_SPDIF>;
657 dmas = <&dma 2>;
658 dma-names = "tx";
659 pinctrl-names = "default";
660 pinctrl-0 = <&spdif_tx_pin>;
661 status = "disabled";
662 };
663
Jagan Teki7d412cd2019-04-14 22:22:21 +0530664 usb2otg: usb@5100000 {
665 compatible = "allwinner,sun50i-h6-musb",
666 "allwinner,sun8i-a33-musb";
667 reg = <0x05100000 0x0400>;
668 clocks = <&ccu CLK_BUS_OTG>;
669 resets = <&ccu RST_BUS_OTG>;
670 interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
671 interrupt-names = "mc";
672 phys = <&usb2phy 0>;
673 phy-names = "usb";
674 extcon = <&usb2phy 0>;
675 status = "disabled";
676 };
677
678 usb2phy: phy@5100400 {
679 compatible = "allwinner,sun50i-h6-usb-phy";
680 reg = <0x05100400 0x24>,
681 <0x05101800 0x4>,
682 <0x05311800 0x4>;
683 reg-names = "phy_ctrl",
684 "pmu0",
685 "pmu3";
686 clocks = <&ccu CLK_USB_PHY0>,
687 <&ccu CLK_USB_PHY3>;
688 clock-names = "usb0_phy",
689 "usb3_phy";
690 resets = <&ccu RST_USB_PHY0>,
691 <&ccu RST_USB_PHY3>;
692 reset-names = "usb0_reset",
693 "usb3_reset";
694 status = "disabled";
695 #phy-cells = <1>;
696 };
697
698 ehci0: usb@5101000 {
699 compatible = "allwinner,sun50i-h6-ehci", "generic-ehci";
700 reg = <0x05101000 0x100>;
701 interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
702 clocks = <&ccu CLK_BUS_OHCI0>,
703 <&ccu CLK_BUS_EHCI0>,
704 <&ccu CLK_USB_OHCI0>;
705 resets = <&ccu RST_BUS_OHCI0>,
706 <&ccu RST_BUS_EHCI0>;
Andre Przywara787f5a02021-05-25 01:20:25 +0100707 phys = <&usb2phy 0>;
708 phy-names = "usb";
Jagan Teki7d412cd2019-04-14 22:22:21 +0530709 status = "disabled";
710 };
711
712 ohci0: usb@5101400 {
713 compatible = "allwinner,sun50i-h6-ohci", "generic-ohci";
714 reg = <0x05101400 0x100>;
715 interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
716 clocks = <&ccu CLK_BUS_OHCI0>,
717 <&ccu CLK_USB_OHCI0>;
718 resets = <&ccu RST_BUS_OHCI0>;
Andre Przywara787f5a02021-05-25 01:20:25 +0100719 phys = <&usb2phy 0>;
720 phy-names = "usb";
Jagan Teki7d412cd2019-04-14 22:22:21 +0530721 status = "disabled";
722 };
723
Jernej Skrabec463304d2021-01-06 18:02:56 +0100724 dwc3: usb@5200000 {
725 compatible = "snps,dwc3";
726 reg = <0x05200000 0x10000>;
727 interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
728 clocks = <&ccu CLK_BUS_XHCI>,
729 <&ccu CLK_BUS_XHCI>,
Andre Przywara5eb4bbe2022-09-11 00:04:41 +0100730 <&rtc CLK_OSC32K>;
Jernej Skrabec463304d2021-01-06 18:02:56 +0100731 clock-names = "ref", "bus_early", "suspend";
732 resets = <&ccu RST_BUS_XHCI>;
733 /*
734 * The datasheet of the chip doesn't declare the
735 * peripheral function, and there's no boards known
736 * to have a USB Type-B port routed to the port.
737 * In addition, no one has tested the peripheral
738 * function yet.
739 * So set the dr_mode to "host" in the DTSI file.
740 */
741 dr_mode = "host";
742 phys = <&usb3phy>;
743 phy-names = "usb3-phy";
744 status = "disabled";
745 };
746
747 usb3phy: phy@5210000 {
748 compatible = "allwinner,sun50i-h6-usb3-phy";
749 reg = <0x5210000 0x10000>;
750 clocks = <&ccu CLK_USB_PHY1>;
751 resets = <&ccu RST_USB_PHY1>;
752 #phy-cells = <0>;
753 status = "disabled";
754 };
755
Jagan Teki7d412cd2019-04-14 22:22:21 +0530756 ehci3: usb@5311000 {
757 compatible = "allwinner,sun50i-h6-ehci", "generic-ehci";
758 reg = <0x05311000 0x100>;
759 interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
760 clocks = <&ccu CLK_BUS_OHCI3>,
761 <&ccu CLK_BUS_EHCI3>,
762 <&ccu CLK_USB_OHCI3>;
763 resets = <&ccu RST_BUS_OHCI3>,
764 <&ccu RST_BUS_EHCI3>;
765 phys = <&usb2phy 3>;
Jernej Skrabec463304d2021-01-06 18:02:56 +0100766 phy-names = "usb";
Jagan Teki7d412cd2019-04-14 22:22:21 +0530767 status = "disabled";
768 };
769
770 ohci3: usb@5311400 {
771 compatible = "allwinner,sun50i-h6-ohci", "generic-ohci";
772 reg = <0x05311400 0x100>;
773 interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
774 clocks = <&ccu CLK_BUS_OHCI3>,
775 <&ccu CLK_USB_OHCI3>;
776 resets = <&ccu RST_BUS_OHCI3>;
777 phys = <&usb2phy 3>;
Jernej Skrabec463304d2021-01-06 18:02:56 +0100778 phy-names = "usb";
Jagan Teki7d412cd2019-04-14 22:22:21 +0530779 status = "disabled";
780 };
781
782 hdmi: hdmi@6000000 {
783 compatible = "allwinner,sun50i-h6-dw-hdmi";
784 reg = <0x06000000 0x10000>;
785 reg-io-width = <1>;
786 interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>;
787 clocks = <&ccu CLK_BUS_HDMI>, <&ccu CLK_HDMI_SLOW>,
788 <&ccu CLK_HDMI>, <&ccu CLK_HDMI_CEC>,
789 <&ccu CLK_HDCP>, <&ccu CLK_BUS_HDCP>;
790 clock-names = "iahb", "isfr", "tmds", "cec", "hdcp",
791 "hdcp-bus";
792 resets = <&ccu RST_BUS_HDMI_SUB>, <&ccu RST_BUS_HDCP>;
793 reset-names = "ctrl", "hdcp";
794 phys = <&hdmi_phy>;
Jernej Skrabec463304d2021-01-06 18:02:56 +0100795 phy-names = "phy";
Jagan Teki7d412cd2019-04-14 22:22:21 +0530796 pinctrl-names = "default";
797 pinctrl-0 = <&hdmi_pins>;
798 status = "disabled";
799
800 ports {
801 #address-cells = <1>;
802 #size-cells = <0>;
803
804 hdmi_in: port@0 {
805 reg = <0>;
806
807 hdmi_in_tcon_top: endpoint {
808 remote-endpoint = <&tcon_top_hdmi_out_hdmi>;
809 };
810 };
811
812 hdmi_out: port@1 {
813 reg = <1>;
814 };
815 };
816 };
817
818 hdmi_phy: hdmi-phy@6010000 {
819 compatible = "allwinner,sun50i-h6-hdmi-phy";
820 reg = <0x06010000 0x10000>;
821 clocks = <&ccu CLK_BUS_HDMI>, <&ccu CLK_HDMI_SLOW>;
822 clock-names = "bus", "mod";
823 resets = <&ccu RST_BUS_HDMI>;
824 reset-names = "phy";
825 #phy-cells = <0>;
826 };
827
828 tcon_top: tcon-top@6510000 {
829 compatible = "allwinner,sun50i-h6-tcon-top";
830 reg = <0x06510000 0x1000>;
831 clocks = <&ccu CLK_BUS_TCON_TOP>,
832 <&ccu CLK_TCON_TV0>;
833 clock-names = "bus",
834 "tcon-tv0";
835 clock-output-names = "tcon-top-tv0";
836 resets = <&ccu RST_BUS_TCON_TOP>;
Jagan Teki7d412cd2019-04-14 22:22:21 +0530837 #clock-cells = <1>;
838
839 ports {
840 #address-cells = <1>;
841 #size-cells = <0>;
842
843 tcon_top_mixer0_in: port@0 {
844 #address-cells = <1>;
845 #size-cells = <0>;
846 reg = <0>;
847
848 tcon_top_mixer0_in_mixer0: endpoint@0 {
849 reg = <0>;
850 remote-endpoint = <&mixer0_out_tcon_top_mixer0>;
851 };
852 };
853
854 tcon_top_mixer0_out: port@1 {
855 #address-cells = <1>;
856 #size-cells = <0>;
857 reg = <1>;
858
859 tcon_top_mixer0_out_tcon_tv: endpoint@2 {
860 reg = <2>;
861 remote-endpoint = <&tcon_tv_in_tcon_top_mixer0>;
862 };
863 };
864
865 tcon_top_hdmi_in: port@4 {
866 #address-cells = <1>;
867 #size-cells = <0>;
868 reg = <4>;
869
870 tcon_top_hdmi_in_tcon_tv: endpoint@0 {
871 reg = <0>;
872 remote-endpoint = <&tcon_tv_out_tcon_top>;
873 };
874 };
875
876 tcon_top_hdmi_out: port@5 {
877 reg = <5>;
878
879 tcon_top_hdmi_out_hdmi: endpoint {
880 remote-endpoint = <&hdmi_in_tcon_top>;
881 };
882 };
883 };
884 };
885
886 tcon_tv: lcd-controller@6515000 {
887 compatible = "allwinner,sun50i-h6-tcon-tv",
888 "allwinner,sun8i-r40-tcon-tv";
889 reg = <0x06515000 0x1000>;
890 interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>;
891 clocks = <&ccu CLK_BUS_TCON_TV0>,
892 <&tcon_top CLK_TCON_TOP_TV0>;
893 clock-names = "ahb",
894 "tcon-ch1";
895 resets = <&ccu RST_BUS_TCON_TV0>;
896 reset-names = "lcd";
897
898 ports {
899 #address-cells = <1>;
900 #size-cells = <0>;
901
902 tcon_tv_in: port@0 {
903 reg = <0>;
904
905 tcon_tv_in_tcon_top_mixer0: endpoint {
906 remote-endpoint = <&tcon_top_mixer0_out_tcon_tv>;
907 };
908 };
909
910 tcon_tv_out: port@1 {
911 #address-cells = <1>;
912 #size-cells = <0>;
913 reg = <1>;
914
915 tcon_tv_out_tcon_top: endpoint@1 {
916 reg = <1>;
917 remote-endpoint = <&tcon_top_hdmi_in_tcon_tv>;
918 };
919 };
920 };
Icenowy Zheng0c01b962018-07-21 16:20:31 +0800921 };
922
Jernej Skrabec463304d2021-01-06 18:02:56 +0100923 rtc: rtc@7000000 {
924 compatible = "allwinner,sun50i-h6-rtc";
925 reg = <0x07000000 0x400>;
926 interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>,
927 <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>;
928 clock-output-names = "osc32k", "osc32k-out", "iosc";
929 #clock-cells = <1>;
930 };
931
Icenowy Zheng0c01b962018-07-21 16:20:31 +0800932 r_ccu: clock@7010000 {
933 compatible = "allwinner,sun50i-h6-r-ccu";
934 reg = <0x07010000 0x400>;
Andre Przywara5eb4bbe2022-09-11 00:04:41 +0100935 clocks = <&osc24M>, <&rtc CLK_OSC32K>, <&rtc CLK_IOSC>,
Icenowy Zheng0c01b962018-07-21 16:20:31 +0800936 <&ccu CLK_PLL_PERIPH0>;
937 clock-names = "hosc", "losc", "iosc", "pll-periph";
938 #clock-cells = <1>;
939 #reset-cells = <1>;
940 };
941
Clément Péron725089c2019-08-25 18:04:18 +0200942 r_watchdog: watchdog@7020400 {
943 compatible = "allwinner,sun50i-h6-wdt",
944 "allwinner,sun6i-a31-wdt";
945 reg = <0x07020400 0x20>;
946 interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
Jernej Skrabec463304d2021-01-06 18:02:56 +0100947 clocks = <&osc24M>;
Clément Péron725089c2019-08-25 18:04:18 +0200948 };
949
Icenowy Zheng0c01b962018-07-21 16:20:31 +0800950 r_intc: interrupt-controller@7021000 {
951 compatible = "allwinner,sun50i-h6-r-intc",
952 "allwinner,sun6i-a31-r-intc";
953 interrupt-controller;
954 #interrupt-cells = <2>;
955 reg = <0x07021000 0x400>;
956 interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>;
957 };
958
959 r_pio: pinctrl@7022000 {
960 compatible = "allwinner,sun50i-h6-r-pinctrl";
961 reg = <0x07022000 0x400>;
962 interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>,
963 <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>;
Andre Przywara5eb4bbe2022-09-11 00:04:41 +0100964 clocks = <&r_ccu CLK_R_APB1>, <&osc24M>,
965 <&rtc CLK_OSC32K>;
Icenowy Zheng0c01b962018-07-21 16:20:31 +0800966 clock-names = "apb", "hosc", "losc";
967 gpio-controller;
968 #gpio-cells = <3>;
969 interrupt-controller;
970 #interrupt-cells = <3>;
971
Jagan Teki7d412cd2019-04-14 22:22:21 +0530972 r_i2c_pins: r-i2c-pins {
Icenowy Zheng0c01b962018-07-21 16:20:31 +0800973 pins = "PL0", "PL1";
974 function = "s_i2c";
975 };
Jernej Skrabec463304d2021-01-06 18:02:56 +0100976
977 r_ir_rx_pin: r-ir-rx-pin {
978 pins = "PL9";
979 function = "s_cir_rx";
980 };
Andre Przywara787f5a02021-05-25 01:20:25 +0100981
982 r_rsb_pins: r-rsb-pins {
983 pins = "PL0", "PL1";
984 function = "s_rsb";
985 };
Icenowy Zheng0c01b962018-07-21 16:20:31 +0800986 };
987
Jernej Skrabec463304d2021-01-06 18:02:56 +0100988 r_ir: ir@7040000 {
989 compatible = "allwinner,sun50i-h6-ir",
990 "allwinner,sun6i-a31-ir";
991 reg = <0x07040000 0x400>;
992 interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
993 clocks = <&r_ccu CLK_R_APB1_IR>,
994 <&r_ccu CLK_IR>;
995 clock-names = "apb", "ir";
996 resets = <&r_ccu RST_R_APB1_IR>;
997 pinctrl-names = "default";
998 pinctrl-0 = <&r_ir_rx_pin>;
999 status = "disabled";
1000 };
1001
Icenowy Zheng0c01b962018-07-21 16:20:31 +08001002 r_i2c: i2c@7081400 {
Jernej Skrabec463304d2021-01-06 18:02:56 +01001003 compatible = "allwinner,sun50i-h6-i2c",
1004 "allwinner,sun6i-a31-i2c";
Icenowy Zheng0c01b962018-07-21 16:20:31 +08001005 reg = <0x07081400 0x400>;
1006 interrupts = <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
1007 clocks = <&r_ccu CLK_R_APB2_I2C>;
1008 resets = <&r_ccu RST_R_APB2_I2C>;
1009 pinctrl-names = "default";
1010 pinctrl-0 = <&r_i2c_pins>;
1011 status = "disabled";
1012 #address-cells = <1>;
1013 #size-cells = <0>;
1014 };
Jernej Skrabec463304d2021-01-06 18:02:56 +01001015
Andre Przywara787f5a02021-05-25 01:20:25 +01001016 r_rsb: rsb@7083000 {
1017 compatible = "allwinner,sun8i-a23-rsb";
1018 reg = <0x07083000 0x400>;
1019 interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
1020 clocks = <&r_ccu CLK_R_APB2_RSB>;
1021 clock-frequency = <3000000>;
1022 resets = <&r_ccu RST_R_APB2_RSB>;
1023 pinctrl-names = "default";
1024 pinctrl-0 = <&r_rsb_pins>;
1025 status = "disabled";
1026 #address-cells = <1>;
1027 #size-cells = <0>;
1028 };
1029
Jernej Skrabec463304d2021-01-06 18:02:56 +01001030 ths: thermal-sensor@5070400 {
1031 compatible = "allwinner,sun50i-h6-ths";
1032 reg = <0x05070400 0x100>;
1033 interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
1034 clocks = <&ccu CLK_BUS_THS>;
1035 clock-names = "bus";
1036 resets = <&ccu RST_BUS_THS>;
1037 nvmem-cells = <&ths_calibration>;
1038 nvmem-cell-names = "calibration";
1039 #thermal-sensor-cells = <1>;
1040 };
1041 };
1042
1043 thermal-zones {
1044 cpu-thermal {
1045 polling-delay-passive = <0>;
1046 polling-delay = <0>;
1047 thermal-sensors = <&ths 0>;
1048
1049 trips {
1050 cpu_alert: cpu-alert {
1051 temperature = <85000>;
1052 hysteresis = <2000>;
1053 type = "passive";
1054 };
1055
1056 cpu-crit {
1057 temperature = <100000>;
1058 hysteresis = <0>;
1059 type = "critical";
1060 };
1061 };
1062
1063 cooling-maps {
1064 map0 {
1065 trip = <&cpu_alert>;
1066 cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
1067 <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
1068 <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
1069 <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
1070 };
1071 };
1072 };
1073
1074 gpu-thermal {
Andre Przywaraed2724b2023-01-12 11:22:20 +00001075 polling-delay-passive = <1000>;
1076 polling-delay = <2000>;
Jernej Skrabec463304d2021-01-06 18:02:56 +01001077 thermal-sensors = <&ths 1>;
Andre Przywaraed2724b2023-01-12 11:22:20 +00001078
1079 trips {
1080 gpu_alert0: gpu-alert-0 {
1081 temperature = <95000>;
1082 hysteresis = <2000>;
1083 type = "passive";
1084 };
1085
1086 gpu_alert1: gpu-alert-1 {
1087 temperature = <100000>;
1088 hysteresis = <2000>;
1089 type = "passive";
1090 };
1091
1092 gpu_alert2: gpu-alert-2 {
1093 temperature = <105000>;
1094 hysteresis = <2000>;
1095 type = "passive";
1096 };
1097
1098 gpu-crit {
1099 temperature = <115000>;
1100 hysteresis = <0>;
1101 type = "critical";
1102 };
1103 };
1104
1105 cooling-maps {
1106 // Forbid the GPU to go over 756MHz
1107 map0 {
1108 trip = <&gpu_alert0>;
1109 cooling-device = <&gpu 1 THERMAL_NO_LIMIT>;
1110 };
1111
1112 // Forbid the GPU to go over 624MHz
1113 map1 {
1114 trip = <&gpu_alert1>;
1115 cooling-device = <&gpu 2 THERMAL_NO_LIMIT>;
1116 };
1117
1118 // Forbid the GPU to go over 576MHz
1119 map2 {
1120 trip = <&gpu_alert2>;
1121 cooling-device = <&gpu 3 THERMAL_NO_LIMIT>;
1122 };
1123 };
Jernej Skrabec463304d2021-01-06 18:02:56 +01001124 };
Icenowy Zheng0c01b962018-07-21 16:20:31 +08001125 };
1126};