diff --git a/qcom/sdxnightjar-regulator.dtsi b/qcom/sdxnightjar-regulator.dtsi index d381a0a2996a..074adccb73c6 100644 --- a/qcom/sdxnightjar-regulator.dtsi +++ b/qcom/sdxnightjar-regulator.dtsi @@ -92,6 +92,14 @@ ; qcom,use-voltage-floor-level; }; + + cx_cdev: cx-cdev { + compatible = "qcom,regulator-cooling-device"; + regulator-cdev-supply = <&pmd9650_s5_floor_level>; + regulator-levels = ; + #cooling-cells = <2>; + }; }; rpm-regulator-ldoa1 { diff --git a/qcom/sdxnightjar-thermal.dtsi b/qcom/sdxnightjar-thermal.dtsi new file mode 100644 index 000000000000..657530c6180b --- /dev/null +++ b/qcom/sdxnightjar-thermal.dtsi @@ -0,0 +1,177 @@ +#include + +&soc { + tsens0: tsens@4a8000 { + compatible = "qcom,msm8996-tsens"; + reg = <0x4a8000 0x152>, + <0x4a9000 0x1ff>; + reg-names = "tsens_srot_physical", + "tsens_tm_physical"; + interrupts-extended = <&intc GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "tsens-upper-lower", "tsens-critical"; + #thermal-sensor-cells = <1>; + }; + + qmi-tmd-devices { + compatible = "qcom,qmi-cooling-devices"; + + modem { + qcom,instance-id = ; + + modem_pa: modem_pa { + qcom,qmi-dev-name = "pa"; + #cooling-cells = <2>; + }; + + modem_proc: modem_proc { + qcom,qmi-dev-name = "modem"; + #cooling-cells = <2>; + }; + + modem_vdd: modem_vdd { + qcom,qmi-dev-name = "cpuv_restriction_cold"; + #cooling-cells = <2>; + }; + + modem_cpr_cold: modem_cpr_cold { + qcom,qmi-dev-name = "cpr_cold"; + #cooling-cells = <2>; + }; + }; + }; +}; + +&thermal_zones { + aoss-0-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 = <115000>; + hysteresis = <5000>; + type = "passive"; + }; + }; + }; + + q6-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 = <115000>; + hysteresis = <5000>; + type = "passive"; + }; + }; + }; + + ipa-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 = <115000>; + hysteresis = <5000>; + type = "passive"; + }; + }; + }; + + cpuss-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 = <115000>; + hysteresis = <5000>; + type = "passive"; + }; + }; + }; + + mdm-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 = <115000>; + hysteresis = <5000>; + type = "passive"; + }; + }; + }; + + mdm-step { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&tsens0 6>; + thermal-governor = "step_wise"; + trips { + tj_config0: active-config0 { + temperature = <95000>; + hysteresis = <5000>; + type = "passive"; + }; + + tj_config1: active-config1 { + temperature = <105000>; + hysteresis = <5000>; + type = "passive"; + }; + }; + + cooling-maps { + modem_proc_cdev1 { + trip = <&tj_config0>; + cooling-device = <&modem_proc 1 1>; + }; + + modem_proc_cdev2 { + trip = <&tj_config1>; + cooling-device = <&modem_proc 3 3>; + }; + }; + }; +}; diff --git a/qcom/sdxnightjar.dtsi b/qcom/sdxnightjar.dtsi index 91d8df73c135..76d46e3b5f4f 100644 --- a/qcom/sdxnightjar.dtsi +++ b/qcom/sdxnightjar.dtsi @@ -924,6 +924,8 @@ }; }; + thermal_zones: thermal-zones {}; + spmi_bus: qcom,spmi@200f000 { compatible = "qcom,spmi-pmic-arb"; reg = <0x200f000 0x1000>, @@ -1059,6 +1061,7 @@ #include "sdxnightjar-pcie.dtsi" #include "sdxnightjar-audio.dtsi" #include "sdxnightjar-audio-overlay.dtsi" +#include "sdxnightjar-thermal.dtsi" &i2c_3 { status = "ok";