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

Commit c5e589a1 authored by Pierre-Hugues Husson's avatar Pierre-Hugues Husson Committed by Lee Jones
Browse files

mfd: rn5t618: Add Ricoh RC5T619 PMIC support



The Ricoh RN5T567 is from the same family as the Ricoh RN5T618 is,
the differences are:

+ DCDC4/DCDC5
+ LDO7-10
+ Slightly different output voltage/currents
+ 32kHz Output
+ RTC
+ USB Charger detection

Signed-off-by: default avatarPierre-Hugues Husson <phh@phh.me>
Acked-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent 34d9030b
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
* Ricoh RN5T567/RN5T618 PMIC

Ricoh RN5T567/RN5T618 is a power management IC family which integrates
3 to 4 step-down DCDC converters, 7 low-dropout regulators, GPIOs and
a watchdog timer. The RN5T618 provides additionally a Li-ion battery
charger, fuel gauge and an ADC. It can be controlled through an I2C
interface.
Ricoh RN5T567/RN5T618/RC5T619 is a power management IC family which
integrates 3 to 5 step-down DCDC converters, 7 to 10 low-dropout regulators,
GPIOs, and a watchdog timer. It can be controlled through an I2C interface.
The RN5T618/RC5T619 provides additionally a Li-ion battery charger,
fuel gauge, and an ADC.
The RC5T619 additionnally includes USB charger detection and an RTC.

Required properties:
 - compatible: must be one of
		"ricoh,rn5t567"
		"ricoh,rn5t618"
		"ricoh,rc5t619"
 - reg: the I2C slave address of the device

Sub-nodes:
 - regulators: the node is required if the regulator functionality is
   needed. The valid regulator names are: DCDC1, DCDC2, DCDC3, DCDC4
   (RN5T567), LDO1, LDO2, LDO3, LDO4, LDO5, LDORTC1 and LDORTC2.
   (RN5T567/RC5T619), LDO1, LDO2, LDO3, LDO4, LDO5, LDO6, LDO7, LDO8,
   LDO9, LDO10, LDORTC1 and LDORTC2.
   LDO7-10 are specific to RC5T619.
   The common bindings for each individual regulator can be found in:
   Documentation/devicetree/bindings/regulator/regulator.txt

+2 −1
Original line number Diff line number Diff line
@@ -894,7 +894,8 @@ config MFD_RN5T618
	select MFD_CORE
	select REGMAP_I2C
	help
	  Say yes here to add support for the Ricoh RN5T567 or R5T618 PMIC.
	  Say yes here to add support for the Ricoh RN5T567,
          RN5T618, RC5T619 PMIC.
	  This driver provides common support for accessing the device,
	  additional drivers must be enabled in order to use the
	  functionality of the device.
+1 −0
Original line number Diff line number Diff line
@@ -87,6 +87,7 @@ static int rn5t618_restart(struct notifier_block *this,
static const struct of_device_id rn5t618_of_match[] = {
	{ .compatible = "ricoh,rn5t567", .data = (void *)RN5T567 },
	{ .compatible = "ricoh,rn5t618", .data = (void *)RN5T618 },
	{ .compatible = "ricoh,rc5t619", .data = (void *)RC5T619 },
	{ }
};
MODULE_DEVICE_TABLE(of, rn5t618_of_match);
+9 −0
Original line number Diff line number Diff line
@@ -58,10 +58,13 @@
#define RN5T618_DC3CTL2			0x31
#define RN5T618_DC4CTL			0x32
#define RN5T618_DC4CTL2			0x33
#define RN5T618_DC5CTL			0x34
#define RN5T618_DC5CTL2			0x35
#define RN5T618_DC1DAC			0x36
#define RN5T618_DC2DAC			0x37
#define RN5T618_DC3DAC			0x38
#define RN5T618_DC4DAC			0x39
#define RN5T618_DC5DAC			0x3a
#define RN5T618_DC1DAC_SLP		0x3b
#define RN5T618_DC2DAC_SLP		0x3c
#define RN5T618_DC3DAC_SLP		0x3d
@@ -77,6 +80,11 @@
#define RN5T618_LDO3DAC			0x4e
#define RN5T618_LDO4DAC			0x4f
#define RN5T618_LDO5DAC			0x50
#define RN5T618_LDO6DAC			0x51
#define RN5T618_LDO7DAC			0x52
#define RN5T618_LDO8DAC			0x53
#define RN5T618_LDO9DAC			0x54
#define RN5T618_LDO10DAC		0x55
#define RN5T618_LDORTCDAC		0x56
#define RN5T618_LDORTC2DAC		0x57
#define RN5T618_LDO1DAC_SLP		0x58
@@ -231,6 +239,7 @@ enum {
enum {
	RN5T567 = 0,
	RN5T618,
	RC5T619,
};

struct rn5t618 {