phy-mtk-xsphy.txt 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. MediaTek XS-PHY binding
  2. --------------------------
  3. The XS-PHY controller supports physical layer functionality for USB3.1
  4. GEN2 controller on MediaTek SoCs.
  5. Required properties (controller (parent) node):
  6. - compatible : should be "mediatek,<soc-model>-xsphy", "mediatek,xsphy",
  7. soc-model is the name of SoC, such as mt3611 etc;
  8. when using "mediatek,xsphy" compatible string, you need SoC specific
  9. ones in addition, one of:
  10. - "mediatek,mt3611-xsphy"
  11. - #address-cells, #size-cells : should use the same values as the root node
  12. - ranges: must be present
  13. Optional properties (controller (parent) node):
  14. - reg : offset and length of register shared by multiple U3 ports,
  15. exclude port's private register, if only U2 ports provided,
  16. shouldn't use the property.
  17. - mediatek,src-ref-clk-mhz : u32, frequency of reference clock for slew rate
  18. calibrate
  19. - mediatek,src-coef : u32, coefficient for slew rate calibrate, depends on
  20. SoC process
  21. Required nodes : a sub-node is required for each port the controller
  22. provides. Address range information including the usual
  23. 'reg' property is used inside these nodes to describe
  24. the controller's topology.
  25. Required properties (port (child) node):
  26. - reg : address and length of the register set for the port.
  27. - clocks : a list of phandle + clock-specifier pairs, one for each
  28. entry in clock-names
  29. - clock-names : must contain
  30. "ref": 48M reference clock for HighSpeed analog phy; and 26M
  31. reference clock for SuperSpeedPlus analog phy, sometimes is
  32. 24M, 25M or 27M, depended on platform.
  33. - #phy-cells : should be 1
  34. cell after port phandle is phy type from:
  35. - PHY_TYPE_USB2
  36. - PHY_TYPE_USB3
  37. The following optional properties are only for debug or HQA test
  38. Optional properties (PHY_TYPE_USB2 port (child) node):
  39. - mediatek,eye-src : u32, the value of slew rate calibrate
  40. - mediatek,eye-vrt : u32, the selection of VRT reference voltage
  41. - mediatek,eye-term : u32, the selection of HS_TX TERM reference voltage
  42. - mediatek,efuse-intr : u32, the selection of Internal Resistor
  43. Optional properties (PHY_TYPE_USB3 port (child) node):
  44. - mediatek,efuse-intr : u32, the selection of Internal Resistor
  45. - mediatek,efuse-tx-imp : u32, the selection of TX Impedance
  46. - mediatek,efuse-rx-imp : u32, the selection of RX Impedance
  47. Banks layout of xsphy
  48. -------------------------------------------------------------
  49. port offset bank
  50. u2 port0 0x0000 MISC
  51. 0x0100 FMREG
  52. 0x0300 U2PHY_COM
  53. u2 port1 0x1000 MISC
  54. 0x1100 FMREG
  55. 0x1300 U2PHY_COM
  56. u2 port2 0x2000 MISC
  57. ...
  58. u31 common 0x3000 DIG_GLB
  59. 0x3100 PHYA_GLB
  60. u31 port0 0x3400 DIG_LN_TOP
  61. 0x3500 DIG_LN_TX0
  62. 0x3600 DIG_LN_RX0
  63. 0x3700 DIG_LN_DAIF
  64. 0x3800 PHYA_LN
  65. u31 port1 0x3a00 DIG_LN_TOP
  66. 0x3b00 DIG_LN_TX0
  67. 0x3c00 DIG_LN_RX0
  68. 0x3d00 DIG_LN_DAIF
  69. 0x3e00 PHYA_LN
  70. ...
  71. DIG_GLB & PHYA_GLB are shared by U31 ports.
  72. Example:
  73. u3phy: usb-phy@11c40000 {
  74. compatible = "mediatek,mt3611-xsphy", "mediatek,xsphy";
  75. reg = <0 0x11c43000 0 0x0200>;
  76. mediatek,src-ref-clk-mhz = <26>;
  77. mediatek,src-coef = <17>;
  78. #address-cells = <2>;
  79. #size-cells = <2>;
  80. ranges;
  81. u2port0: usb-phy@11c40000 {
  82. reg = <0 0x11c40000 0 0x0400>;
  83. clocks = <&clk48m>;
  84. clock-names = "ref";
  85. mediatek,eye-src = <4>;
  86. #phy-cells = <1>;
  87. };
  88. u3port0: usb-phy@11c43000 {
  89. reg = <0 0x11c43400 0 0x0500>;
  90. clocks = <&clk26m>;
  91. clock-names = "ref";
  92. mediatek,efuse-intr = <28>;
  93. #phy-cells = <1>;
  94. };
  95. };