mediatek,xsphy.yaml 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2. # Copyright (c) 2020 MediaTek
  3. %YAML 1.2
  4. ---
  5. $id: http://devicetree.org/schemas/phy/mediatek,xsphy.yaml#
  6. $schema: http://devicetree.org/meta-schemas/core.yaml#
  7. title: MediaTek XS-PHY Controller
  8. maintainers:
  9. - Chunfeng Yun <chunfeng.yun@mediatek.com>
  10. description: |
  11. The XS-PHY controller supports physical layer functionality for USB3.1
  12. GEN2 controller on MediaTek SoCs.
  13. Banks layout of xsphy
  14. ----------------------------------
  15. port offset bank
  16. u2 port0 0x0000 MISC
  17. 0x0100 FMREG
  18. 0x0300 U2PHY_COM
  19. u2 port1 0x1000 MISC
  20. 0x1100 FMREG
  21. 0x1300 U2PHY_COM
  22. u2 port2 0x2000 MISC
  23. ...
  24. u31 common 0x3000 DIG_GLB
  25. 0x3100 PHYA_GLB
  26. u31 port0 0x3400 DIG_LN_TOP
  27. 0x3500 DIG_LN_TX0
  28. 0x3600 DIG_LN_RX0
  29. 0x3700 DIG_LN_DAIF
  30. 0x3800 PHYA_LN
  31. u31 port1 0x3a00 DIG_LN_TOP
  32. 0x3b00 DIG_LN_TX0
  33. 0x3c00 DIG_LN_RX0
  34. 0x3d00 DIG_LN_DAIF
  35. 0x3e00 PHYA_LN
  36. ...
  37. DIG_GLB & PHYA_GLB are shared by U31 ports.
  38. properties:
  39. $nodename:
  40. pattern: "^xs-phy@[0-9a-f]+$"
  41. compatible:
  42. items:
  43. - enum:
  44. - mediatek,mt3611-xsphy
  45. - mediatek,mt3612-xsphy
  46. - const: mediatek,xsphy
  47. reg:
  48. description:
  49. Register shared by multiple U3 ports, exclude port's private register,
  50. if only U2 ports provided, shouldn't use the property.
  51. maxItems: 1
  52. "#address-cells":
  53. enum: [1, 2]
  54. "#size-cells":
  55. enum: [1, 2]
  56. ranges: true
  57. mediatek,src-ref-clk-mhz:
  58. description:
  59. Frequency of reference clock for slew rate calibrate
  60. default: 26
  61. mediatek,src-coef:
  62. description:
  63. Coefficient for slew rate calibrate, depends on SoC process
  64. $ref: /schemas/types.yaml#/definitions/uint32
  65. default: 17
  66. # Required child node:
  67. patternProperties:
  68. "^usb-phy@[0-9a-f]+$":
  69. type: object
  70. description:
  71. A sub-node is required for each port the controller provides.
  72. Address range information including the usual 'reg' property
  73. is used inside these nodes to describe the controller's topology.
  74. properties:
  75. reg:
  76. maxItems: 1
  77. clocks:
  78. items:
  79. - description: Reference clock, (HS is 48Mhz, SS/P is 24~27Mhz)
  80. clock-names:
  81. items:
  82. - const: ref
  83. "#phy-cells":
  84. const: 1
  85. description: |
  86. The cells contain the following arguments.
  87. - description: The PHY type
  88. enum:
  89. - PHY_TYPE_USB2
  90. - PHY_TYPE_USB3
  91. # The following optional vendor properties are only for debug or HQA test
  92. mediatek,eye-src:
  93. description:
  94. The value of slew rate calibrate (U2 phy)
  95. $ref: /schemas/types.yaml#/definitions/uint32
  96. minimum: 1
  97. maximum: 7
  98. mediatek,eye-vrt:
  99. description:
  100. The selection of VRT reference voltage (U2 phy)
  101. $ref: /schemas/types.yaml#/definitions/uint32
  102. minimum: 1
  103. maximum: 7
  104. mediatek,eye-term:
  105. description:
  106. The selection of HS_TX TERM reference voltage (U2 phy)
  107. $ref: /schemas/types.yaml#/definitions/uint32
  108. minimum: 1
  109. maximum: 7
  110. mediatek,efuse-intr:
  111. description:
  112. The selection of Internal Resistor (U2/U3 phy)
  113. $ref: /schemas/types.yaml#/definitions/uint32
  114. minimum: 1
  115. maximum: 63
  116. mediatek,efuse-tx-imp:
  117. description:
  118. The selection of TX Impedance (U3 phy)
  119. $ref: /schemas/types.yaml#/definitions/uint32
  120. minimum: 1
  121. maximum: 31
  122. mediatek,efuse-rx-imp:
  123. description:
  124. The selection of RX Impedance (U3 phy)
  125. $ref: /schemas/types.yaml#/definitions/uint32
  126. minimum: 1
  127. maximum: 31
  128. required:
  129. - reg
  130. - clocks
  131. - clock-names
  132. - "#phy-cells"
  133. additionalProperties: false
  134. required:
  135. - compatible
  136. - "#address-cells"
  137. - "#size-cells"
  138. - ranges
  139. additionalProperties: false
  140. examples:
  141. - |
  142. #include <dt-bindings/phy/phy.h>
  143. u3phy: xs-phy@11c40000 {
  144. compatible = "mediatek,mt3611-xsphy", "mediatek,xsphy";
  145. reg = <0x11c43000 0x0200>;
  146. mediatek,src-ref-clk-mhz = <26>;
  147. mediatek,src-coef = <17>;
  148. #address-cells = <1>;
  149. #size-cells = <1>;
  150. ranges;
  151. u2port0: usb-phy@11c40000 {
  152. reg = <0x11c40000 0x0400>;
  153. clocks = <&clk48m>;
  154. clock-names = "ref";
  155. mediatek,eye-src = <4>;
  156. #phy-cells = <1>;
  157. };
  158. u3port0: usb-phy@11c43000 {
  159. reg = <0x11c43400 0x0500>;
  160. clocks = <&clk26m>;
  161. clock-names = "ref";
  162. mediatek,efuse-intr = <28>;
  163. #phy-cells = <1>;
  164. };
  165. };
  166. ...