-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dt-bindings: net: add generic ethernet-switch
The dsa.yaml bindings had references that can apply to non-dsa switches. To prevent duplication of this information, keep the dsa-specific information inside dsa.yaml and move the remaining generic information to the newly created ethernet-switch.yaml. Signed-off-by: Colin Foster <colin.foster@in-advantage.com> Suggested-by: Vladimir Oltean <olteanv@gmail.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
- Loading branch information
Colin Foster
authored and
David S. Miller
committed
Jan 16, 2023
1 parent
000bd2a
commit 7f5bccc
Showing
3 changed files
with
69 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
Documentation/devicetree/bindings/net/ethernet-switch.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# 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 | ||
|
||
properties: | ||
$nodename: | ||
pattern: "^(ethernet-)?switch(@.*)?$" | ||
|
||
patternProperties: | ||
"^(ethernet-)?ports$": | ||
type: object | ||
unevaluatedProperties: false | ||
|
||
properties: | ||
'#address-cells': | ||
const: 1 | ||
'#size-cells': | ||
const: 0 | ||
|
||
patternProperties: | ||
"^(ethernet-)?port@[0-9]+$": | ||
type: object | ||
description: Ethernet switch ports | ||
|
||
$ref: ethernet-controller.yaml# | ||
|
||
additionalProperties: true | ||
|
||
oneOf: | ||
- required: | ||
- ports | ||
- required: | ||
- ethernet-ports | ||
|
||
additionalProperties: true | ||
|
||
$defs: | ||
base: | ||
description: An ethernet switch without any extra port properties | ||
$ref: '#/' | ||
|
||
patternProperties: | ||
"^(ethernet-)?port@[0-9]+$": | ||
description: Ethernet switch ports | ||
$ref: ethernet-controller.yaml# | ||
unevaluatedProperties: false | ||
|
||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters