xref: /freebsd/sys/contrib/device-tree/Bindings/net/ethernet-switch.yaml (revision fac71e4e09885bb2afa3d984a0c239a52e1a7418)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/net/ethernet-switch.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Generic Ethernet Switch
8
9maintainers:
10  - Andrew Lunn <andrew@lunn.ch>
11  - Florian Fainelli <f.fainelli@gmail.com>
12  - Vladimir Oltean <olteanv@gmail.com>
13
14description:
15  Ethernet switches are multi-port Ethernet controllers. Each port has
16  its own number and is represented as its own Ethernet controller.
17  The minimum required functionality is to pass packets to software.
18  They may or may not be able to forward packets automonously between
19  ports.
20
21select: false
22
23properties:
24  $nodename:
25    pattern: "^(ethernet-)?switch(@.*)?$"
26
27patternProperties:
28  "^(ethernet-)?ports$":
29    type: object
30    unevaluatedProperties: false
31
32    properties:
33      '#address-cells':
34        const: 1
35      '#size-cells':
36        const: 0
37
38    patternProperties:
39      "^(ethernet-)?port@[0-9]+$":
40        type: object
41        description: Ethernet switch ports
42
43    required:
44      - "#address-cells"
45      - "#size-cells"
46
47oneOf:
48  - required:
49      - ports
50  - required:
51      - ethernet-ports
52
53additionalProperties: true
54
55$defs:
56  base:
57    description: An ethernet switch without any extra port properties
58    $ref: '#'
59
60    patternProperties:
61      "^(ethernet-)?port@[0-9]+$":
62        description: Ethernet switch ports
63        $ref: ethernet-switch-port.yaml#
64        unevaluatedProperties: false
65
66...
67