power: axp2101: add AXP8191 PMIC watchdog + power-off support - #17
Open
rgr4y wants to merge 1 commit into
Open
Conversation
Add a watchdog driver for the X-Powers AXP2101-family PMIC (AXP8191 on
the Cubie A733 boards). The PMIC's RESTART timeout mode performs a full
power-cycle of the PMIC rails — a reset the sunxi SoC watchdog cannot
do, as it only resets the SoC, not the PMIC-supplied rails.
- drivers/watchdog/axp2xx_wdt.c: new watchdog driver bound to the
"x-powers,axp2xx-watchdog" MFD cell, driving the config register
(REG 0x77) over the parent MFD regmap. Register layout verified
against the AXP318W datasheet V0.1 (sec 6.9 / 6.11.2.81).
- power/mfd/axp2101.c: register the watchdog MFD cell for AXP8191 and
route AXP8191 power-off through the power-down sequence (REG 0x55
bit 7) via a sys_off handler, matching the PMIC's documented
shutdown path.
The AXP8191 register defines already exist in
drivers/power/include/axp2101.h. The matching DT node and defconfig
enable are submitted separately against allwinner-device.
Author
|
Companion DT + defconfig PR (Cubie A7S enablement): radxa/allwinner-device#20 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a watchdog driver for the X-Powers AXP2101-family PMIC (AXP8191 on the Cubie A733 boards).
Why
The PMIC RESTART timeout mode power-cycles the PMIC rails — a recovery the sunxi SoC watchdog cannot perform, since the SoC watchdog resets only the SoC and leaves the PMIC-supplied rails up. On A733 boards a hung rail can only be cleared by the PMIC itself.
What
drivers/watchdog/axp2xx_wdt.c(new): watchdog driver bound to thex-powers,axp2xx-watchdogMFD cell, driving the config register (REG0x77) over the parent MFD regmap. Register layout verified against the AXP318W datasheet V0.1 (sec 6.9 / 6.11.2.81).drivers/power/mfd/axp2101.c: register the watchdog MFD cell for AXP8191, and route AXP8191 power-off through the power-down sequence (REG0x55bit 7) via asys_offhandler, matching the PMICs documented shutdown path.Kconfig/Makefile:CONFIG_AW_AXP_WATCHDOG.The AXP8191 register defines (
AXP8191_WATCHDOG_CFG,AXP8191_POWER_DISABLE_POWER_DOWN_SEQUENCE) already exist indrivers/power/include/axp2101.h— no header change needed.Companion
DT node + defconfig enable submitted separately against
radxa/allwinner-device(device-a733-v1.4.8): rgr4y/allwinner-device → PR linked in comments.Note
axp2101.cbundles the watchdog MFD cell and the AXP8191 power-off rework — both are AXP8191 power-sequencing changes sharing the same shutdown path (reboot.h/ power-down sequence). Happy to split if preferred.Testing
Built and booted on a Cubie A7S (A733, AXP8191); watchdog registers and RESTART power-cycles the PMIC as expected.