[ sunxi-dev ] patch cleanup/fixes for H6 and 5.8

This commit is contained in:
5kft 2020-08-29 07:42:55 -07:00
parent 36405e3397
commit 8b8300a512
No known key found for this signature in database
GPG key ID: 1FA43AEDB0493C92
2 changed files with 87 additions and 137 deletions

View file

@ -1,43 +0,0 @@
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
index f55879b..b79fd50 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
@@ -194,6 +351,7 @@
clocks = <&ccu CLK_GPU>, <&ccu CLK_BUS_GPU>;
clock-names = "core", "bus";
resets = <&ccu RST_BUS_GPU>;
+ operating-points-v2 = <&gpu_opp_table>;
status = "disabled";
};
@@ -1024,6 +1182,30 @@
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-sensors = <&ths 0>;
+
+ trips {
+ cpu_hot_trip: cpu-hot {
+ temperature = <80000>;
+ 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 {

View file

@ -1,20 +1,26 @@
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-cpu-opp.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6-cpu-opp.dtsi diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
index bef3f50b1..90e4d1764 100644 index 5840db1ef..b3717ebb7 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-cpu-opp.dtsi --- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-cpu-opp.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
@@ -1,6 +1,7 @@ @@ -1,5 +1,6 @@
// SPDX-License-Identifier: (GPL-2.0+ OR MIT) // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
// Copyright (C) 2020 Ondrej Jirman <megous@megous.com> // Copyright (C) 2017 Icenowy Zheng <icenowy@aosc.io>
// Copyright (C) 2020 Clément Péron <peron.clem@gmail.com>
+// Copyright (C) 2020 Igor Pecovnik <igor@armbian.com> +// Copyright (C) 2020 Igor Pecovnik <igor@armbian.com>
/ { #include <dt-bindings/interrupt-controller/arm-gic.h>
cpu_opp_table: cpu-opp-table { #include <dt-bindings/clock/sun50i-h6-ccu.h>
@@ -122,26 +123,67 @@ @@ -1151,33 +1152,74 @@ ths: thermal-sensor@5070400 {
thermal-zones {
cpu-thermal {
- polling-delay-passive = <0>;
- polling-delay = <0>;
+ polling-delay-passive = <250>;
+ polling-delay = <1000>;
thermal-sensors = <&ths 0>;
&cpu_thermal {
trips { trips {
- cpu_hot_trip: cpu-hot { - cpu_alert: cpu-alert {
+ cpu_warm: cpu_warm { + cpu_warm: cpu_warm {
+ temperature = <75000>; + temperature = <75000>;
+ hysteresis = <2000>; + hysteresis = <2000>;
@ -22,26 +28,26 @@ index bef3f50b1..90e4d1764 100644
+ }; + };
+ +
+ cpu_hot_pre: cpu_hot_pre { + cpu_hot_pre: cpu_hot_pre {
temperature = <80000>; + temperature = <80000>;
hysteresis = <2000>;
type = "passive";
};
+
+ cpu_hot: cpu_hot {
+ temperature = <85000>;
+ hysteresis = <2000>; + hysteresis = <2000>;
+ type = "passive"; + 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 { + cpu_very_hot_pre: cpu_very_hot_pre {
+ temperature = <90000>; + temperature = <90000>;
+ hysteresis = <2000>; + hysteresis = <2000>;
+ type = "passive"; + type = "passive";
+ }; + };
+
- cpu_very_hot_trip: cpu-very-hot {
- temperature = <100000>;
- hysteresis = <0>;
+ cpu_very_hot: cpu_very_hot { + cpu_very_hot: cpu_very_hot {
+ temperature = <95000>; + temperature = <95000>;
+ hysteresis = <2000>; + hysteresis = <2000>;
@ -56,8 +62,8 @@ index bef3f50b1..90e4d1764 100644
}; };
cooling-maps { cooling-maps {
- cpu-hot-limit { - map0 {
- trip = <&cpu_hot_trip>; - trip = <&cpu_alert>;
- cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, - cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
- <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, - <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
- <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, - <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
@ -65,7 +71,8 @@ index bef3f50b1..90e4d1764 100644
+ cpu_warm_limit_cpu { + cpu_warm_limit_cpu {
+ trip = <&cpu_warm>; + trip = <&cpu_warm>;
+ cooling-device = <&cpu0 THERMAL_NO_LIMIT 2>; + cooling-device = <&cpu0 THERMAL_NO_LIMIT 2>;
+ }; };
- };
+ +
+ cpu_hot_pre_limit_cpu { + cpu_hot_pre_limit_cpu {
+ trip = <&cpu_hot_pre>; + trip = <&cpu_hot_pre>;
@ -85,22 +92,8 @@ index bef3f50b1..90e4d1764 100644
+ cpu_very_hot_limit_cpu { + cpu_very_hot_limit_cpu {
+ trip = <&cpu_very_hot>; + trip = <&cpu_very_hot>;
+ cooling-device = <&cpu0 7 THERMAL_NO_LIMIT>; + 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
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
@@ -1147,8 +1147,9 @@
thermal-zones {
cpu_thermal: cpu-thermal {
- polling-delay-passive = <0>;
- polling-delay = <0>;
+ /* milliseconds */
+ polling-delay-passive = <250>;
+ polling-delay = <1000>;
thermal-sensors = <&ths 0>;
}; };
gpu-thermal {