diff mbox series

[v3,net-next,03/10] dt-bindings: net: dsa: utilize base definitions for standard dsa switches

Message ID 20221127224734.885526-4-colin.foster@in-advantage.com (mailing list archive)
State New, archived
Headers show
Series dt-binding preparation for ocelot switches | expand

Commit Message

Colin Foster Nov. 27, 2022, 10:47 p.m. UTC
DSA switches can fall into one of two categories: switches where all ports
follow standard '(ethernet-)?port' properties, and switches that have
additional properties for the ports.

The scenario where DSA ports are all standardized can be handled by
swtiches with a reference to 'dsa.yaml#'.

The scenario where DSA ports require additional properties can reference
the new '$dsa.yaml#/$defs/base'. This will allow switches to reference
these base defitions of the DSA switch, but add additional properties under
the port nodes.

Suggested-by: Rob Herring <robh@kernel.org>
Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
---

v3
  * New patch

---
 .../bindings/net/dsa/arrow,xrs700x.yaml       |  2 +-
 .../devicetree/bindings/net/dsa/brcm,b53.yaml |  2 +-
 .../devicetree/bindings/net/dsa/dsa.yaml      | 19 ++++++++++++++++---
 .../net/dsa/hirschmann,hellcreek.yaml         |  2 +-
 .../bindings/net/dsa/mediatek,mt7530.yaml     |  2 +-
 .../bindings/net/dsa/microchip,ksz.yaml       |  2 +-
 .../bindings/net/dsa/microchip,lan937x.yaml   |  2 +-
 .../bindings/net/dsa/mscc,ocelot.yaml         |  2 +-
 .../bindings/net/dsa/nxp,sja1105.yaml         |  2 +-
 .../devicetree/bindings/net/dsa/realtek.yaml  |  2 +-
 .../bindings/net/dsa/renesas,rzn1-a5psw.yaml  |  2 +-
 11 files changed, 26 insertions(+), 13 deletions(-)

Comments

Alvin Šipraga Nov. 28, 2022, 9:32 a.m. UTC | #1
On Sun, Nov 27, 2022 at 02:47:27PM -0800, Colin Foster wrote:
> DSA switches can fall into one of two categories: switches where all ports
> follow standard '(ethernet-)?port' properties, and switches that have
> additional properties for the ports.
> 
> The scenario where DSA ports are all standardized can be handled by
> swtiches with a reference to 'dsa.yaml#'.
> 
> The scenario where DSA ports require additional properties can reference
> the new '$dsa.yaml#/$defs/base'. This will allow switches to reference
> these base defitions of the DSA switch, but add additional properties under
> the port nodes.
> 
> Suggested-by: Rob Herring <robh@kernel.org>
> Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
> ---
> 
> v3
>   * New patch
> 
> ---
>  .../bindings/net/dsa/arrow,xrs700x.yaml       |  2 +-
>  .../devicetree/bindings/net/dsa/brcm,b53.yaml |  2 +-
>  .../devicetree/bindings/net/dsa/dsa.yaml      | 19 ++++++++++++++++---
>  .../net/dsa/hirschmann,hellcreek.yaml         |  2 +-
>  .../bindings/net/dsa/mediatek,mt7530.yaml     |  2 +-
>  .../bindings/net/dsa/microchip,ksz.yaml       |  2 +-
>  .../bindings/net/dsa/microchip,lan937x.yaml   |  2 +-
>  .../bindings/net/dsa/mscc,ocelot.yaml         |  2 +-
>  .../bindings/net/dsa/nxp,sja1105.yaml         |  2 +-
>  .../devicetree/bindings/net/dsa/realtek.yaml  |  2 +-
>  .../bindings/net/dsa/renesas,rzn1-a5psw.yaml  |  2 +-
>  11 files changed, 26 insertions(+), 13 deletions(-)

Acked-by: Alvin Šipraga <alsi@bang-olufsen.dk> # realtek
Linus Walleij Nov. 28, 2022, 8:21 p.m. UTC | #2
On Sun, Nov 27, 2022 at 11:47 PM Colin Foster
<colin.foster@in-advantage.com> wrote:

