cdns,macb.yaml 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  1. # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/net/cdns,macb.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Cadence MACB/GEM Ethernet controller
  7. maintainers:
  8. - Nicolas Ferre <nicolas.ferre@microchip.com>
  9. - Claudiu Beznea <claudiu.beznea@microchip.com>
  10. properties:
  11. compatible:
  12. oneOf:
  13. - items:
  14. - enum:
  15. - cdns,at91rm9200-emac # Atmel at91rm9200 SoC
  16. - const: cdns,emac # Generic
  17. - items:
  18. - enum:
  19. - cdns,zynq-gem # Xilinx Zynq-7xxx SoC
  20. - cdns,zynqmp-gem # Xilinx Zynq Ultrascale+ MPSoC
  21. - const: cdns,gem # Generic
  22. deprecated: true
  23. - items:
  24. - enum:
  25. - xlnx,versal-gem # Xilinx Versal
  26. - xlnx,zynq-gem # Xilinx Zynq-7xxx SoC
  27. - xlnx,zynqmp-gem # Xilinx Zynq Ultrascale+ MPSoC
  28. - const: cdns,gem # Generic
  29. - items:
  30. - enum:
  31. - cdns,at91sam9260-macb # Atmel at91sam9 SoCs
  32. - cdns,sam9x60-macb # Microchip sam9x60 SoC
  33. - microchip,mpfs-macb # Microchip PolarFire SoC
  34. - const: cdns,macb # Generic
  35. - items:
  36. - const: microchip,pic64gx-macb # Microchip PIC64GX SoC
  37. - const: microchip,mpfs-macb # Microchip PolarFire SoC
  38. - const: cdns,macb # Generic
  39. - items:
  40. - enum:
  41. - atmel,sama5d3-macb # 10/100Mbit IP on Atmel sama5d3 SoCs
  42. - enum:
  43. - cdns,at91sam9260-macb # Atmel at91sam9 SoCs.
  44. - const: cdns,macb # Generic
  45. - enum:
  46. - atmel,sama5d2-gem # GEM IP (10/100) on Atmel sama5d2 SoCs
  47. - atmel,sama5d29-gem # GEM XL IP (10/100) on Atmel sama5d29 SoCs
  48. - atmel,sama5d3-gem # Gigabit IP on Atmel sama5d3 SoCs
  49. - atmel,sama5d4-gem # GEM IP (10/100) on Atmel sama5d4 SoCs
  50. - cdns,emac # Generic
  51. - cdns,gem # Generic
  52. - cdns,macb # Generic
  53. - cdns,np4-macb # NP4 SoC devices
  54. - microchip,sama7g5-emac # Microchip SAMA7G5 ethernet interface
  55. - microchip,sama7g5-gem # Microchip SAMA7G5 gigabit ethernet interface
  56. - mobileye,eyeq5-gem # Mobileye EyeQ5 SoCs
  57. - raspberrypi,rp1-gem # Raspberry Pi RP1 gigabit ethernet interface
  58. - sifive,fu540-c000-gem # SiFive FU540-C000 SoC
  59. - items:
  60. - enum:
  61. - microchip,sam9x7-gem # Microchip SAM9X7 gigabit ethernet interface
  62. - microchip,sama7d65-gem # Microchip SAMA7D65 gigabit ethernet interface
  63. - const: microchip,sama7g5-gem # Microchip SAMA7G5 gigabit ethernet interface
  64. reg:
  65. minItems: 1
  66. items:
  67. - description: Basic register set
  68. - description: GEMGXL Management block registers on SiFive FU540-C000 SoC
  69. interrupts:
  70. minItems: 1
  71. maxItems: 8
  72. description: One interrupt per available hardware queue
  73. clocks:
  74. minItems: 1
  75. maxItems: 5
  76. clock-names:
  77. minItems: 1
  78. items:
  79. - enum: [ ether_clk, hclk, pclk ]
  80. - enum: [ hclk, pclk ]
  81. - enum: [ tx_clk, tsu_clk ]
  82. - enum: [ rx_clk, tsu_clk ]
  83. - const: tsu_clk
  84. local-mac-address: true
  85. phy-mode: true
  86. phy-handle: true
  87. phys:
  88. maxItems: 1
  89. resets:
  90. maxItems: 1
  91. description:
  92. Recommended with ZynqMP, specify reset control for this
  93. controller instance with zynqmp-reset driver.
  94. reset-names:
  95. maxItems: 1
  96. fixed-link: true
  97. iommus:
  98. maxItems: 1
  99. power-domains:
  100. maxItems: 1
  101. cdns,refclk-ext:
  102. type: boolean
  103. description:
  104. This selects if the REFCLK for RMII is provided by an external source.
  105. For RGMII mode this selects if the 125MHz REF clock is provided by an external
  106. source.
  107. cdns,rx-watermark:
  108. $ref: /schemas/types.yaml#/definitions/uint32
  109. description:
  110. When the receive partial store and forward mode is activated,
  111. the receiver will only begin to forward the packet to the external
  112. AHB or AXI slave when enough packet data is stored in the SRAM packet buffer.
  113. rx-watermark corresponds to the number of SRAM buffer locations,
  114. that need to be filled, before the forwarding process is activated.
  115. Width of the SRAM is platform dependent, and can be 4, 8 or 16 bytes.
  116. '#address-cells':
  117. const: 1
  118. '#size-cells':
  119. const: 0
  120. mdio:
  121. type: object
  122. description:
  123. Node containing PHY children. If this node is not present, then PHYs will
  124. be direct children.
  125. patternProperties:
  126. "^ethernet-phy@[0-9a-f]$":
  127. type: object
  128. $ref: ethernet-phy.yaml#
  129. properties:
  130. reset-gpios: true
  131. magic-packet:
  132. type: boolean
  133. deprecated: true
  134. description:
  135. Indicates that the hardware supports waking up via magic packet.
  136. unevaluatedProperties: false
  137. required:
  138. - compatible
  139. - reg
  140. - interrupts
  141. - clocks
  142. - clock-names
  143. - phy-mode
  144. allOf:
  145. - $ref: ethernet-controller.yaml#
  146. - if:
  147. not:
  148. properties:
  149. compatible:
  150. contains:
  151. const: sifive,fu540-c000-gem
  152. then:
  153. properties:
  154. reg:
  155. maxItems: 1
  156. - if:
  157. properties:
  158. compatible:
  159. contains:
  160. const: mobileye,eyeq5-gem
  161. then:
  162. required:
  163. - phys
  164. unevaluatedProperties: false
  165. examples:
  166. - |
  167. macb0: ethernet@fffc4000 {
  168. compatible = "cdns,macb";
  169. reg = <0xfffc4000 0x4000>;
  170. interrupts = <21>;
  171. cdns,rx-watermark = <0x44>;
  172. phy-mode = "rmii";
  173. local-mac-address = [3a 0e 03 04 05 06];
  174. clock-names = "pclk", "hclk", "tx_clk";
  175. clocks = <&clkc 30>, <&clkc 30>, <&clkc 13>;
  176. #address-cells = <1>;
  177. #size-cells = <0>;
  178. ethernet-phy@1 {
  179. reg = <0x1>;
  180. reset-gpios = <&pioE 6 1>;
  181. };
  182. };
  183. - |
  184. #include <dt-bindings/power/xlnx-zynqmp-power.h>
  185. #include <dt-bindings/reset/xlnx-zynqmp-resets.h>
  186. #include <dt-bindings/phy/phy.h>
  187. bus {
  188. #address-cells = <2>;
  189. #size-cells = <2>;
  190. gem1: ethernet@ff0c0000 {
  191. compatible = "xlnx,zynqmp-gem", "cdns,gem";
  192. interrupt-parent = <&gic>;
  193. interrupts = <0 59 4>, <0 59 4>;
  194. reg = <0x0 0xff0c0000 0x0 0x1000>;
  195. clocks = <&zynqmp_clk 31>, <&zynqmp_clk 105>,
  196. <&zynqmp_clk 51>, <&zynqmp_clk 50>,
  197. <&zynqmp_clk 44>;
  198. clock-names = "pclk", "hclk", "tx_clk", "rx_clk", "tsu_clk";
  199. #address-cells = <1>;
  200. #size-cells = <0>;
  201. iommus = <&smmu 0x875>;
  202. power-domains = <&zynqmp_firmware PD_ETH_1>;
  203. resets = <&zynqmp_reset ZYNQMP_RESET_GEM1>;
  204. reset-names = "gem1_rst";
  205. phy-mode = "sgmii";
  206. phys = <&psgtr 1 PHY_TYPE_SGMII 1 1>;
  207. fixed-link {
  208. speed = <1000>;
  209. full-duplex;
  210. pause;
  211. };
  212. };
  213. };