ethernet-switch.yaml 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/net/ethernet-switch.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Generic Ethernet Switch
  7. maintainers:
  8. - Andrew Lunn <andrew@lunn.ch>
  9. - Florian Fainelli <f.fainelli@gmail.com>
  10. - Vladimir Oltean <olteanv@gmail.com>
  11. description:
  12. Ethernet switches are multi-port Ethernet controllers. Each port has
  13. its own number and is represented as its own Ethernet controller.
  14. The minimum required functionality is to pass packets to software.
  15. They may or may not be able to forward packets automonously between
  16. ports.
  17. select: false
  18. allOf:
  19. # This condition is here to satisfy the case where certain device
  20. # nodes have to preserve non-standard names because of
  21. # backward-compatibility with boot loaders inspecting certain
  22. # node names.
  23. - if:
  24. properties:
  25. compatible:
  26. contains:
  27. enum:
  28. - marvell,turris-mox-mv88e6085
  29. - marvell,turris-mox-mv88e6190
  30. then:
  31. properties:
  32. $nodename:
  33. pattern: 'switch[0-3]@[0-3]+$'
  34. else:
  35. properties:
  36. $nodename:
  37. pattern: '^(ethernet-)?switch(@.*)?$'
  38. patternProperties:
  39. '^(ethernet-)?ports$':
  40. type: object
  41. unevaluatedProperties: false
  42. properties:
  43. '#address-cells':
  44. const: 1
  45. '#size-cells':
  46. const: 0
  47. patternProperties:
  48. '^(ethernet-)?port@[0-9a-f]+$':
  49. type: object
  50. description: Ethernet switch ports
  51. required:
  52. - '#address-cells'
  53. - '#size-cells'
  54. oneOf:
  55. - required:
  56. - ports
  57. - required:
  58. - ethernet-ports
  59. additionalProperties: true
  60. $defs:
  61. ethernet-ports:
  62. description: An ethernet switch without any extra port properties
  63. $ref: '#'
  64. patternProperties:
  65. '^(ethernet-)?ports$':
  66. patternProperties:
  67. '^(ethernet-)?port@[0-9a-f]+$':
  68. description: Ethernet switch ports
  69. $ref: ethernet-switch-port.yaml#
  70. unevaluatedProperties: false
  71. ...