diff --git a/qcom/sun-thermal-modem.dtsi b/qcom/sun-thermal-modem.dtsi index aa9d625b..c6dddf92 100644 --- a/qcom/sun-thermal-modem.dtsi +++ b/qcom/sun-thermal-modem.dtsi @@ -1,6 +1,6 @@ // SPDX-License-Identifier: BSD-3-Clause /* - * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2023-2024 Qualcomm Innovation Center, Inc. All rights reserved. */ #include @@ -27,13 +27,18 @@ #cooling-cells = <2>; }; - sdr0_lte_dsc: sdr0_lte_dsc { - qcom,qmi-dev-name = "sdr0_lte_dsc"; + modem_lte_sub1_dsc: modem_lte_sub1_dsc { + qcom,qmi-dev-name = "modem_lte_sub1_dsc"; #cooling-cells = <2>; }; - sdr0_nr_dsc: sdr0_nr_dsc { - qcom,qmi-dev-name = "sdr0_nr_dsc"; + modem_nr_sub1_dsc: modem_nr_sub1_dsc { + qcom,qmi-dev-name = "modem_nr_sub1_dsc"; + #cooling-cells = <2>; + }; + + modem_nr_scg_sub1_dsc: modem_nr_scg_sub1_dsc { + qcom,qmi-dev-name = "modem_nr_scg_sub1_dsc"; #cooling-cells = <2>; }; @@ -52,6 +57,21 @@ #cooling-cells = <2>; }; + pa_lte_sdr0_sub1_dsc: pa_lte_sdr0_sub1_dsc { + qcom,qmi-dev-name = "pa_lte_sdr0_sub1_dsc"; + #cooling-cells = <2>; + }; + + pa_nr_sdr0_sub1_dsc: pa_nr_sdr0_sub1_dsc { + qcom,qmi-dev-name = "pa_nr_sdr0_sub1_dsc"; + #cooling-cells = <2>; + }; + + pa_nr_sdr0_scg_sub1_dsc: pa_nr_sdr0_scg_sub1_dsc { + qcom,qmi-dev-name = "pa_nr_sdr0_scg_sub1_dsc"; + #cooling-cells = <2>; + }; + mmw0_dsc: mmw0_dsc { qcom,qmi-dev-name = "mmw0_dsc"; #cooling-cells = <2>; @@ -72,13 +92,23 @@ #cooling-cells = <2>; }; - qmi_wlan: wlan { - qcom,qmi-dev-name = "wlan"; + mmw0_sub1_dsc: mmw0_sub1_dsc { + qcom,qmi-dev-name = "mmw0_sub1_dsc"; #cooling-cells = <2>; }; - modem_bw_backoff: modem_bw_backoff { - qcom,qmi-dev-name = "modem_bw_backoff"; + mmw1_sub1_dsc: mmw1_sub1_dsc { + qcom,qmi-dev-name = "mmw1_sub1_dsc"; + #cooling-cells = <2>; + }; + + mmw2_sub1_dsc: mmw2_sub1_dsc { + qcom,qmi-dev-name = "mmw2_sub1_dsc"; + #cooling-cells = <2>; + }; + + mmw3_sub1_dsc: mmw3_sub1_dsc { + qcom,qmi-dev-name = "mmw3_sub1_dsc"; #cooling-cells = <2>; }; @@ -95,108 +125,18 @@ modem { qcom,instance-id = ; - qcom,qmi-sensor-names = "modem_tsens", - "modem_tsens1", - "pa", - "pa_1", - "modem_bcl_warn", - "sdr0_pa", + qcom,qmi-sensor-names = "sdr0_pa", "sdr0", "mmw0", "mmw1", "mmw2", "mmw3", - "mmw_pa1", - "mmw_pa2", - "mmw_pa3", - "mmw_ific0", - "epm0", - "epm1", - "epm2", - "epm3", - "epm4", - "epm5", - "epm6", - "epm7", - "sys_therm1", - "sys_therm2", - "sys_therm3", - "sys_therm4", - "sys_therm5", - "sys_therm6", - "sub0_sdr0_pa", - "sdr_mmw_therm", - "sub1_modem_cfg", - "sub1_lte_cc", - "sub1_mcg_fr1_cc", - "sub1_mcg_fr2_cc", - "sub1_scg_fr1_cc", - "sub1_scg_fr2_cc"; + "mmw_ific0"; }; }; }; &thermal_zones { - pa { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-sensors = <&qmi_sensor - (QMI_MODEM_INST_ID+QMI_PA)>; - trips { - thermal-engine-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - - thermal-hal-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - }; - }; - - pa1 { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-sensors = <&qmi_sensor - (QMI_MODEM_INST_ID+QMI_PA_1)>; - trips { - thermal-engine-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - - thermal-hal-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - }; - }; - - bcl_warn { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-sensors = <&qmi_sensor - (QMI_MODEM_INST_ID+QMI_BCL_WARN)>; - trips { - thermal-engine-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - - thermal-hal-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - }; - }; - sdr0_pa { polling-delay-passive = <0>; polling-delay = <0>; @@ -317,66 +257,6 @@ }; }; - mmw_pa1 { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-sensors = <&qmi_sensor - (QMI_MODEM_INST_ID+QMI_MMW_PA1)>; - trips { - thermal-engine-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - - thermal-hal-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - }; - }; - - mmw_pa2 { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-sensors = <&qmi_sensor - (QMI_MODEM_INST_ID+QMI_MMW_PA2)>; - trips { - thermal-engine-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - - thermal-hal-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - }; - }; - - mmw_pa3 { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-sensors = <&qmi_sensor - (QMI_MODEM_INST_ID+QMI_MMW_PA3)>; - trips { - thermal-engine-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - - thermal-hal-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - }; - }; - mmw_ific0 { polling-delay-passive = <0>; polling-delay = <0>; @@ -396,282 +276,4 @@ }; }; }; - - epm0 { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-sensors = <&qmi_sensor - (QMI_MODEM_INST_ID+QMI_EPM0)>; - trips { - thermal-engine-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - - thermal-hal-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - }; - }; - - epm1 { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-sensors = <&qmi_sensor - (QMI_MODEM_INST_ID+QMI_EPM1)>; - trips { - thermal-engine-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - - thermal-hal-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - }; - }; - - epm2 { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-sensors = <&qmi_sensor - (QMI_MODEM_INST_ID+QMI_EPM2)>; - trips { - thermal-engine-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - - thermal-hal-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - }; - }; - - epm3 { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-sensors = <&qmi_sensor - (QMI_MODEM_INST_ID+QMI_EPM3)>; - trips { - thermal-engine-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - - thermal-hal-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - }; - }; - - epm4 { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-sensors = <&qmi_sensor - (QMI_MODEM_INST_ID+QMI_EPM4)>; - trips { - thermal-engine-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - - thermal-hal-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - }; - }; - - epm5 { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-sensors = <&qmi_sensor - (QMI_MODEM_INST_ID+QMI_EPM5)>; - trips { - thermal-engine-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - - thermal-hal-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - }; - }; - - epm6 { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-sensors = <&qmi_sensor - (QMI_MODEM_INST_ID+QMI_EPM6)>; - trips { - thermal-engine-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - - thermal-hal-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - }; - }; - - epm7 { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-sensors = <&qmi_sensor - (QMI_MODEM_INST_ID+QMI_EPM7)>; - trips { - thermal-engine-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - - thermal-hal-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - }; - }; - - sdr_mmw_therm { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-sensors = <&qmi_sensor - (QMI_MODEM_INST_ID+QMI_SDR_MMW)>; - trips { - thermal-engine-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - - thermal-hal-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - }; - }; - - sub1_modem_cfg { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-sensors = <&qmi_sensor - (QMI_MODEM_INST_ID+QMI_SUB1_MODEM_CFG)>; - trips { - thermal-engine-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - }; - }; - - sub1_lte_cc { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-sensors = <&qmi_sensor - (QMI_MODEM_INST_ID+QMI_SUB1_LTE_CC)>; - trips { - thermal-engine-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - }; - }; - - sub1_mcg_fr1_cc { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-sensors = <&qmi_sensor - (QMI_MODEM_INST_ID+QMI_SUB1_MCG_FR1_CC)>; - trips { - thermal-engine-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - }; - }; - - sub1_mcg_fr2_cc { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-sensors = <&qmi_sensor - (QMI_MODEM_INST_ID+QMI_SUB1_MCG_FR2_CC)>; - trips { - thermal-engine-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - }; - }; - - sub1_scg_fr1_cc { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-sensors = <&qmi_sensor - (QMI_MODEM_INST_ID+QMI_SUB1_SCG_FR1_CC)>; - trips { - thermal-engine-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - }; - }; - - sub1_scg_fr2_cc { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-sensors = <&qmi_sensor - (QMI_MODEM_INST_ID+QMI_SUB1_SCG_FR2_CC)>; - trips { - thermal-engine-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - }; - }; - - pa-therm2-sys3 { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-sensors = <&qmi_sensor - (QMI_MODEM_INST_ID+QMI_SYS_THERM_3)>; - trips { - thermal-engine-config0 { - temperature = <125000>; - hysteresis = <1000>; - type = "passive"; - }; - }; - }; }; diff --git a/qcom/sun-thermal.dtsi b/qcom/sun-thermal.dtsi index 05adc166..67840b87 100644 --- a/qcom/sun-thermal.dtsi +++ b/qcom/sun-thermal.dtsi @@ -59,62 +59,61 @@ cpu0_pause: cpu0-pause { qcom,cpus = <&CPU0>; + qcom,cdev-alias = "thermal-pause-1"; #cooling-cells = <2>; }; cpu1_pause: cpu1-pause { qcom,cpus = <&CPU1>; + qcom,cdev-alias = "thermal-pause-2"; #cooling-cells = <2>; }; cpu2_pause: cpu2-pause { qcom,cpus = <&CPU2>; + qcom,cdev-alias = "thermal-pause-4"; #cooling-cells = <2>; }; cpu3_pause: cpu3-pause { qcom,cpus = <&CPU3>; + qcom,cdev-alias = "thermal-pause-8"; #cooling-cells = <2>; }; cpu4_pause: cpu4-pause { qcom,cpus = <&CPU4>; + qcom,cdev-alias = "thermal-pause-10"; #cooling-cells = <2>; }; cpu5_pause: cpu5-pause { qcom,cpus = <&CPU5>; + qcom,cdev-alias = "thermal-pause-20"; #cooling-cells = <2>; }; cpu6_pause: cpu6-pause { qcom,cpus = <&CPU6>; + qcom,cdev-alias = "thermal-pause-40"; #cooling-cells = <2>; }; cpu7_pause: cpu7-pause { qcom,cpus = <&CPU7>; + qcom,cdev-alias = "thermal-pause-80"; #cooling-cells = <2>; }; - //TODO: what about core 0, we can't pause all? APC0_MX_CX_PAUSE: apc0-mx-cx-pause { - qcom,cpus = <&CPU1 &CPU2 &CPU3 &CPU4 &CPU5>; + qcom,cpus = <&CPU2 &CPU3 &CPU4 &CPU5>; + qcom,cdev-alias = "thermal-pause-3C"; #cooling-cells = <2>; }; APC1_MX_CX_PAUSE: apc1-mx-cx-pause { qcom,cpus = <&CPU6 &CPU7>; - #cooling-cells = <2>; - }; - - cpu_1_2_3_4_5_pause: cpu-1-2-3-4-5-pause { - qcom,cpus = <&CPU1 &CPU2 &CPU3 &CPU4 &CPU5>; - #cooling-cells = <2>; - }; - - cpu_6_7_pause: cpu-6-7-pause { - qcom,cpus = <&CPU6 &CPU7>; + qcom,cdev-alias = "thermal-pause-C0"; #cooling-cells = <2>; }; @@ -165,41 +164,49 @@ cpu0_hotplug: cpu0-hotplug { qcom,cpu = <&CPU0>; + qcom,cdev-alias = "cpu-hotplug0"; #cooling-cells = <2>; }; cpu1_hotplug: cpu1-hotplug { qcom,cpu = <&CPU1>; + qcom,cdev-alias = "cpu-hotplug1"; #cooling-cells = <2>; }; cpu2_hotplug: cpu2-hotplug { qcom,cpu = <&CPU2>; + qcom,cdev-alias = "cpu-hotplug2"; #cooling-cells = <2>; }; cpu3_hotplug: cpu3-hotplug { qcom,cpu = <&CPU3>; + qcom,cdev-alias = "cpu-hotplug3"; #cooling-cells = <2>; }; cpu4_hotplug: cpu4-hotplug { qcom,cpu = <&CPU4>; + qcom,cdev-alias = "cpu-hotplug4"; #cooling-cells = <2>; }; cpu5_hotplug: cpu5-hotplug { qcom,cpu = <&CPU5>; + qcom,cdev-alias = "cpu-hotplug5"; #cooling-cells = <2>; }; cpu6_hotplug: cpu6-hotplug { qcom,cpu = <&CPU6>; + qcom,cdev-alias = "cpu-hotplug6"; #cooling-cells = <2>; }; cpu7_hotplug: cpu7-hotplug { qcom,cpu = <&CPU7>; + qcom,cdev-alias = "cpu-hotplug7"; #cooling-cells = <2>; }; };