Re: [PATCH v3 3/4] regulator: axp20x: add the AXP803
On Fri, Sep 23, 2016 at 09:00:42AM +0200, Jean-Francois Moine wrote: > The X-Powers AXP803 PMIC is close to the AXP809 with more outputs. > It is used in some Allwinner boards as the Sinovoip BananaPi M64 > and the Pine A64. > > Signed-off-by: Jean-Francois Moine> --- > not tested > --- > Documentation/devicetree/bindings/mfd/axp20x.txt | 32 +++- > drivers/mfd/axp20x.c | 13 ++ > drivers/regulator/Makefile | 3 +- > drivers/regulator/axp803.c | 225 > +++ > include/linux/mfd/axp20x.h | 1 + > 5 files changed, 271 insertions(+), 3 deletions(-) > create mode 100644 drivers/regulator/axp803.c > > diff --git a/Documentation/devicetree/bindings/mfd/axp20x.txt > b/Documentation/devicetree/bindings/mfd/axp20x.txt > index 8f3ad9a..3332d02 100644 > --- a/Documentation/devicetree/bindings/mfd/axp20x.txt > +++ b/Documentation/devicetree/bindings/mfd/axp20x.txt > @@ -6,12 +6,13 @@ axp202 (X-Powers) > axp209 (X-Powers) > axp221 (X-Powers) > axp223 (X-Powers) > +axp803 (X-Powers) > axp809 (X-Powers) > > Required properties: > - compatible: "x-powers,axp152", "x-powers,axp202", "x-powers,axp209", > - "x-powers,axp221", "x-powers,axp223", "x-powers,axp806", > - "x-powers,axp809" > + "x-powers,axp221", "x-powers,axp223", "x-powers,axp803", > + "x-powers,axp806", "x-powers,axp809" If you respin this, please reformat this to one per line. Acked-by: Rob Herring > - reg: The I2C slave address or RSB hardware address for the AXP chip > - interrupt-parent: The parent interrupt controller > - interrupts: SoC NMI / GPIO interrupt connected to the PMIC's IRQ pin > @@ -86,6 +87,33 @@ LDO_IO1: LDO : ips-supply > : GPIO 1 > RTC_LDO : LDO : ips-supply: always on > DRIVEVBUS: Enable output : drivevbus-supply : external regulator > > +AXP803 regulators, type, and corresponding input supply names: > + > +Regulator TypeSupply Name Notes > +- --- - > +DCDC1: DC-DC buck: vin1-supply > +DCDC2: DC-DC buck: vin2-supply > +DCDC3: DC-DC buck: vin3-supply > +DCDC4: DC-DC buck: vin4-supply > +DCDC5: DC-DC buck: vin5-supply > +DCDC6: DC-DC buck: vin6-supply > +ALDO1: LDO : aldoin-supply : shared supply > +ALDO2: LDO : aldoin-supply : shared supply > +ALDO3: LDO : aldoin-supply : shared supply > +DLDO1: LDO : dldoin-supply : shared supply > +DLDO2: LDO : dldoin-supply : shared supply > +DLDO3: LDO : dldoin-supply : shared supply > +DLDO4: LDO : dldoin-supply : shared supply > +ELDO1: LDO : eldoin-supply : shared supply > +ELDO2: LDO : eldoin-supply : shared supply > +ELDO3: LDO : eldoin-supply : shared supply > +FLDO1: LDO : fldoin-supply : shared supply > +FLDO2: LDO : fldoin-supply : shared supply > +RTC_LDO : LDO : ips-supply: always on > +LDO_IO0 : LDO : ips-supply: GPIO 0 > +LDO_IO1 : LDO : ips-supply: GPIO 1 > +DC1SW: On/Off Switch : : DCDC1 secondary output > + > AXP806 regulators, type, and corresponding input supply names: > > Regulator TypeSupply Name Notes
Re: [PATCH v3 3/4] regulator: axp20x: add the AXP803
On Fri, Sep 23, 2016 at 09:00:42AM +0200, Jean-Francois Moine wrote: > The X-Powers AXP803 PMIC is close to the AXP809 with more outputs. > It is used in some Allwinner boards as the Sinovoip BananaPi M64 > and the Pine A64. > > Signed-off-by: Jean-Francois Moine > --- > not tested > --- > Documentation/devicetree/bindings/mfd/axp20x.txt | 32 +++- > drivers/mfd/axp20x.c | 13 ++ > drivers/regulator/Makefile | 3 +- > drivers/regulator/axp803.c | 225 > +++ > include/linux/mfd/axp20x.h | 1 + > 5 files changed, 271 insertions(+), 3 deletions(-) > create mode 100644 drivers/regulator/axp803.c > > diff --git a/Documentation/devicetree/bindings/mfd/axp20x.txt > b/Documentation/devicetree/bindings/mfd/axp20x.txt > index 8f3ad9a..3332d02 100644 > --- a/Documentation/devicetree/bindings/mfd/axp20x.txt > +++ b/Documentation/devicetree/bindings/mfd/axp20x.txt > @@ -6,12 +6,13 @@ axp202 (X-Powers) > axp209 (X-Powers) > axp221 (X-Powers) > axp223 (X-Powers) > +axp803 (X-Powers) > axp809 (X-Powers) > > Required properties: > - compatible: "x-powers,axp152", "x-powers,axp202", "x-powers,axp209", > - "x-powers,axp221", "x-powers,axp223", "x-powers,axp806", > - "x-powers,axp809" > + "x-powers,axp221", "x-powers,axp223", "x-powers,axp803", > + "x-powers,axp806", "x-powers,axp809" If you respin this, please reformat this to one per line. Acked-by: Rob Herring > - reg: The I2C slave address or RSB hardware address for the AXP chip > - interrupt-parent: The parent interrupt controller > - interrupts: SoC NMI / GPIO interrupt connected to the PMIC's IRQ pin > @@ -86,6 +87,33 @@ LDO_IO1: LDO : ips-supply > : GPIO 1 > RTC_LDO : LDO : ips-supply: always on > DRIVEVBUS: Enable output : drivevbus-supply : external regulator > > +AXP803 regulators, type, and corresponding input supply names: > + > +Regulator TypeSupply Name Notes > +- --- - > +DCDC1: DC-DC buck: vin1-supply > +DCDC2: DC-DC buck: vin2-supply > +DCDC3: DC-DC buck: vin3-supply > +DCDC4: DC-DC buck: vin4-supply > +DCDC5: DC-DC buck: vin5-supply > +DCDC6: DC-DC buck: vin6-supply > +ALDO1: LDO : aldoin-supply : shared supply > +ALDO2: LDO : aldoin-supply : shared supply > +ALDO3: LDO : aldoin-supply : shared supply > +DLDO1: LDO : dldoin-supply : shared supply > +DLDO2: LDO : dldoin-supply : shared supply > +DLDO3: LDO : dldoin-supply : shared supply > +DLDO4: LDO : dldoin-supply : shared supply > +ELDO1: LDO : eldoin-supply : shared supply > +ELDO2: LDO : eldoin-supply : shared supply > +ELDO3: LDO : eldoin-supply : shared supply > +FLDO1: LDO : fldoin-supply : shared supply > +FLDO2: LDO : fldoin-supply : shared supply > +RTC_LDO : LDO : ips-supply: always on > +LDO_IO0 : LDO : ips-supply: GPIO 0 > +LDO_IO1 : LDO : ips-supply: GPIO 1 > +DC1SW: On/Off Switch : : DCDC1 secondary output > + > AXP806 regulators, type, and corresponding input supply names: > > Regulator TypeSupply Name Notes
[PATCH v3 3/4] regulator: axp20x: add the AXP803
The X-Powers AXP803 PMIC is close to the AXP809 with more outputs. It is used in some Allwinner boards as the Sinovoip BananaPi M64 and the Pine A64. Signed-off-by: Jean-Francois Moine--- not tested --- Documentation/devicetree/bindings/mfd/axp20x.txt | 32 +++- drivers/mfd/axp20x.c | 13 ++ drivers/regulator/Makefile | 3 +- drivers/regulator/axp803.c | 225 +++ include/linux/mfd/axp20x.h | 1 + 5 files changed, 271 insertions(+), 3 deletions(-) create mode 100644 drivers/regulator/axp803.c diff --git a/Documentation/devicetree/bindings/mfd/axp20x.txt b/Documentation/devicetree/bindings/mfd/axp20x.txt index 8f3ad9a..3332d02 100644 --- a/Documentation/devicetree/bindings/mfd/axp20x.txt +++ b/Documentation/devicetree/bindings/mfd/axp20x.txt @@ -6,12 +6,13 @@ axp202 (X-Powers) axp209 (X-Powers) axp221 (X-Powers) axp223 (X-Powers) +axp803 (X-Powers) axp809 (X-Powers) Required properties: - compatible: "x-powers,axp152", "x-powers,axp202", "x-powers,axp209", - "x-powers,axp221", "x-powers,axp223", "x-powers,axp806", - "x-powers,axp809" + "x-powers,axp221", "x-powers,axp223", "x-powers,axp803", + "x-powers,axp806", "x-powers,axp809" - reg: The I2C slave address or RSB hardware address for the AXP chip - interrupt-parent: The parent interrupt controller - interrupts: SoC NMI / GPIO interrupt connected to the PMIC's IRQ pin @@ -86,6 +87,33 @@ LDO_IO1 : LDO : ips-supply : GPIO 1 RTC_LDO: LDO : ips-supply: always on DRIVEVBUS : Enable output : drivevbus-supply : external regulator +AXP803 regulators, type, and corresponding input supply names: + +RegulatorTypeSupply Name Notes +---- - +DCDC1 : DC-DC buck: vin1-supply +DCDC2 : DC-DC buck: vin2-supply +DCDC3 : DC-DC buck: vin3-supply +DCDC4 : DC-DC buck: vin4-supply +DCDC5 : DC-DC buck: vin5-supply +DCDC6 : DC-DC buck: vin6-supply +ALDO1 : LDO : aldoin-supply : shared supply +ALDO2 : LDO : aldoin-supply : shared supply +ALDO3 : LDO : aldoin-supply : shared supply +DLDO1 : LDO : dldoin-supply : shared supply +DLDO2 : LDO : dldoin-supply : shared supply +DLDO3 : LDO : dldoin-supply : shared supply +DLDO4 : LDO : dldoin-supply : shared supply +ELDO1 : LDO : eldoin-supply : shared supply +ELDO2 : LDO : eldoin-supply : shared supply +ELDO3 : LDO : eldoin-supply : shared supply +FLDO1 : LDO : fldoin-supply : shared supply +FLDO2 : LDO : fldoin-supply : shared supply +RTC_LDO: LDO : ips-supply: always on +LDO_IO0: LDO : ips-supply: GPIO 0 +LDO_IO1: LDO : ips-supply: GPIO 1 +DC1SW : On/Off Switch : : DCDC1 secondary output + AXP806 regulators, type, and corresponding input supply names: RegulatorTypeSupply Name Notes diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c index ba130be..7c90b12 100644 --- a/drivers/mfd/axp20x.c +++ b/drivers/mfd/axp20x.c @@ -38,6 +38,7 @@ static const char * const axp20x_model_names[] = { "AXP221", "AXP223", "AXP288", + "AXP803", "AXP806", "AXP809", }; @@ -739,6 +740,14 @@ static struct mfd_cell axp809_cells[] = { }, }; +static struct mfd_cell axp803_cells[] = { + { + .name = "axp20x-pek", + .num_resources = ARRAY_SIZE(axp809_pek_resources), + .resources = axp809_pek_resources, + }, +}; + static struct axp20x_dev *axp20x_pm_power_off; static void axp20x_power_off(void) { @@ -801,6 +810,10 @@ int axp20x_match_device(struct axp20x_dev *axp20x) axp20x->regmap_cfg = _regmap_config; axp20x->regmap_irq_chip = _regmap_irq_chip; break; + case AXP803_ID: + axp20x->cells = axp803_cells; + axp20x->nr_cells = ARRAY_SIZE(axp803_cells); + break; case AXP806_ID: axp20x->nr_cells = ARRAY_SIZE(axp806_cells); axp20x->cells = axp806_cells; diff --git a/drivers/regulator/Makefile b/drivers/regulator/Makefile index 225a026..2cbb280 100644 --- a/drivers/regulator/Makefile +++ b/drivers/regulator/Makefile @@ -21,7 +21,8 @@ obj-$(CONFIG_REGULATOR_ANATOP) += anatop-regulator.o obj-$(CONFIG_REGULATOR_ARIZONA) += arizona-micsupp.o arizona-ldo1.o
[PATCH v3 3/4] regulator: axp20x: add the AXP803
The X-Powers AXP803 PMIC is close to the AXP809 with more outputs. It is used in some Allwinner boards as the Sinovoip BananaPi M64 and the Pine A64. Signed-off-by: Jean-Francois Moine --- not tested --- Documentation/devicetree/bindings/mfd/axp20x.txt | 32 +++- drivers/mfd/axp20x.c | 13 ++ drivers/regulator/Makefile | 3 +- drivers/regulator/axp803.c | 225 +++ include/linux/mfd/axp20x.h | 1 + 5 files changed, 271 insertions(+), 3 deletions(-) create mode 100644 drivers/regulator/axp803.c diff --git a/Documentation/devicetree/bindings/mfd/axp20x.txt b/Documentation/devicetree/bindings/mfd/axp20x.txt index 8f3ad9a..3332d02 100644 --- a/Documentation/devicetree/bindings/mfd/axp20x.txt +++ b/Documentation/devicetree/bindings/mfd/axp20x.txt @@ -6,12 +6,13 @@ axp202 (X-Powers) axp209 (X-Powers) axp221 (X-Powers) axp223 (X-Powers) +axp803 (X-Powers) axp809 (X-Powers) Required properties: - compatible: "x-powers,axp152", "x-powers,axp202", "x-powers,axp209", - "x-powers,axp221", "x-powers,axp223", "x-powers,axp806", - "x-powers,axp809" + "x-powers,axp221", "x-powers,axp223", "x-powers,axp803", + "x-powers,axp806", "x-powers,axp809" - reg: The I2C slave address or RSB hardware address for the AXP chip - interrupt-parent: The parent interrupt controller - interrupts: SoC NMI / GPIO interrupt connected to the PMIC's IRQ pin @@ -86,6 +87,33 @@ LDO_IO1 : LDO : ips-supply : GPIO 1 RTC_LDO: LDO : ips-supply: always on DRIVEVBUS : Enable output : drivevbus-supply : external regulator +AXP803 regulators, type, and corresponding input supply names: + +RegulatorTypeSupply Name Notes +---- - +DCDC1 : DC-DC buck: vin1-supply +DCDC2 : DC-DC buck: vin2-supply +DCDC3 : DC-DC buck: vin3-supply +DCDC4 : DC-DC buck: vin4-supply +DCDC5 : DC-DC buck: vin5-supply +DCDC6 : DC-DC buck: vin6-supply +ALDO1 : LDO : aldoin-supply : shared supply +ALDO2 : LDO : aldoin-supply : shared supply +ALDO3 : LDO : aldoin-supply : shared supply +DLDO1 : LDO : dldoin-supply : shared supply +DLDO2 : LDO : dldoin-supply : shared supply +DLDO3 : LDO : dldoin-supply : shared supply +DLDO4 : LDO : dldoin-supply : shared supply +ELDO1 : LDO : eldoin-supply : shared supply +ELDO2 : LDO : eldoin-supply : shared supply +ELDO3 : LDO : eldoin-supply : shared supply +FLDO1 : LDO : fldoin-supply : shared supply +FLDO2 : LDO : fldoin-supply : shared supply +RTC_LDO: LDO : ips-supply: always on +LDO_IO0: LDO : ips-supply: GPIO 0 +LDO_IO1: LDO : ips-supply: GPIO 1 +DC1SW : On/Off Switch : : DCDC1 secondary output + AXP806 regulators, type, and corresponding input supply names: RegulatorTypeSupply Name Notes diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c index ba130be..7c90b12 100644 --- a/drivers/mfd/axp20x.c +++ b/drivers/mfd/axp20x.c @@ -38,6 +38,7 @@ static const char * const axp20x_model_names[] = { "AXP221", "AXP223", "AXP288", + "AXP803", "AXP806", "AXP809", }; @@ -739,6 +740,14 @@ static struct mfd_cell axp809_cells[] = { }, }; +static struct mfd_cell axp803_cells[] = { + { + .name = "axp20x-pek", + .num_resources = ARRAY_SIZE(axp809_pek_resources), + .resources = axp809_pek_resources, + }, +}; + static struct axp20x_dev *axp20x_pm_power_off; static void axp20x_power_off(void) { @@ -801,6 +810,10 @@ int axp20x_match_device(struct axp20x_dev *axp20x) axp20x->regmap_cfg = _regmap_config; axp20x->regmap_irq_chip = _regmap_irq_chip; break; + case AXP803_ID: + axp20x->cells = axp803_cells; + axp20x->nr_cells = ARRAY_SIZE(axp803_cells); + break; case AXP806_ID: axp20x->nr_cells = ARRAY_SIZE(axp806_cells); axp20x->cells = axp806_cells; diff --git a/drivers/regulator/Makefile b/drivers/regulator/Makefile index 225a026..2cbb280 100644 --- a/drivers/regulator/Makefile +++ b/drivers/regulator/Makefile @@ -21,7 +21,8 @@ obj-$(CONFIG_REGULATOR_ANATOP) += anatop-regulator.o obj-$(CONFIG_REGULATOR_ARIZONA) += arizona-micsupp.o arizona-ldo1.o obj-$(CONFIG_REGULATOR_AS3711) +=