From: Dipa Ramesh Mantre <[email protected]>

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

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

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

diff --git a/arch/arm64/boot/dts/qcom/hamoa.dtsi 
b/arch/arm64/boot/dts/qcom/hamoa.dtsi
index 4ba751a65142..92daaf4890aa 100644
--- a/arch/arm64/boot/dts/qcom/hamoa.dtsi
+++ b/arch/arm64/boot/dts/qcom/hamoa.dtsi
@@ -8815,6 +8815,9 @@ remoteproc_cdsp: remoteproc@32300000 {
 
                        status = "disabled";
 
+                       #cooling-cells = <2>;
+                       tmd-names = "cdsp_sw";
+
                        glink-edge {
                                interrupts-extended = <&ipcc IPCC_CLIENT_CDSP
                                                             
IPCC_MPROC_SIGNAL_GLINK_QMP
@@ -9402,6 +9405,7 @@ aoss0-critical {
                };
 
                thermal_nsp0: nsp0-thermal {
+                       polling-delay-passive = <200>;
                        thermal-sensors = <&tsens3 1>;
 
                        trips {
@@ -9411,15 +9415,30 @@ trip-point0 {
                                        type = "hot";
                                };
 
+                               nsp0_alert0: trip-point1 {
+                                       temperature = <95000>;
+                                       hysteresis = <5000>;
+                                       type = "passive";
+                               };
+
                                nsp0-critical {
                                        temperature = <115000>;
                                        hysteresis = <1000>;
                                        type = "critical";
                                };
                        };
+
+                       cooling-maps {
+                               map0 {
+                                       trip = <&nsp0_alert0>;
+                                       cooling-device = <&remoteproc_cdsp
+                                                         THERMAL_NO_LIMIT 
THERMAL_NO_LIMIT>;
+                               };
+                       };
                };
 
                thermal_nsp1: nsp1-thermal {
+                       polling-delay-passive = <200>;
                        thermal-sensors = <&tsens3 2>;
 
                        trips {
@@ -9429,15 +9448,30 @@ trip-point0 {
                                        type = "hot";
                                };
 
+                               nsp1_alert0: trip-point1 {
+                                       temperature = <95000>;
+                                       hysteresis = <5000>;
+                                       type = "passive";
+                               };
+
                                nsp1-critical {
                                        temperature = <115000>;
                                        hysteresis = <1000>;
                                        type = "critical";
                                };
                        };
+
+                       cooling-maps {
+                               map0 {
+                                       trip = <&nsp1_alert0>;
+                                       cooling-device = <&remoteproc_cdsp
+                                                         THERMAL_NO_LIMIT 
THERMAL_NO_LIMIT>;
+                               };
+                       };
                };
 
                thermal_nsp2: nsp2-thermal {
+                       polling-delay-passive = <200>;
                        thermal-sensors = <&tsens3 3>;
 
                        trips {
@@ -9447,15 +9481,30 @@ trip-point0 {
                                        type = "hot";
                                };
 
+                               nsp2_alert0: trip-point1 {
+                                       temperature = <95000>;
+                                       hysteresis = <5000>;
+                                       type = "passive";
+                               };
+
                                nsp2-critical {
                                        temperature = <115000>;
                                        hysteresis = <1000>;
                                        type = "critical";
                                };
                        };
+
+                       cooling-maps {
+                               map0 {
+                                       trip = <&nsp2_alert0>;
+                                       cooling-device = <&remoteproc_cdsp
+                                                         THERMAL_NO_LIMIT 
THERMAL_NO_LIMIT>;
+                               };
+                       };
                };
 
                thermal_nsp3: nsp3-thermal {
+                       polling-delay-passive = <200>;
                        thermal-sensors = <&tsens3 4>;
 
                        trips {
@@ -9465,12 +9514,26 @@ trip-point0 {
                                        type = "hot";
                                };
 
+                               nsp3_alert0: trip-point1 {
+                                       temperature = <95000>;
+                                       hysteresis = <5000>;
+                                       type = "passive";
+                               };
+
                                nsp3-critical {
                                        temperature = <115000>;
                                        hysteresis = <1000>;
                                        type = "critical";
                                };
                        };
+
+                       cooling-maps {
+                               map0 {
+                                       trip = <&nsp3_alert0>;
+                                       cooling-device = <&remoteproc_cdsp
+                                                         THERMAL_NO_LIMIT 
THERMAL_NO_LIMIT>;
+                               };
+                       };
                };
 
                thermal_gpuss_0: gpuss-0-thermal {

-- 
2.34.1


Reply via email to