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

Commit 3eaf130a authored by Jishnu Prakash's avatar Jishnu Prakash Committed by Gerrit - the friendly Code Review server
Browse files

ARM: dts: msm: Add VADC and ADC_TM nodes for lito

Add VADC and ADC_TM nodes with channels for lito.
Add user thermal zones for ADC thermistors.

Change-Id: I8532c690b22e0f406eb99c325853860f5bbdb8dc
parent e3c0f103
Loading
Loading
Loading
Loading
+58 −0
Original line number Diff line number Diff line
@@ -5,6 +5,64 @@

};

&pm7250b_vadc {
	pinctrl-0 = <
		&bmr_w_therm_default
		&camera_therm_default
		&bmr_s_therm_default
	>;

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

&pm7250b_gpios {
	bmr_s_therm {
		bmr_s_therm_default: bmr_s_therm_default {
			pins = "gpio5";
			bias-high-impedance;
		};
	};
};

&spmi_bus {
	qcom,pm7250b@2 {
		pm7250b_adc_tm_iio: adc_tm@3400 {
			compatible = "qcom,adc-tm5-iio";
			reg = <0x3400 0x100>;
			#thermal-sensor-cells = <1>;
			io-channels = <&pm7250b_vadc ADC_GPIO3_PU2>;

			bmr_s_therm {
				reg = <ADC_GPIO3_PU2>;
				qcom,ratiometric;
				qcom,hw-settle-time = <200>;
			};
		};
	};
};

&thermal_zones {
	mmw-pa4-usr {
		polling-delay-passive = <0>;
		polling-delay = <5000>;
		thermal-governor = "user_space";
		thermal-sensors = <&pm7250b_adc_tm_iio ADC_GPIO3_PU2>;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};
};

&lito_snd {
	qcom,model = "lito-cdp-snd-card";
	qcom,audio-routing =
+58 −0
Original line number Diff line number Diff line
@@ -35,6 +35,64 @@
	status = "ok";
};

&pm7250b_vadc {
	pinctrl-0 = <
		&bmr_w_therm_default
		&camera_therm_default
		&bmr_s_therm_default
	>;

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

&pm7250b_gpios {
	bmr_s_therm {
		bmr_s_therm_default: bmr_s_therm_default {
			pins = "gpio5";
			bias-high-impedance;
		};
	};
};

&spmi_bus {
	qcom,pm7250b@2 {
		pm7250b_adc_tm_iio: adc_tm@3400 {
			compatible = "qcom,adc-tm5-iio";
			reg = <0x3400 0x100>;
			#thermal-sensor-cells = <1>;
			io-channels = <&pm7250b_vadc ADC_GPIO3_PU2>;

			bmr_s_therm {
				reg = <ADC_GPIO3_PU2>;
				qcom,ratiometric;
				qcom,hw-settle-time = <200>;
			};
		};
	};
};

&thermal_zones {
	mmw-pa4-usr {
		polling-delay-passive = <0>;
		polling-delay = <5000>;
		thermal-governor = "user_space";
		thermal-sensors = <&pm7250b_adc_tm_iio ADC_GPIO3_PU2>;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};
};

&pm7250b_charger {
	status = "ok";
	qcom,sec-charger-config = <1>;
+361 −0
Original line number Diff line number Diff line
@@ -13,6 +13,367 @@
	clocks = <&rpmhcc RPMH_CXO_CLK>;
};

&pm7250b_vadc {
	#address-cells = <1>;
	#size-cells = <0>;
	pinctrl-names = "default";
	pinctrl-0 = <&bmr_w_therm_default &camera_therm_default>;

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

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

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

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

&pm7250b_gpios {
	bmr_w_therm {
		bmr_w_therm_default: bmr_w_therm_default {
			pins = "gpio12";
			bias-high-impedance;
		};
	};

	camera_therm {
		camera_therm_default: camera_therm_default {
			pins = "gpio8";
			bias-high-impedance;
		};
	};
};

&pm8150_vadc {
	#address-cells = <1>;
	#size-cells = <0>;

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

	vcoin@85 {
		reg = <ADC_VCOIN>;
		label = "vcoin";
		qcom,pre-scaling = <1 3>;
	};

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

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

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

&pm8150l_vadc {
	#address-cells = <1>;
	#size-cells = <0>;

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

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

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

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

&pm7250b_adc_tm {
	#address-cells = <1>;
	#size-cells = <0>;
	io-channels = <&pm7250b_vadc ADC_AMUX_THM1_PU2>,
			<&pm7250b_vadc ADC_AMUX_THM3_PU2>,
			<&pm7250b_vadc ADC_GPIO2_PU2>,
			<&pm7250b_vadc ADC_GPIO4_PU2>;

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

	conn_therm@4f {
		reg = <ADC_AMUX_THM3_PU2>;
		qcom,ratiometric;
		qcom,hw-settle-time = <200>;
	};

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

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

&pm8150_adc_tm {
	#address-cells = <1>;
	#size-cells = <0>;
	io-channels = <&pm8150_vadc ADC_XO_THERM_PU2>,
			<&pm8150_vadc ADC_AMUX_THM1_PU2>,
			<&pm8150_vadc ADC_AMUX_THM2_PU2>;

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

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

	bmr_e_therm@4e {
		reg = <ADC_AMUX_THM2_PU2>;
		qcom,ratiometric;
		qcom,hw-settle-time = <200>;
	};
};

&pm8150l_adc_tm {
	#address-cells = <1>;
	#size-cells = <0>;
	io-channels = <&pm8150l_vadc ADC_AMUX_THM1_PU2>,
			<&pm8150l_vadc ADC_AMUX_THM2_PU2>,
			<&pm8150l_vadc ADC_AMUX_THM3_PU2>;

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

	msm_skin_therm1@4e {
		reg = <ADC_AMUX_THM2_PU2>;
		qcom,ratiometric;
		qcom,hw-settle-time = <200>;
	};

	bmr_n_therm@4f {
		reg = <ADC_AMUX_THM3_PU2>;
		qcom,ratiometric;
		qcom,hw-settle-time = <200>;
	};
};

&thermal_zones {
	charger-therm-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&pm7250b_adc_tm ADC_AMUX_THM1_PU2>;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};

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

	mmw-pa2-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&pm7250b_adc_tm ADC_GPIO2_PU2>;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};

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

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

	pa-therm1-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&pm8150_adc_tm ADC_AMUX_THM1_PU2>;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};

	mmw-pa3-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&pm8150_adc_tm ADC_AMUX_THM2_PU2>;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};

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

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

	mmw-pa1-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&pm8150l_adc_tm ADC_AMUX_THM3_PU2>;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};
};

&pm7250b_charger {
	dpdm-supply = <&usb2_phy0>;

+135 −0
Original line number Diff line number Diff line
@@ -282,6 +282,141 @@
			gpio-controller;
			#gpio-cells = <2>;
		};

		pm7250b_vadc: vadc@3100 {
			compatible = "qcom,spmi-adc5";
			reg = <0x3100 0x100>;
			reg-names = "adc5-usr-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;

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

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

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

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

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

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

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

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

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

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

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

			bat_id@4b {
				reg = <ADC_BAT_ID_PU2>;
				label = "bat_id";
				qcom,ratiometric;
				qcom,hw-settle-time = <200>;
				qcom,pre-scaling = <1 1>;
			};

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

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

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

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

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

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

	qcom,pm7250b@3 {