From c44ace7d5679b4bbb58c7ec6cc2d0eb1c95fe8c7 Mon Sep 17 00:00:00 2001 From: Gopala Krishna Nuthaki Date: Tue, 24 Nov 2020 13:39:37 +0530 Subject: [PATCH 1/2] ARM: dts: msm: Update thermal mitigation config for SHIMA Update quiet-therm sensor skin thermal zone mitigation config for SHIMA based on latest recommendation. Add modem lte sub6 skin sensor based thermal zone mitigation config for SHIMA on latest recomondation. Change-Id: I1305de5650dae6d234fc4338b0dee9665a2c844d --- qcom/shima-qrd.dtsi | 107 +++++++++++++++++++++++++++++++++------- qcom/shima-thermal.dtsi | 88 +++++++++++++++++++++++++++++++++ 2 files changed, 178 insertions(+), 17 deletions(-) diff --git a/qcom/shima-qrd.dtsi b/qcom/shima-qrd.dtsi index 3c4d58ff97f2..512c64634168 100644 --- a/qcom/shima-qrd.dtsi +++ b/qcom/shima-qrd.dtsi @@ -205,30 +205,72 @@ thermal-sensors = <&pmk8350_adc_tm PM8350_ADC7_AMUX_THM1_100K_PU>; trips { - quiet_gpu_trip: quiet-gpu-trip { - temperature = <45000>; - hysteresis = <0>; + quiet_batt_trip0: quiet-batt-trip0 { + temperature = <43000>; + hysteresis = <2000>; type = "passive"; }; - quiet_cpu4_trip: quiet-cpu4-trip { + quiet_batt_trip1: quiet-batt-trip1 { + temperature = <45000>; + hysteresis = <2000>; + type = "passive"; + }; + + quiet_modem_skin_trip0: quiet-modem-skin-trip0 { + temperature = <45000>; + hysteresis = <4000>; + type = "passive"; + }; + + quiet_gpu_trip: quiet-gpu-trip { temperature = <46000>; hysteresis = <0>; type = "passive"; }; - quiet_cpu7_trip: quiet-cpu7-trip { + quiet_batt_trip2: quiet-batt-trip2 { + temperature = <47000>; + hysteresis = <2000>; + type = "passive"; + }; + + quiet_modem_skin_trip1: quiet-modem-skin-trip1 { + temperature = <47000>; + hysteresis = <4000>; + type = "passive"; + }; + + quiet_apc_trip: quiet-apc-trip { temperature = <48000>; hysteresis = <0>; type = "passive"; }; + quiet_batt_trip3: quiet-batt-trip3 { + temperature = <49000>; + hysteresis = <2000>; + type = "passive"; + }; + quiet_cpu0_trip: quiet-cpu0-trip { temperature = <50000>; hysteresis = <0>; type = "passive"; }; + quiet_batt_trip4: quiet-batt-trip4 { + temperature = <50000>; + hysteresis = <1000>; + type = "passive"; + }; + + quiet_modem_skin_trip2: quiet-modem-skin-trip2 { + temperature = <50000>; + hysteresis = <4000>; + type = "passive"; + }; + quiet_cx_trip: quiet-cx-trip { temperature = <55000>; hysteresis = <5000>; @@ -258,18 +300,9 @@ (THERMAL_MAX_LIMIT-7)>; }; - cpufreq4-cdev { - trip = <&quiet_cpu4_trip>; - /* throttle to 1651200KHz */ - cooling-device = <&CPU4 THERMAL_NO_LIMIT - (THERMAL_MAX_LIMIT-5)>; - }; - - cpufreq7-cdev { - trip = <&quiet_cpu7_trip>; - /* throttle to 1862400KHz */ - cooling-device = <&CPU7 THERMAL_NO_LIMIT - (THERMAL_MAX_LIMIT-5)>; + apc-cdev { + trip = <&quiet_apc_trip>; + cooling-device = <&apc1_cluster THERMAL_NO_LIMIT 5>; }; cdsp-cdev { @@ -286,6 +319,46 @@ trip = <&quiet_cx_trip>; cooling-device = <&modem_tj 3 3>; }; + + modem-skin-cdev0 { + trip = <&quiet_modem_skin_trip0>; + cooling-device = <&modem_skin 1 1>; + }; + + modem-skin-cdev1 { + trip = <&quiet_modem_skin_trip1>; + cooling-device = <&modem_skin 2 2>; + }; + + modem-skin-cdev2 { + trip = <&quiet_modem_skin_trip2>; + cooling-device = <&modem_skin 3 3>; + }; + + modem-batt-cdev0 { + trip = <&quiet_batt_trip0>; + cooling-device = <&battery_charger 8 8>; + }; + + modem-batt-cdev1 { + trip = <&quiet_batt_trip1>; + cooling-device = <&battery_charger 12 12>; + }; + + modem-batt-cdev2 { + trip = <&quiet_batt_trip2>; + cooling-device = <&battery_charger 14 14>; + }; + + modem-batt-cdev3 { + trip = <&quiet_batt_trip3>; + cooling-device = <&battery_charger 16 16>; + }; + + modem-batt-cdev4 { + trip = <&quiet_batt_trip4>; + cooling-device = <&battery_charger 18 18>; + }; }; }; }; diff --git a/qcom/shima-thermal.dtsi b/qcom/shima-thermal.dtsi index 6a5999deec8b..fe9edb42f5c3 100644 --- a/qcom/shima-thermal.dtsi +++ b/qcom/shima-thermal.dtsi @@ -1411,6 +1411,94 @@ }; }; + modem-lte-sub6-pa1 { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-governor = "step_wise"; + thermal-sensors = <&qmi_sensor + (QMI_MODEM_INST_ID+QMI_PA)>; + trips { + modem_trip0: modem-trip0 { + temperature = <46000>; + hysteresis = <4000>; + type = "passive"; + }; + + modem_trip1: modem-trip1 { + temperature = <47000>; + hysteresis = <4000>; + type = "passive"; + }; + + modem_trip2: modem-trip2 { + temperature = <54000>; + hysteresis = <4000>; + type = "passive"; + }; + }; + + cooling-maps { + modem_cdev0 { + trip = <&modem_trip0>; + cooling-device = <&modem_pa 1 1>; + }; + + modem_cdev1 { + trip = <&modem_trip1>; + cooling-device = <&modem_pa 2 2>; + }; + + modem_cdev2 { + trip = <&modem_trip2>; + cooling-device = <&modem_pa 3 3>; + }; + }; + }; + + modem-lte-sub6-pa2 { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-governor = "step_wise"; + thermal-sensors = <&qmi_sensor + (QMI_MODEM_INST_ID+QMI_PA_1)>; + trips { + modem_pa_fr1_trip0: modem-pa-fr1-trip0 { + temperature = <46000>; + hysteresis = <4000>; + type = "passive"; + }; + + modem_pa_fr1_trip1: modem-pa-fr1-trip1 { + temperature = <47000>; + hysteresis = <4000>; + type = "passive"; + }; + + modem_pa_fr1_trip2: modem-pa-fr1-trip2 { + temperature = <55000>; + hysteresis = <5000>; + type = "passive"; + }; + }; + + cooling-maps { + modem_cdev0 { + trip = <&modem_pa_fr1_trip0>; + cooling-device = <&modem_pa_fr1 1 1>; + }; + + modem_cdev1 { + trip = <&modem_pa_fr1_trip1>; + cooling-device = <&modem_pa_fr1 2 2>; + }; + + modem_cdev2 { + trip = <&modem_pa_fr1_trip2>; + cooling-device = <&modem_pa_fr1 3 3>; + }; + }; + }; + mx-pe-step { polling-delay-passive = <0>; polling-delay = <0>; From ddaae4656aaae25de9a8589682540a525b92b6a6 Mon Sep 17 00:00:00 2001 From: Gopala Krishna Nuthaki Date: Tue, 24 Nov 2020 14:41:27 +0530 Subject: [PATCH 2/2] ARM: dts: msm: Update BCL, Alarm and CPU thermal mitigation for SHIMA Update the BCL rule in SHIMA to include CDSP mitigation for all three violations. Update PM8350 alarm rule in SHIMA to have cpufreq as mitigation devcie instead of cpu-isolate cooling device for silver and gold cores. Update silver core mitigation to ensure minimum operating performance. Change-Id: I5ba29ee1e606cf9104e4ab4745606c473b9ea497 --- qcom/shima-thermal-overlay.dtsi | 53 ++++++++++++++++++++------------- qcom/shima-thermal.dtsi | 24 --------------- 2 files changed, 32 insertions(+), 45 deletions(-) diff --git a/qcom/shima-thermal-overlay.dtsi b/qcom/shima-thermal-overlay.dtsi index aa352a783037..e2f347492c47 100644 --- a/qcom/shima-thermal-overlay.dtsi +++ b/qcom/shima-thermal-overlay.dtsi @@ -49,6 +49,11 @@ trip = <&b_bcl_lvl0>; cooling-device = <&msm_gpu 2 2>; }; + + vbat_cdsp0 { + trip = <&b_bcl_lvl0>; + cooling-device = <&cdsp_sw 2 2>; + }; }; }; @@ -68,6 +73,11 @@ trip = <&b_bcl_lvl1>; cooling-device = <&msm_gpu 4 4>; }; + + vbat_cdsp1 { + trip = <&b_bcl_lvl1>; + cooling-device = <&cdsp_sw 4 4>; + }; }; }; @@ -78,6 +88,12 @@ cooling-device = <&msm_gpu THERMAL_MAX_LIMIT THERMAL_MAX_LIMIT>; }; + + vbat_cdsp2 { + trip = <&b_bcl_lvl2>; + cooling-device = <&cdsp_sw THERMAL_MAX_LIMIT + THERMAL_MAX_LIMIT>; + }; }; }; @@ -98,6 +114,11 @@ trip = <&c_bcl_lvl0>; cooling-device = <&msm_gpu 2 2>; }; + + vph_cdsp0 { + trip = <&c_bcl_lvl0>; + cooling-device = <&cdsp_sw 2 2>; + }; }; }; @@ -118,6 +139,11 @@ trip = <&c_bcl_lvl1>; cooling-device = <&msm_gpu 4 4>; }; + + vph_cdsp1 { + trip = <&c_bcl_lvl1>; + cooling-device = <&cdsp_sw 4 4>; + }; }; }; @@ -129,6 +155,12 @@ cooling-device = <&msm_gpu THERMAL_MAX_LIMIT THERMAL_MAX_LIMIT>; }; + + vph_cdsp2 { + trip = <&c_bcl_lvl2>; + cooling-device = <&cdsp_sw THERMAL_MAX_LIMIT + THERMAL_MAX_LIMIT>; + }; }; }; @@ -151,27 +183,6 @@ THERMAL_MAX_LIMIT>; }; - pm8350_cpu0_freq { - trip = <&pm8350_trip0>; - cooling-device = <&CPU0 THERMAL_MAX_LIMIT - THERMAL_MAX_LIMIT>; - }; - - pm8350_cpu1 { - trip = <&pm8350_trip0>; - cooling-device = <&cpu1_isolate 1 1>; - }; - - pm8350_cpu2 { - trip = <&pm8350_trip0>; - cooling-device = <&cpu2_isolate 1 1>; - }; - - pm8350_cpu3 { - trip = <&pm8350_trip0>; - cooling-device = <&cpu3_isolate 1 1>; - }; - pm8350_cpu4 { trip = <&pm8350_trip0>; cooling-device = <&cpu4_isolate 1 1>; diff --git a/qcom/shima-thermal.dtsi b/qcom/shima-thermal.dtsi index fe9edb42f5c3..8d8dacd4cef4 100644 --- a/qcom/shima-thermal.dtsi +++ b/qcom/shima-thermal.dtsi @@ -834,12 +834,6 @@ cooling-device = <&cpu0_isolate 1 1>; }; - cpu00_cdev1 { - trip = <&cpu00_config>; - cooling-device = <&CPU0 THERMAL_MAX_LIMIT - THERMAL_MAX_LIMIT>; - }; - cpu00_cdev2 { trip = <&cpu00_config1>; cooling-device = <&cpu0_hotplug 1 1>; @@ -872,12 +866,6 @@ cooling-device = <&cpu1_isolate 1 1>; }; - cpu01_cdev1 { - trip = <&cpu01_config>; - cooling-device = <&CPU0 THERMAL_MAX_LIMIT - THERMAL_MAX_LIMIT>; - }; - cpu01_cdev2 { trip = <&cpu01_config1>; cooling-device = <&cpu1_hotplug 1 1>; @@ -910,12 +898,6 @@ cooling-device = <&cpu2_isolate 1 1>; }; - cpu02_cdev1 { - trip = <&cpu02_config>; - cooling-device = <&CPU0 THERMAL_MAX_LIMIT - THERMAL_MAX_LIMIT>; - }; - cpu02_cdev2 { trip = <&cpu02_config1>; cooling-device = <&cpu2_hotplug 1 1>; @@ -948,12 +930,6 @@ cooling-device = <&cpu3_isolate 1 1>; }; - cpu03_cdev1 { - trip = <&cpu03_config>; - cooling-device = <&CPU0 THERMAL_MAX_LIMIT - THERMAL_MAX_LIMIT>; - }; - cpu03_cdev2 { trip = <&cpu03_config1>; cooling-device = <&cpu3_hotplug 1 1>;