hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/arch/arm/boot/dts/sun8i-h3.dtsi
....@@ -41,9 +41,10 @@
4141 */
4242
4343 #include "sunxi-h3-h5.dtsi"
44
+#include <dt-bindings/thermal/thermal.h>
4445
4546 / {
46
- cpu0_opp_table: opp_table0 {
47
+ cpu0_opp_table: opp-table-cpu {
4748 compatible = "operating-points-v2";
4849 opp-shared;
4950
....@@ -111,6 +112,26 @@
111112 };
112113 };
113114
115
+ gpu_opp_table: opp-table-gpu {
116
+ compatible = "operating-points-v2";
117
+
118
+ opp-120000000 {
119
+ opp-hz = /bits/ 64 <120000000>;
120
+ };
121
+
122
+ opp-312000000 {
123
+ opp-hz = /bits/ 64 <312000000>;
124
+ };
125
+
126
+ opp-432000000 {
127
+ opp-hz = /bits/ 64 <432000000>;
128
+ };
129
+
130
+ opp-576000000 {
131
+ opp-hz = /bits/ 64 <576000000>;
132
+ };
133
+ };
134
+
114135 pmu {
115136 compatible = "arm,cortex-a7-pmu";
116137 interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>,
....@@ -129,7 +150,20 @@
129150 };
130151
131152 soc {
132
- system-control@1c00000 {
153
+ deinterlace: deinterlace@1400000 {
154
+ compatible = "allwinner,sun8i-h3-deinterlace";
155
+ reg = <0x01400000 0x20000>;
156
+ clocks = <&ccu CLK_BUS_DEINTERLACE>,
157
+ <&ccu CLK_DEINTERLACE>,
158
+ <&ccu CLK_DRAM_DEINTERLACE>;
159
+ clock-names = "bus", "mod", "ram";
160
+ resets = <&ccu RST_BUS_DEINTERLACE>;
161
+ interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>;
162
+ interconnects = <&mbus 9>;
163
+ interconnect-names = "dma-mem";
164
+ };
165
+
166
+ syscon: system-control@1c00000 {
133167 compatible = "allwinner,sun8i-h3-system-control";
134168 reg = <0x01c00000 0x1000>;
135169 #address-cells = <1>;
....@@ -149,6 +183,26 @@
149183 reg = <0x000000 0x80000>;
150184 };
151185 };
186
+ };
187
+
188
+ video-codec@1c0e000 {
189
+ compatible = "allwinner,sun8i-h3-video-engine";
190
+ reg = <0x01c0e000 0x1000>;
191
+ clocks = <&ccu CLK_BUS_VE>, <&ccu CLK_VE>,
192
+ <&ccu CLK_DRAM_VE>;
193
+ clock-names = "ahb", "mod", "ram";
194
+ resets = <&ccu RST_BUS_VE>;
195
+ interrupts = <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>;
196
+ allwinner,sram = <&ve_sram 1>;
197
+ };
198
+
199
+ crypto: crypto@1c15000 {
200
+ compatible = "allwinner,sun8i-h3-crypto";
201
+ reg = <0x01c15000 0x1000>;
202
+ interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
203
+ clocks = <&ccu CLK_BUS_CE>, <&ccu CLK_CE>;
204
+ clock-names = "bus", "mod";
205
+ resets = <&ccu RST_BUS_CE>;
152206 };
153207
154208 mali: gpu@1c40000 {
....@@ -171,9 +225,51 @@
171225 clocks = <&ccu CLK_BUS_GPU>, <&ccu CLK_GPU>;
172226 clock-names = "bus", "core";
173227 resets = <&ccu RST_BUS_GPU>;
228
+ operating-points-v2 = <&gpu_opp_table>;
229
+ };
174230
175
- assigned-clocks = <&ccu CLK_GPU>;
176
- assigned-clock-rates = <384000000>;
231
+ ths: thermal-sensor@1c25000 {
232
+ compatible = "allwinner,sun8i-h3-ths";
233
+ reg = <0x01c25000 0x400>;
234
+ interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
235
+ resets = <&ccu RST_BUS_THS>;
236
+ clocks = <&ccu CLK_BUS_THS>, <&ccu CLK_THS>;
237
+ clock-names = "bus", "mod";
238
+ nvmem-cells = <&ths_calibration>;
239
+ nvmem-cell-names = "calibration";
240
+ #thermal-sensor-cells = <0>;
241
+ };
242
+ };
243
+
244
+ thermal-zones {
245
+ cpu_thermal: cpu-thermal {
246
+ polling-delay-passive = <0>;
247
+ polling-delay = <0>;
248
+ thermal-sensors = <&ths 0>;
249
+
250
+ trips {
251
+ cpu_hot_trip: cpu-hot {
252
+ temperature = <80000>;
253
+ hysteresis = <2000>;
254
+ type = "passive";
255
+ };
256
+
257
+ cpu_very_hot_trip: cpu-very-hot {
258
+ temperature = <100000>;
259
+ hysteresis = <0>;
260
+ type = "critical";
261
+ };
262
+ };
263
+
264
+ cooling-maps {
265
+ cpu-hot-limit {
266
+ trip = <&cpu_hot_trip>;
267
+ cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
268
+ <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
269
+ <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
270
+ <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
271
+ };
272
+ };
177273 };
178274 };
179275 };
....@@ -225,3 +321,11 @@
225321 &pio {
226322 compatible = "allwinner,sun8i-h3-pinctrl";
227323 };
324
+
325
+&rtc {
326
+ compatible = "allwinner,sun8i-h3-rtc";
327
+};
328
+
329
+&sid {
330
+ compatible = "allwinner,sun8i-h3-sid";
331
+};