diff mbox series

[net-next,1/2] dt-bindings: net: dsa: mediatek,mt7530: Add airoha,en7581-switch

Message ID 63f5d56a0d8c81d70f720c9ad2ca3861c7ce85e8.1722325265.git.lorenzo@kernel.org (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series Add support for EN7581 to mt7530 driver | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 7 this patch: 7
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers warning 1 maintainers not CCed: Landen.Chao@mediatek.com
netdev/build_clang success Errors and warnings before: 7 this patch: 7
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 7 this patch: 7
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 21 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest fail net-next-2024-07-30--15-00 (tests: 675)

Commit Message

lorenzo@kernel.org July 30, 2024, 7:46 a.m. UTC
Add documentation for the built-in switch which can be found in the
Airoha EN7581 SoC.

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
 .../devicetree/bindings/net/dsa/mediatek,mt7530.yaml     | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

Comments

Arınç ÜNAL July 30, 2024, 8:57 a.m. UTC | #1
On 30/07/2024 10:46, Lorenzo Bianconi wrote:
> Add documentation for the built-in switch which can be found in the
> Airoha EN7581 SoC.
> 
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> ---
>   .../devicetree/bindings/net/dsa/mediatek,mt7530.yaml     | 9 ++++++++-
>   1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
> index 7e405ad96eb2..aa89bc89eb45 100644
> --- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
> +++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
> @@ -92,6 +92,10 @@ properties:
>             Built-in switch of the MT7988 SoC
>           const: mediatek,mt7988-switch
>   
> +      - description:
> +          Built-in switch of the Airoha EN7581 SoC
> +        const: airoha,en7581-switch
> +
>     reg:
>       maxItems: 1
>   
> @@ -284,7 +288,10 @@ allOf:
>     - if:
>         properties:
>           compatible:
> -          const: mediatek,mt7988-switch
> +          contains:
> +            enum:
> +              - mediatek,mt7988-switch
> +              - airoha,en7581-switch

The compatible string won't be more than one item. So this would be a
better description:

compatible:
   oneOf:
     - const: mediatek,mt7988-switch
     - const: airoha,en7581-switch

Arınç
lorenzo@kernel.org July 30, 2024, 12:42 p.m. UTC | #2
> On 30/07/2024 10:46, Lorenzo Bianconi wrote:
> > Add documentation for the built-in switch which can be found in the
> > Airoha EN7581 SoC.
> > 
> > Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> > ---
> >   .../devicetree/bindings/net/dsa/mediatek,mt7530.yaml     | 9 ++++++++-
> >   1 file changed, 8 insertions(+), 1 deletion(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
> > index 7e405ad96eb2..aa89bc89eb45 100644
> > --- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
> > +++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
> > @@ -92,6 +92,10 @@ properties:
> >             Built-in switch of the MT7988 SoC
> >           const: mediatek,mt7988-switch
> > +      - description:
> > +          Built-in switch of the Airoha EN7581 SoC
> > +        const: airoha,en7581-switch
> > +
> >     reg:
> >       maxItems: 1
> > @@ -284,7 +288,10 @@ allOf:
> >     - if:
> >         properties:
> >           compatible:
> > -          const: mediatek,mt7988-switch
> > +          contains:
> > +            enum:
> > +              - mediatek,mt7988-switch
> > +              - airoha,en7581-switch
> 
> The compatible string won't be more than one item. So this would be a
> better description:
> 
> compatible:
>   oneOf:
>     - const: mediatek,mt7988-switch
>     - const: airoha,en7581-switch
> 
> Arınç

ack, I will fix it in v2.

Regards,
Lorenzo
Rob Herring (Arm) July 30, 2024, 8:03 p.m. UTC | #3
On Tue, Jul 30, 2024 at 11:57:36AM +0300, Arınç ÜNAL wrote:
> On 30/07/2024 10:46, Lorenzo Bianconi wrote:
> > Add documentation for the built-in switch which can be found in the
> > Airoha EN7581 SoC.
> > 
> > Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> > ---
> >   .../devicetree/bindings/net/dsa/mediatek,mt7530.yaml     | 9 ++++++++-
> >   1 file changed, 8 insertions(+), 1 deletion(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
> > index 7e405ad96eb2..aa89bc89eb45 100644
> > --- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
> > +++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
> > @@ -92,6 +92,10 @@ properties:
> >             Built-in switch of the MT7988 SoC
> >           const: mediatek,mt7988-switch
> > +      - description:
> > +          Built-in switch of the Airoha EN7581 SoC
> > +        const: airoha,en7581-switch
> > +
> >     reg:
> >       maxItems: 1
> > @@ -284,7 +288,10 @@ allOf:
> >     - if:
> >         properties:
> >           compatible:
> > -          const: mediatek,mt7988-switch
> > +          contains:
> > +            enum:
> > +              - mediatek,mt7988-switch
> > +              - airoha,en7581-switch
> 
> The compatible string won't be more than one item. So this would be a
> better description:
> 
> compatible:
>   oneOf:
>     - const: mediatek,mt7988-switch
>     - const: airoha,en7581-switch

enum, not oneOf+const
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
index 7e405ad96eb2..aa89bc89eb45 100644
--- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
@@ -92,6 +92,10 @@  properties:
           Built-in switch of the MT7988 SoC
         const: mediatek,mt7988-switch
 
+      - description:
+          Built-in switch of the Airoha EN7581 SoC
+        const: airoha,en7581-switch
+
   reg:
     maxItems: 1
 
@@ -284,7 +288,10 @@  allOf:
   - if:
       properties:
         compatible:
-          const: mediatek,mt7988-switch
+          contains:
+            enum:
+              - mediatek,mt7988-switch
+              - airoha,en7581-switch
     then:
       $ref: "#/$defs/mt7530-dsa-port"
       properties: