mfd: axp20x: Add support for AXP15060 PMIC
authorShengyu Qu <wiagn233@outlook.com>
Fri, 21 Apr 2023 15:08:15 +0000 (23:08 +0800)
committerLee Jones <lee@kernel.org>
Wed, 26 Apr 2023 14:25:25 +0000 (15:25 +0100)
commite0f8ad2a705367518b5c56bf9d6da89681467c02
tree04b440db8144fb261ca2ca798da1f4e4e7b2687d
parenta33c6a22f6d616caab6f5a5bfaa7ee01ea567d82
mfd: axp20x: Add support for AXP15060 PMIC

The AXP15060 is a PMIC chip produced by X-Powers, and could be connected
via an I2C bus.

Describe the regmap and the MFD bits, along with the registers exposed
via I2C. Eventually advertise the device using a new compatible string
and add support for power off the system.

The driver would disable PEK function if IRQ is not configured in device
tree, since some boards (For example, Starfive Visionfive 2) didn't
connect IRQ line of PMIC to SOC.

GPIO function isn't enabled in this commit, since its configuration
operation is different from any existing AXP PMICs and needs
logic modification on existing driver. GPIO support might come in later
patches.

Signed-off-by: Shengyu Qu <wiagn233@outlook.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/TY3P286MB261162D57695AC8164ED50E298609@TY3P286MB2611.JPNP286.PROD.OUTLOOK.COM
drivers/mfd/axp20x-i2c.c
drivers/mfd/axp20x.c
include/linux/mfd/axp20x.h