diff mbox series

[net-next,v4,1/7] dt-bindings: net: dsa: Require ports or ethernet-ports

Message ID 20231018-marvell-88e6152-wan-led-v4-1-3ee0c67383be@linaro.org
State Accepted
Commit b5ef61718ad7c003687c759095fc4ae1419bf602
Headers show
Series Create a binding for the Marvell MV88E6xxx DSA switches | expand

Commit Message

Linus Walleij Oct. 18, 2023, 9:03 a.m. UTC
Bindings using dsa.yaml#/$defs/ethernet-ports specify that
a DSA switch node need to have a ports or ethernet-ports
subnode, and that is actually required, so add requirements
using oneOf.

Suggested-by: Rob Herring <robh@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 Documentation/devicetree/bindings/net/dsa/dsa.yaml | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/net/dsa/dsa.yaml b/Documentation/devicetree/bindings/net/dsa/dsa.yaml
index 6107189d276a..368169f7fd37 100644
--- a/Documentation/devicetree/bindings/net/dsa/dsa.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/dsa.yaml
@@ -46,4 +46,10 @@  $defs:
             $ref: dsa-port.yaml#
             unevaluatedProperties: false
 
+  oneOf:
+    - required:
+      - ports
+    - required:
+      - ethernet-ports
+
 ...