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

Commit 89fd652f authored by Siddartha Mohanadoss's avatar Siddartha Mohanadoss
Browse files

ARM: dts: msm: Add ADC channel nodes for sdxprairie



Add VADC peripheral channels to read on board system thermistors
from pmxprairie and pm8150b. Add thermal zones to read on board
system thermistors through thermal sysfs.

Change-Id: I7312300445e0b2f1dea8c11664b04f1365632412
Signed-off-by: default avatarSiddartha Mohanadoss <smohanad@codeaurora.org>
parent a487c3ab
Loading
Loading
Loading
Loading
+44 −0
Original line number Diff line number Diff line
@@ -113,6 +113,50 @@
			#gpio-cells = <2>;
			qcom,gpios-disallowed = <3 7 11>;
		};

		pmxprairie_vadc: vadc@3100 {
			compatible = "qcom,spmi-adc5";
			reg = <0x3100 0x100>;
			#address-cells = <1>;
			#size-cells = <0>;
			interrupts = <0x8 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
			interrupt-names = "eoc-int-en-set";
			qcom,adc-vdd-reference = <1875>;
			#io-channel-cells = <1>;
			io-channel-ranges;

			/* Channel node */
			ref_gnd {
				reg = <ADC_REF_GND>;
				label = "ref_gnd";
				qcom,pre-scaling = <1 1>;
			};

			vref_1p25 {
				reg = <ADC_1P25VREF>;
				label = "vref_1p25";
				qcom,pre-scaling = <1 1>;
			};

			die_temp {
				reg = <ADC_DIE_TEMP>;
				label = "die_temp";
				qcom,pre-scaling = <1 1>;
			};
		};

		pmxprairie_adc_tm_iio: adc_tm@3500 {
			compatible = "qcom,adc-tm5-iio";
			reg = <0x3500 0x100>;
			#address-cells = <1>;
			#size-cells = <0>;
			#thermal-sensor-cells = <1>;
			io-channels = <&pmxprairie_vadc ADC_XO_THERM_PU2>,
					<&pmxprairie_vadc ADC_AMUX_THM1_PU2>,
					<&pmxprairie_vadc ADC_AMUX_THM2_PU2>,
					<&pmxprairie_vadc ADC_AMUX_THM3_PU2>,
					<&pmxprairie_vadc ADC_GPIO1_PU2>;
		};
	};

	qcom,pmxprairie@9 {
+161 −0
Original line number Diff line number Diff line
@@ -11,3 +11,164 @@
 */

#include "sdxprairie-pmic-overlay.dtsi"

&pmxprairie_vadc {
	vph_pwr {
		reg = <ADC_VPH_PWR>;
		label = "vph_pwr";
		qcom,pre-scaling = <1 3>;
	};

	xo_therm {
		reg = <ADC_XO_THERM_PU2>;
		label = "xo_therm";
		qcom,ratiometric;
		qcom,hw-settle-time = <200>;
		qcom,pre-scaling = <1 1>;
	};

	pa_therm1 {
		reg = <ADC_AMUX_THM1_PU2>;
		label = "pa_therm1";
		qcom,ratiometric;
		qcom,hw-settle-time = <200>;
		qcom,pre-scaling = <1 1>;
	};

	pa_therm2 {
		reg = <ADC_AMUX_THM2_PU2>;
		label = "pa_therm2";
		qcom,ratiometric;
		qcom,hw-settle-time = <200>;
		qcom,pre-scaling = <1 1>;
	};

	sdx_case_therm {
		reg = <ADC_AMUX_THM3_PU2>;
		label = "sdx_case_therm";
		qcom,ratiometric;
		qcom,hw-settle-time = <200>;
		qcom,pre-scaling = <1 1>;
	};

	ambient_therm {
		reg = <ADC_GPIO1_PU2>;
		label = "ambient_therm";
		qcom,ratiometric;
		qcom,hw-settle-time = <200>;
		qcom,pre-scaling = <1 1>;
	};
};

&pmxprairie_adc_tm_iio {
	xo_therm {
		reg = <ADC_XO_THERM_PU2>;
		qcom,ratiometric;
		qcom,hw-settle-time = <200>;
	};

	pa_therm1 {
		reg = <ADC_AMUX_THM1_PU2>;
		qcom,ratiometric;
		qcom,hw-settle-time = <200>;
	};

	pa_therm2 {
		reg = <ADC_AMUX_THM2_PU2>;
		qcom,ratiometric;
		qcom,hw-settle-time = <200>;
	};

	sdx_case_therm {
		reg = <ADC_AMUX_THM3_PU2>;
		qcom,ratiometric;
		qcom,hw-settle-time = <200>;
	};

	ambient_therm {
		reg = <ADC_GPIO1_PU2>;
		qcom,ratiometric;
		qcom,hw-settle-time = <200>;
	};
};

&pm8150b_vadc {
	vph_pwr {
		reg = <ADC_VPH_PWR>;
		label = "vph_pwr";
		qcom,pre-scaling = <1 3>;
	};

	conn_therm {
		reg = <ADC_AMUX_THM3_PU2>;
		label = "conn_therm";
		qcom,ratiometric;
		qcom,hw-settle-time = <200>;
		qcom,pre-scaling = <1 1>;
	};

	chg_sbux {
		reg = <ADC_SBUx>;
		label = "chg_sbux";
		qcom,pre-scaling = <1 3>;
	};

	mid_chg_div6 {
		reg = <ADC_MID_CHG_DIV6>;
		label = "chg_mid";
		qcom,pre-scaling = <1 6>;
	};

	usb_in_i_uv {
		reg = <ADC_USB_IN_I>;
		label = "usb_in_i_uv";
		qcom,pre-scaling = <1 1>;
	};

	usb_in_v_div_16 {
		reg = <ADC_USB_IN_V_16>;
		label = "usb_in_v_div_16";
		qcom,pre-scaling = <1 16>;
	};
};

&pm8150b_adc_tm {
	status = "disabled";
};

&thermal_zones {
	xo-therm-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&pmxprairie_adc_tm_iio ADC_XO_THERM_PU2>;
		thermal-governor = "user_space";
	};

	pa-therm1-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&pmxprairie_adc_tm_iio ADC_AMUX_THM1_PU2>;
		thermal-governor = "user_space";
	};

	pa-therm2-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&pmxprairie_adc_tm_iio ADC_AMUX_THM2_PU2>;
		thermal-governor = "user_space";
	};

	sdx-case-therm-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&pmxprairie_adc_tm_iio ADC_AMUX_THM3_PU2>;
		thermal-governor = "user_space";
	};

	ambient-therm-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&pmxprairie_adc_tm_iio ADC_GPIO1_PU2>;
		thermal-governor = "user_space";
	};
};
+161 −0
Original line number Diff line number Diff line
@@ -11,3 +11,164 @@
 */

