[ sunxi next ] Fixed thermal throtling for H5 devices and removed (deprecated) individual CPU speed settings from board config. Tested on H3 and H5 devices - it seems to work correctly now. https://forum.armbian.com/topic/2869-armbian-for-orangepi-pc2-allwinner-h5/?do=findComment&comment=76886

This commit is contained in:
Igor Pecovnik 2019-04-12 11:56:06 +02:00
parent f7702081dc
commit 8f4ab52b6e
16 changed files with 31 additions and 66 deletions

View File

@ -5,8 +5,6 @@ BOOTCONFIG="Sinovoip_BPI_M2_Plus_defconfig"
#
MODULES="#w1-sunxi #w1-gpio #w1-therm #sunxi-cir dhd hci_uart rfcomm hidp"
MODULES_NEXT="brcmfmac g_serial"
CPUMIN="240000"
CPUMAX="1200000"
#
KERNEL_TARGET="default,next,dev"
CLI_TARGET="stretch,bionic:next"

View File

@ -5,8 +5,6 @@ BOOTCONFIG="beelink_x2_defconfig"
#
MODULES="sndspdif sunxi_sndspdif sunxi_spdif sunxi_spdma sunxi-cir"
MODULES_NEXT=""
CPUMIN="240000"
CPUMAX="1200000"
#
KERNEL_TARGET="default,next,dev"
CLI_TARGET="stretch,bionic:next"

View File

@ -7,8 +7,6 @@ MODULES="#w1-sunxi #w1-gpio #w1-therm #sunxi-cir hci_uart rfcomm hidp dhd g_seri
MODULES_NEXT="brcmfmac g_serial"
DEFAULT_OVERLAYS="usbhost1 usbhost2"
DEFAULT_CONSOLE="serial"
CPUMIN="240000"
CPUMAX="912000"
#
BUILD_DESKTOP="no"
#

View File

@ -7,8 +7,6 @@ MODULES_NEXT="g_serial"
MODULES_BLACKLIST="dhd"
DEFAULT_OVERLAYS="usbhost2 usbhost3"
DEFAULT_CONSOLE="serial"
CPUMIN=240000
CPUMAX=1200000
BUILD_DESKTOP="no"
#
KERNEL_TARGET="default,next,dev"

View File

@ -5,8 +5,6 @@ BOOTCONFIG="nanopi_m1_defconfig"
#
MODULES="#w1-sunxi #w1-gpio #w1-therm #sunxi-cir"
MODULES_NEXT=""
CPUMIN="240000"
CPUMAX="1200000"
#
KERNEL_TARGET="default,next,dev"
CLI_TARGET="stretch,bionic:next"

View File

@ -5,8 +5,6 @@ BOOTCONFIG="nanopi_m1_plus_defconfig"
#
MODULES="#w1-sunxi #w1-gpio #w1-therm #sunxi-cir hci_uart rfcomm hidp dhd"
MODULES_NEXT="brcmfmac"
CPUMIN="240000"
CPUMAX="1200000"
#
KERNEL_TARGET="default,next,dev"
CLI_TARGET="stretch,bionic:next"

View File

@ -7,8 +7,6 @@ MODULES="#w1-sunxi #w1-gpio #w1-therm #sunxi-cir g_serial"
MODULES_NEXT="g_serial"
DEFAULT_OVERLAYS="usbhost1 usbhost2"
DEFAULT_CONSOLE="serial"
CPUMIN="240000"
CPUMAX="912000"
#
BUILD_DESKTOP="no"
#

View File

@ -7,8 +7,6 @@ MODULES="#w1-sunxi #w1-gpio #w1-therm #sunxi-cir g_serial r8152 8189es"
MODULES_NEXT="g_serial r8152 8189es"
MODULES_BLACKLIST="dhd"
DEFAULT_OVERLAYS="usbhost2 usbhost3"
CPUMIN=240000
CPUMAX=1200000
BUILD_DESKTOP="no"
#
KERNEL_TARGET="default,next,dev"

View File

@ -8,8 +8,6 @@ MODULES_NEXT="g_serial"
MODULES_BLACKLIST="dhd"
DEFAULT_OVERLAYS="usbhost2 usbhost3"
DEFAULT_CONSOLE="serial"
CPUMIN=240000
CPUMAX=1200000
BUILD_DESKTOP="no"
#
KERNEL_TARGET="default,next,dev"

View File

@ -6,8 +6,6 @@ MODULES=""
MODULES_NEXT="8189fs g_serial"
DEFAULT_CONSOLE="serial"
DEFAULT_OVERLAYS="usbhost2 usbhost3"
CPUMIN="120000"
CPUMAX="1200000"
#
BUILD_DESKTOP="no"
#

View File

