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

Commit a0a0a844 authored by Fenglin Wu's avatar Fenglin Wu
Browse files

power: qpnp-qnovo5: Add driver to support Qnovo5



Qnovo5 is a PBS based pulse charging engine which has different
pulse train pattern and register mapping with the legacy Qnovo
module. Add the driver to export the registers of the hardware
module and the parameters of the charging status to allow the
userspace code to diagnose and control the charging phase.

Change-Id: Ic51a286ce52ea177b81fe216955196f6ad1d17f6
Signed-off-by: default avatarFenglin Wu <fenglinw@codeaurora.org>
parent c1157410
Loading
Loading
Loading
Loading
+40 −0
Original line number Diff line number Diff line
QPNP Qnovo5 pulse engine

QPNP Qnovo5 is a PBS based pulse charging engine which works in tandem with the
QPNP SMB5 Charger device. It configures the QPNP SMB5 charger to
charge/discharge as per pulse characteristics.

The QPNP Qnovo5 pulse engine has a single peripheral assigned to it.

Properties:
- compatible:
  Usage:      required
  Value type: <string>
  Definition: It must be "qcom,qpnp-qnovo5".

- reg:
  Usage:      required
  Value type: <u32>
  Definition: Specifies the base address of the module. Qnovo5 is using a
		SDAM peripheral so this is the address of the SDAM module
		being used.

- interrupts:
  Usage:      required
  Value type: <prop-encoded-array>
  Definition: Specifies the interrupt associated with Qnovo5.

- interrupt-names:
  Usage:      required
  Value type: <string>
  Definition: Specifies the interrupt name for Qnovo5. There is only one
		interrupt named as "ptrain-done".

Example:

qcom,qpnp-qnovo@b000 {
	compatible = "qcom,qpnp-qnovo5";
	reg = <0xb000 0x100>;
	interrupts = <0x2 0xb0 0x0 IRQ_TYPE_NONE>;
	interrupt-names = "ptrain-done";
};
+9 −0
Original line number Diff line number Diff line
@@ -94,6 +94,15 @@ config QPNP_QNOVO
	  module. It also allows userspace code to read diagnostics of voltage
	  and current measured during certain phases of the pulses.

config QPNP_QNOVO5
	bool "QPNP QNOVO5 driver"
	depends on MFD_SPMI_PMIC
	help
	  Say Y here to enable the Qnovo5 PBS-based pulse charging engine.
	  Qnovo5 driver accepts pulse parameters via sysfs entries and programs
	  the hardware module. It also allows userspace code to read diagnostics
	  of voltage and current measured during certain phases of the pulses.

config SMB1390_CHARGE_PUMP
	tristate "SMB1390 Charge Pump"
	depends on MFD_I2C_PMIC
+1 −0
Original line number Diff line number Diff line
@@ -6,5 +6,6 @@ obj-$(CONFIG_SMB1355_SLAVE_CHARGER) += smb1355-charger.o pmic-voter.o
obj-$(CONFIG_QPNP_SMB2)		+= step-chg-jeita.o battery.o qpnp-smb2.o smb-lib.o pmic-voter.o storm-watch.o
obj-$(CONFIG_SMB138X_CHARGER)	+= step-chg-jeita.o smb138x-charger.o smb-lib.o pmic-voter.o storm-watch.o battery.o
obj-$(CONFIG_QPNP_QNOVO)	+= qpnp-qnovo.o battery.o
obj-$(CONFIG_QPNP_QNOVO5)	+= qpnp-qnovo5.o battery.o
obj-$(CONFIG_QPNP_SMB5)		+= step-chg-jeita.o battery.o qpnp-smb5.o smb5-lib.o pmic-voter.o storm-watch.o schgm-flash.o
obj-$(CONFIG_SMB1390_CHARGE_PUMP)	+= smb1390-charger.o pmic-voter.o
+1401 −0

File added.

Preview size limit exceeded, changes collapsed.