FROMGIT: power: sequencing: pwrseq-pcie-m2: Support PCIe switch topologies - #1079
Open
weiden (WeiDeng-weiden) wants to merge 1 commit into
Open
FROMGIT: power: sequencing: pwrseq-pcie-m2: Support PCIe switch topologies#1079weiden (WeiDeng-weiden) wants to merge 1 commit into
weiden (WeiDeng-weiden) wants to merge 1 commit into
Conversation
…ogies The PCI parent OF node check in pwrseq_pcie_m2_notify() and pwrseq_pcie_m2_create_serdev() only looks at the immediate parent of the PCI endpoint device. This fails when a PCIe switch inserts one or more intermediate bridges between the root port and the endpoint. For example, on lemans-evk with IFP Mezzanine board, the Toshiba TC9562 PCIe switch creates two bridge devices (upstream and downstream ports) without OF nodes, so the WCN6855 BT device appears at depth 3 and its immediate parent has of_node=NULL. Add a helper pwrseq_pcie_m2_pci_parent_matches() that walks the PCI parent chain upward until it finds a device whose OF node matches the expected connector port node, or reaches a non-PCI device. Replace both single-level checks with this helper to handle arbitrary PCIe switch depths. Signed-off-by: Wei Deng <wei.deng@oss.qualcomm.com> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com> Link: https://patch.msgid.link/20260907122129.1577279-1-wei.deng@oss.qualcomm.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
weiden (WeiDeng-weiden)
requested review from
a team,
Shivendra Pratap (quicAspratap),
Rajendra (rrnayak) and
yijiyang
September 11, 2026 03:37
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The PCI parent OF node check in pwrseq_pcie_m2_notify() and pwrseq_pcie_m2_create_serdev() only looks at the immediate parent of the PCI endpoint device. This fails when a PCIe switch inserts one or more intermediate bridges between the root port and the endpoint.
For example, on lemans-evk with IFP Mezzanine board, the Toshiba TC9562 PCIe switch creates two bridge devices (upstream and downstream ports) without OF nodes, so the WCN6855 BT device appears at depth 3 and its immediate parent has of_node=NULL.
Add a helper pwrseq_pcie_m2_pci_parent_matches() that walks the PCI parent chain upward until it finds a device whose OF node matches the expected connector port node, or reaches a non-PCI device. Replace both single-level checks with this helper to handle arbitrary PCIe switch depths.
Reviewed-by: Manivannan Sadhasivam manivannan.sadhasivam@oss.qualcomm.com
Link: https://patch.msgid.link/20260907122129.1577279-1-wei.deng@oss.qualcomm.com
CRs-fixed: 4664967