[PATCH net-next 7/8] dt-bindings: net: mscc,vsc7514-switch: Simplify DSA and switch references

Rob Herring posted 8 patches 1 year ago
[PATCH net-next 7/8] dt-bindings: net: mscc,vsc7514-switch: Simplify DSA and switch references
Posted by Rob Herring 1 year ago
The mscc,vsc7514-switch schema doesn't add any custom port properties,
so it can just reference ethernet-switch.yaml#/$defs/base and
dsa.yaml#/$defs/ethernet-ports instead of the base file and can skip
defining port nodes.

Signed-off-by: Rob Herring <robh@kernel.org>
---
 .../devicetree/bindings/net/mscc,vsc7514-switch.yaml       | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/Documentation/devicetree/bindings/net/mscc,vsc7514-switch.yaml b/Documentation/devicetree/bindings/net/mscc,vsc7514-switch.yaml
index 07de52a3a295..86a9c3fc76c8 100644
--- a/Documentation/devicetree/bindings/net/mscc,vsc7514-switch.yaml
+++ b/Documentation/devicetree/bindings/net/mscc,vsc7514-switch.yaml
@@ -24,7 +24,7 @@ allOf:
         compatible:
           const: mscc,vsc7514-switch
     then:
-      $ref: ethernet-switch.yaml#
+      $ref: ethernet-switch.yaml#/$defs/ethernet-ports
       required:
         - interrupts
         - interrupt-names
@@ -33,28 +33,18 @@ allOf:
           minItems: 21
         reg-names:
           minItems: 21
-        ethernet-ports:
-          patternProperties:
-            "^port@[0-9a-f]+$":
-              $ref: ethernet-switch-port.yaml#
-              unevaluatedProperties: false
 
   - if:
       properties:
         compatible:
           const: mscc,vsc7512-switch
     then:
-      $ref: /schemas/net/dsa/dsa.yaml#
+      $ref: /schemas/net/dsa/dsa.yaml#/$defs/ethernet-ports
       properties:
         reg:
           maxItems: 20
         reg-names:
           maxItems: 20
-        ethernet-ports:
-          patternProperties:
-            "^port@[0-9a-f]+$":
-              $ref: /schemas/net/dsa/dsa-port.yaml#
-              unevaluatedProperties: false
 
 properties:
   compatible:

-- 
2.42.0
Re: [PATCH net-next 7/8] dt-bindings: net: mscc,vsc7514-switch: Simplify DSA and switch references
Posted by Vladimir Oltean 1 year ago
On Mon, Oct 16, 2023 at 04:44:26PM -0500, Rob Herring wrote:
> The mscc,vsc7514-switch schema doesn't add any custom port properties,
> so it can just reference ethernet-switch.yaml#/$defs/base and
> dsa.yaml#/$defs/ethernet-ports instead of the base file and can skip
> defining port nodes.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---

Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Re: [PATCH net-next 7/8] dt-bindings: net: mscc,vsc7514-switch: Simplify DSA and switch references
Posted by Arınç ÜNAL 1 year ago
On 17.10.2023 00:44, Rob Herring wrote:
> The mscc,vsc7514-switch schema doesn't add any custom port properties,
> so it can just reference ethernet-switch.yaml#/$defs/base and

This is ethernet-switch.yaml#/$defs/ethernet-ports now.

> dsa.yaml#/$defs/ethernet-ports instead of the base file and can skip
> defining port nodes.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>

Other than above:

Acked-by: Arınç ÜNAL <arinc.unal@arinc9.com>

Arınç