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

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

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

diff --git a/arch/arm64/boot/dts/qcom/talos.dtsi 
b/arch/arm64/boot/dts/qcom/talos.dtsi
index fb1bbc51bb8a..c105743764fa 100644
--- a/arch/arm64/boot/dts/qcom/talos.dtsi
+++ b/arch/arm64/boot/dts/qcom/talos.dtsi
@@ -3772,6 +3772,9 @@ remoteproc_cdsp: remoteproc@8300000 {
                        qcom,smem-states = <&cdsp_smp2p_out 0>;
                        qcom,smem-state-names = "stop";
 
+                       #cooling-cells = <2>;
+                       tmd-names = "cdsp_sw";
+
                        status = "disabled";
 
                        glink-edge {
@@ -5425,15 +5428,31 @@ map0 {
                };
 
                q6-hvx-thermal {
+                       polling-delay-passive = <200>;
+
                        thermal-sensors = <&tsens0 10>;
 
                        trips {
+                               q6_hvx_alert0: trip-point0 {
+                                       temperature = <105000>;
+                                       hysteresis = <5000>;
+                                       type = "passive";
+                               };
+
                                q6-hvx-critical {
                                        temperature = <115000>;
                                        hysteresis = <1000>;
                                        type = "critical";
                                };
                        };
+
+                       cooling-maps {
+                               map0 {
+                                       trip = <&q6_hvx_alert0>;
+                                       cooling-device = <&remoteproc_cdsp 
THERMAL_NO_LIMIT
+                                                        THERMAL_NO_LIMIT>;
+                               };
+                       };
                };
 
                mdm-core-thermal {

-- 
2.34.1


Reply via email to