Linux 6.7-rc7
[linux-modified.git] / Documentation / devicetree / bindings / net / ethernet-switch.yaml
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
7 title: Generic Ethernet Switch
8
9 maintainers:
10   - Andrew Lunn <andrew@lunn.ch>
11   - Florian Fainelli <f.fainelli@gmail.com>
12   - Vladimir Oltean <olteanv@gmail.com>
13
14 description:
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
21 select: false
22
23 properties:
24   $nodename:
25     pattern: "^(ethernet-)?switch(@.*)?$"
26
27 patternProperties:
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-9a-f]+$":
40         type: object
41         description: Ethernet switch ports
42
43     required:
44       - "#address-cells"
45       - "#size-cells"
46
47 oneOf:
48   - required:
49       - ports
50   - required:
51       - ethernet-ports
52
53 additionalProperties: true
54
55 $defs:
56   ethernet-ports:
57     description: An ethernet switch without any extra port properties
58     $ref: '#'
59
60     patternProperties:
61       "^(ethernet-)?ports$":
62         patternProperties:
63           "^(ethernet-)?port@[0-9a-f]+$":
64             description: Ethernet switch ports
65             $ref: ethernet-switch-port.yaml#
66             unevaluatedProperties: false
67
68 ...