mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] Describe ROCK 5 GPU and NPU regulators as post-init providers
@ 2026-11-25 10:33 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 10:33 ` [PATCH 2/2] arm64: dts: rockchip: Mark ROCK 5 domain supplies as post-init Freimut Diener
  0 siblings, 2 replies; 8+ messages in thread
From: Freimut Diener @ 2026-11-25 10:33 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
	Midgy Balon, Chaoyi Chen, Diederik de Haas, Sebastian Reichel,
	Elaine Zhang
  Cc: Pengutronix Kernel Team, devicetree, linux-arm-kernel,
	linux-rockchip, linux-kernel, Freimut Diener

This series addresses failed fw_devlink sync_state-only proxy links
by describing the GPU and NPU domain supplies as post-init providers
in the shared ROCK 5B, 5B+ and 5T DTSI.

Related discussion:

https://lore.kernel.org/aixze8zFboY3huSf@venus

Tested on a ROCK 5T with and without the series. All three device-link
creation errors disappear, while driver probing, runtime suspend and
resume, power-domain transitions and regulator reference counts remain
unaffected for the GPU and all three NPU cores.

The modified binding passes dt_binding_check, and all three affected
DTBs pass validation against the Rockchip power-controller schema.

Signed-off-by: Freimut Diener <f.diener@pengutronix.de>
---
Freimut Diener (2):
      dt-bindings: power: rockchip: Allow post-init-providers for domains
      arm64: dts: rockchip: Mark ROCK 5 domain supplies as post-init

 Documentation/devicetree/bindings/power/rockchip,power-controller.yaml | 3 +++
 arch/arm64/boot/dts/rockchip/rk3588-rock-5b-5bp-5t.dtsi                | 2 ++
 2 files changed, 5 insertions(+)
---
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
change-id: 20261124-rock5t-regulator-deps-1d2227b83768

Best regards,
--  
Freimut Diener <f.diener@pengutronix.de>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/2] dt-bindings: power: rockchip: Allow post-init-providers for domains
  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 ` Freimut Diener
  2026-11-25 20:37   ` Heiko Stuebner
  2026-11-25 10:33 ` [PATCH 2/2] arm64: dts: rockchip: Mark ROCK 5 domain supplies as post-init Freimut Diener
  1 sibling, 1 reply; 8+ messages in thread
From: Freimut Diener @ 2026-11-25 10:33 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
	Midgy Balon, Chaoyi Chen, Diederik de Haas, Sebastian Reichel,
	Elaine Zhang
  Cc: Pengutronix Kernel Team, devicetree, linux-arm-kernel,
	linux-rockchip, linux-kernel, 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>
---
 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:

-- 
2.56.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 2/2] arm64: dts: rockchip: Mark ROCK 5 domain supplies as post-init
  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 10:33 ` Freimut Diener
  1 sibling, 0 replies; 8+ messages in thread
From: Freimut Diener @ 2026-11-25 10:33 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
	Midgy Balon, Chaoyi Chen, Diederik de Haas, Sebastian Reichel,
	Elaine Zhang
  Cc: Pengutronix Kernel Team, devicetree, linux-arm-kernel,
	linux-rockchip, linux-kernel, Freimut Diener

The GPU and NPU power domains reference regulators that themselves
depend on the Rockchip power-domain controller through their
respective bus controllers.

Since all power domains are provided by a single device, fw_devlink
attempts to create cyclic sync_state-only proxy links on behalf of
the power-domain child nodes, resulting in the following messages
during boot:

    rockchip-pm-domain fd8d8000.power-management:power-controller: Failed to create device link (0x180) with supplier spi2.0 for /power-management@fd8d8000/power-controller/power-domain@12
    rockchip-pm-domain fd8d8000.power-management:power-controller: Failed to create device link (0x180) with supplier 1-0042 for /power-management@fd8d8000/power-controller/power-domain@8

These are sync_state-only proxy links, not probe-ordering links.

The Rockchip power-domain driver does not require the regulators
to register the domains. It acquires them lazily and enables them
when powering on the corresponding domains.

Mark the regulators as post-init providers in the shared ROCK 5B,
5B+ and 5T DTSI to describe this dependency and avoid the failed
proxy-link creation attempts.

Keep the domain-supply references intact. Testing on the ROCK 5T
shows that the messages disappear while GPU and NPU runtime power
management behaviour remains unchanged.

Signed-off-by: Freimut Diener <f.diener@pengutronix.de>
---
 arch/arm64/boot/dts/rockchip/rk3588-rock-5b-5bp-5t.dtsi | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b-5bp-5t.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b-5bp-5t.dtsi
index b8d90936fc204..002dac5f28fbd 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b-5bp-5t.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b-5bp-5t.dtsi
@@ -504,10 +504,12 @@ &pcie3x4 {
 
 &pd_gpu {
 	domain-supply = <&vdd_gpu_s0>;
+	post-init-providers = <&vdd_gpu_s0>;
 };
 
 &pd_npu {
 	domain-supply = <&vdd_npu_s0>;
+	post-init-providers = <&vdd_npu_s0>;
 };
 
 &pinctrl {

-- 
2.56.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] dt-bindings: power: rockchip: Allow post-init-providers for domains
  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
  0 siblings, 1 reply; 8+ messages in thread
From: Heiko Stuebner @ 2026-11-25 20:37 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Midgy Balon,
	Chaoyi Chen, Diederik de Haas, Sebastian Reichel, Elaine Zhang,
	Freimut Diener
  Cc: Pengutronix Kernel Team, devicetree, linux-arm-kernel,
	linux-rockchip, linux-kernel, Freimut Diener

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>


> ---
>  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:
> 
> 





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] dt-bindings: power: rockchip: Allow post-init-providers for domains
  2026-11-25 20:37   ` Heiko Stuebner
