public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: "Heiko Stübner" <heiko@sntech.de>
To: wens@kernel.org
Cc: quentin.schulz@cherry.de, jonas@kwiboo.se, dsimic@manjaro.org,
	linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
	Mark Brown <broonie@kernel.org>
Subject: Re: [PATCH v2] arm64: dts: rockchip: add regulator-enable-ramp-delay to RK860-0/-2/-3 regulators
Date: Fri, 06 Jun 2025 10:20:52 +0200	[thread overview]
Message-ID: <3115271.687JKscXgg@diego> (raw)
In-Reply-To: <CAGb2v65C0jHsD2HD_AEt+AGqMfWUUwwWV0bXw4i9Hw2tCNHZpA@mail.gmail.com>

Am Freitag, 6. Juni 2025, 04:17:53 Mitteleuropäische Sommerzeit schrieb Chen-Yu Tsai:
> On Fri, Jun 6, 2025 at 2:57 AM Heiko Stuebner <heiko@sntech.de> wrote:
> >
> > The RK860-0/-1/-2/-3 regulators are used on rk3588 boards in addition to
> > the main pmic, to supply components like the big cpu-clusters and npu.
> >
> > So far nobody had a use-case for turning these off. The supplies for the
> > big cpu-clusters are on by default and those clusters normally are not
> > completely turned off during runtime.
> >
> > This changed with the new Rocket driver for the NPU, which does use
> > runtime-pm and thus does turn off and on the NPU's supply regulator as
> > needed. This regulator is also needed to run to actually turn on the
> > power-domain for the NPU.
> >
> > If the rocket driver now runtime-suspends while running a load and then
> > runtime-resumes again, hangs can be observed with messages like
> >
> >   rockchip-pm-domain fd8d8000.power-management:power-controller: failed to set domain 'nputop' on, val=0
> >
> > A way to "fix" that issue when it happens, is to set the regulator to
> > always-on. This suggests that the power-domain is trying to get power
> > from the regulator before it is ready to deliver power.
> >
> > And in fact the datasheet for the regulator defines an "Internal soft-start
> > time" characteristic. For a target output voltage of 1.0V the _typical_
> > time to reach at least 92% of the output, is given as 260uS.
> >
> > That means the time is dependent on the target voltage (up to 1.5V for
> > the type) and also the rest of the board design.
> >
> > So add a regulator-enable-ramp-delay to all rk860-2/-3 nodes we have in
> > mainline right now. I've chosen 500uS to be on the safe side, as
> > 260uS is the "typical" value for 1.0V and sadly no max value is given
> > in the datasheet.
> 
> Since these are characteristics of the PMIC, I wonder if it makes more
> sense to put them in the driver? At least that's what we've done with a
> similar fix for the AXP PMICs.

yeah - definitly.

After sending this v2 yesterday, I re-read Quentin's comment on v1 and
finally understood the meaning - which was the same, that the driver
might be a nicer place for default values.

So yesterday evening I did parse the datasheets of all the regulator
variants to get the relevant (and different) startup times.

Hopefully I'll get this done and sent out before lunch today :-) .

Heiko




      reply	other threads:[~2025-06-06  8:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-05 18:50 [PATCH v2] arm64: dts: rockchip: add regulator-enable-ramp-delay to RK860-0/-2/-3 regulators Heiko Stuebner
2025-06-06  2:17 ` Chen-Yu Tsai
2025-06-06  8:20   ` Heiko Stübner [this message]

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=3115271.687JKscXgg@diego \
    --to=heiko@sntech.de \
    --cc=broonie@kernel.org \
    --cc=dsimic@manjaro.org \
    --cc=jonas@kwiboo.se \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=quentin.schulz@cherry.de \
    --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