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

Commit 9a3bf9a8 authored by Siddartha Mohanadoss's avatar Siddartha Mohanadoss
Browse files

ARM: dts: msm: Add ADC nodes for SDM845 QRD



Support clients to read vph_pwr, vcoin and
thermistor channels such as msm, PA and
quiet thermistor through VADC. Clients can
set thresholds for VADC channels and receive
notification using ADC_TM peripheral.

Change-Id: I668f61f2de06141eed74b2219a3321fcd3f91c16
Signed-off-by: default avatarSiddartha Mohanadoss <smohanad@codeaurora.org>
parent e13b3810
Loading
Loading
Loading
Loading
+186 −0
Original line number Diff line number Diff line
@@ -265,3 +265,189 @@
&ext_5v_boost {
	status = "ok";
};

&pm8998_vadc {
	chan@83 {
		label = "vph_pwr";
		reg = <0x83>;
		qcom,decimation = <2>;
		qcom,pre-div-channel-scaling = <1>;
		qcom,calibration-type = "absolute";
		qcom,scale-function = <0>;
		qcom,hw-settle-time = <0>;
		qcom,fast-avg-setup = <0>;
	};

	chan@85 {
		label = "vcoin";
		reg = <0x85>;
		qcom,decimation = <2>;
		qcom,pre-div-channel-scaling = <1>;
		qcom,calibration-type = "absolute";
		qcom,scale-function = <0>;
		qcom,hw-settle-time = <0>;
		qcom,fast-avg-setup = <0>;
	};

	chan@4c {
		label = "xo_therm";
		reg = <0x4c>;
		qcom,decimation = <2>;
		qcom,pre-div-channel-scaling = <0>;
		qcom,calibration-type = "ratiometric";
		qcom,scale-function = <4>;
		qcom,hw-settle-time = <2>;
		qcom,fast-avg-setup = <0>;
	};

	chan@4d {
		label = "msm_therm";
		reg = <0x4d>;
		qcom,decimation = <2>;
		qcom,pre-div-channel-scaling = <0>;
		qcom,calibration-type = "ratiometric";
		qcom,scale-function = <2>;
		qcom,hw-settle-time = <2>;
		qcom,fast-avg-setup = <0>;
	};

	chan@4f {
		label = "pa_therm1";
		reg = <0x4f>;
		qcom,decimation = <2>;
		qcom,pre-div-channel-scaling = <0>;
		qcom,calibration-type = "ratiometric";
		qcom,scale-function = <2>;
		qcom,hw-settle-time = <2>;
		qcom,fast-avg-setup = <0>;
	};

	chan@51 {
		label = "quiet_therm";
		reg = <0x51>;
		qcom,decimation = <2>;
		qcom,pre-div-channel-scaling = <0>;
		qcom,calibration-type = "ratiometric";
		qcom,scale-function = <2>;
		qcom,hw-settle-time = <2>;
		qcom,fast-avg-setup = <0>;
	};
};

&pm8998_adc_tm {
	chan@83 {
		label = "vph_pwr";
		reg = <0x83>;
		qcom,pre-div-channel-scaling = <1>;
		qcom,calibration-type = "absolute";
		qcom,scale-function = <0>;
		qcom,hw-settle-time = <0>;
		qcom,btm-channel-number = <0x60>;
	};

	chan@4c {
		label = "xo_therm";
		reg = <0x4c>;
		qcom,pre-div-channel-scaling = <0>;
		qcom,calibration-type = "ratiometric";
		qcom,scale-function = <4>;
		qcom,hw-settle-time = <2>;
		qcom,btm-channel-number = <0x68>;
		qcom,thermal-node;
	};

	chan@4d {
		label = "msm_therm";
		reg = <0x4d>;
		qcom,pre-div-channel-scaling = <0>;
		qcom,calibration-type = "ratiometric";
		qcom,scale-function = <2>;
		qcom,hw-settle-time = <2>;
		qcom,btm-channel-number = <0x70>;
		qcom,thermal-node;
	};

	chan@4f {
		label = "pa_therm1";
		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 = <0x78>;
		qcom,thermal-node;
	};

	chan@51 {
		label = "quiet_therm";
		reg = <0x51>;
		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,thermal-node;
	};
};

&thermal_zones {
	xo-therm-adc {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&pm8998_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 = <&pm8998_adc_tm 0x4d>;
		thermal-governor = "user_space";

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

	pa-therm1-adc {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&pm8998_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 = <&pm8998_adc_tm 0x51>;
		thermal-governor = "user_space";

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