From 3b62a4c3382060f514b549534962d4beafd83425 Mon Sep 17 00:00:00 2001 From: Priyansh Jain Date: Tue, 31 Dec 2024 10:30:34 +0530 Subject: [PATCH] ARM: dts: qcom: Add pmic die temp mitigation mapping for kera and tuna Add pmic die temp mitigation mapping for kera and tuna. Change-Id: I1ef3b8f4b775cd38b3c975ae47e4d90c640c30e1 Signed-off-by: Priyansh Jain --- qcom/kera-thermal-overlay.dtsi | 196 +++++++++++++++++++++++++++++++++ qcom/kera-thermal.dtsi | 2 +- qcom/kera.dtsi | 2 +- qcom/tuna-thermal-overlay.dtsi | 56 ++++++++++ 4 files changed, 254 insertions(+), 2 deletions(-) create mode 100644 qcom/kera-thermal-overlay.dtsi diff --git a/qcom/kera-thermal-overlay.dtsi b/qcom/kera-thermal-overlay.dtsi new file mode 100644 index 00000000..aab92127 --- /dev/null +++ b/qcom/kera-thermal-overlay.dtsi @@ -0,0 +1,196 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved. + */ + +#include + +&thermal_zones { + pmxr2230_tz { + cooling-maps { + pmxr2230_cdsp { + trip = <&pmxr2230_trip0>; + cooling-device = <&cdsp_sw 5 THERMAL_NO_LIMIT>; + }; + }; + }; + + pm8550vs_d_tz { + cooling-maps { + pm8550vs_d_cdsp { + trip = <&pm8550vs_d_trip0>; + cooling-device = <&cdsp_sw 5 THERMAL_NO_LIMIT>; + }; + + pm8550vs_d_apc1 { + trip = <&pm8550vs_d_trip0>; + cooling-device = <&APC1_MX_CX_PAUSE 1 1>; + }; + + pm8550vs_d_apc0 { + trip = <&pm8550vs_d_trip0>; + cooling-device = <&APC0_MX_CX_PAUSE 1 1>; + }; + + pm8550vs_d_lte { + trip = <&pm8550vs_d_trip0>; + cooling-device = <&modem_lte_dsc 255 255>; + }; + + pm8550vs_d_nr { + trip = <&pm8550vs_d_trip0>; + cooling-device = <&modem_nr_scg_dsc 255 255>; + }; + }; + }; + + pm8550vs_g_tz { + cooling-maps { + pm8550vs_g_gpu { + trip = <&pm8550vs_g_trip0>; + cooling-device = <&msm_gpu 7 THERMAL_NO_LIMIT>; + }; + + pm8550vs_g_apc1 { + trip = <&pm8550vs_g_trip0>; + cooling-device = <&APC1_MX_CX_PAUSE 1 1>; + }; + + pm8550vs_g_apc0 { + trip = <&pm8550vs_g_trip0>; + cooling-device = <&APC0_MX_CX_PAUSE 1 1>; + }; + }; + }; + + pmxr2230-bcl-lvl0 { + cooling-maps { + lbat_0_nr_scg { + trip = <&bcl_lvl0>; + cooling-device = <&modem_nr_scg_dsc 3 3>; + }; + + lbat_0_nr { + trip = <&bcl_lvl0>; + cooling-device = <&modem_nr_dsc 6 6>; + }; + + lbat_0_mdm_lte { + trip = <&bcl_lvl0>; + cooling-device = <&modem_lte_dsc 8 8>; + }; + + lbat_gpu0 { + trip = <&bcl_lvl0>; + cooling-device = <&msm_gpu 2 2>; + }; + }; + }; + + pmxr2230-bcl-lvl1 { + cooling-maps { + lbat_1_nr_scg { + trip = <&bcl_lvl1>; + cooling-device = <&modem_nr_scg_dsc 10 10>; + }; + + lbat_1_nr { + trip = <&bcl_lvl1>; + cooling-device = <&modem_nr_dsc 9 9>; + }; + + lbat_1_mdm_lte { + trip = <&bcl_lvl1>; + cooling-device = <&modem_lte_dsc 10 10>; + }; + + lbat_gpu1 { + trip = <&bcl_lvl1>; + cooling-device = <&msm_gpu 3 3>; + }; + }; + }; + + pmxr2230-bcl-lvl2 { + cooling-maps { + lbat_gpu2 { + trip = <&bcl_lvl2>; + cooling-device = <&msm_gpu 7 7>; + }; + }; + }; + + sys-therm-0 { + cooling-maps { + apc1_cdev { + trip = <&trip_config0>; + cooling-device = <&APC1_MX_CX_PAUSE 1 1>; + }; + + apc0_cdev { + trip = <&trip_config0>; + cooling-device = <&APC0_MX_CX_PAUSE 1 1>; + }; + + cdsp_cdev { + trip = <&trip_config0>; + cooling-device = <&cdsp_sw 5 THERMAL_NO_LIMIT>; + }; + + gpu_cdev { + trip = <&trip_config0>; + cooling-device = <&msm_gpu 5 THERMAL_NO_LIMIT>; + }; + + cpu3_hot_cdev { + trip = <&trip_config1>; + cooling-device = <&cpu3_hotplug 1 1>; + }; + + cpu4_hot_cdev { + trip = <&trip_config1>; + cooling-device = <&cpu4_hotplug 1 1>; + }; + + cpu5_hot_cdev { + trip = <&trip_config1>; + cooling-device = <&cpu5_hotplug 1 1>; + }; + + cpu6_hot_cdev { + trip = <&trip_config1>; + cooling-device = <&cpu6_hotplug 1 1>; + }; + + cpu7_hot_cdev { + trip = <&trip_config1>; + cooling-device = <&cpu7_hotplug 1 1>; + }; + + lte_cdev { + trip = <&trip_config1>; + cooling-device = <&modem_lte_dsc 255 255>; + }; + + nr_cdev { + trip = <&trip_config1>; + cooling-device = <&modem_nr_scg_dsc 255 255>; + }; + + display_cdev1 { + trip = <&display_test_config1>; + cooling-device = <&display_fps 1 1>; + }; + + display_cdev2 { + trip = <&display_test_config2>; + cooling-device = <&display_fps 2 2>; + }; + + display_cdev3 { + trip = <&display_test_config3>; + cooling-device = <&display_fps 3 3>; + }; + }; + }; +}; diff --git a/qcom/kera-thermal.dtsi b/qcom/kera-thermal.dtsi index 7cc541af..036869cd 100644 --- a/qcom/kera-thermal.dtsi +++ b/qcom/kera-thermal.dtsi @@ -1037,7 +1037,7 @@ video { polling-delay-passive = <0>; polling-delay = <0>; - thermal-sensors = <&tsens1 11>; + thermal-sensors = <&tsens1 10>; trips { trip-point0 { diff --git a/qcom/kera.dtsi b/qcom/kera.dtsi index 4bbe6ab9..38fc677f 100644 --- a/qcom/kera.dtsi +++ b/qcom/kera.dtsi @@ -3360,4 +3360,4 @@ vdd-usb-cp-supply = <&L7B>; }; }; -#include "tuna-thermal-overlay.dtsi" +#include "kera-thermal-overlay.dtsi" diff --git a/qcom/tuna-thermal-overlay.dtsi b/qcom/tuna-thermal-overlay.dtsi index e0c1e053..2e9de58e 100644 --- a/qcom/tuna-thermal-overlay.dtsi +++ b/qcom/tuna-thermal-overlay.dtsi @@ -6,6 +6,62 @@ #include &thermal_zones { + pmxr2230_tz { + cooling-maps { + pmxr2230_apc1 { + trip = <&pmxr2230_trip0>; + cooling-device = <&APC1_MX_CX_PAUSE 1 1>; + }; + + pmxr2230_apc0 { + trip = <&pmxr2230_trip0>; + cooling-device = <&APC0_MX_CX_PAUSE 1 1>; + }; + }; + }; + + pm8550vs_d_tz { + cooling-maps { + pm8550vs_d_cdsp { + trip = <&pm8550vs_d_trip0>; + cooling-device = <&cdsp_sw 5 THERMAL_NO_LIMIT>; + }; + + pm8550vs_d_lte { + trip = <&pm8550vs_d_trip0>; + cooling-device = <&modem_lte_dsc 255 255>; + }; + + pm8550vs_d_nr { + trip = <&pm8550vs_d_trip0>; + cooling-device = <&modem_nr_scg_dsc 255 255>; + }; + }; + }; + + pm8550vs_f_tz { + cooling-maps { + pm8550vs_f_gpu { + trip = <&pm8550vs_f_trip0>; + cooling-device = <&msm_gpu 7 THERMAL_NO_LIMIT>; + }; + }; + }; + + pm8550vs_g_tz { + cooling-maps { + pm8550vs_g_apc1 { + trip = <&pm8550vs_g_trip0>; + cooling-device = <&APC1_MX_CX_PAUSE 1 1>; + }; + + pm8550vs_g_apc0 { + trip = <&pm8550vs_g_trip0>; + cooling-device = <&APC0_MX_CX_PAUSE 1 1>; + }; + }; + }; + pmxr2230-bcl-lvl0 { cooling-maps { lbat_0_nr_scg {