Message ID | 20180705031106.344-1-wens@csie.org |
---|---|
Headers | show |
Series | arm64: allwinner: h6: Enable AXP805 PMIC on Pine H64 | expand |
On Thu, Jul 05, 2018 at 11:11:01AM +0800, Chen-Yu Tsai wrote: > Hi everyone, > > This series enables the AXP805 PMIC found on the Pine64 Pine H64 board. > The AXP805 seems to be identical to the AXP806 when comparing datasheets. > The Pine H64 uses the PMIC in stand-alone or "self-working" mode, using > the I2C interface. Neither features are currently supported. This series > adds support for them, and then adds the PMIC to the device tree. Acked-by: Maxime Ripard <maxime.ripard@bootlin.com> Maxime
On Thu, 05 Jul 2018, Chen-Yu Tsai wrote: > The AXP806 can operate in a standalone "self-working" mode, in which it > is also responsible for power control of the overall system. This mode > is similar to the master mode, but the EN/PWRON pin functions as a power > button, instead of a level-triggered enable switch. > > This patch adds code checking for the new "x-powers,self-working-mode" > property, and a separate mfd_cell list that includes the power button > (PEK) sub-device. > > Reviewed-by: Icenowy Zheng <icenowy@aosc.io> > Tested-by: Icenowy Zheng <icenowy@aosc.io> > Signed-off-by: Chen-Yu Tsai <wens@csie.org> > --- > drivers/mfd/axp20x.c | 30 +++++++++++++++++++++++++++--- > 1 file changed, 27 insertions(+), 3 deletions(-) > > diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c > index 9a2ef3d9b8f8..1988881529a9 100644 > --- a/drivers/mfd/axp20x.c > +++ b/drivers/mfd/axp20x.c > @@ -221,6 +221,11 @@ static const struct resource axp803_pek_resources[] = { > DEFINE_RES_IRQ_NAMED(AXP803_IRQ_PEK_FAL_EDGE, "PEK_DBF"), > }; > > +static const struct resource axp806_pek_resources[] = { > + DEFINE_RES_IRQ_NAMED(AXP806_IRQ_POK_RISE, "PEK_DBR"), > + DEFINE_RES_IRQ_NAMED(AXP806_IRQ_POK_FALL, "PEK_DBF"), > +}; > + > static const struct resource axp809_pek_resources[] = { > DEFINE_RES_IRQ_NAMED(AXP809_IRQ_PEK_RIS_EDGE, "PEK_DBR"), > DEFINE_RES_IRQ_NAMED(AXP809_IRQ_PEK_FAL_EDGE, "PEK_DBF"), > @@ -730,6 +735,17 @@ static const struct mfd_cell axp803_cells[] = { > { .name = "axp20x-regulator" }, > }; > > +static const struct mfd_cell axp806_self_working_cells[] = { > + { > + .name = "axp221-pek", > + .num_resources = ARRAY_SIZE(axp806_pek_resources), > + .resources = axp806_pek_resources, > + }, > + { > + .name = "axp20x-regulator", > + }, Nit: this should be on a single line, like it is above. Once fixed, please re-submit with my: For my own reference: Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org>
On Thu, 05 Jul 2018, Chen-Yu Tsai wrote: > The Pine64 H64 board uses an AXP806 PMIC in I2C and self-working mode. > The H64 SoC does not have the usual RSB controller. > > This patch adds AXP806 to the list of devices supported in I2C mode. > In theory, all RSB-based PMICs can also be used in I2C mode. > > Reviewed-by: Icenowy Zheng <icenowy@aosc.io> > Tested-by: Icenowy Zheng <icenowy@aosc.io> > Signed-off-by: Chen-Yu Tsai <wens@csie.org> > --- > drivers/mfd/axp20x-i2c.c | 2 ++ > 1 file changed, 2 insertions(+) For my own reference: Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org>