From: Sebastian Reichel <sebastian.reichel@collabora.com>
To: Chaoyi Chen <chaoyi.chen@rock-chips.com>
Cc: Heiko Stuebner <heiko@sntech.de>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Midgy Balon <midgy971@gmail.com>,
Diederik de Haas <diederik@cknow-tech.com>,
Elaine Zhang <zhangqing@rock-chips.com>,
Freimut Diener <f.diener@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] dt-bindings: power: rockchip: Allow post-init-providers for domains
Date: Thu, 26 Nov 2026 04:04:56 +0100 [thread overview]
Message-ID: <aweeQ2McnEE6yXvY@venus> (raw)
In-Reply-To: <962182b2-6fa0-4aaa-a47a-f78339b5d89e@rock-chips.com>
[-- Attachment #1: Type: text/plain, Size: 3503 bytes --]
Hi,
On Thu, Nov 26, 2026 at 09:50:56AM +0800, Chaoyi Chen wrote:
> On 11/26/2026 4:37 AM, Heiko Stuebner wrote:
> > Am Mittwoch, 25. November 2026, 11:33:57 Mitteleuropäische Normalzeit schrieb Freimut Diener:
> >> A Rockchip power domain can have a supply that is required when
> >> powering on the domain but is not required to initialize the power
> >> controller.
> >>
> >> Allow post-init-providers on power-domain child nodes to describe
> >> such dependencies.
> >>
> >> Signed-off-by: Freimut Diener <f.diener@pengutronix.de>
> >
> > Interesting that this exists since 2024 and this will be the first
> > user it seems.
> >
> > I've looked at the dtschema for it, and this looks really great for this.
> >
> > Reviewed-by: Heiko Stuebner <heiko@sntech.de>
> >
>
> That's exactly what we want. :)
>
> I guess it's because the kernel doesn't include this part of the
> binding, and it's only included in the dt-schema repository,
> so nobody noticed it?
>
> https://github.com/devicetree-org/dt-schema/blob/main/dtschema/schemas/post-init-providers.yaml
>
> Reviewed-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
I don't think that this is what we want. It just tells the kernel
how to break a cyclic dependency: Probe the power-controller before
the regulator. But things are already handled in the same way, so
the only result is that the boot warning goes away. But it does not
solve the fundamental problem:
What we would actually want is dependency tree information on
sub-device level, as the cyclic dependency only happens due to
clustering all power-domains together. But doing dependency tracking
on sub-device level in the kernel would be a *really* big task
(it was discussed at this years LPC in a talk from me and Angelo
on exactly this problem).
Fortunately, there is only a few affected power-domains on Rockchip
specifically, so an alternative solution is moving those to a
separete device. At this point there is no cyclic dependency and the
warning is also fixed. But there is a huge difference: Now the
kernel has dependency informations, which are also used for
suspend/resume. So the kernel knows it should resume the power
domains required for SPI/I2C (bus used by regulator) first, then the
regulator driver and then the power domains needing regulators.
If you just add the post-init-providers, you basically just got rid
of a kernel warning by adding a DT property that possibly becomes ABI.
Greetings,
-- Sebastian
>
> >
> >> ---
> >> Documentation/devicetree/bindings/power/rockchip,power-controller.yaml | 3 +++
> >> 1 file changed, 3 insertions(+)
> >>
> >> diff --git a/Documentation/devicetree/bindings/power/rockchip,power-controller.yaml b/Documentation/devicetree/bindings/power/rockchip,power-controller.yaml
> >> index b41db576f95de..d2b512dd95f63 100644
> >> --- a/Documentation/devicetree/bindings/power/rockchip,power-controller.yaml
> >> +++ b/Documentation/devicetree/bindings/power/rockchip,power-controller.yaml
> >> @@ -147,6 +147,9 @@ $defs:
> >> A number of phandles to qos blocks which need to be saved and restored
> >> while power domain switches state.
> >>
> >> + post-init-providers:
> >> + $ref: /schemas/post-init-providers.yaml#/properties/post-init-providers
> >> +
> >> "#power-domain-cells":
> >> enum: [0, 1]
> >> description:
> >>
> >>
> >
>
> --
> Best,
> Chaoyi
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2026-11-26 3:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-25 10:33 [PATCH 0/2] Describe ROCK 5 GPU and NPU regulators as post-init providers Freimut Diener
2026-11-25 10:33 ` [PATCH 1/2] dt-bindings: power: rockchip: Allow post-init-providers for domains Freimut Diener
2026-11-25 20:37 ` Heiko Stuebner
2026-11-26 1:50 ` Chaoyi Chen
2026-11-26 3:04 ` Sebastian Reichel [this message]
2026-11-25 10:33 ` [PATCH 2/2] arm64: dts: rockchip: Mark ROCK 5 domain supplies as post-init Freimut Diener
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=aweeQ2McnEE6yXvY@venus \
--to=sebastian.reichel@collabora.com \
--cc=chaoyi.chen@rock-chips.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=diederik@cknow-tech.com \
--cc=f.diener@pengutronix.de \
--cc=heiko@sntech.de \
--cc=kernel@pengutronix.de \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=midgy971@gmail.com \
--cc=robh@kernel.org \
--cc=zhangqing@rock-chips.com \
/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