> DSA switches can fall into one of two categories: switches where all ports
> follow standard '(ethernet-)?port' properties, and switches that have
> additional properties for the ports.
>
> The scenario where DSA ports are all standardized can be handled by
> swtiches with a reference to 'dsa.yaml#'.
>
> The scenario where DSA ports require additional properties can reference
> the new '$dsa.yaml#/$defs/base'. This will allow switches to reference
> these base defitions of the DSA switch, but add additional properties under
> the port nodes.
>
> Suggested-by: Rob Herring <robh@kernel.org>
> Signed-off-by: Colin Foster <colin.foster@in-advantage.com>

This is neat.
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij
Florian Fainelli Nov. 28, 2022, 8:41 p.m. UTC | #3
On 11/27/22 14:47, Colin Foster wrote:
> DSA switches can fall into one of two categories: switches where all ports
> follow standard '(ethernet-)?port' properties, and switches that have
> additional properties for the ports.
> 
> The scenario where DSA ports are all standardized can be handled by
> swtiches with a reference to 'dsa.yaml#'.
> 
> The scenario where DSA ports require additional properties can reference
> the new '$dsa.yaml#/$defs/base'. This will allow switches to reference
> these base defitions of the DSA switch, but add additional properties under
> the port nodes.
> 
> Suggested-by: Rob Herring <robh@kernel.org>
> Signed-off-by: Colin Foster <colin.foster@in-advantage.com>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Rob Herring (Arm) Nov. 28, 2022, 11:23 p.m. UTC | #4
On Sun, Nov 27, 2022 at 02:47:27PM -0800, Colin Foster wrote:
> DSA switches can fall into one of two categories: switches where all ports
> follow standard '(ethernet-)?port' properties, and switches that have
> additional properties for the ports.
> 
> The scenario where DSA ports are all standardized can be handled by
> swtiches with a reference to 'dsa.yaml#'.
> 
> The scenario where DSA ports require additional properties can reference
> the new '$dsa.yaml#/$defs/base'. This will allow switches to reference
> these base defitions of the DSA switch, but add additional properties under
> the port nodes.

You have this backwards. '$dsa.yaml#/$defs/base' can't be extended. 
Perhaps '$defs/ethernet-ports' would be a better name.

> 
> Suggested-by: Rob Herring <robh@kernel.org>
> Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
> ---
> 
> v3
>   * New patch
> 
> ---
>  .../bindings/net/dsa/arrow,xrs700x.yaml       |  2 +-
>  .../devicetree/bindings/net/dsa/brcm,b53.yaml |  2 +-
>  .../devicetree/bindings/net/dsa/dsa.yaml      | 19 ++++++++++++++++---
>  .../net/dsa/hirschmann,hellcreek.yaml         |  2 +-
>  .../bindings/net/dsa/mediatek,mt7530.yaml     |  2 +-
>  .../bindings/net/dsa/microchip,ksz.yaml       |  2 +-
>  .../bindings/net/dsa/microchip,lan937x.yaml   |  2 +-
>  .../bindings/net/dsa/mscc,ocelot.yaml         |  2 +-
>  .../bindings/net/dsa/nxp,sja1105.yaml         |  2 +-
>  .../devicetree/bindings/net/dsa/realtek.yaml  |  2 +-
>  .../bindings/net/dsa/renesas,rzn1-a5psw.yaml  |  2 +-
>  11 files changed, 26 insertions(+), 13 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/net/dsa/arrow,xrs700x.yaml b/Documentation/devicetree/bindings/net/dsa/arrow,xrs700x.yaml
> index 259a0c6547f3..8d5abb05abdf 100644
> --- a/Documentation/devicetree/bindings/net/dsa/arrow,xrs700x.yaml
> +++ b/Documentation/devicetree/bindings/net/dsa/arrow,xrs700x.yaml
> @@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
>  title: Arrow SpeedChips XRS7000 Series Switch Device Tree Bindings
>  
>  allOf:
> -  - $ref: dsa.yaml#
> +  - $ref: dsa.yaml#/$defs/base
>  
>  maintainers:
>    - George McCollister <george.mccollister@gmail.com>
> diff --git a/Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml b/Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml
> index 1219b830b1a4..f323fc01b224 100644
> --- a/Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml
> +++ b/Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml
> @@ -66,7 +66,7 @@ required:
>    - reg
>  
>  allOf:
> -  - $ref: dsa.yaml#
> +  - $ref: dsa.yaml#/$defs/base
>    - if:
>        properties:
>          compatible:
> diff --git a/Documentation/devicetree/bindings/net/dsa/dsa.yaml b/Documentation/devicetree/bindings/net/dsa/dsa.yaml
> index b9d48e357e77..bd1f0f7c14a8 100644
> --- a/Documentation/devicetree/bindings/net/dsa/dsa.yaml
> +++ b/Documentation/devicetree/bindings/net/dsa/dsa.yaml
> @@ -19,9 +19,6 @@ description:
>  select: false
>  
>  properties:
> -  $nodename:
> -    pattern: "^(ethernet-)?switch(@.*)?$"
> -
>    dsa,member:
>      minItems: 2
>      maxItems: 2
> @@ -58,4 +55,20 @@ oneOf:
>  
>  additionalProperties: true
>  
> +$defs:
> +  base:
> +    description: A DSA switch without any extra port properties
> +    $ref: '#/'
> +
> +    patternProperties:
> +      "^(ethernet-)?ports$":

This node at the top level needs 'additionalProperties: false' assuming 
we don't allow extra properties in 'ports' nodes. If we do, then we'll 
need to be able to reference the 'ports' schema to extend it like is 
done with dsa-ports.yaml.

> +        type: object
> +
> +        patternProperties:
> +          "^(ethernet-)?ports@[0-9]+$":
> +            description: Ethernet switch ports
> +            $ref: dsa-port.yaml#
> +            unevaluatedProperties: false
> +
> +

One blank line.

>  ...
Colin Foster Nov. 29, 2022, 3:58 a.m. UTC | #5
On Tue, Nov 29, 2022 at 01:34:52AM -0800, Colin Foster wrote:
> Hi Rob,
> 
> On Mon, Nov 28, 2022 at 05:23:37PM -0600, Rob Herring wrote:
> > On Sun, Nov 27, 2022 at 02:47:27PM -0800, Colin Foster wrote:
> > > diff --git a/Documentation/devicetree/bindings/net/dsa/dsa.yaml b/Documentation/devicetree/bindings/net/dsa/dsa.yaml
> > > index b9d48e357e77..bd1f0f7c14a8 100644
> > > --- a/Documentation/devicetree/bindings/net/dsa/dsa.yaml
> > > +++ b/Documentation/devicetree/bindings/net/dsa/dsa.yaml
> > > @@ -19,9 +19,6 @@ description:
> > >  select: false
> > >  
> > >  properties:
> > > -  $nodename:
> > > -    pattern: "^(ethernet-)?switch(@.*)?$"
> > > -
> > >    dsa,member:
> > >      minItems: 2
> > >      maxItems: 2
> > > @@ -58,4 +55,20 @@ oneOf:
> > >  
> > >  additionalProperties: true
> > >  
> > > +$defs:
> > > +  base:
> > > +    description: A DSA switch without any extra port properties
> > > +    $ref: '#/'
> > > +
> > > +    patternProperties:
> > > +      "^(ethernet-)?ports$":
> > 
> > This node at the top level needs 'additionalProperties: false' assuming 
> > we don't allow extra properties in 'ports' nodes. If we do, then we'll 
> > need to be able to reference the 'ports' schema to extend it like is 
> > done with dsa-ports.yaml.
> 
> I'll double check if there's anything that adds any properties. If there
> is, would that be a separate file pair: "dsa-ports.yaml" and
> "ethernet-switch-ports.yaml"? Or do you think that could be contained in
> the existing dsa.yaml, ethernet-switch.yaml?

I came up with this change. It also fixes my accidental 's' affix to
^(ethernet-)port@[0-9]+.

diff --git a/Documentation/devicetree/bindings/net/dsa/dsa.yaml b/Documentation/devicetree/bindings/net/dsa/dsa.yaml
index 616753ba85a2..c1900363a6ab 100644
--- a/Documentation/devicetree/bindings/net/dsa/dsa.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/dsa.yaml
@@ -41,12 +41,18 @@ $defs:
     patternProperties:
       "^(ethernet-)?ports$":
         type: object
+        additionalProperties: false
+
+        properties:
+          '#address-cells':
+            const: 1
+          '#size-cells':
+            const: 0

         patternProperties:
-          "^(ethernet-)?ports@[0-9]+$":
+          "^(ethernet-)?port@[0-9]+$":
             description: Ethernet switch ports
             $ref: dsa-port.yaml#
             unevaluatedProperties: false

