Unlike the CPU, the CDSP does not throttle its speed automatically
when it reaches high temperatures in lemans.

Set up CDSP cooling for both instances by throttling the cdsp, when
it reaches 105°C.

Signed-off-by: Gaurav Kohli <[email protected]>
---
 arch/arm64/boot/dts/qcom/lemans.dtsi | 125 +++++++++++++++++++++++++++++++----
 1 file changed, 113 insertions(+), 12 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/lemans.dtsi 
b/arch/arm64/boot/dts/qcom/lemans.dtsi
index 3b0539e27b51..2f7d4b1e4fdd 100644
--- a/arch/arm64/boot/dts/qcom/lemans.dtsi
+++ b/arch/arm64/boot/dts/qcom/lemans.dtsi
@@ -21,6 +21,7 @@
 #include <dt-bindings/power/qcom-rpmpd.h>
 #include <dt-bindings/soc/qcom,gpr.h>
 #include <dt-bindings/soc/qcom,rpmh-rsc.h>
+#include <dt-bindings/thermal/qcom,qmi-tmd.h>
 #include <dt-bindings/thermal/thermal.h>
 
 / {
@@ -7773,6 +7774,8 @@ remoteproc_cdsp0: remoteproc@26300000 {
                        qcom,smem-states = <&smp2p_cdsp0_out 0>;
                        qcom,smem-state-names = "stop";
 
+                       #cooling-cells = <3>;
+
                        status = "disabled";
 
                        glink-edge {
@@ -7912,6 +7915,8 @@ remoteproc_cdsp1: remoteproc@2a300000 {
                        qcom,smem-states = <&smp2p_cdsp1_out 0>;
                        qcom,smem-state-names = "stop";
 
+                       #cooling-cells = <3>;
+
                        status = "disabled";
 
                        glink-edge {
@@ -8760,7 +8765,7 @@ nsp-0-0-0-thermal {
                        thermal-sensors = <&tsens2 5>;
 
                        trips {
-                               trip-point0 {
+                               nsp_0_0_0_alert0: trip-point0 {
                                        temperature = <105000>;
                                        hysteresis = <5000>;
                                        type = "passive";
@@ -8772,6 +8777,14 @@ trip-point1 {
                                        type = "passive";
                                };
                        };
+
+                       cooling-maps {
+                               map0 {
+                                       trip = <&nsp_0_0_0_alert0>;
+                                       cooling-device = <&remoteproc_cdsp0 
QCOM_TMD_CDSP_SW
+                                                        THERMAL_NO_LIMIT 
THERMAL_NO_LIMIT>;
+                               };
+                       };
                };
 
                nsp-0-1-0-thermal {
@@ -8780,7 +8793,7 @@ nsp-0-1-0-thermal {
                        thermal-sensors = <&tsens2 6>;
 
                        trips {
-                               trip-point0 {
+                               nsp_0_1_0_alert0: trip-point0 {
                                        temperature = <105000>;
                                        hysteresis = <5000>;
                                        type = "passive";
@@ -8792,6 +8805,14 @@ trip-point1 {
                                        type = "passive";
                                };
                        };
+
+                       cooling-maps {
+                               map0 {
+                                       trip = <&nsp_0_1_0_alert0>;
+                                       cooling-device = <&remoteproc_cdsp0 
QCOM_TMD_CDSP_SW
+                                                        THERMAL_NO_LIMIT 
THERMAL_NO_LIMIT>;
+                               };
+                       };
                };
 
                nsp-0-2-0-thermal {
@@ -8800,7 +8821,7 @@ nsp-0-2-0-thermal {
                        thermal-sensors = <&tsens2 7>;
 
                        trips {
-                               trip-point0 {
+                               nsp_0_2_0_alert0: trip-point0 {
                                        temperature = <105000>;
                                        hysteresis = <5000>;
                                        type = "passive";
@@ -8812,6 +8833,14 @@ trip-point1 {
                                        type = "passive";
                                };
                        };
+
+                       cooling-maps {
+                               map0 {
+                                       trip = <&nsp_0_2_0_alert0>;
+                                       cooling-device = <&remoteproc_cdsp0 
QCOM_TMD_CDSP_SW
+                                                        THERMAL_NO_LIMIT 
THERMAL_NO_LIMIT>;
+                               };
+                       };
                };
 
                nsp-1-0-0-thermal {
@@ -8820,7 +8849,7 @@ nsp-1-0-0-thermal {
                        thermal-sensors = <&tsens2 8>;
 
                        trips {
-                               trip-point0 {
+                               nsp_1_0_0_alert0: trip-point0 {
                                        temperature = <105000>;
                                        hysteresis = <5000>;
                                        type = "passive";
@@ -8832,6 +8861,14 @@ trip-point1 {
                                        type = "passive";
                                };
                        };
+
+                       cooling-maps {
+                               map0 {
+                                       trip = <&nsp_1_0_0_alert0>;
+                                       cooling-device = <&remoteproc_cdsp1 
QCOM_TMD_CDSP_SW
+                                                        THERMAL_NO_LIMIT 
THERMAL_NO_LIMIT>;
+                               };
+                       };
                };
 
                nsp-1-1-0-thermal {
@@ -8840,7 +8877,7 @@ nsp-1-1-0-thermal {
                        thermal-sensors = <&tsens2 9>;
 
                        trips {
-                               trip-point0 {
+                               nsp_1_1_0_alert0: trip-point0 {
                                        temperature = <105000>;
                                        hysteresis = <5000>;
                                        type = "passive";
@@ -8852,6 +8889,14 @@ trip-point1 {
                                        type = "passive";
                                };
                        };
+
+                       cooling-maps {
+                               map0 {
+                                       trip = <&nsp_1_1_0_alert0>;
+                                       cooling-device = <&remoteproc_cdsp1 
QCOM_TMD_CDSP_SW
+                                                        THERMAL_NO_LIMIT 
THERMAL_NO_LIMIT>;
+                               };
+                       };
                };
 
                nsp-1-2-0-thermal {
@@ -8860,7 +8905,7 @@ nsp-1-2-0-thermal {
                        thermal-sensors = <&tsens2 10>;
 
                        trips {
-                               trip-point0 {
+                               nsp_1_2_0_alert0: trip-point0 {
                                        temperature = <105000>;
                                        hysteresis = <5000>;
                                        type = "passive";
@@ -8872,6 +8917,14 @@ trip-point1 {
                                        type = "passive";
                                };
                        };
+
+                       cooling-maps {
+                               map0 {
+                                       trip = <&nsp_1_2_0_alert0>;
+                                       cooling-device = <&remoteproc_cdsp1 
QCOM_TMD_CDSP_SW
+                                                        THERMAL_NO_LIMIT 
THERMAL_NO_LIMIT>;
+                               };
+                       };
                };
 
                ddrss-0-thermal {
@@ -9014,7 +9067,7 @@ nsp-0-0-1-thermal {
                        thermal-sensors = <&tsens3 5>;
 
                        trips {
-                               trip-point0 {
+                               nsp_0_0_1_alert0: trip-point0 {
                                        temperature = <105000>;
                                        hysteresis = <5000>;
                                        type = "passive";
@@ -9026,6 +9079,14 @@ trip-point1 {
                                        type = "passive";
                                };
                        };
+
+                       cooling-maps {
+                               map0 {
+                                       trip = <&nsp_0_0_1_alert0>;
+                                       cooling-device = <&remoteproc_cdsp0 
QCOM_TMD_CDSP_SW
+                                                        THERMAL_NO_LIMIT 
THERMAL_NO_LIMIT>;
+                               };
+                       };
                };
 
                nsp-0-1-1-thermal {
@@ -9034,7 +9095,7 @@ nsp-0-1-1-thermal {
                        thermal-sensors = <&tsens3 6>;
 
                        trips {
-                               trip-point0 {
+                               nsp_0_1_1_alert0: trip-point0 {
                                        temperature = <105000>;
                                        hysteresis = <5000>;
                                        type = "passive";
@@ -9046,6 +9107,14 @@ trip-point1 {
                                        type = "passive";
                                };
                        };
+
+                       cooling-maps {
+                               map0 {
+                                       trip = <&nsp_0_1_1_alert0>;
+                                       cooling-device = <&remoteproc_cdsp0 
QCOM_TMD_CDSP_SW
+                                                        THERMAL_NO_LIMIT 
THERMAL_NO_LIMIT>;
+                               };
+                       };
                };
 
                nsp-0-2-1-thermal {
@@ -9054,7 +9123,7 @@ nsp-0-2-1-thermal {
                        thermal-sensors = <&tsens3 7>;
 
                        trips {
-                               trip-point0 {
+                               nsp_0_2_1_alert0: trip-point0 {
                                        temperature = <105000>;
                                        hysteresis = <5000>;
                                        type = "passive";
@@ -9066,6 +9135,14 @@ trip-point1 {
                                        type = "passive";
                                };
                        };
+
+                       cooling-maps {
+                               map0 {
+                                       trip = <&nsp_0_2_1_alert0>;
+                                       cooling-device = <&remoteproc_cdsp0 
QCOM_TMD_CDSP_SW
+                                                        THERMAL_NO_LIMIT 
THERMAL_NO_LIMIT>;
+                               };
+                       };
                };
 
                nsp-1-0-1-thermal {
@@ -9074,7 +9151,7 @@ nsp-1-0-1-thermal {
                        thermal-sensors = <&tsens3 8>;
 
                        trips {
-                               trip-point0 {
+                               nsp_1_0_1_alert0: trip-point0 {
                                        temperature = <105000>;
                                        hysteresis = <5000>;
                                        type = "passive";
@@ -9086,6 +9163,14 @@ trip-point1 {
                                        type = "passive";
                                };
                        };
+
+                       cooling-maps {
+                               map0 {
+                                       trip = <&nsp_1_0_1_alert0>;
+                                       cooling-device = <&remoteproc_cdsp1 
QCOM_TMD_CDSP_SW
+                                                        THERMAL_NO_LIMIT 
THERMAL_NO_LIMIT>;
+                               };
+                       };
                };
 
                nsp-1-1-1-thermal {
@@ -9094,7 +9179,7 @@ nsp-1-1-1-thermal {
                        thermal-sensors = <&tsens3 9>;
 
                        trips {
-                               trip-point0 {
+                               nsp_1_1_1_alert0: trip-point0 {
                                        temperature = <105000>;
                                        hysteresis = <5000>;
                                        type = "passive";
@@ -9106,6 +9191,14 @@ trip-point1 {
                                        type = "passive";
                                };
                        };
+
+                       cooling-maps {
+                               map0 {
+                                       trip = <&nsp_1_1_1_alert0>;
+                                       cooling-device = <&remoteproc_cdsp1 
QCOM_TMD_CDSP_SW
+                                                        THERMAL_NO_LIMIT 
THERMAL_NO_LIMIT>;
+                               };
+                       };
                };
 
                nsp-1-2-1-thermal {
@@ -9114,7 +9207,7 @@ nsp-1-2-1-thermal {
                        thermal-sensors = <&tsens3 10>;
 
                        trips {
-                               trip-point0 {
+                               nsp_1_2_1_alert0: trip-point0 {
                                        temperature = <105000>;
                                        hysteresis = <5000>;
                                        type = "passive";
@@ -9126,6 +9219,14 @@ trip-point1 {
                                        type = "passive";
                                };
                        };
+
+                       cooling-maps {
+                               map0 {
+                                       trip = <&nsp_1_2_1_alert0>;
+                                       cooling-device = <&remoteproc_cdsp1 
QCOM_TMD_CDSP_SW
+                                                        THERMAL_NO_LIMIT 
THERMAL_NO_LIMIT>;
+                               };
+                       };
                };
 
                ddrss-1-thermal {

-- 
2.34.1


Reply via email to