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

Commit 452051bc authored by Ashay Jaiswal's avatar Ashay Jaiswal
Browse files

ARM: dts: msm: add required configuration of charger/QG for SDMMAGPIE



Add necessary charger/QG configuration/properties and battery profile
for SDMMAGPIE IDP/QRD platform.
While at it, include/configure SMB1355/SMB1390 chargers.

Change-Id: I7c0af41f4c4169cc0e6f3143ff5adbfcd61bee41
Signed-off-by: default avatarAshay Jaiswal <ashayj@codeaurora.org>
parent f69ca02b
Loading
Loading
Loading
Loading
+67 −0
Original line number Diff line number Diff line
@@ -12,6 +12,8 @@
#include "sdmmagpie-thermal-overlay.dtsi"

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
#include <dt-bindings/iio/qcom,spmi-vadc.h>
#include "sdmmagpie-sde-display.dtsi"

&soc {
@@ -166,3 +168,68 @@
		st,y-flip;
	};
};

&pm6150_qg {
	qcom,battery-data = <&mtp_batterydata>;
};

&pm6150_charger {
	io-channels = <&pm6150_vadc ADC_USB_IN_V_16>,
		      <&pm6150_vadc ADC_USB_IN_I>,
		      <&pm6150_vadc ADC_CHG_TEMP>,
		      <&pm6150_vadc ADC_DIE_TEMP>,
		      <&pm6150l_vadc ADC_AMUX_THM1_PU2>;
	io-channel-names = "usb_in_voltage",
			   "usb_in_current",
			   "chg_temp",
			   "die_temp",
			   "conn_temp";
	qcom,battery-data = <&mtp_batterydata>;
	qcom,step-charging-enable;
	qcom,sw-jeita-enable;
	qcom,fcc-stepping-enable;
	qcom,sec-charger-config = <3>;
};

&pm6150_gpios {
	smb_stat {
		smb_stat_default: smb_stat_default {
			pins = "gpio3";
			function = "normal";
			input-enable;
			bias-pull-up;
			qcom,pull-up-strength = <PMIC_GPIO_PULL_UP_30>;
			power-source = <0>;
		};
	};
};

&qupv3_se9_i2c {
	status = "ok";
	#include "smb1390.dtsi"
	#include "smb1355.dtsi"
};

&smb1355 {
	/delete-property/ interrupts;
	interrupts = <0x0 0xc2 0x0 IRQ_TYPE_LEVEL_LOW>;
	status = "ok";
};

&smb1355_charger {
	status = "ok";
};

&smb1390 {
	/delete-property/ interrupts;
	interrupts = <0x0 0xc2 0x0 IRQ_TYPE_LEVEL_LOW>;
	pinctrl-names = "default";
	pinctrl-0 = <&smb_stat_default>;
	status = "ok";
};

&smb1390_charger {
	io-channels = <&pm6150l_vadc ADC_AMUX_THM2>;
	io-channel-names = "cp_die_temp";
	status = "ok";
};
+55 −0
Original line number Diff line number Diff line
@@ -11,6 +11,8 @@
 */

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
#include <dt-bindings/iio/qcom,spmi-vadc.h>
#include "sdmmagpie-thermal-overlay.dtsi"

#include "sdmmagpie-sde-display.dtsi"
@@ -145,3 +147,56 @@
	qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_dcs";
	qcom,platform-reset-gpio = <&pm6150l_gpios 9 0>;
};

&pm6150_qg {
	qcom,battery-data = <&mtp_batterydata>;
};

&pm6150_charger {
	io-channels = <&pm6150_vadc ADC_USB_IN_V_16>,
		      <&pm6150_vadc ADC_USB_IN_I>,
		      <&pm6150_vadc ADC_CHG_TEMP>,
		      <&pm6150_vadc ADC_DIE_TEMP>,
		      <&pm6150l_vadc ADC_AMUX_THM1_PU2>;
	io-channel-names = "usb_in_voltage",
			   "usb_in_current",
			   "chg_temp",
			   "die_temp",
			   "conn_temp";
	qcom,battery-data = <&mtp_batterydata>;
	qcom,sw-jeita-enable;
	qcom,fcc-stepping-enable;
	qcom,sec-charger-config = <1>;
};

&pm6150_gpios {
	smb_stat {
		smb_stat_default: smb_stat_default {
			pins = "gpio3";
			function = "normal";
			input-enable;
			bias-pull-up;
			qcom,pull-up-strength = <PMIC_GPIO_PULL_UP_30>;
			power-source = <0>;
		};
	};
};

&qupv3_se9_i2c {
	status = "ok";
	#include "smb1390.dtsi"
};

&smb1390 {
	/delete-property/ interrupts;
	interrupts = <0x0 0xc2 0x0 IRQ_TYPE_LEVEL_LOW>;
	pinctrl-names = "default";
	pinctrl-0 = <&smb_stat_default>;
	status = "ok";
};

&smb1390_charger {
	io-channels = <&pm6150l_vadc ADC_AMUX_THM2>;
	io-channel-names = "cp_die_temp";
	status = "ok";
};
+11 −0
Original line number Diff line number Diff line
@@ -662,6 +662,12 @@
			linux,cma-default;
		};
	};

	mtp_batterydata: qcom,battery-data {
		qcom,batt-id-range-pct = <15>;
		#include "qg-batterydata-alium-3600mah.dtsi"
		#include "qg-batterydata-mlp356477-2800mah.dtsi"
	};
};

&soc {
@@ -2967,6 +2973,11 @@
	extcon = <&pm6150_pdphy>, <&pm6150_charger>, <&eud>;
};

&pm6150_charger {
	dpdm-supply = <&qusb_phy0>;
	qcom,suspend-input-on-debug-batt;
};

&pm6150_vadc {
	rf_pa0_therm {
		reg = <ADC_AMUX_THM2_PU2>;