From 6790b4faf5efddad1a3a2e6bc6a427c7af03c594 Mon Sep 17 00:00:00 2001 From: Gopala Krishna Nuthaki Date: Mon, 11 Jan 2021 18:20:09 +0530 Subject: [PATCH] ARM: dts: msm: Add GPU thermal zone configuration for YUPIK Add thermal zones for all GPU sensors individually to achieve better thermal control. Enable polling delay to one of the thermal zone to monitor the TSENS hardware functionality. Change-Id: I4174ca21744a89ede0d2e7e157d34dcae3a45d53 --- qcom/yupik-thermal.dtsi | 60 +++++++++++++++++++++++++++++++++++++++++ qcom/yupik.dtsi | 2 +- 2 files changed, 61 insertions(+), 1 deletion(-) diff --git a/qcom/yupik-thermal.dtsi b/qcom/yupik-thermal.dtsi index 12aacca763fe..d6326e668327 100644 --- a/qcom/yupik-thermal.dtsi +++ b/qcom/yupik-thermal.dtsi @@ -192,6 +192,10 @@ }; }; +&msm_gpu { + #cooling-cells = <2>; +}; + &thermal_zones { /delete-node/ modem-sdr-mmw-usr; /delete-node/ modem-ambient-usr; @@ -1171,6 +1175,50 @@ }; }; + gpuss-0-step { + polling-delay-passive = <10>; + polling-delay = <0>; + thermal-governor = "step_wise"; + thermal-sensors = <&tsens1 1>; + trips { + gpuss0_config: active-config0 { + temperature = <95000>; + hysteresis = <0>; + type = "passive"; + }; + }; + + cooling-maps { + gpu_cdev { + trip = <&gpuss0_config>; + cooling-device = <&msm_gpu THERMAL_NO_LIMIT + THERMAL_NO_LIMIT>; + }; + }; + }; + + gpuss-1-step { + polling-delay-passive = <10>; + polling-delay = <100>; + thermal-governor = "step_wise"; + thermal-sensors = <&tsens1 2>; + trips { + gpuss1_config: active-config0 { + temperature = <95000>; + hysteresis = <0>; + type = "passive"; + }; + }; + + cooling-maps { + gpu_cdev { + trip = <&gpuss1_config>; + cooling-device = <&msm_gpu THERMAL_NO_LIMIT + THERMAL_NO_LIMIT>; + }; + }; + }; + nspss-0-step { polling-delay-passive = <0>; polling-delay = <0>; @@ -1191,6 +1239,12 @@ THERMAL_MAX_LIMIT>; }; + gpu_cdev { + trip = <&nspss0_trip>; + cooling-device = <&msm_gpu THERMAL_MAX_LIMIT + THERMAL_MAX_LIMIT>; + }; + modem-pa-cdev { trip = <&nspss0_trip>; cooling-device = <&modem_pa 3 3>; @@ -1218,6 +1272,12 @@ THERMAL_MAX_LIMIT>; }; + gpu_cdev { + trip = <&nspss1_trip>; + cooling-device = <&msm_gpu THERMAL_MAX_LIMIT + THERMAL_MAX_LIMIT>; + }; + modem-pa-cdev { trip = <&nspss1_trip>; cooling-device = <&modem_pa 3 3>; diff --git a/qcom/yupik.dtsi b/qcom/yupik.dtsi index 9c22f571b73d..197c26b268b5 100644 --- a/qcom/yupik.dtsi +++ b/qcom/yupik.dtsi @@ -3681,7 +3681,6 @@ #include "yupik-pm.dtsi" #include "ipcc-test-yupik.dtsi" #include "yupik-regulators.dtsi" -#include "yupik-thermal.dtsi" &gcc_ufs_phy_gdsc { qcom,support-hw-trigger; @@ -3813,3 +3812,4 @@ #include "camera/yupik-camera.dtsi" #include "msm-rdbg.dtsi" #include "yupik-gpu.dtsi" +#include "yupik-thermal.dtsi"