regulator: axp20x: AXP313A: set ramp_delay
PATCH 1/1 regulator: axp20x: AXP313A: set ramp_delay
The AXP313A DCDC outputs need time to reach a new voltage, but the driver reports no ramp delay. cpufreq thus raises the CPU clock before the higher voltage is reached, which causes oopses and hangs within minutes of DVFS activity on H616 boards like the Orange Pi Zero3.
The datasheet doesn't specify the slew rate. The vendor device trees wait 25 us per 10 mV step, so set a ramp delay of 400 uV/us for all three DCDCs.
--- drivers/regulator/axp20x-regulator.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/regulator/axp20x-regulator.c +6 -6
@@ -744,18 +744,18 @@ static const struct linear_range axp313a_dcdc3_ranges[] = { };static const struct regulator_desc axp313a_regulators[] = { -AXP_DESC_RANGES (AXP313A ,DCDC1 ,"dcdc1" ,"vin1" , +AXP_DESC_RANGES_DELAY (AXP313A ,DCDC1 ,"dcdc1" ,"vin1" , axp313a_dcdc1_ranges,AXP313A_DCDC1_NUM_VOLTAGES ,AXP313A_DCDC1_CONTROL ,AXP313A_DCDC_V_OUT_MASK , -AXP313A_OUTPUT_CONTROL ,BIT (0 )), -AXP_DESC_RANGES (AXP313A ,DCDC2 ,"dcdc2" ,"vin2" , +AXP313A_OUTPUT_CONTROL ,BIT (0 ),400 ), +AXP_DESC_RANGES_DELAY (AXP313A ,DCDC2 ,"dcdc2" ,"vin2" , axp313a_dcdc2_ranges,AXP313A_DCDC23_NUM_VOLTAGES ,AXP313A_DCDC2_CONTROL ,AXP313A_DCDC_V_OUT_MASK , -AXP313A_OUTPUT_CONTROL ,BIT (1 )), -AXP_DESC_RANGES (AXP313A ,DCDC3 ,"dcdc3" ,"vin3" , +AXP313A_OUTPUT_CONTROL ,BIT (1 ),400 ), +AXP_DESC_RANGES_DELAY (AXP313A ,DCDC3 ,"dcdc3" ,"vin3" , axp313a_dcdc3_ranges,AXP313A_DCDC23_NUM_VOLTAGES ,AXP313A_DCDC3_CONTROL ,AXP313A_DCDC_V_OUT_MASK , -AXP313A_OUTPUT_CONTROL ,BIT (2 )), +AXP313A_OUTPUT_CONTROL ,BIT (2 ),400 ),AXP_DESC (AXP313A ,ALDO1 ,"aldo1" ,"vin1" ,500 ,3500 ,100 ,AXP313A_ALDO1_CONTROL ,AXP313A_LDO_V_OUT_MASK ,AXP313A_OUTPUT_CONTROL ,BIT (3 )),
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
Signature · 1 line
2.43.0
Quoted 6 lines · Jernej Skrabec
The AXP313A DCDC outputs need time to reach a new voltage, but the driver reports no ramp delay. cpufreq thus raises the CPU clock before the higher voltage is reached, which causes oopses and hangs within minutes of DVFS activity on H616 boards like the Orange Pi Zero3.
Quoted 6 lines
The datasheet doesn't specify the slew rate. The vendor device trees wait 25 us per 10 mV step, so set a ramp delay of 400 uV/us for all three DCDCs.
Fixes 60fd7eb89670 ("regulator: axp20x: Add support for AXP313a variant")Signed-off-by Jernej Skrabec <[email protected]>
Mark Brown
maintainerQuoted 1 line · Jernej Skrabec
regulator: axp20x: AXP313A: set
ramp_delay
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-7.4
Thanks!
[1/1] regulator: axp20x: AXP313A: set ramp_delay
https://git.kernel.org/broonie/regulator/c/29219e5254ab
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark