From: Ondrej Jirman <[email protected]>

This enables passive cooling by down-regulating CPU voltage
and frequency.

Signed-off-by: Ondrej Jirman <[email protected]>
Signed-off-by: Clément Péron <[email protected]>
---
 arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 24 ++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi 
b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
index aef4ae760d5e..e0dd0757be0b 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
@@ -908,6 +908,30 @@
                        polling-delay-passive = <0>;
                        polling-delay = <0>;
                        thermal-sensors = <&ths 0>;
+
+                       trips {
+                               cpu_hot_trip: cpu-hot {
+                                       temperature = <85000>;
+                                       hysteresis = <2000>;
+                                       type = "passive";
+                               };
+
+                               cpu_very_hot_trip: cpu-very-hot {
+                                       temperature = <100000>;
+                                       hysteresis = <0>;
+                                       type = "critical";
+                               };
+                       };
+
+                       cooling-maps {
+                               cpu-hot-limit {
+                                       trip = <&cpu_hot_trip>;
+                                       cooling-device = <&cpu0 
THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                                        <&cpu1 
THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                                        <&cpu2 
THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                                        <&cpu3 
THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+                               };
+                       };
                };
 
                gpu-thermal {
-- 
2.20.1

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/linux-sunxi/20200405173601.24331-3-peron.clem%40gmail.com.

Reply via email to