mscc,ocelot.yaml 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  1. # SPDX-License-Identifier: (GPL-2.0 OR MIT)
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/net/dsa/mscc,ocelot.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Microchip Ocelot Switch Family
  7. maintainers:
  8. - Vladimir Oltean <vladimir.oltean@nxp.com>
  9. - Claudiu Manoil <claudiu.manoil@nxp.com>
  10. - Alexandre Belloni <alexandre.belloni@bootlin.com>
  11. - UNGLinuxDriver@microchip.com
  12. description: |
  13. There are multiple switches which are either part of the Ocelot-1 family, or
  14. derivatives of this architecture. These switches can be found embedded in
  15. various SoCs and accessed using MMIO, or as discrete chips and accessed over
  16. SPI or PCIe. The present DSA binding shall be used when the host controlling
  17. them performs packet I/O primarily through an Ethernet port of the switch
  18. (which is attached to an Ethernet port of the host), rather than through
  19. Frame DMA or register-based I/O.
  20. VSC9953 (Seville):
  21. This is found in the NXP T1040, where it is a memory-mapped platform
  22. device.
  23. The following PHY interface types are supported:
  24. - phy-mode = "internal": on ports 8 and 9
  25. - phy-mode = "sgmii": on ports 0, 1, 2, 3, 4, 5, 6, 7
  26. - phy-mode = "qsgmii": on ports 0, 1, 2, 3, 4, 5, 6, 7
  27. - phy-mode = "1000base-x": on ports 0, 1, 2, 3, 4, 5, 6, 7
  28. VSC9959 (Felix):
  29. This is found in the NXP LS1028A. It is a PCI device, part of the larger
  30. enetc root complex. As a result, the ethernet-switch node is a sub-node of
  31. the PCIe root complex node and its "reg" property conforms to the parent
  32. node bindings, describing it as PF 5 of device 0, bus 0.
  33. If any external switch port is enabled, the enetc PF2 (enetc_port2) should
  34. be enabled as well. This is because the internal MDIO bus (exposed through
  35. EA BAR 0) used to access the MAC PCS registers truly belongs to the enetc
  36. port 2 and not to Felix.
  37. The following PHY interface types are supported:
  38. - phy-mode = "internal": on ports 4 and 5
  39. - phy-mode = "sgmii": on ports 0, 1, 2, 3
  40. - phy-mode = "qsgmii": on ports 0, 1, 2, 3
  41. - phy-mode = "usxgmii": on ports 0, 1, 2, 3
  42. - phy-mode = "1000base-x": on ports 0, 1, 2, 3
  43. - phy-mode = "2500base-x": on ports 0, 1, 2, 3
  44. properties:
  45. compatible:
  46. enum:
  47. - mscc,vsc9953-switch
  48. - pci1957,eef0
  49. reg:
  50. maxItems: 1
  51. interrupts:
  52. maxItems: 1
  53. description:
  54. Used to signal availability of PTP TX timestamps, and state changes of
  55. the MAC merge layer of ports that support Frame Preemption.
  56. little-endian: true
  57. big-endian: true
  58. required:
  59. - compatible
  60. - reg
  61. allOf:
  62. - $ref: dsa.yaml#/$defs/ethernet-ports
  63. - if:
  64. properties:
  65. compatible:
  66. const: pci1957,eef0
  67. then:
  68. required:
  69. - interrupts
  70. unevaluatedProperties: false
  71. examples:
  72. # Felix VSC9959 (NXP LS1028A)
  73. - |
  74. #include <dt-bindings/interrupt-controller/arm-gic.h>
  75. pcie { /* Integrated Endpoint Root Complex */
  76. #address-cells = <3>;
  77. #size-cells = <2>;
  78. ethernet-switch@0,5 {
  79. compatible = "pci1957,eef0";
  80. reg = <0x000500 0 0 0 0>;
  81. interrupts = <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>;
  82. ethernet-ports {
  83. #address-cells = <1>;
  84. #size-cells = <0>;
  85. port@0 {
  86. reg = <0>;
  87. phy-mode = "qsgmii";
  88. phy-handle = <&phy0>;
  89. managed = "in-band-status";
  90. };
  91. port@1 {
  92. reg = <1>;
  93. phy-mode = "qsgmii";
  94. phy-handle = <&phy1>;
  95. managed = "in-band-status";
  96. };
  97. port@2 {
  98. reg = <2>;
  99. phy-mode = "qsgmii";
  100. phy-handle = <&phy2>;
  101. managed = "in-band-status";
  102. };
  103. port@3 {
  104. reg = <3>;
  105. phy-mode = "qsgmii";
  106. phy-handle = <&phy3>;
  107. managed = "in-band-status";
  108. };
  109. port@4 {
  110. reg = <4>;
  111. ethernet = <&enetc_port2>;
  112. phy-mode = "internal";
  113. fixed-link {
  114. speed = <2500>;
  115. full-duplex;
  116. pause;
  117. };
  118. };
  119. port@5 {
  120. reg = <5>;
  121. ethernet = <&enetc_port3>;
  122. phy-mode = "internal";
  123. fixed-link {
  124. speed = <1000>;
  125. full-duplex;
  126. pause;
  127. };
  128. };
  129. };
  130. };
  131. };
  132. # Seville VSC9953 (NXP T1040)
  133. - |
  134. soc {
  135. #address-cells = <1>;
  136. #size-cells = <1>;
  137. ethernet-switch@800000 {
  138. compatible = "mscc,vsc9953-switch";
  139. reg = <0x800000 0x290000>;
  140. little-endian;
  141. ethernet-ports {
  142. #address-cells = <1>;
  143. #size-cells = <0>;
  144. port@0 {
  145. reg = <0>;
  146. phy-mode = "qsgmii";
  147. phy-handle = <&phy0>;
  148. managed = "in-band-status";
  149. };
  150. port@1 {
  151. reg = <1>;
  152. phy-mode = "qsgmii";
  153. phy-handle = <&phy1>;
  154. managed = "in-band-status";
  155. };
  156. port@2 {
  157. reg = <2>;
  158. phy-mode = "qsgmii";
  159. phy-handle = <&phy2>;
  160. managed = "in-band-status";
  161. };
  162. port@3 {
  163. reg = <3>;
  164. phy-mode = "qsgmii";
  165. phy-handle = <&phy3>;
  166. managed = "in-band-status";
  167. };
  168. port@4 {
  169. reg = <4>;
  170. phy-mode = "qsgmii";
  171. phy-handle = <&phy4>;
  172. managed = "in-band-status";
  173. };
  174. port@5 {
  175. reg = <5>;
  176. phy-mode = "qsgmii";
  177. phy-handle = <&phy5>;
  178. managed = "in-band-status";
  179. };
  180. port@6 {
  181. reg = <6>;
  182. phy-mode = "qsgmii";
  183. phy-handle = <&phy6>;
  184. managed = "in-band-status";
  185. };
  186. port@7 {
  187. reg = <7>;
  188. phy-mode = "qsgmii";
  189. phy-handle = <&phy7>;
  190. managed = "in-band-status";
  191. };
  192. port@8 {
  193. reg = <8>;
  194. phy-mode = "internal";
  195. ethernet = <&enet0>;
  196. fixed-link {
  197. speed = <2500>;
  198. full-duplex;
  199. pause;
  200. };
  201. };
  202. port@9 {
  203. reg = <9>;
  204. phy-mode = "internal";
  205. ethernet = <&enet1>;
  206. fixed-link {
  207. speed = <2500>;
  208. full-duplex;
  209. pause;
  210. };
  211. };
  212. };
  213. };
  214. };