]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ARM: dts: qcom: msm8226: Hook up CPU cooling
authorLuca Weiss <luca@lucaweiss.eu>
Wed, 19 Jun 2024 21:02:50 +0000 (23:02 +0200)
committerBjorn Andersson <andersson@kernel.org>
Thu, 15 Aug 2024 02:13:53 +0000 (21:13 -0500)
Add cooling-maps for the CPU thermal zones so the driver can actually do
something when the CPU temperature rises too much.

Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240619-msm8226-cpufreq-v1-6-85143f5291d1@lucaweiss.eu
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
arch/arm/boot/dts/qcom/qcom-msm8226.dtsi

index f0086000be3c77b40d5028b1f3c073775fc4cc71..73eb280b7865c8ea24229886c5b542eb3c8e39a0 100644 (file)
@@ -12,6 +12,7 @@
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/power/qcom-rpmpd.h>
 #include <dt-bindings/reset/qcom,gcc-msm8974.h>
+#include <dt-bindings/thermal/thermal.h>
 
 / {
        #address-cells = <1>;
@@ -48,6 +49,7 @@
                        operating-points-v2 = <&cpu_opp_table>;
                        qcom,acc = <&acc0>;
                        qcom,saw = <&saw0>;
+                       #cooling-cells = <2>;
                };
 
                CPU1: cpu@1 {
@@ -60,6 +62,7 @@
                        operating-points-v2 = <&cpu_opp_table>;
                        qcom,acc = <&acc1>;
                        qcom,saw = <&saw1>;
+                       #cooling-cells = <2>;
                };
 
                CPU2: cpu@2 {
@@ -72,6 +75,7 @@
                        operating-points-v2 = <&cpu_opp_table>;
                        qcom,acc = <&acc2>;
                        qcom,saw = <&saw2>;
+                       #cooling-cells = <2>;
                };
 
                CPU3: cpu@3 {
@@ -84,6 +88,7 @@
                        operating-points-v2 = <&cpu_opp_table>;
                        qcom,acc = <&acc3>;
                        qcom,saw = <&saw3>;
+                       #cooling-cells = <2>;
                };
 
                L2: l2-cache {
 
                        thermal-sensors = <&tsens 5>;
 
+                       cooling-maps {
+                               map0 {
+                                       trip = <&cpu_alert0>;
+                                       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>;
+                               };
+                       };
+
                        trips {
                                cpu_alert0: trip0 {
                                        temperature = <75000>;
 
                        thermal-sensors = <&tsens 2>;
 
+                       cooling-maps {
+                               map0 {
+                                       trip = <&cpu_alert1>;
+                                       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>;
+                               };
+                       };
+
                        trips {
                                cpu_alert1: trip0 {
                                        temperature = <75000>;