diff mbox series

[v2,1/4] dt-bindings: PCI: mediatek-gen3: add support for Airoha EN7581

Message ID c11a40dbe3e1d1e4847ceee8715c1f670fd1887b.1719475568.git.lorenzo@kernel.org (mailing list archive)
State Superseded
Delegated to: Krzysztof WilczyƄski
Headers show
Series Add Airoha EN7581 PCIe support | expand

Commit Message

Lorenzo Bianconi June 27, 2024, 8:12 a.m. UTC
Introduce Airoha EN7581 entry in mediatek-gen3 PCIe controller binding

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
 .../bindings/pci/mediatek-pcie-gen3.yaml      | 68 +++++++++++++++++--
 1 file changed, 63 insertions(+), 5 deletions(-)

Comments

Conor Dooley June 27, 2024, 3:22 p.m. UTC | #1
On Thu, Jun 27, 2024 at 10:12:11AM +0200, Lorenzo Bianconi wrote:
> Introduce Airoha EN7581 entry in mediatek-gen3 PCIe controller binding
> 
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> ---
>  .../bindings/pci/mediatek-pcie-gen3.yaml      | 68 +++++++++++++++++--
>  1 file changed, 63 insertions(+), 5 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml
> index 76d742051f73..59112adc9ba1 100644
> --- a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml
> +++ b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml
> @@ -53,6 +53,7 @@ properties:
>                - mediatek,mt8195-pcie
>            - const: mediatek,mt8192-pcie
>        - const: mediatek,mt8192-pcie
> +      - const: airoha,en7581-pcie
>  
>    reg:
>      maxItems: 1
> @@ -76,20 +77,20 @@ properties:
>  
>    resets:
>      minItems: 1
> -    maxItems: 2
> +    maxItems: 3
>  
>    reset-names:
>      minItems: 1
> -    maxItems: 2
> +    maxItems: 3
>      items:
> -      enum: [ phy, mac ]
> +      enum: [ phy, mac, phy-lane0, phy-lane1, phy-lane2 ]
>  
>    clocks:
> -    minItems: 4
> +    minItems: 1
>      maxItems: 6
>  
>    clock-names:
> -    minItems: 4
> +    minItems: 1
>      maxItems: 6
>  
>    assigned-clocks:
> @@ -147,6 +148,9 @@ allOf:
>            const: mediatek,mt8192-pcie
>      then:
>        properties:
> +        clocks:
> +          maxItems: 6
> +
>          clock-names:
>            items:
>              - const: pl_250m
> @@ -155,6 +159,15 @@ allOf:
>              - const: tl_32k
>              - const: peri_26m
>              - const: top_133m
> +
> +        resets:
> +          minItems: 1
> +          maxItems: 2
> +
> +        reset-names:
> +          minItems: 1
> +          maxItems: 2
> +
>    - if:
>        properties:
>          compatible:
> @@ -164,6 +177,9 @@ allOf:
>                - mediatek,mt8195-pcie
>      then:
>        properties:
> +        clocks:
> +          maxItems: 6

How come this is maxItems and not minItems? The max is always 6, before
and after your patch.

