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

Commit 4bd6d1f6 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ARM: dts: msm: Add ADC support for PM5100"

parents 88dd9b38 86a09d8f
Loading
Loading
Loading
Loading
+95 −0
Original line number Diff line number Diff line
@@ -32,3 +32,98 @@
		};
	};
};

&pm5100_adc {
	pm5100_xo_therm {
		qcom,adc-tm-type = <1>;
	};

	pm5100_pa_therm_0 {
		reg = <PM5100_ADC5_GEN3_AMUX4_THM_100K_PU>;
		label = "pm5100_pa_therm_0";
		qcom,ratiometric;
		qcom,hw-settle-time = <200>;
		qcom,pre-scaling = <1 1>;
		qcom,adc-tm-type = <1>;
	};

	pm5100_quiet_therm {
		reg = <PM5100_ADC5_GEN3_AMUX5_THM_100K_PU>;
		label = "pm5100_quiet_therm";
		qcom,ratiometric;
		qcom,hw-settle-time = <200>;
		qcom,pre-scaling = <1 1>;
		qcom,adc-tm-type = <1>;
	};

	pm5100_msm_therm {
		reg = <PM5100_ADC5_GEN3_AMUX6_THM_100K_PU>;
		label = "pm5100_msm_therm";
		qcom,ratiometric;
		qcom,hw-settle-time = <200>;
		qcom,pre-scaling = <1 1>;
		qcom,adc-tm-type = <1>;
	};
};

&thermal_zones {
	xo-therm-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&pm5100_adc PM5100_ADC5_GEN3_AMUX1_THM_100K_PU>;
		wake-capable-sensor;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};

	pa-therm0-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&pm5100_adc PM5100_ADC5_GEN3_AMUX4_THM_100K_PU>;
		wake-capable-sensor;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};

	quiet-therm-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&pm5100_adc PM5100_ADC5_GEN3_AMUX5_THM_100K_PU>;
		wake-capable-sensor;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};

	sdm-skin-therm-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&pm5100_adc PM5100_ADC5_GEN3_AMUX6_THM_100K_PU>;
		wake-capable-sensor;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};
};
+2 −0
Original line number Diff line number Diff line
@@ -895,6 +895,8 @@
		cell-index = <0>;
	};

	thermal_zones: thermal-zones {};

	slim_aud: slim@a5c0000 {
		cell-index = <1>;
		compatible = "qcom,slim-ngd";
+96 −0
Original line number Diff line number Diff line
#include <dt-bindings/input/input.h>
#include <dt-bindings/input/qcom,qpnp-power-on.h>
#include <dt-bindings/spmi/spmi.h>
#include <dt-bindings/iio/qcom,spmi-vadc.h>
#include <dt-bindings/iio/qcom,spmi-adc5-gen3-pm5100.h>

&spmi_bus {
	#address-cells = <2>;
@@ -39,6 +41,100 @@
			#thermal-sensor-cells = <0>;
		};

		pm5100_adc: vadc@8000 {
			compatible = "qcom,spmi-adc5-gen3";
			reg = <0x8000>, <0x8300>;
			reg-names = "adc5-gen3-base", "adc5-gen3-debug-base";
			#address-cells = <1>;
			#size-cells = <0>;
			interrupts = <0x0 0x80 0x1 IRQ_TYPE_EDGE_RISING>;
			interrupt-names = "adc";
			#io-channel-cells = <1>;
			status = "disabled";

			pm5100_ref_gnd {
				reg = <PM5100_ADC5_GEN3_OFFSET_REF>;
				label = "pm5100_ref_gnd";
				qcom,pre-scaling = <1 1>;
			};

			pm5100_vref_1p25 {
				reg = <PM5100_ADC5_GEN3_1P25VREF>;
				label = "pm5100_vref_1p25";
				qcom,pre-scaling = <1 1>;
			};

			pm5100_die_temp {
				reg = <PM5100_ADC5_GEN3_DIE_TEMP>;
				label = "pm5100_die_temp";
				qcom,pre-scaling = <1 1>;
			};

			pm5100_xo_therm {
				reg = <PM5100_ADC5_GEN3_AMUX1_THM_100K_PU>;
				label = "pm5100_xo_therm";
				qcom,ratiometric;
				qcom,hw-settle-time = <700>;
				qcom,pre-scaling = <1 1>;
			};

			pm5100_usb_in_i_uv {
				reg = <PM5100_ADC5_GEN3_USB_IN_I>;
				label = "pm5100_usb_in_i_uv";
				qcom,pre-scaling = <1 1>;
				qcom,scale-fn-type = <ADC_SCALE_HW_CALIB_PM5_GEN3_USB_IN_I>;
			};

			pm5100_chg_temp {
				reg = <PM5100_ADC5_GEN3_CHG_TEMP>;
				label = "pm5100_chg_temp";
				qcom,pre-scaling = <1 1>;
				qcom,scale-fn-type = <ADC_SCALE_HW_CALIB_PM5_CHG_TEMP>;
			};

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

			pm5100_boost_out_v {
				reg = <PM5100_ADC5_GEN3_VIN_DIV16_MUX>;
				label = "pm5100_boost_out_v";
				qcom,pre-scaling = <1 6>;
			};

			pm5100_bat_therm {
				reg = <PM5100_ADC5_GEN3_BATT_THM_100K_PU>;
				label = "pm5100_bat_therm";
				qcom,ratiometric;
				qcom,hw-settle-time = <200>;
				qcom,pre-scaling = <1 1>;
				qcom,scale-fn-type = <ADC_SCALE_HW_CALIB_PM5_GEN3_BATT_THERM_100K>;
			};

			pm5100_bat_id {
				reg = <PM5100_ADC5_GEN3_BAT_ID_100K_PU>;
				label = "pm5100_bat_id";
				qcom,ratiometric;
				qcom,hw-settle-time = <200>;
				qcom,pre-scaling = <1 1>;
				qcom,scale-fn-type = <ADC_SCALE_HW_CALIB_PM5_GEN3_BATT_ID_100K>;
			};

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

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

		pm5100_gpios: pinctrl@8800 {
			compatible = "qcom,pm5100-gpio";
			reg = <0x8800>;