mfd: rn5t618: Add Ricoh RC5T619 PMIC support
authorPierre-Hugues Husson <phh@phh.me>
Sat, 5 Nov 2016 16:19:24 +0000 (17:19 +0100)
committerLee Jones <lee.jones@linaro.org>
Tue, 29 Nov 2016 08:21:35 +0000 (08:21 +0000)
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: Pierre-Hugues Husson <phh@phh.me>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Documentation/devicetree/bindings/mfd/rn5t618.txt
drivers/mfd/Kconfig
drivers/mfd/rn5t618.c
include/linux/mfd/rn5t618.h

index 9e6770b..65c2326 100644 (file)
@@ -1,21 +1,25 @@
 * 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
 
index 0fde51e..4ce3b6f 100644 (file)
@@ -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.
index ee94080..8131d19 100644 (file)
@@ -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);
index cadc654..e5a6cde 100644 (file)
 #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
 #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 {