ARM: dts: qcom: Add thermal devicetree support for sa410m

Add thermal driver tree support for sa410m.

Change-Id: I62a7cbc3af321e11ec648080486964e21dc2e06b
This commit is contained in:
Priyansh Jain
2022-08-10 11:27:09 +05:30
committed by Gerrit - the friendly Code Review server
parent c7dcbb32e5
commit c0f7e62de2
2 changed files with 578 additions and 0 deletions

View File

@@ -35,6 +35,7 @@
capacity-dmips-mhz = <1024>;
dynamic-power-coefficient = <100>;
next-level-cache = <&L2_0>;
#cooling-cells = <2>;
L2_0: l2-cache {
compatible = "arm,arch-cache";
cache-level = <2>;
@@ -57,6 +58,7 @@
capacity-dmips-mhz = <1024>;
dynamic-power-coefficient = <100>;
next-level-cache = <&L2_0>;
#cooling-cells = <2>;
L1_I_1: l1-icache {
compatible = "arm,arch-cache";
@@ -75,6 +77,7 @@
capacity-dmips-mhz = <1024>;
dynamic-power-coefficient = <100>;
next-level-cache = <&L2_0>;
#cooling-cells = <2>;
L1_I_2: l1-icache {
compatible = "arm,arch-cache";
@@ -93,6 +96,7 @@
capacity-dmips-mhz = <1024>;
dynamic-power-coefficient = <100>;
next-level-cache = <&L2_0>;
#cooling-cells = <2>;
L1_I_3: l1-icache {
compatible = "arm,arch-cache";
@@ -340,6 +344,105 @@
status = "disabled";
};
};
thermal_zones: thermal-zones { };
};
#include "sa410m-stub-regulators.dtsi"
#include "scuba-thermal.dtsi"
&thermal_zones {
gpu {
trips {
gpu-cxip-trip {
temperature = <105000>;
};
gpu-trip {
temperature = <105000>;
};
gpu-cx-mon {
temperature = <115000>;
};
};
cooling-maps {
/delete-node/ gpu_cdev;
/delete-node/ gpu-cx-cdev0;
};
};
cpuss-0 {
trips {
cpu-0-2-config {
temperature = <115000>;
};
};
};
cpuss-1 {
trips {
cpu-1-3-configs {
temperature = <115000>;
};
};
};
mdm-0 {
trips {
mdm0-cx-mon {
temperature = <105000>;
};
mdm0_emer_mon: mdm0-emer-mon {
temperature = <125000>;
hysteresis = <5000>;
type = "passive";
};
};
cooling-maps {
/delete-node/ mdm0-cx-cdev0;
/delete-node/ mdm0-cx-cdev2;
mdm0-cx-cdev1 {
cooling-device = <&modem_proc 1 1>;
};
mdm0-emer-cdev0 {
trip = <&mdm0_emer_mon>;
cooling-device = <&modem_proc 3 3>;
};
};
};
mdm-1 {
trips {
mdm1-cx-mon {
temperature = <105000>;
};
mdm1_emer_mon: mdm1-emer-mon {
temperature = <125000>;
hysteresis = <5000>;
type = "passive";
};
};
cooling-maps {
/delete-node/ mdm1-cx-cdev0;
/delete-node/ mdm1-cx-cdev2;
mdm1-cx-cdev1 {
cooling-device = <&modem_proc 1 1>;
};
mdm1-emer-cdev0 {
trip = <&mdm1_emer_mon>;
cooling-device = <&modem_proc 3 3>;
};
};
};
};

475
qcom/scuba-thermal.dtsi Normal file
View File

@@ -0,0 +1,475 @@
#include <dt-bindings/thermal/thermal_qti.h>
&soc {
tsens0:tsens@04410000 {
compatible = "qcom,tsens24xx";
reg = <0x04410000 0x8>,
<0x04411000 0x1ff>;
reg-names = "tsens_srot_physical",
"tsens_tm_physical";
interrupts = <GIC_SPI 275 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "tsens-upper-lower", "tsens-critical";
#thermal-sensor-cells = <1>;
};
qcom,cpu-pause {
compatible = "qcom,thermal-pause";
cpu0_pause: cpu0-pause {
qcom,cpus = <&CPU0>;
#cooling-cells = <2>;
};
cpu1_pause: cpu1-pause {
qcom,cpus = <&CPU1>;
#cooling-cells = <2>;
};
cpu2_pause: cpu2-pause {
qcom,cpus = <&CPU2>;
#cooling-cells = <2>;
};
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";
};
};
qcom,cpu-hotplug {
compatible = "qcom,cpu-hotplug";
cpu0_hotplug: cpu0-hotplug {
qcom,cpu = <&CPU0>;
#cooling-cells = <2>;
};
cpu1_hotplug: cpu1-hotplug {
qcom,cpu = <&CPU1>;
#cooling-cells = <2>;
};
cpu2_hotplug: cpu2-hotplug {
qcom,cpu = <&CPU2>;
#cooling-cells = <2>;
};
cpu3_hotplug: cpu3-hotplug {
qcom,cpu = <&CPU3>;
#cooling-cells = <2>;
};
};
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_current: modem_current {
qcom,qmi-dev-name = "modem_current";
#cooling-cells = <2>;
};
modem_skin: modem_skin {
qcom,qmi-dev-name = "modem_skin";
#cooling-cells = <2>;
};
modem_vdd: modem_vdd {
qcom,qmi-dev-name = "cpuv_restriction_cold";
#cooling-cells = <2>;
};
modem_wlan: modem_wlan {
qcom,qmi-dev-name = "wlan";
#cooling-cells = <2>;
};
};
adsp {
qcom,instance-id = <QMI_ADSP_INST_ID>;
adsp_vdd: adsp_vdd {
qcom,qmi-dev-name = "cpuv_restriction_cold";
#cooling-cells = <2>;
};
};
};
lmh_cpu_vdd: qcom,lmh-cpu-vdd@f550800 {
compatible = "qcom,lmh-cpu-vdd";
reg = <0xf550800 0x1000>;
#cooling-cells = <2>;
};
cxip_cdev: cxip-cdev@3ed000 {
compatible = "qcom,cxip-lm-cooling-device";
reg = <0x3ed000 0xc008>;
qcom,thermal-client-offset = <0x8000>;
/* 4th offset to bypass VICTIM1 */
qcom,bypass-client-list = <0x3004 0x4004 0x6004 0xc004>;
#cooling-cells = <2>;
};
lmh_dcvs0: qcom,limits-dcvs@f550800 {
compatible = "qcom,msm-hw-limits";
interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
qcom,affinity = <0>;
reg = <0xf550800 0x1000>,
<0xf521000 0x1000>;
qcom,no-cooling-device-register;
};
};
&thermal_zones {
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";
};
};
};
video {
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";
};
};
};
wlan {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-sensors = <&tsens0 2>;
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 3>;
trips {
thermal-engine-config {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
reset-mon-cfg {
temperature = <115000>;
hysteresis = <5000>;
type = "passive";
};
cpu0_2_config: cpu-0-2-config {
temperature = <110000>;
hysteresis = <10000>;
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 4>;
trips {
thermal-engine-config {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
reset-mon-cfg {
temperature = <115000>;
hysteresis = <5000>;
type = "passive";
};
cpu1_3_config: cpu-1-3-config {
temperature = <110000>;
hysteresis = <10000>;
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 5>;
trips {
thermal-engine-config {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
reset-mon-cfg {
temperature = <115000>;
hysteresis = <5000>;
type = "passive";
};
mdm0_cx_mon: mdm0-cx-mon {
temperature = <100000>;
hysteresis = <5000>;
type = "passive";
};
};
cooling-maps {
mdm0-cx-cdev0 {
trip = <&mdm0_cx_mon>;
cooling-device = <&msm_gpu 2 THERMAL_NO_LIMIT>;
};
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>;
};
};
};
mdm-1 {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-sensors = <&tsens0 6>;
trips {
thermal-engine-config {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
reset-mon-cfg {
temperature = <115000>;
hysteresis = <5000>;
type = "passive";
};
mdm1_cx_mon: mdm1-cx-mon {
temperature = <100000>;
hysteresis = <5000>;
type = "passive";
};
};
cooling-maps {
mdm1-cx-cdev0 {
trip = <&mdm1_cx_mon>;
cooling-device = <&msm_gpu 2 THERMAL_NO_LIMIT>;
};
mdm1-cx-cdev1 {
trip = <&mdm1_cx_mon>;
cooling-device = <&modem_proc 3 3>;
};
mdm1-cx-cdev2 {
trip = <&mdm1_cx_mon>;
cooling-device = <&modem_pa 3 3>;
};
};
};
gpu {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-sensors = <&tsens0 7>;
trips {
thermal-engine-config {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
reset-mon-cfg {
temperature = <115000>;
hysteresis = <5000>;
type = "passive";
};
gpu_cxip_trip: gpu-cxip-trip {
temperature = <95000>;
hysteresis = <20000>;
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";
};
};
cooling-maps {
cxip-cdev {
trip = <&gpu_cxip_trip>;
cooling-device = <&cxip_cdev 1 1>;
};
gpu_cdev {
trip = <&gpu_step_trip>;
cooling-device = <&msm_gpu THERMAL_NO_LIMIT
THERMAL_NO_LIMIT>;
};
gpu-cx-cdev0 {
trip = <&gpu_cx_mon>;
cooling-device = <&msm_gpu 2 THERMAL_NO_LIMIT>;
};
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>;
};
};
};
hm-center {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-sensors = <&tsens0 8>;
trips {
thermal-engine-config {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
reset-mon-cfg {
temperature = <115000>;
hysteresis = <5000>;
type = "passive";
};
};
};
camera {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-sensors = <&tsens0 9>;
trips {
thermal-engine-config {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
reset-mon-cfg {
temperature = <115000>;
hysteresis = <5000>;
type = "passive";
};
};
};
};