ti,phy-gmii-sel.yaml 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2. # Copyright (C) 2020 Texas Instruments Incorporated - http://www.ti.com/
  3. %YAML 1.2
  4. ---
  5. $id: http://devicetree.org/schemas/phy/ti,phy-gmii-sel.yaml#
  6. $schema: http://devicetree.org/meta-schemas/core.yaml#
  7. title: CPSW Port's Interface Mode Selection PHY
  8. maintainers:
  9. - Kishon Vijay Abraham I <kishon@ti.com>
  10. description: |
  11. TI am335x/am437x/dra7(am5)/dm814x CPSW3G Ethernet Subsystem supports
  12. two 10/100/1000 Ethernet ports with selectable G/MII, RMII, and RGMII interfaces.
  13. The interface mode is selected by configuring the MII mode selection register(s)
  14. (GMII_SEL) in the System Control Module chapter (SCM). GMII_SEL register(s) and
  15. bit fields placement in SCM are different between SoCs while fields meaning
  16. is the same.
  17. +--------------+
  18. +-------------------------------+ |SCM |
  19. | CPSW | | +---------+ |
  20. | +--------------------------------+gmii_sel | |
  21. | | | | +---------+ |
  22. | +----v---+ +--------+ | +--------------+
  23. | |Port 1..<--+-->GMII/MII<------->
  24. | | | | | | |
  25. | +--------+ | +--------+ |
  26. | | |
  27. | | +--------+ |
  28. | | | RMII <------->
  29. | +--> | |
  30. | | +--------+ |
  31. | | |
  32. | | +--------+ |
  33. | | | RGMII <------->
  34. | +--> | |
  35. | +--------+ |
  36. +-------------------------------+
  37. CPSW Port's Interface Mode Selection PHY describes MII interface mode between
  38. CPSW Port and Ethernet PHY which depends on Eth PHY and board configuration.
  39. |
  40. CPSW Port's Interface Mode Selection PHY device should defined as child device
  41. of SCM node (scm_conf) and can be attached to each CPSW port node using standard
  42. PHY bindings.
  43. properties:
  44. compatible:
  45. enum:
  46. - ti,am3352-phy-gmii-sel
  47. - ti,dra7xx-phy-gmii-sel
  48. - ti,am43xx-phy-gmii-sel
  49. - ti,dm814-phy-gmii-sel
  50. - ti,am654-phy-gmii-sel
  51. - ti,j7200-cpsw5g-phy-gmii-sel
  52. - ti,j721e-cpsw9g-phy-gmii-sel
  53. - ti,j784s4-cpsw9g-phy-gmii-sel
  54. reg:
  55. maxItems: 1
  56. '#phy-cells': true
  57. ti,qsgmii-main-ports:
  58. $ref: /schemas/types.yaml#/definitions/uint32-array
  59. description: |
  60. Required only for QSGMII mode. Array to select the port/s for QSGMII
  61. main mode. The size of the array corresponds to the number of QSGMII
  62. interfaces and thus, the number of distinct QSGMII main ports,
  63. supported by the device. If the device supports two QSGMII interfaces
  64. but only one QSGMII interface is desired, repeat the QSGMII main port
  65. value corresponding to the QSGMII interface in the array.
  66. minItems: 1
  67. maxItems: 2
  68. items:
  69. minimum: 1
  70. maximum: 8
  71. allOf:
  72. - if:
  73. properties:
  74. compatible:
  75. contains:
  76. enum:
  77. - ti,dra7xx-phy-gmii-sel
  78. - ti,dm814-phy-gmii-sel
  79. - ti,am654-phy-gmii-sel
  80. - ti,j7200-cpsw5g-phy-gmii-sel
  81. - ti,j721e-cpsw9g-phy-gmii-sel
  82. - ti,j784s4-cpsw9g-phy-gmii-sel
  83. then:
  84. properties:
  85. '#phy-cells':
  86. const: 1
  87. description: CPSW port number (starting from 1)
  88. - if:
  89. properties:
  90. compatible:
  91. contains:
  92. enum:
  93. - ti,j7200-cpsw5g-phy-gmii-sel
  94. then:
  95. properties:
  96. ti,qsgmii-main-ports:
  97. maxItems: 1
  98. items:
  99. minimum: 1
  100. maximum: 4
  101. - if:
  102. properties:
  103. compatible:
  104. contains:
  105. enum:
  106. - ti,j721e-cpsw9g-phy-gmii-sel
  107. - ti,j784s4-cpsw9g-phy-gmii-sel
  108. then:
  109. properties:
  110. ti,qsgmii-main-ports:
  111. minItems: 2
  112. maxItems: 2
  113. items:
  114. minimum: 1
  115. maximum: 8
  116. - if:
  117. not:
  118. properties:
  119. compatible:
  120. contains:
  121. enum:
  122. - ti,j7200-cpsw5g-phy-gmii-sel
  123. - ti,j721e-cpsw9g-phy-gmii-sel
  124. - ti,j784s4-cpsw9g-phy-gmii-sel
  125. then:
  126. properties:
  127. ti,qsgmii-main-ports: false
  128. - if:
  129. properties:
  130. compatible:
  131. contains:
  132. enum:
  133. - ti,am3352-phy-gmii-sel
  134. - ti,am43xx-phy-gmii-sel
  135. then:
  136. properties:
  137. '#phy-cells':
  138. const: 2
  139. description: |
  140. - CPSW port number (starting from 1)
  141. - RMII refclk mode
  142. required:
  143. - compatible
  144. - reg
  145. - '#phy-cells'
  146. additionalProperties: false
  147. examples:
  148. - |
  149. phy_gmii_sel: phy@650 {
  150. compatible = "ti,am3352-phy-gmii-sel";
  151. reg = <0x650 0x4>;
  152. #phy-cells = <2>;
  153. };