dsa-port.yaml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/net/dsa/dsa-port.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Generic DSA Switch Port
  7. maintainers:
  8. - Andrew Lunn <andrew@lunn.ch>
  9. - Florian Fainelli <f.fainelli@gmail.com>
  10. - Vladimir Oltean <olteanv@gmail.com>
  11. description:
  12. A DSA switch port is a component of a switch that manages one MAC, and can
  13. pass Ethernet frames. It can act as a stanadard Ethernet switch port, or have
  14. DSA-specific functionality.
  15. $ref: /schemas/net/ethernet-switch-port.yaml#
  16. properties:
  17. reg:
  18. items:
  19. - description: Port number
  20. label:
  21. description:
  22. Describes the label associated with this port, which will become
  23. the netdev name
  24. $ref: /schemas/types.yaml#/definitions/string
  25. link:
  26. description:
  27. Should be a list of phandles to other switch's DSA port. This
  28. port is used as the outgoing port towards the phandle ports. The
  29. full routing information must be given, not just the one hop
  30. routes to neighbouring switches
  31. $ref: /schemas/types.yaml#/definitions/phandle-array
  32. items:
  33. maxItems: 1
  34. ethernet:
  35. description:
  36. Should be a phandle to a valid Ethernet device node. This host
  37. device is what the switch port is connected to
  38. $ref: /schemas/types.yaml#/definitions/phandle
  39. dsa-tag-protocol:
  40. description:
  41. Instead of the default, the switch will use this tag protocol if
  42. possible. Useful when a device supports multiple protocols and
  43. the default is incompatible with the Ethernet device.
  44. enum:
  45. - dsa
  46. - edsa
  47. - ocelot
  48. - ocelot-8021q
  49. - rtl8_4
  50. - rtl8_4t
  51. - seville
  52. # CPU and DSA ports must have phylink-compatible link descriptions
  53. if:
  54. oneOf:
  55. - required: [ ethernet ]
  56. - required: [ link ]
  57. then:
  58. allOf:
  59. - required:
  60. - phy-mode
  61. - oneOf:
  62. - required:
  63. - fixed-link
  64. - required:
  65. - phy-handle
  66. - required:
  67. - managed
  68. additionalProperties: true
  69. ...