@ 2026-11-26  1:50     ` Chaoyi Chen
  2026-11-26  3:04       ` Sebastian Reichel
  0 siblings, 1 reply; 8+ messages in thread
From: Chaoyi Chen @ 2026-11-26  1:50 UTC (permalink / raw)
  To: Heiko Stuebner, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Midgy Balon, Diederik de Haas, Sebastian Reichel, Elaine Zhang,
	Freimut Diener
  Cc: Pengutronix Kernel Team, devicetree, linux-arm-kernel,
	linux-rockchip, linux-kernel

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>

> 
>> ---
>>  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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] dt-bindings: power: rockchip: Allow post-init-providers for domains
  2026-11-26  1:50     ` Chaoyi Chen
@ 2026-11-26  3:04       ` Sebastian Reichel
  2026-11-26 10:59         ` Freimut Diener
  0 siblings, 1 reply; 8+ messages in thread
From: Sebastian Reichel @ 2026-11-26  3:04 UTC (permalink / raw)
  To: Chaoyi Chen
  Cc: Heiko Stuebner, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Midgy Balon, Diederik de Haas, Elaine Zhang, Freimut Diener,
	Pengutronix Kernel Team, devicetree, linux-arm-kernel,
	linux-rockchip, linux-kernel

[-- 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 --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] dt-bindings: power: rockchip: Allow post-init-providers for domains
  2026-11-26  3:04       ` Sebastian Reichel
@ 2026-11-26 10:59         ` Freimut Diener
  2026-11-26 11:20           ` Sebastian Reichel
  0 siblings, 1 reply; 8+ messages in thread
From: Freimut Diener @ 2026-11-26 10:59 UTC (permalink / raw)
  To: Sebastian Reichel, Chaoyi Chen
  Cc: Heiko Stuebner, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Midgy Balon, Diederik de Haas, Elaine Zhang,
	Pengutronix Kernel Team, devicetree, linux-arm-kernel,
	linux-rockchip, linux-kernel

Sebastian Reichel <sebastian.reichel@collabora.com> writes:

> [...] an alternative solution is moving [affected power domains] to a
> separete device.
> [...]
> 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.

Since the power domains are managed by a single hardware power
controller, would you envision splitting them into separate devices
internally in the Rockchip power-domain driver while retaining the
existing DT representation, or would this also require changing the DT
bindings?

Best,
Freimut

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] dt-bindings: power: rockchip: Allow post-init-providers for domains
  2026-11-26 10:59         ` Freimut Diener
@ 2026-11-26 11:20           ` Sebastian Reichel
  0 siblings, 0 replies; 8+ messages in thread
From: Sebastian Reichel @ 2026-11-26 11:20 UTC (permalink / raw)
  To: Freimut Diener
  Cc: Chaoyi Chen, Heiko Stuebner, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Midgy Balon, Diederik de Haas, Elaine Zhang,
	Pengutronix Kernel Team, devicetree, linux-arm-kernel,
	linux-rockchip, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1690 bytes --]

Hi,

On Thu, Nov 26, 2026 at 11:59:23AM +0100, Freimut Diener wrote:
> Sebastian Reichel <sebastian.reichel@collabora.com> writes:
> 
> > [...] an alternative solution is moving [affected power domains] to a
> > separete device.
> > [...]
> > 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.
> 
> Since the power domains are managed by a single hardware power
> controller, would you envision splitting them into separate devices
> internally in the Rockchip power-domain driver while retaining the
> existing DT representation, or would this also require changing the DT
> bindings?

It should be possible to create the subdevices in the driver using
the current DT; there is a node for each power domain already. The
decision to create a sub-device can be made based on the regulator
property.

The part making it interesting is that all power domains are
accessed via phandles to the main node instead of referencing the
specific domain node. We cannot change that, as it would be a
massive ABI break. So this requires some extra work in the pmdomain
core code to allow partial registration of "early" power domains
with some stubs for the late domains. The late (regulator using)
domains can then probe later, once the regulator becomes available.
At this point they need to register their pmdomain subtree. This
setup also allows moving the regulator acquistion to probe like any
other device.

Greetings,

-- Sebastian

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-11-26 11:21 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2026-11-26 10:59         ` Freimut Diener
2026-11-26 11:20           ` Sebastian Reichel
2026-11-25 10:33 ` [PATCH 2/2] arm64: dts: rockchip: Mark ROCK 5 domain supplies as post-init Freimut Diener

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®