Commit fccf8e31 authored by Vladimir Zapolskiy's avatar Vladimir Zapolskiy Committed by Bjorn Andersson
Browse files

arm64: dts: qcom: sm8450: Add thermal zones



Add thermal zones handled by tsens sensors. The definitions and the trip
points were taken from the downstream dts. For the CPU core thermal
sensors, the trip points were changed to follow the example of other
Qualcomm platforms.

Signed-off-by: default avatarVladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
Signed-off-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220410234458.1739279-3-dmitry.baryshkov@linaro.org
parent 48995e86
Loading
Loading
Loading
Loading
+843 −0
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@
#include <dt-bindings/power/qcom-rpmpd.h>
#include <dt-bindings/interconnect/qcom,sm8450.h>
#include <dt-bindings/soc/qcom,rpmh-rsc.h>
#include <dt-bindings/thermal/thermal.h>

/ {
	interrupt-parent = <&intc>;
@@ -47,6 +48,7 @@ CPU0: cpu@0 {
			power-domains = <&CPU_PD0>;
			power-domain-names = "psci";
			qcom,freq-domain = <&cpufreq_hw 0>;
			#cooling-cells = <2>;
			L2_0: l2-cache {
			      compatible = "cache";
			      next-level-cache = <&L3_0>;
@@ -65,6 +67,7 @@ CPU1: cpu@100 {
			power-domains = <&CPU_PD1>;
			power-domain-names = "psci";
			qcom,freq-domain = <&cpufreq_hw 0>;
			#cooling-cells = <2>;
			L2_100: l2-cache {
			      compatible = "cache";
			      next-level-cache = <&L3_0>;
@@ -80,6 +83,7 @@ CPU2: cpu@200 {
			power-domains = <&CPU_PD2>;
			power-domain-names = "psci";
			qcom,freq-domain = <&cpufreq_hw 0>;
			#cooling-cells = <2>;
			L2_200: l2-cache {
			      compatible = "cache";
			      next-level-cache = <&L3_0>;
@@ -95,6 +99,7 @@ CPU3: cpu@300 {
			power-domains = <&CPU_PD3>;
			power-domain-names = "psci";
			qcom,freq-domain = <&cpufreq_hw 0>;
			#cooling-cells = <2>;
			L2_300: l2-cache {
			      compatible = "cache";
			      next-level-cache = <&L3_0>;
@@ -110,6 +115,7 @@ CPU4: cpu@400 {
			power-domains = <&CPU_PD4>;
			power-domain-names = "psci";
			qcom,freq-domain = <&cpufreq_hw 1>;
			#cooling-cells = <2>;
			L2_400: l2-cache {
			      compatible = "cache";
			      next-level-cache = <&L3_0>;
@@ -125,6 +131,7 @@ CPU5: cpu@500 {
			power-domains = <&CPU_PD5>;
			power-domain-names = "psci";
			qcom,freq-domain = <&cpufreq_hw 1>;
			#cooling-cells = <2>;
			L2_500: l2-cache {
			      compatible = "cache";
			      next-level-cache = <&L3_0>;
@@ -141,6 +148,7 @@ CPU6: cpu@600 {
			power-domains = <&CPU_PD6>;
			power-domain-names = "psci";
			qcom,freq-domain = <&cpufreq_hw 1>;
			#cooling-cells = <2>;
			L2_600: l2-cache {
			      compatible = "cache";
			      next-level-cache = <&L3_0>;
@@ -156,6 +164,7 @@ CPU7: cpu@700 {
			power-domains = <&CPU_PD7>;
			power-domain-names = "psci";
			qcom,freq-domain = <&cpufreq_hw 2>;
			#cooling-cells = <2>;
			L2_700: l2-cache {
			      compatible = "cache";
			      next-level-cache = <&L3_0>;
@@ -1906,6 +1915,840 @@ lpass_ag_noc: interconnect@3c40000 {
		};
	};

	thermal-zones {
		aoss0-thermal {
			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";
				};
			};
		};

		cpuss0-thermal {
			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";
				};
			};
		};

		cpuss1-thermal {
			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";
				};
			};
		};

		cpuss3-thermal {
			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";
				};
			};
		};

		cpuss4-thermal {
			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";
				};
			};
		};

		cpu4-top-thermal {
			polling-delay-passive = <0>;
			polling-delay = <0>;
			thermal-sensors = <&tsens0 5>;

			trips {
				cpu4_top_alert0: trip-point0 {
					temperature = <90000>;
					hysteresis = <2000>;
					type = "passive";
				};

				cpu4_top_alert1: trip-point1 {
					temperature = <95000>;
					hysteresis = <2000>;
					type = "passive";
				};

				cpu4_top_crit: cpu_crit {
					temperature = <110000>;
					hysteresis = <1000>;
					type = "critical";
				};
			};
		};

		cpu4-bottom-thermal {
			polling-delay-passive = <0>;
			polling-delay = <0>;
			thermal-sensors = <&tsens0 6>;

			trips {
				cpu4_bottom_alert0: trip-point0 {
					temperature = <90000>;
					hysteresis = <2000>;
					type = "passive";
				};

				cpu4_bottom_alert1: trip-point1 {
					temperature = <95000>;
					hysteresis = <2000>;
					type = "passive";
				};

				cpu4_bottom_crit: cpu_crit {
					temperature = <110000>;
					hysteresis = <1000>;
					type = "critical";
				};
			};
		};

		cpu5-top-thermal {
			polling-delay-passive = <0>;
			polling-delay = <0>;
			thermal-sensors = <&tsens0 7>;

			trips {
				cpu5_top_alert0: trip-point0 {
					temperature = <90000>;
					hysteresis = <2000>;
					type = "passive";
				};

				cpu5_top_alert1: trip-point1 {
					temperature = <95000>;
					hysteresis = <2000>;
					type = "passive";
				};

				cpu5_top_crit: cpu_crit {
					temperature = <110000>;
					hysteresis = <1000>;
					type = "critical";
				};
			};
		};

		cpu5-bottom-thermal {
			polling-delay-passive = <0>;
			polling-delay = <0>;
			thermal-sensors = <&tsens0 8>;

			trips {
				cpu5_bottom_alert0: trip-point0 {
					temperature = <90000>;
					hysteresis = <2000>;
					type = "passive";
				};

				cpu5_bottom_alert1: trip-point1 {
					temperature = <95000>;
					hysteresis = <2000>;
					type = "passive";
				};

				cpu5_bottom_crit: cpu_crit {
					temperature = <110000>;
					hysteresis = <1000>;
					type = "critical";
				};
			};
		};

		cpu6-top-thermal {
			polling-delay-passive = <0>;
			polling-delay = <0>;
			thermal-sensors = <&tsens0 9>;

			trips {
				cpu6_top_alert0: trip-point0 {
					temperature = <90000>;
					hysteresis = <2000>;
					type = "passive";
				};

				cpu6_top_alert1: trip-point1 {
					temperature = <95000>;
					hysteresis = <2000>;
					type = "passive";
				};

				cpu6_top_crit: cpu_crit {
					temperature = <110000>;
					hysteresis = <1000>;
					type = "critical";
				};
			};
		};

		cpu6-bottom-thermal {
			polling-delay-passive = <0>;
			polling-delay = <0>;
			thermal-sensors = <&tsens0 10>;

			trips {
				cpu6_bottom_alert0: trip-point0 {
					temperature = <90000>;
					hysteresis = <2000>;
					type = "passive";
				};

				cpu6_bottom_alert1: trip-point1 {
					temperature = <95000>;
					hysteresis = <2000>;
					type = "passive";
				};

				cpu6_bottom_crit: cpu_crit {
					temperature = <110000>;
					hysteresis = <1000>;
					type = "critical";
				};
			};
		};

		cpu7-top-thermal {
			polling-delay-passive = <0>;
			polling-delay = <0>;
			thermal-sensors = <&tsens0 11>;

			trips {
				cpu7_top_alert0: trip-point0 {
					temperature = <90000>;
					hysteresis = <2000>;
					type = "passive";
				};

				cpu7_top_alert1: trip-point1 {
					temperature = <95000>;
					hysteresis = <2000>;
					type = "passive";
				};

				cpu7_top_crit: cpu_crit {
					temperature = <110000>;
					hysteresis = <1000>;
					type = "critical";
				};
			};
		};

		cpu7-middle-thermal {
			polling-delay-passive = <0>;
			polling-delay = <0>;
			thermal-sensors = <&tsens0 12>;

			trips {
				cpu7_middle_alert0: trip-point0 {
					temperature = <90000>;
					hysteresis = <2000>;
					type = "passive";
				};

				cpu7_middle_alert1: trip-point1 {
					temperature = <95000>;
					hysteresis = <2000>;
					type = "passive";
				};

				cpu7_middle_crit: cpu_crit {
					temperature = <110000>;
					hysteresis = <1000>;
					type = "critical";
				};
			};
		};

		cpu7-bottom-thermal {
			polling-delay-passive = <0>;
			polling-delay = <0>;
			thermal-sensors = <&tsens0 13>;

			trips {
				cpu7_bottom_alert0: trip-point0 {
					temperature = <90000>;
					hysteresis = <2000>;
					type = "passive";
				};

				cpu7_bottom_alert1: trip-point1 {
					temperature = <95000>;
					hysteresis = <2000>;
					type = "passive";
				};

				cpu7_bottom_crit: cpu_crit {
					temperature = <110000>;
					hysteresis = <1000>;
					type = "critical";
				};
			};
		};

		gpu-top-thermal {
			polling-delay-passive = <10>;
			polling-delay = <0>;
			thermal-sensors = <&tsens0 14>;

			trips {
				thermal-engine-config {
					temperature = <125000>;
					hysteresis = <1000>;
					type = "passive";
				};

				thermal-hal-config {
					temperature = <125000>;
					hysteresis = <1000>;
					type = "passive";
				};

				reset-mon-cfg {
					temperature = <115000>;
					hysteresis = <5000>;
					type = "passive";
				};

				gpu0_tj_cfg: tj_cfg {
					temperature = <95000>;
					hysteresis = <5000>;
					type = "passive";
				};
			};
		};

		gpu-bottom-thermal {
			polling-delay-passive = <10>;
			polling-delay = <0>;
			thermal-sensors = <&tsens0 15>;

			trips {
				thermal-engine-config {
					temperature = <125000>;
					hysteresis = <1000>;
					type = "passive";
				};

				thermal-hal-config {
					temperature = <125000>;
					hysteresis = <1000>;
					type = "passive";
				};

				reset-mon-cfg {
					temperature = <115000>;
					hysteresis = <5000>;
					type = "passive";
				};

				gpu1_tj_cfg: tj_cfg {
					temperature = <95000>;
					hysteresis = <5000>;
					type = "passive";
				};
			};
		};

		aoss1-thermal {
			polling-delay-passive = <0>;
			polling-delay = <0>;
			thermal-sensors = <&tsens1 0>;

			trips {
				thermal-engine-config {
					temperature = <125000>;
					hysteresis = <1000>;
					type = "passive";
				};

				reset-mon-cfg {
					temperature = <115000>;
					hysteresis = <5000>;
					type = "passive";
				};
			};
		};

		cpu0-thermal {
			polling-delay-passive = <0>;
			polling-delay = <0>;
			thermal-sensors = <&tsens1 1>;

			trips {
				cpu0_alert0: trip-point0 {
					temperature = <90000>;
					hysteresis = <2000>;
					type = "passive";
				};

				cpu0_alert1: trip-point1 {
					temperature = <95000>;
					hysteresis = <2000>;
					type = "passive";
				};

				cpu0_crit: cpu_crit {
					temperature = <110000>;
					hysteresis = <1000>;
					type = "critical";
				};
			};
		};

		cpu1-thermal {
			polling-delay-passive = <0>;
			polling-delay = <0>;
			thermal-sensors = <&tsens1 2>;

			trips {
				cpu1_alert0: trip-point0 {
					temperature = <90000>;
					hysteresis = <2000>;
					type = "passive";
				};

				cpu1_alert1: trip-point1 {
					temperature = <95000>;
					hysteresis = <2000>;
					type = "passive";
				};

				cpu1_crit: cpu_crit {
					temperature = <110000>;
					hysteresis = <1000>;
					type = "critical";
				};
			};
		};

		cpu2-thermal {
			polling-delay-passive = <0>;
			polling-delay = <0>;
			thermal-sensors = <&tsens1 3>;

			trips {
				cpu2_alert0: trip-point0 {
					temperature = <90000>;
					hysteresis = <2000>;
					type = "passive";
				};

				cpu2_alert1: trip-point1 {
					temperature = <95000>;
					hysteresis = <2000>;
					type = "passive";
				};

				cpu2_crit: cpu_crit {
					temperature = <110000>;
					hysteresis = <1000>;
					type = "critical";
				};
			};
		};

		cpu3-thermal {
			polling-delay-passive = <0>;
			polling-delay = <0>;
			thermal-sensors = <&tsens1 4>;

			trips {
				cpu3_alert0: trip-point0 {
					temperature = <90000>;
					hysteresis = <2000>;
					type = "passive";
				};

				cpu3_alert1: trip-point1 {
					temperature = <95000>;
					hysteresis = <2000>;
					type = "passive";
				};

				cpu3_crit: cpu_crit {
					temperature = <110000>;
					hysteresis = <1000>;
					type = "critical";
				};
			};
		};

		cdsp0-thermal {
			polling-delay-passive = <10>;
			polling-delay = <0>;
			thermal-sensors = <&tsens1 5>;

			trips {
				thermal-engine-config {
					temperature = <125000>;
					hysteresis = <1000>;
					type = "passive";
				};

				thermal-hal-config {
					temperature = <125000>;
					hysteresis = <1000>;
					type = "passive";
				};

				reset-mon-cfg {
					temperature = <115000>;
					hysteresis = <5000>;
					type = "passive";
				};

				cdsp_0_config: junction-config {
					temperature = <95000>;
					hysteresis = <5000>;
					type = "passive";
				};
			};
		};

		cdsp1-thermal {
			polling-delay-passive = <10>;
			polling-delay = <0>;
			thermal-sensors = <&tsens1 6>;

			trips {
				thermal-engine-config {
					temperature = <125000>;
					hysteresis = <1000>;
					type = "passive";
				};

				thermal-hal-config {
					temperature = <125000>;
					hysteresis = <1000>;
					type = "passive";
				};

				reset-mon-cfg {
					temperature = <115000>;
					hysteresis = <5000>;
					type = "passive";
				};

				cdsp_1_config: junction-config {
					temperature = <95000>;
					hysteresis = <5000>;
					type = "passive";
				};
			};
		};

		cdsp2-thermal {
			polling-delay-passive = <10>;
			polling-delay = <0>;
			thermal-sensors = <&tsens1 7>;

			trips {
				thermal-engine-config {
					temperature = <125000>;
					hysteresis = <1000>;
					type = "passive";
				};

				thermal-hal-config {
					temperature = <125000>;
					hysteresis = <1000>;
					type = "passive";
				};

				reset-mon-cfg {
					temperature = <115000>;
					hysteresis = <5000>;
					type = "passive";
				};

				cdsp_2_config: junction-config {
					temperature = <95000>;
					hysteresis = <5000>;
					type = "passive";
				};
			};
		};

		video-thermal {
			polling-delay-passive = <0>;
			polling-delay = <0>;
			thermal-sensors = <&tsens1 8>;

			trips {
				thermal-engine-config {
					temperature = <125000>;
					hysteresis = <1000>;
					type = "passive";
				};

				reset-mon-cfg {
					temperature = <115000>;
					hysteresis = <5000>;
					type = "passive";
				};
			};
		};

		mem-thermal {
			polling-delay-passive = <10>;
			polling-delay = <0>;
			thermal-sensors = <&tsens1 9>;

			trips {
				thermal-engine-config {
					temperature = <125000>;
					hysteresis = <1000>;
					type = "passive";
				};

				ddr_config0: ddr0-config {
					temperature = <90000>;
					hysteresis = <5000>;
					type = "passive";
				};

				reset-mon-cfg {
					temperature = <115000>;
					hysteresis = <5000>;
					type = "passive";
				};
			};
		};

		modem0-thermal {
			polling-delay-passive = <0>;
			polling-delay = <0>;
			thermal-sensors = <&tsens1 10>;

			trips {
				thermal-engine-config {
					temperature = <125000>;
					hysteresis = <1000>;
					type = "passive";
				};

				mdmss0_config0: mdmss0-config0 {
					temperature = <102000>;
					hysteresis = <3000>;
					type = "passive";
				};

				mdmss0_config1: mdmss0-config1 {
					temperature = <105000>;
					hysteresis = <3000>;
					type = "passive";
				};

				reset-mon-cfg {
					temperature = <115000>;
					hysteresis = <5000>;
					type = "passive";
				};
			};
		};

		modem1-thermal {
			polling-delay-passive = <0>;
			polling-delay = <0>;
			thermal-sensors = <&tsens1 11>;

			trips {
				thermal-engine-config {
					temperature = <125000>;
					hysteresis = <1000>;
					type = "passive";
				};

				mdmss1_config0: mdmss1-config0 {
					temperature = <102000>;
					hysteresis = <3000>;
					type = "passive";
				};

				mdmss1_config1: mdmss1-config1 {
					temperature = <105000>;
					hysteresis = <3000>;
					type = "passive";
				};

				reset-mon-cfg {
					temperature = <115000>;
					hysteresis = <5000>;
					type = "passive";
				};
			};
		};

		modem2-thermal {
			polling-delay-passive = <0>;
			polling-delay = <0>;
			thermal-sensors = <&tsens1 12>;

			trips {
				thermal-engine-config {
					temperature = <125000>;
					hysteresis = <1000>;
					type = "passive";
				};

				mdmss2_config0: mdmss2-config0 {
					temperature = <102000>;
					hysteresis = <3000>;
					type = "passive";
				};

				mdmss2_config1: mdmss2-config1 {
					temperature = <105000>;
					hysteresis = <3000>;
					type = "passive";
				};

				reset-mon-cfg {
					temperature = <115000>;
					hysteresis = <5000>;
					type = "passive";
				};
			};
		};

		modem3-thermal {
			polling-delay-passive = <0>;
			polling-delay = <0>;
			thermal-sensors = <&tsens1 13>;

			trips {
				thermal-engine-config {
					temperature = <125000>;
					hysteresis = <1000>;
					type = "passive";
				};

				mdmss3_config0: mdmss3-config0 {
					temperature = <102000>;
					hysteresis = <3000>;
					type = "passive";
				};

				mdmss3_config1: mdmss3-config1 {
					temperature = <105000>;
					hysteresis = <3000>;
					type = "passive";
				};

				reset-mon-cfg {
					temperature = <115000>;
					hysteresis = <5000>;
					type = "passive";
				};
			};
		};

		camera0-thermal {
			polling-delay-passive = <0>;
			polling-delay = <0>;
			thermal-sensors = <&tsens1 14>;

			trips {
				thermal-engine-config {
					temperature = <125000>;
					hysteresis = <1000>;
					type = "passive";
				};

				reset-mon-cfg {
					temperature = <115000>;
					hysteresis = <5000>;
					type = "passive";
				};
			};
		};

		camera1-thermal {
			polling-delay-passive = <0>;
			polling-delay = <0>;
			thermal-sensors = <&tsens1 15>;

			trips {
				thermal-engine-config {
					temperature = <125000>;
					hysteresis = <1000>;
					type = "passive";
				};

				reset-mon-cfg {
					temperature = <115000>;
					hysteresis = <5000>;
					type = "passive";
				};
			};
		};
	};

	timer {
		compatible = "arm,armv8-timer";
		interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>,