diff mbox series

[v3,01/15] dt-bindings: PCI: qcom: Fix sc8180x clocks and interrupts

Message ID 20230530162454.51708-2-vkoul@kernel.org (mailing list archive)
State New, archived
Delegated to: Krzysztof WilczyƄski
Headers show
Series Introduce the SC8180x devices | expand

Commit Message

Vinod Koul May 30, 2023, 4:24 p.m. UTC
Commit 45a3ec891370 ("PCI: qcom: Add sc8180x compatible") added sc8180x
compatible and commit 075a9d55932e ("dt-bindings: PCI: qcom: Convert to
YAML") converted the description to yaml

But there are still some errors specific to sc8180x which this change
attempts to fix. The clocks and resets for sc8180 pcie controller are
different so need to be documented separately

Signed-off-by: Vinod Koul <vkoul@kernel.org>
---
 .../devicetree/bindings/pci/qcom,pcie.yaml    | 29 ++++++++++++++++++-
 1 file changed, 28 insertions(+), 1 deletion(-)

Comments

Krzysztof Kozlowski May 31, 2023, 8:19 a.m. UTC | #1
On 30/05/2023 18:24, Vinod Koul wrote:
> Commit 45a3ec891370 ("PCI: qcom: Add sc8180x compatible") added sc8180x
> compatible and commit 075a9d55932e ("dt-bindings: PCI: qcom: Convert to
> YAML") converted the description to yaml
> 
> But there are still some errors specific to sc8180x which this change
> attempts to fix. The clocks and resets for sc8180 pcie controller are
> different so need to be documented separately

I don't get what's the error here to fix. The clocks you list are
already there as part of oneOf.

> 
> Signed-off-by: Vinod Koul <vkoul@kernel.org>
> ---
>  .../devicetree/bindings/pci/qcom,pcie.yaml    | 29 ++++++++++++++++++-
>  1 file changed, 28 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
> index 81971be4e554..40a1f451a3d3 100644
> --- a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
> +++ b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
> @@ -476,6 +476,33 @@ allOf:
>            items:
>              - const: pci # PCIe core reset
>  
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - qcom,pcie-sc8180x
> +    then:
> +      properties:
> +        clocks:
> +          minItems: 8
> +          maxItems: 8
> +        clock-names:
> +          items:
> +            - const: pipe # PIPE clock
> +            - const: aux # Auxiliary clock
> +            - const: cfg # Configuration clock
> +            - const: bus_master # Master AXI clock
> +            - const: bus_slave # Slave AXI clock
> +            - const: slave_q2a # Slave Q2A clock
> +            - const: ref # REFERENCE clock
> +            - const: tbu # PCIe TBU clock
> +        resets:
> +          maxItems: 1
> +        reset-names:
> +          items:
> +            - const: pci # PCIe core reset
> +
>    - if:
>        properties:
>          compatible:
> @@ -524,7 +551,6 @@ allOf:
>          compatible:
>            contains:
>              enum:
> -              - qcom,pcie-sc8180x
>                - qcom,pcie-sm8150
>                - qcom,pcie-sm8250
>      then:
> @@ -749,6 +775,7 @@ allOf:
>            contains:
>              enum:
>                - qcom,pcie-sa8540p
> +              - qcom,pcie-sc8180x
>                - qcom,pcie-sc8280xp
>      then:
>        required:

Best regards,
Krzysztof
Vinod Koul June 1, 2023, 7:21 a.m. UTC | #2
On 31-05-23, 10:19, Krzysztof Kozlowski wrote:
> On 30/05/2023 18:24, Vinod Koul wrote:
> > Commit 45a3ec891370 ("PCI: qcom: Add sc8180x compatible") added sc8180x
> > compatible and commit 075a9d55932e ("dt-bindings: PCI: qcom: Convert to
> > YAML") converted the description to yaml
> > 
> > But there are still some errors specific to sc8180x which this change
> > attempts to fix. The clocks and resets for sc8180 pcie controller are
> > different so need to be documented separately
> 
> I don't get what's the error here to fix. The clocks you list are
> already there as part of oneOf.

It was listed with sm8150 block which has different set of clocks than
used in sc81880x, so this needs to have its own block of clocks and
resets

> > 
> > Signed-off-by: Vinod Koul <vkoul@kernel.org>
> > ---
> >  .../devicetree/bindings/pci/qcom,pcie.yaml    | 29 ++++++++++++++++++-
> >  1 file changed, 28 insertions(+), 1 deletion(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
> > index 81971be4e554..40a1f451a3d3 100644
> > --- a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
> > +++ b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
> > @@ -476,6 +476,33 @@ allOf:
> >            items:
> >              - const: pci # PCIe core reset
> >  
> > +  - if:
> > +      properties:
> > +        compatible:
> > +          contains:
> > +            enum:
> > +              - qcom,pcie-sc8180x
> > +    then:
> > +      properties:
> > +        clocks:
> > +          minItems: 8
> > +          maxItems: 8
> > +        clock-names:
> > +          items:
> > +            - const: pipe # PIPE clock
> > +            - const: aux # Auxiliary clock
> > +            - const: cfg # Configuration clock
> > +            - const: bus_master # Master AXI clock
> > +            - const: bus_slave # Slave AXI clock
> > +            - const: slave_q2a # Slave Q2A clock
> > +            - const: ref # REFERENCE clock
> > +            - const: tbu # PCIe TBU clock
> > +        resets:
> > +          maxItems: 1
> > +        reset-names:
> > +          items:
> > +            - const: pci # PCIe core reset
> > +
> >    - if:
> >        properties:
> >          compatible:
> > @@ -524,7 +551,6 @@ allOf:
> >          compatible:
> >            contains:
> >              enum:
> > -              - qcom,pcie-sc8180x
> >                - qcom,pcie-sm8150
> >                - qcom,pcie-sm8250
> >      then:
> > @@ -749,6 +775,7 @@ allOf:
> >            contains:
> >              enum:
> >                - qcom,pcie-sa8540p
> > +              - qcom,pcie-sc8180x
> >                - qcom,pcie-sc8280xp
> >      then:
> >        required:
> 
> Best regards,
> Krzysztof
Krzysztof Kozlowski June 1, 2023, 7:25 a.m. UTC | #3
On 01/06/2023 09:21, Vinod Koul wrote:
> On 31-05-23, 10:19, Krzysztof Kozlowski wrote:
>> On 30/05/2023 18:24, Vinod Koul wrote:
>>> Commit 45a3ec891370 ("PCI: qcom: Add sc8180x compatible") added sc8180x
>>> compatible and commit 075a9d55932e ("dt-bindings: PCI: qcom: Convert to
>>> YAML") converted the description to yaml
>>>
>>> But there are still some errors specific to sc8180x which this change
>>> attempts to fix. The clocks and resets for sc8180 pcie controller are
>>> different so need to be documented separately
>>
>> I don't get what's the error here to fix. The clocks you list are
>> already there as part of oneOf.
> 
> It was listed with sm8150 block which has different set of clocks than
> used in sc81880x, so this needs to have its own block of clocks and
> resets


Ah, after careful check I see indeed difference in one clock.

Best regards,
Krzysztof
Krzysztof Kozlowski June 1, 2023, 7:26 a.m. UTC | #4
On 30/05/2023 18:24, Vinod Koul wrote:
> Commit 45a3ec891370 ("PCI: qcom: Add sc8180x compatible") added sc8180x
> compatible and commit 075a9d55932e ("dt-bindings: PCI: qcom: Convert to
> YAML") converted the description to yaml
> 
> But there are still some errors specific to sc8180x which this change
> attempts to fix. The clocks and resets for sc8180 pcie controller are
> different so need to be documented separately
> 

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
index 81971be4e554..40a1f451a3d3 100644
--- a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
+++ b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
@@ -476,6 +476,33 @@  allOf:
           items:
             - const: pci # PCIe core reset
 
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - qcom,pcie-sc8180x
+    then:
+      properties:
+        clocks:
+          minItems: 8
+          maxItems: 8
+        clock-names:
+          items:
+            - const: pipe # PIPE clock
+            - const: aux # Auxiliary clock
+            - const: cfg # Configuration clock
+            - const: bus_master # Master AXI clock
+            - const: bus_slave # Slave AXI clock
+            - const: slave_q2a # Slave Q2A clock
+            - const: ref # REFERENCE clock
+            - const: tbu # PCIe TBU clock
+        resets:
+          maxItems: 1
+        reset-names:
+          items:
+            - const: pci # PCIe core reset
+
   - if:
       properties:
         compatible:
@@ -524,7 +551,6 @@  allOf:
         compatible:
           contains:
             enum:
-              - qcom,pcie-sc8180x
               - qcom,pcie-sm8150
               - qcom,pcie-sm8250
     then:
@@ -749,6 +775,7 @@  allOf:
           contains:
             enum:
               - qcom,pcie-sa8540p
+              - qcom,pcie-sc8180x
               - qcom,pcie-sc8280xp
     then:
       required: