diff --git a/qcom/monaco-thermal-overlay.dtsi b/qcom/monaco-thermal-overlay.dtsi index eba02e00..d9b05e60 100644 --- a/qcom/monaco-thermal-overlay.dtsi +++ b/qcom/monaco-thermal-overlay.dtsi @@ -12,12 +12,12 @@ trip1_cpu2 { trip = <&pm5100_trip0>; - cooling-device = <&cpu2_isolate 1 1>; + cooling-device = <&cpu2_pause 1 1>; }; trip1_cpu3 { trip = <&pm5100_trip0>; - cooling-device = <&cpu3_isolate 1 1>; + cooling-device = <&cpu3_pause 1 1>; }; }; }; @@ -33,12 +33,12 @@ cpu2_cdev { trip = <&bcl_lvl0>; - cooling-device = <&cpu2_isolate 1 1>; + cooling-device = <&cpu2_pause 1 1>; }; cpu3_cdev { trip = <&bcl_lvl0>; - cooling-device = <&cpu3_isolate 1 1>; + cooling-device = <&cpu3_pause 1 1>; }; gpu_cdev { @@ -60,7 +60,7 @@ cpu1_cdev { trip = <&bcl_lvl1>; - cooling-device = <&cpu1_isolate 1 1>; + cooling-device = <&cpu1_pause 1 1>; }; gpu_cdev { @@ -88,12 +88,12 @@ soc_cpu2 { trip = <&socd_trip>; - cooling-device = <&cpu2_isolate 1 1>; + cooling-device = <&cpu2_pause 1 1>; }; soc_cpu3 { trip = <&socd_trip>; - cooling-device = <&cpu3_isolate 1 1>; + cooling-device = <&cpu3_pause 1 1>; }; gpu_cdev { diff --git a/qcom/monaco-thermal.dtsi b/qcom/monaco-thermal.dtsi index 31ccb318..ae46ae06 100644 --- a/qcom/monaco-thermal.dtsi +++ b/qcom/monaco-thermal.dtsi @@ -1,6 +1,10 @@ #include -&cpufreq_hw { +&msm_gpu { + #cooling-cells = <2>; +}; + +&soc { #address-cells = <1>; #size-cells = <1>; lmh_dcvs0: qcom,limits-dcvs@f550800 { @@ -9,42 +13,61 @@ qcom,affinity = <0>; reg = <0xf550800 0x1000>, <0xf521000 0x1000>; - qcom,no-cooling-device-register; }; - 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>; }; + + /* 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"; + }; }; -}; -&soc { tsens0:tsens@4410000 { compatible = "qcom,tsens26xx"; reg = <0x04410000 0x20>, <0x04411000 0x140>; reg-names = "tsens_srot_physical", "tsens_tm_physical"; - interrupts-extended = <&intc 0 275 IRQ_TYPE_LEVEL_HIGH>, - <&intc 0 190 IRQ_TYPE_LEVEL_HIGH>, + interrupts-extended = <&intc GIC_SPI 275 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>, <&mpm 89 IRQ_TYPE_EDGE_RISING>; interrupt-names = "tsens-upper-lower", "tsens-critical", @@ -111,15 +134,218 @@ reg = <0xf550800 0x1000>; #cooling-cells = <2>; }; + + qcom,devfreq-cdev { + compatible = "qcom,devfreq-cdev"; + qcom,devfreq = <&msm_gpu>; + }; + + qcom,cpufreq-cdev { + compatible = "qcom,cpufreq-cdev"; + qcom,cpus = <&CPU0>; + }; }; &thermal_zones { - gpu-step { - polling-delay-passive = <10>; + mapss { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&tsens0 0>; + trips { + thermal-engine-config { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + + reset-mon-cfg { + temperature = <115000>; + hysteresis = <5000>; + type = "passive"; + }; + }; + }; + + wlan { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&tsens0 1>; + trips { + thermal-engine-config { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + + reset-mon-cfg { + temperature = <115000>; + hysteresis = <5000>; + type = "passive"; + }; + }; + }; + + cpuss-0 { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&tsens0 2>; + trips { + thermal-engine-config { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + + cpu0_2_config: cpu-0-2-config { + temperature = <100000>; + hysteresis = <10000>; + type = "passive"; + }; + + reset-mon-cfg { + temperature = <115000>; + hysteresis = <5000>; + type = "passive"; + }; + }; + + cooling-maps { + cpu0_cdev { + trip = <&cpu0_2_config>; + cooling-device = <&cpu0_pause 1 1>; + }; + + cpu2_cdev { + trip = <&cpu0_2_config>; + cooling-device = <&cpu2_pause 1 1>; + }; + }; + }; + + cpuss-1 { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&tsens0 3>; + trips { + thermal-engine-config { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + + cpu1_3_config: cpu-1-3-config { + temperature = <100000>; + hysteresis = <10000>; + type = "passive"; + }; + + reset-mon-cfg { + temperature = <115000>; + hysteresis = <5000>; + type = "passive"; + }; + }; + + cooling-maps { + cpu1_cdev { + trip = <&cpu1_3_config>; + cooling-device = <&cpu1_pause 1 1>; + }; + + cpu3_cdev { + trip = <&cpu1_3_config>; + cooling-device = <&cpu3_pause 1 1>; + }; + }; + }; + + mdm-0 { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&tsens0 4>; + trips { + thermal-engine-config { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + + mdm0_cx_mon: mdm0-cx-mon { + temperature = <90000>; + hysteresis = <5000>; + type = "passive"; + }; + + reset-mon-cfg { + temperature = <115000>; + hysteresis = <5000>; + type = "passive"; + }; + }; + + cooling-maps { + mdm0-cx-cdev0 { + trip = <&mdm0_cx_mon>; + cooling-device = <&msm_gpu THERMAL_MAX_LIMIT + THERMAL_MAX_LIMIT>; + }; + + mdm0-cx-cdev1 { + trip = <&mdm0_cx_mon>; + cooling-device = <&modem_tj 3 3>; + }; + }; + }; + + 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 = <90000>; + hysteresis = <5000>; + type = "passive"; + }; + + reset-mon-cfg { + temperature = <115000>; + hysteresis = <5000>; + type = "passive"; + }; + }; + + cooling-maps { + mdm1-cx-cdev0 { + trip = <&mdm1_cx_mon>; + cooling-device = <&msm_gpu THERMAL_MAX_LIMIT + THERMAL_MAX_LIMIT>; + }; + + mdm1-cx-cdev1 { + trip = <&mdm1_cx_mon>; + cooling-device = <&modem_tj 3 3>; + }; + }; + }; + + gpu { + polling-delay-passive = <0>; polling-delay = <0>; - thermal-governor = "step_wise"; thermal-sensors = <&tsens0 6>; trips { + thermal-engine-config { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + gpu_step_trip: gpu-trip { temperature = <85000>; hysteresis = <0>; @@ -132,6 +358,11 @@ type = "passive"; }; + reset-mon-cfg { + temperature = <115000>; + hysteresis = <5000>; + type = "passive"; + }; }; cooling-maps { @@ -154,277 +385,29 @@ }; }; - cpuss-0-step { + camera { polling-delay-passive = <0>; polling-delay = <0>; - thermal-governor = "step_wise"; - thermal-sensors = <&tsens0 2>; - trips { - cpu0_2_config: cpu-0-2-config { - temperature = <100000>; - hysteresis = <10000>; - type = "passive"; - }; - }; - - cooling-maps { - cpu0_cdev { - trip = <&cpu0_2_config>; - cooling-device = <&cpu0_isolate 1 1>; - }; - - cpu2_cdev { - trip = <&cpu0_2_config>; - cooling-device = <&cpu2_isolate 1 1>; - }; - }; - }; - - cpuss-1-step { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-governor = "step_wise"; - thermal-sensors = <&tsens0 3>; - trips { - cpu1_3_config: cpu-1-3-config { - temperature = <100000>; - hysteresis = <10000>; - type = "passive"; - }; - }; - - cooling-maps { - cpu1_cdev { - trip = <&cpu1_3_config>; - cooling-device = <&cpu1_isolate 1 1>; - }; - - cpu3_cdev { - trip = <&cpu1_3_config>; - cooling-device = <&cpu3_isolate 1 1>; - }; - }; - }; - - mdm-0-step { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-governor = "step_wise"; - thermal-sensors = <&tsens0 4>; - trips { - mdm0_cx_mon: mdm0-cx-mon { - temperature = <90000>; - hysteresis = <5000>; - type = "passive"; - }; - }; - - cooling-maps { - mdm0-cx-cdev0 { - trip = <&mdm0_cx_mon>; - cooling-device = <&msm_gpu THERMAL_MAX_LIMIT - THERMAL_MAX_LIMIT>; - }; - - mdm0-cx-cdev1 { - trip = <&mdm0_cx_mon>; - cooling-device = <&modem_tj 3 3>; - }; - }; - }; - - mdm-1-step { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-governor = "step_wise"; - thermal-sensors = <&tsens0 5>; - trips { - mdm1_cx_mon: mdm1-cx-mon { - temperature = <90000>; - hysteresis = <5000>; - type = "passive"; - }; - }; - - cooling-maps { - mdm1-cx-cdev0 { - trip = <&mdm1_cx_mon>; - cooling-device = <&msm_gpu THERMAL_MAX_LIMIT - THERMAL_MAX_LIMIT>; - }; - - mdm1-cx-cdev1 { - trip = <&mdm1_cx_mon>; - cooling-device = <&modem_tj 3 3>; - }; - }; - }; - - mapss-usr { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-governor = "user_space"; - thermal-sensors = <&tsens0 0>; - trips { - active-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - - reset-mon-cfg { - temperature = <105000>; - hysteresis = <5000>; - type = "passive"; - }; - }; - }; - - wlan-usr { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-governor = "user_space"; - thermal-sensors = <&tsens0 1>; - trips { - active-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - - reset-mon-cfg { - temperature = <105000>; - hysteresis = <5000>; - type = "passive"; - }; - }; - }; - - cpuss-0-usr { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-governor = "user_space"; - thermal-sensors = <&tsens0 2>; - trips { - active-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - - reset-mon-cfg { - temperature = <105000>; - hysteresis = <5000>; - type = "passive"; - }; - }; - }; - - cpuss-1-usr { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-governor = "user_space"; - thermal-sensors = <&tsens0 3>; - trips { - active-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - - reset-mon-cfg { - temperature = <105000>; - hysteresis = <5000>; - type = "passive"; - }; - }; - }; - - mdm-0-usr { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-governor = "user_space"; - thermal-sensors = <&tsens0 4>; - trips { - active-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - - reset-mon-cfg { - temperature = <105000>; - hysteresis = <5000>; - type = "passive"; - }; - }; - }; - - mdm-1-usr { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-governor = "user_space"; - thermal-sensors = <&tsens0 5>; - trips { - active-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - - reset-mon-cfg { - temperature = <105000>; - hysteresis = <5000>; - type = "passive"; - }; - }; - }; - - gpu-usr { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-governor = "user_space"; - thermal-sensors = <&tsens0 6>; - trips { - active-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - - reset-mon-cfg { - temperature = <105000>; - hysteresis = <5000>; - type = "passive"; - }; - }; - }; - - camera-usr { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-governor = "user_space"; thermal-sensors = <&tsens0 7>; trips { - active-config0 { + thermal-engine-config { temperature = <125000>; hysteresis = <1000>; type = "passive"; }; reset-mon-cfg { - temperature = <105000>; + temperature = <115000>; hysteresis = <5000>; type = "passive"; }; }; }; - zeroc-0-step { + zeroc { polling-delay-passive = <0>; polling-delay = <0>; thermal-sensors = <&tsens0 16>; - thermal-governor = "step_wise"; trips { zeroc_0_trip: active-config0 { temperature = <1>; @@ -461,7 +444,6 @@ polling-delay = <0>; thermal-sensors = <&qmi_sensor (QMI_MODEM_INST_ID)>; - thermal-governor = "step_wise"; trips { rf_cal_trip: rf-cal-config { temperature = <2000>; diff --git a/qcom/pm5100.dtsi b/qcom/pm5100.dtsi index 39cce56e..121c119a 100644 --- a/qcom/pm5100.dtsi +++ b/qcom/pm5100.dtsi @@ -570,7 +570,6 @@ pm5100-ibat-lvl0 { polling-delay-passive = <0>; polling-delay = <0>; - thermal-governor = "step_wise"; thermal-sensors = <&pm5100_bcl 0>; trips { @@ -585,7 +584,6 @@ pm5100-ibat-lvl1 { polling-delay-passive = <0>; polling-delay = <0>; - thermal-governor = "step_wise"; thermal-sensors = <&pm5100_bcl 1>; trips { @@ -600,10 +598,15 @@ pm5100-bcl-lvl0 { polling-delay-passive = <100>; polling-delay = <0>; - thermal-governor = "step_wise"; thermal-sensors = <&pm5100_bcl 5>; trips { + thermal-engine-trip { + temperature = <100>; + hysteresis = <0>; + type = "passive"; + }; + bcl_lvl0: bcl-lvl0 { temperature = <1>; hysteresis = <1>; @@ -615,10 +618,15 @@ pm5100-bcl-lvl1 { polling-delay-passive = <100>; polling-delay = <0>; - thermal-governor = "step_wise"; thermal-sensors = <&pm5100_bcl 6>; trips { + thermal-engine-trip { + temperature = <100>; + hysteresis = <0>; + type = "passive"; + }; + bcl_lvl1: bcl-lvl1 { temperature = <1>; hysteresis = <1>; @@ -630,10 +638,15 @@ pm5100-bcl-lvl2 { polling-delay-passive = <100>; polling-delay = <0>; - thermal-governor = "step_wise"; thermal-sensors = <&pm5100_bcl 7>; trips { + thermal-engine-trip { + temperature = <100>; + hysteresis = <0>; + type = "passive"; + }; + bcl_lvl2: bcl-lvl2 { temperature = <1>; hysteresis = <1>; @@ -645,10 +658,15 @@ socd { polling-delay-passive = <100>; polling-delay = <0>; - thermal-governor = "step_wise"; thermal-sensors = <&bcl_soc>; trips { + thermal-engine-trip { + temperature = <100>; + hysteresis = <0>; + type = "passive"; + }; + socd_trip:socd-trip { temperature = <90>; hysteresis = <0>;