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