rockchip,inno-usb2phy.yaml 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. # SPDX-License-Identifier: GPL-2.0
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/phy/rockchip,inno-usb2phy.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Rockchip USB2.0 phy with inno IP block
  7. maintainers:
  8. - Heiko Stuebner <heiko@sntech.de>
  9. properties:
  10. compatible:
  11. enum:
  12. - rockchip,px30-usb2phy
  13. - rockchip,rk3128-usb2phy
  14. - rockchip,rk3228-usb2phy
  15. - rockchip,rk3308-usb2phy
  16. - rockchip,rk3328-usb2phy
  17. - rockchip,rk3366-usb2phy
  18. - rockchip,rk3399-usb2phy
  19. - rockchip,rk3568-usb2phy
  20. - rockchip,rk3588-usb2phy
  21. - rockchip,rv1108-usb2phy
  22. reg:
  23. maxItems: 1
  24. clock-output-names:
  25. description:
  26. The usb 480m output clock name.
  27. "#clock-cells":
  28. const: 0
  29. clocks:
  30. maxItems: 1
  31. clock-names:
  32. const: phyclk
  33. assigned-clocks:
  34. description:
  35. Phandle of the usb 480m clock.
  36. assigned-clock-parents:
  37. description:
  38. Parent of the usb 480m clock.
  39. Select between usb-phy output 480m and xin24m.
  40. Refer to clk/clock-bindings.txt for generic clock consumer properties.
  41. extcon:
  42. description:
  43. Phandle to the extcon device providing the cable state for the otg phy.
  44. interrupts:
  45. description: Muxed interrupt for both ports
  46. maxItems: 1
  47. resets:
  48. maxItems: 2
  49. reset-names:
  50. items:
  51. - const: phy
  52. - const: apb
  53. rockchip,usbgrf:
  54. $ref: /schemas/types.yaml#/definitions/phandle
  55. description:
  56. Phandle to the syscon managing the 'usb general register files'.
  57. When set the driver will request its phandle as one companion-grf
  58. for some special SoCs (e.g rv1108).
  59. host-port:
  60. type: object
  61. additionalProperties: false
  62. properties:
  63. "#phy-cells":
  64. const: 0
  65. interrupts:
  66. description: host linestate interrupt
  67. maxItems: 1
  68. interrupt-names:
  69. const: linestate
  70. phy-supply:
  71. description:
  72. Phandle to a regulator that provides power to VBUS.
  73. See ./phy-bindings.txt for details.
  74. required:
  75. - "#phy-cells"
  76. otg-port:
  77. type: object
  78. additionalProperties: false
  79. properties:
  80. "#phy-cells":
  81. const: 0
  82. interrupts:
  83. minItems: 1
  84. maxItems: 3
  85. interrupt-names:
  86. oneOf:
  87. - const: linestate
  88. - const: otg-mux
  89. - items:
  90. - const: otg-bvalid
  91. - const: otg-id
  92. - const: linestate
  93. phy-supply:
  94. description:
  95. Phandle to a regulator that provides power to VBUS.
  96. See ./phy-bindings.txt for details.
  97. required:
  98. - "#phy-cells"
  99. required:
  100. - compatible
  101. - reg
  102. - clock-output-names
  103. - "#clock-cells"
  104. anyOf:
  105. - required:
  106. - otg-port
  107. - required:
  108. - host-port
  109. allOf:
  110. - if:
  111. properties:
  112. compatible:
  113. contains:
  114. enum:
  115. - rockchip,rk3568-usb2phy
  116. - rockchip,rk3588-usb2phy
  117. then:
  118. properties:
  119. host-port:
  120. properties:
  121. interrupts: false
  122. otg-port:
  123. properties:
  124. interrupts: false
  125. required:
  126. - interrupts
  127. else:
  128. properties:
  129. interrupts: false
  130. host-port:
  131. required:
  132. - interrupts
  133. - interrupt-names
  134. otg-port:
  135. required:
  136. - interrupts
  137. - interrupt-names
  138. additionalProperties: false
  139. examples:
  140. - |
  141. #include <dt-bindings/clock/rk3399-cru.h>
  142. #include <dt-bindings/interrupt-controller/arm-gic.h>
  143. #include <dt-bindings/interrupt-controller/irq.h>
  144. u2phy0: usb2phy@e450 {
  145. compatible = "rockchip,rk3399-usb2phy";
  146. reg = <0xe450 0x10>;
  147. clocks = <&cru SCLK_USB2PHY0_REF>;
  148. clock-names = "phyclk";
  149. clock-output-names = "clk_usbphy0_480m";
  150. #clock-cells = <0>;
  151. u2phy0_host: host-port {
  152. interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH 0>;
  153. interrupt-names = "linestate";
  154. #phy-cells = <0>;
  155. };
  156. u2phy0_otg: otg-port {
  157. interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH 0>,
  158. <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH 0>,
  159. <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH 0>;
  160. interrupt-names = "otg-bvalid", "otg-id", "linestate";
  161. #phy-cells = <0>;
  162. };
  163. };