xref: /freebsd/sys/contrib/device-tree/Bindings/net/dsa/dsa-port.yaml (revision cb7aa33ac6cd46a5434798e50363136e64f3ae98)
1e67e8565SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2e67e8565SEmmanuel Vadot%YAML 1.2
3e67e8565SEmmanuel Vadot---
4e67e8565SEmmanuel Vadot$id: http://devicetree.org/schemas/net/dsa/dsa-port.yaml#
5e67e8565SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6e67e8565SEmmanuel Vadot
7*cb7aa33aSEmmanuel Vadottitle: Generic DSA Switch Port
8e67e8565SEmmanuel Vadot
9e67e8565SEmmanuel Vadotmaintainers:
10e67e8565SEmmanuel Vadot  - Andrew Lunn <andrew@lunn.ch>
11e67e8565SEmmanuel Vadot  - Florian Fainelli <f.fainelli@gmail.com>
12*cb7aa33aSEmmanuel Vadot  - Vladimir Oltean <olteanv@gmail.com>
13e67e8565SEmmanuel Vadot
14e67e8565SEmmanuel Vadotdescription:
15*cb7aa33aSEmmanuel Vadot  A DSA switch port is a component of a switch that manages one MAC, and can
16*cb7aa33aSEmmanuel Vadot  pass Ethernet frames. It can act as a stanadard Ethernet switch port, or have
17*cb7aa33aSEmmanuel Vadot  DSA-specific functionality.
18e67e8565SEmmanuel Vadot
19*cb7aa33aSEmmanuel Vadot$ref: /schemas/net/ethernet-switch-port.yaml#
20e67e8565SEmmanuel Vadot
21e67e8565SEmmanuel Vadotproperties:
22e67e8565SEmmanuel Vadot  reg:
238bab661aSEmmanuel Vadot    items:
248bab661aSEmmanuel Vadot      - description: Port number
25e67e8565SEmmanuel Vadot
26e67e8565SEmmanuel Vadot  label:
27e67e8565SEmmanuel Vadot    description:
28e67e8565SEmmanuel Vadot      Describes the label associated with this port, which will become
29e67e8565SEmmanuel Vadot      the netdev name
30e67e8565SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/string
31e67e8565SEmmanuel Vadot
32e67e8565SEmmanuel Vadot  link:
33e67e8565SEmmanuel Vadot    description:
34e67e8565SEmmanuel Vadot      Should be a list of phandles to other switch's DSA port. This
35e67e8565SEmmanuel Vadot      port is used as the outgoing port towards the phandle ports. The
36e67e8565SEmmanuel Vadot      full routing information must be given, not just the one hop
37e67e8565SEmmanuel Vadot      routes to neighbouring switches
38e67e8565SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle-array
39c9ccf3a3SEmmanuel Vadot    items:
40c9ccf3a3SEmmanuel Vadot      maxItems: 1
41e67e8565SEmmanuel Vadot
42e67e8565SEmmanuel Vadot  ethernet:
43e67e8565SEmmanuel Vadot    description:
44e67e8565SEmmanuel Vadot      Should be a phandle to a valid Ethernet device node.  This host
45e67e8565SEmmanuel Vadot      device is what the switch port is connected to
46e67e8565SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle
47e67e8565SEmmanuel Vadot
48e67e8565SEmmanuel Vadot  dsa-tag-protocol:
49e67e8565SEmmanuel Vadot    description:
50e67e8565SEmmanuel Vadot      Instead of the default, the switch will use this tag protocol if
51e67e8565SEmmanuel Vadot      possible. Useful when a device supports multiple protocols and
52e67e8565SEmmanuel Vadot      the default is incompatible with the Ethernet device.
53e67e8565SEmmanuel Vadot    enum:
54e67e8565SEmmanuel Vadot      - dsa
55e67e8565SEmmanuel Vadot      - edsa
56e67e8565SEmmanuel Vadot      - ocelot
57e67e8565SEmmanuel Vadot      - ocelot-8021q
58c9ccf3a3SEmmanuel Vadot      - rtl8_4
59c9ccf3a3SEmmanuel Vadot      - rtl8_4t
60e67e8565SEmmanuel Vadot      - seville
61e67e8565SEmmanuel Vadot
627ef62cebSEmmanuel Vadot# CPU and DSA ports must have phylink-compatible link descriptions
637ef62cebSEmmanuel Vadotif:
647ef62cebSEmmanuel Vadot  oneOf:
657ef62cebSEmmanuel Vadot    - required: [ ethernet ]
667ef62cebSEmmanuel Vadot    - required: [ link ]
677ef62cebSEmmanuel Vadotthen:
687ef62cebSEmmanuel Vadot  allOf:
697ef62cebSEmmanuel Vadot    - required:
707ef62cebSEmmanuel Vadot        - phy-mode
717ef62cebSEmmanuel Vadot    - oneOf:
727ef62cebSEmmanuel Vadot        - required:
737ef62cebSEmmanuel Vadot            - fixed-link
747ef62cebSEmmanuel Vadot        - required:
757ef62cebSEmmanuel Vadot            - phy-handle
767ef62cebSEmmanuel Vadot        - required:
777ef62cebSEmmanuel Vadot            - managed
787ef62cebSEmmanuel Vadot
79e67e8565SEmmanuel VadotadditionalProperties: true
80e67e8565SEmmanuel Vadot
81e67e8565SEmmanuel Vadot...
82