ARM: dts: qcom: Enable TSENS and thermal zone changes for sdxnightjar

Enable TSENS driver, default userspace thermal zone rules for each
TSENS, enable QMI cooling device, regulator cooling device and
enable modem junction temperature mitigation thermal zone rule for
sdxnightjar.

Change-Id: I67efdb252e3fb59a6d6256b03613b14e8a5e2c56
This commit is contained in:
Manaf Meethalavalappu Pallikunhi 2020-11-19 01:25:24 +05:30
commit a848d5cc4e
3 changed files with 188 additions and 0 deletions

View file

@ -92,6 +92,14 @@
<RPM_SMD_REGULATOR_LEVEL_TURBO_NO_CPR>;
qcom,use-voltage-floor-level;
};
cx_cdev: cx-cdev {
compatible = "qcom,regulator-cooling-device";
regulator-cdev-supply = <&pmd9650_s5_floor_level>;
regulator-levels = <RPM_SMD_REGULATOR_LEVEL_RETENTION
RPM_SMD_REGULATOR_LEVEL_NOM>;
#cooling-cells = <2>;
};
};
rpm-regulator-ldoa1 {

View file

@ -0,0 +1,177 @@
#include <dt-bindings/thermal/thermal_qti.h>
&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 = <QMI_MODEM_INST_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>;
};
};
};
};

View file

@ -897,6 +897,8 @@
};
};
thermal_zones: thermal-zones {};
spmi_bus: qcom,spmi@200f000 {
compatible = "qcom,spmi-pmic-arb";
reg = <0x200f000 0x1000>,
@ -1032,6 +1034,7 @@
#include "sdxnightjar-pcie.dtsi"
#include "sdxnightjar-audio.dtsi"
#include "sdxnightjar-audio-overlay.dtsi"
#include "sdxnightjar-thermal.dtsi"
&i2c_3 {
status = "ok"