ti-phy.txt 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409
  1. TI PHY: DT DOCUMENTATION FOR PHYs in TI PLATFORMs
  2. OMAP CONTROL PHY
  3. Required properties:
  4. - compatible: Should be one of
  5. "ti,control-phy-otghs" - if it has otghs_control mailbox register as on OMAP4.
  6. "ti,control-phy-usb2" - if it has Power down bit in control_dev_conf register
  7. e.g. USB2_PHY on OMAP5.
  8. "ti,control-phy-pipe3" - if it has DPLL and individual Rx & Tx power control
  9. e.g. USB3 PHY and SATA PHY on OMAP5.
  10. "ti,control-phy-pcie" - for pcie to support external clock for pcie and to
  11. set PCS delay value.
  12. e.g. PCIE PHY in DRA7x
  13. "ti,control-phy-usb2-dra7" - if it has power down register like USB2 PHY on
  14. DRA7 platform.
  15. "ti,control-phy-usb2-am437" - if it has power down register like USB2 PHY on
  16. AM437 platform.
  17. - reg : register ranges as listed in the reg-names property
  18. - reg-names: "otghs_control" for control-phy-otghs
  19. "power", "pcie_pcs" and "control_sma" for control-phy-pcie
  20. "power" for all other types
  21. omap_control_usb: omap-control-usb@4a002300 {
  22. compatible = "ti,control-phy-otghs";
  23. reg = <0x4a00233c 0x4>;
  24. reg-names = "otghs_control";
  25. };
  26. OMAP USB2 PHY
  27. Required properties:
  28. - compatible: Should be "ti,omap-usb2"
  29. Should be "ti,dra7x-usb2" for the 1st instance of USB2 PHY on
  30. DRA7x
  31. Should be "ti,dra7x-usb2-phy2" for the 2nd instance of USB2 PHY
  32. in DRA7x
  33. - reg : Address and length of the register set for the device.
  34. - #phy-cells: determine the number of cells that should be given in the
  35. phandle while referencing this phy.
  36. - clocks: a list of phandles and clock-specifier pairs, one for each entry in
  37. clock-names.
  38. - clock-names: should include:
  39. * "wkupclk" - wakeup clock.
  40. * "refclk" - reference clock (optional).
  41. Deprecated properties:
  42. - ctrl-module : phandle of the control module used by PHY driver to power on
  43. the PHY.
  44. Recommended properies:
  45. - syscon-phy-power : phandle/offset pair. Phandle to the system control
  46. module and the register offset to power on/off the PHY.
  47. This is usually a subnode of ocp2scp to which it is connected.
  48. usb2phy@4a0ad080 {
  49. compatible = "ti,omap-usb2";
  50. reg = <0x4a0ad080 0x58>;
  51. ctrl-module = <&omap_control_usb>;
  52. #phy-cells = <0>;
  53. clocks = <&usb_phy_cm_clk32k>, <&usb_otg_ss_refclk960m>;
  54. clock-names = "wkupclk", "refclk";
  55. };
  56. TI PIPE3 PHY
  57. Required properties:
  58. - compatible: Should be "ti,phy-usb3", "ti,phy-pipe3-sata" or
  59. "ti,phy-pipe3-pcie. "ti,omap-usb3" is deprecated.
  60. - reg : Address and length of the register set for the device.
  61. - reg-names: The names of the register addresses corresponding to the registers
  62. filled in "reg".
  63. - #phy-cells: determine the number of cells that should be given in the
  64. phandle while referencing this phy.
  65. - clocks: a list of phandles and clock-specifier pairs, one for each entry in
  66. clock-names.
  67. - clock-names: should include:
  68. * "wkupclk" - wakeup clock.
  69. * "sysclk" - system clock.
  70. * "refclk" - reference clock.
  71. * "dpll_ref" - external dpll ref clk
  72. * "dpll_ref_m2" - external dpll ref clk
  73. * "phy-div" - divider for apll
  74. * "div-clk" - apll clock
  75. Optional properties:
  76. - id: If there are multiple instance of the same type, in order to
  77. differentiate between each instance "id" can be used (e.g., multi-lane PCIe
  78. PHY). If "id" is not provided, it is set to default value of '1'.
  79. - syscon-pllreset: Handle to system control region that contains the
  80. CTRL_CORE_SMA_SW_0 register and register offset to the CTRL_CORE_SMA_SW_0
  81. register that contains the SATA_PLL_SOFT_RESET bit. Only valid for sata_phy.
  82. - syscon-pcs : phandle/offset pair. Phandle to the system control module and the
  83. register offset to write the PCS delay value.
  84. Deprecated properties:
  85. - ctrl-module : phandle of the control module used by PHY driver to power on
  86. the PHY.
  87. Recommended properies:
  88. - syscon-phy-power : phandle/offset pair. Phandle to the system control
  89. module and the register offset to power on/off the PHY.
  90. This is usually a subnode of ocp2scp to which it is connected.
  91. usb3phy@4a084400 {
  92. compatible = "ti,phy-usb3";
  93. reg = <0x4a084400 0x80>,
  94. <0x4a084800 0x64>,
  95. <0x4a084c00 0x40>;
  96. reg-names = "phy_rx", "phy_tx", "pll_ctrl";
  97. ctrl-module = <&omap_control_usb>;
  98. #phy-cells = <0>;
  99. clocks = <&usb_phy_cm_clk32k>,
  100. <&sys_clkin>,
  101. <&usb_otg_ss_refclk960m>;
  102. clock-names = "wkupclk",
  103. "sysclk",
  104. "refclk";
  105. };
  106. sata_phy: phy@4A096000 {
  107. compatible = "ti,phy-pipe3-sata";
  108. reg = <0x4A096000 0x80>, /* phy_rx */
  109. <0x4A096400 0x64>, /* phy_tx */
  110. <0x4A096800 0x40>; /* pll_ctrl */
  111. reg-names = "phy_rx", "phy_tx", "pll_ctrl";
  112. ctrl-module = <&omap_control_sata>;
  113. clocks = <&sys_clkin1>, <&sata_ref_clk>;
  114. clock-names = "sysclk", "refclk";
  115. syscon-pllreset = <&scm_conf 0x3fc>;
  116. #phy-cells = <0>;
  117. TI Keystone SerDes PHY
  118. ======================
  119. Required properties:
  120. - compatible: should be one of
  121. * "ti,keystone-serdes-gbe"
  122. * "ti,keystone-serdes-xgbe"
  123. * "ti,keystone-serdes-pcie"
  124. - reg:
  125. * base address and length of the SerDes register set
  126. - num-lanes:
  127. * Number of lanes in SerDes.
  128. Optional properties:
  129. - syscon-peripheral:
  130. * Handle to the subsystem register region of the peripheral
  131. inside which the SerDes exists. Required for 10gbe.
  132. - syscon-link:
  133. * Handle to the Link register region of the peripheral inside
  134. which the SerDes exists. Example: it is the PCSR register
  135. region in the case of 10gbe. Required for 10gbe.
  136. - rx-force-enable:
  137. * Include this property if receiver attenuation and boost are
  138. to be configured with specific values defined in rx-force.
  139. - link-rate-kbps:
  140. * SerDes link rate to be configured, in kbps.
  141. For gbe and 10gbe SerDes, it is optional to represent each lane as
  142. a sub-node, which can be enabled or disabled individually using
  143. the "status" property. If a lane is not represented by a node, the
  144. lane is disabled.
  145. Required properties (lane sub-node):
  146. - #phy-cells:
  147. * From the generic phy bindings, must be 0;
  148. - reg:
  149. * lane number
  150. Optional properties (lane sub-node):
  151. - control-rate:
  152. * Lane control rate
  153. 0: full rate
  154. 1: half rate
  155. 2: quarter rate
  156. - rx-start:
  157. * Initial lane rx equalizer attenuation and boost configurations.
  158. * Must be array of 2 integers.
  159. - rx-force:
  160. * Forced lane rx equalizer attenuation and boost configurations.
  161. * Must be array of 2 integers.
  162. - tx-coeff:
  163. * Lane c1, c2, cm, attenuation and regulator output voltage
  164. configurations.
  165. * Must be array of 5 integers.
  166. - loopback:
  167. * Include this property to enable loopback at the SerDes
  168. lane level.
  169. Example for Keystone K2E GBE:
  170. -----------------------------
  171. gbe_serdes0: phy@232a000 {
  172. compatible = "ti,keystone-serdes-gbe";
  173. reg = <0x0232a000 0x2000>;
  174. link-rate-kbps = <1250000>;
  175. num-lanes = <4>;
  176. #address-cells = <1>;
  177. #size-cells = <0>;
  178. serdes0_lane0: lane@0 {
  179. status = "ok";
  180. #phy-cells = <0>;
  181. reg = <0>;
  182. control-rate = <2>;
  183. rx-start = <7 5>;
  184. rx-force = <1 1>;
  185. tx-coeff = <0 0 0 12 4>;
  186. };
  187. serdes0_lane1: lane@1 {
  188. status = "ok";
  189. #phy-cells = <0>;
  190. reg = <1>;
  191. control-rate = <2>;
  192. rx-start = <7 5>;
  193. rx-force = <1 1>;
  194. tx-coeff = <0 0 0 12 4>;
  195. };
  196. serdes0_lane2: lane@2 {
  197. status = "disabled";
  198. #phy-cells = <0>;
  199. reg = <2>;
  200. control-rate = <2>;
  201. rx-start = <7 5>;
  202. rx-force = <1 1>;
  203. tx-coeff = <0 0 0 12 4>;
  204. };
  205. serdes0_lane3: lane@3 {
  206. status = "disabled";
  207. #phy-cells = <0>;
  208. reg = <3>;
  209. control-rate = <2>;
  210. rx-start = <7 5>;
  211. rx-force = <1 1>;
  212. tx-coeff = <0 0 0 12 4>;
  213. };
  214. };
  215. gbe_serdes1: phy@2324000 {
  216. compatible = "ti,keystone-serdes-gbe";
  217. reg = <0x02324000 0x2000>;
  218. link-rate-kbps = <1250000>;
  219. num-lanes = <4>;
  220. #address-cells = <1>;
  221. #size-cells = <0>;
  222. serdes1_lane0: lane@0 {
  223. status = "disabled";
  224. #phy-cells = <0>;
  225. reg = <0>;
  226. control-rate = <2>;
  227. rx-start = <7 5>;
  228. rx-force = <1 1>;
  229. tx-coeff = <0 0 0 12 4>;
  230. };
  231. serdes1_lane1: lane@1 {
  232. status = "disabled";
  233. #phy-cells = <0>;
  234. reg = <1>;
  235. control-rate = <2>;
  236. rx-start = <7 5>;
  237. rx-force = <1 1>;
  238. tx-coeff = <0 0 0 12 4>;
  239. };
  240. serdes1_lane2: lane@2 {
  241. status = "disabled";
  242. #phy-cells = <0>;
  243. reg = <2>;
  244. control-rate = <2>;
  245. rx-start = <7 5>;
  246. rx-force = <1 1>;
  247. tx-coeff = <0 0 0 12 4>;
  248. };
  249. serdes1_lane3: lane@3 {
  250. status = "disabled";
  251. #phy-cells = <0>;
  252. reg = <3>;
  253. control-rate = <2>;
  254. rx-start = <7 5>;
  255. rx-force = <1 1>;
  256. tx-coeff = <0 0 0 12 4>;
  257. };
  258. };
  259. netcp: netcp@24000000 {
  260. ...
  261. netcp-devices {
  262. ...
  263. gbe@200000 {
  264. ...
  265. gbe0: interface-0 {
  266. phys = <&serdes0_lane0>;
  267. ...
  268. };
  269. gbe1: interface-1 {
  270. phys = <&serdes0_lane1>;
  271. ...
  272. };
  273. ...
  274. };
  275. ...
  276. };
  277. };
  278. Example for Keystone PCIE:
  279. --------------------------
  280. pcie0_phy: phy@2320000 {
  281. compatible = "ti,keystone-serdes-pcie";
  282. reg = <0x02320000 0x4000>;
  283. link-rate-kbps = <5000000>;
  284. num-lanes = <2>;
  285. };
  286. No SerDes phy handle needed in PCIe controller node
  287. since the SerDes PHY provider driver performs all
  288. the configurations needed for PCIe.
  289. Example for K2E 10GBE:
  290. ----------------------
  291. Define the syscon regmaps for 10gbe subsystem:
  292. xgbe_subsys: subsys@2f00000 {
  293. status = "ok";
  294. compatible = "syscon";
  295. reg = <0x02f00000 0x100>;
  296. };
  297. Define the syscon regmaps for 10gbe pcsr:
  298. xgbe_pcsr: pcsr@2f00000 {
  299. status = "ok";
  300. compatible = "syscon";
  301. reg = <0x02f00600 0x100>;
  302. };
  303. Define the 10gbe SerDes node:
  304. xgbe_serdes: phy@231e000 {
  305. status = "ok";
  306. compatible = "ti,keystone-serdes-xgbe";
  307. reg = <0x0231e000 0x2000>;
  308. link-rate-kbps = <10312500>;
  309. num-lanes = <2>;
  310. syscon-peripheral = <&xgbe_subsys>;
  311. syscon-link = <&xgbe_pcsr>;
  312. #address-cells = <1>;
  313. #size-cells = <0>;
  314. xserdes_lane0: lane@0 {
  315. status = "ok";
  316. #phy-cells = <0>;
  317. reg = <0>;
  318. control-rate = <0>;
  319. rx-start = <7 5>;
  320. rx-force = <1 1>;
  321. tx-coeff = <2 0 0 12 4>;
  322. };
  323. xserdes_lane1: lane@1 {
  324. status = "ok";
  325. #phy-cells = <0>;
  326. reg = <1>;
  327. control-rate = <0>;
  328. rx-start = <7 5>;
  329. rx-force = <1 1>;
  330. tx-coeff = <2 0 0 12 4>;
  331. };
  332. };
  333. Then the 10gbe SerDes PHY can be used in the 10gbe switch node:
  334. netcpx: netcpx@2f00000 {
  335. ...
  336. netcp-devices {
  337. ...
  338. xgbe@2f00000 {
  339. ...
  340. xgbe0: interface-0 {
  341. phys = <&xserdes_lane0>;
  342. ...
  343. };
  344. xgbe1: interface-1 {
  345. phys = <&xserdes_lane1>;
  346. ...
  347. };
  348. ...
  349. };
  350. };
  351. ...
  352. };