power: pmic: axp: Implement poweroff via sysreset

The AXP PMICs have the ability to power off the system. The existing
code for this is duplicated for each PMIC variant, and uses the legacy
non-DM "pmic_bus" interface. When SYSRESET is enabled, this can all be
replaced with a sysreset device using the DM_PMIC interface.

Since the trigger bit is the same on all PMIC variants, use the register
definitions from the oldest supported PMIC.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
diff --git a/drivers/power/pmic/Kconfig b/drivers/power/pmic/Kconfig
index 92e2ace..b9fda42 100644
--- a/drivers/power/pmic/Kconfig
+++ b/drivers/power/pmic/Kconfig
@@ -66,6 +66,8 @@
 config PMIC_AXP
 	bool "Enable Driver Model for X-Powers AXP PMICs"
 	depends on DM_I2C
+	select SYSRESET_CMD_POWEROFF if SYSRESET && CMD_POWEROFF
+	imply CMD_POWEROFF if SYSRESET
 	help
 	  This config enables driver-model PMIC uclass features for
 	  X-Powers AXP152, AXP2xx, and AXP8xx PMICs.