forked from armbian/build
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test updated H6 thermal zone patch for dev kernel 5.8
- Loading branch information
Showing
1 changed file
with
78 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,106 +1,89 @@ | ||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-cpu-opp.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6-cpu-opp.dtsi | ||
index bef3f50b1..90e4d1764 100644 | ||
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-cpu-opp.dtsi | ||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-cpu-opp.dtsi | ||
@@ -1,6 +1,7 @@ | ||
// SPDX-License-Identifier: (GPL-2.0+ OR MIT) | ||
// Copyright (C) 2020 Ondrej Jirman <megous@megous.com> | ||
// Copyright (C) 2020 Clément Péron <peron.clem@gmail.com> | ||
+// Copyright (C) 2020 Igor Pecovnik <igor@armbian.com> | ||
|
||
/ { | ||
cpu_opp_table: cpu-opp-table { | ||
@@ -122,26 +123,67 @@ | ||
|
||
&cpu_thermal { | ||
trips { | ||
- cpu_hot_trip: cpu-hot { | ||
+ cpu_warm: cpu_warm { | ||
+ temperature = <75000>; | ||
+ hysteresis = <2000>; | ||
+ type = "passive"; | ||
+ }; | ||
+ | ||
+ cpu_hot_pre: cpu_hot_pre { | ||
temperature = <80000>; | ||
hysteresis = <2000>; | ||
type = "passive"; | ||
}; | ||
+ | ||
+ cpu_hot: cpu_hot { | ||
+ temperature = <85000>; | ||
+ hysteresis = <2000>; | ||
+ type = "passive"; | ||
+ }; | ||
+ | ||
+ cpu_very_hot_pre: cpu_very_hot_pre { | ||
+ temperature = <90000>; | ||
+ hysteresis = <2000>; | ||
+ type = "passive"; | ||
+ }; | ||
|
||
- cpu_very_hot_trip: cpu-very-hot { | ||
- temperature = <100000>; | ||
- hysteresis = <0>; | ||
+ cpu_very_hot: cpu_very_hot { | ||
+ temperature = <95000>; | ||
+ hysteresis = <2000>; | ||
+ type = "passive"; | ||
+ }; | ||
+ | ||
+ cpu_crit: cpu_crit { | ||
+ temperature = <105000>; | ||
+ hysteresis = <2000>; | ||
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>; | ||
+ cpu_warm_limit_cpu { | ||
+ trip = <&cpu_warm>; | ||
+ cooling-device = <&cpu0 THERMAL_NO_LIMIT 2>; | ||
+ }; | ||
+ | ||
+ cpu_hot_pre_limit_cpu { | ||
+ trip = <&cpu_hot_pre>; | ||
+ cooling-device = <&cpu0 2 3>; | ||
+ }; | ||
+ | ||
+ cpu_hot_limit_cpu { | ||
+ trip = <&cpu_hot>; | ||
+ cooling-device = <&cpu0 3 4>; | ||
+ }; | ||
+ | ||
+ cpu_very_hot_pre_limit_cpu { | ||
+ trip = <&cpu_very_hot_pre>; | ||
+ cooling-device = <&cpu0 5 6>; | ||
+ }; | ||
+ | ||
+ cpu_very_hot_limit_cpu { | ||
+ trip = <&cpu_very_hot>; | ||
+ cooling-device = <&cpu0 7 THERMAL_NO_LIMIT>; | ||
}; | ||
}; | ||
}; | ||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | ||
index 82cc1e5fe..00ebb89fc 100644 | ||
index ca9f3334f..82970991c 100644 | ||
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | ||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | ||
@@ -1147,8 +1147,9 @@ | ||
@@ -1039,31 +1039,72 @@ | ||
|
||
thermal-zones { | ||
cpu_thermal: cpu-thermal { | ||
cpu-thermal { | ||
- polling-delay-passive = <0>; | ||
- polling-delay = <0>; | ||
+ /* milliseconds */ | ||
+ polling-delay-passive = <250>; | ||
+ polling-delay = <1000>; | ||
thermal-sensors = <&ths 0>; | ||
}; | ||
|
||
trips { | ||
- cpu_alert: cpu-alert { | ||
+ cpu_warm: cpu_warm { | ||
+ temperature = <75000>; | ||
+ hysteresis = <2000>; | ||
+ type = "passive"; | ||
+ }; | ||
+ | ||
+ cpu_hot_pre: cpu_hot_pre { | ||
+ temperature = <80000>; | ||
+ hysteresis = <2000>; | ||
+ type = "passive"; | ||
+ }; | ||
+ | ||
+ cpu_hot: cpu_hot { | ||
temperature = <85000>; | ||
hysteresis = <2000>; | ||
type = "passive"; | ||
}; | ||
|
||
- cpu-crit { | ||
- temperature = <100000>; | ||
- hysteresis = <0>; | ||
+ cpu_very_hot_pre: cpu_very_hot_pre { | ||
+ temperature = <90000>; | ||
+ hysteresis = <2000>; | ||
+ type = "passive"; | ||
+ }; | ||
+ | ||
+ cpu_very_hot: cpu_very_hot { | ||
+ temperature = <95000>; | ||
+ hysteresis = <2000>; | ||
+ type = "passive"; | ||
+ }; | ||
+ | ||
+ cpu_crit: cpu_crit { | ||
+ temperature = <105000>; | ||
+ hysteresis = <2000>; | ||
type = "critical"; | ||
}; | ||
}; | ||
|
||
cooling-maps { | ||
- map0 { | ||
- trip = <&cpu_alert>; | ||
- 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>; | ||
+ cpu_warm_limit_cpu { | ||
+ trip = <&cpu_warm>; | ||
+ cooling-device = <&cpu0 THERMAL_NO_LIMIT 2>; | ||
+ }; | ||
+ | ||
+ cpu_hot_pre_limit_cpu { | ||
+ trip = <&cpu_hot_pre>; | ||
+ cooling-device = <&cpu0 2 3>; | ||
+ }; | ||
+ | ||
+ cpu_hot_limit_cpu { | ||
+ trip = <&cpu_hot>; | ||
+ cooling-device = <&cpu0 3 4>; | ||
+ }; | ||
+ | ||
+ cpu_very_hot_pre_limit_cpu { | ||
+ trip = <&cpu_very_hot_pre>; | ||
+ cooling-device = <&cpu0 5 6>; | ||
+ }; | ||
+ | ||
+ cpu_very_hot_limit_cpu { | ||
+ trip = <&cpu_very_hot>; | ||
+ cooling-device = <&cpu0 7 THERMAL_NO_LIMIT>; | ||
}; | ||
}; | ||
}; |