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

Commit 5afac231 authored by Lakshmi Sunkara's avatar Lakshmi Sunkara Committed by Gerrit - the friendly Code Review server
Browse files

ARM: dts: msm: Update adc_tm support for SDM670



Register ADC_TM channels with of_thermal to support thermal core
framework to read temperature, set temperature thresholds and receive
notifications when temperature thresholds are crossed.

Change-Id: Id501334023606089e322d0e8667556a80f82071d
Signed-off-by: default avatarLakshmi Sunkara <lakshmis@codeaurora.org&gt;a>
Signed-off-by: default avatarRama Krishna Phani A <rphani@codeaurora.org>
parent a3c0e78a
Loading
Loading
Loading
Loading
+100 −0
Original line number Diff line number Diff line
@@ -488,6 +488,7 @@
			qcom,adc_tm-vadc = <&pm660_vadc>;
			qcom,decimation = <0>;
			qcom,fast-avg-setup = <0>;
			#thermal-sensor-cells = <1>;

			chan@83 {
				label = "vph_pwr";
@@ -531,6 +532,28 @@
				qcom,btm-channel-number = <0x78>;
				qcom,thermal-node;
			};

			chan@4e {
				label = "emmc_therm";
				reg = <0x4e>;
				qcom,pre-div-channel-scaling = <0>;
				qcom,calibration-type = "ratiometric";
				qcom,scale-function = <2>;
				qcom,hw-settle-time = <2>;
				qcom,btm-channel-number = <0x80>;
				qcom,vadc-thermal-node;
			};

			chan@4f {
				label = "pa_therm0";
				reg = <0x4f>;
				qcom,pre-div-channel-scaling = <0>;
				qcom,calibration-type = "ratiometric";
				qcom,scale-function = <2>;
				qcom,hw-settle-time = <2>;
				qcom,btm-channel-number = <0x88>;
				qcom,vadc-thermal-node;
			};
		};

		pm660_rradc: rradc@4500 {
@@ -631,3 +654,80 @@
		#size-cells = <0>;
	};
};

&thermal_zones {
	xo-therm-adc {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&pm660_adc_tm 0x4c>;
		thermal-governor = "user_space";

		trips {
			active-config0 {
				temperature = <65000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};

	msm-therm-adc {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&pm660_adc_tm 0x4d>;
		thermal-governor = "user_space";

		trips {
			active-config0 {
				temperature = <65000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};

	emmc-therm-adc {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&pm660_adc_tm 0x4e>;
		thermal-governor = "user_space";

		trips {
			active-config0 {
				temperature = <65000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};

	pa-therm0-adc {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&pm660_adc_tm 0x4f>;
		thermal-governor = "user_space";

		trips {
			active-config0 {
				temperature = <65000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};

	quiet-therm-adc {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&pm660_adc_tm 0x51>;
		thermal-governor = "user_space";

		trips {
			active-config0 {
				temperature = <65000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};
};