From 1555b03c09685a3e6540d1aa0571b2012aa63a75 Mon Sep 17 00:00:00 2001 From: Priyansh Jain Date: Thu, 11 Aug 2022 11:52:25 +0530 Subject: [PATCH] ARM: dts: qcom: Add thermal devicetree support for khaje Add thermal driver devicetree support for khaje. Change-Id: Idd5b4674a686fda20491d252884f3db0fb319ef2 --- qcom/bengal-thermal-overlay.dtsi | 22 +- qcom/bengal-thermal.dtsi | 1371 ++++++++++------------- qcom/khaje-thermal-pm7250b-overlay.dtsi | 29 +- qcom/khaje.dtsi | 32 - 4 files changed, 604 insertions(+), 850 deletions(-) diff --git a/qcom/bengal-thermal-overlay.dtsi b/qcom/bengal-thermal-overlay.dtsi index 39a1c400..09519f7a 100644 --- a/qcom/bengal-thermal-overlay.dtsi +++ b/qcom/bengal-thermal-overlay.dtsi @@ -5,51 +5,47 @@ cooling-maps { trip0_cpu0 { trip = <&pm6125_trip0>; - cooling-device = - <&CPU0 THERMAL_MAX_LIMIT - THERMAL_MAX_LIMIT>; + cooling-device = <&CPU0 7 7>; }; trip0_cpu4 { trip = <&pm6125_trip0>; - cooling-device = - <&CPU4 THERMAL_MAX_LIMIT - THERMAL_MAX_LIMIT>; + cooling-device = <&CPU4 6 THERMAL_NO_LIMIT>; }; trip1_cpu1 { trip = <&pm6125_trip1>; - cooling-device = <&cpu1_isolate 1 1>; + cooling-device = <&cpu1_pause 1 1>; }; trip1_cpu2 { trip = <&pm6125_trip1>; - cooling-device = <&cpu2_isolate 1 1>; + cooling-device = <&cpu2_pause 1 1>; }; trip1_cpu3 { trip = <&pm6125_trip1>; - cooling-device = <&cpu3_isolate 1 1>; + cooling-device = <&cpu3_pause 1 1>; }; trip1_cpu4 { trip = <&pm6125_trip1>; - cooling-device = <&cpu4_isolate 1 1>; + cooling-device = <&cpu4_pause 1 1>; }; trip1_cpu5 { trip = <&pm6125_trip1>; - cooling-device = <&cpu5_isolate 1 1>; + cooling-device = <&cpu5_pause 1 1>; }; trip1_cpu6 { trip = <&pm6125_trip1>; - cooling-device = <&cpu6_isolate 1 1>; + cooling-device = <&cpu6_pause 1 1>; }; trip1_cpu7 { trip = <&pm6125_trip1>; - cooling-device = <&cpu7_isolate 1 1>; + cooling-device = <&cpu7_pause 1 1>; }; }; }; diff --git a/qcom/bengal-thermal.dtsi b/qcom/bengal-thermal.dtsi index 8e20d52f..fa93b903 100644 --- a/qcom/bengal-thermal.dtsi +++ b/qcom/bengal-thermal.dtsi @@ -1,5 +1,4 @@ -#include -#include +#include &cpufreq_hw { #address-cells = <1>; @@ -24,51 +23,106 @@ #thermal-sensor-cells = <0>; }; - qcom,cpu-isolation { - compatible = "qcom,cpu-isolate"; - cpu0_isolate: cpu0-isolate { - qcom,cpu = <&CPU0>; + qcom,cpu-pause { + compatible = "qcom,thermal-pause"; + + cpu0_pause: cpu0-pause { + qcom,cpus = <&CPU0>; #cooling-cells = <2>; }; - cpu1_isolate: cpu1-isolate { - qcom,cpu = <&CPU1>; + cpu1_pause: cpu1-pause { + qcom,cpus = <&CPU1>; #cooling-cells = <2>; }; - cpu2_isolate: cpu2-isolate { - qcom,cpu = <&CPU2>; + cpu2_pause: cpu2-pause { + qcom,cpus = <&CPU2>; #cooling-cells = <2>; }; - cpu3_isolate: cpu3-isolate { - qcom,cpu = <&CPU3>; + cpu3_pause: cpu3-pause { + qcom,cpus = <&CPU3>; #cooling-cells = <2>; }; - cpu4_isolate: cpu4-isolate { - qcom,cpu = <&CPU4>; + cpu4_pause: cpu4-pause { + qcom,cpus = <&CPU4>; #cooling-cells = <2>; }; - cpu5_isolate: cpu5-isolate { - qcom,cpu = <&CPU5>; + cpu5_pause: cpu5-pause { + qcom,cpus = <&CPU5>; #cooling-cells = <2>; }; - cpu6_isolate: cpu6-isolate { - qcom,cpu = <&CPU6>; + cpu6_pause: cpu6-pause { + qcom,cpus = <&CPU6>; #cooling-cells = <2>; }; - cpu7_isolate: cpu7-isolate { - qcom,cpu = <&CPU7>; + cpu7_pause: cpu7-pause { + qcom,cpus = <&CPU7>; #cooling-cells = <2>; }; + + /* Thermal-engine cooling devices */ + pause-cpu0 { + qcom,cpus = <&CPU0>; + qcom,cdev-alias = "pause-cpu0"; + }; + + pause-cpu1 { + qcom,cpus = <&CPU1>; + qcom,cdev-alias = "pause-cpu1"; + }; + + pause-cpu2 { + qcom,cpus = <&CPU2>; + qcom,cdev-alias = "pause-cpu2"; + }; + + pause-cpu3 { + qcom,cpus = <&CPU3>; + qcom,cdev-alias = "pause-cpu3"; + }; + + pause-cpu4 { + qcom,cpus = <&CPU4>; + qcom,cdev-alias = "pause-cpu4"; + }; + + pause-cpu5 { + qcom,cpus = <&CPU5>; + qcom,cdev-alias = "pause-cpu5"; + }; + + pause-cpu6 { + qcom,cpus = <&CPU6>; + qcom,cdev-alias = "pause-cpu6"; + }; + + pause-cpu7 { + qcom,cpus = <&CPU7>; + qcom,cdev-alias = "pause-cpu7"; + }; }; }; &soc { + tsens0:tsens@c222000 { + compatible = "qcom,tsens24xx"; + reg = <0x04410000 0x8>, + <0x04411000 0x1ff>; + reg-names = "tsens_srot_physical", + "tsens_tm_physical"; + interrupts = , + ; + interrupt-names = "tsens-upper-lower", "tsens-critical"; + tsens-reinit-wa; + #thermal-sensor-cells = <1>; + }; + qmi-tmd-devices { compatible = "qcom,qmi-cooling-devices"; @@ -147,14 +201,12 @@ }; &thermal_zones { - mapss-usr { + mapss { polling-delay-passive = <0>; polling-delay = <0>; - thermal-governor = "user_space"; thermal-sensors = <&tsens0 0>; - wake-capable-sensor; trips { - active-config0 { + thermal-engine-config { temperature = <125000>; hysteresis = <1000>; type = "passive"; @@ -168,658 +220,17 @@ }; }; - cdsp-hvx-usr { + cdsp-hvx { polling-delay-passive = <0>; polling-delay = <0>; - thermal-governor = "user_space"; - thermal-sensors = <&tsens0 1>; - wake-capable-sensor; - trips { - active-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - - reset-mon-cfg { - temperature = <115000>; - hysteresis = <5000>; - type = "passive"; - }; - }; - }; - - wlan-usr { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-governor = "user_space"; - thermal-sensors = <&tsens0 2>; - wake-capable-sensor; - trips { - active-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - - reset-mon-cfg { - temperature = <115000>; - hysteresis = <5000>; - type = "passive"; - }; - }; - }; - - camera-usr { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-governor = "user_space"; - thermal-sensors = <&tsens0 3>; - wake-capable-sensor; - trips { - active-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - - reset-mon-cfg { - temperature = <115000>; - hysteresis = <5000>; - type = "passive"; - }; - }; - }; - - video-usr { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-governor = "user_space"; - thermal-sensors = <&tsens0 4>; - wake-capable-sensor; - trips { - active-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - - reset-mon-cfg { - temperature = <115000>; - hysteresis = <5000>; - type = "passive"; - }; - }; - }; - - mdm-1-usr { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-governor = "user_space"; - thermal-sensors = <&tsens0 5>; - wake-capable-sensor; - trips { - active-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - - reset-mon-cfg { - temperature = <115000>; - hysteresis = <5000>; - type = "passive"; - }; - }; - }; - - cpu-1-0-usr { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-governor = "user_space"; - thermal-sensors = <&tsens0 6>; - wake-capable-sensor; - trips { - active-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - - reset-mon-cfg { - temperature = <115000>; - hysteresis = <5000>; - type = "passive"; - }; - }; - }; - - cpu-1-1-usr { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-governor = "user_space"; - thermal-sensors = <&tsens0 7>; - wake-capable-sensor; - trips { - active-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - - reset-mon-cfg { - temperature = <115000>; - hysteresis = <5000>; - type = "passive"; - }; - }; - }; - - cpu-1-2-usr { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-governor = "user_space"; - thermal-sensors = <&tsens0 8>; - wake-capable-sensor; - trips { - active-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - - reset-mon-cfg { - temperature = <115000>; - hysteresis = <5000>; - type = "passive"; - }; - }; - }; - - cpu-1-3-usr { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-governor = "user_space"; - thermal-sensors = <&tsens0 9>; - wake-capable-sensor; - trips { - active-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - - reset-mon-cfg { - temperature = <115000>; - hysteresis = <5000>; - type = "passive"; - }; - }; - }; - - cpuss-0-usr { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-governor = "user_space"; - thermal-sensors = <&tsens0 10>; - wake-capable-sensor; - trips { - active-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - - reset-mon-cfg { - temperature = <115000>; - hysteresis = <5000>; - type = "passive"; - }; - }; - }; - - cpuss-1-usr { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-governor = "user_space"; - thermal-sensors = <&tsens0 11>; - wake-capable-sensor; - trips { - active-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - - reset-mon-cfg { - temperature = <115000>; - hysteresis = <5000>; - type = "passive"; - }; - }; - }; - - cpuss-2-usr { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-governor = "user_space"; - thermal-sensors = <&tsens0 12>; - wake-capable-sensor; - trips { - active-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - - reset-mon-cfg { - temperature = <115000>; - hysteresis = <5000>; - type = "passive"; - }; - }; - }; - - mdm-0-usr { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-governor = "user_space"; - thermal-sensors = <&tsens0 13>; - wake-capable-sensor; - trips { - active-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - - reset-mon-cfg { - temperature = <115000>; - hysteresis = <5000>; - type = "passive"; - }; - }; - }; - - display-usr { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-governor = "user_space"; - thermal-sensors = <&tsens0 14>; - wake-capable-sensor; - trips { - active-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - - reset-mon-cfg { - temperature = <115000>; - hysteresis = <5000>; - type = "passive"; - }; - }; - }; - - gpu-usr { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-governor = "user_space"; - thermal-sensors = <&tsens0 15>; - wake-capable-sensor; - trips { - active-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - - reset-mon-cfg { - temperature = <115000>; - hysteresis = <5000>; - type = "passive"; - }; - }; - }; - - xo-therm-usr { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-governor = "user_space"; - thermal-sensors = <&pm6125_adc_tm ADC5_XO_THERM_100K_PU>; - wake-capable-sensor; - trips { - active-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - - active-config1 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - }; - }; - - pa-therm0-usr { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-governor = "user_space"; - thermal-sensors = <&pm6125_adc_tm ADC5_AMUX_THM1_100K_PU>; - wake-capable-sensor; - trips { - active-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - }; - }; - - quiet-therm-usr { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-governor = "user_space"; - thermal-sensors = <&pm6125_adc_tm ADC5_AMUX_THM2_100K_PU>; - wake-capable-sensor; - trips { - active-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - }; - }; - - camera-therm-usr { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-governor = "user_space"; - thermal-sensors = <&pm6125_adc_tm_iio ADC5_GPIO1_100K_PU>; - wake-capable-sensor; - trips { - active-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - }; - }; - - emmc-ufs-therm-usr { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-governor = "user_space"; - thermal-sensors = <&pm6125_adc_tm_iio ADC5_GPIO2_100K_PU>; - wake-capable-sensor; - trips { - active-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - }; - }; - - gpu-step { - polling-delay-passive = <10>; - polling-delay = <0>; - thermal-governor = "step_wise"; - thermal-sensors = <&tsens0 15>; - wake-capable-sensor; - trips { - gpu_step_trip: gpu-trip { - temperature = <95000>; - hysteresis = <0>; - type = "passive"; - }; - - gpu_cx_mon: gpu-cx-mon { - temperature = <100000>; - hysteresis = <5000>; - type = "passive"; - }; - }; - - cooling-maps { - gpu_cdev { - trip = <&gpu_step_trip>; - }; - - gpu-cx-cdev0 { - trip = <&gpu_cx_mon>; - }; - - gpu-cx-cdev1 { - trip = <&gpu_cx_mon>; - cooling-device = <&modem_proc 3 3>; - }; - - gpu-cx-cdev2 { - trip = <&gpu_cx_mon>; - cooling-device = <&modem_pa 3 3>; - }; - - gpu-cx-cdev3 { - trip = <&gpu_cx_mon>; - cooling-device = <&cdsp_sw THERMAL_MAX_LIMIT - THERMAL_MAX_LIMIT>; - }; - }; - }; - - hepta-cpu-max-step { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-governor = "step_wise"; - wake-capable-sensor; - - trips { - silver-trip { - temperature = <120000>; - hysteresis = <0>; - type = "passive"; - }; - }; - }; - - cpuss-0-step { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-governor = "step_wise"; - thermal-sensors = <&tsens0 10>; - wake-capable-sensor; - - trips { - cpu4_5_config: cpu-4-5-config { - temperature = <110000>; - hysteresis = <10000>; - type = "passive"; - }; - }; - - cooling-maps { - cpu4_cdev { - trip = <&cpu4_5_config>; - cooling-device = <&cpu4_isolate 1 1>; - }; - - cpu5_cdev { - trip = <&cpu4_5_config>; - cooling-device = <&cpu5_isolate 1 1>; - }; - }; - }; - - cpuss-1-step { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-governor = "step_wise"; - thermal-sensors = <&tsens0 11>; - wake-capable-sensor; - - trips { - cpu6_7_config: cpu-6-7-config { - temperature = <110000>; - hysteresis = <10000>; - type = "passive"; - }; - }; - - cooling-maps { - cpu6_cdev { - trip = <&cpu6_7_config>; - cooling-device = <&cpu6_isolate 1 1>; - }; - - cpu7_cdev { - trip = <&cpu6_7_config>; - cooling-device = <&cpu7_isolate 1 1>; - }; - }; - }; - - cpuss-2-step { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-governor = "step_wise"; - thermal-sensors = <&tsens0 12>; - wake-capable-sensor; - - trips { - silv_cpus_config: silv-cpus-config { - temperature = <110000>; - hysteresis = <10000>; - type = "passive"; - }; - }; - - cooling-maps { - cpu0_cdev { - trip = <&silv_cpus_config>; - cooling-device = <&cpu0_isolate 1 1>; - }; - - cpu1_cdev { - trip = <&silv_cpus_config>; - cooling-device = <&cpu1_isolate 1 1>; - }; - - cpu2_cdev { - trip = <&silv_cpus_config>; - cooling-device = <&cpu2_isolate 1 1>; - }; - - cpu3_cdev { - trip = <&silv_cpus_config>; - cooling-device = <&cpu3_isolate 1 1>; - }; - }; - }; - - cpu-1-0-step { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-governor = "step_wise"; - thermal-sensors = <&tsens0 6>; - wake-capable-sensor; - - trips { - cpu4_config: cpu4-config { - temperature = <110000>; - hysteresis = <10000>; - type = "passive"; - }; - }; - - cooling-maps { - cpu4_cdev { - trip = <&cpu4_config>; - cooling-device = <&cpu4_isolate 1 1>; - }; - }; - }; - - cpu-1-1-step { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-governor = "step_wise"; - thermal-sensors = <&tsens0 7>; - wake-capable-sensor; - - trips { - cpu5_config: cpu5-config { - temperature = <110000>; - hysteresis = <10000>; - type = "passive"; - }; - }; - - cooling-maps { - cpu5_cdev { - trip = <&cpu5_config>; - cooling-device = <&cpu5_isolate 1 1>; - }; - }; - }; - - cpu-1-2-step { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-governor = "step_wise"; - thermal-sensors = <&tsens0 8>; - wake-capable-sensor; - - trips { - cpu6_config: cpu6-config { - temperature = <110000>; - hysteresis = <10000>; - type = "passive"; - }; - }; - - cooling-maps { - cpu6_cdev { - trip = <&cpu6_config>; - cooling-device = <&cpu6_isolate 1 1>; - }; - }; - }; - - cpu-1-3-step { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-governor = "step_wise"; - thermal-sensors = <&tsens0 9>; - wake-capable-sensor; - - trips { - cpu7_config: cpu7-config { - temperature = <110000>; - hysteresis = <10000>; - type = "passive"; - }; - }; - - cooling-maps { - cpu7_cdev { - trip = <&cpu7_config>; - cooling-device = <&cpu7_isolate 1 1>; - }; - }; - }; - - cdsp-hvx-step { - polling-delay-passive = <10>; - polling-delay = <0>; thermal-sensors = <&tsens0 1>; - thermal-governor = "step_wise"; - wake-capable-sensor; - trips { + thermal-engine-config { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + cdsp_trip0: cdsp-trip0 { temperature = <95000>; hysteresis = <20000>; @@ -837,6 +248,12 @@ hysteresis = <5000>; type = "passive"; }; + + reset-mon-cfg { + temperature = <115000>; + hysteresis = <5000>; + type = "passive"; + }; }; cooling-maps { @@ -867,61 +284,90 @@ cdsp-cx-cdev3 { trip = <&cdsp_cx_mon>; - cooling-device = <&cdsp_sw THERMAL_MAX_LIMIT - THERMAL_MAX_LIMIT>; + cooling-device = <&cdsp_sw 4 4>; }; }; }; - mdm-0-step { + wlan { polling-delay-passive = <0>; polling-delay = <0>; - thermal-governor = "step_wise"; - thermal-sensors = <&tsens0 13>; - wake-capable-sensor; + thermal-sensors = <&tsens0 2>; trips { - mdm0_cx_mon: mdm0-cx-mon { - temperature = <100000>; + thermal-engine-config { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + + reset-mon-cfg { + temperature = <115000>; hysteresis = <5000>; type = "passive"; }; }; + }; - cooling-maps { - mdm0-cx-cdev0 { - trip = <&mdm0_cx_mon>; + camera { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&tsens0 3>; + trips { + thermal-engine-config { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; }; - mdm0-cx-cdev1 { - trip = <&mdm0_cx_mon>; - cooling-device = <&modem_proc 3 3>; - }; - - mdm0-cx-cdev2 { - trip = <&mdm0_cx_mon>; - cooling-device = <&modem_pa 3 3>; - }; - - mdm0-cx-cdev3 { - trip = <&mdm0_cx_mon>; - cooling-device = <&cdsp_sw THERMAL_MAX_LIMIT - THERMAL_MAX_LIMIT>; + reset-mon-cfg { + temperature = <115000>; + hysteresis = <5000>; + type = "passive"; }; }; }; - mdm-1-step { + video { polling-delay-passive = <0>; polling-delay = <0>; - thermal-governor = "step_wise"; - thermal-sensors = <&tsens0 5>; - wake-capable-sensor; + thermal-sensors = <&tsens0 4>; trips { + thermal-engine-config { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + + reset-mon-cfg { + temperature = <115000>; + hysteresis = <5000>; + type = "passive"; + }; + }; + }; + + mdm-1 { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&tsens0 5>; + trips { + thermal-engine-config { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + mdm1_cx_mon: mdm1-cx-mon { temperature = <100000>; hysteresis = <5000>; type = "passive"; }; + + reset-mon-cfg { + temperature = <115000>; + hysteresis = <5000>; + type = "passive"; + }; }; cooling-maps { @@ -941,147 +387,473 @@ mdm1-cx-cdev3 { trip = <&mdm1_cx_mon>; - cooling-device = <&cdsp_sw THERMAL_MAX_LIMIT - THERMAL_MAX_LIMIT>; + cooling-device = <&cdsp_sw 4 4>; }; }; }; - mapss-lowc { + cpu-1-0 { polling-delay-passive = <0>; polling-delay = <0>; - thermal-governor = "low_limits_cap"; - thermal-sensors = <&tsens0 0>; - wake-capable-sensor; - tracks-low; - + thermal-sensors = <&tsens0 6>; trips { - mapss_cap_trip: mapss-cap-trip { - temperature = <5000>; + thermal-engine-config { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + + thermal-hal-config { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + + cpu4_config: cpu4-config { + temperature = <110000>; + hysteresis = <10000>; + type = "passive"; + }; + + reset-mon-cfg { + temperature = <115000>; hysteresis = <5000>; type = "passive"; }; }; cooling-maps { - lmh_cpu_cdev { - trip = <&mapss_cap_trip>; - cooling-device = <&lmh_cpu_vdd 1 1>; + cpu4_cdev { + trip = <&cpu4_config>; + cooling-device = <&cpu4_pause 1 1>; }; }; }; - mapss-lowf { + cpu-1-1 { polling-delay-passive = <0>; polling-delay = <0>; - thermal-governor = "low_limits_floor"; - thermal-sensors = <&tsens0 0>; - wake-capable-sensor; - tracks-low; - + thermal-sensors = <&tsens0 7>; trips { - mapss_trip: mapss-trip { - temperature = <5000>; + thermal-engine-config { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + + thermal-hal-config { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + + cpu5_config: cpu5-config { + temperature = <110000>; + hysteresis = <10000>; + type = "passive"; + }; + + reset-mon-cfg { + temperature = <115000>; hysteresis = <5000>; type = "passive"; }; }; cooling-maps { - cx_vdd_cdev { - trip = <&mapss_trip>; - cooling-device = <&cx_cdev 0 0>; - }; - - mx_vdd_cdev { - trip = <&mapss_trip>; - cooling-device = <&mx_cdev 0 0>; - }; - - modem_vdd_cdev { - trip = <&mapss_trip>; - cooling-device = <&modem_vdd 0 0>; - }; - - adsp_vdd_cdev { - trip = <&mapss_trip>; - cooling-device = <&adsp_vdd 0 0>; + cpu5_cdev { + trip = <&cpu5_config>; + cooling-device = <&cpu5_pause 1 1>; }; }; }; - camera-lowc { + cpu-1-2 { polling-delay-passive = <0>; polling-delay = <0>; - thermal-governor = "low_limits_cap"; - thermal-sensors = <&tsens0 3>; - wake-capable-sensor; - tracks-low; - + thermal-sensors = <&tsens0 8>; trips { - camera_cap_trip: camera-cap-trip { - temperature = <5000>; + thermal-engine-config { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + + thermal-hal-config { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + + cpu6_config: cpu6-config { + temperature = <110000>; + hysteresis = <10000>; + type = "passive"; + }; + + reset-mon-cfg { + temperature = <115000>; hysteresis = <5000>; type = "passive"; }; }; cooling-maps { - lmh_cpu_cdev { - trip = <&camera_cap_trip>; - cooling-device = <&lmh_cpu_vdd 1 1>; + cpu6_cdev { + trip = <&cpu6_config>; + cooling-device = <&cpu6_pause 1 1>; }; }; }; - camera-lowf { + cpu-1-3 { polling-delay-passive = <0>; polling-delay = <0>; - thermal-governor = "low_limits_floor"; - thermal-sensors = <&tsens0 3>; - wake-capable-sensor; - tracks-low; - + thermal-sensors = <&tsens0 9>; trips { - camera_trip: camera-trip { - temperature = <5000>; + thermal-engine-config { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + + thermal-hal-config { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + + cpu7_config: cpu7-config { + temperature = <110000>; + hysteresis = <10000>; + type = "passive"; + }; + + reset-mon-cfg { + temperature = <115000>; hysteresis = <5000>; type = "passive"; }; }; cooling-maps { - cx_vdd_cdev { - trip = <&camera_trip>; - cooling-device = <&cx_cdev 0 0>; - }; - - mx_vdd_cdev { - trip = <&camera_trip>; - cooling-device = <&mx_cdev 0 0>; - }; - - modem_vdd_cdev { - trip = <&camera_trip>; - cooling-device = <&modem_vdd 0 0>; - }; - - adsp_vdd_cdev { - trip = <&camera_trip>; - cooling-device = <&adsp_vdd 0 0>; + cpu7_cdev { + trip = <&cpu7_config>; + cooling-device = <&cpu7_pause 1 1>; }; }; }; - quiet-therm-step { - polling-delay-passive = <2000>; + cpuss-0 { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&tsens0 10>; + trips { + thermal-engine-config { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + + thermal-hal-config { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + + cpu4_5_config: cpu-4-5-config { + temperature = <110000>; + hysteresis = <10000>; + type = "passive"; + }; + + reset-mon-cfg { + temperature = <115000>; + hysteresis = <5000>; + type = "passive"; + }; + }; + + cooling-maps { + cpu4_cdev { + trip = <&cpu4_5_config>; + cooling-device = <&cpu4_pause 1 1>; + }; + + cpu5_cdev { + trip = <&cpu4_5_config>; + cooling-device = <&cpu5_pause 1 1>; + }; + }; + }; + + cpuss-1 { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&tsens0 11>; + trips { + thermal-engine-config { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + + thermal-hal-config { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + + cpu6_7_config: cpu-6-7-config { + temperature = <110000>; + hysteresis = <10000>; + type = "passive"; + }; + + reset-mon-cfg { + temperature = <115000>; + hysteresis = <5000>; + type = "passive"; + }; + }; + + cooling-maps { + cpu6_cdev { + trip = <&cpu6_7_config>; + cooling-device = <&cpu6_pause 1 1>; + }; + + cpu7_cdev { + trip = <&cpu6_7_config>; + cooling-device = <&cpu7_pause 1 1>; + }; + }; + }; + + cpuss-2 { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&tsens0 12>; + trips { + thermal-engine-config { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + + thermal-hal-config { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + + silv_cpus_config: silv-cpus-config { + temperature = <110000>; + hysteresis = <10000>; + type = "passive"; + }; + + reset-mon-cfg { + temperature = <115000>; + hysteresis = <5000>; + type = "passive"; + }; + }; + + cooling-maps { + cpu0_cdev { + trip = <&silv_cpus_config>; + cooling-device = <&cpu0_pause 1 1>; + }; + + cpu1_cdev { + trip = <&silv_cpus_config>; + cooling-device = <&cpu1_pause 1 1>; + }; + + cpu2_cdev { + trip = <&silv_cpus_config>; + cooling-device = <&cpu2_pause 1 1>; + }; + + cpu3_cdev { + trip = <&silv_cpus_config>; + cooling-device = <&cpu3_pause 1 1>; + }; + }; + }; + + mdm-0 { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&tsens0 13>; + trips { + thermal-engine-config { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + + mdm0_cx_mon: mdm0-cx-mon { + temperature = <100000>; + hysteresis = <5000>; + type = "passive"; + }; + + reset-mon-cfg { + temperature = <115000>; + hysteresis = <5000>; + type = "passive"; + }; + }; + + cooling-maps { + mdm0-cx-cdev0 { + trip = <&mdm0_cx_mon>; + }; + + mdm0-cx-cdev1 { + trip = <&mdm0_cx_mon>; + cooling-device = <&modem_proc 3 3>; + }; + + mdm0-cx-cdev2 { + trip = <&mdm0_cx_mon>; + cooling-device = <&modem_pa 3 3>; + }; + + mdm0-cx-cdev3 { + trip = <&mdm0_cx_mon>; + cooling-device = <&cdsp_sw 4 4>; + }; + }; + }; + + display { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&tsens0 14>; + trips { + thermal-engine-config { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + + reset-mon-cfg { + temperature = <115000>; + hysteresis = <5000>; + type = "passive"; + }; + }; + }; + + gpu { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&tsens0 15>; + trips { + thermal-engine-config { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + + thermal-hal-config { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + + gpu_step_trip: gpu-trip { + temperature = <95000>; + hysteresis = <0>; + type = "passive"; + }; + + gpu_cx_mon: gpu-cx-mon { + temperature = <100000>; + hysteresis = <5000>; + type = "passive"; + }; + + reset-mon-cfg { + temperature = <115000>; + hysteresis = <5000>; + type = "passive"; + }; + }; + + cooling-maps { + gpu_cdev { + trip = <&gpu_step_trip>; + }; + + gpu-cx-cdev0 { + trip = <&gpu_cx_mon>; + }; + + gpu-cx-cdev1 { + trip = <&gpu_cx_mon>; + cooling-device = <&modem_proc 3 3>; + }; + + gpu-cx-cdev2 { + trip = <&gpu_cx_mon>; + cooling-device = <&modem_pa 3 3>; + }; + + gpu-cx-cdev3 { + trip = <&gpu_cx_mon>; + cooling-device = <&cdsp_sw 4 4>; + }; + }; + }; + + xo-therm { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&pm6125_adc_tm ADC5_XO_THERM_100K_PU>; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + + active-config1 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + pa-therm0 { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&pm6125_adc_tm ADC5_AMUX_THM1_100K_PU>; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + quiet-therm { + polling-delay-passive = <0>; polling-delay = <0>; - thermal-governor = "step_wise"; thermal-sensors = <&pm6125_adc_tm ADC5_AMUX_THM2_100K_PU>; - wake-capable-sensor; status = "disabled"; - trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + skin_batt_trip0: batt-trip0 { temperature = <39000>; hysteresis = <2000>; @@ -1158,14 +930,12 @@ cooling-maps { gold_cdev { trip = <&skin_gold_trip>; - cooling-device = <&CPU4 THERMAL_NO_LIMIT - (THERMAL_MAX_LIMIT-4)>; + cooling-device = <&CPU4 0 3>; }; silver_cdev { trip = <&skin_silver_trip>; - cooling-device = <&CPU0 THERMAL_NO_LIMIT - (THERMAL_MAX_LIMIT-5)>; + cooling-device = <&CPU0 0 2>; }; gpu_cdev { @@ -1174,8 +944,7 @@ hvx_cdev { trip = <&skin_hvx_trip>; - cooling-device = <&cdsp_sw THERMAL_MAX_LIMIT - THERMAL_MAX_LIMIT>; + cooling-device = <&cdsp_sw 4 4>; }; mdm_cdev0 { @@ -1220,4 +989,30 @@ }; }; }; + + camera-therm { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&pm6125_adc_tm_iio ADC5_GPIO1_100K_PU>; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + emmc-ufs-therm { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&pm6125_adc_tm_iio ADC5_GPIO2_100K_PU>; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; }; diff --git a/qcom/khaje-thermal-pm7250b-overlay.dtsi b/qcom/khaje-thermal-pm7250b-overlay.dtsi index c26053dc..7701c393 100644 --- a/qcom/khaje-thermal-pm7250b-overlay.dtsi +++ b/qcom/khaje-thermal-pm7250b-overlay.dtsi @@ -6,15 +6,13 @@ trip0_bat { trip = <&pm7250b_trip0>; cooling-device = - <&pm7250b_charger (THERMAL_MAX_LIMIT-1) - (THERMAL_MAX_LIMIT-1)>; + <&pm7250b_charger 15 15>; }; trip1_bat { trip = <&pm7250b_trip1>; cooling-device = - <&pm7250b_charger THERMAL_MAX_LIMIT - THERMAL_MAX_LIMIT>; + <&pm7250b_charger 16 16>; }; }; }; @@ -23,22 +21,22 @@ cooling-maps { soc_cpu4 { trip = <&soc_trip>; - cooling-device = <&cpu4_isolate 1 1>; + cooling-device = <&cpu4_pause 1 1>; }; soc_cpu5 { trip = <&soc_trip>; - cooling-device = <&cpu5_isolate 1 1>; + cooling-device = <&cpu5_pause 1 1>; }; soc_cpu6 { trip = <&soc_trip>; - cooling-device = <&cpu6_isolate 1 1>; + cooling-device = <&cpu6_pause 1 1>; }; soc_cpu7 { trip = <&soc_trip>; - cooling-device = <&cpu7_isolate 1 1>; + cooling-device = <&cpu7_pause 1 1>; }; }; }; @@ -47,19 +45,17 @@ cooling-maps { lbat0_cpufreq4 { trip = <&b_bcl_lvl0>; - cooling-device = - <&CPU4 (THERMAL_MAX_LIMIT-4) - (THERMAL_MAX_LIMIT-4)>; + cooling-device = <&CPU4 2 2>; }; lbat0_cpu6 { trip = <&b_bcl_lvl0>; - cooling-device = <&cpu6_isolate 1 1>; + cooling-device = <&cpu6_pause 1 1>; }; lbat0_cpu7 { trip = <&b_bcl_lvl0>; - cooling-device = <&cpu7_isolate 1 1>; + cooling-device = <&cpu7_pause 1 1>; }; lbat0_gpu { @@ -77,12 +73,12 @@ cooling-maps { lbat1_cpu4 { trip = <&b_bcl_lvl1>; - cooling-device = <&cpu4_isolate 1 1>; + cooling-device = <&cpu4_pause 1 1>; }; lbat1_cpu5 { trip = <&b_bcl_lvl1>; - cooling-device = <&cpu5_isolate 1 1>; + cooling-device = <&cpu5_pause 1 1>; }; lbat1_gpu { @@ -104,8 +100,7 @@ lbat2_cdsp { trip = <&b_bcl_lvl2>; - cooling-device = <&cdsp_sw THERMAL_MAX_LIMIT - THERMAL_MAX_LIMIT>; + cooling-device = <&cdsp_sw 4 4>; }; }; }; diff --git a/qcom/khaje.dtsi b/qcom/khaje.dtsi index b3abc4ff..517fa80f 100644 --- a/qcom/khaje.dtsi +++ b/qcom/khaje.dtsi @@ -2709,19 +2709,6 @@ thermal_zones: thermal-zones {}; - tsens0:tsens@c222000 { - compatible = "qcom,tsens24xx"; - reg = <0x04410000 0x8>, - <0x04411000 0x1ff>; - reg-names = "tsens_srot_physical", - "tsens_tm_physical"; - interrupts = , - ; - interrupt-names = "tsens-upper-lower", "tsens-critical"; - tsens-reinit-wa; - #thermal-sensor-cells = <1>; - }; - qcom,secure-buffer { compatible = "qcom,secure-buffer"; }; @@ -4080,22 +4067,3 @@ tpdm_turing_llm: tpdm@8861000 { }; }; -&thermal_zones { - mapss-lowc { - cooling-maps { - rpm_smd_vdd_cdev { - trip = <&mapss_cap_trip>; - cooling-device = <&rpm_smd_cdev 2 2>; - }; - }; - }; - - camera-lowc { - cooling-maps { - rpm_smd_vdd_cdev { - trip = <&camera_cap_trip>; - cooling-device = <&rpm_smd_cdev 2 2>; - }; - }; - }; -};