[PATCH v5 2/7] dt-bindings: PCI: qcom,pcie-sc7280: Make elbi register as an optional

Krishna Chaitanya Chundru posted 7 patches 11 months, 1 week ago
There is a newer version of this series
[PATCH v5 2/7] dt-bindings: PCI: qcom,pcie-sc7280: Make elbi register as an optional
Posted by Krishna Chaitanya Chundru 11 months, 1 week ago
ELBI regitsers are optional registers and not been using in this
platform. Having this register as required is not allowing to enable
ECAM feature of the PCIe cleanly. ECAM feature needs to do single
remap of entire 256MB which includes DBI and ELBI. Having optional
ELBI registers in the devicetree and binding is causing resorce
conflicts when enabling ECAM feature.

So, make ELBI registers as optional one.

Suggested-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
---
 Documentation/devicetree/bindings/pci/qcom,pcie-sc7280.yaml | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie-sc7280.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie-sc7280.yaml
index 76cb9fbfd476..326059a59b61 100644
--- a/Documentation/devicetree/bindings/pci/qcom,pcie-sc7280.yaml
+++ b/Documentation/devicetree/bindings/pci/qcom,pcie-sc7280.yaml
@@ -19,17 +19,17 @@ properties:
     const: qcom,pcie-sc7280
 
   reg:
-    minItems: 5
+    minItems: 4
     maxItems: 6
 
   reg-names:
-    minItems: 5
+    minItems: 4
     items:
       - const: parf # Qualcomm specific registers
       - const: dbi # DesignWare PCIe registers
-      - const: elbi # External local bus interface registers
       - const: atu # ATU address space
       - const: config # PCIe configuration space
+      - const: elbi # External local bus interface registers
       - const: mhi # MHI registers
 
   clocks:
@@ -94,10 +94,9 @@ examples:
             compatible = "qcom,pcie-sc7280";
             reg = <0 0x01c08000 0 0x3000>,
                   <0 0x40000000 0 0xf1d>,
-                  <0 0x40000f20 0 0xa8>,
                   <0 0x40001000 0 0x1000>,
                   <0 0x40100000 0 0x100000>;
-            reg-names = "parf", "dbi", "elbi", "atu", "config";
+            reg-names = "parf", "dbi", "atu", "config";
             ranges = <0x01000000 0x0 0x00000000 0x0 0x40200000 0x0 0x100000>,
                      <0x02000000 0x0 0x40300000 0x0 0x40300000 0x0 0x1fd00000>;
 

-- 
2.34.1
Re: [PATCH v5 2/7] dt-bindings: PCI: qcom,pcie-sc7280: Make elbi register as an optional
Posted by Manivannan Sadhasivam 10 months, 2 weeks ago
On Sun, Mar 09, 2025 at 11:15:24AM +0530, Krishna Chaitanya Chundru wrote:
> ELBI regitsers are optional registers and not been using in this
> platform. Having this register as required is not allowing to enable
> ECAM feature of the PCIe cleanly. ECAM feature needs to do single
> remap of entire 256MB which includes DBI and ELBI. Having optional
> ELBI registers in the devicetree and binding is causing resorce
> conflicts when enabling ECAM feature.
> 
> So, make ELBI registers as optional one.
> 
> Suggested-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

Wait... I never suggested to make ELBI optional in the binding. So this tag is
completely wrong.

And the change itself is not correct since ELBI is indeed present in the hw. So
we cannot just drop it from the binding because the driver is not using it
currently.

- Mani

-- 
மணிவண்ணன் சதாசிவம்
Re: [PATCH v5 2/7] dt-bindings: PCI: qcom,pcie-sc7280: Make elbi register as an optional
Posted by Krzysztof Kozlowski 11 months ago
On Sun, Mar 09, 2025 at 11:15:24AM +0530, Krishna Chaitanya Chundru wrote:
> ELBI regitsers are optional registers and not been using in this

What does it mean "optional"? Hardware can miss them or they can be
restricted by firmware? Which board has such issue?

Your commit must explain this.

> platform. Having this register as required is not allowing to enable
> ECAM feature of the PCIe cleanly. ECAM feature needs to do single
> remap of entire 256MB which includes DBI and ELBI. Having optional
> ELBI registers in the devicetree and binding is causing resorce
> conflicts when enabling ECAM feature.

I don't think it is possible that register in binding causes anything.
Linux does not parse the binding doc. You are changing bindings based on
some issues in your drivers.

Fix your drivers.


> 
> So, make ELBI registers as optional one.
> 
> Suggested-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> Signed-off-by: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
> ---
>  Documentation/devicetree/bindings/pci/qcom,pcie-sc7280.yaml | 9 ++++-----
>  1 file changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie-sc7280.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie-sc7280.yaml
> index 76cb9fbfd476..326059a59b61 100644
> --- a/Documentation/devicetree/bindings/pci/qcom,pcie-sc7280.yaml
> +++ b/Documentation/devicetree/bindings/pci/qcom,pcie-sc7280.yaml
> @@ -19,17 +19,17 @@ properties:
>      const: qcom,pcie-sc7280
>  
>    reg:
> -    minItems: 5
> +    minItems: 4
>      maxItems: 6
>  
>    reg-names:
> -    minItems: 5
> +    minItems: 4
>      items:
>        - const: parf # Qualcomm specific registers
>        - const: dbi # DesignWare PCIe registers
> -      - const: elbi # External local bus interface registers
>        - const: atu # ATU address space
>        - const: config # PCIe configuration space
> +      - const: elbi # External local bus interface registers

NAK, ABI break based on issues on drivers. Fix your drivers.

Best regards,
Krzysztof