Message ID | 20250322-perst-v1-1-e5e4da74a204@oss.qualcomm.com (mailing list archive) |
---|---|
State | New |
Delegated to: | Krzysztof WilczyĆski |
Headers | show |
Series | PCI: qcom: Move PERST# GPIO & phy retrieval from controller to PCIe bridge node | expand |
On Sat, Mar 22, 2025 at 08:30:43AM +0530, Krishna Chaitanya Chundru wrote: > Move the phy, phy-names, wake-gpio's to the pcie root port node instead of > the bridge node, as agreed upon in multiple places one instance is[1]. You aren't really moving them except in the example. This is an ABI break for sc7280. Is anyone going to care? You need to deprecate the properties in the old location. > Update the qcom,pcie-common.yaml to include the phy, phy-names, and > wake-gpios properties in the root port node. There is already reset-gpio > defined for PERST# in pci-bus-common.yaml, start using that property > instead of perst-gpio. > > For backward compatibility, do not remove any existing properties in the > bridge node. > > [1] https://lore.kernel.org/linux-pci/20241211192014.GA3302752@bhelgaas/ > > Signed-off-by: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com> > --- > .../devicetree/bindings/pci/qcom,pcie-common.yaml | 22 ++++++++++++++++++++++ > .../devicetree/bindings/pci/qcom,pcie-sc7280.yaml | 18 ++++++++++++++---- > 2 files changed, 36 insertions(+), 4 deletions(-) > > diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml > index 0480c58f7d99..258c21c01c72 100644 > --- a/Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml > +++ b/Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml > @@ -85,6 +85,28 @@ properties: > opp-table: > type: object > > +patternProperties: > + "^pcie@": > + type: object > + $ref: /schemas/pci/pci-pci-bridge.yaml# > + > + properties: > + reg: > + maxItems: 1 > + > + phys: > + maxItems: 1 > + > + phy-names: > + items: > + - const: pciephy Just drop phy-names in the new location. It's pointless especially when foo-names is just "${module}foo". > + > + wake-gpios: > + description: GPIO controlled connection to WAKE# signal > + maxItems: 1 > + > + unevaluatedProperties: false > + > required: > - reg > - reg-names
On 3/24/2025 10:09 PM, Rob Herring wrote: > On Sat, Mar 22, 2025 at 08:30:43AM +0530, Krishna Chaitanya Chundru wrote: >> Move the phy, phy-names, wake-gpio's to the pcie root port node instead of >> the bridge node, as agreed upon in multiple places one instance is[1]. > > You aren't really moving them except in the example. This is an ABI > break for sc7280. Is anyone going to care? > > You need to deprecate the properties in the old location. > Hi Rob, we are actually moving these properties in the driver also patch 3 https://lore.kernel.org/linux-arm-msm/20250322-perst-v1-3-e5e4da74a204@oss.qualcomm.com/T/#m168bec3f5d218a7f0c18293ff7380cba07a12e0e is the driver change in this series. >> Update the qcom,pcie-common.yaml to include the phy, phy-names, and >> wake-gpios properties in the root port node. There is already reset-gpio >> defined for PERST# in pci-bus-common.yaml, start using that property >> instead of perst-gpio. >> >> For backward compatibility, do not remove any existing properties in the >> bridge node. >> >> [1] https://lore.kernel.org/linux-pci/20241211192014.GA3302752@bhelgaas/ >> >> Signed-off-by: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com> >> --- >> .../devicetree/bindings/pci/qcom,pcie-common.yaml | 22 ++++++++++++++++++++++ >> .../devicetree/bindings/pci/qcom,pcie-sc7280.yaml | 18 ++++++++++++++---- >> 2 files changed, 36 insertions(+), 4 deletions(-) >> >> diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml >> index 0480c58f7d99..258c21c01c72 100644 >> --- a/Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml >> +++ b/Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml >> @@ -85,6 +85,28 @@ properties: >> opp-table: >> type: object >> >> +patternProperties: >> + "^pcie@": >> + type: object >> + $ref: /schemas/pci/pci-pci-bridge.yaml# >> + >> + properties: >> + reg: >> + maxItems: 1 >> + >> + phys: >> + maxItems: 1 >> + >> + phy-names: >> + items: >> + - const: pciephy > > Just drop phy-names in the new location. It's pointless especially when > foo-names is just "${module}foo". ack - Krishna Chaitanya. > >> + >> + wake-gpios: >> + description: GPIO controlled connection to WAKE# signal >> + maxItems: 1 >> + >> + unevaluatedProperties: false >> + >> required: >> - reg >> - reg-names
diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml index 0480c58f7d99..258c21c01c72 100644 --- a/Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml +++ b/Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml @@ -85,6 +85,28 @@ properties: opp-table: type: object +patternProperties: + "^pcie@": + type: object + $ref: /schemas/pci/pci-pci-bridge.yaml# + + properties: + reg: + maxItems: 1 + + phys: + maxItems: 1 + + phy-names: + items: + - const: pciephy + + wake-gpios: + description: GPIO controlled connection to WAKE# signal + maxItems: 1 + + unevaluatedProperties: false + required: - reg - reg-names diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie-sc7280.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie-sc7280.yaml index 76cb9fbfd476..c0a7cfdbfd2a 100644 --- a/Documentation/devicetree/bindings/pci/qcom,pcie-sc7280.yaml +++ b/Documentation/devicetree/bindings/pci/qcom,pcie-sc7280.yaml @@ -162,9 +162,6 @@ examples: iommu-map = <0x0 &apps_smmu 0x1c80 0x1>, <0x100 &apps_smmu 0x1c81 0x1>; - phys = <&pcie1_phy>; - phy-names = "pciephy"; - pinctrl-names = "default"; pinctrl-0 = <&pcie1_clkreq_n>; @@ -173,7 +170,20 @@ examples: resets = <&gcc GCC_PCIE_1_BCR>; reset-names = "pci"; - perst-gpios = <&tlmm 2 GPIO_ACTIVE_LOW>; vddpe-3v3-supply = <&pp3300_ssd>; + pcieport1: pcie@0 { + device_type = "pci"; + reg = <0x0 0x0 0x0 0x0 0x0>; + bus-range = <0x01 0xff>; + + #address-cells = <3>; + #size-cells = <2>; + ranges; + phys = <&pcie1_phy>; + phy-names = "pciephy"; + + reset-gpios = <&tlmm 2 GPIO_ACTIVE_LOW>; + }; + }; };
Move the phy, phy-names, wake-gpio's to the pcie root port node instead of the bridge node, as agreed upon in multiple places one instance is[1]. Update the qcom,pcie-common.yaml to include the phy, phy-names, and wake-gpios properties in the root port node. There is already reset-gpio defined for PERST# in pci-bus-common.yaml, start using that property instead of perst-gpio. For backward compatibility, do not remove any existing properties in the bridge node. [1] https://lore.kernel.org/linux-pci/20241211192014.GA3302752@bhelgaas/ Signed-off-by: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com> --- .../devicetree/bindings/pci/qcom,pcie-common.yaml | 22 ++++++++++++++++++++++ .../devicetree/bindings/pci/qcom,pcie-sc7280.yaml | 18 ++++++++++++++---- 2 files changed, 36 insertions(+), 4 deletions(-)