-
 ...
Colin Foster Nov. 29, 2022, 9:20 a.m. UTC | #6
On Mon, Nov 28, 2022 at 09:21:26PM +0100, Linus Walleij wrote:
> On Sun, Nov 27, 2022 at 11:47 PM Colin Foster
> <colin.foster@in-advantage.com> wrote:
> 
> > DSA switches can fall into one of two categories: switches where all ports
> > follow standard '(ethernet-)?port' properties, and switches that have
> > additional properties for the ports.
> >
> > The scenario where DSA ports are all standardized can be handled by
> > swtiches with a reference to 'dsa.yaml#'.
> >
> > The scenario where DSA ports require additional properties can reference
> > the new '$dsa.yaml#/$defs/base'. This will allow switches to reference
> > these base defitions of the DSA switch, but add additional properties under
> > the port nodes.
> >
> > Suggested-by: Rob Herring <robh@kernel.org>
> > Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
> 
> This is neat.
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Thanks. All credit goes to Rob (except the bugs - those are mine)

> 
> Yours,
> Linus Walleij
Colin Foster Nov. 29, 2022, 9:34 a.m. UTC | #7
Hi Rob,

On Mon, Nov 28, 2022 at 05:23:37PM -0600, Rob Herring wrote:
> On Sun, Nov 27, 2022 at 02:47:27PM -0800, Colin Foster wrote:
> > DSA switches can fall into one of two categories: switches where all ports
> > follow standard '(ethernet-)?port' properties, and switches that have
> > additional properties for the ports.
> > 
> > The scenario where DSA ports are all standardized can be handled by
> > swtiches with a reference to 'dsa.yaml#'.
> > 
> > The scenario where DSA ports require additional properties can reference
> > the new '$dsa.yaml#/$defs/base'. This will allow switches to reference
> > these base defitions of the DSA switch, but add additional properties under
> > the port nodes.
> 
> You have this backwards. '$dsa.yaml#/$defs/base' can't be extended. 
> Perhaps '$defs/ethernet-ports' would be a better name.

Oops. I'll fix this up for next set.

> 
> > 
> > Suggested-by: Rob Herring <robh@kernel.org>
> > Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
> > ---
> > 
> > v3
> >   * New patch
> > 
> > ---
> >  .../bindings/net/dsa/arrow,xrs700x.yaml       |  2 +-
> >  .../devicetree/bindings/net/dsa/brcm,b53.yaml |  2 +-
> >  .../devicetree/bindings/net/dsa/dsa.yaml      | 19 ++++++++++++++++---
> >  .../net/dsa/hirschmann,hellcreek.yaml         |  2 +-
> >  .../bindings/net/dsa/mediatek,mt7530.yaml     |  2 +-
> >  .../bindings/net/dsa/microchip,ksz.yaml       |  2 +-
> >  .../bindings/net/dsa/microchip,lan937x.yaml   |  2 +-
> >  .../bindings/net/dsa/mscc,ocelot.yaml         |  2 +-
> >  .../bindings/net/dsa/nxp,sja1105.yaml         |  2 +-
> >  .../devicetree/bindings/net/dsa/realtek.yaml  |  2 +-
> >  .../bindings/net/dsa/renesas,rzn1-a5psw.yaml  |  2 +-
> >  11 files changed, 26 insertions(+), 13 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/net/dsa/arrow,xrs700x.yaml b/Documentation/devicetree/bindings/net/dsa/arrow,xrs700x.yaml
> > index 259a0c6547f3..8d5abb05abdf 100644
> > --- a/Documentation/devicetree/bindings/net/dsa/arrow,xrs700x.yaml
> > +++ b/Documentation/devicetree/bindings/net/dsa/arrow,xrs700x.yaml
> > @@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
> >  title: Arrow SpeedChips XRS7000 Series Switch Device Tree Bindings
> >  
> >  allOf:
> > -  - $ref: dsa.yaml#
> > +  - $ref: dsa.yaml#/$defs/base
> >  
> >  maintainers:
> >    - George McCollister <george.mccollister@gmail.com>
> > diff --git a/Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml b/Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml
> > index 1219b830b1a4..f323fc01b224 100644
> > --- a/Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml
> > +++ b/Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml
> > @@ -66,7 +66,7 @@ required:
> >    - reg
> >  
> >  allOf:
> > -  - $ref: dsa.yaml#
> > +  - $ref: dsa.yaml#/$defs/base
> >    - if:
> >        properties:
> >          compatible:
> > diff --git a/Documentation/devicetree/bindings/net/dsa/dsa.yaml b/Documentation/devicetree/bindings/net/dsa/dsa.yaml
> > index b9d48e357e77..bd1f0f7c14a8 100644
> > --- a/Documentation/devicetree/bindings/net/dsa/dsa.yaml
> > +++ b/Documentation/devicetree/bindings/net/dsa/dsa.yaml
> > @@ -19,9 +19,6 @@ description:
> >  select: false
> >  
> >  properties:
> > -  $nodename:
> > -    pattern: "^(ethernet-)?switch(@.*)?$"
> > -
> >    dsa,member:
> >      minItems: 2
> >      maxItems: 2
> > @@ -58,4 +55,20 @@ oneOf:
> >  
> >  additionalProperties: true
> >  
> > +$defs:
> > +  base:
> > +    description: A DSA switch without any extra port properties
> > +    $ref: '#/'
> > +
> > +    patternProperties:
> > +      "^(ethernet-)?ports$":
> 
> This node at the top level needs 'additionalProperties: false' assuming 
> we don't allow extra properties in 'ports' nodes. If we do, then we'll 
> need to be able to reference the 'ports' schema to extend it like is 
> done with dsa-ports.yaml.

I'll double check if there's anything that adds any properties. If there
is, would that be a separate file pair: "dsa-ports.yaml" and
"ethernet-switch-ports.yaml"? Or do you think that could be contained in
the existing dsa.yaml, ethernet-switch.yaml?

> 
> > +        type: object
> > +
> > +        patternProperties:
> > +          "^(ethernet-)?ports@[0-9]+$":
> > +            description: Ethernet switch ports
> > +            $ref: dsa-port.yaml#
> > +            unevaluatedProperties: false
> > +
> > +
> 
> One blank line.

Oops again. Thanks for spotting this and for all your help on this!

> 
> >  ...
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/net/dsa/arrow,xrs700x.yaml b/Documentation/devicetree/bindings/net/dsa/arrow,xrs700x.yaml
index 259a0c6547f3..8d5abb05abdf 100644
--- a/Documentation/devicetree/bindings/net/dsa/arrow,xrs700x.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/arrow,xrs700x.yaml
@@ -7,7 +7,7 @@  $schema: http://devicetree.org/meta-schemas/core.yaml#
 title: Arrow SpeedChips XRS7000 Series Switch Device Tree Bindings
 
 allOf:
-  - $ref: dsa.yaml#
+  - $ref: dsa.yaml#/$defs/base
 
 maintainers:
   - George McCollister <george.mccollister@gmail.com>
diff --git a/Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml b/Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml
index 1219b830b1a4..f323fc01b224 100644
--- a/Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml
@@ -66,7 +66,7 @@  required:
   - reg
 
 allOf:
-  - $ref: dsa.yaml#
+  - $ref: dsa.yaml#/$defs/base
   - if:
       properties:
         compatible:
diff --git a/Documentation/devicetree/bindings/net/dsa/dsa.yaml b/Documentation/devicetree/bindings/net/dsa/dsa.yaml
index b9d48e357e77..bd1f0f7c14a8 100644
--- a/Documentation/devicetree/bindings/net/dsa/dsa.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/dsa.yaml
@@ -19,9 +19,6 @@  description:
 select: false
 
 properties:
-  $nodename:
-    pattern: "^(ethernet-)?switch(@.*)?$"
-
   dsa,member:
     minItems: 2
     maxItems: 2
@@ -58,4 +55,20 @@  oneOf:
 
 additionalProperties: true
 
+$defs:
+  base:
+    description: A DSA switch without any extra port properties
+    $ref: '#/'
+
+    patternProperties:
+      "^(ethernet-)?ports$":
+        type: object
+
+        patternProperties:
+          "^(ethernet-)?ports@[0-9]+$":
+            description: Ethernet switch ports
+            $ref: dsa-port.yaml#
+            unevaluatedProperties: false
+
+
 ...
