mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jernej Skrabec <jernej.skrabec@gmail.com>
To: Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Chen-Yu Tsai <wens@kernel.org>,
	Martin Botka <martin.botka@somainline.org>,
	Andre Przywara <andre.przywara@arm.com>
Cc: linux-kernel@vger.kernel.org, Jernej Skrabec <jernej.skrabec@gmail.com>
Subject: [PATCH] regulator: axp20x: AXP313A: set ramp_delay
Date: Sun, 15 Nov 2026 16:07:58 +0100	[thread overview]
Message-ID: <20261115150758.16650-1-jernej.skrabec@gmail.com> (raw)

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.

Fixes: 60fd7eb89670 ("regulator: axp20x: Add support for AXP313a variant")
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
---
 drivers/regulator/axp20x-regulator.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/regulator/axp20x-regulator.c b/drivers/regulator/axp20x-regulator.c
index ec6ec071ffde..bad114c03ed4 100644
--- a/drivers/regulator/axp20x-regulator.c
+++ b/drivers/regulator/axp20x-regulator.c
@@ -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
-- 
2.43.0


             reply	other threads:[~2026-11-15 15:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-15 15:07 Jernej Skrabec [this message]
2026-11-15 15:10 ` Chen-Yu Tsai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261115150758.16650-1-jernej.skrabec@gmail.com \
    --to=jernej.skrabec@gmail.com \
    --cc=andre.przywara@arm.com \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.botka@somainline.org \
    --cc=wens@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®