comphy.h 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472
  1. /*
  2. * Copyright (C) 2018 Marvell International Ltd.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. * https://spdx.org/licenses
  6. */
  7. /* Driver for COMPHY unit that is part or Marvell A8K SoCs */
  8. #ifndef COMPHY_H
  9. #define COMPHY_H
  10. /* COMPHY registers */
  11. #define COMMON_PHY_CFG1_REG 0x0
  12. #define COMMON_PHY_CFG1_PWR_UP_OFFSET 1
  13. #define COMMON_PHY_CFG1_PWR_UP_MASK \
  14. (0x1 << COMMON_PHY_CFG1_PWR_UP_OFFSET)
  15. #define COMMON_PHY_CFG1_PIPE_SELECT_OFFSET 2
  16. #define COMMON_PHY_CFG1_PIPE_SELECT_MASK \
  17. (0x1 << COMMON_PHY_CFG1_PIPE_SELECT_OFFSET)
  18. #define COMMON_PHY_CFG1_PWR_ON_RESET_OFFSET 13
  19. #define COMMON_PHY_CFG1_PWR_ON_RESET_MASK \
  20. (0x1 << COMMON_PHY_CFG1_PWR_ON_RESET_OFFSET)
  21. #define COMMON_PHY_CFG1_CORE_RSTN_OFFSET 14
  22. #define COMMON_PHY_CFG1_CORE_RSTN_MASK \
  23. (0x1 << COMMON_PHY_CFG1_CORE_RSTN_OFFSET)
  24. #define COMMON_PHY_PHY_MODE_OFFSET 15
  25. #define COMMON_PHY_PHY_MODE_MASK \
  26. (0x1 << COMMON_PHY_PHY_MODE_OFFSET)
  27. #define COMMON_SELECTOR_PHY_OFFSET 0x140
  28. #define COMMON_SELECTOR_PIPE_OFFSET 0x144
  29. #define COMMON_PHY_SD_CTRL1 0x148
  30. #define COMMON_PHY_SD_CTRL1_COMPHY_0_4_PORT_OFFSET 0
  31. #define COMMON_PHY_SD_CTRL1_COMPHY_0_4_PORT_MASK 0xFFFF
  32. #define COMMON_PHY_SD_CTRL1_PCIE_X4_EN_OFFSET 24
  33. #define COMMON_PHY_SD_CTRL1_PCIE_X4_EN_MASK \
  34. (0x1 << COMMON_PHY_SD_CTRL1_PCIE_X4_EN_OFFSET)
  35. #define COMMON_PHY_SD_CTRL1_PCIE_X2_EN_OFFSET 25
  36. #define COMMON_PHY_SD_CTRL1_PCIE_X2_EN_MASK \
  37. (0x1 << COMMON_PHY_SD_CTRL1_PCIE_X2_EN_OFFSET)
  38. #define DFX_DEV_GEN_CTRL12 0x80
  39. #define DFX_DEV_GEN_PCIE_CLK_SRC_OFFSET 7
  40. #define DFX_DEV_GEN_PCIE_CLK_SRC_MASK \
  41. (0x3 << DFX_DEV_GEN_PCIE_CLK_SRC_OFFSET)
  42. /* HPIPE register */
  43. #define HPIPE_PWR_PLL_REG 0x4
  44. #define HPIPE_PWR_PLL_REF_FREQ_OFFSET 0
  45. #define HPIPE_PWR_PLL_REF_FREQ_MASK \
  46. (0x1f << HPIPE_PWR_PLL_REF_FREQ_OFFSET)
  47. #define HPIPE_PWR_PLL_PHY_MODE_OFFSET 5
  48. #define HPIPE_PWR_PLL_PHY_MODE_MASK \
  49. (0x7 << HPIPE_PWR_PLL_PHY_MODE_OFFSET)
  50. #define HPIPE_DFE_REG0 0x01C
  51. #define HPIPE_DFE_RES_FORCE_OFFSET 15
  52. #define HPIPE_DFE_RES_FORCE_MASK \
  53. (0x1 << HPIPE_DFE_RES_FORCE_OFFSET)
  54. #define HPIPE_G2_SET_1_REG 0x040
  55. #define HPIPE_G2_SET_1_G2_RX_SELMUPI_OFFSET 0
  56. #define HPIPE_G2_SET_1_G2_RX_SELMUPI_MASK \
  57. (0x7 << HPIPE_G2_SET_1_G2_RX_SELMUPI_OFFSET)
  58. #define HPIPE_G2_SET_1_G2_RX_SELMUPP_OFFSET 3
  59. #define HPIPE_G2_SET_1_G2_RX_SELMUPP_MASK \
  60. (0x7 << HPIPE_G2_SET_1_G2_RX_SELMUPP_OFFSET)
  61. #define HPIPE_G2_SET_1_G2_RX_SELMUFI_OFFSET 6
  62. #define HPIPE_G2_SET_1_G2_RX_SELMUFI_MASK \
  63. (0x3 << HPIPE_G2_SET_1_G2_RX_SELMUFI_OFFSET)
  64. #define HPIPE_G3_SETTINGS_1_REG 0x048
  65. #define HPIPE_G3_RX_SELMUPI_OFFSET 0
  66. #define HPIPE_G3_RX_SELMUPI_MASK \
  67. (0x7 << HPIPE_G3_RX_SELMUPI_OFFSET)
  68. #define HPIPE_G3_RX_SELMUPF_OFFSET 3
  69. #define HPIPE_G3_RX_SELMUPF_MASK \
  70. (0x7 << HPIPE_G3_RX_SELMUPF_OFFSET)
  71. #define HPIPE_G3_SETTING_BIT_OFFSET 13
  72. #define HPIPE_G3_SETTING_BIT_MASK \
  73. (0x1 << HPIPE_G3_SETTING_BIT_OFFSET)
  74. #define HPIPE_INTERFACE_REG 0x94
  75. #define HPIPE_INTERFACE_GEN_MAX_OFFSET 10
  76. #define HPIPE_INTERFACE_GEN_MAX_MASK \
  77. (0x3 << HPIPE_INTERFACE_GEN_MAX_OFFSET)
  78. #define HPIPE_INTERFACE_DET_BYPASS_OFFSET 12
  79. #define HPIPE_INTERFACE_DET_BYPASS_MASK \
  80. (0x1 << HPIPE_INTERFACE_DET_BYPASS_OFFSET)
  81. #define HPIPE_INTERFACE_LINK_TRAIN_OFFSET 14
  82. #define HPIPE_INTERFACE_LINK_TRAIN_MASK \
  83. (0x1 << HPIPE_INTERFACE_LINK_TRAIN_OFFSET)
  84. #define HPIPE_VDD_CAL_CTRL_REG 0x114
  85. #define HPIPE_EXT_SELLV_RXSAMPL_OFFSET 5
  86. #define HPIPE_EXT_SELLV_RXSAMPL_MASK \
  87. (0x1f << HPIPE_EXT_SELLV_RXSAMPL_OFFSET)
  88. #define HPIPE_PCIE_REG0 0x120
  89. #define HPIPE_PCIE_IDLE_SYNC_OFFSET 12
  90. #define HPIPE_PCIE_IDLE_SYNC_MASK \
  91. (0x1 << HPIPE_PCIE_IDLE_SYNC_OFFSET)
  92. #define HPIPE_PCIE_SEL_BITS_OFFSET 13
  93. #define HPIPE_PCIE_SEL_BITS_MASK \
  94. (0x3 << HPIPE_PCIE_SEL_BITS_OFFSET)
  95. #define HPIPE_LANE_ALIGN_REG 0x124
  96. #define HPIPE_LANE_ALIGN_OFF_OFFSET 12
  97. #define HPIPE_LANE_ALIGN_OFF_MASK \
  98. (0x1 << HPIPE_LANE_ALIGN_OFF_OFFSET)
  99. #define HPIPE_MISC_REG 0x13C
  100. #define HPIPE_MISC_CLK100M_125M_OFFSET 4
  101. #define HPIPE_MISC_CLK100M_125M_MASK \
  102. (0x1 << HPIPE_MISC_CLK100M_125M_OFFSET)
  103. #define HPIPE_MISC_ICP_FORCE_OFFSET 5
  104. #define HPIPE_MISC_ICP_FORCE_MASK \
  105. (0x1 << HPIPE_MISC_ICP_FORCE_OFFSET)
  106. #define HPIPE_MISC_TXDCLK_2X_OFFSET 6
  107. #define HPIPE_MISC_TXDCLK_2X_MASK \
  108. (0x1 << HPIPE_MISC_TXDCLK_2X_OFFSET)
  109. #define HPIPE_MISC_CLK500_EN_OFFSET 7
  110. #define HPIPE_MISC_CLK500_EN_MASK \
  111. (0x1 << HPIPE_MISC_CLK500_EN_OFFSET)
  112. #define HPIPE_MISC_REFCLK_SEL_OFFSET 10
  113. #define HPIPE_MISC_REFCLK_SEL_MASK \
  114. (0x1 << HPIPE_MISC_REFCLK_SEL_OFFSET)
  115. #define HPIPE_SAMPLER_N_PROC_CALIB_CTRL_REG 0x16C
  116. #define HPIPE_SMAPLER_OFFSET 12
  117. #define HPIPE_SMAPLER_MASK (0x1 << HPIPE_SMAPLER_OFFSET)
  118. #define HPIPE_PWR_CTR_DTL_REG 0x184
  119. #define HPIPE_PWR_CTR_DTL_FLOOP_EN_OFFSET 2
  120. #define HPIPE_PWR_CTR_DTL_FLOOP_EN_MASK \
  121. (0x1 << HPIPE_PWR_CTR_DTL_FLOOP_EN_OFFSET)
  122. #define HPIPE_FRAME_DET_CONTROL_REG 0x220
  123. #define HPIPE_FRAME_DET_LOCK_LOST_TO_OFFSET 12
  124. #define HPIPE_FRAME_DET_LOCK_LOST_TO_MASK \
  125. (0x1 << HPIPE_FRAME_DET_LOCK_LOST_TO_OFFSET)
  126. #define HPIPE_TX_TRAIN_CTRL_0_REG 0x268
  127. #define HPIPE_TX_TRAIN_P2P_HOLD_OFFSET 15
  128. #define HPIPE_TX_TRAIN_P2P_HOLD_MASK \
  129. (0x1 << HPIPE_TX_TRAIN_P2P_HOLD_OFFSET)
  130. #define HPIPE_TX_TRAIN_CTRL_REG 0x26C
  131. #define HPIPE_TX_TRAIN_CTRL_G1_OFFSET 0
  132. #define HPIPE_TX_TRAIN_CTRL_G1_MASK \
  133. (0x1 << HPIPE_TX_TRAIN_CTRL_G1_OFFSET)
  134. #define HPIPE_TX_TRAIN_CTRL_GN1_OFFSET 1
  135. #define HPIPE_TX_TRAIN_CTRL_GN1_MASK \
  136. (0x1 << HPIPE_TX_TRAIN_CTRL_GN1_OFFSET)
  137. #define HPIPE_TX_TRAIN_CTRL_G0_OFFSET 2
  138. #define HPIPE_TX_TRAIN_CTRL_G0_MASK \
  139. (0x1 << HPIPE_TX_TRAIN_CTRL_G0_OFFSET)
  140. #define HPIPE_TX_TRAIN_CTRL_4_REG 0x278
  141. #define HPIPE_TRX_TRAIN_TIMER_OFFSET 0
  142. #define HPIPE_TRX_TRAIN_TIMER_MASK \
  143. (0x3FF << HPIPE_TRX_TRAIN_TIMER_OFFSET)
  144. #define HPIPE_TX_TRAIN_CTRL_5_REG 0x2A4
  145. #define HPIPE_TX_TRAIN_START_SQ_EN_OFFSET 11
  146. #define HPIPE_TX_TRAIN_START_SQ_EN_MASK \
  147. (0x1 << HPIPE_TX_TRAIN_START_SQ_EN_OFFSET)
  148. #define HPIPE_TX_TRAIN_START_FRM_DET_EN_OFFSET 12
  149. #define HPIPE_TX_TRAIN_START_FRM_DET_EN_MASK \
  150. (0x1 << HPIPE_TX_TRAIN_START_FRM_DET_EN_OFFSET)
  151. #define HPIPE_TX_TRAIN_START_FRM_LOCK_EN_OFFSET 13
  152. #define HPIPE_TX_TRAIN_START_FRM_LOCK_EN_MASK \
  153. (0x1 << HPIPE_TX_TRAIN_START_FRM_LOCK_EN_OFFSET)
  154. #define HPIPE_TX_TRAIN_WAIT_TIME_EN_OFFSET 14
  155. #define HPIPE_TX_TRAIN_WAIT_TIME_EN_MASK \
  156. (0x1 << HPIPE_TX_TRAIN_WAIT_TIME_EN_OFFSET)
  157. #define HPIPE_TX_TRAIN_REG 0x31C
  158. #define HPIPE_TX_TRAIN_CHK_INIT_OFFSET 4
  159. #define HPIPE_TX_TRAIN_CHK_INIT_MASK \
  160. (0x1 << HPIPE_TX_TRAIN_CHK_INIT_OFFSET)
  161. #define HPIPE_TX_TRAIN_COE_FM_PIN_PCIE3_OFFSET 7
  162. #define HPIPE_TX_TRAIN_COE_FM_PIN_PCIE3_MASK \
  163. (0x1 << HPIPE_TX_TRAIN_COE_FM_PIN_PCIE3_OFFSET)
  164. #define HPIPE_CDR_CONTROL_REG 0x418
  165. #define HPIPE_CDR_RX_MAX_DFE_ADAPT_0_OFFSET 14
  166. #define HPIPE_CDR_RX_MAX_DFE_ADAPT_0_MASK \
  167. (0x3 << HPIPE_CDR_RX_MAX_DFE_ADAPT_0_OFFSET)
  168. #define HPIPE_CDR_RX_MAX_DFE_ADAPT_1_OFFSET 12
  169. #define HPIPE_CDR_RX_MAX_DFE_ADAPT_1_MASK \
  170. (0x3 << HPIPE_CDR_RX_MAX_DFE_ADAPT_1_OFFSET)
  171. #define HPIPE_CDR_MAX_DFE_ADAPT_0_OFFSET 9
  172. #define HPIPE_CDR_MAX_DFE_ADAPT_0_MASK \
  173. (0x7 << HPIPE_CDR_MAX_DFE_ADAPT_0_OFFSET)
  174. #define HPIPE_CDR_MAX_DFE_ADAPT_1_OFFSET 6
  175. #define HPIPE_CDR_MAX_DFE_ADAPT_1_MASK \
  176. (0x7 << HPIPE_CDR_MAX_DFE_ADAPT_1_OFFSET)
  177. #define HPIPE_TX_TRAIN_CTRL_11_REG 0x438
  178. #define HPIPE_TX_STATUS_CHECK_MODE_OFFSET 6
  179. #define HPIPE_TX_TX_STATUS_CHECK_MODE_MASK \
  180. (0x1 << HPIPE_TX_STATUS_CHECK_MODE_OFFSET)
  181. #define HPIPE_TX_NUM_OF_PRESET_OFFSET 10
  182. #define HPIPE_TX_NUM_OF_PRESET_MASK \
  183. (0x7 << HPIPE_TX_NUM_OF_PRESET_OFFSET)
  184. #define HPIPE_TX_SWEEP_PRESET_EN_OFFSET 15
  185. #define HPIPE_TX_SWEEP_PRESET_EN_MASK \
  186. (0x1 << HPIPE_TX_SWEEP_PRESET_EN_OFFSET)
  187. #define HPIPE_G2_SETTINGS_4_REG 0x44C
  188. #define HPIPE_G2_DFE_RES_OFFSET 8
  189. #define HPIPE_G2_DFE_RES_MASK (0x3 << HPIPE_G2_DFE_RES_OFFSET)
  190. #define HPIPE_G3_SETTING_3_REG 0x450
  191. #define HPIPE_G3_FFE_CAP_SEL_OFFSET 0
  192. #define HPIPE_G3_FFE_CAP_SEL_MASK \
  193. (0xf << HPIPE_G3_FFE_CAP_SEL_OFFSET)
  194. #define HPIPE_G3_FFE_RES_SEL_OFFSET 4
  195. #define HPIPE_G3_FFE_RES_SEL_MASK \
  196. (0x7 << HPIPE_G3_FFE_RES_SEL_OFFSET)
  197. #define HPIPE_G3_FFE_SETTING_FORCE_OFFSET 7
  198. #define HPIPE_G3_FFE_SETTING_FORCE_MASK \
  199. (0x1 << HPIPE_G3_FFE_SETTING_FORCE_OFFSET)
  200. #define HPIPE_G3_FFE_DEG_RES_LEVEL_OFFSET 12
  201. #define HPIPE_G3_FFE_DEG_RES_LEVEL_MASK \
  202. (0x3 << HPIPE_G3_FFE_DEG_RES_LEVEL_OFFSET)
  203. #define HPIPE_G3_FFE_LOAD_RES_LEVEL_OFFSET 14
  204. #define HPIPE_G3_FFE_LOAD_RES_LEVEL_MASK \
  205. (0x3 << HPIPE_G3_FFE_LOAD_RES_LEVEL_OFFSET)
  206. #define HPIPE_G3_SETTING_4_REG 0x454
  207. #define HPIPE_G3_DFE_RES_OFFSET 8
  208. #define HPIPE_G3_DFE_RES_MASK (0x3 << HPIPE_G3_DFE_RES_OFFSET)
  209. #define HPIPE_DFE_CONTROL_REG 0x470
  210. #define HPIPE_DFE_TX_MAX_DFE_ADAPT_OFFSET 14
  211. #define HPIPE_DFE_TX_MAX_DFE_ADAPT_MASK \
  212. (0x3 << HPIPE_DFE_TX_MAX_DFE_ADAPT_OFFSET)
  213. #define HPIPE_DFE_CTRL_28_REG 0x49C
  214. #define HPIPE_DFE_CTRL_28_PIPE4_OFFSET 7
  215. #define HPIPE_DFE_CTRL_28_PIPE4_MASK \
  216. (0x1 << HPIPE_DFE_CTRL_28_PIPE4_OFFSET)
  217. #define HPIPE_G3_SETTING_5_REG 0x548
  218. #define HPIPE_G3_SETTING_5_G3_ICP_OFFSET 0
  219. #define HPIPE_G3_SETTING_5_G3_ICP_MASK \
  220. (0xf << HPIPE_G3_SETTING_5_G3_ICP_OFFSET)
  221. #define HPIPE_LANE_STATUS1_REG 0x60C
  222. #define HPIPE_LANE_STATUS1_PCLK_EN_OFFSET 0
  223. #define HPIPE_LANE_STATUS1_PCLK_EN_MASK \
  224. (0x1 << HPIPE_LANE_STATUS1_PCLK_EN_OFFSET)
  225. #define HPIPE_LANE_CFG4_REG 0x620
  226. #define HPIPE_LANE_CFG4_DFE_EN_SEL_OFFSET 3
  227. #define HPIPE_LANE_CFG4_DFE_EN_SEL_MASK \
  228. (0x1 << HPIPE_LANE_CFG4_DFE_EN_SEL_OFFSET)
  229. #define HPIPE_LANE_EQU_CONFIG_0_REG 0x69C
  230. #define HPIPE_CFG_EQ_FS_OFFSET 0
  231. #define HPIPE_CFG_EQ_FS_MASK (0x3f << HPIPE_CFG_EQ_FS_OFFSET)
  232. #define HPIPE_CFG_EQ_LF_OFFSET 6
  233. #define HPIPE_CFG_EQ_LF_MASK (0x3f << HPIPE_CFG_EQ_LF_OFFSET)
  234. #define HPIPE_CFG_PHY_RC_EP_OFFSET 12
  235. #define HPIPE_CFG_PHY_RC_EP_MASK \
  236. (0x1 << HPIPE_CFG_PHY_RC_EP_OFFSET)
  237. #define HPIPE_LANE_EQ_CFG1_REG 0x6a0
  238. #define HPIPE_CFG_UPDATE_POLARITY_OFFSET 12
  239. #define HPIPE_CFG_UPDATE_POLARITY_MASK \
  240. (0x1 << HPIPE_CFG_UPDATE_POLARITY_OFFSET)
  241. #define HPIPE_LANE_EQ_CFG2_REG 0x6a4
  242. #define HPIPE_CFG_EQ_BUNDLE_DIS_OFFSET 14
  243. #define HPIPE_CFG_EQ_BUNDLE_DIS_MASK \
  244. (0x1 << HPIPE_CFG_EQ_BUNDLE_DIS_OFFSET)
  245. #define HPIPE_LANE_PRESET_CFG0_REG 0x6a8
  246. #define HPIPE_CFG_CURSOR_PRESET0_OFFSET 0
  247. #define HPIPE_CFG_CURSOR_PRESET0_MASK \
  248. (0x3f << HPIPE_CFG_CURSOR_PRESET0_OFFSET)
  249. #define HPIPE_CFG_CURSOR_PRESET1_OFFSET 6
  250. #define HPIPE_CFG_CURSOR_PRESET1_MASK \
  251. (0x3f << HPIPE_CFG_CURSOR_PRESET1_OFFSET)
  252. #define HPIPE_LANE_PRESET_CFG1_REG 0x6ac
  253. #define HPIPE_CFG_CURSOR_PRESET2_OFFSET 0
  254. #define HPIPE_CFG_CURSOR_PRESET2_MASK \
  255. (0x3f << HPIPE_CFG_CURSOR_PRESET2_OFFSET)
  256. #define HPIPE_CFG_CURSOR_PRESET3_OFFSET 6
  257. #define HPIPE_CFG_CURSOR_PRESET3_MASK \
  258. (0x3f << HPIPE_CFG_CURSOR_PRESET3_OFFSET)
  259. #define HPIPE_LANE_PRESET_CFG2_REG 0x6b0
  260. #define HPIPE_CFG_CURSOR_PRESET4_OFFSET 0
  261. #define HPIPE_CFG_CURSOR_PRESET4_MASK \
  262. (0x3f << HPIPE_CFG_CURSOR_PRESET4_OFFSET)
  263. #define HPIPE_CFG_CURSOR_PRESET5_OFFSET 6
  264. #define HPIPE_CFG_CURSOR_PRESET5_MASK \
  265. (0x3f << HPIPE_CFG_CURSOR_PRESET5_OFFSET)
  266. #define HPIPE_LANE_PRESET_CFG3_REG 0x6b4
  267. #define HPIPE_CFG_CURSOR_PRESET6_OFFSET 0
  268. #define HPIPE_CFG_CURSOR_PRESET6_MASK \
  269. (0x3f << HPIPE_CFG_CURSOR_PRESET6_OFFSET)
  270. #define HPIPE_CFG_CURSOR_PRESET7_OFFSET 6
  271. #define HPIPE_CFG_CURSOR_PRESET7_MASK \
  272. (0x3f << HPIPE_CFG_CURSOR_PRESET7_OFFSET)
  273. #define HPIPE_LANE_PRESET_CFG4_REG 0x6b8
  274. #define HPIPE_CFG_CURSOR_PRESET8_OFFSET 0
  275. #define HPIPE_CFG_CURSOR_PRESET8_MASK \
  276. (0x3f << HPIPE_CFG_CURSOR_PRESET8_OFFSET)
  277. #define HPIPE_CFG_CURSOR_PRESET9_OFFSET 6
  278. #define HPIPE_CFG_CURSOR_PRESET9_MASK \
  279. (0x3f << HPIPE_CFG_CURSOR_PRESET9_OFFSET)
  280. #define HPIPE_LANE_PRESET_CFG5_REG 0x6bc
  281. #define HPIPE_CFG_CURSOR_PRESET10_OFFSET 0
  282. #define HPIPE_CFG_CURSOR_PRESET10_MASK \
  283. (0x3f << HPIPE_CFG_CURSOR_PRESET10_OFFSET)
  284. #define HPIPE_CFG_CURSOR_PRESET11_OFFSET 6
  285. #define HPIPE_CFG_CURSOR_PRESET11_MASK \
  286. (0x3f << HPIPE_CFG_CURSOR_PRESET11_OFFSET)
  287. #define HPIPE_LANE_PRESET_CFG6_REG 0x6c0
  288. #define HPIPE_CFG_PRE_CURSOR_PRESET0_OFFSET 0
  289. #define HPIPE_CFG_PRE_CURSOR_PRESET0_MASK \
  290. (0x3f << HPIPE_CFG_PRE_CURSOR_PRESET0_OFFSET)
  291. #define HPIPE_CFG_POST_CURSOR_PRESET0_OFFSET 6
  292. #define HPIPE_CFG_POST_CURSOR_PRESET0_MASK \
  293. (0x3f << HPIPE_CFG_POST_CURSOR_PRESET0_OFFSET)
  294. #define HPIPE_LANE_PRESET_CFG7_REG 0x6c4
  295. #define HPIPE_CFG_PRE_CURSOR_PRESET1_OFFSET 0
  296. #define HPIPE_CFG_PRE_CURSOR_PRESET1_MASK \
  297. (0x3f << HPIPE_CFG_PRE_CURSOR_PRESET1_OFFSET)
  298. #define HPIPE_CFG_POST_CURSOR_PRESET1_OFFSET 6
  299. #define HPIPE_CFG_POST_CURSOR_PRESET1_MASK \
  300. (0x3f << HPIPE_CFG_POST_CURSOR_PRESET1_OFFSET)
  301. #define HPIPE_LANE_PRESET_CFG8_REG 0x6c8
  302. #define HPIPE_CFG_PRE_CURSOR_PRESET2_OFFSET 0
  303. #define HPIPE_CFG_PRE_CURSOR_PRESET2_MASK \
  304. (0x3f << HPIPE_CFG_PRE_CURSOR_PRESET2_OFFSET)
  305. #define HPIPE_CFG_POST_CURSOR_PRESET2_OFFSET 6
  306. #define HPIPE_CFG_POST_CURSOR_PRESET2_MASK \
  307. (0x3f << HPIPE_CFG_POST_CURSOR_PRESET2_OFFSET)
  308. #define HPIPE_LANE_PRESET_CFG9_REG 0x6cc
  309. #define HPIPE_CFG_PRE_CURSOR_PRESET3_OFFSET 0
  310. #define HPIPE_CFG_PRE_CURSOR_PRESET3_MASK \
  311. (0x3f << HPIPE_CFG_PRE_CURSOR_PRESET3_OFFSET)
  312. #define HPIPE_CFG_POST_CURSOR_PRESET3_OFFSET 6
  313. #define HPIPE_CFG_POST_CURSOR_PRESET3_MASK \
  314. (0x3f << HPIPE_CFG_POST_CURSOR_PRESET3_OFFSET)
  315. #define HPIPE_LANE_PRESET_CFG10_REG 0x6d0
  316. #define HPIPE_CFG_PRE_CURSOR_PRESET4_OFFSET 0
  317. #define HPIPE_CFG_PRE_CURSOR_PRESET4_MASK \
  318. (0x3f << HPIPE_CFG_PRE_CURSOR_PRESET4_OFFSET)
  319. #define HPIPE_CFG_POST_CURSOR_PRESET4_OFFSET 6
  320. #define HPIPE_CFG_POST_CURSOR_PRESET4_MASK \
  321. (0x3f << HPIPE_CFG_POST_CURSOR_PRESET4_OFFSET)
  322. #define HPIPE_LANE_PRESET_CFG11_REG 0x6d4
  323. #define HPIPE_CFG_PRE_CURSOR_PRESET5_OFFSET 0
  324. #define HPIPE_CFG_PRE_CURSOR_PRESET5_MASK \
  325. (0x3f << HPIPE_CFG_PRE_CURSOR_PRESET5_OFFSET)
  326. #define HPIPE_CFG_POST_CURSOR_PRESET5_OFFSET 6
  327. #define HPIPE_CFG_POST_CURSOR_PRESET5_MASK \
  328. (0x3f << HPIPE_CFG_POST_CURSOR_PRESET5_OFFSET)
  329. #define HPIPE_LANE_PRESET_CFG12_REG 0x6d8
  330. #define HPIPE_CFG_PRE_CURSOR_PRESET6_OFFSET 0
  331. #define HPIPE_CFG_PRE_CURSOR_PRESET6_MASK \
  332. (0x3f << HPIPE_CFG_PRE_CURSOR_PRESET6_OFFSET)
  333. #define HPIPE_CFG_POST_CURSOR_PRESET6_OFFSET 6
  334. #define HPIPE_CFG_POST_CURSOR_PRESET6_MASK \
  335. (0x3f << HPIPE_CFG_POST_CURSOR_PRESET6_OFFSET)
  336. #define HPIPE_LANE_PRESET_CFG13_REG 0x6dc
  337. #define HPIPE_CFG_PRE_CURSOR_PRESET7_OFFSET 0
  338. #define HPIPE_CFG_PRE_CURSOR_PRESET7_MASK \
  339. (0x3f << HPIPE_CFG_PRE_CURSOR_PRESET7_OFFSET)
  340. #define HPIPE_CFG_POST_CURSOR_PRESET7_OFFSET 6
  341. #define HPIPE_CFG_POST_CURSOR_PRESET7_MASK \
  342. (0x3f << HPIPE_CFG_POST_CURSOR_PRESET7_OFFSET)
  343. #define HPIPE_LANE_PRESET_CFG14_REG 0x6e0
  344. #define HPIPE_CFG_PRE_CURSOR_PRESET8_OFFSET 0
  345. #define HPIPE_CFG_PRE_CURSOR_PRESET8_MASK \
  346. (0x3f << HPIPE_CFG_PRE_CURSOR_PRESET8_OFFSET)
  347. #define HPIPE_CFG_POST_CURSOR_PRESET8_OFFSET 6
  348. #define HPIPE_CFG_POST_CURSOR_PRESET8_MASK \
  349. (0x3f << HPIPE_CFG_POST_CURSOR_PRESET8_OFFSET)
  350. #define HPIPE_LANE_PRESET_CFG15_REG 0x6e4
  351. #define HPIPE_CFG_PRE_CURSOR_PRESET9_OFFSET 0
  352. #define HPIPE_CFG_PRE_CURSOR_PRESET9_MASK \
  353. (0x3f << HPIPE_CFG_PRE_CURSOR_PRESET9_OFFSET)
  354. #define HPIPE_CFG_POST_CURSOR_PRESET9_OFFSET 6
  355. #define HPIPE_CFG_POST_CURSOR_PRESET9_MASK \
  356. (0x3f << HPIPE_CFG_POST_CURSOR_PRESET9_OFFSET)
  357. #define HPIPE_LANE_PRESET_CFG16_REG 0x6e8
  358. #define HPIPE_CFG_PRE_CURSOR_PRESET10_OFFSET 0
  359. #define HPIPE_CFG_PRE_CURSOR_PRESET10_MASK \
  360. (0x3f << HPIPE_CFG_PRE_CURSOR_PRESET10_OFFSET)
  361. #define HPIPE_CFG_POST_CURSOR_PRESET10_OFFSET 6
  362. #define HPIPE_CFG_POST_CURSOR_PRESET10_MASK \
  363. (0x3f << HPIPE_CFG_POST_CURSOR_PRESET10_OFFSET)
  364. #define HPIPE_LANE_EQ_REMOTE_SETTING_REG 0x6f8
  365. #define HPIPE_LANE_CFG_FOM_DIRN_OVERRIDE_OFFSET 0
  366. #define HPIPE_LANE_CFG_FOM_DIRN_OVERRIDE_MASK \
  367. (0x1 << HPIPE_LANE_CFG_FOM_DIRN_OVERRIDE_OFFSET)
  368. #define HPIPE_LANE_CFG_FOM_ONLY_MODE_OFFFSET 1
  369. #define HPIPE_LANE_CFG_FOM_ONLY_MODE_MASK \
  370. (0x1 << HPIPE_LANE_CFG_FOM_ONLY_MODE_OFFFSET)
  371. #define HPIPE_LANE_CFG_FOM_PRESET_VECTOR_OFFSET 2
  372. #define HPIPE_LANE_CFG_FOM_PRESET_VECTOR_MASK \
  373. (0xf << HPIPE_LANE_CFG_FOM_PRESET_VECTOR_OFFSET)
  374. #define HPIPE_RST_CLK_CTRL_REG 0x704
  375. #define HPIPE_RST_CLK_CTRL_PIPE_RST_OFFSET 0
  376. #define HPIPE_RST_CLK_CTRL_PIPE_RST_MASK \
  377. (0x1 << HPIPE_RST_CLK_CTRL_PIPE_RST_OFFSET)
  378. #define HPIPE_RST_CLK_CTRL_FIXED_PCLK_OFFSET 2
  379. #define HPIPE_RST_CLK_CTRL_FIXED_PCLK_MASK \
  380. (0x1 << HPIPE_RST_CLK_CTRL_FIXED_PCLK_OFFSET)
  381. #define HPIPE_RST_CLK_CTRL_PIPE_WIDTH_OFFSET 3
  382. #define HPIPE_RST_CLK_CTRL_PIPE_WIDTH_MASK \
  383. (0x1 << HPIPE_RST_CLK_CTRL_PIPE_WIDTH_OFFSET)
  384. #define HPIPE_RST_CLK_CTRL_CORE_FREQ_SEL_OFFSET 9
  385. #define HPIPE_RST_CLK_CTRL_CORE_FREQ_SEL_MASK \
  386. (0x1 << HPIPE_RST_CLK_CTRL_CORE_FREQ_SEL_OFFSET)
  387. #define HPIPE_CLK_SRC_LO_REG 0x70c
  388. #define HPIPE_CLK_SRC_LO_BUNDLE_PERIOD_SEL_OFFSET 1
  389. #define HPIPE_CLK_SRC_LO_BUNDLE_PERIOD_SEL_MASK \
  390. (0x1 << HPIPE_CLK_SRC_LO_BUNDLE_PERIOD_SEL_OFFSET)
  391. #define HPIPE_CLK_SRC_LO_BUNDLE_PERIOD_SCALE_OFFSET 2
  392. #define HPIPE_CLK_SRC_LO_BUNDLE_PERIOD_SCALE_MASK \
  393. (0x3 << HPIPE_CLK_SRC_LO_BUNDLE_PERIOD_SCALE_OFFSET)
  394. #define HPIPE_CLK_SRC_LO_PLL_RDY_DL_OFFSET 5
  395. #define HPIPE_CLK_SRC_LO_PLL_RDY_DL_MASK \
  396. (0x7 << HPIPE_CLK_SRC_LO_PLL_RDY_DL_OFFSET)
  397. #define HPIPE_CLK_SRC_HI_REG 0x710
  398. #define HPIPE_CLK_SRC_HI_LANE_STRT_OFFSET 0
  399. #define HPIPE_CLK_SRC_HI_LANE_STRT_MASK \
  400. (0x1 << HPIPE_CLK_SRC_HI_LANE_STRT_OFFSET)
  401. #define HPIPE_CLK_SRC_HI_LANE_BREAK_OFFSET 1
  402. #define HPIPE_CLK_SRC_HI_LANE_BREAK_MASK \
  403. (0x1 << HPIPE_CLK_SRC_HI_LANE_BREAK_OFFSET)
  404. #define HPIPE_CLK_SRC_HI_LANE_MASTER_OFFSET 2
  405. #define HPIPE_CLK_SRC_HI_LANE_MASTER_MASK \
  406. (0x1 << HPIPE_CLK_SRC_HI_LANE_MASTER_OFFSET)
  407. #define HPIPE_CLK_SRC_HI_MODE_PIPE_OFFSET 7
  408. #define HPIPE_CLK_SRC_HI_MODE_PIPE_MASK \
  409. (0x1 << HPIPE_CLK_SRC_HI_MODE_PIPE_OFFSET)
  410. #define HPIPE_GLOBAL_PM_CTRL 0x740
  411. #define HPIPE_GLOBAL_PM_RXDLOZ_WAIT_OFFSET 0
  412. #define HPIPE_GLOBAL_PM_RXDLOZ_WAIT_MASK \
  413. (0xFF << HPIPE_GLOBAL_PM_RXDLOZ_WAIT_OFFSET)
  414. #endif /* COMPHY_H */