Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5495704f authored by Siddartha Mohanadoss's avatar Siddartha Mohanadoss
Browse files

ARM: dts: msm: Add TSENS for SDM845



Temperature sensor (TSENS) supports 21 sensors across two
controllers. Add thermal sensor parameters used by the
thermal core framework to register TSENS sensors.

Change-Id: Iefada30115055e98bea06737d43c9ce02ecdf48b
Signed-off-by: default avatarSiddartha Mohanadoss <smohanad@codeaurora.org>
parent 07b10616
Loading
Loading
Loading
Loading
+320 −0
Original line number Diff line number Diff line
@@ -2160,6 +2160,326 @@
			     <0 425 0 /* CE11 */ >;
		qcom,wlan-msa-memory = <0x100000>;
	};

	thermal_zones: thermal-zones {
		aoss0-ts0-h {
			polling-delay-passive = <0>;
			polling-delay = <0>;
			thermal-governor = "step_wise";
			thermal-sensors = <&tsens0 0>;
			trips {
				active-config0 {
					temperature = <65000>;
					hysteresis = <1000>;
					type = "passive";
				};
			};
		};

		cpu0-silver-ts0-h {
			polling-delay-passive = <0>;
			polling-delay = <0>;
			thermal-governor = "step_wise";
			thermal-sensors = <&tsens0 1>;
			trips {
				active-config0 {
					temperature = <65000>;
					hysteresis = <1000>;
					type = "passive";
				};
			};
		};

		cpu1-silver-ts0-h {
			polling-delay-passive = <0>;
			polling-delay = <0>;
			thermal-governor = "step_wise";
			thermal-sensors = <&tsens0 2>;
			trips {
				active-config0 {
					temperature = <65000>;
					hysteresis = <1000>;
					type = "passive";
				};
			};
		};

		cpu2-silver-ts0-h {
			polling-delay-passive = <0>;
			polling-delay = <0>;
			thermal-governor = "step_wise";
			thermal-sensors = <&tsens0 3>;
			trips {
				active-config0 {
					temperature = <65000>;
					hysteresis = <1000>;
					type = "passive";
				};
			};
		};

		cpu3-silver-ts0-h {
			polling-delay-passive = <0>;
			polling-delay = <0>;
			thermal-sensors = <&tsens0 4>;
			thermal-governor = "step_wise";
			trips {
				active-config0 {
					temperature = <65000>;
					hysteresis = <1000>;
					type = "passive";
				};
			};
		};

		kryo-l3-0-ts0-h {
			polling-delay-passive = <0>;
			polling-delay = <0>;
			thermal-sensors = <&tsens0 5>;
			thermal-governor = "step_wise";
			trips {
				active-config0 {
					temperature = <65000>;
					hysteresis = <1000>;
					type = "passive";
				};
			};
		};

		kryo-l3-1-ts0-h {
			polling-delay-passive = <0>;
			polling-delay = <0>;
			thermal-sensors = <&tsens0 6>;
			thermal-governor = "step_wise";
			trips {
				active-config0 {
					temperature = <65000>;
					hysteresis = <1000>;
					type = "passive";
				};
			};
		};

		cpu0-gold-ts0-h {
			polling-delay-passive = <0>;
			polling-delay = <0>;
			thermal-sensors = <&tsens0 7>;
			thermal-governor = "step_wise";
			trips {
				active-config0 {
					temperature = <65000>;
					hysteresis = <1000>;
					type = "passive";
				};
			};
		};

		cpu1-gold-ts0-h {
			polling-delay-passive = <0>;
			polling-delay = <0>;
			thermal-sensors = <&tsens0 8>;
			thermal-governor = "step_wise";
			trips {
				active-config0 {
					temperature = <65000>;
					hysteresis = <1000>;
					type = "passive";
				};
			};
		};

		cpu2-gold-ts0-h {
			polling-delay-passive = <0>;
			polling-delay = <0>;
			thermal-sensors = <&tsens0 9>;
			thermal-governor = "step_wise";
			trips {
				active-config0 {
					temperature = <65000>;
					hysteresis = <1000>;
					type = "passive";
				};
			};
		};

		cpu3-gold-ts0-h {
			polling-delay-passive = <0>;
			polling-delay = <0>;
			thermal-sensors = <&tsens0 10>;
			thermal-governor = "step_wise";
			trips {
				active-config0 {
					temperature = <65000>;
					hysteresis = <1000>;
					type = "passive";
				};
			};
		};

		gpu0-ts0-h {
			polling-delay-passive = <0>;
			polling-delay = <0>;
			thermal-sensors = <&tsens0 11>;
			thermal-governor = "step_wise";
			trips {
				active-config0 {
					temperature = <65000>;
					hysteresis = <1000>;
					type = "passive";
				};
			};
		};

		gpu1-ts0-h {
			polling-delay-passive = <0>;
			polling-delay = <0>;
			thermal-governor = "step_wise";
			thermal-sensors = <&tsens0 12>;
			trips {
				active-config0 {
					temperature = <65000>;
					hysteresis = <1000>;
					type = "passive";
				};
			};
		};

		aoss1-ts1-h {
			polling-delay-passive = <0>;
			polling-delay = <0>;
			thermal-sensors = <&tsens1 0>;
			thermal-governor = "step_wise";
			trips {
				active-config0 {
					temperature = <65000>;
					hysteresis = <1000>;
					type = "passive";
				};
			};
		};

		mdm-dsp-ts1-h {
			polling-delay-passive = <0>;
			polling-delay = <0>;
			thermal-sensors = <&tsens1 1>;
			thermal-governor = "step_wise";
			trips {
				active-config0 {
					temperature = <65000>;
					hysteresis = <1000>;
					type = "passive";
				};
			};
		};



		ddr-ts1-h {
			polling-delay-passive = <0>;
			polling-delay = <0>;
			thermal-sensors = <&tsens1 2>;
			thermal-governor = "step_wise";
			trips {
				active-config0 {
					temperature = <65000>;
					hysteresis = <1000>;
					type = "passive";
				};
			};
		};

		wlan-ts1-h {
			polling-delay-passive = <0>;
			polling-delay = <0>;
			thermal-sensors = <&tsens1 3>;
			thermal-governor = "step_wise";
			trips {
				active-config0 {
					temperature = <65000>;
					hysteresis = <1000>;
					type = "passive";
				};
			};
		};

		compute-hvx-ts1-h {
			polling-delay-passive = <0>;
			polling-delay = <0>;
			thermal-sensors = <&tsens1 4>;
			thermal-governor = "step_wise";
			trips {
				active-config0 {
					temperature = <65000>;
					hysteresis = <1000>;
					type = "passive";
				};
			};
		};

		camera-ts1-h {
			polling-delay-passive = <0>;
			polling-delay = <0>;
			thermal-sensors = <&tsens1 5>;
			thermal-governor = "step_wise";
			trips {
				active-config0 {
					temperature = <65000>;
					hysteresis = <1000>;
					type = "passive";
				};
			};
		};

		mmss-ts1-h {
			polling-delay-passive = <0>;
			polling-delay = <0>;
			thermal-sensors = <&tsens1 6>;
			thermal-governor = "step_wise";
			trips {
				active-config0 {
					temperature = <65000>;
					hysteresis = <1000>;
					type = "passive";
				};
			};
		};

		mdm-core-ts1-h {
			polling-delay-passive = <0>;
			polling-delay = <0>;
			thermal-sensors = <&tsens1 7>;
			thermal-governor = "step_wise";
			trips {
				active-config0 {
					temperature = <65000>;
					hysteresis = <1000>;
					type = "passive";
				};
			};
		};
	};

	tsens0: tsens@c222000 {
		compatible = "qcom,sdm845-tsens";
		reg = <0xc222000 0x4>,
		      <0xc263000 0x1ff>;
		reg-names = "tsens_srot_physical",
			    "tsens_tm_physical";
		interrupts = <0 506 0>, <0 508 0>;
		interrupt-names = "tsens-upper-lower", "tsens-critical";
		#thermal-sensor-cells = <1>;
	};

	tsens1: tsens@c223000 {
		compatible = "qcom,sdm845-tsens";
		reg = <0xc223000 0x4>,
		      <0xc265000 0x1ff>;
		reg-names = "tsens_srot_physical",
			    "tsens_tm_physical";
		interrupts = <0 507 0>, <0 509 0>;
		interrupt-names = "tsens-upper-lower", "tsens-critical";
		#thermal-sensor-cells = <1>;
	};
};

&pcie_0_gdsc {