175c99015SAnsuel Smith# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
275c99015SAnsuel Smith%YAML 1.2
375c99015SAnsuel Smith---
475c99015SAnsuel Smith$id: http://devicetree.org/schemas/net/dsa/dsa-port.yaml#
575c99015SAnsuel Smith$schema: http://devicetree.org/meta-schemas/core.yaml#
675c99015SAnsuel Smith
775c99015SAnsuel Smithtitle: Ethernet Switch port Device Tree Bindings
875c99015SAnsuel Smith
975c99015SAnsuel Smithmaintainers:
1075c99015SAnsuel Smith  - Andrew Lunn <andrew@lunn.ch>
1175c99015SAnsuel Smith  - Florian Fainelli <f.fainelli@gmail.com>
1275c99015SAnsuel Smith  - Vivien Didelot <vivien.didelot@gmail.com>
1375c99015SAnsuel Smith
1475c99015SAnsuel Smithdescription:
1575c99015SAnsuel Smith  Ethernet switch port Description
1675c99015SAnsuel Smith
1775c99015SAnsuel SmithallOf:
1822a41e9aSRob Herring  - $ref: /schemas/net/ethernet-controller.yaml#
1975c99015SAnsuel Smith
2075c99015SAnsuel Smithproperties:
2175c99015SAnsuel Smith  reg:
2275c99015SAnsuel Smith    description: Port number
2375c99015SAnsuel Smith
2475c99015SAnsuel Smith  label:
2575c99015SAnsuel Smith    description:
2675c99015SAnsuel Smith      Describes the label associated with this port, which will become
2775c99015SAnsuel Smith      the netdev name
2875c99015SAnsuel Smith    $ref: /schemas/types.yaml#/definitions/string
2975c99015SAnsuel Smith
3075c99015SAnsuel Smith  link:
3175c99015SAnsuel Smith    description:
3275c99015SAnsuel Smith      Should be a list of phandles to other switch's DSA port. This
3375c99015SAnsuel Smith      port is used as the outgoing port towards the phandle ports. The
3475c99015SAnsuel Smith      full routing information must be given, not just the one hop
3575c99015SAnsuel Smith      routes to neighbouring switches
3675c99015SAnsuel Smith    $ref: /schemas/types.yaml#/definitions/phandle-array
3739bd2b6aSRob Herring    items:
3839bd2b6aSRob Herring      maxItems: 1
3975c99015SAnsuel Smith
4075c99015SAnsuel Smith  ethernet:
4175c99015SAnsuel Smith    description:
4275c99015SAnsuel Smith      Should be a phandle to a valid Ethernet device node.  This host
4375c99015SAnsuel Smith      device is what the switch port is connected to
4475c99015SAnsuel Smith    $ref: /schemas/types.yaml#/definitions/phandle
4575c99015SAnsuel Smith
4675c99015SAnsuel Smith  dsa-tag-protocol:
4775c99015SAnsuel Smith    description:
4875c99015SAnsuel Smith      Instead of the default, the switch will use this tag protocol if
4975c99015SAnsuel Smith      possible. Useful when a device supports multiple protocols and
5075c99015SAnsuel Smith      the default is incompatible with the Ethernet device.
5175c99015SAnsuel Smith    enum:
5275c99015SAnsuel Smith      - dsa
5375c99015SAnsuel Smith      - edsa
5475c99015SAnsuel Smith      - ocelot
5575c99015SAnsuel Smith      - ocelot-8021q
56617c3cc3SLuiz Angelo Daros de Luca      - rtl8_4
57617c3cc3SLuiz Angelo Daros de Luca      - rtl8_4t
5875c99015SAnsuel Smith      - seville
5975c99015SAnsuel Smith
6075c99015SAnsuel Smith  phy-handle: true
6175c99015SAnsuel Smith
6275c99015SAnsuel Smith  phy-mode: true
6375c99015SAnsuel Smith
6475c99015SAnsuel Smith  fixed-link: true
6575c99015SAnsuel Smith
6675c99015SAnsuel Smith  mac-address: true
6775c99015SAnsuel Smith
6875c99015SAnsuel Smith  sfp: true
6975c99015SAnsuel Smith
7075c99015SAnsuel Smith  managed: true
7175c99015SAnsuel Smith
7275c99015SAnsuel Smith  rx-internal-delay-ps: true
7375c99015SAnsuel Smith
7475c99015SAnsuel Smith  tx-internal-delay-ps: true
7575c99015SAnsuel Smith
7675c99015SAnsuel Smithrequired:
7775c99015SAnsuel Smith  - reg
7875c99015SAnsuel Smith
79*2ec2fb83SVladimir Oltean# CPU and DSA ports must have phylink-compatible link descriptions
80*2ec2fb83SVladimir Olteanif:
81*2ec2fb83SVladimir Oltean  oneOf:
82*2ec2fb83SVladimir Oltean    - required: [ ethernet ]
83*2ec2fb83SVladimir Oltean    - required: [ link ]
84*2ec2fb83SVladimir Olteanthen:
85*2ec2fb83SVladimir Oltean  allOf:
86*2ec2fb83SVladimir Oltean    - required:
87*2ec2fb83SVladimir Oltean        - phy-mode
88*2ec2fb83SVladimir Oltean    - oneOf:
89*2ec2fb83SVladimir Oltean        - required:
90*2ec2fb83SVladimir Oltean            - fixed-link
91*2ec2fb83SVladimir Oltean        - required:
92*2ec2fb83SVladimir Oltean            - phy-handle
93*2ec2fb83SVladimir Oltean        - required:
94*2ec2fb83SVladimir Oltean            - managed
95*2ec2fb83SVladimir Oltean
9675c99015SAnsuel SmithadditionalProperties: true
9775c99015SAnsuel Smith
9875c99015SAnsuel Smith...
99