diff --git a/Documentation/devicetree/bindings/net/dsa/hirschmann,hellcreek.yaml b/Documentation/devicetree/bindings/net/dsa/hirschmann,hellcreek.yaml
index 73b774eadd0b..e27b1619066f 100644
--- a/Documentation/devicetree/bindings/net/dsa/hirschmann,hellcreek.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/hirschmann,hellcreek.yaml
@@ -7,7 +7,7 @@  $schema: http://devicetree.org/meta-schemas/core.yaml#
 title: Hirschmann Hellcreek TSN Switch Device Tree Bindings
 
 allOf:
-  - $ref: dsa.yaml#
+  - $ref: dsa.yaml#/$defs/base
 
 maintainers:
   - Andrew Lunn <andrew@lunn.ch>
diff --git a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
index f2e9ff3f580b..7df4ea1901ce 100644
--- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
@@ -238,7 +238,7 @@  $defs:
                       - sgmii
 
 allOf:
-  - $ref: dsa.yaml#
+  - $ref: dsa.yaml#/$defs/base
   - if:
       required:
         - mediatek,mcm
diff --git a/Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml b/Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml
index 4da75b1f9533..bfa2b76659c9 100644
--- a/Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml
@@ -11,7 +11,7 @@  maintainers:
   - Woojung Huh <Woojung.Huh@microchip.com>
 
 allOf:
-  - $ref: dsa.yaml#
+  - $ref: dsa.yaml#/$defs/base
   - $ref: /schemas/spi/spi-peripheral-props.yaml#
 
 properties:
diff --git a/Documentation/devicetree/bindings/net/dsa/microchip,lan937x.yaml b/Documentation/devicetree/bindings/net/dsa/microchip,lan937x.yaml
index 630bf0f8294b..f4f9798addae 100644
--- a/Documentation/devicetree/bindings/net/dsa/microchip,lan937x.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/microchip,lan937x.yaml
@@ -10,7 +10,7 @@  maintainers:
   - UNGLinuxDriver@microchip.com
 
 allOf:
-  - $ref: dsa.yaml#
+  - $ref: dsa.yaml#/$defs/base
 
 properties:
   compatible:
diff --git a/Documentation/devicetree/bindings/net/dsa/mscc,ocelot.yaml b/Documentation/devicetree/bindings/net/dsa/mscc,ocelot.yaml
index 8d93ed9c172c..a7041ae4d811 100644
--- a/Documentation/devicetree/bindings/net/dsa/mscc,ocelot.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/mscc,ocelot.yaml
@@ -78,7 +78,7 @@  required:
   - reg
 
 allOf:
-  - $ref: dsa.yaml#
+  - $ref: dsa.yaml#/$defs/base
   - if:
       properties:
         compatible:
diff --git a/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml b/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml
index 1e26d876d146..13a835af9468 100644
--- a/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml
@@ -13,7 +13,7 @@  description:
   depends on the SPI bus master driver.
 
 allOf:
-  - $ref: "dsa.yaml#"
+  - $ref: dsa.yaml#/$defs/base
   - $ref: /schemas/spi/spi-peripheral-props.yaml#
 
 maintainers:
diff --git a/Documentation/devicetree/bindings/net/dsa/realtek.yaml b/Documentation/devicetree/bindings/net/dsa/realtek.yaml
index 1a7d45a8ad66..ad1793eba31a 100644
--- a/Documentation/devicetree/bindings/net/dsa/realtek.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/realtek.yaml
@@ -7,7 +7,7 @@  $schema: http://devicetree.org/meta-schemas/core.yaml#
 title: Realtek switches for unmanaged switches
 
 allOf:
-  - $ref: dsa.yaml#
+  - $ref: dsa.yaml#/$defs/base
 
 maintainers:
   - Linus Walleij <linus.walleij@linaro.org>
diff --git a/Documentation/devicetree/bindings/net/dsa/renesas,rzn1-a5psw.yaml b/Documentation/devicetree/bindings/net/dsa/renesas,rzn1-a5psw.yaml
index 0a0d62b6c00e..9621f751a9dd 100644
--- a/Documentation/devicetree/bindings/net/dsa/renesas,rzn1-a5psw.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/renesas,rzn1-a5psw.yaml
@@ -14,7 +14,7 @@  description: |
   handles 4 ports + 1 CPU management port.
 
 allOf:
-  - $ref: dsa.yaml#
+  - $ref: dsa.yaml#/$defs/base
 
 properties:
   compatible: