amlogic,meson-dwmac.yaml 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
  2. # Copyright 2019 BayLibre, SAS
  3. %YAML 1.2
  4. ---
  5. $id: http://devicetree.org/schemas/net/amlogic,meson-dwmac.yaml#
  6. $schema: http://devicetree.org/meta-schemas/core.yaml#
  7. title: Amlogic Meson DWMAC Ethernet controller
  8. maintainers:
  9. - Neil Armstrong <neil.armstrong@linaro.org>
  10. - Martin Blumenstingl <martin.blumenstingl@googlemail.com>
  11. # We need a select here so we don't match all nodes with 'snps,dwmac'
  12. select:
  13. properties:
  14. compatible:
  15. contains:
  16. enum:
  17. - amlogic,meson6-dwmac
  18. - amlogic,meson8b-dwmac
  19. - amlogic,meson8m2-dwmac
  20. - amlogic,meson-gxbb-dwmac
  21. - amlogic,meson-axg-dwmac
  22. - amlogic,meson-g12a-dwmac
  23. required:
  24. - compatible
  25. allOf:
  26. - $ref: snps,dwmac.yaml#
  27. - if:
  28. properties:
  29. compatible:
  30. contains:
  31. enum:
  32. - amlogic,meson8b-dwmac
  33. - amlogic,meson8m2-dwmac
  34. - amlogic,meson-gxbb-dwmac
  35. - amlogic,meson-axg-dwmac
  36. - amlogic,meson-g12a-dwmac
  37. then:
  38. properties:
  39. clocks:
  40. minItems: 3
  41. items:
  42. - description: GMAC main clock
  43. - description: First parent clock of the internal mux
  44. - description: Second parent clock of the internal mux
  45. - description: The clock which drives the timing adjustment logic
  46. clock-names:
  47. minItems: 3
  48. items:
  49. - const: stmmaceth
  50. - const: clkin0
  51. - const: clkin1
  52. - const: timing-adjustment
  53. amlogic,tx-delay-ns:
  54. enum: [0, 2, 4, 6]
  55. default: 2
  56. description:
  57. The internal RGMII TX clock delay (provided by this driver)
  58. in nanoseconds. When phy-mode is set to "rgmii" then the TX
  59. delay should be explicitly configured. When the phy-mode is
  60. set to either "rgmii-id" or "rgmii-txid" the TX clock delay
  61. is already provided by the PHY. In that case this property
  62. should be set to 0ns (which disables the TX clock delay in
  63. the MAC to prevent the clock from going off because both
  64. PHY and MAC are adding a delay). Any configuration is
  65. ignored when the phy-mode is set to "rmii".
  66. amlogic,rx-delay-ns:
  67. deprecated: true
  68. enum:
  69. - 0
  70. - 2
  71. default: 0
  72. description:
  73. The internal RGMII RX clock delay in nanoseconds. Deprecated, use
  74. rx-internal-delay-ps instead.
  75. rx-internal-delay-ps:
  76. default: 0
  77. - if:
  78. properties:
  79. compatible:
  80. contains:
  81. enum:
  82. - amlogic,meson8b-dwmac
  83. - amlogic,meson8m2-dwmac
  84. - amlogic,meson-gxbb-dwmac
  85. - amlogic,meson-axg-dwmac
  86. then:
  87. properties:
  88. rx-internal-delay-ps:
  89. enum:
  90. - 0
  91. - 2000
  92. - if:
  93. properties:
  94. compatible:
  95. contains:
  96. enum:
  97. - amlogic,meson-g12a-dwmac
  98. then:
  99. properties:
  100. rx-internal-delay-ps:
  101. enum:
  102. - 0
  103. - 200
  104. - 400
  105. - 600
  106. - 800
  107. - 1000
  108. - 1200
  109. - 1400
  110. - 1600
  111. - 1800
  112. - 2000
  113. - 2200
  114. - 2400
  115. - 2600
  116. - 2800
  117. - 3000
  118. properties:
  119. compatible:
  120. additionalItems: true
  121. maxItems: 3
  122. items:
  123. - enum:
  124. - amlogic,meson6-dwmac
  125. - amlogic,meson8b-dwmac
  126. - amlogic,meson8m2-dwmac
  127. - amlogic,meson-gxbb-dwmac
  128. - amlogic,meson-axg-dwmac
  129. - amlogic,meson-g12a-dwmac
  130. contains:
  131. enum:
  132. - snps,dwmac-3.70a
  133. - snps,dwmac
  134. reg:
  135. items:
  136. - description:
  137. The first register range should be the one of the DWMAC controller
  138. - description:
  139. The second range is for the Amlogic specific configuration
  140. (for example the PRG_ETHERNET register range on Meson8b and newer)
  141. interrupts:
  142. maxItems: 1
  143. interrupt-names:
  144. const: macirq
  145. required:
  146. - compatible
  147. - reg
  148. - interrupts
  149. - interrupt-names
  150. - clocks
  151. - clock-names
  152. - phy-mode
  153. unevaluatedProperties: false
  154. examples:
  155. - |
  156. ethmac: ethernet@c9410000 {
  157. compatible = "amlogic,meson-gxbb-dwmac", "snps,dwmac";
  158. reg = <0xc9410000 0x10000>, <0xc8834540 0x8>;
  159. interrupts = <8>;
  160. interrupt-names = "macirq";
  161. clocks = <&clk_eth>, <&clk_fclk_div2>, <&clk_mpll2>, <&clk_fclk_div2>;
  162. clock-names = "stmmaceth", "clkin0", "clkin1", "timing-adjustment";
  163. phy-mode = "rgmii";
  164. };