mscc,ocelot.yaml 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. # SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/mfd/mscc,ocelot.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Ocelot Externally-Controlled Ethernet Switch
  7. maintainers:
  8. - Colin Foster <colin.foster@in-advantage.com>
  9. description: |
  10. The Ocelot ethernet switch family contains chips that have an internal CPU
  11. (VSC7513, VSC7514) and chips that don't (VSC7511, VSC7512). All switches have
  12. the option to be controlled externally via external interfaces like SPI or
  13. PCIe.
  14. The switch family is a multi-port networking switch that supports many
  15. interfaces. Additionally, the device can perform pin control, MDIO buses, and
  16. external GPIO expanders.
  17. properties:
  18. compatible:
  19. enum:
  20. - mscc,vsc7512
  21. reg:
  22. maxItems: 1
  23. "#address-cells":
  24. const: 1
  25. "#size-cells":
  26. const: 1
  27. spi-max-frequency:
  28. maxItems: 1
  29. patternProperties:
  30. "^pinctrl@[0-9a-f]+$":
  31. type: object
  32. $ref: /schemas/pinctrl/mscc,ocelot-pinctrl.yaml
  33. "^gpio@[0-9a-f]+$":
  34. type: object
  35. $ref: /schemas/pinctrl/microchip,sparx5-sgpio.yaml
  36. properties:
  37. compatible:
  38. enum:
  39. - mscc,ocelot-sgpio
  40. "^mdio@[0-9a-f]+$":
  41. type: object
  42. $ref: /schemas/net/mscc,miim.yaml
  43. properties:
  44. compatible:
  45. enum:
  46. - mscc,ocelot-miim
  47. "^ethernet-switch@[0-9a-f]+$":
  48. type: object
  49. $ref: /schemas/net/mscc,vsc7514-switch.yaml
  50. unevaluatedProperties: false
  51. properties:
  52. compatible:
  53. enum:
  54. - mscc,vsc7512-switch
  55. required:
  56. - compatible
  57. - reg
  58. - '#address-cells'
  59. - '#size-cells'
  60. additionalProperties: false
  61. examples:
  62. - |
  63. spi {
  64. #address-cells = <1>;
  65. #size-cells = <0>;
  66. soc@0 {
  67. compatible = "mscc,vsc7512";
  68. spi-max-frequency = <2500000>;
  69. reg = <0>;
  70. #address-cells = <1>;
  71. #size-cells = <1>;
  72. mdio@7107009c {
  73. compatible = "mscc,ocelot-miim";
  74. #address-cells = <1>;
  75. #size-cells = <0>;
  76. reg = <0x7107009c 0x24>;
  77. sw_phy0: ethernet-phy@0 {
  78. reg = <0x0>;
  79. };
  80. };
  81. mdio@710700c0 {
  82. compatible = "mscc,ocelot-miim";
  83. pinctrl-names = "default";
  84. pinctrl-0 = <&miim1_pins>;
  85. #address-cells = <1>;
  86. #size-cells = <0>;
  87. reg = <0x710700c0 0x24>;
  88. sw_phy4: ethernet-phy@4 {
  89. reg = <0x4>;
  90. };
  91. };
  92. gpio: pinctrl@71070034 {
  93. compatible = "mscc,ocelot-pinctrl";
  94. gpio-controller;
  95. #gpio-cells = <2>;
  96. gpio-ranges = <&gpio 0 0 22>;
  97. reg = <0x71070034 0x6c>;
  98. sgpio_pins: sgpio-pins {
  99. pins = "GPIO_0", "GPIO_1", "GPIO_2", "GPIO_3";
  100. function = "sg0";
  101. };
  102. miim1_pins: miim1-pins {
  103. pins = "GPIO_14", "GPIO_15";
  104. function = "miim";
  105. };
  106. };
  107. gpio@710700f8 {
  108. compatible = "mscc,ocelot-sgpio";
  109. #address-cells = <1>;
  110. #size-cells = <0>;
  111. bus-frequency = <12500000>;
  112. clocks = <&ocelot_clock>;
  113. microchip,sgpio-port-ranges = <0 15>;
  114. pinctrl-names = "default";
  115. pinctrl-0 = <&sgpio_pins>;
  116. reg = <0x710700f8 0x100>;
  117. sgpio_in0: gpio@0 {
  118. compatible = "microchip,sparx5-sgpio-bank";
  119. reg = <0>;
  120. gpio-controller;
  121. #gpio-cells = <3>;
  122. ngpios = <64>;
  123. };
  124. sgpio_out1: gpio@1 {
  125. compatible = "microchip,sparx5-sgpio-bank";
  126. reg = <1>;
  127. gpio-controller;
  128. #gpio-cells = <3>;
  129. ngpios = <64>;
  130. };
  131. };
  132. };
  133. };
  134. ...