@ -7,8 +7,6 @@ MODULES="#w1-sunxi #w1-gpio #w1-therm #sunxi-cir hci_uart rfcomm hidp dhd g_seri
MODULES_NEXT="brcmfmac g_serial"
MODULES_BLACKLIST=""
DEFAULT_OVERLAYS="usbhost2 usbhost3"
CPUMIN=240000
CPUMAX=1200000
#
KERNEL_TARGET="default,next,dev"
CLI_TARGET="stretch,bionic:next"

View File

@ -7,8 +7,6 @@ MODULES="#w1-sunxi #w1-gpio #w1-therm #sunxi-cir hci_uart rfcomm hidp dhd g_seri
MODULES_NEXT="brcmfmac g_serial"
MODULES_BLACKLIST=""
DEFAULT_OVERLAYS="usbhost2 usbhost3"
CPUMIN=240000
CPUMAX=1200000
BUILD_DESKTOP="no"
#
KERNEL_TARGET="next,dev"

View File

@ -7,8 +7,6 @@ MODULES="xradio_wlan xradio_wlan"
MODULES_NEXT=""
MODULES_BLACKLIST="dhd"
DEFAULT_OVERLAYS="cir analog-codec"
CPUMIN=240000
CPUMAX=1008000
#
KERNEL_TARGET="default,next,dev"
CLI_TARGET="stretch,xenial:next"

View File

@ -6,8 +6,6 @@ BOOTCONFIG="libretech_all_h3_cc_h3_defconfig"
MODULES="#w1-sunxi #w1-gpio #w1-therm #sunxi-cir hci_uart rfcomm hidp dhd g_serial"
MODULES_NEXT="g_serial"
DEFAULT_OVERLAYS="usbhost1 usbhost2 analog-codec"
CPUMIN="240000"
CPUMAX="1008000"
#
KERNEL_TARGET="next,dev"
CLI_TARGET="stretch,bionic:next"

View File

@ -6,8 +6,6 @@ BOOTCONFIG="libretech_all_h3_cc_h5_defconfig"
MODULES="#w1-sunxi #w1-gpio #w1-therm #sunxi-cir hci_uart rfcomm hidp dhd"
MODULES_NEXT=""
DEFAULT_OVERLAYS="analog-codec"
CPUMIN="240000"
CPUMAX="1200000"
#
KERNEL_TARGET="next,dev"
CLI_TARGET="stretch,bionic:next"

View File

@ -1,32 +1,29 @@
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi
index 55b95569..422589b3 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi
@@ -41,6 +41,7 @@
*/
#include <arm/sunxi-h3-h5.dtsi>
+#include <dt-bindings/thermal/thermal.h>
/ {
cpus {
@@ -98,6 +99,80 @@
method = "smc";
diff --git a/arch/arm/boot/dts/sunxi-h3-h5.dtsi b/arch/arm/boot/dts/sunxi-h3-h5.dtsi
index d1890797c..6cb02c962 100644
--- a/arch/arm/boot/dts/sunxi-h3-h5.dtsi
+++ b/arch/arm/boot/dts/sunxi-h3-h5.dtsi
@@ -1045,28 +1045,74 @@
};
+ thermal-zones {
thermal-zones {
- cpu_thermal: cpu_thermal {
- polling-delay-passive = <330>;
+ cpu-thermal {
+ /* milliseconds */
+ polling-delay-passive = <250>;
+ polling-delay = <1000>;
polling-delay = <1000>;
- thermal-sensors = <&ths 0>;
+ thermal-sensors = <&ths>;
+
+ trips {
trips {
- cpu_hot_trip: cpu-warm {
- temperature = <65000>;
+ cpu_warm: cpu_warm {
+ temperature = <75000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
hysteresis = <2000>;
type = "passive";
};
- cpu_very_hot_trip: cpu-very-hot {
+
+ cpu_hot_pre: cpu_hot_pre {
+ temperature = <80000>;
@ -41,8 +38,8 @@ index 55b95569..422589b3 100644
+ };
+
+ cpu_very_hot_pre: cpu_very_hot_pre {
+ temperature = <90000>;
+ hysteresis = <2000>;
temperature = <90000>;
hysteresis = <2000>;
+ type = "passive";
+ };
+
@ -55,11 +52,14 @@ index 55b95569..422589b3 100644
+ cpu_crit: cpu_crit {
+ temperature = <105000>;
+ hysteresis = <2000>;
+ type = "critical";
+ };
+ };
+
+ cooling-maps {
type = "critical";
};
};
cooling-maps {
- cpu-warm-limit {
- trip = <&cpu_hot_trip>;
- cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+ cpu_warm_limit_cpu {
+ trip = <&cpu_warm>;
+ cooling-device = <&cpu0 THERMAL_NO_LIMIT 2>;
@ -83,11 +83,6 @@ index 55b95569..422589b3 100644
+ cpu_very_hot_limit_cpu {
+ trip = <&cpu_very_hot>;
+ cooling-device = <&cpu0 7 THERMAL_NO_LIMIT>;
+ };
+ };
+ };
+ };
+
timer {
compatible = "arm,armv8-timer";
interrupts = <GIC_PPI 13
};
};
};