Files
linux/Documentation/devicetree/bindings/net/ethernet-switch.yaml
Rob Herring (Arm) 01585d7470 dt-bindings: Fix inconsistent quoting
yamllint has gained a new check which checks for inconsistent quoting
(mixed " and ' quotes within a file). Fix all the cases yamllint found
so we can enable the check (once the check is in a release). As single
quotes are (slightly) preferred, use them throughout the modified files
even if double quotes are mostly used.

Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Acked-by: Andrew Jeffery <andrew@codeconstruct.com.au>
Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Lee Jones <lee@kernel.org>
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Link: https://patch.msgid.link/20251015232015.846282-1-robh@kernel.org
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
2025-11-17 11:24:50 -06:00

86 lines
2.0 KiB
YAML

# 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
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(@.*)?$'
patternProperties:
'^(ethernet-)?ports$':
type: object
unevaluatedProperties: false
properties:
'#address-cells':
const: 1
'#size-cells':
const: 0
patternProperties:
'^(ethernet-)?port@[0-9a-f]+$':
type: object
description: Ethernet switch ports
required:
- '#address-cells'
- '#size-cells'
oneOf:
- required:
- ports
- required:
- ethernet-ports
additionalProperties: true
$defs:
ethernet-ports:
description: An ethernet switch without any extra port properties
$ref: '#'
patternProperties:
'^(ethernet-)?ports$':
patternProperties:
'^(ethernet-)?port@[0-9a-f]+$':
description: Ethernet switch ports
$ref: ethernet-switch-port.yaml#
unevaluatedProperties: false
...