From: Gaurav Kohli <quic_gko...@quicinc.com> Unlike the CPU, the GPU does not throttle its speed automatically when it reaches high temperatures.
Set up GPU cooling by throttling the GPU speed when reaching 105°C. Signed-off-by: Gaurav Kohli <quic_gko...@quicinc.com> Signed-off-by: Akhil P Oommen <akhi...@oss.qualcomm.com> --- arch/arm64/boot/dts/qcom/lemans.dtsi | 67 +++++++++++++++++++++++++++++------- 1 file changed, 55 insertions(+), 12 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/lemans.dtsi b/arch/arm64/boot/dts/qcom/lemans.dtsi index 8eac8d4719db9230105ad93ac22287850b6b007c..b5d4d07b2fd9c14a6f1cc462c695e864394cade2 100644 --- a/arch/arm64/boot/dts/qcom/lemans.dtsi +++ b/arch/arm64/boot/dts/qcom/lemans.dtsi @@ -20,6 +20,7 @@ #include <dt-bindings/power/qcom,rpmhpd.h> #include <dt-bindings/power/qcom-rpmpd.h> #include <dt-bindings/soc/qcom,rpmh-rsc.h> +#include <dt-bindings/thermal/thermal.h> / { interrupt-parent = <&intc>; @@ -6816,13 +6817,20 @@ trip-point1 { }; }; - gpuss-0-thermal { + gpuss0_thermal: gpuss-0-thermal { polling-delay-passive = <10>; thermal-sensors = <&tsens0 5>; + cooling-maps { + map0 { + trip = <&gpuss0_alert0>; + cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + trips { - trip-point0 { + gpuss0_alert0: trip-point0 { temperature = <105000>; hysteresis = <5000>; type = "passive"; @@ -6836,13 +6844,20 @@ trip-point1 { }; }; - gpuss-1-thermal { + gpuss1_thermal: gpuss-1-thermal { polling-delay-passive = <10>; thermal-sensors = <&tsens0 6>; + cooling-maps { + map0 { + trip = <&gpuss1_alert0>; + cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + trips { - trip-point0 { + gpuss1_alert0: trip-point0 { temperature = <105000>; hysteresis = <5000>; type = "passive"; @@ -6856,13 +6871,20 @@ trip-point1 { }; }; - gpuss-2-thermal { + gpuss2_thermal: gpuss-2-thermal { polling-delay-passive = <10>; thermal-sensors = <&tsens0 7>; + cooling-maps { + map0 { + trip = <&gpuss2_alert0>; + cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + trips { - trip-point0 { + gpuss2_alert0: trip-point0 { temperature = <105000>; hysteresis = <5000>; type = "passive"; @@ -7046,13 +7068,20 @@ trip-point1 { }; }; - gpuss-3-thermal { + gpuss3_thermal: gpuss-3-thermal { polling-delay-passive = <10>; thermal-sensors = <&tsens1 5>; + cooling-maps { + map0 { + trip = <&gpuss3_alert0>; + cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + trips { - trip-point0 { + gpuss3_alert0: trip-point0 { temperature = <105000>; hysteresis = <5000>; type = "passive"; @@ -7066,13 +7095,20 @@ trip-point1 { }; }; - gpuss-4-thermal { + gpuss4_thermal: gpuss-4-thermal { polling-delay-passive = <10>; thermal-sensors = <&tsens1 6>; + cooling-maps { + map0 { + trip = <&gpuss4_alert0>; + cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + trips { - trip-point0 { + gpuss4_alert0: trip-point0 { temperature = <105000>; hysteresis = <5000>; type = "passive"; @@ -7086,13 +7122,20 @@ trip-point1 { }; }; - gpuss-5-thermal { + gpuss5_thermal: gpuss-5-thermal { polling-delay-passive = <10>; thermal-sensors = <&tsens1 7>; + cooling-maps { + map0 { + trip = <&gpuss5_alert0>; + cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + trips { - trip-point0 { + gpuss5_alert0: trip-point0 { temperature = <105000>; hysteresis = <5000>; type = "passive"; -- 2.50.1