From 8fd1f5ec43991e0eb8c4cd34b72e8a4d0ea39784 Mon Sep 17 00:00:00 2001 From: Ram Chandrasekar Date: Fri, 18 Sep 2020 17:01:13 -0700 Subject: [PATCH] ARM: dts: msm: Add emergency skin rule for lahaina Add emergency skin rule based on xo-therm to trigger frequency mitigation and core isolation at 78C and hotplug at 80C. Change-Id: I9fef2b9bdf827f9b660d7c1e34d55607cbd4b97b --- qcom/lahaina-pmic-overlay.dtsi | 21 ++++++++++++ qcom/lahaina-thermal-overlay.dtsi | 56 +++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+) diff --git a/qcom/lahaina-pmic-overlay.dtsi b/qcom/lahaina-pmic-overlay.dtsi index 052c892cc915..5bb23e5950e5 100644 --- a/qcom/lahaina-pmic-overlay.dtsi +++ b/qcom/lahaina-pmic-overlay.dtsi @@ -607,6 +607,27 @@ }; }; }; + + xo-therm-step { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-governor = "step_wise"; + thermal-sensors = <&pmk8350_adc_tm PMK8350_ADC7_AMUX_THM1_100K_PU>; + + trips { + xo_config0: active-config0 { + temperature = <78000>; + hysteresis = <8000>; + type = "passive"; + }; + + xo_config1: active-config1 { + temperature = <80000>; + hysteresis = <10000>; + type = "passive"; + }; + }; + }; }; &soc { diff --git a/qcom/lahaina-thermal-overlay.dtsi b/qcom/lahaina-thermal-overlay.dtsi index 2889f53abedb..15a3f166fc78 100644 --- a/qcom/lahaina-thermal-overlay.dtsi +++ b/qcom/lahaina-thermal-overlay.dtsi @@ -296,4 +296,60 @@ }; }; }; + + xo-therm-step { + cooling-maps { + cpu4_freq_cdev { + trip = <&xo_config0>; + cooling-device = <&CPU4 THERMAL_MAX_LIMIT + THERMAL_MAX_LIMIT>; + }; + + cpu7_freq_cdev { + trip = <&xo_config0>; + cooling-device = <&CPU7 THERMAL_MAX_LIMIT + THERMAL_MAX_LIMIT>; + }; + + cpu4_iso_cdev { + trip = <&xo_config0>; + cooling-device = <&cpu4_isolate 1 1>; + }; + + cpu5_iso_cdev { + trip = <&xo_config0>; + cooling-device = <&cpu5_isolate 1 1>; + }; + + cpu6_iso_cdev { + trip = <&xo_config0>; + cooling-device = <&cpu6_isolate 1 1>; + }; + + cpu7_iso_cdev { + trip = <&xo_config0>; + cooling-device = <&cpu7_isolate 1 1>; + }; + + cpu4_hot_cdev { + trip = <&xo_config1>; + cooling-device = <&cpu4_hotplug 1 1>; + }; + + cpu5_hot_cdev { + trip = <&xo_config1>; + cooling-device = <&cpu5_hotplug 1 1>; + }; + + cpu6_hot_cdev { + trip = <&xo_config1>; + cooling-device = <&cpu6_hotplug 1 1>; + }; + + cpu7_hot_cdev { + trip = <&xo_config1>; + cooling-device = <&cpu7_hotplug 1 1>; + }; + }; + }; };