mfd: axp20x: Add support for AXP313a PMIC
authorMartin Botka <martin.botka@somainline.org>
Wed, 24 May 2023 00:00:10 +0000 (01:00 +0100)
committerLee Jones <lee@kernel.org>
Thu, 25 May 2023 11:35:57 +0000 (12:35 +0100)
commit75c8cb2f4cb218aaf4ea68cab08d6dbc96eeae15
tree4bdc43b1a48ea109106281e4733a8c82eb514a3e
parentac9a78681b921877518763ba0e89202254349d1b
mfd: axp20x: Add support for AXP313a PMIC

The AXP313a is a PMIC chip produced by X-Powers, it can be connected via
an I2C bus.
The name AXP1530 seems to appear as well, and this is what is used in
the BSP driver. From all we know it's the same chip, just a different
name. However we have only seen AXP313a chips in the wild, so go with
this name.

Compared to the other AXP PMICs it's a rather simple affair: just three
DCDC converters, three LDOs, and no battery charging support.

Describe the regmap and the MFD bits, along with the registers exposed
via I2C. Aside from the various regulators, also describe the power key
interrupts, and adjust the shutdown handler routine to use a different
register than the other PMICs.
Eventually advertise the device using the new compatible string.

Signed-off-by: Martin Botka <martin.botka@somainline.org>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Link: https://lore.kernel.org/r/20230524000012.15028-2-andre.przywara@arm.com
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/mfd/axp20x-i2c.c
drivers/mfd/axp20x.c
include/linux/mfd/axp20x.h