git: 9597338d5679 - main - axp81x: Set the maximum voltage of the AXP805 regulators
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 12 Nov 2026 09:32:01 UTC
The branch main has been updated by manu:
URL: https://cgit.FreeBSD.org/src/commit/?id=9597338d5679ae65129e1dc58825fd74d779aecf
commit 9597338d5679ae65129e1dc58825fd74d779aecf
Author: Emmanuel Vadot <manu@FreeBSD.org>
AuthorDate: 2026-11-12 09:00:42 +0000
Commit: Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2026-11-12 09:31:37 +0000
axp81x: Set the maximum voltage of the AXP805 regulators
AXP805_REG() did not set voltage_max, so a regulator without
regulator-max-microvolt in the FDT got a maximum of 0 and its
initialisation failed with ERANGE. Compute it from the minimum and the
steps of the two ranges, like the value of the AXP813 DCDC7.
Reported by: llm-postcr
Tested on: H6
---
sys/arm/allwinner/axp81x.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sys/arm/allwinner/axp81x.c b/sys/arm/allwinner/axp81x.c
index a3d8fd3a4126..7db28242a3db 100644
--- a/sys/arm/allwinner/axp81x.c
+++ b/sys/arm/allwinner/axp81x.c
@@ -358,6 +358,8 @@ static struct axp8xx_regdef axp813_regdefs[] = {
.enable_value = (1 << (_ebit)), \
.voltage_reg = _vreg, \
.voltage_min = _min, \
+ .voltage_max = (_min) + (_step1) * (_nstep1) + \
+ (_step2) * (_nstep2), \
.voltage_step1 = _step1, \
.voltage_nstep1 = _nstep1, \
.voltage_step2 = _step2, \