From 1bafaa6aa2a4918a350d0d77e484d94642748d1f Mon Sep 17 00:00:00 2001 From: Manaf Meethalavalappu Pallikunhi Date: Thu, 10 Feb 2022 17:48:40 +0530 Subject: [PATCH] ARM: dts: qcom: Enable BCL and PMIC die temp mitigations for kalama Enable BCL level sensor thermal zones mitigation and PMI die temperature mitigation configuration for kalama. Change-Id: I440be449a9327cb9c4ddcc3d7b822f9fec7de8a4 --- qcom/kalama-cdp.dtsi | 1 + qcom/kalama-mtp.dtsi | 1 + qcom/kalama-qrd.dtsi | 1 + qcom/kalama-thermal-overlay.dtsi | 109 +++++++++++++++++++++++++++++++ qcom/kalama-thermal.dtsi | 5 ++ 5 files changed, 117 insertions(+) create mode 100644 qcom/kalama-thermal-overlay.dtsi diff --git a/qcom/kalama-cdp.dtsi b/qcom/kalama-cdp.dtsi index ba2e40da..d8bb385f 100644 --- a/qcom/kalama-cdp.dtsi +++ b/qcom/kalama-cdp.dtsi @@ -3,6 +3,7 @@ #include #include "kalama-pmic-overlay.dtsi" +#include "kalama-thermal-overlay.dtsi" &sdhc_2 { status = "ok"; diff --git a/qcom/kalama-mtp.dtsi b/qcom/kalama-mtp.dtsi index 494416cd..fbc29c37 100644 --- a/qcom/kalama-mtp.dtsi +++ b/qcom/kalama-mtp.dtsi @@ -3,6 +3,7 @@ #include #include "kalama-pmic-overlay.dtsi" +#include "kalama-thermal-overlay.dtsi" &sdhc_2 { status = "ok"; diff --git a/qcom/kalama-qrd.dtsi b/qcom/kalama-qrd.dtsi index 761a172b..3d1992f4 100644 --- a/qcom/kalama-qrd.dtsi +++ b/qcom/kalama-qrd.dtsi @@ -3,6 +3,7 @@ #include #include "kalama-pmic-overlay.dtsi" +#include "kalama-thermal-overlay.dtsi" &sdhc_2 { status = "ok"; diff --git a/qcom/kalama-thermal-overlay.dtsi b/qcom/kalama-thermal-overlay.dtsi new file mode 100644 index 00000000..9f6a0474 --- /dev/null +++ b/qcom/kalama-thermal-overlay.dtsi @@ -0,0 +1,109 @@ +#include + +&thermal_zones { + socd { + cooling-maps { + socd_apc1 { + trip = <&socd_trip>; + cooling-device = <&APC1_pause 1 1>; + }; + + socd_cdsp1 { + trip = <&socd_trip>; + cooling-device = <&cdsp_sw 4 4>; + }; + }; + }; + + pm8550b-bcl-lvl0 { + cooling-maps { + lbat_cpu_3_4_5 { + trip = <&b_bcl_lvl0>; + cooling-device = <&cpu_3_4_5_pause 1 1>; + }; + + lbat_cdsp0 { + trip = <&b_bcl_lvl0>; + cooling-device = <&cdsp_sw 2 2>; + }; + }; + }; + + pm8550b-bcl-lvl1 { + cooling-maps { + lbat_cpu_6_7 { + trip = <&b_bcl_lvl1>; + cooling-device = <&cpu_6_7_pause 1 1>; + }; + + lbat_cdsp1 { + trip = <&b_bcl_lvl1>; + cooling-device = <&cdsp_sw 4 4>; + }; + }; + }; + + pm8550b-bcl-lvl2 { + cooling-maps { + lbat_cdsp2 { + trip = <&b_bcl_lvl2>; + cooling-device = <&cdsp_sw 5 THERMAL_NO_LIMIT>; + }; + }; + }; + + pm8550-bcl-lvl0 { + cooling-maps { + vph_cpu_3_4_5 { + trip = <&bcl_lvl0>; + cooling-device = <&cpu_3_4_5_pause 1 1>; + }; + + vph_cdsp0 { + trip = <&bcl_lvl0>; + cooling-device = <&cdsp_sw 2 2>; + }; + }; + }; + + pm8550-bcl-lvl1 { + cooling-maps { + vph_cpu_6_7 { + trip = <&bcl_lvl1>; + cooling-device = <&cpu_6_7_pause 1 1>; + }; + + vph_cdsp1 { + trip = <&bcl_lvl1>; + cooling-device = <&cdsp_sw 4 4>; + }; + }; + }; + + pm8550-bcl-lvl2 { + cooling-maps { + vph_cdsp2 { + trip = <&bcl_lvl2>; + cooling-device = <&cdsp_sw 5 THERMAL_NO_LIMIT>; + }; + }; + }; + + pm8550vs_c_tz { + cooling-maps { + pm8550vs_c_apc1 { + trip = <&pm8550vs_c_trip0>; + cooling-device = <&APC1_pause 1 1>; + }; + }; + }; + + pm8550vs_e_tz { + cooling-maps { + pm8550vs_e_nsp { + trip = <&pm8550vs_e_trip0>; + cooling-device = <&cdsp_sw 5 THERMAL_NO_LIMIT>; + }; + }; + }; +}; diff --git a/qcom/kalama-thermal.dtsi b/qcom/kalama-thermal.dtsi index 0d102b5b..e70765be 100644 --- a/qcom/kalama-thermal.dtsi +++ b/qcom/kalama-thermal.dtsi @@ -77,6 +77,11 @@ #cooling-cells = <2>; }; + cpu_3_4_5_pause: cpu-3-4-5-pause { + qcom,cpus = <&CPU3 &CPU4 &CPU5>; + #cooling-cells = <2>; + }; + cpu_6_7_pause: cpu-6-7-pause { qcom,cpus = <&CPU6 &CPU7>; #cooling-cells = <2>;