realtek,usb2phy.yaml 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
  2. # Copyright 2023 Realtek Semiconductor Corporation
  3. %YAML 1.2
  4. ---
  5. $id: http://devicetree.org/schemas/phy/realtek,usb2phy.yaml#
  6. $schema: http://devicetree.org/meta-schemas/core.yaml#
  7. title: Realtek DHC SoCs USB 2.0 PHY
  8. maintainers:
  9. - Stanley Chang <stanley_chang@realtek.com>
  10. description: |
  11. Realtek USB 2.0 PHY support the digital home center (DHC) RTD series SoCs.
  12. The USB 2.0 PHY driver is designed to support the XHCI controller. The SoCs
  13. support multiple XHCI controllers. One PHY device node maps to one XHCI
  14. controller.
  15. RTD1295/RTD1619 SoCs USB
  16. The USB architecture includes three XHCI controllers.
  17. Each XHCI maps to one USB 2.0 PHY and map one USB 3.0 PHY on some
  18. controllers.
  19. XHCI controller#0 -- usb2phy -- phy#0
  20. |- usb3phy -- phy#0
  21. XHCI controller#1 -- usb2phy -- phy#0
  22. XHCI controller#2 -- usb2phy -- phy#0
  23. |- usb3phy -- phy#0
  24. RTD1395 SoCs USB
  25. The USB architecture includes two XHCI controllers.
  26. The controller#0 has one USB 2.0 PHY. The controller#1 includes two USB 2.0
  27. PHY.
  28. XHCI controller#0 -- usb2phy -- phy#0
  29. XHCI controller#1 -- usb2phy -- phy#0
  30. |- phy#1
  31. RTD1319/RTD1619b SoCs USB
  32. The USB architecture includes three XHCI controllers.
  33. Each XHCI maps to one USB 2.0 PHY and map one USB 3.0 PHY on controllers#2.
  34. XHCI controller#0 -- usb2phy -- phy#0
  35. XHCI controller#1 -- usb2phy -- phy#0
  36. XHCI controller#2 -- usb2phy -- phy#0
  37. |- usb3phy -- phy#0
  38. RTD1319d SoCs USB
  39. The USB architecture includes three XHCI controllers.
  40. Each xhci maps to one USB 2.0 PHY and map one USB 3.0 PHY on controllers#0.
  41. XHCI controller#0 -- usb2phy -- phy#0
  42. |- usb3phy -- phy#0
  43. XHCI controller#1 -- usb2phy -- phy#0
  44. XHCI controller#2 -- usb2phy -- phy#0
  45. RTD1312c/RTD1315e SoCs USB
  46. The USB architecture includes three XHCI controllers.
  47. Each XHCI maps to one USB 2.0 PHY.
  48. XHCI controller#0 -- usb2phy -- phy#0
  49. XHCI controller#1 -- usb2phy -- phy#0
  50. XHCI controller#2 -- usb2phy -- phy#0
  51. properties:
  52. compatible:
  53. enum:
  54. - realtek,rtd1295-usb2phy
  55. - realtek,rtd1312c-usb2phy
  56. - realtek,rtd1315e-usb2phy
  57. - realtek,rtd1319-usb2phy
  58. - realtek,rtd1319d-usb2phy
  59. - realtek,rtd1395-usb2phy
  60. - realtek,rtd1395-usb2phy-2port
  61. - realtek,rtd1619-usb2phy
  62. - realtek,rtd1619b-usb2phy
  63. reg:
  64. items:
  65. - description: PHY data registers
  66. - description: PHY control registers
  67. "#phy-cells":
  68. const: 0
  69. nvmem-cells:
  70. maxItems: 2
  71. description:
  72. Phandles to nvmem cell that contains the trimming data.
  73. If unspecified, default value is used.
  74. nvmem-cell-names:
  75. items:
  76. - const: usb-dc-cal
  77. - const: usb-dc-dis
  78. description:
  79. The following names, which correspond to each nvmem-cells.
  80. usb-dc-cal is the driving level for each phy specified via efuse.
  81. usb-dc-dis is the disconnection level for each phy specified via efuse.
  82. realtek,inverse-hstx-sync-clock:
  83. description:
  84. For one of the phys of RTD1619b SoC, the synchronous clock of the
  85. high-speed tx must be inverted.
  86. type: boolean
  87. realtek,driving-level:
  88. description:
  89. Control the magnitude of High speed Dp/Dm output swing (mV).
  90. For a different board or port, the original magnitude maybe not meet
  91. the specification. In this situation we can adjust the value to meet
  92. the specification.
  93. $ref: /schemas/types.yaml#/definitions/uint32
  94. default: 8
  95. minimum: 0
  96. maximum: 31
  97. realtek,driving-level-compensate:
  98. description:
  99. For RTD1315e SoC, the driving level can be adjusted by reading the
  100. efuse table. This property provides drive compensation.
  101. If the magnitude of High speed Dp/Dm output swing still not meet the
  102. specification, then we can set this value to meet the specification.
  103. $ref: /schemas/types.yaml#/definitions/int32
  104. default: 0
  105. minimum: -8
  106. maximum: 8
  107. realtek,disconnection-compensate:
  108. description:
  109. This adjusts the disconnection level compensation for the different
  110. boards with different disconnection level.
  111. $ref: /schemas/types.yaml#/definitions/int32
  112. default: 0
  113. minimum: -8
  114. maximum: 8
  115. required:
  116. - compatible
  117. - reg
  118. - "#phy-cells"
  119. allOf:
  120. - if:
  121. not:
  122. properties:
  123. compatible:
  124. contains:
  125. enum:
  126. - realtek,rtd1619b-usb2phy
  127. then:
  128. properties:
  129. realtek,inverse-hstx-sync-clock: false
  130. - if:
  131. not:
  132. properties:
  133. compatible:
  134. contains:
  135. enum:
  136. - realtek,rtd1315e-usb2phy
  137. then:
  138. properties:
  139. realtek,driving-level-compensate: false
  140. additionalProperties: false
  141. examples:
  142. - |
  143. usb-phy@13214 {
  144. compatible = "realtek,rtd1619b-usb2phy";
  145. reg = <0x13214 0x4>, <0x28280 0x4>;
  146. #phy-cells = <0>;
  147. nvmem-cells = <&otp_usb_port0_dc_cal>, <&otp_usb_port0_dc_dis>;
  148. nvmem-cell-names = "usb-dc-cal", "usb-dc-dis";
  149. realtek,inverse-hstx-sync-clock;
  150. realtek,driving-level = <0xa>;
  151. realtek,disconnection-compensate = <(-1)>;
  152. };