Skip to content

power: axp2101: add AXP8191 PMIC watchdog + power-off support - #17

Open
rgr4y wants to merge 1 commit into
radxa:cubie-aiot-v1.4.8from
rgr4y:feat/axp8191-watchdog
Open

power: axp2101: add AXP8191 PMIC watchdog + power-off support#17
rgr4y wants to merge 1 commit into
radxa:cubie-aiot-v1.4.8from
rgr4y:feat/axp8191-watchdog

Conversation

@rgr4y

@rgr4y rgr4y commented Jul 30, 2026

Copy link
Copy Markdown

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 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).
  • drivers/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 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 in drivers/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.c bundles 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.

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.
@rgr4y

rgr4y commented Jul 30, 2026

Copy link
Copy Markdown
Author

Companion DT + defconfig PR (Cubie A7S enablement): radxa/allwinner-device#20

@RadxaStephen
RadxaStephen requested a review from vamrs-feng July 31, 2026 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant