FROMLIST: PCI: qcom: Handle mixed PERST#/PHY DT configuration#786
Conversation
Devicetree schema allows the PERST# GPIO to be present in all PCIe bridge nodes, not just in Root Port node. But the current logic parses PERST# only from the Root Port nodes. Though it is not causing any issue on the current platforms, the upcoming platforms will have PERST# in PCIe switch downstream ports also. So this requires parsing all the PCIe bridge nodes for the PERST# GPIO. Hence, rework the parsing logic to extend to all PCIe bridge nodes starting from the Root Port node. If the 'reset-gpios' property is found for a PCI bridge node, the GPIO descriptor will be stored in qcom_pcie_perst::desc and added to the qcom_pcie_port::perst list. It should be noted that if more than one bridge node has the same GPIO for PERST# (shared PERST#), the driver will error out. This is due to the limitation in the GPIOLIB subsystem that allows only exclusive (non-shared) access to GPIOs from consumers. But this is soon going to get fixed. Once that happens, it will get incorporated in this driver. So for now, PERST# sharing is not supported. Tested-by: Chen-Yu Tsai <wenst@chromium.org> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com> Link: https://lore.kernel.org/all/20251216-pci-pwrctrl-rework-v2-1-745a563b9be6@oss.qualcomm.com/
Some platforms have a mixed DT configuration where PERST# is described in the Root Complex node (using 'perst-gpios') while PHY is described in the PCIe port nodes. The current code only handles the case where PERST# is in the port nodes (via 'reset-gpios'). Handle this mixed configuration by checking for 'perst-gpios' in the Root Complex node first. If found, reuse that GPIO descriptor for all ports instead of parsing 'reset-gpios' from individual port nodes. Emit a warning to indicate that the DT needs to be fixed to use the standard 'reset-gpios' in port nodes. Signed-off-by: Qiang Yu <qiang.yu@oss.qualcomm.com> Link: https://lore.kernel.org/all/20260508-mix_perst_phy_dts-v1-1-9eff6ee9b51a@oss.qualcomm.com/
|
Merge Check Failed: No CR Numbers Found Error: No Change Request numbers were found. Please add Change Request numbers to your pull request description in the format CRs-Fixed: 12345 or link GitHub issues that are associated with Change Requests. |
PR #786 — validate-patchPR: #786
Final Summary
Note: This validation is limited by network restrictions. A complete validation requires:
|
PR #786 — checker-log-analyzerPR: #786
Detailed report: Full report
|
Some platforms have a mixed DT configuration where PERST# is described
in the Root Complex node (using 'perst-gpios') while PHY is described in
the PCIe port nodes. The current code only handles the case where PERST#
is in the port nodes (via 'reset-gpios').
Handle this mixed configuration by checking for 'perst-gpios' in the Root
Complex node first. If found, reuse that GPIO descriptor for all ports
instead of parsing 'reset-gpios' from individual port nodes.
Emit a warning to indicate that the DT needs to be fixed to use the
standard 'reset-gpios' in port nodes.
Note: This patch depends on 'PCI: qcom: Parse PERST# from all PCIe bridge
nodes' (PR #785).
Signed-off-by: Qiang Yu qiang.yu@oss.qualcomm.com
Link: https://lore.kernel.org/all/20260508-mix_perst_phy_dts-v1-1-9eff6ee9b51a@oss.qualcomm.com/