xref: /linux/Documentation/devicetree/bindings/net/ethernet-switch.yaml (revision 51ff5150258a5af8f45c06518bfd4bba2edeceed)
17f5bccc8SColin Foster# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
27f5bccc8SColin Foster%YAML 1.2
37f5bccc8SColin Foster---
47f5bccc8SColin Foster$id: http://devicetree.org/schemas/net/ethernet-switch.yaml#
57f5bccc8SColin Foster$schema: http://devicetree.org/meta-schemas/core.yaml#
67f5bccc8SColin Foster
77f5bccc8SColin Fostertitle: Generic Ethernet Switch
87f5bccc8SColin Foster
97f5bccc8SColin Fostermaintainers:
107f5bccc8SColin Foster  - Andrew Lunn <andrew@lunn.ch>
117f5bccc8SColin Foster  - Florian Fainelli <f.fainelli@gmail.com>
127f5bccc8SColin Foster  - Vladimir Oltean <olteanv@gmail.com>
137f5bccc8SColin Foster
147f5bccc8SColin Fosterdescription:
157f5bccc8SColin Foster  Ethernet switches are multi-port Ethernet controllers. Each port has
167f5bccc8SColin Foster  its own number and is represented as its own Ethernet controller.
177f5bccc8SColin Foster  The minimum required functionality is to pass packets to software.
187f5bccc8SColin Foster  They may or may not be able to forward packets automonously between
197f5bccc8SColin Foster  ports.
207f5bccc8SColin Foster
217f5bccc8SColin Fosterselect: false
227f5bccc8SColin Foster
237f5bccc8SColin Fosterproperties:
247f5bccc8SColin Foster  $nodename:
257f5bccc8SColin Foster    pattern: "^(ethernet-)?switch(@.*)?$"
267f5bccc8SColin Foster
277f5bccc8SColin FosterpatternProperties:
287f5bccc8SColin Foster  "^(ethernet-)?ports$":
297f5bccc8SColin Foster    type: object
307f5bccc8SColin Foster    unevaluatedProperties: false
317f5bccc8SColin Foster
327f5bccc8SColin Foster    properties:
337f5bccc8SColin Foster      '#address-cells':
347f5bccc8SColin Foster        const: 1
357f5bccc8SColin Foster      '#size-cells':
367f5bccc8SColin Foster        const: 0
377f5bccc8SColin Foster
387f5bccc8SColin Foster    patternProperties:
39*51ff5150SRob Herring      "^(ethernet-)?port@[0-9a-f]+$":
407f5bccc8SColin Foster        type: object
417f5bccc8SColin Foster        description: Ethernet switch ports
427f5bccc8SColin Foster
43c8f1f2e9SRob Herring    required:
44c8f1f2e9SRob Herring      - "#address-cells"
45c8f1f2e9SRob Herring      - "#size-cells"
46c8f1f2e9SRob Herring
477f5bccc8SColin FosteroneOf:
487f5bccc8SColin Foster  - required:
497f5bccc8SColin Foster      - ports
507f5bccc8SColin Foster  - required:
517f5bccc8SColin Foster      - ethernet-ports
527f5bccc8SColin Foster
537f5bccc8SColin FosteradditionalProperties: true
547f5bccc8SColin Foster
557f5bccc8SColin Foster$defs:
567f5bccc8SColin Foster  base:
577f5bccc8SColin Foster    description: An ethernet switch without any extra port properties
5884ce730fSRob Herring    $ref: '#'
597f5bccc8SColin Foster
607f5bccc8SColin Foster    patternProperties:
61*51ff5150SRob Herring      "^(ethernet-)?port@[0-9a-f]+$":
627f5bccc8SColin Foster        description: Ethernet switch ports
6368e3e3beSColin Foster        $ref: ethernet-switch-port.yaml#
647f5bccc8SColin Foster        unevaluatedProperties: false
657f5bccc8SColin Foster
667f5bccc8SColin Foster...
67