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

Commit 99f0a486 authored by Siddartha Mohanadoss's avatar Siddartha Mohanadoss
Browse files

ARM: dts: msm: Add ADC_TM nodes for PM855, PM855B and PM855l



ADC_TM peripheral supports clients to set temperature thresholds
and receive notification. Add ADC_TM channels as thermal zones
that are registered with of_thermal for thermal clients to
set trip thresholds and read temperature.

Change-Id: I8932c44bf3b5178d09d7431b435c153b30ce959e
Signed-off-by: default avatarSiddartha Mohanadoss <smohanad@codeaurora.org>
parent 5b27f076
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -134,6 +134,17 @@
				qcom,pre-scaling = <1 1>;
			};
		};

		pm855_adc_tm: adc_tm@3500 {
			compatible = "qcom,adc-tm5";
			reg = <0x3500 0x100>;
			interrupts = <0x0 0x35 0x0 IRQ_TYPE_EDGE_RISING>;
			interrupt-names = "thr-int-en";
			#address-cells = <1>;
			#size-cells = <0>;
			#thermal-sensor-cells = <1>;
			io-channels = <&pm855_vadc ADC_XO_THERM_PU2>;
		};
	};

	qcom,pm855@1 {
+25 −0
Original line number Diff line number Diff line
@@ -142,6 +142,17 @@
			};
		};

		pm855b_adc_tm: adc_tm@3500 {
			compatible = "qcom,adc-tm5";
			reg = <0x3500 0x100>;
			interrupts = <0x2 0x35 0x0 IRQ_TYPE_EDGE_RISING>;
			interrupt-names = "thr-int-en";
			#address-cells = <1>;
			#size-cells = <0>;
			#thermal-sensor-cells = <1>;
			io-channels = <&pm855b_vadc ADC_AMUX_THM2_PU2>;
		};

		pm855b_charger: qcom,qpnp-smb5 {
			compatible = "qcom,qpnp-smb5";
			#address-cells = <1>;
@@ -472,6 +483,20 @@
};

&thermal_zones {
	pm855b-wp-therm {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&pm855b_adc_tm ADC_AMUX_THM2_PU2>;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};

	pm855b_temp_alarm: pm855b_tz {
		polling-delay-passive = <0>;
		polling-delay = <0>;
+13 −0
Original line number Diff line number Diff line
@@ -117,6 +117,19 @@
						"bcl-vbat-lvl2";
			#thermal-sensor-cells = <1>;
		};

		pm855l_adc_tm: adc_tm@3500 {
			compatible = "qcom,adc-tm5";
			reg = <0x3500 0x100>;
			interrupts = <0x4 0x35 0x0 IRQ_TYPE_EDGE_RISING>;
			interrupt-names = "thr-int-en";
			#address-cells = <1>;
			#size-cells = <0>;
			#thermal-sensor-cells = <1>;
			io-channels = <&pm855l_vadc ADC_AMUX_THM1_PU2>,
					<&pm855l_vadc ADC_AMUX_THM2_PU2>,
					<&pm855l_vadc ADC_AMUX_THM3_PU2>;
		};
	};

	qcom,pm855l@5 {
+108 −0
Original line number Diff line number Diff line
@@ -410,3 +410,111 @@
	mhi,fw-name = "debug.mbn";
	status = "okay";
};

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

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

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

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

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

&thermal_zones {
	wp-therm {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&pm855b_adc_tm ADC_AMUX_THM2_PU2>;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};

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

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

	skin-msm-therm {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&pm855l_adc_tm ADC_AMUX_THM2_PU2>;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};

	pa-therm2 {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&pm855l_adc_tm ADC_AMUX_THM3_PU2>;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};
};
+108 −0
Original line number Diff line number Diff line
@@ -414,3 +414,111 @@
	mhi,fw-name = "debug.mbn";
	status = "okay";
};

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

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

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

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

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

&thermal_zones {
	wp-therm {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&pm855b_adc_tm ADC_AMUX_THM2_PU2>;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};

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

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

	skin-msm-therm {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&pm855l_adc_tm ADC_AMUX_THM2_PU2>;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};

	pa-therm2 {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&pm855l_adc_tm ADC_AMUX_THM3_PU2>;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};
};
Loading