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

Commit 4b8b38f4 authored by Jishnu Prakash's avatar Jishnu Prakash
Browse files

ARM: dts: msm: Add VADC and ADC_TM support for sdmmagpie



Add VADC and ADC_TM nodes with channels and user thermal_zone
entries for PM6150 and PM6150l for sdmmagpie.

Change-Id: I79bf02f0f740ebb75521324949b21483fa9882dd
Signed-off-by: default avatarJishnu Prakash <jprakash@codeaurora.org>
parent 44a69824
Loading
Loading
Loading
Loading
+98 −0
Original line number Diff line number Diff line
@@ -349,4 +349,102 @@
			};
		};
	};

	xo-therm-adc {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&pm6150_adc_tm ADC_XO_THERM_PU2>;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};

	rf-pa0-therm-adc {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&pm6150_adc_tm ADC_AMUX_THM2_PU2>;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};

	rf-pa1-therm-adc {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&pm6150_adc_tm ADC_AMUX_THM3_PU2>;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};

	quiet-therm-adc {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&pm6150_adc_tm ADC_AMUX_THM4_PU2>;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};

	conn-therm-adc {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&pm6150l_adc_tm ADC_AMUX_THM1_PU2>;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};

	camera-ftherm-adc {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&pm6150l_adc_tm ADC_AMUX_THM3_PU2>;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};

	nvm-therm-adc {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&pm6150l_adc_tm ADC_GPIO4_PU2>;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};
};
+117 −1
Original line number Diff line number Diff line
@@ -1862,7 +1862,6 @@
#include "sdmmagpie-pinctrl.dtsi"
#include "sdmmagpie-gdsc.dtsi"
#include "sdmmagpie-qupv3.dtsi"
#include "sdmmagpie-thermal.dtsi"

&pcie_0_gdsc {
	status = "ok";
@@ -1983,3 +1982,120 @@
#include "pm6150l.dtsi"
#include "sdmmagpie-regulator.dtsi"
#include "sdmmagpie-coresight.dtsi"
#include "sdmmagpie-thermal.dtsi"

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

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

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

&pm6150_adc_tm {
	io-channels = <&pm6150_vadc ADC_XO_THERM_PU2>,
			<&pm6150_vadc ADC_AMUX_THM2_PU2>,
			<&pm6150_vadc ADC_AMUX_THM3_PU2>,
			<&pm6150_vadc ADC_AMUX_THM4_PU2>;

	/* Channel nodes */
	xo_therm {
		reg = <ADC_XO_THERM_PU2>;
		qcom,ratiometric;
		qcom,hw-settle-time = <200>;
	};

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

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

	quiet_therm {
		reg = <ADC_AMUX_THM4_PU2>;
		qcom,ratiometric;
		qcom,hw-settle-time = <200>;
	};
};

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

	smb_therm {
		reg = <ADC_AMUX_THM2>;
		label = "smb_therm";
		qcom,hw-settle-time = <200>;
		qcom,pre-scaling = <1 1>;
	};

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

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

&pm6150l_adc_tm {
	io-channels = <&pm6150l_vadc ADC_AMUX_THM1_PU2>,
			<&pm6150l_vadc ADC_AMUX_THM3_PU2>,
			<&pm6150l_vadc ADC_GPIO4_PU2>;

	/* Channel nodes */
	conn_therm {
		reg = <ADC_AMUX_THM1_PU2>;
		qcom,ratiometric;
		qcom,hw-settle-time = <200>;
	};

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

	nvm_therm {
		reg = <ADC_GPIO4_PU2>;
		qcom,ratiometric;
		qcom,hw-settle-time = <200>;
	};
};