regulator: axp20x: Add AXP15060 support
authorShengyu Qu <wiagn233@outlook.com>
Wed, 24 May 2023 00:00:12 +0000 (01:00 +0100)
committerMark Brown <broonie@kernel.org>
Fri, 2 Jun 2023 12:31:10 +0000 (13:31 +0100)
commit9e72869d0fe12aba8cd489e485d93912b3f5c248
treec72faf050b3070e726f63e765d6ca7b395727c43
parent60fd7eb89670d2636ac3156881acbd103c6eba6a
regulator: axp20x: Add AXP15060 support

The AXP15060 is a typical I2C-controlled PMIC, seen on multiple boards
with different default register value. Current driver is tested on
Starfive Visionfive 2.

The RTCLDO is fixed, and cannot even be turned on or off. On top of
that, its voltage is customisable (either 1.8V or 3.3V). We pretend it's
a fixed 1.8V regulator since other AXP driver also do like this. Also,
BSP code ignores this regulator and it's not used according to VF2
schematic.

Describe the AXP15060's voltage settings and switch registers, how the
voltages are encoded, and connect this to the MFD device via its
regulator ID.

Signed-off-by: Shengyu Qu <wiagn233@outlook.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Tested-by: Shengyu Qu <wiagn233@outlook.com>
Link: https://lore.kernel.org/r/20230524000012.15028-4-andre.przywara@arm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/axp20x-regulator.c