Cheers,
Conor.
Lorenzo Bianconi June 29, 2024, 11:16 a.m. UTC | #2
> On Thu, Jun 27, 2024 at 10:12:11AM +0200, Lorenzo Bianconi wrote:
> > Introduce Airoha EN7581 entry in mediatek-gen3 PCIe controller binding
> > 
> > Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> > ---
> >  .../bindings/pci/mediatek-pcie-gen3.yaml      | 68 +++++++++++++++++--
> >  1 file changed, 63 insertions(+), 5 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml
> > index 76d742051f73..59112adc9ba1 100644
> > --- a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml
> > +++ b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml
> > @@ -53,6 +53,7 @@ properties:
> >                - mediatek,mt8195-pcie
> >            - const: mediatek,mt8192-pcie
> >        - const: mediatek,mt8192-pcie
> > +      - const: airoha,en7581-pcie
> >  
> >    reg:
> >      maxItems: 1
> > @@ -76,20 +77,20 @@ properties:
> >  
> >    resets:
> >      minItems: 1
> > -    maxItems: 2
> > +    maxItems: 3
> >  
> >    reset-names:
> >      minItems: 1
> > -    maxItems: 2
> > +    maxItems: 3
> >      items:
> > -      enum: [ phy, mac ]
> > +      enum: [ phy, mac, phy-lane0, phy-lane1, phy-lane2 ]
> >  
> >    clocks:
> > -    minItems: 4
> > +    minItems: 1
> >      maxItems: 6
> >  
> >    clock-names:
> > -    minItems: 4
> > +    minItems: 1
> >      maxItems: 6
> >  
> >    assigned-clocks:
> > @@ -147,6 +148,9 @@ allOf:
> >            const: mediatek,mt8192-pcie
> >      then:
> >        properties:
> > +        clocks:
> > +          maxItems: 6
> > +
> >          clock-names:
> >            items:
> >              - const: pl_250m
> > @@ -155,6 +159,15 @@ allOf:
> >              - const: tl_32k
> >              - const: peri_26m
> >              - const: top_133m
> > +
> > +        resets:
> > +          minItems: 1
> > +          maxItems: 2
> > +
> > +        reset-names:
> > +          minItems: 1
> > +          maxItems: 2
> > +
> >    - if:
> >        properties:
> >          compatible:
> > @@ -164,6 +177,9 @@ allOf:
> >                - mediatek,mt8195-pcie
> >      then:
> >        properties:
> > +        clocks:
> > +          maxItems: 6
> 
> How come this is maxItems and not minItems? The max is always 6, before
> and after your patch.

ack, I will fix in v3

Regards,
Lorenzo

> 
> Cheers,
> Conor.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml
index 76d742051f73..59112adc9ba1 100644
--- a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml
+++ b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml
@@ -53,6 +53,7 @@  properties:
               - mediatek,mt8195-pcie
           - const: mediatek,mt8192-pcie
       - const: mediatek,mt8192-pcie
+      - const: airoha,en7581-pcie
 
   reg:
     maxItems: 1
@@ -76,20 +77,20 @@  properties:
 
   resets:
     minItems: 1
-    maxItems: 2
+    maxItems: 3
 
   reset-names:
     minItems: 1
-    maxItems: 2
+    maxItems: 3
     items:
-      enum: [ phy, mac ]
+      enum: [ phy, mac, phy-lane0, phy-lane1, phy-lane2 ]
 
   clocks:
-    minItems: 4
+    minItems: 1
     maxItems: 6
 
   clock-names:
-    minItems: 4
+    minItems: 1
     maxItems: 6
 
   assigned-clocks:
@@ -147,6 +148,9 @@  allOf:
           const: mediatek,mt8192-pcie
     then:
       properties:
+        clocks:
+          maxItems: 6
+
         clock-names:
           items:
             - const: pl_250m
@@ -155,6 +159,15 @@  allOf:
             - const: tl_32k
             - const: peri_26m
             - const: top_133m
+
+        resets:
+          minItems: 1
+          maxItems: 2
+
+        reset-names:
+          minItems: 1
+          maxItems: 2
+
   - if:
       properties:
         compatible:
@@ -164,6 +177,9 @@  allOf:
               - mediatek,mt8195-pcie
     then:
       properties:
+        clocks:
+          maxItems: 6
+
         clock-names:
           items:
             - const: pl_250m
@@ -172,6 +188,15 @@  allOf:
             - const: tl_32k
             - const: peri_26m
             - const: peri_mem
+
+        resets:
+          minItems: 1
+          maxItems: 2
+
+        reset-names:
+          minItems: 1
+          maxItems: 2
+
   - if:
       properties:
         compatible:
@@ -180,6 +205,9 @@  allOf:
               - mediatek,mt7986-pcie
     then:
       properties:
+        clocks:
+          maxItems: 4
+
         clock-names:
           items:
             - const: pl_250m
@@ -187,6 +215,36 @@  allOf:
             - const: peri_26m
             - const: top_133m
 
+        resets:
+          minItems: 1
+          maxItems: 2
+
+        reset-names:
+          minItems: 1
+          maxItems: 2
+
+  - if:
+      properties:
+        compatible:
+          const: airoha,en7581-pcie
+    then:
+      properties:
+        clocks:
+          maxItems: 1
+
+        clock-names:
+          items:
+            - const: sys-ck
+
+        resets:
+          maxItems: 3
+
+        reset-names:
+          items:
+            - const: phy-lane0
+            - const: phy-lane1
+            - const: phy-lane2
+
 unevaluatedProperties: false
 
 examples: