2023-01-12 17:56:11 +00:00
|
|
|
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
|
|
|
%YAML 1.2
|
|
|
|
---
|
|
|
|
$id: http://devicetree.org/schemas/net/ethernet-switch.yaml#
|
|
|
|
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
|
|
|
|
|
|
|
title: Generic Ethernet Switch
|
|
|
|
|
|
|
|
maintainers:
|
|
|
|
- Andrew Lunn <andrew@lunn.ch>
|
|
|
|
- Florian Fainelli <f.fainelli@gmail.com>
|
|
|
|
- Vladimir Oltean <olteanv@gmail.com>
|
|
|
|
|
|
|
|
description:
|
|
|
|
Ethernet switches are multi-port Ethernet controllers. Each port has
|
|
|
|
its own number and is represented as its own Ethernet controller.
|
|
|
|
The minimum required functionality is to pass packets to software.
|
|
|
|
They may or may not be able to forward packets automonously between
|
|
|
|
ports.
|
|
|
|
|
|
|
|
select: false
|
|
|
|
|
2023-11-27 15:43:06 +00:00
|
|
|
allOf:
|
|
|
|
# This condition is here to satisfy the case where certain device
|
|
|
|
# nodes have to preserve non-standard names because of
|
|
|
|
# backward-compatibility with boot loaders inspecting certain
|
|
|
|
# node names.
|
|
|
|
- if:
|
|
|
|
properties:
|
|
|
|
compatible:
|
|
|
|
contains:
|
|
|
|
enum:
|
|
|
|
- marvell,turris-mox-mv88e6085
|
|
|
|
- marvell,turris-mox-mv88e6190
|
|
|
|
then:
|
|
|
|
properties:
|
|
|
|
$nodename:
|
|
|
|
pattern: "switch[0-3]@[0-3]+$"
|
|
|
|
else:
|
|
|
|
properties:
|
|
|
|
$nodename:
|
|
|
|
pattern: "^(ethernet-)?switch(@.*)?$"
|
2023-01-12 17:56:11 +00:00
|
|
|
|
|
|
|
patternProperties:
|
|
|
|
"^(ethernet-)?ports$":
|
|
|
|
type: object
|
|
|
|
unevaluatedProperties: false
|
|
|
|
|
|
|
|
properties:
|
|
|
|
'#address-cells':
|
|
|
|
const: 1
|
|
|
|
'#size-cells':
|
|
|
|
const: 0
|
|
|
|
|
|
|
|
patternProperties:
|
2023-10-16 21:44:22 +00:00
|
|
|
"^(ethernet-)?port@[0-9a-f]+$":
|
2023-01-12 17:56:11 +00:00
|
|
|
type: object
|
|
|
|
description: Ethernet switch ports
|
|
|
|
|
2023-04-04 20:42:13 +00:00
|
|
|
required:
|
|
|
|
- "#address-cells"
|
|
|
|
- "#size-cells"
|
|
|
|
|
2023-01-12 17:56:11 +00:00
|
|
|
oneOf:
|
|
|
|
- required:
|
|
|
|
- ports
|
|
|
|
- required:
|
|
|
|
- ethernet-ports
|
|
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
|
|
$defs:
|
2023-10-16 21:44:24 +00:00
|
|
|
ethernet-ports:
|
2023-01-12 17:56:11 +00:00
|
|
|
description: An ethernet switch without any extra port properties
|
2023-04-18 15:06:27 +00:00
|
|
|
$ref: '#'
|
2023-01-12 17:56:11 +00:00
|
|
|
|
|
|
|
patternProperties:
|
2023-10-16 21:44:23 +00:00
|
|
|
"^(ethernet-)?ports$":
|
|
|
|
patternProperties:
|
|
|
|
"^(ethernet-)?port@[0-9a-f]+$":
|
|
|
|
description: Ethernet switch ports
|
|
|
|
$ref: ethernet-switch-port.yaml#
|
|
|
|
unevaluatedProperties: false
|
2023-01-12 17:56:11 +00:00
|
|
|
|
|
|
|
...
|