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

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

Signed-off-by: Dipa Ramesh Mantre <[email protected]>
---
 arch/arm64/boot/dts/qcom/shikra.dtsi | 21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/shikra.dtsi 
b/arch/arm64/boot/dts/qcom/shikra.dtsi
index 2ab474f18af7..d54ac6ed6ab7 100644
--- a/arch/arm64/boot/dts/qcom/shikra.dtsi
+++ b/arch/arm64/boot/dts/qcom/shikra.dtsi
@@ -10,6 +10,7 @@
 #include <dt-bindings/interconnect/qcom,icc.h>
 #include <dt-bindings/interconnect/qcom,osm-l3.h>
 #include <dt-bindings/dma/qcom-gpi.h>
+#include <dt-bindings/firmware/qcom,qmi-tmd.h>
 #include <dt-bindings/interconnect/qcom,rpm-icc.h>
 #include <dt-bindings/interconnect/qcom,shikra.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
@@ -1898,6 +1899,8 @@ remoteproc_cdsp: remoteproc@b300000 {
                        qcom,smem-states = <&cdsp_smp2p_out 0>;
                        qcom,smem-state-names = "stop";
 
+                       #cooling-cells = <3>;
+
                        status = "disabled";
 
                        glink-edge {
@@ -2401,6 +2404,8 @@ gpuss-critical {
                };
 
                nsp-thermal {
+                       polling-delay-passive = <200>;
+
                        thermal-sensors = <&tsens0 7>;
 
                        trips {
@@ -2410,12 +2415,26 @@ trip-point0 {
                                        type = "hot";
                                };
 
-                               nsp-critical {
+                               nsp_alert1: nsp-alert1 {
                                        temperature = <115000>;
+                                       hysteresis = <5000>;
+                                       type = "passive";
+                               };
+
+                               nsp-critical {
+                                       temperature = <118000>;
                                        hysteresis = <0>;
                                        type = "critical";
                                };
                        };
+
+                       cooling-maps {
+                               map0 {
+                                       trip = <&nsp_alert1>;
+                                       cooling-device = <&remoteproc_cdsp 
QCOM_CDSP_TMD_CDSP_SW
+                                                        THERMAL_NO_LIMIT 
THERMAL_NO_LIMIT>;
+                               };
+                       };
                };
 
                mdmss0-thermal {

-- 
2.34.1


Reply via email to