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

Commit 7987be54 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "power: smb135x: add smb135x charger driver"

parents 1c3e60e5 1b016bb3
Loading
Loading
Loading
Loading
+50 −0
Original line number Diff line number Diff line
SMB135x battery charger

SMB135x is a single-cell switching mode battery charger. It can charge
the battery and power the system via the USB and AC adapter input.

The smb135x interface is via I2C bus.

Required Properties:
- compatible:			Must be "qcom,smb1357-charger" or  "qcom,smb1359-charger".
- reg:				The device 7-bit I2C address.

Optional Properties:

- interrupts			This indicates the IRQ number of the GPIO
				connected to the STAT pin.
- qcom,float-voltage-mv	 	Float Voltage in mV - the maximum voltage up to which
				the battery is charged. Supported range 3600mV to 4500mV
- qcom,charging-timeout		Maximum duration in minutes that a single charge
				cycle may last.  Supported values are: 0, 192, 384,
				768, and 1536.  A value of 0 means that no
				charge cycle timeout is used and charging can
				continue indefinitely.
- qcom,dc-psy-type		The type of charger connected to the DC path.
				Can be "Mains" or "Wireless"
- qcom,dc-psy-ma		The current in mA dc path can support. Must be specified if
				dc-psy-type is specified. Valid range 300mA to 2000mA.
- qcom,charging-disabled	Set this if charging should be disabled in the build
				by default. Useful in usecases where battery current
				needs to be profiled even when USB is present.
- qcom,recharge-thresh-mv	Specifies the minimum voltage drop in millivolts
				below the float voltage that is required in
				order to initiate a new charging cycle.
				Supported values are: 50, 100, 200 and 300mV.
- regulator-name		A string used as a descriptive name for OTG regulator.

Example:
	i2c@f9967000 {
		smb1357-charger@1b {
			compatible = "qcom,smb1357-charger";
			reg = <0x1b>;
			interrupt-parent = <&spmi_bus>;
			interrupts = <0x00 0xCD 0>;
			qcom,float-voltage-mv = <4200>;
			qcom,dc-psy-type = <8>;
			qcom,dc-psy-ma = <800>;
			qcom,charging-disabled;
			qcom,recharge-thresh-mv = <100>;
			regulator-name = "smb1357-otg";
		};
	};
+11 −0
Original line number Diff line number Diff line
@@ -438,6 +438,17 @@ config SMB350_CHARGER
	  The driver reports the charger status via the power supply framework.
	  A charger status change triggers an IRQ via the device STAT pin.

config SMB135X_CHARGER
	tristate "SMB135X Battery Charger"
	depends on I2C
	help
	  Say Y to include support for SMB135X Battery Charger.
	  SMB135X is a dual path switching mode charger capable of charging
	  the battery with 3Amps of current.
	  The driver supports charger enable/disable.
	  The driver reports the charger status via the power supply framework.
	  A charger status change triggers an IRQ via the device STAT pin.

config PM8058_FIX_USB
	tristate "pmic8058 software workaround for usb removal"
	depends on PMIC8058
+1 −0
Original line number Diff line number Diff line
@@ -59,6 +59,7 @@ obj-$(CONFIG_ISL9519_CHARGER) += isl9519q.o
obj-$(CONFIG_SMB349_CHARGER)   += smb349.o
obj-$(CONFIG_SMB349_USB_CHARGER)   += smb349-charger.o
obj-$(CONFIG_SMB350_CHARGER)   += smb350_charger.o
obj-$(CONFIG_SMB135X_CHARGER)   += smb135x-charger.o
obj-$(CONFIG_PM8058_FIX_USB)    += pm8058_usb_fix.o
obj-$(CONFIG_BATTERY_QCIBAT)    += qci_battery.o
obj-$(CONFIG_BATTERY_BQ27520)	+= bq27520_fuelgauger.o
+2028 −0

File added.

Preview size limit exceeded, changes collapsed.