Thread (10 messages) 10 messages, 5 authors, 2026-02-09

Re: [PATCH] of: property: Create devlink between PCI Host bridge and Root Port suppliers

flat view

From: Rob Herring <robh@kernel.org>
Date: 2026-02-09 18:27:12
Also in: linux-arm-msm, lkml

On Thu, Feb 5, 2026 at 3:01 AM Manivannan Sadhasivam
[off-list ref] wrote:
On Thu, Feb 05, 2026 at 09:50:20AM +0100, Konrad Dybcio wrote:
quoted
On 2/5/26 8:06 AM, Manivannan Sadhasivam wrote:
quoted
In the recent times, devicetree started to represent the PCI Host bridge
supplies like PHY in the Root Port nodes as seen in commit 38fcbfbd4207
("dt-bindings: PCI: qcom: Move PHY & reset GPIO to Root Port node"). But
the Host bridge drivers still need to control these supplies as a part of
their controller initialization/deinitialization sequence.

So the Host bridge drivers end up parsing the Root Port supplies in their
probe() and controlled them. A downside to this approach is that the
devlink dependency between the suppliers and Host bridge is completely
broken. Due to this, the driver core probes the Host bridge drivers even if
the suppliers are not ready, causing probe deferrals and setup teardowns in
probe().

These probe deferrals sometime happen over 1000 times (as reported in Qcom
Glymur platform) leading to a waste of CPU resources and increase in boot
time. So to fix these unnecessary deferrals, create devlink between the
Host bridge and Root Port suppliers in of_fwnode_add_links(). This will
allow the driver core to probe the Host bridge drivers only when all Root
Port suppliers are available.

Reported-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Manivannan Sadhasivam <redacted>
---
[...]

This is not 'required' in bindings and device_type="pci" doesn't uniquely
identify root complexes (as can be seen below).. but I suppose this is the
best delimiter we've got
Yeah. There is no way to uniquely identify the Host bridges in DT. So I had to
settle for this.

Maybe I can check for 'device_type', but that will create devlink between switch
port supplies and Root Ports.
You can also check the parent is not PCI to exclude that case.

Rob
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help