#include "sdxprairie-pmic-overlay.dtsi"

&pmxprairie_vadc {
	vph_pwr {
		reg = <ADC_VPH_PWR>;
		label = "vph_pwr";
		qcom,pre-scaling = <1 3>;
	};

	xo_therm {
		reg = <ADC_XO_THERM_PU2>;
		label = "xo_therm";
		qcom,ratiometric;
		qcom,hw-settle-time = <200>;
		qcom,pre-scaling = <1 1>;
	};

	pa_therm1 {
		reg = <ADC_AMUX_THM1_PU2>;
		label = "pa_therm1";
		qcom,ratiometric;
		qcom,hw-settle-time = <200>;
		qcom,pre-scaling = <1 1>;
	};

	pa_therm2 {
		reg = <ADC_AMUX_THM2_PU2>;
		label = "pa_therm2";
		qcom,ratiometric;
		qcom,hw-settle-time = <200>;
		qcom,pre-scaling = <1 1>;
	};

	sdx_case_therm {
		reg = <ADC_AMUX_THM3_PU2>;
		label = "sdx_case_therm";
		qcom,ratiometric;
		qcom,hw-settle-time = <200>;
		qcom,pre-scaling = <1 1>;
	};

	ambient_therm {
		reg = <ADC_GPIO1_PU2>;
		label = "ambient_therm";
		qcom,ratiometric;
		qcom,hw-settle-time = <200>;
		qcom,pre-scaling = <1 1>;
	};
};

&pmxprairie_adc_tm_iio {
	xo_therm {
		reg = <ADC_XO_THERM_PU2>;
		qcom,ratiometric;
		qcom,hw-settle-time = <200>;
	};

	pa_therm1 {
		reg = <ADC_AMUX_THM1_PU2>;
		qcom,ratiometric;
		qcom,hw-settle-time = <200>;
	};

	pa_therm2 {
		reg = <ADC_AMUX_THM2_PU2>;
		qcom,ratiometric;
		qcom,hw-settle-time = <200>;
	};

	sdx_case_therm {
		reg = <ADC_AMUX_THM3_PU2>;
		qcom,ratiometric;
		qcom,hw-settle-time = <200>;
	};

	ambient_therm {
		reg = <ADC_GPIO1_PU2>;
		qcom,ratiometric;
		qcom,hw-settle-time = <200>;
	};
};

&pm8150b_vadc {
	vph_pwr {
		reg = <ADC_VPH_PWR>;
		label = "vph_pwr";
		qcom,pre-scaling = <1 3>;
	};

	conn_therm {
		reg = <ADC_AMUX_THM3_PU2>;
		label = "conn_therm";
		qcom,ratiometric;
		qcom,hw-settle-time = <200>;
		qcom,pre-scaling = <1 1>;
	};

	chg_sbux {
		reg = <ADC_SBUx>;
		label = "chg_sbux";
		qcom,pre-scaling = <1 3>;
	};

	mid_chg_div6 {
		reg = <ADC_MID_CHG_DIV6>;
		label = "chg_mid";
		qcom,pre-scaling = <1 6>;
	};

	usb_in_i_uv {
		reg = <ADC_USB_IN_I>;
		label = "usb_in_i_uv";
		qcom,pre-scaling = <1 1>;
	};

	usb_in_v_div_16 {
		reg = <ADC_USB_IN_V_16>;
		label = "usb_in_v_div_16";
		qcom,pre-scaling = <1 16>;
	};
};

&pm8150b_adc_tm {
	status = "disabled";
};

&thermal_zones {
	xo-therm-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&pmxprairie_adc_tm_iio ADC_XO_THERM_PU2>;
		thermal-governor = "user_space";
	};

	pa-therm1-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&pmxprairie_adc_tm_iio ADC_AMUX_THM1_PU2>;
		thermal-governor = "user_space";
	};

	pa-therm2-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&pmxprairie_adc_tm_iio ADC_AMUX_THM2_PU2>;
		thermal-governor = "user_space";
	};

	sdx-case-therm-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&pmxprairie_adc_tm_iio ADC_AMUX_THM3_PU2>;
		thermal-governor = "user_space";
	};

	ambient-therm-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&pmxprairie_adc_tm_iio ADC_GPIO1_PU2>;
		thermal-governor = "user_space";
	};
};