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

Commit 426693e6 authored by Jishnu Prakash's avatar Jishnu Prakash
Browse files

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



Add VADC and ADC_TM nodes with VADC channels for PM6125
and PMI632 for trinket.

Change-Id: I4c1e71a2dd6ab72234a9dd077bc343c58729721f
Signed-off-by: default avatarJishnu Prakash <jprakash@codeaurora.org>
parent 0885c924
Loading
Loading
Loading
Loading
+61 −0
Original line number Diff line number Diff line
@@ -53,6 +53,67 @@
			};
		};

		pm6125_vadc: vadc@3100 {
			compatible = "qcom,spmi-adc5";
			reg = <0x3100 0x100>;
			#address-cells = <1>;
			#size-cells = <0>;
			interrupts = <0x0 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 nodes */
			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>;
			};

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

			vcoin {
				reg = <ADC_VCOIN>;
				label = "vcoin";
				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>;
			};
		};

		pm6125_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>;
		};

		pm6125_misc: qcom,misc@900 {
			compatible = "qcom,qpnp-misc";
			reg = <0x900 0x100>;
+125 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@

#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/spmi/spmi.h>
#include <dt-bindings/iio/qcom,spmi-vadc.h>

&spmi_bus {
	qcom,pmi632@2 {
@@ -33,6 +34,130 @@
			qcom,s3-src = "kpdpwr";
		};

		pmi632_vadc: vadc@3100 {
			compatible = "qcom,spmi-adc5";
			reg = <0x3100 0x100>, <0x3700 0x100>;
			reg-names = "adc5-usr-base", "adc5-cal-base";
			#address-cells = <1>;
			#size-cells = <0>;
			interrupts = <0x2 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
			interrupt-names = "eoc-int-en-set";
			qcom,adc-vdd-reference = <1875>;
			#io-channel-cells = <1>;
			io-channel-ranges;
			qcom,pmic-revid = <&pmi632_revid>;

			/* Channel nodes */
			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>;
			};

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

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

			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>;
			};

			chg_temp {
				reg = <ADC_CHG_TEMP>;
				label = "chg_temp";
				qcom,pre-scaling = <1 1>;
			};

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

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

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

			bat_id {
				reg = <ADC_BAT_ID_PU2>;
				label = "bat_id";
				qcom,pre-scaling = <1 1>;
			};

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

			v_i_int_ext {
				reg = <ADC_INT_EXT_ISENSE_VBAT_VDATA>;
				label = "v_i_int_vbat_vdata";
				qcom,pre-scaling = <1 1>;
			};

			v_i_parallel {
				reg = <ADC_PARALLEL_ISENSE_VBAT_VDATA>;
				label = "v_i_parallel_vbat_vdata";
				qcom,pre-scaling = <1 1>;
			};

		};

		pmi632_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>;
		};

		pmi632_tz: qcom,temp-alarm@2400 {
			compatible = "qcom,spmi-temp-alarm";
			reg = <0x2400 0x100>;
+114 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@
#include <dt-bindings/clock/qcom,dispcc-trinket.h>
#include <dt-bindings/clock/qcom,gpucc-trinket.h>
#include <dt-bindings/clock/qcom,videocc-sm6150.h>
#include <dt-bindings/iio/qcom,spmi-vadc.h>
#include <dt-bindings/spmi/spmi.h>

/ {
@@ -582,6 +583,8 @@
		qcom,rtb-size = <0x100000>;
	};

	thermal_zones: thermal-zones {};

	cpu_pmu: cpu-pmu {
		compatible = "arm,armv8-pmuv3";
		qcom,irq-is-percpu;
@@ -1191,6 +1194,117 @@
#include "msm-arm-smmu-trinket.dtsi"
#include "trinket-qupv3.dtsi"

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

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

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

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

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

};

&pm6125_adc_tm {
	io-channels = <&pm6125_vadc ADC_AMUX_THM1_PU2>,
			<&pm6125_vadc ADC_AMUX_THM2_PU2>,
			<&pm6125_vadc ADC_XO_THERM_PU2>,
			<&pm6125_vadc ADC_GPIO4_PU2>;

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

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

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

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

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

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

&pmi632_adc_tm {
	io-channels = <&pmi632_vadc ADC_GPIO1_PU2>,
			<&pmi632_vadc ADC_GPIO2_PU2>;

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

	skin_therm {
		reg = <ADC_GPIO2_PU2>;
		qcom,ratiometric;
		qcom,hw-settle-time = <200>;
	};
};

&ufs_phy_gdsc {
	status = "ok";
};