git: 8a131d2f1610 - main - axp81x: Honor the enable delay of the regulators
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 13 Nov 2026 11:17:31 UTC
The branch main has been updated by manu:
URL: https://cgit.FreeBSD.org/src/commit/?id=8a131d2f16103661e5f0bea29777c0f85352f02d
commit 8a131d2f16103661e5f0bea29777c0f85352f02d
Author: Emmanuel Vadot <manu@FreeBSD.org>
AuthorDate: 2026-11-13 08:07:14 +0000
Commit: Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2026-11-13 11:17:07 +0000
axp81x: Honor the enable delay of the regulators
axp8xx_regnode_enable() always reported a delay of 0, so the
regulator-enable-ramp-delay property of the FDT was ignored. On the
Pine H64 model B the Ethernet PHY is supplied by ALDO2, which has a
delay of 100ms, and awg(4) resets the controller right after enabling
it, before the PHY is ready: the soft reset timed out and the interface
did not attach. Return the delay when enabling a regulator, like the
fixed regulator driver does.
Fixes: c175fd0fe8a3 ("axp81x: Add support for AXP803")
Tested on: H6
---
sys/arm/allwinner/axp81x.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/sys/arm/allwinner/axp81x.c b/sys/arm/allwinner/axp81x.c
index 279113bb5294..88efb61707a7 100644
--- a/sys/arm/allwinner/axp81x.c
+++ b/sys/arm/allwinner/axp81x.c
@@ -899,11 +899,12 @@ axp8xx_regnode_enable(struct regnode *regnode, bool enable, int *udelay)
uint8_t val;
int error;
- *udelay = 0;
-
sc = regnode_get_softc(regnode);
asc = device_get_softc(sc->base_dev);
+ /* The consumers wait for the regulator to be ready after enabling it */
+ *udelay = enable ? sc->param->enable_delay : 0;
+
if (bootverbose)
device_printf(sc->base_dev, "%sable %s (%s)\n",
enable ? "En" : "Dis",