Skip to content

refactor(power): generalise LM51xx regulator driver#471

Open
fouge wants to merge 1 commit intomainfrom
cyril-orbs-947-mcu-supercaps-lm5144-driver
Open

refactor(power): generalise LM51xx regulator driver#471
fouge wants to merge 1 commit intomainfrom
cyril-orbs-947-mcu-supercaps-lm5144-driver

Conversation

@fouge
Copy link
Collaborator

@fouge fouge commented Feb 13, 2026

Replace raw GPIO control of the super-cap charger (LM5176/LM5144) with a proper Zephyr regulator driver using regulator_enable()/disable().

The custom tfh,super-cap-charger driver uses GPIO_OUTPUT_INACTIVE at init (unlike regulator-fixed which uses GPIO_OUTPUT), preventing PCA95xx GPIO expanders from briefly enabling the charger at boot due to their default output register being all-1s.

@fouge fouge force-pushed the cyril-orbs-947-mcu-supercaps-lm5144-driver branch from c7522a9 to 6561bdd Compare February 13, 2026 10:26
Generalise the super-cap charger regulator driver into a reusable
tfh,lm51xx driver for all LM51xx-family boost converters on the board:

- Super-cap charger (both boards)
- PVCC supply with optional mode GPIO (both boards)
- 12V-caps supply (Diamond only)

The driver supports an optional mode-gpios property for the
FPWM/diode-emulation select pin, configured as GPIO_OUTPUT_INACTIVE at
init. The optics code continues to toggle the mode pin at runtime via
its gpio_dt_spec, now referenced from the pvcc_regulator DT node.

Signed-off-by: Cyril Fougeray <cyril.fougeray@toolsforhumanity.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@fouge fouge force-pushed the cyril-orbs-947-mcu-supercaps-lm5144-driver branch from 6561bdd to 032e836 Compare February 13, 2026 16:16
@fouge fouge changed the title feat(power): add super-cap charger regulator driver refactor(power): generalise LM51xx regulator driver Feb 13, 2026
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