From db5edf58d544070722a19463843e0fb675cbf2b6 Mon Sep 17 00:00:00 2001 From: 5kft <5kft@users.noreply.github.com> Date: Sat, 12 Sep 2020 07:56:14 -0700 Subject: [PATCH] [ sunxi-dev ] patch cleanup --- ...-dts-sun8i-h3-add-thermal-zone-to-H3.patch | 36 ---- ...s-allwinner-h5-add-termal-zone-to-H5.patch | 43 ---- .../sun50i-h5-add-thermal-zones.patch | 90 ++++++++ .../sun8i-h3-add-thermal-zones.patch | 93 ++++++++ .../update-correct-h3-h5-thermal-zones.patch | 199 ------------------ 5 files changed, 183 insertions(+), 278 deletions(-) delete mode 100644 patch/kernel/sunxi-dev/0021-arm-dts-sun8i-h3-add-thermal-zone-to-H3.patch delete mode 100644 patch/kernel/sunxi-dev/0031-arm64-dts-allwinner-h5-add-termal-zone-to-H5.patch create mode 100644 patch/kernel/sunxi-dev/sun50i-h5-add-thermal-zones.patch create mode 100644 patch/kernel/sunxi-dev/sun8i-h3-add-thermal-zones.patch delete mode 100644 patch/kernel/sunxi-dev/update-correct-h3-h5-thermal-zones.patch diff --git a/patch/kernel/sunxi-dev/0021-arm-dts-sun8i-h3-add-thermal-zone-to-H3.patch b/patch/kernel/sunxi-dev/0021-arm-dts-sun8i-h3-add-thermal-zone-to-H3.patch deleted file mode 100644 index fb9e8788fd..0000000000 --- a/patch/kernel/sunxi-dev/0021-arm-dts-sun8i-h3-add-thermal-zone-to-H3.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 16346f511d19e20e12041076f402606b87de0b56 Mon Sep 17 00:00:00 2001 -From: Philipp Rossak -Date: Fri, 26 Jan 2018 01:10:12 +0100 -Subject: [PATCH 021/146] arm: dts: sun8i: h3: add thermal zone to H3 - -This patch adds the thermal zones to the H3. We have only one sensor and -that is placed in the cpu. - -Signed-off-by: Philipp Rossak ---- - arch/arm/boot/dts/sun8i-h3.dtsi | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/arch/arm/boot/dts/sun8i-h3.dtsi b/arch/arm/boot/dts/sun8i-h3.dtsi -index 5907b54b6e1d..d2c85be8a2d0 100644 ---- a/arch/arm/boot/dts/sun8i-h3.dtsi -+++ b/arch/arm/boot/dts/sun8i-h3.dtsi -@@ -111,6 +111,15 @@ - }; - }; - -+ thermal-zones { -+ cpu-thermal { -+ /* milliseconds */ -+ polling-delay-passive = <250>; -+ polling-delay = <1000>; -+ thermal-sensors = <&ths 0>; -+ }; -+ }; -+ - timer { - compatible = "arm,armv7-timer"; - interrupts = , --- -2.17.1 - diff --git a/patch/kernel/sunxi-dev/0031-arm64-dts-allwinner-h5-add-termal-zone-to-H5.patch b/patch/kernel/sunxi-dev/0031-arm64-dts-allwinner-h5-add-termal-zone-to-H5.patch deleted file mode 100644 index 251937875c..0000000000 --- a/patch/kernel/sunxi-dev/0031-arm64-dts-allwinner-h5-add-termal-zone-to-H5.patch +++ /dev/null @@ -1,43 +0,0 @@ -From b3ec6c1e145347ad88b14fcab39080c5af9410ef Mon Sep 17 00:00:00 2001 -From: Philipp Rossak -Date: Fri, 26 Jan 2018 01:42:16 +0100 -Subject: [PATCH 031/146] arm64: dts: allwinner: h5: add termal zone to H5 - -This patch adds the termal zones to the H5. Sensor 0 is located in the -cpu. Sensor 1 is located in the gpu. - -Signed-off-by: Philipp Rossak ---- - arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi | 16 ++++++++++++++++ - 1 file changed, 16 insertions(+) - -diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi -index ee12490203b8..849c3d8a50bb 100644 ---- a/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi -+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi -@@ -81,6 +81,22 @@ - method = "smc"; - }; - -+ thermal-zones { -+ cpu-thermal { -+ /* milliseconds */ -+ polling-delay-passive = <250>; -+ polling-delay = <1000>; -+ thermal-sensors = <&ths 0>; -+ }; -+ -+ gpu-thermal { -+ /* milliseconds */ -+ polling-delay-passive = <250>; -+ polling-delay = <1000>; -+ thermal-sensors = <&ths 1>; -+ }; -+ }; -+ - timer { - compatible = "arm,armv8-timer"; - interrupts = ; +- polling-delay = <0>; ++ /* milliseconds */ ++ polling-delay-passive = <250>; ++ polling-delay = <1000>; + thermal-sensors = <&ths 0>; + + 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_very_hot_trip: cpu-very-hot { +- temperature = <100000>; +- hysteresis = <0>; ++ 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: 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/patch/kernel/sunxi-dev/sun8i-h3-add-thermal-zones.patch b/patch/kernel/sunxi-dev/sun8i-h3-add-thermal-zones.patch new file mode 100644 index 0000000000..517c078183 --- /dev/null +++ b/patch/kernel/sunxi-dev/sun8i-h3-add-thermal-zones.patch @@ -0,0 +1,93 @@ +diff --git a/arch/arm/boot/dts/sun8i-h3.dtsi b/arch/arm/boot/dts/sun8i-h3.dtsi +index a79956f7b..b4891d31f 100644 +--- a/arch/arm/boot/dts/sun8i-h3.dtsi ++++ b/arch/arm/boot/dts/sun8i-h3.dtsi +@@ -210,32 +201,74 @@ + }; + + thermal-zones { +- cpu_thermal: cpu-thermal { +- polling-delay-passive = <0>; +- polling-delay = <0>; +- thermal-sensors = <&ths 0>; ++ cpu_thermal { ++ /* milliseconds */ ++ polling-delay-passive = <250>; ++ polling-delay = <1000>; ++ thermal-sensors = <&ths>; + + 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_very_hot_trip: cpu-very-hot { +- temperature = <100000>; +- hysteresis = <0>; ++ 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: 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/patch/kernel/sunxi-dev/update-correct-h3-h5-thermal-zones.patch b/patch/kernel/sunxi-dev/update-correct-h3-h5-thermal-zones.patch deleted file mode 100644 index 700b7c01e2..0000000000 --- a/patch/kernel/sunxi-dev/update-correct-h3-h5-thermal-zones.patch +++ /dev/null @@ -1,199 +0,0 @@ -diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi -index f4af3fdcc..3b1f50791 100644 ---- a/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi -+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi -@@ -221,31 +221,73 @@ - - 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>; - - 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_very_hot_trip: cpu-very-hot { -- temperature = <100000>; -- hysteresis = <0>; -+ 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: 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/arm/boot/dts/sun8i-h3.dtsi b/arch/arm/boot/dts/sun8i-h3.dtsi -index a79956f7b..b4891d31f 100644 ---- a/arch/arm/boot/dts/sun8i-h3.dtsi -+++ b/arch/arm/boot/dts/sun8i-h3.dtsi -@@ -98,15 +98,6 @@ - interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>; - }; - -- thermal-zones { -- cpu-thermal { -- /* milliseconds */ -- polling-delay-passive = <250>; -- polling-delay = <1000>; -- thermal-sensors = <&ths 0>; -- }; -- }; -- - timer { - compatible = "arm,armv7-timer"; - interrupts = , -@@ -210,32 +201,74 @@ - }; - - thermal-zones { -- cpu_thermal: cpu-thermal { -- polling-delay-passive = <0>; -- polling-delay = <0>; -- thermal-sensors = <&ths 0>; -+ cpu_thermal { -+ /* milliseconds */ -+ polling-delay-passive = <250>; -+ polling-delay = <1000>; -+ thermal-sensors = <&ths>; - - 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_very_hot_trip: cpu-very-hot { -- temperature = <100000>; -- hysteresis = <0>; -+ 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: 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>; - }; - }; - };