comphy-cp110.h 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914
  1. /*
  2. * Copyright (C) 2018 Marvell International Ltd.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. * https://spdx.org/licenses
  6. */
  7. /* Marvell CP110 SoC COMPHY unit driver */
  8. #ifndef COMPHY_CP110_H
  9. #define COMPHY_CP110_H
  10. #define SD_ADDR(base, lane) (base + 0x1000 * lane)
  11. #define HPIPE_ADDR(base, lane) (SD_ADDR(base, lane) + 0x800)
  12. #define COMPHY_ADDR(base, lane) (base + 0x28 * lane)
  13. #define MAX_NUM_OF_FFE 8
  14. #define RX_TRAINING_TIMEOUT 500
  15. /* Comphy registers */
  16. #define COMMON_PHY_CFG1_REG 0x0
  17. #define COMMON_PHY_CFG1_PWR_UP_OFFSET 1
  18. #define COMMON_PHY_CFG1_PWR_UP_MASK \
  19. (0x1 << COMMON_PHY_CFG1_PWR_UP_OFFSET)
  20. #define COMMON_PHY_CFG1_PIPE_SELECT_OFFSET 2
  21. #define COMMON_PHY_CFG1_PIPE_SELECT_MASK \
  22. (0x1 << COMMON_PHY_CFG1_PIPE_SELECT_OFFSET)
  23. #define COMMON_PHY_CFG1_CORE_RSTN_OFFSET 13
  24. #define COMMON_PHY_CFG1_CORE_RSTN_MASK \
  25. (0x1 << COMMON_PHY_CFG1_CORE_RSTN_OFFSET)
  26. #define COMMON_PHY_CFG1_PWR_ON_RESET_OFFSET 14
  27. #define COMMON_PHY_CFG1_PWR_ON_RESET_MASK \
  28. (0x1 << COMMON_PHY_CFG1_PWR_ON_RESET_OFFSET)
  29. #define COMMON_PHY_PHY_MODE_OFFSET 15
  30. #define COMMON_PHY_PHY_MODE_MASK \
  31. (0x1 << COMMON_PHY_PHY_MODE_OFFSET)
  32. #define COMMON_PHY_CFG6_REG 0x14
  33. #define COMMON_PHY_CFG6_IF_40_SEL_OFFSET 18
  34. #define COMMON_PHY_CFG6_IF_40_SEL_MASK \
  35. (0x1 << COMMON_PHY_CFG6_IF_40_SEL_OFFSET)
  36. #define COMMON_PHY_CFG6_REG 0x14
  37. #define COMMON_PHY_CFG6_IF_40_SEL_OFFSET 18
  38. #define COMMON_PHY_CFG6_IF_40_SEL_MASK \
  39. (0x1 << COMMON_PHY_CFG6_IF_40_SEL_OFFSET)
  40. #define COMMON_SELECTOR_PHY_REG_OFFSET 0x140
  41. #define COMMON_SELECTOR_PIPE_REG_OFFSET 0x144
  42. #define COMMON_SELECTOR_COMPHY_MASK 0xf
  43. #define COMMON_SELECTOR_COMPHYN_FIELD_WIDTH 4
  44. #define COMMON_SELECTOR_COMPHYN_SATA 0x4
  45. #define COMMON_SELECTOR_PIPE_COMPHY_PCIE 0x4
  46. #define COMMON_SELECTOR_PIPE_COMPHY_USBH 0x1
  47. #define COMMON_SELECTOR_PIPE_COMPHY_USBD 0x2
  48. /* SGMII/Base-X/SFI/RXAUI */
  49. #define COMMON_SELECTOR_COMPHY0_1_2_NETWORK 0x1
  50. #define COMMON_SELECTOR_COMPHY3_RXAUI 0x1
  51. #define COMMON_SELECTOR_COMPHY3_SGMII 0x2
  52. #define COMMON_SELECTOR_COMPHY4_PORT1 0x1
  53. #define COMMON_SELECTOR_COMPHY4_ALL_OTHERS 0x2
  54. #define COMMON_SELECTOR_COMPHY5_RXAUI 0x2
  55. #define COMMON_SELECTOR_COMPHY5_SGMII 0x1
  56. #define COMMON_PHY_SD_CTRL1 0x148
  57. #define COMMON_PHY_SD_CTRL1_COMPHY_0_PORT_OFFSET 0
  58. #define COMMON_PHY_SD_CTRL1_COMPHY_1_PORT_OFFSET 4
  59. #define COMMON_PHY_SD_CTRL1_COMPHY_2_PORT_OFFSET 8
  60. #define COMMON_PHY_SD_CTRL1_COMPHY_3_PORT_OFFSET 12
  61. #define COMMON_PHY_SD_CTRL1_COMPHY_0_3_PORT_MASK 0xFFFF
  62. #define COMMON_PHY_SD_CTRL1_COMPHY_0_1_PORT_MASK 0xFF
  63. #define COMMON_PHY_SD_CTRL1_PCIE_X4_EN_OFFSET 24
  64. #define COMMON_PHY_SD_CTRL1_PCIE_X4_EN_MASK \
  65. (0x1 << COMMON_PHY_SD_CTRL1_PCIE_X4_EN_OFFSET)
  66. #define COMMON_PHY_SD_CTRL1_PCIE_X2_EN_OFFSET 25
  67. #define COMMON_PHY_SD_CTRL1_PCIE_X2_EN_MASK \
  68. (0x1 << COMMON_PHY_SD_CTRL1_PCIE_X2_EN_OFFSET)
  69. #define COMMON_PHY_SD_CTRL1_RXAUI1_OFFSET 26
  70. #define COMMON_PHY_SD_CTRL1_RXAUI1_MASK \
  71. (0x1 << COMMON_PHY_SD_CTRL1_RXAUI1_OFFSET)
  72. #define COMMON_PHY_SD_CTRL1_RXAUI0_OFFSET 27
  73. #define COMMON_PHY_SD_CTRL1_RXAUI0_MASK \
  74. (0x1 << COMMON_PHY_SD_CTRL1_RXAUI0_OFFSET)
  75. /* DFX register */
  76. #define DFX_BASE (0x400000)
  77. #define DFX_DEV_GEN_CTRL12_REG (0x280)
  78. #define DFX_DEV_GEN_PCIE_CLK_SRC_MUX (0x3)
  79. #define DFX_DEV_GEN_PCIE_CLK_SRC_OFFSET 7
  80. #define DFX_DEV_GEN_PCIE_CLK_SRC_MASK \
  81. (0x3 << DFX_DEV_GEN_PCIE_CLK_SRC_OFFSET)
  82. /* SerDes IP registers */
  83. #define SD_EXTERNAL_CONFIG0_REG 0
  84. #define SD_EXTERNAL_CONFIG0_SD_PU_PLL_OFFSET 1
  85. #define SD_EXTERNAL_CONFIG0_SD_PU_PLL_MASK \
  86. (1 << SD_EXTERNAL_CONFIG0_SD_PU_PLL_OFFSET)
  87. #define SD_EXTERNAL_CONFIG0_SD_PHY_GEN_RX_OFFSET 3
  88. #define SD_EXTERNAL_CONFIG0_SD_PHY_GEN_RX_MASK \
  89. (0xf << SD_EXTERNAL_CONFIG0_SD_PHY_GEN_RX_OFFSET)
  90. #define SD_EXTERNAL_CONFIG0_SD_PHY_GEN_TX_OFFSET 7
  91. #define SD_EXTERNAL_CONFIG0_SD_PHY_GEN_TX_MASK \
  92. (0xf << SD_EXTERNAL_CONFIG0_SD_PHY_GEN_TX_OFFSET)
  93. #define SD_EXTERNAL_CONFIG0_SD_PU_RX_OFFSET 11
  94. #define SD_EXTERNAL_CONFIG0_SD_PU_RX_MASK \
  95. (1 << SD_EXTERNAL_CONFIG0_SD_PU_RX_OFFSET)
  96. #define SD_EXTERNAL_CONFIG0_SD_PU_TX_OFFSET 12
  97. #define SD_EXTERNAL_CONFIG0_SD_PU_TX_MASK \
  98. (1 << SD_EXTERNAL_CONFIG0_SD_PU_TX_OFFSET)
  99. #define SD_EXTERNAL_CONFIG0_HALF_BUS_MODE_OFFSET 14
  100. #define SD_EXTERNAL_CONFIG0_HALF_BUS_MODE_MASK \
  101. (1 << SD_EXTERNAL_CONFIG0_HALF_BUS_MODE_OFFSET)
  102. #define SD_EXTERNAL_CONFIG0_MEDIA_MODE_OFFSET 15
  103. #define SD_EXTERNAL_CONFIG0_MEDIA_MODE_MASK \
  104. (0x1 << SD_EXTERNAL_CONFIG0_MEDIA_MODE_OFFSET)
  105. #define SD_EXTERNAL_CONFIG1_REG 0x4
  106. #define SD_EXTERNAL_CONFIG1_TX_IDLE_OFFSET 2
  107. #define SD_EXTERNAL_CONFIG1_TX_IDLE_MASK \
  108. (0x1 << SD_EXTERNAL_CONFIG1_TX_IDLE_OFFSET)
  109. #define SD_EXTERNAL_CONFIG1_RESET_IN_OFFSET 3
  110. #define SD_EXTERNAL_CONFIG1_RESET_IN_MASK \
  111. (0x1 << SD_EXTERNAL_CONFIG1_RESET_IN_OFFSET)
  112. #define SD_EXTERNAL_CONFIG1_RX_INIT_OFFSET 4
  113. #define SD_EXTERNAL_CONFIG1_RX_INIT_MASK \
  114. (0x1 << SD_EXTERNAL_CONFIG1_RX_INIT_OFFSET)
  115. #define SD_EXTERNAL_CONFIG1_RESET_CORE_OFFSET 5
  116. #define SD_EXTERNAL_CONFIG1_RESET_CORE_MASK \
  117. (0x1 << SD_EXTERNAL_CONFIG1_RESET_CORE_OFFSET)
  118. #define SD_EXTERNAL_CONFIG1_RF_RESET_IN_OFFSET 6
  119. #define SD_EXTERNAL_CONFIG1_RF_RESET_IN_MASK \
  120. (0x1 << SD_EXTERNAL_CONFIG1_RF_RESET_IN_OFFSET)
  121. #define SD_EXTERNAL_CONFIG2_REG 0x8
  122. #define SD_EXTERNAL_CONFIG2_PIN_DFE_EN_OFFSET 4
  123. #define SD_EXTERNAL_CONFIG2_PIN_DFE_EN_MASK \
  124. (0x1 << SD_EXTERNAL_CONFIG2_PIN_DFE_EN_OFFSET)
  125. #define SD_EXTERNAL_CONFIG2_SSC_ENABLE_OFFSET 7
  126. #define SD_EXTERNAL_CONFIG2_SSC_ENABLE_MASK \
  127. (0x1 << SD_EXTERNAL_CONFIG2_SSC_ENABLE_OFFSET)
  128. #define SD_EXTERNAL_STATUS_REG 0xc
  129. #define SD_EXTERNAL_STATUS_START_RX_TRAINING_OFFSET 7
  130. #define SD_EXTERNAL_STATUS_START_RX_TRAINING_MASK \
  131. (1 << SD_EXTERNAL_STATUS_START_RX_TRAINING_OFFSET)
  132. #define SD_EXTERNAL_STATUS0_REG 0x18
  133. #define SD_EXTERNAL_STATUS0_PLL_TX_OFFSET 2
  134. #define SD_EXTERNAL_STATUS0_PLL_TX_MASK \
  135. (0x1 << SD_EXTERNAL_STATUS0_PLL_TX_OFFSET)
  136. #define SD_EXTERNAL_STATUS0_PLL_RX_OFFSET 3
  137. #define SD_EXTERNAL_STATUS0_PLL_RX_MASK \
  138. (0x1 << SD_EXTERNAL_STATUS0_PLL_RX_OFFSET)
  139. #define SD_EXTERNAL_STATUS0_RX_INIT_OFFSET 4
  140. #define SD_EXTERNAL_STATUS0_RX_INIT_MASK \
  141. (0x1 << SD_EXTERNAL_STATUS0_RX_INIT_OFFSET)
  142. #define SD_EXTERNAL_STATAUS1_REG 0x1c
  143. #define SD_EXTERNAL_STATAUS1_REG_RX_TRAIN_COMP_OFFSET 0
  144. #define SD_EXTERNAL_STATAUS1_REG_RX_TRAIN_COMP_MASK \
  145. (1 << SD_EXTERNAL_STATAUS1_REG_RX_TRAIN_COMP_OFFSET)
  146. #define SD_EXTERNAL_STATAUS1_REG_RX_TRAIN_FAILED_OFFSET 1
  147. #define SD_EXTERNAL_STATAUS1_REG_RX_TRAIN_FAILED_MASK \
  148. (1 << SD_EXTERNAL_STATAUS1_REG_RX_TRAIN_FAILED_OFFSET)
  149. /* HPIPE registers */
  150. #define HPIPE_PWR_PLL_REG 0x4
  151. #define HPIPE_PWR_PLL_REF_FREQ_OFFSET 0
  152. #define HPIPE_PWR_PLL_REF_FREQ_MASK \
  153. (0x1f << HPIPE_PWR_PLL_REF_FREQ_OFFSET)
  154. #define HPIPE_PWR_PLL_PHY_MODE_OFFSET 5
  155. #define HPIPE_PWR_PLL_PHY_MODE_MASK \
  156. (0x7 << HPIPE_PWR_PLL_PHY_MODE_OFFSET)
  157. #define HPIPE_CAL_REG1_REG 0xc
  158. #define HPIPE_CAL_REG_1_EXT_TXIMP_OFFSET 10
  159. #define HPIPE_CAL_REG_1_EXT_TXIMP_MASK \
  160. (0x1f << HPIPE_CAL_REG_1_EXT_TXIMP_OFFSET)
  161. #define HPIPE_CAL_REG_1_EXT_TXIMP_EN_OFFSET 15
  162. #define HPIPE_CAL_REG_1_EXT_TXIMP_EN_MASK \
  163. (0x1 << HPIPE_CAL_REG_1_EXT_TXIMP_EN_OFFSET)
  164. #define HPIPE_SQUELCH_FFE_SETTING_REG 0x18
  165. #define HPIPE_SQUELCH_THRESH_IN_OFFSET 8
  166. #define HPIPE_SQUELCH_THRESH_IN_MASK \
  167. (0xf << HPIPE_SQUELCH_THRESH_IN_OFFSET)
  168. #define HPIPE_SQUELCH_DETECTED_OFFSET 14
  169. #define HPIPE_SQUELCH_DETECTED_MASK \
  170. (0x1 << HPIPE_SQUELCH_DETECTED_OFFSET)
  171. #define HPIPE_DFE_REG0 0x1c
  172. #define HPIPE_DFE_RES_FORCE_OFFSET 15
  173. #define HPIPE_DFE_RES_FORCE_MASK \
  174. (0x1 << HPIPE_DFE_RES_FORCE_OFFSET)
  175. #define HPIPE_DFE_F3_F5_REG 0x28
  176. #define HPIPE_DFE_F3_F5_DFE_EN_OFFSET 14
  177. #define HPIPE_DFE_F3_F5_DFE_EN_MASK \
  178. (0x1 << HPIPE_DFE_F3_F5_DFE_EN_OFFSET)
  179. #define HPIPE_DFE_F3_F5_DFE_CTRL_OFFSET 15
  180. #define HPIPE_DFE_F3_F5_DFE_CTRL_MASK \
  181. (0x1 << HPIPE_DFE_F3_F5_DFE_CTRL_OFFSET)
  182. #define HPIPE_ADAPTED_DFE_COEFFICIENT_1_REG 0x30
  183. #define HPIPE_ADAPTED_DFE_RES_OFFSET 13
  184. #define HPIPE_ADAPTED_DFE_RES_MASK \
  185. (0x3 << HPIPE_ADAPTED_DFE_RES_OFFSET)
  186. #define HPIPE_G1_SET_0_REG 0x34
  187. #define HPIPE_G1_SET_0_G1_TX_AMP_OFFSET 1
  188. #define HPIPE_G1_SET_0_G1_TX_AMP_MASK \
  189. (0x1f << HPIPE_G1_SET_0_G1_TX_AMP_OFFSET)
  190. #define HPIPE_G1_SET_0_G1_TX_AMP_ADJ_OFFSET 6
  191. #define HPIPE_G1_SET_0_G1_TX_AMP_ADJ_MASK \
  192. (0x1 << HPIPE_G1_SET_0_G1_TX_AMP_ADJ_OFFSET)
  193. #define HPIPE_G1_SET_0_G1_TX_EMPH1_OFFSET 7
  194. #define HPIPE_G1_SET_0_G1_TX_EMPH1_MASK \
  195. (0xf << HPIPE_G1_SET_0_G1_TX_EMPH1_OFFSET)
  196. #define HPIPE_G1_SET_0_G1_TX_EMPH1_EN_OFFSET 11
  197. #define HPIPE_G1_SET_0_G1_TX_EMPH1_EN_MASK \
  198. (0x1 << HPIPE_G1_SET_0_G1_TX_EMPH1_EN_OFFSET)
  199. #define HPIPE_G1_SET_1_REG 0x38
  200. #define HPIPE_G1_SET_1_G1_RX_SELMUPI_OFFSET 0
  201. #define HPIPE_G1_SET_1_G1_RX_SELMUPI_MASK \
  202. (0x7 << HPIPE_G1_SET_1_G1_RX_SELMUPI_OFFSET)
  203. #define HPIPE_G1_SET_1_G1_RX_SELMUPF_OFFSET 3
  204. #define HPIPE_G1_SET_1_G1_RX_SELMUPF_MASK \
  205. (0x7 << HPIPE_G1_SET_1_G1_RX_SELMUPF_OFFSET)
  206. #define HPIPE_G1_SET_1_G1_RX_SELMUFI_OFFSET 6
  207. #define HPIPE_G1_SET_1_G1_RX_SELMUFI_MASK \
  208. (0x3 << HPIPE_G1_SET_1_G1_RX_SELMUFI_OFFSET)
  209. #define HPIPE_G1_SET_1_G1_RX_SELMUFF_OFFSET 8
  210. #define HPIPE_G1_SET_1_G1_RX_SELMUFF_MASK \
  211. (0x3 << HPIPE_G1_SET_1_G1_RX_SELMUFF_OFFSET)
  212. #define HPIPE_G1_SET_1_G1_RX_DFE_EN_OFFSET 10
  213. #define HPIPE_G1_SET_1_G1_RX_DFE_EN_MASK \
  214. (0x1 << HPIPE_G1_SET_1_G1_RX_DFE_EN_OFFSET)
  215. #define HPIPE_G1_SET_1_G1_RX_DIGCK_DIV_OFFSET 11
  216. #define HPIPE_G1_SET_1_G1_RX_DIGCK_DIV_MASK \
  217. (0x3 << HPIPE_G1_SET_1_G1_RX_DIGCK_DIV_OFFSET)
  218. #define HPIPE_G2_SET_0_REG 0x3c
  219. #define HPIPE_G2_SET_0_G2_TX_AMP_OFFSET 1
  220. #define HPIPE_G2_SET_0_G2_TX_AMP_MASK \
  221. (0x1f << HPIPE_G2_SET_0_G2_TX_AMP_OFFSET)
  222. #define HPIPE_G2_SET_0_G2_TX_AMP_ADJ_OFFSET 6
  223. #define HPIPE_G2_SET_0_G2_TX_AMP_ADJ_MASK \
  224. (0x1 << HPIPE_G2_SET_0_G2_TX_AMP_ADJ_OFFSET)
  225. #define HPIPE_G2_SET_0_G2_TX_EMPH1_OFFSET 7
  226. #define HPIPE_G2_SET_0_G2_TX_EMPH1_MASK \
  227. (0xf << HPIPE_G2_SET_0_G2_TX_EMPH1_OFFSET)
  228. #define HPIPE_G2_SET_0_G2_TX_EMPH1_EN_OFFSET 11
  229. #define HPIPE_G2_SET_0_G2_TX_EMPH1_EN_MASK \
  230. (0x1 << HPIPE_G2_SET_0_G2_TX_EMPH1_EN_OFFSET)
  231. #define HPIPE_G2_SET_1_REG 0x40
  232. #define HPIPE_G2_SET_1_G2_RX_SELMUPI_OFFSET 0
  233. #define HPIPE_G2_SET_1_G2_RX_SELMUPI_MASK \
  234. (0x7 << HPIPE_G2_SET_1_G2_RX_SELMUPI_OFFSET)
  235. #define HPIPE_G2_SET_1_G2_RX_SELMUPF_OFFSET 3
  236. #define HPIPE_G2_SET_1_G2_RX_SELMUPF_MASK \
  237. (0x7 << HPIPE_G2_SET_1_G2_RX_SELMUPF_OFFSET)
  238. #define HPIPE_G2_SET_1_G2_RX_SELMUFI_OFFSET 6
  239. #define HPIPE_G2_SET_1_G2_RX_SELMUFI_MASK \
  240. (0x3 << HPIPE_G2_SET_1_G2_RX_SELMUFI_OFFSET)
  241. #define HPIPE_G2_SET_1_G2_RX_SELMUFF_OFFSET 8
  242. #define HPIPE_G2_SET_1_G2_RX_SELMUFF_MASK \
  243. (0x3 << HPIPE_G2_SET_1_G2_RX_SELMUFF_OFFSET)
  244. #define HPIPE_G2_SET_1_G2_RX_DFE_EN_OFFSET 10
  245. #define HPIPE_G2_SET_1_G2_RX_DFE_EN_MASK \
  246. (0x1 << HPIPE_G2_SET_1_G2_RX_DFE_EN_OFFSET)
  247. #define HPIPE_G2_SET_1_G2_RX_DIGCK_DIV_OFFSET 11
  248. #define HPIPE_G2_SET_1_G2_RX_DIGCK_DIV_MASK \
  249. (0x3 << HPIPE_G2_SET_1_G2_RX_DIGCK_DIV_OFFSET)
  250. #define HPIPE_G3_SET_0_REG 0x44
  251. #define HPIPE_G3_SET_0_G3_TX_AMP_OFFSET 1
  252. #define HPIPE_G3_SET_0_G3_TX_AMP_MASK \
  253. (0x1f << HPIPE_G3_SET_0_G3_TX_AMP_OFFSET)
  254. #define HPIPE_G3_SET_0_G3_TX_AMP_ADJ_OFFSET 6
  255. #define HPIPE_G3_SET_0_G3_TX_AMP_ADJ_MASK \
  256. (0x1 << HPIPE_G3_SET_0_G3_TX_AMP_ADJ_OFFSET)
  257. #define HPIPE_G3_SET_0_G3_TX_EMPH1_OFFSET 7
  258. #define HPIPE_G3_SET_0_G3_TX_EMPH1_MASK \
  259. (0xf << HPIPE_G3_SET_0_G3_TX_EMPH1_OFFSET)
  260. #define HPIPE_G3_SET_0_G3_TX_EMPH1_EN_OFFSET 11
  261. #define HPIPE_G3_SET_0_G3_TX_EMPH1_EN_MASK \
  262. (0x1 << HPIPE_G3_SET_0_G3_TX_EMPH1_EN_OFFSET)
  263. #define HPIPE_G3_SET_0_G3_TX_SLEW_RATE_SEL_OFFSET 12
  264. #define HPIPE_G3_SET_0_G3_TX_SLEW_RATE_SEL_MASK \
  265. (0x7 << HPIPE_G3_SET_0_G3_TX_SLEW_RATE_SEL_OFFSET)
  266. #define HPIPE_G3_SET_0_G3_TX_SLEW_CTRL_EN_OFFSET 15
  267. #define HPIPE_G3_SET_0_G3_TX_SLEW_CTRL_EN_MASK \
  268. (0x1 << HPIPE_G3_SET_0_G3_TX_SLEW_CTRL_EN_OFFSET)
  269. #define HPIPE_G3_SET_1_REG 0x48
  270. #define HPIPE_G3_SET_1_G3_RX_SELMUPI_OFFSET 0
  271. #define HPIPE_G3_SET_1_G3_RX_SELMUPI_MASK \
  272. (0x7 << HPIPE_G3_SET_1_G3_RX_SELMUPI_OFFSET)
  273. #define HPIPE_G3_SET_1_G3_RX_SELMUPF_OFFSET 3
  274. #define HPIPE_G3_SET_1_G3_RX_SELMUPF_MASK \
  275. (0x7 << HPIPE_G3_SET_1_G3_RX_SELMUPF_OFFSET)
  276. #define HPIPE_G3_SET_1_G3_RX_SELMUFI_OFFSET 6
  277. #define HPIPE_G3_SET_1_G3_RX_SELMUFI_MASK \
  278. (0x3 << HPIPE_G3_SET_1_G3_RX_SELMUFI_OFFSET)
  279. #define HPIPE_G3_SET_1_G3_RX_SELMUFF_OFFSET 8
  280. #define HPIPE_G3_SET_1_G3_RX_SELMUFF_MASK \
  281. (0x3 << HPIPE_G3_SET_1_G3_RX_SELMUFF_OFFSET)
  282. #define HPIPE_G3_SET_1_G3_RX_DFE_EN_OFFSET 10
  283. #define HPIPE_G3_SET_1_G3_RX_DFE_EN_MASK \
  284. (0x1 << HPIPE_G3_SET_1_G3_RX_DFE_EN_OFFSET)
  285. #define HPIPE_G3_SET_1_G3_RX_DIGCK_DIV_OFFSET 11
  286. #define HPIPE_G3_SET_1_G3_RX_DIGCK_DIV_MASK \
  287. (0x3 << HPIPE_G3_SET_1_G3_RX_DIGCK_DIV_OFFSET)
  288. #define HPIPE_G3_SET_1_G3_SAMPLER_INPAIRX2_EN_OFFSET 13
  289. #define HPIPE_G3_SET_1_G3_SAMPLER_INPAIRX2_EN_MASK \
  290. (0x1 << HPIPE_G3_SET_1_G3_SAMPLER_INPAIRX2_EN_OFFSET)
  291. #define HPIPE_PHY_TEST_CONTROL_REG 0x54
  292. #define HPIPE_PHY_TEST_PATTERN_SEL_OFFSET 4
  293. #define HPIPE_PHY_TEST_PATTERN_SEL_MASK \
  294. (0xf << HPIPE_PHY_TEST_PATTERN_SEL_OFFSET)
  295. #define HPIPE_PHY_TEST_RESET_OFFSET 14
  296. #define HPIPE_PHY_TEST_RESET_MASK \
  297. (0x1 << HPIPE_PHY_TEST_RESET_OFFSET)
  298. #define HPIPE_PHY_TEST_EN_OFFSET 15
  299. #define HPIPE_PHY_TEST_EN_MASK \
  300. (0x1 << HPIPE_PHY_TEST_EN_OFFSET)
  301. #define HPIPE_PHY_TEST_DATA_REG 0x6c
  302. #define HPIPE_PHY_TEST_DATA_OFFSET 0
  303. #define HPIPE_PHY_TEST_DATA_MASK \
  304. (0xffff << HPIPE_PHY_TEST_DATA_OFFSET)
  305. #define HPIPE_PHY_TEST_PRBS_ERROR_COUNTER_1_REG 0x80
  306. #define HPIPE_PHY_TEST_OOB_0_REGISTER 0x84
  307. #define HPIPE_PHY_PT_OOB_EN_OFFSET 14
  308. #define HPIPE_PHY_PT_OOB_EN_MASK \
  309. (0x1 << HPIPE_PHY_PT_OOB_EN_OFFSET)
  310. #define HPIPE_PHY_TEST_PT_TESTMODE_OFFSET 12
  311. #define HPIPE_PHY_TEST_PT_TESTMODE_MASK \
  312. (0x3 << HPIPE_PHY_TEST_PT_TESTMODE_OFFSET)
  313. #define HPIPE_LOOPBACK_REG 0x8c
  314. #define HPIPE_LOOPBACK_SEL_OFFSET 1
  315. #define HPIPE_LOOPBACK_SEL_MASK \
  316. (0x7 << HPIPE_LOOPBACK_SEL_OFFSET)
  317. #define HPIPE_CDR_LOCK_OFFSET 7
  318. #define HPIPE_CDR_LOCK_MASK \
  319. (0x1 << HPIPE_CDR_LOCK_OFFSET)
  320. #define HPIPE_CDR_LOCK_DET_EN_OFFSET 8
  321. #define HPIPE_CDR_LOCK_DET_EN_MASK \
  322. (0x1 << HPIPE_CDR_LOCK_DET_EN_OFFSET)
  323. #define HPIPE_SYNC_PATTERN_REG 0x090
  324. #define HPIPE_SYNC_PATTERN_TXD_INV_OFFSET 10
  325. #define HPIPE_SYNC_PATTERN_TXD_INV_MASK \
  326. (0x1 << HPIPE_SYNC_PATTERN_TXD_INV_OFFSET)
  327. #define HPIPE_SYNC_PATTERN_RXD_INV_OFFSET 11
  328. #define HPIPE_SYNC_PATTERN_RXD_INV_MASK \
  329. (0x1 << HPIPE_SYNC_PATTERN_RXD_INV_OFFSET)
  330. #define HPIPE_INTERFACE_REG 0x94
  331. #define HPIPE_INTERFACE_GEN_MAX_OFFSET 10
  332. #define HPIPE_INTERFACE_GEN_MAX_MASK \
  333. (0x3 << HPIPE_INTERFACE_GEN_MAX_OFFSET)
  334. #define HPIPE_INTERFACE_DET_BYPASS_OFFSET 12
  335. #define HPIPE_INTERFACE_DET_BYPASS_MASK \
  336. (0x1 << HPIPE_INTERFACE_DET_BYPASS_OFFSET)
  337. #define HPIPE_INTERFACE_LINK_TRAIN_OFFSET 14
  338. #define HPIPE_INTERFACE_LINK_TRAIN_MASK \
  339. (0x1 << HPIPE_INTERFACE_LINK_TRAIN_OFFSET)
  340. #define HPIPE_G1_SET_2_REG 0xf4
  341. #define HPIPE_G1_SET_2_G1_TX_EMPH0_OFFSET 0
  342. #define HPIPE_G1_SET_2_G1_TX_EMPH0_MASK \
  343. (0xf << HPIPE_G1_SET_2_G1_TX_EMPH0_OFFSET)
  344. #define HPIPE_G1_SET_2_G1_TX_EMPH0_EN_OFFSET 4
  345. #define HPIPE_G1_SET_2_G1_TX_EMPH0_EN_MASK \
  346. (0x1 << HPIPE_G1_SET_2_G1_TX_EMPH0_EN_OFFSET)
  347. #define HPIPE_G2_SET_2_REG 0xf8
  348. #define HPIPE_G2_SET_2_G2_TX_EMPH0_OFFSET 0
  349. #define HPIPE_G2_SET_2_G2_TX_EMPH0_MASK \
  350. (0xf << HPIPE_G2_SET_2_G2_TX_EMPH0_OFFSET)
  351. #define HPIPE_G2_SET_2_G2_TX_EMPH0_EN_OFFSET 4
  352. #define HPIPE_G2_SET_2_G2_TX_EMPH0_EN_MASK \
  353. (0x1 << HPIPE_G2_SET_2_G2_TX_EMPH0_EN_OFFSET)
  354. #define HPIPE_G2_TX_SSC_AMP_OFFSET 9
  355. #define HPIPE_G2_TX_SSC_AMP_MASK \
  356. (0x7f << HPIPE_G2_TX_SSC_AMP_OFFSET)
  357. #define HPIPE_G3_SET_2_REG 0xfc
  358. #define HPIPE_G3_SET_2_G3_TX_EMPH0_OFFSET 0
  359. #define HPIPE_G3_SET_2_G3_TX_EMPH0_MASK \
  360. (0xf << HPIPE_G3_SET_2_G3_TX_EMPH0_OFFSET)
  361. #define HPIPE_G3_SET_2_G3_TX_EMPH0_EN_OFFSET 4
  362. #define HPIPE_G3_SET_2_G3_TX_EMPH0_EN_MASK \
  363. (0x1 << HPIPE_G3_SET_2_G3_TX_EMPH0_EN_OFFSET)
  364. #define HPIPE_G3_TX_SSC_AMP_OFFSET 9
  365. #define HPIPE_G3_TX_SSC_AMP_MASK \
  366. (0x7f << HPIPE_G3_TX_SSC_AMP_OFFSET)
  367. #define HPIPE_VDD_CAL_0_REG 0x108
  368. #define HPIPE_CAL_VDD_CONT_MODE_OFFSET 15
  369. #define HPIPE_CAL_VDD_CONT_MODE_MASK \
  370. (0x1 << HPIPE_CAL_VDD_CONT_MODE_OFFSET)
  371. #define HPIPE_VDD_CAL_CTRL_REG 0x114
  372. #define HPIPE_EXT_SELLV_RXSAMPL_OFFSET 5
  373. #define HPIPE_EXT_SELLV_RXSAMPL_MASK \
  374. (0x1f << HPIPE_EXT_SELLV_RXSAMPL_OFFSET)
  375. #define HPIPE_PCIE_REG0 0x120
  376. #define HPIPE_PCIE_IDLE_SYNC_OFFSET 12
  377. #define HPIPE_PCIE_IDLE_SYNC_MASK \
  378. (0x1 << HPIPE_PCIE_IDLE_SYNC_OFFSET)
  379. #define HPIPE_PCIE_SEL_BITS_OFFSET 13
  380. #define HPIPE_PCIE_SEL_BITS_MASK \
  381. (0x3 << HPIPE_PCIE_SEL_BITS_OFFSET)
  382. #define HPIPE_LANE_ALIGN_REG 0x124
  383. #define HPIPE_LANE_ALIGN_OFF_OFFSET 12
  384. #define HPIPE_LANE_ALIGN_OFF_MASK \
  385. (0x1 << HPIPE_LANE_ALIGN_OFF_OFFSET)
  386. #define HPIPE_MISC_REG 0x13C
  387. #define HPIPE_MISC_CLK100M_125M_OFFSET 4
  388. #define HPIPE_MISC_CLK100M_125M_MASK \
  389. (0x1 << HPIPE_MISC_CLK100M_125M_OFFSET)
  390. #define HPIPE_MISC_ICP_FORCE_OFFSET 5
  391. #define HPIPE_MISC_ICP_FORCE_MASK \
  392. (0x1 << HPIPE_MISC_ICP_FORCE_OFFSET)
  393. #define HPIPE_MISC_TXDCLK_2X_OFFSET 6
  394. #define HPIPE_MISC_TXDCLK_2X_MASK \
  395. (0x1 << HPIPE_MISC_TXDCLK_2X_OFFSET)
  396. #define HPIPE_MISC_CLK500_EN_OFFSET 7
  397. #define HPIPE_MISC_CLK500_EN_MASK \
  398. (0x1 << HPIPE_MISC_CLK500_EN_OFFSET)
  399. #define HPIPE_MISC_REFCLK_SEL_OFFSET 10
  400. #define HPIPE_MISC_REFCLK_SEL_MASK \
  401. (0x1 << HPIPE_MISC_REFCLK_SEL_OFFSET)
  402. #define HPIPE_RX_CONTROL_1_REG 0x140
  403. #define HPIPE_RX_CONTROL_1_RXCLK2X_SEL_OFFSET 11
  404. #define HPIPE_RX_CONTROL_1_RXCLK2X_SEL_MASK \
  405. (0x1 << HPIPE_RX_CONTROL_1_RXCLK2X_SEL_OFFSET)
  406. #define HPIPE_RX_CONTROL_1_CLK8T_EN_OFFSET 12
  407. #define HPIPE_RX_CONTROL_1_CLK8T_EN_MASK \
  408. (0x1 << HPIPE_RX_CONTROL_1_CLK8T_EN_OFFSET)
  409. #define HPIPE_PWR_CTR_REG 0x148
  410. #define HPIPE_PWR_CTR_RST_DFE_OFFSET 0
  411. #define HPIPE_PWR_CTR_RST_DFE_MASK \
  412. (0x1 << HPIPE_PWR_CTR_RST_DFE_OFFSET)
  413. #define HPIPE_PWR_CTR_SFT_RST_OFFSET 10
  414. #define HPIPE_PWR_CTR_SFT_RST_MASK \
  415. (0x1 << HPIPE_PWR_CTR_SFT_RST_OFFSET)
  416. #define HPIPE_SPD_DIV_FORCE_REG 0x154
  417. #define HPIPE_TXDIGCK_DIV_FORCE_OFFSET 7
  418. #define HPIPE_TXDIGCK_DIV_FORCE_MASK \
  419. (0x1 << HPIPE_TXDIGCK_DIV_FORCE_OFFSET)
  420. #define HPIPE_SPD_DIV_FORCE_RX_SPD_DIV_OFFSET 8
  421. #define HPIPE_SPD_DIV_FORCE_RX_SPD_DIV_MASK \
  422. (0x3 << HPIPE_SPD_DIV_FORCE_RX_SPD_DIV_OFFSET)
  423. #define HPIPE_SPD_DIV_FORCE_RX_SPD_DIV_FORCE_OFFSET 10
  424. #define HPIPE_SPD_DIV_FORCE_RX_SPD_DIV_FORCE_MASK \
  425. (0x1 << HPIPE_SPD_DIV_FORCE_RX_SPD_DIV_FORCE_OFFSET)
  426. #define HPIPE_SPD_DIV_FORCE_TX_SPD_DIV_OFFSET 13
  427. #define HPIPE_SPD_DIV_FORCE_TX_SPD_DIV_MASK \
  428. (0x3 << HPIPE_SPD_DIV_FORCE_TX_SPD_DIV_OFFSET)
  429. #define HPIPE_SPD_DIV_FORCE_TX_SPD_DIV_FORCE_OFFSET 15
  430. #define HPIPE_SPD_DIV_FORCE_TX_SPD_DIV_FORCE_MASK \
  431. (0x1 << HPIPE_SPD_DIV_FORCE_TX_SPD_DIV_FORCE_OFFSET)
  432. /* HPIPE_RX_CLK_ALIGN90_AND_TX_IDLE_CALIBRATION_CTRL_REG */
  433. #define HPIPE_RX_CLK_ALIGN90_AND_TX_IDLE_CALIB_CTRL_REG 0x168
  434. #define HPIPE_CAL_RXCLKALIGN_90_EXT_EN_OFFSET 15
  435. #define HPIPE_CAL_RXCLKALIGN_90_EXT_EN_MASK \
  436. (0x1 << HPIPE_CAL_RXCLKALIGN_90_EXT_EN_OFFSET)
  437. #define HPIPE_CAL_OS_PH_EXT_OFFSET 8
  438. #define HPIPE_CAL_OS_PH_EXT_MASK \
  439. (0x7f << HPIPE_CAL_OS_PH_EXT_OFFSET)
  440. #define HPIPE_SAMPLER_N_PROC_CALIB_CTRL_REG 0x16C
  441. #define HPIPE_RX_SAMPLER_OS_GAIN_OFFSET 6
  442. #define HPIPE_RX_SAMPLER_OS_GAIN_MASK \
  443. (0x3 << HPIPE_RX_SAMPLER_OS_GAIN_OFFSET)
  444. #define HPIPE_SMAPLER_OFFSET 12
  445. #define HPIPE_SMAPLER_MASK \
  446. (0x1 << HPIPE_SMAPLER_OFFSET)
  447. #define HPIPE_TX_REG1_REG 0x174
  448. #define HPIPE_TX_REG1_TX_EMPH_RES_OFFSET 5
  449. #define HPIPE_TX_REG1_TX_EMPH_RES_MASK \
  450. (0x3 << HPIPE_TX_REG1_TX_EMPH_RES_OFFSET)
  451. #define HPIPE_TX_REG1_SLC_EN_OFFSET 10
  452. #define HPIPE_TX_REG1_SLC_EN_MASK \
  453. (0x3f << HPIPE_TX_REG1_SLC_EN_OFFSET)
  454. #define HPIPE_PWR_CTR_DTL_REG 0x184
  455. #define HPIPE_PWR_CTR_DTL_SQ_DET_EN_OFFSET 0
  456. #define HPIPE_PWR_CTR_DTL_SQ_DET_EN_MASK \
  457. (0x1 << HPIPE_PWR_CTR_DTL_SQ_DET_EN_OFFSET)
  458. #define HPIPE_PWR_CTR_DTL_SQ_PLOOP_EN_OFFSET 1
  459. #define HPIPE_PWR_CTR_DTL_SQ_PLOOP_EN_MASK \
  460. (0x1 << HPIPE_PWR_CTR_DTL_SQ_PLOOP_EN_OFFSET)
  461. #define HPIPE_PWR_CTR_DTL_FLOOP_EN_OFFSET 2
  462. #define HPIPE_PWR_CTR_DTL_FLOOP_EN_MASK \
  463. (0x1 << HPIPE_PWR_CTR_DTL_FLOOP_EN_OFFSET)
  464. #define HPIPE_PWR_CTR_DTL_CLAMPING_SEL_OFFSET 4
  465. #define HPIPE_PWR_CTR_DTL_CLAMPING_SEL_MASK \
  466. (0x7 << HPIPE_PWR_CTR_DTL_CLAMPING_SEL_OFFSET)
  467. #define HPIPE_PWR_CTR_DTL_INTPCLK_DIV_FORCE_OFFSET 10
  468. #define HPIPE_PWR_CTR_DTL_INTPCLK_DIV_FORCE_MASK \
  469. (0x1 << HPIPE_PWR_CTR_DTL_INTPCLK_DIV_FORCE_OFFSET)
  470. #define HPIPE_PWR_CTR_DTL_CLK_MODE_OFFSET 12
  471. #define HPIPE_PWR_CTR_DTL_CLK_MODE_MASK \
  472. (0x3 << HPIPE_PWR_CTR_DTL_CLK_MODE_OFFSET)
  473. #define HPIPE_PWR_CTR_DTL_CLK_MODE_FORCE_OFFSET 14
  474. #define HPIPE_PWR_CTR_DTL_CLK_MODE_FORCE_MASK \
  475. (1 << HPIPE_PWR_CTR_DTL_CLK_MODE_FORCE_OFFSET)
  476. #define HPIPE_PHASE_CONTROL_REG 0x188
  477. #define HPIPE_OS_PH_OFFSET_OFFSET 0
  478. #define HPIPE_OS_PH_OFFSET_MASK \
  479. (0x7f << HPIPE_OS_PH_OFFSET_OFFSET)
  480. #define HPIPE_OS_PH_OFFSET_FORCE_OFFSET 7
  481. #define HPIPE_OS_PH_OFFSET_FORCE_MASK \
  482. (0x1 << HPIPE_OS_PH_OFFSET_FORCE_OFFSET)
  483. #define HPIPE_OS_PH_VALID_OFFSET 8
  484. #define HPIPE_OS_PH_VALID_MASK \
  485. (0x1 << HPIPE_OS_PH_VALID_OFFSET)
  486. #define HPIPE_DATA_PHASE_OFF_CTRL_REG 0x1A0
  487. #define HPIPE_DATA_PHASE_ADAPTED_OS_PH_OFFSET 9
  488. #define HPIPE_DATA_PHASE_ADAPTED_OS_PH_MASK \
  489. (0x7f << HPIPE_DATA_PHASE_ADAPTED_OS_PH_OFFSET)
  490. #define HPIPE_ADAPTED_FFE_CAPACITOR_COUNTER_CTRL_REG 0x1A4
  491. #define HPIPE_ADAPTED_FFE_ADAPTED_FFE_RES_OFFSET 12
  492. #define HPIPE_ADAPTED_FFE_ADAPTED_FFE_RES_MASK \
  493. (0x3 << HPIPE_ADAPTED_FFE_ADAPTED_FFE_RES_OFFSET)
  494. #define HPIPE_ADAPTED_FFE_ADAPTED_FFE_CAP_OFFSET 8
  495. #define HPIPE_ADAPTED_FFE_ADAPTED_FFE_CAP_MASK \
  496. (0xf << HPIPE_ADAPTED_FFE_ADAPTED_FFE_CAP_OFFSET)
  497. #define HPIPE_SQ_GLITCH_FILTER_CTRL 0x1c8
  498. #define HPIPE_SQ_DEGLITCH_WIDTH_P_OFFSET 0
  499. #define HPIPE_SQ_DEGLITCH_WIDTH_P_MASK \
  500. (0xf << HPIPE_SQ_DEGLITCH_WIDTH_P_OFFSET)
  501. #define HPIPE_SQ_DEGLITCH_WIDTH_N_OFFSET 4
  502. #define HPIPE_SQ_DEGLITCH_WIDTH_N_MASK \
  503. (0xf << HPIPE_SQ_DEGLITCH_WIDTH_N_OFFSET)
  504. #define HPIPE_SQ_DEGLITCH_EN_OFFSET 8
  505. #define HPIPE_SQ_DEGLITCH_EN_MASK \
  506. (0x1 << HPIPE_SQ_DEGLITCH_EN_OFFSET)
  507. #define HPIPE_FRAME_DETECT_CTRL_0_REG 0x214
  508. #define HPIPE_TRAIN_PAT_NUM_OFFSET 0x7
  509. #define HPIPE_TRAIN_PAT_NUM_MASK \
  510. (0x1FF << HPIPE_TRAIN_PAT_NUM_OFFSET)
  511. #define HPIPE_FRAME_DETECT_CTRL_3_REG 0x220
  512. #define HPIPE_PATTERN_LOCK_LOST_TIMEOUT_EN_OFFSET 12
  513. #define HPIPE_PATTERN_LOCK_LOST_TIMEOUT_EN_MASK \
  514. (0x1 << HPIPE_PATTERN_LOCK_LOST_TIMEOUT_EN_OFFSET)
  515. #define HPIPE_DME_REG 0x228
  516. #define HPIPE_DME_ETHERNET_MODE_OFFSET 7
  517. #define HPIPE_DME_ETHERNET_MODE_MASK \
  518. (0x1 << HPIPE_DME_ETHERNET_MODE_OFFSET)
  519. #define HPIPE_TRX_TRAIN_CTRL_0_REG 0x22c
  520. #define HPIPE_TRX_TX_F0T_EO_BASED_OFFSET 14
  521. #define HPIPE_TRX_TX_F0T_EO_BASED_MASK \
  522. (1 << HPIPE_TRX_TX_F0T_EO_BASED_OFFSET)
  523. #define HPIPE_TRX_UPDATE_THEN_HOLD_OFFSET 6
  524. #define HPIPE_TRX_UPDATE_THEN_HOLD_MASK \
  525. (1 << HPIPE_TRX_UPDATE_THEN_HOLD_OFFSET)
  526. #define HPIPE_TRX_TX_CTRL_CLK_EN_OFFSET 5
  527. #define HPIPE_TRX_TX_CTRL_CLK_EN_MASK \
  528. (1 << HPIPE_TRX_TX_CTRL_CLK_EN_OFFSET)
  529. #define HPIPE_TRX_RX_ANA_IF_CLK_ENE_OFFSET 4
  530. #define HPIPE_TRX_RX_ANA_IF_CLK_ENE_MASK \
  531. (1 << HPIPE_TRX_RX_ANA_IF_CLK_ENE_OFFSET)
  532. #define HPIPE_TRX_TX_TRAIN_EN_OFFSET 1
  533. #define HPIPE_TRX_TX_TRAIN_EN_MASK \
  534. (1 << HPIPE_TRX_TX_TRAIN_EN_OFFSET)
  535. #define HPIPE_TRX_RX_TRAIN_EN_OFFSET 0
  536. #define HPIPE_TRX_RX_TRAIN_EN_MASK \
  537. (1 << HPIPE_TRX_RX_TRAIN_EN_OFFSET)
  538. #define HPIPE_TX_TRAIN_CTRL_0_REG 0x268
  539. #define HPIPE_TX_TRAIN_P2P_HOLD_OFFSET 15
  540. #define HPIPE_TX_TRAIN_P2P_HOLD_MASK \
  541. (0x1 << HPIPE_TX_TRAIN_P2P_HOLD_OFFSET)
  542. #define HPIPE_TX_TRAIN_CTRL_REG 0x26C
  543. #define HPIPE_TX_TRAIN_CTRL_G1_OFFSET 0
  544. #define HPIPE_TX_TRAIN_CTRL_G1_MASK \
  545. (0x1 << HPIPE_TX_TRAIN_CTRL_G1_OFFSET)
  546. #define HPIPE_TX_TRAIN_CTRL_GN1_OFFSET 1
  547. #define HPIPE_TX_TRAIN_CTRL_GN1_MASK \
  548. (0x1 << HPIPE_TX_TRAIN_CTRL_GN1_OFFSET)
  549. #define HPIPE_TX_TRAIN_CTRL_G0_OFFSET 2
  550. #define HPIPE_TX_TRAIN_CTRL_G0_MASK \
  551. (0x1 << HPIPE_TX_TRAIN_CTRL_G0_OFFSET)
  552. #define HPIPE_TX_TRAIN_CTRL_4_REG 0x278
  553. #define HPIPE_TRX_TRAIN_TIMER_OFFSET 0
  554. #define HPIPE_TRX_TRAIN_TIMER_MASK \
  555. (0x3FF << HPIPE_TRX_TRAIN_TIMER_OFFSET)
  556. #define HPIPE_TX_TRAIN_CTRL_5_REG 0x2A4
  557. #define HPIPE_RX_TRAIN_TIMER_OFFSET 0
  558. #define HPIPE_RX_TRAIN_TIMER_MASK \
  559. (0x3ff << HPIPE_RX_TRAIN_TIMER_OFFSET)
  560. #define HPIPE_TX_TRAIN_START_SQ_EN_OFFSET 11
  561. #define HPIPE_TX_TRAIN_START_SQ_EN_MASK \
  562. (0x1 << HPIPE_TX_TRAIN_START_SQ_EN_OFFSET)
  563. #define HPIPE_TX_TRAIN_START_FRM_DET_EN_OFFSET 12
  564. #define HPIPE_TX_TRAIN_START_FRM_DET_EN_MASK \
  565. (0x1 << HPIPE_TX_TRAIN_START_FRM_DET_EN_OFFSET)
  566. #define HPIPE_TX_TRAIN_START_FRM_LOCK_EN_OFFSET 13
  567. #define HPIPE_TX_TRAIN_START_FRM_LOCK_EN_MASK \
  568. (0x1 << HPIPE_TX_TRAIN_START_FRM_LOCK_EN_OFFSET)
  569. #define HPIPE_TX_TRAIN_WAIT_TIME_EN_OFFSET 14
  570. #define HPIPE_TX_TRAIN_WAIT_TIME_EN_MASK \
  571. (0x1 << HPIPE_TX_TRAIN_WAIT_TIME_EN_OFFSET)
  572. #define HPIPE_INTERRUPT_1_REGISTER 0x2AC
  573. #define HPIPE_TRX_TRAIN_FAILED_OFFSET 6
  574. #define HPIPE_TRX_TRAIN_FAILED_MASK \
  575. (1 << HPIPE_TRX_TRAIN_FAILED_OFFSET)
  576. #define HPIPE_TRX_TRAIN_TIME_OUT_INT_OFFSET 5
  577. #define HPIPE_TRX_TRAIN_TIME_OUT_INT_MASK \
  578. (1 << HPIPE_TRX_TRAIN_TIME_OUT_INT_OFFSET)
  579. #define HPIPE_INTERRUPT_TRX_TRAIN_DONE_OFFSET 4
  580. #define HPIPE_INTERRUPT_TRX_TRAIN_DONE_MASK \
  581. (1 << HPIPE_INTERRUPT_TRX_TRAIN_DONE_OFFSET)
  582. #define HPIPE_INTERRUPT_DFE_DONE_INT_OFFSET 3
  583. #define HPIPE_INTERRUPT_DFE_DONE_INT_MASK \
  584. (1 << HPIPE_INTERRUPT_DFE_DONE_INT_OFFSET)
  585. #define HPIPE_INTERRUPT_RX_TRAIN_COMPLETE_INT_OFFSET 1
  586. #define HPIPE_INTERRUPT_RX_TRAIN_COMPLETE_INT_MASK \
  587. (1 << HPIPE_INTERRUPT_RX_TRAIN_COMPLETE_INT_OFFSET)
  588. #define HPIPE_TX_TRAIN_REG 0x31C
  589. #define HPIPE_TX_TRAIN_CHK_INIT_OFFSET 4
  590. #define HPIPE_TX_TRAIN_CHK_INIT_MASK \
  591. (0x1 << HPIPE_TX_TRAIN_CHK_INIT_OFFSET)
  592. #define HPIPE_TX_TRAIN_COE_FM_PIN_PCIE3_OFFSET 7
  593. #define HPIPE_TX_TRAIN_COE_FM_PIN_PCIE3_MASK \
  594. (0x1 << HPIPE_TX_TRAIN_COE_FM_PIN_PCIE3_OFFSET)
  595. #define HPIPE_TX_TRAIN_16BIT_AUTO_EN_OFFSET 8
  596. #define HPIPE_TX_TRAIN_16BIT_AUTO_EN_MASK \
  597. (0x1 << HPIPE_TX_TRAIN_16BIT_AUTO_EN_OFFSET)
  598. #define HPIPE_TX_TRAIN_PAT_SEL_OFFSET 9
  599. #define HPIPE_TX_TRAIN_PAT_SEL_MASK \
  600. (0x1 << HPIPE_TX_TRAIN_PAT_SEL_OFFSET)
  601. #define HPIPE_SAVED_DFE_VALUES_REG 0x328
  602. #define HPIPE_SAVED_DFE_VALUES_SAV_F0D_OFFSET 10
  603. #define HPIPE_SAVED_DFE_VALUES_SAV_F0D_MASK \
  604. (0x3f << HPIPE_SAVED_DFE_VALUES_SAV_F0D_OFFSET)
  605. #define HPIPE_CDR_CONTROL_REG 0x418
  606. #define HPIPE_CRD_MIDPOINT_PHASE_OS_OFFSET 0
  607. #define HPIPE_CRD_MIDPOINT_PHASE_OS_MASK \
  608. (0x3f << HPIPE_CRD_MIDPOINT_PHASE_OS_OFFSET)
  609. #define HPIPE_CDR_MAX_DFE_ADAPT_1_OFFSET 6
  610. #define HPIPE_CDR_MAX_DFE_ADAPT_1_MASK \
  611. (0x7 << HPIPE_CDR_MAX_DFE_ADAPT_1_OFFSET)
  612. #define HPIPE_CDR_MAX_DFE_ADAPT_0_OFFSET 9
  613. #define HPIPE_CDR_MAX_DFE_ADAPT_0_MASK \
  614. (0x7 << HPIPE_CDR_MAX_DFE_ADAPT_0_OFFSET)
  615. #define HPIPE_CDR_RX_MAX_DFE_ADAPT_1_OFFSET 12
  616. #define HPIPE_CDR_RX_MAX_DFE_ADAPT_1_MASK \
  617. (0x3 << HPIPE_CDR_RX_MAX_DFE_ADAPT_1_OFFSET)
  618. #define HPIPE_CDR_RX_MAX_DFE_ADAPT_0_OFFSET 14
  619. #define HPIPE_CDR_RX_MAX_DFE_ADAPT_0_MASK \
  620. (0x3 << HPIPE_CDR_RX_MAX_DFE_ADAPT_0_OFFSET)
  621. #define HPIPE_CDR_CONTROL1_REG 0x41c
  622. #define HPIPE_CRD2_CRD_MIDPOINT_SMALL_THRES_K_OFF 12
  623. #define HPIPE_CRD2_CRD_MIDPOINT_SMALL_THRES_K_MASK \
  624. (0xf << HPIPE_CRD2_CRD_MIDPOINT_SMALL_THRES_K_OFF)
  625. #define HPIPE_CDR_CONTROL2_REG 0x420
  626. #define HPIPE_CRD2_CRD_MIDPOINT_LARGE_THRES_K_OFF 12
  627. #define HPIPE_CRD2_CRD_MIDPOINT_LARGE_THRES_K_MASK \
  628. (0xf << HPIPE_CRD2_CRD_MIDPOINT_LARGE_THRES_K_OFF)
  629. #define HPIPE_TX_TRAIN_CTRL_11_REG 0x438
  630. #define HPIPE_TX_STATUS_CHECK_MODE_OFFSET 6
  631. #define HPIPE_TX_TX_STATUS_CHECK_MODE_MASK \
  632. (0x1 << HPIPE_TX_STATUS_CHECK_MODE_OFFSET)
  633. #define HPIPE_TX_NUM_OF_PRESET_OFFSET 10
  634. #define HPIPE_TX_NUM_OF_PRESET_MASK \
  635. (0x7 << HPIPE_TX_NUM_OF_PRESET_OFFSET)
  636. #define HPIPE_TX_SWEEP_PRESET_EN_OFFSET 15
  637. #define HPIPE_TX_SWEEP_PRESET_EN_MASK \
  638. (0x1 << HPIPE_TX_SWEEP_PRESET_EN_OFFSET)
  639. #define HPIPE_G1_SETTINGS_3_REG 0x440
  640. #define HPIPE_G1_SETTINGS_3_G1_FFE_CAP_SEL_OFFSET 0
  641. #define HPIPE_G1_SETTINGS_3_G1_FFE_CAP_SEL_MASK \
  642. (0xf << HPIPE_G1_SETTINGS_3_G1_FFE_CAP_SEL_OFFSET)
  643. #define HPIPE_G1_SETTINGS_3_G1_FFE_RES_SEL_OFFSET 4
  644. #define HPIPE_G1_SETTINGS_3_G1_FFE_RES_SEL_MASK \
  645. (0x7 << HPIPE_G1_SETTINGS_3_G1_FFE_RES_SEL_OFFSET)
  646. #define HPIPE_G1_SETTINGS_3_G1_FFE_SETTING_FORCE_OFFSET 7
  647. #define HPIPE_G1_SETTINGS_3_G1_FFE_SETTING_FORCE_MASK \
  648. (0x1 << HPIPE_G1_SETTINGS_3_G1_FFE_SETTING_FORCE_OFFSET)
  649. #define HPIPE_G1_SETTINGS_3_G1_FBCK_SEL_OFFSET 9
  650. #define HPIPE_G1_SETTINGS_3_G1_FBCK_SEL_MASK \
  651. (0x1 << HPIPE_G1_SETTINGS_3_G1_FBCK_SEL_OFFSET)
  652. #define HPIPE_G1_SETTINGS_3_G1_FFE_DEG_RES_LEVEL_OFFSET 12
  653. #define HPIPE_G1_SETTINGS_3_G1_FFE_DEG_RES_LEVEL_MASK \
  654. (0x3 << HPIPE_G1_SETTINGS_3_G1_FFE_DEG_RES_LEVEL_OFFSET)
  655. #define HPIPE_G1_SETTINGS_3_G1_FFE_LOAD_RES_LEVEL_OFFSET 14
  656. #define HPIPE_G1_SETTINGS_3_G1_FFE_LOAD_RES_LEVEL_MASK \
  657. (0x3 << HPIPE_G1_SETTINGS_3_G1_FFE_LOAD_RES_LEVEL_OFFSET)
  658. #define HPIPE_G1_SETTINGS_4_REG 0x444
  659. #define HPIPE_G1_SETTINGS_4_G1_DFE_RES_OFFSET 8
  660. #define HPIPE_G1_SETTINGS_4_G1_DFE_RES_MASK \
  661. (0x3 << HPIPE_G1_SETTINGS_4_G1_DFE_RES_OFFSET)
  662. #define HPIPE_G2_SETTINGS_4_REG 0x44c
  663. #define HPIPE_G2_DFE_RES_OFFSET 8
  664. #define HPIPE_G2_DFE_RES_MASK \
  665. (0x3 << HPIPE_G2_DFE_RES_OFFSET)
  666. #define HPIPE_G3_SETTING_3_REG 0x450
  667. #define HPIPE_G3_FFE_CAP_SEL_OFFSET 0
  668. #define HPIPE_G3_FFE_CAP_SEL_MASK \
  669. (0xf << HPIPE_G3_FFE_CAP_SEL_OFFSET)
  670. #define HPIPE_G3_FFE_RES_SEL_OFFSET 4
  671. #define HPIPE_G3_FFE_RES_SEL_MASK \
  672. (0x7 << HPIPE_G3_FFE_RES_SEL_OFFSET)
  673. #define HPIPE_G3_FFE_SETTING_FORCE_OFFSET 7
  674. #define HPIPE_G3_FFE_SETTING_FORCE_MASK \
  675. (0x1 << HPIPE_G3_FFE_SETTING_FORCE_OFFSET)
  676. #define HPIPE_G3_FFE_DEG_RES_LEVEL_OFFSET 12
  677. #define HPIPE_G3_FFE_DEG_RES_LEVEL_MASK \
  678. (0x3 << HPIPE_G3_FFE_DEG_RES_LEVEL_OFFSET)
  679. #define HPIPE_G3_FFE_LOAD_RES_LEVEL_OFFSET 14
  680. #define HPIPE_G3_FFE_LOAD_RES_LEVEL_MASK \
  681. (0x3 << HPIPE_G3_FFE_LOAD_RES_LEVEL_OFFSET)
  682. #define HPIPE_G3_SETTING_4_REG 0x454
  683. #define HPIPE_G3_DFE_RES_OFFSET 8
  684. #define HPIPE_G3_DFE_RES_MASK (0x3 << HPIPE_G3_DFE_RES_OFFSET)
  685. #define HPIPE_TX_PRESET_INDEX_REG 0x468
  686. #define HPIPE_TX_PRESET_INDEX_OFFSET 0
  687. #define HPIPE_TX_PRESET_INDEX_MASK \
  688. (0xf << HPIPE_TX_PRESET_INDEX_OFFSET)
  689. #define HPIPE_DFE_CONTROL_REG 0x470
  690. #define HPIPE_DFE_TX_MAX_DFE_ADAPT_OFFSET 14
  691. #define HPIPE_DFE_TX_MAX_DFE_ADAPT_MASK \
  692. (0x3 << HPIPE_DFE_TX_MAX_DFE_ADAPT_OFFSET)
  693. #define HPIPE_DFE_CTRL_28_REG 0x49C
  694. #define HPIPE_DFE_CTRL_28_PIPE4_OFFSET 7
  695. #define HPIPE_DFE_CTRL_28_PIPE4_MASK \
  696. (0x1 << HPIPE_DFE_CTRL_28_PIPE4_OFFSET)
  697. #define HPIPE_TRX0_REG 0x4cc /*in doc 0x133*4*/
  698. #define HPIPE_TRX0_GAIN_TRAIN_WITH_SAMPLER_OFF 2
  699. #define HPIPE_TRX0_GAIN_TRAIN_WITH_SAMPLER_MASK \
  700. (0x1 << HPIPE_TRX0_GAIN_TRAIN_WITH_SAMPLER_OFF)
  701. #define HPIPE_TRX0_GAIN_TRAIN_WITH_C_OFF 0
  702. #define HPIPE_TRX0_GAIN_TRAIN_WITH_C_MASK \
  703. (0x1 << HPIPE_TRX0_GAIN_TRAIN_WITH_C_OFF)
  704. #define HPIPE_TRX_REG1 0x4d0 /*in doc 0x134*4*/
  705. #define HPIPE_TRX_REG1_MIN_BOOST_MODE_OFF 3
  706. #define HPIPE_TRX_REG1_MIN_BOOST_MODE_MASK \
  707. (0x1 << HPIPE_TRX_REG1_MIN_BOOST_MODE_OFF)
  708. #define HPIPE_TRX_REG1_SUMFTAP_EN_OFF 10
  709. #define HPIPE_TRX_REG1_SUMFTAP_EN_MASK \
  710. (0x3f << HPIPE_TRX_REG1_SUMFTAP_EN_OFF)
  711. #define HPIPE_TRX_REG2 0x4d8 /*in doc 0x136*4*/
  712. #define HPIPE_TRX_REG2_SUMF_BOOST_TARGET_C_OFF 11
  713. #define HPIPE_TRX_REG2_SUMF_BOOST_TARGET_C_MASK \
  714. (0x1f << HPIPE_TRX_REG2_SUMF_BOOST_TARGET_C_OFF)
  715. #define HPIPE_TRX_REG2_SUMF_BOOST_TARGET_K_OFF 7
  716. #define HPIPE_TRX_REG2_SUMF_BOOST_TARGET_K_MASK \
  717. (0xf << HPIPE_TRX_REG2_SUMF_BOOST_TARGET_K_OFF)
  718. #define HPIPE_G1_SETTING_5_REG 0x538
  719. #define HPIPE_G1_SETTING_5_G1_ICP_OFFSET 0
  720. #define HPIPE_G1_SETTING_5_G1_ICP_MASK \
  721. (0xf << HPIPE_G1_SETTING_5_G1_ICP_OFFSET)
  722. #define HPIPE_G3_SETTING_5_REG 0x548
  723. #define HPIPE_G3_SETTING_5_G3_ICP_OFFSET 0
  724. #define HPIPE_G3_SETTING_5_G3_ICP_MASK \
  725. (0xf << HPIPE_G3_SETTING_5_G3_ICP_OFFSET)
  726. #define HPIPE_LANE_CONFIG0_REG 0x600
  727. #define HPIPE_LANE_CONFIG0_TXDEEMPH0_OFFSET 0
  728. #define HPIPE_LANE_CONFIG0_TXDEEMPH0_MASK \
  729. (0x1 << HPIPE_LANE_CONFIG0_TXDEEMPH0_OFFSET)
  730. #define HPIPE_LANE_STATUS1_REG 0x60C
  731. #define HPIPE_LANE_STATUS1_PCLK_EN_OFFSET 0
  732. #define HPIPE_LANE_STATUS1_PCLK_EN_MASK \
  733. (0x1 << HPIPE_LANE_STATUS1_PCLK_EN_OFFSET)
  734. #define HPIPE_LANE_CFG4_REG 0x620
  735. #define HPIPE_LANE_CFG4_DFE_CTRL_OFFSET 0
  736. #define HPIPE_LANE_CFG4_DFE_CTRL_MASK \
  737. (0x7 << HPIPE_LANE_CFG4_DFE_CTRL_OFFSET)
  738. #define HPIPE_LANE_CFG4_DFE_EN_SEL_OFFSET 3
  739. #define HPIPE_LANE_CFG4_DFE_EN_SEL_MASK \
  740. (0x1 << HPIPE_LANE_CFG4_DFE_EN_SEL_OFFSET)
  741. #define HPIPE_LANE_CFG4_DFE_OVER_OFFSET 6
  742. #define HPIPE_LANE_CFG4_DFE_OVER_MASK \
  743. (0x1 << HPIPE_LANE_CFG4_DFE_OVER_OFFSET)
  744. #define HPIPE_LANE_CFG4_SSC_CTRL_OFFSET 7
  745. #define HPIPE_LANE_CFG4_SSC_CTRL_MASK \
  746. (0x1 << HPIPE_LANE_CFG4_SSC_CTRL_OFFSET)
  747. #define HPIPE_LANE_EQ_REMOTE_SETTING_REG 0x6f8
  748. #define HPIPE_LANE_CFG_FOM_DIRN_OVERRIDE_OFFSET 0
  749. #define HPIPE_LANE_CFG_FOM_DIRN_OVERRIDE_MASK \
  750. (0x1 << HPIPE_LANE_CFG_FOM_DIRN_OVERRIDE_OFFSET)
  751. #define HPIPE_LANE_CFG_FOM_ONLY_MODE_OFFFSET 1
  752. #define HPIPE_LANE_CFG_FOM_ONLY_MODE_MASK \
  753. (0x1 << HPIPE_LANE_CFG_FOM_ONLY_MODE_OFFFSET)
  754. #define HPIPE_LANE_CFG_FOM_PRESET_VECTOR_OFFSET 2
  755. #define HPIPE_LANE_CFG_FOM_PRESET_VECTOR_MASK \
  756. (0xf << HPIPE_LANE_CFG_FOM_PRESET_VECTOR_OFFSET)
  757. #define HPIPE_LANE_EQU_CONFIG_0_REG 0x69C
  758. #define HPIPE_CFG_PHY_RC_EP_OFFSET 12
  759. #define HPIPE_CFG_PHY_RC_EP_MASK \
  760. (0x1 << HPIPE_CFG_PHY_RC_EP_OFFSET)
  761. #define HPIPE_LANE_EQ_CFG1_REG 0x6a0
  762. #define HPIPE_CFG_UPDATE_POLARITY_OFFSET 12
  763. #define HPIPE_CFG_UPDATE_POLARITY_MASK \
  764. (0x1 << HPIPE_CFG_UPDATE_POLARITY_OFFSET)
  765. #define HPIPE_LANE_EQ_CFG2_REG 0x6a4
  766. #define HPIPE_CFG_EQ_BUNDLE_DIS_OFFSET 14
  767. #define HPIPE_CFG_EQ_BUNDLE_DIS_MASK \
  768. (0x1 << HPIPE_CFG_EQ_BUNDLE_DIS_OFFSET)
  769. #define HPIPE_RST_CLK_CTRL_REG 0x704
  770. #define HPIPE_RST_CLK_CTRL_PIPE_RST_OFFSET 0
  771. #define HPIPE_RST_CLK_CTRL_PIPE_RST_MASK \
  772. (0x1 << HPIPE_RST_CLK_CTRL_PIPE_RST_OFFSET)
  773. #define HPIPE_RST_CLK_CTRL_FIXED_PCLK_OFFSET 2
  774. #define HPIPE_RST_CLK_CTRL_FIXED_PCLK_MASK \
  775. (0x1 << HPIPE_RST_CLK_CTRL_FIXED_PCLK_OFFSET)
  776. #define HPIPE_RST_CLK_CTRL_PIPE_WIDTH_OFFSET 3
  777. #define HPIPE_RST_CLK_CTRL_PIPE_WIDTH_MASK \
  778. (0x1 << HPIPE_RST_CLK_CTRL_PIPE_WIDTH_OFFSET)
  779. #define HPIPE_RST_CLK_CTRL_CORE_FREQ_SEL_OFFSET 9
  780. #define HPIPE_RST_CLK_CTRL_CORE_FREQ_SEL_MASK \
  781. (0x1 << HPIPE_RST_CLK_CTRL_CORE_FREQ_SEL_OFFSET)
  782. #define HPIPE_TST_MODE_CTRL_REG 0x708
  783. #define HPIPE_TST_MODE_CTRL_MODE_MARGIN_OFFSET 2
  784. #define HPIPE_TST_MODE_CTRL_MODE_MARGIN_MASK \
  785. (0x1 << HPIPE_TST_MODE_CTRL_MODE_MARGIN_OFFSET)
  786. #define HPIPE_CLK_SRC_LO_REG 0x70c
  787. #define HPIPE_CLK_SRC_LO_BUNDLE_PERIOD_SEL_OFFSET 1
  788. #define HPIPE_CLK_SRC_LO_BUNDLE_PERIOD_SEL_MASK \
  789. (0x1 << HPIPE_CLK_SRC_LO_BUNDLE_PERIOD_SEL_OFFSET)
  790. #define HPIPE_CLK_SRC_LO_BUNDLE_PERIOD_SCALE_OFFSET 2
  791. #define HPIPE_CLK_SRC_LO_BUNDLE_PERIOD_SCALE_MASK \
  792. (0x3 << HPIPE_CLK_SRC_LO_BUNDLE_PERIOD_SCALE_OFFSET)
  793. #define HPIPE_CLK_SRC_LO_PLL_RDY_DL_OFFSET 5
  794. #define HPIPE_CLK_SRC_LO_PLL_RDY_DL_MASK \
  795. (0x7 << HPIPE_CLK_SRC_LO_PLL_RDY_DL_OFFSET)
  796. #define HPIPE_CLK_SRC_HI_REG 0x710
  797. #define HPIPE_CLK_SRC_HI_LANE_STRT_OFFSET 0
  798. #define HPIPE_CLK_SRC_HI_LANE_STRT_MASK \
  799. (0x1 << HPIPE_CLK_SRC_HI_LANE_STRT_OFFSET)
  800. #define HPIPE_CLK_SRC_HI_LANE_BREAK_OFFSET 1
  801. #define HPIPE_CLK_SRC_HI_LANE_BREAK_MASK \
  802. (0x1 << HPIPE_CLK_SRC_HI_LANE_BREAK_OFFSET)
  803. #define HPIPE_CLK_SRC_HI_LANE_MASTER_OFFSET 2
  804. #define HPIPE_CLK_SRC_HI_LANE_MASTER_MASK \
  805. (0x1 << HPIPE_CLK_SRC_HI_LANE_MASTER_OFFSET)
  806. #define HPIPE_CLK_SRC_HI_MODE_PIPE_OFFSET 7
  807. #define HPIPE_CLK_SRC_HI_MODE_PIPE_MASK \
  808. (0x1 << HPIPE_CLK_SRC_HI_MODE_PIPE_OFFSET)
  809. #define HPIPE_GLOBAL_MISC_CTRL 0x718
  810. #define HPIPE_GLOBAL_PM_CTRL 0x740
  811. #define HPIPE_GLOBAL_PM_RXDLOZ_WAIT_OFFSET 0
  812. #define HPIPE_GLOBAL_PM_RXDLOZ_WAIT_MASK \
  813. (0xFF << HPIPE_GLOBAL_PM_RXDLOZ_WAIT_OFFSET)
  814. /* General defines */
  815. #define PLL_LOCK_TIMEOUT 15000
  816. #endif /* COMPHY_CP110_H */