arm64: dts: sdm845: wireup the thermal trip points to cpufreq
authorAmit Kucheria <amit.kucheria@linaro.org>
Wed, 6 Feb 2019 10:34:49 +0000 (16:04 +0530)
committerAndy Gross <andy.gross@linaro.org>
Wed, 6 Feb 2019 21:58:30 +0000 (15:58 -0600)
Since all cpus in the big and little clusters, respectively, are in the
same frequency domain, use all of them for mitigation in the
cooling-map. We end up with two cooling devices - one each for the big
and little clusters.

Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
Acked-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
arch/arm64/boot/dts/qcom/sdm845.dtsi

index 2194794fe84d01f14a38e4e51dcf991d86795a2a..01a80ada653bd4aa8b4c857580df2e8979fb539c 100644 (file)
@@ -17,6 +17,8 @@
 #include <dt-bindings/reset/qcom,sdm845-aoss.h>
 #include <dt-bindings/reset/qcom,sdm845-pdc.h>
 #include <dt-bindings/soc/qcom,rpmh-rsc.h>
+#include <dt-bindings/clock/qcom,gcc-sdm845.h>
+#include <dt-bindings/thermal/thermal.h>
 
 / {
        interrupt-parent = <&intc>;
                        reg = <0x0 0x0>;
                        enable-method = "psci";
                        qcom,freq-domain = <&cpufreq_hw 0>;
+                       #cooling-cells = <2>;
                        next-level-cache = <&L2_0>;
                        L2_0: l2-cache {
                                compatible = "cache";
                        reg = <0x0 0x100>;
                        enable-method = "psci";
                        qcom,freq-domain = <&cpufreq_hw 0>;
+                       #cooling-cells = <2>;
                        next-level-cache = <&L2_100>;
                        L2_100: l2-cache {
                                compatible = "cache";
                        reg = <0x0 0x200>;
                        enable-method = "psci";
                        qcom,freq-domain = <&cpufreq_hw 0>;
+                       #cooling-cells = <2>;
                        next-level-cache = <&L2_200>;
                        L2_200: l2-cache {
                                compatible = "cache";
                        reg = <0x0 0x300>;
                        enable-method = "psci";
                        qcom,freq-domain = <&cpufreq_hw 0>;
+                       #cooling-cells = <2>;
                        next-level-cache = <&L2_300>;
                        L2_300: l2-cache {
                                compatible = "cache";
                        reg = <0x0 0x400>;
                        enable-method = "psci";
                        qcom,freq-domain = <&cpufreq_hw 1>;
+                       #cooling-cells = <2>;
                        next-level-cache = <&L2_400>;
                        L2_400: l2-cache {
                                compatible = "cache";
                        reg = <0x0 0x500>;
                        enable-method = "psci";
                        qcom,freq-domain = <&cpufreq_hw 1>;
+                       #cooling-cells = <2>;
                        next-level-cache = <&L2_500>;
                        L2_500: l2-cache {
                                compatible = "cache";
                        reg = <0x0 0x600>;
                        enable-method = "psci";
                        qcom,freq-domain = <&cpufreq_hw 1>;
+                       #cooling-cells = <2>;
                        next-level-cache = <&L2_600>;
                        L2_600: l2-cache {
                                compatible = "cache";
                        reg = <0x0 0x700>;
                        enable-method = "psci";
                        qcom,freq-domain = <&cpufreq_hw 1>;
+                       #cooling-cells = <2>;
                        next-level-cache = <&L2_700>;
                        L2_700: l2-cache {
                                compatible = "cache";
                        thermal-sensors = <&tsens0 1>;
 
                        trips {
-                               cpu_alert0: trip0 {
-                                       temperature = <75000>;
+                               cpu0_alert0: trip-point@0 {
+                                       temperature = <90000>;
+                                       hysteresis = <2000>;
+                                       type = "passive";
+                               };
+
+                               cpu0_alert1: trip-point@1 {
+                                       temperature = <95000>;
                                        hysteresis = <2000>;
                                        type = "passive";
                                };
 
-                               cpu_crit0: trip1 {
+                               cpu0_crit: cpu_crit {
                                        temperature = <110000>;
                                        hysteresis = <1000>;
                                        type = "critical";
                                };
                        };
+
+                       cooling-maps {
+                               map0 {
+                                       trip = <&cpu0_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>;
+                               };
+                               map1 {
+                                       trip = <&cpu0_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>;
+                               };
+                       };
                };
 
                cpu1-thermal {
                        thermal-sensors = <&tsens0 2>;
 
                        trips {
-                               cpu_alert1: trip0 {
-                                       temperature = <75000>;
+                               cpu1_alert0: trip-point@0 {
+                                       temperature = <90000>;
                                        hysteresis = <2000>;
                                        type = "passive";
                                };
 
-                               cpu_crit1: trip1 {
+                               cpu1_alert1: trip-point@1 {
+                                       temperature = <95000>;
+                                       hysteresis = <2000>;
+                                       type = "passive";
+                               };
+
+                               cpu1_crit: cpu_crit {
                                        temperature = <110000>;
                                        hysteresis = <1000>;
                                        type = "critical";
                                };
                        };
+
+                       cooling-maps {
+                               map0 {
+                                       trip = <&cpu1_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>;
+                               };
+                               map1 {
+                                       trip = <&cpu1_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>;
+                               };
+                       };
                };
 
                cpu2-thermal {
                        thermal-sensors = <&tsens0 3>;
 
                        trips {
-                               cpu_alert2: trip0 {
-                                       temperature = <75000>;
+                               cpu2_alert0: trip-point@0 {
+                                       temperature = <90000>;
                                        hysteresis = <2000>;
                                        type = "passive";
                                };
 
-                               cpu_crit2: trip1 {
+                               cpu2_alert1: trip-point@1 {
+                                       temperature = <95000>;
+                                       hysteresis = <2000>;
+                                       type = "passive";
+                               };
+
+                               cpu2_crit: cpu_crit {
                                        temperature = <110000>;
                                        hysteresis = <1000>;
                                        type = "critical";
                                };
                        };
+
+                       cooling-maps {
+                               map0 {
+                                       trip = <&cpu2_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>;
+                               };
+                               map1 {
+                                       trip = <&cpu2_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>;
+                               };
+                       };
                };
 
                cpu3-thermal {
                        thermal-sensors = <&tsens0 4>;
 
                        trips {
-                               cpu_alert3: trip0 {
-                                       temperature = <75000>;
+                               cpu3_alert0: trip-point@0 {
+                                       temperature = <90000>;
                                        hysteresis = <2000>;
                                        type = "passive";
                                };
 
-                               cpu_crit3: trip1 {
+                               cpu3_alert1: trip-point@1 {
+                                       temperature = <95000>;
+                                       hysteresis = <2000>;
+                                       type = "passive";
+                               };
+
+                               cpu3_crit: cpu_crit {
                                        temperature = <110000>;
                                        hysteresis = <1000>;
                                        type = "critical";
                                };
                        };
+
+                       cooling-maps {
+                               map0 {
+                                       trip = <&cpu3_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>;
+                               };
+                               map1 {
+                                       trip = <&cpu3_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>;
+                               };
+                       };
                };
 
                cpu4-thermal {
                        thermal-sensors = <&tsens0 7>;
 
                        trips {
-                               cpu_alert4: trip0 {
-                                       temperature = <75000>;
+                               cpu4_alert0: trip-point@0 {
+                                       temperature = <90000>;
                                        hysteresis = <2000>;
                                        type = "passive";
                                };
 
-                               cpu_crit4: trip1 {
+                               cpu4_alert1: trip-point@1 {
+                                       temperature = <95000>;
+                                       hysteresis = <2000>;
+                                       type = "passive";
+                               };
+
+                               cpu4_crit: cpu_crit {
                                        temperature = <110000>;
                                        hysteresis = <1000>;
                                        type = "critical";
                                };
                        };
+
+                       cooling-maps {
+                               map0 {
+                                       trip = <&cpu4_alert0>;
+                                       cooling-device = <&CPU4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                                        <&CPU5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                                        <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                                        <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+                               };
+                               map1 {
+                                       trip = <&cpu4_alert1>;
+                                       cooling-device = <&CPU4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                                        <&CPU5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                                        <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                                        <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+                               };
+                       };
                };
 
                cpu5-thermal {
                        thermal-sensors = <&tsens0 8>;
 
                        trips {
-                               cpu_alert5: trip0 {
-                                       temperature = <75000>;
+                               cpu5_alert0: trip-point@0 {
+                                       temperature = <90000>;
                                        hysteresis = <2000>;
                                        type = "passive";
                                };
 
-                               cpu_crit5: trip1 {
+                               cpu5_alert1: trip-point@1 {
+                                       temperature = <95000>;
+                                       hysteresis = <2000>;
+                                       type = "passive";
+                               };
+
+                               cpu5_crit: cpu_crit {
                                        temperature = <110000>;
                                        hysteresis = <1000>;
                                        type = "critical";
                                };
                        };
+
+                       cooling-maps {
+                               map0 {
+                                       trip = <&cpu5_alert0>;
+                                       cooling-device = <&CPU4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                                        <&CPU5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                                        <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                                        <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+                               };
+                               map1 {
+                                       trip = <&cpu5_alert1>;
+                                       cooling-device = <&CPU4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                                        <&CPU5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                                        <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                                        <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+                               };
+                       };
                };
 
                cpu6-thermal {
                        thermal-sensors = <&tsens0 9>;
 
                        trips {
-                               cpu_alert6: trip0 {
-                                       temperature = <75000>;
+                               cpu6_alert0: trip-point@0 {
+                                       temperature = <90000>;
                                        hysteresis = <2000>;
                                        type = "passive";
                                };
 
-                               cpu_crit6: trip1 {
+                               cpu6_alert1: trip-point@1 {
+                                       temperature = <95000>;
+                                       hysteresis = <2000>;
+                                       type = "passive";
+                               };
+
+                               cpu6_crit: cpu_crit {
                                        temperature = <110000>;
                                        hysteresis = <1000>;
                                        type = "critical";
                                };
                        };
+
+                       cooling-maps {
+                               map0 {
+                                       trip = <&cpu6_alert0>;
+                                       cooling-device = <&CPU4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                                        <&CPU5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                                        <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                                        <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+                               };
+                               map1 {
+                                       trip = <&cpu6_alert1>;
+                                       cooling-device = <&CPU4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                                        <&CPU5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                                        <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                                        <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+                               };
+                       };
                };
 
                cpu7-thermal {
                        thermal-sensors = <&tsens0 10>;
 
                        trips {
-                               cpu_alert7: trip0 {
-                                       temperature = <75000>;
+                               cpu7_alert0: trip-point@0 {
+                                       temperature = <90000>;
                                        hysteresis = <2000>;
                                        type = "passive";
                                };
 
-                               cpu_crit7: trip1 {
+                               cpu7_alert1: trip-point@1 {
+                                       temperature = <95000>;
+                                       hysteresis = <2000>;
+                                       type = "passive";
+                               };
+
+                               cpu7_crit: cpu_crit {
                                        temperature = <110000>;
                                        hysteresis = <1000>;
                                        type = "critical";
                                };
                        };
+
+                       cooling-maps {
+                               map0 {
+                                       trip = <&cpu7_alert0>;
+                                       cooling-device = <&CPU4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                                        <&CPU5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                                        <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                                        <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+                               };
+                               map1 {
+                                       trip = <&cpu7_alert1>;
+                                       cooling-device = <&CPU4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                                        <&CPU5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                                        <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                                        <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+                               };
+                       };
                };
        };
 };