microchip,sparx5-switch.yaml 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  1. # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/net/microchip,sparx5-switch.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Microchip Sparx5 Ethernet switch controller
  7. maintainers:
  8. - Steen Hegelund <steen.hegelund@microchip.com>
  9. - Lars Povlsen <lars.povlsen@microchip.com>
  10. - Daniel Machon <daniel.machon@microchip.com>
  11. description: |
  12. The SparX-5 Enterprise Ethernet switch family provides a rich set of
  13. Enterprise switching features such as advanced TCAM-based VLAN and
  14. QoS processing enabling delivery of differentiated services, and
  15. security through TCAM-based frame processing using versatile content
  16. aware processor (VCAP).
  17. IPv4/IPv6 Layer 3 (L3) unicast and multicast routing is supported
  18. with up to 18K IPv4/9K IPv6 unicast LPM entries and up to 9K IPv4/3K
  19. IPv6 (S,G) multicast groups.
  20. L3 security features include source guard and reverse path
  21. forwarding (uRPF) tasks. Additional L3 features include VRF-Lite and
  22. IP tunnels (IP over GRE/IP).
  23. The SparX-5 switch family targets managed Layer 2 and Layer 3
  24. equipment in SMB, SME, and Enterprise where high port count
  25. 1G/2.5G/5G/10G switching with 10G/25G aggregation links is required.
  26. properties:
  27. $nodename:
  28. pattern: "^switch@[0-9a-f]+$"
  29. compatible:
  30. oneOf:
  31. - enum:
  32. - microchip,lan9691-switch
  33. - microchip,sparx5-switch
  34. - items:
  35. - enum:
  36. - microchip,lan969c-switch
  37. - microchip,lan969b-switch
  38. - microchip,lan969a-switch
  39. - microchip,lan9699-switch
  40. - microchip,lan9698-switch
  41. - microchip,lan9697-switch
  42. - microchip,lan9696-switch
  43. - microchip,lan9695-switch
  44. - microchip,lan9694-switch
  45. - microchip,lan9693-switch
  46. - microchip,lan9692-switch
  47. - const: microchip,lan9691-switch
  48. reg:
  49. minItems: 2
  50. items:
  51. - description: cpu target
  52. - description: devices target
  53. - description: general control block target
  54. reg-names:
  55. minItems: 2
  56. items:
  57. - const: cpu
  58. - const: devices
  59. - const: gcb
  60. interrupts:
  61. minItems: 1
  62. items:
  63. - description: register based extraction
  64. - description: frame dma based extraction
  65. - description: ptp interrupt
  66. interrupt-names:
  67. minItems: 1
  68. items:
  69. - const: xtr
  70. - const: fdma
  71. - const: ptp
  72. resets:
  73. items:
  74. - description: Reset controller used for switch core reset (soft reset)
  75. reset-names:
  76. items:
  77. - const: switch
  78. mac-address: true
  79. ethernet-ports:
  80. type: object
  81. additionalProperties: false
  82. properties:
  83. '#address-cells':
  84. const: 1
  85. '#size-cells':
  86. const: 0
  87. patternProperties:
  88. "^port@[0-9a-f]+$":
  89. $ref: /schemas/net/ethernet-controller.yaml#
  90. unevaluatedProperties: false
  91. properties:
  92. reg:
  93. description: Switch port number
  94. phys:
  95. maxItems: 1
  96. description:
  97. phandle of a Ethernet SerDes PHY. This defines which SerDes
  98. instance will handle the Ethernet traffic.
  99. microchip,bandwidth:
  100. description: Specifies bandwidth in Mbit/s allocated to the port.
  101. $ref: /schemas/types.yaml#/definitions/uint32
  102. maximum: 25000
  103. microchip,sd-sgpio:
  104. description:
  105. Index of the ports Signal Detect SGPIO in the set of 384 SGPIOs
  106. This is optional, and only needed if the default used index is
  107. is not correct.
  108. $ref: /schemas/types.yaml#/definitions/uint32
  109. minimum: 0
  110. maximum: 383
  111. rx-internal-delay-ps:
  112. description:
  113. RGMII Receive Clock Delay defined in pico seconds, used to select
  114. the DLL phase shift between 1000 ps (45 degree shift at 1Gbps) and
  115. 3300 ps (147 degree shift at 1Gbps). A value of 0 ps will disable
  116. any delay. The Default is no delay.
  117. enum: [0, 1000, 1700, 2000, 2500, 3000, 3300]
  118. default: 0
  119. tx-internal-delay-ps:
  120. description:
  121. RGMII Transmit Clock Delay defined in pico seconds, used to select
  122. the DLL phase shift between 1000 ps (45 degree shift at 1Gbps) and
  123. 3300 ps (147 degree shift at 1Gbps). A value of 0 ps will disable
  124. any delay. The Default is no delay.
  125. enum: [0, 1000, 1700, 2000, 2500, 3000, 3300]
  126. default: 0
  127. required:
  128. - reg
  129. - phy-mode
  130. - microchip,bandwidth
  131. if:
  132. not:
  133. properties:
  134. phy-mode:
  135. contains:
  136. enum:
  137. - rgmii
  138. - rgmii-id
  139. - rgmii-rxid
  140. - rgmii-txid
  141. then:
  142. required:
  143. - phys
  144. oneOf:
  145. - required:
  146. - phy-handle
  147. - required:
  148. - sfp
  149. - managed
  150. required:
  151. - compatible
  152. - reg
  153. - reg-names
  154. - interrupts
  155. - interrupt-names
  156. - ethernet-ports
  157. allOf:
  158. - if:
  159. properties:
  160. compatible:
  161. contains:
  162. enum:
  163. - microchip,lan9691-switch
  164. then:
  165. properties:
  166. reg:
  167. maxItems: 2
  168. reg-names:
  169. maxItems: 2
  170. else:
  171. properties:
  172. reg:
  173. minItems: 3
  174. reg-names:
  175. minItems: 3
  176. additionalProperties: false
  177. examples:
  178. - |
  179. #include <dt-bindings/interrupt-controller/arm-gic.h>
  180. switch: switch@600000000 {
  181. compatible = "microchip,sparx5-switch";
  182. reg = <0 0x401000>,
  183. <0x10004000 0x7fc000>,
  184. <0x11010000 0xaf0000>;
  185. reg-names = "cpu", "devices", "gcb";
  186. interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
  187. interrupt-names = "xtr";
  188. resets = <&reset 0>;
  189. reset-names = "switch";
  190. ethernet-ports {
  191. #address-cells = <1>;
  192. #size-cells = <0>;
  193. port0: port@0 {
  194. reg = <0>;
  195. microchip,bandwidth = <1000>;
  196. phys = <&serdes 13>;
  197. phy-handle = <&phy0>;
  198. phy-mode = "qsgmii";
  199. };
  200. /* ... */
  201. /* Then the 25G interfaces */
  202. port60: port@60 {
  203. reg = <60>;
  204. microchip,bandwidth = <25000>;
  205. phys = <&serdes 29>;
  206. phy-mode = "10gbase-r";
  207. sfp = <&sfp_eth60>;
  208. managed = "in-band-status";
  209. microchip,sd-sgpio = <365>;
  210. };
  211. port61: port@61 {
  212. reg = <61>;
  213. microchip,bandwidth = <25000>;
  214. phys = <&serdes 30>;
  215. phy-mode = "10gbase-r";
  216. sfp = <&sfp_eth61>;
  217. managed = "in-band-status";
  218. microchip,sd-sgpio = <369>;
  219. };
  220. port62: port@62 {
  221. reg = <62>;
  222. microchip,bandwidth = <25000>;
  223. phys = <&serdes 31>;
  224. phy-mode = "10gbase-r";
  225. sfp = <&sfp_eth62>;
  226. managed = "in-band-status";
  227. microchip,sd-sgpio = <373>;
  228. };
  229. port63: port@63 {
  230. reg = <63>;
  231. microchip,bandwidth = <25000>;
  232. phys = <&serdes 32>;
  233. phy-mode = "10gbase-r";
  234. sfp = <&sfp_eth63>;
  235. managed = "in-band-status";
  236. microchip,sd-sgpio = <377>;
  237. };
  238. /* Finally the Management interface */
  239. port64: port@64 {
  240. reg = <64>;
  241. microchip,bandwidth = <1000>;
  242. phys = <&serdes 0>;
  243. phy-handle = <&phy64>;
  244. phy-mode = "sgmii";
  245. mac-address = [ 00 00 00 01 02 03 ];
  246. };
  247. };
  248. };
  249. ...