[PATCH 2/3] dt-bindings: PCI: qcom: Enforce check for PHY, PERST# and WAKE# properties
From: Manivannan Sadhasivam
Date: Fri Oct 10 2025 - 14:27:08 EST
Currently, the binding supports specifying the PHY, PERST#, WAKE#
properties in two ways:
1. Controller node (deprecated)
- phys
- perst-gpios
- wake-gpios
2. Root Port node
- phys
- reset-gpios
- wake-gpios
But there is no check to make sure that the both variants are not mixed.
For instance, if the Controller node specifies 'phys', 'reset-gpios',
'wake-gpios' or if the Root Port node specifies 'phys', 'perst-gpios',
'wake-gpios', then the driver will fail as reported. Hence, enforce the
check in the binding to catch these issues.
It is also possible that DTs could have 'phys' property in Controller node
and 'reset-gpios/wake-gpios' properties in the Root Port node. It will also
be a problem, but it is not possible to catch these cross-node issues in
the binding.
Reported-by: Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>
Closes: https://lore.kernel.org/linux-pci/8f2e0631-6c59-4298-b36e-060708970ced@xxxxxxxxxxxxxxxx
Suggested-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxxxxxxxx>
---
.../devicetree/bindings/pci/qcom,pcie-common.yaml | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml
index 77f8faf54737e0fab089a368976290dece4f2e7d..6eaecf83d6efd37e9acb044049c1ef95611cbf58 100644
--- a/Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml
+++ b/Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml
@@ -111,6 +111,16 @@ patternProperties:
phys:
maxItems: 1
+ oneOf:
+ - required:
+ - phys
+ - reset-gpios
+ - wake-gpios
+ - properties:
+ phys: false
+ reset-gpios: false
+ wake-gpios: false
+
unevaluatedProperties: false
required:
@@ -129,6 +139,16 @@ anyOf:
- required:
- msi-map
+oneOf:
+ - required:
+ - phys
+ - perst-gpios
+ - wake-gpios
+ - properties:
+ phys: false
+ perst-gpios: false
+ wake-gpios: false
+
allOf:
- $ref: /schemas/pci/pci-host-bridge.yaml#
--
2.48.1