ocelot_hsio.h 53 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786
  1. /* SPDX-License-Identifier: (GPL-2.0 OR MIT) */
  2. /*
  3. * Microsemi Ocelot Switch driver
  4. *
  5. * Copyright (c) 2017 Microsemi Corporation
  6. */
  7. #ifndef _MSCC_OCELOT_HSIO_H_
  8. #define _MSCC_OCELOT_HSIO_H_
  9. #define HSIO_PLL5G_CFG0_ENA_ROT BIT(31)
  10. #define HSIO_PLL5G_CFG0_ENA_LANE BIT(30)
  11. #define HSIO_PLL5G_CFG0_ENA_CLKTREE BIT(29)
  12. #define HSIO_PLL5G_CFG0_DIV4 BIT(28)
  13. #define HSIO_PLL5G_CFG0_ENA_LOCK_FINE BIT(27)
  14. #define HSIO_PLL5G_CFG0_SELBGV820(x) (((x) << 23) & GENMASK(26, 23))
  15. #define HSIO_PLL5G_CFG0_SELBGV820_M GENMASK(26, 23)
  16. #define HSIO_PLL5G_CFG0_SELBGV820_X(x) (((x) & GENMASK(26, 23)) >> 23)
  17. #define HSIO_PLL5G_CFG0_LOOP_BW_RES(x) (((x) << 18) & GENMASK(22, 18))
  18. #define HSIO_PLL5G_CFG0_LOOP_BW_RES_M GENMASK(22, 18)
  19. #define HSIO_PLL5G_CFG0_LOOP_BW_RES_X(x) (((x) & GENMASK(22, 18)) >> 18)
  20. #define HSIO_PLL5G_CFG0_SELCPI(x) (((x) << 16) & GENMASK(17, 16))
  21. #define HSIO_PLL5G_CFG0_SELCPI_M GENMASK(17, 16)
  22. #define HSIO_PLL5G_CFG0_SELCPI_X(x) (((x) & GENMASK(17, 16)) >> 16)
  23. #define HSIO_PLL5G_CFG0_ENA_VCO_CONTRH BIT(15)
  24. #define HSIO_PLL5G_CFG0_ENA_CP1 BIT(14)
  25. #define HSIO_PLL5G_CFG0_ENA_VCO_BUF BIT(13)
  26. #define HSIO_PLL5G_CFG0_ENA_BIAS BIT(12)
  27. #define HSIO_PLL5G_CFG0_CPU_CLK_DIV(x) (((x) << 6) & GENMASK(11, 6))
  28. #define HSIO_PLL5G_CFG0_CPU_CLK_DIV_M GENMASK(11, 6)
  29. #define HSIO_PLL5G_CFG0_CPU_CLK_DIV_X(x) (((x) & GENMASK(11, 6)) >> 6)
  30. #define HSIO_PLL5G_CFG0_CORE_CLK_DIV(x) ((x) & GENMASK(5, 0))
  31. #define HSIO_PLL5G_CFG0_CORE_CLK_DIV_M GENMASK(5, 0)
  32. #define HSIO_PLL5G_CFG1_ENA_DIRECT BIT(18)
  33. #define HSIO_PLL5G_CFG1_ROT_SPEED BIT(17)
  34. #define HSIO_PLL5G_CFG1_ROT_DIR BIT(16)
  35. #define HSIO_PLL5G_CFG1_READBACK_DATA_SEL BIT(15)
  36. #define HSIO_PLL5G_CFG1_RC_ENABLE BIT(14)
  37. #define HSIO_PLL5G_CFG1_RC_CTRL_DATA(x) (((x) << 6) & GENMASK(13, 6))
  38. #define HSIO_PLL5G_CFG1_RC_CTRL_DATA_M GENMASK(13, 6)
  39. #define HSIO_PLL5G_CFG1_RC_CTRL_DATA_X(x) (((x) & GENMASK(13, 6)) >> 6)
  40. #define HSIO_PLL5G_CFG1_QUARTER_RATE BIT(5)
  41. #define HSIO_PLL5G_CFG1_PWD_TX BIT(4)
  42. #define HSIO_PLL5G_CFG1_PWD_RX BIT(3)
  43. #define HSIO_PLL5G_CFG1_OUT_OF_RANGE_RECAL_ENA BIT(2)
  44. #define HSIO_PLL5G_CFG1_HALF_RATE BIT(1)
  45. #define HSIO_PLL5G_CFG1_FORCE_SET_ENA BIT(0)
  46. #define HSIO_PLL5G_CFG2_ENA_TEST_MODE BIT(30)
  47. #define HSIO_PLL5G_CFG2_ENA_PFD_IN_FLIP BIT(29)
  48. #define HSIO_PLL5G_CFG2_ENA_VCO_NREF_TESTOUT BIT(28)
  49. #define HSIO_PLL5G_CFG2_ENA_FBTESTOUT BIT(27)
  50. #define HSIO_PLL5G_CFG2_ENA_RCPLL BIT(26)
  51. #define HSIO_PLL5G_CFG2_ENA_CP2 BIT(25)
  52. #define HSIO_PLL5G_CFG2_ENA_CLK_BYPASS1 BIT(24)
  53. #define HSIO_PLL5G_CFG2_AMPC_SEL(x) (((x) << 16) & GENMASK(23, 16))
  54. #define HSIO_PLL5G_CFG2_AMPC_SEL_M GENMASK(23, 16)
  55. #define HSIO_PLL5G_CFG2_AMPC_SEL_X(x) (((x) & GENMASK(23, 16)) >> 16)
  56. #define HSIO_PLL5G_CFG2_ENA_CLK_BYPASS BIT(15)
  57. #define HSIO_PLL5G_CFG2_PWD_AMPCTRL_N BIT(14)
  58. #define HSIO_PLL5G_CFG2_ENA_AMPCTRL BIT(13)
  59. #define HSIO_PLL5G_CFG2_ENA_AMP_CTRL_FORCE BIT(12)
  60. #define HSIO_PLL5G_CFG2_FRC_FSM_POR BIT(11)
  61. #define HSIO_PLL5G_CFG2_DISABLE_FSM_POR BIT(10)
  62. #define HSIO_PLL5G_CFG2_GAIN_TEST(x) (((x) << 5) & GENMASK(9, 5))
  63. #define HSIO_PLL5G_CFG2_GAIN_TEST_M GENMASK(9, 5)
  64. #define HSIO_PLL5G_CFG2_GAIN_TEST_X(x) (((x) & GENMASK(9, 5)) >> 5)
  65. #define HSIO_PLL5G_CFG2_EN_RESET_OVERRUN BIT(4)
  66. #define HSIO_PLL5G_CFG2_EN_RESET_LIM_DET BIT(3)
  67. #define HSIO_PLL5G_CFG2_EN_RESET_FRQ_DET BIT(2)
  68. #define HSIO_PLL5G_CFG2_DISABLE_FSM BIT(1)
  69. #define HSIO_PLL5G_CFG2_ENA_GAIN_TEST BIT(0)
  70. #define HSIO_PLL5G_CFG3_TEST_ANA_OUT_SEL(x) (((x) << 22) & GENMASK(23, 22))
  71. #define HSIO_PLL5G_CFG3_TEST_ANA_OUT_SEL_M GENMASK(23, 22)
  72. #define HSIO_PLL5G_CFG3_TEST_ANA_OUT_SEL_X(x) (((x) & GENMASK(23, 22)) >> 22)
  73. #define HSIO_PLL5G_CFG3_TESTOUT_SEL(x) (((x) << 19) & GENMASK(21, 19))
  74. #define HSIO_PLL5G_CFG3_TESTOUT_SEL_M GENMASK(21, 19)
  75. #define HSIO_PLL5G_CFG3_TESTOUT_SEL_X(x) (((x) & GENMASK(21, 19)) >> 19)
  76. #define HSIO_PLL5G_CFG3_ENA_ANA_TEST_OUT BIT(18)
  77. #define HSIO_PLL5G_CFG3_ENA_TEST_OUT BIT(17)
  78. #define HSIO_PLL5G_CFG3_SEL_FBDCLK BIT(16)
  79. #define HSIO_PLL5G_CFG3_SEL_CML_CMOS_PFD BIT(15)
  80. #define HSIO_PLL5G_CFG3_RST_FB_N BIT(14)
  81. #define HSIO_PLL5G_CFG3_FORCE_VCO_CONTRH BIT(13)
  82. #define HSIO_PLL5G_CFG3_FORCE_LO BIT(12)
  83. #define HSIO_PLL5G_CFG3_FORCE_HI BIT(11)
  84. #define HSIO_PLL5G_CFG3_FORCE_ENA BIT(10)
  85. #define HSIO_PLL5G_CFG3_FORCE_CP BIT(9)
  86. #define HSIO_PLL5G_CFG3_FBDIVSEL_TST_ENA BIT(8)
  87. #define HSIO_PLL5G_CFG3_FBDIVSEL(x) ((x) & GENMASK(7, 0))
  88. #define HSIO_PLL5G_CFG3_FBDIVSEL_M GENMASK(7, 0)
  89. #define HSIO_PLL5G_CFG4_IB_BIAS_CTRL(x) (((x) << 16) & GENMASK(23, 16))
  90. #define HSIO_PLL5G_CFG4_IB_BIAS_CTRL_M GENMASK(23, 16)
  91. #define HSIO_PLL5G_CFG4_IB_BIAS_CTRL_X(x) (((x) & GENMASK(23, 16)) >> 16)
  92. #define HSIO_PLL5G_CFG4_IB_CTRL(x) ((x) & GENMASK(15, 0))
  93. #define HSIO_PLL5G_CFG4_IB_CTRL_M GENMASK(15, 0)
  94. #define HSIO_PLL5G_CFG5_OB_BIAS_CTRL(x) (((x) << 16) & GENMASK(23, 16))
  95. #define HSIO_PLL5G_CFG5_OB_BIAS_CTRL_M GENMASK(23, 16)
  96. #define HSIO_PLL5G_CFG5_OB_BIAS_CTRL_X(x) (((x) & GENMASK(23, 16)) >> 16)
  97. #define HSIO_PLL5G_CFG5_OB_CTRL(x) ((x) & GENMASK(15, 0))
  98. #define HSIO_PLL5G_CFG5_OB_CTRL_M GENMASK(15, 0)
  99. #define HSIO_PLL5G_CFG6_REFCLK_SEL_SRC BIT(23)
  100. #define HSIO_PLL5G_CFG6_REFCLK_SEL(x) (((x) << 20) & GENMASK(22, 20))
  101. #define HSIO_PLL5G_CFG6_REFCLK_SEL_M GENMASK(22, 20)
  102. #define HSIO_PLL5G_CFG6_REFCLK_SEL_X(x) (((x) & GENMASK(22, 20)) >> 20)
  103. #define HSIO_PLL5G_CFG6_REFCLK_SRC BIT(19)
  104. #define HSIO_PLL5G_CFG6_POR_DEL_SEL(x) (((x) << 16) & GENMASK(17, 16))
  105. #define HSIO_PLL5G_CFG6_POR_DEL_SEL_M GENMASK(17, 16)
  106. #define HSIO_PLL5G_CFG6_POR_DEL_SEL_X(x) (((x) & GENMASK(17, 16)) >> 16)
  107. #define HSIO_PLL5G_CFG6_DIV125REF_SEL(x) (((x) << 8) & GENMASK(15, 8))
  108. #define HSIO_PLL5G_CFG6_DIV125REF_SEL_M GENMASK(15, 8)
  109. #define HSIO_PLL5G_CFG6_DIV125REF_SEL_X(x) (((x) & GENMASK(15, 8)) >> 8)
  110. #define HSIO_PLL5G_CFG6_ENA_REFCLKC2 BIT(7)
  111. #define HSIO_PLL5G_CFG6_ENA_FBCLKC2 BIT(6)
  112. #define HSIO_PLL5G_CFG6_DDR_CLK_DIV(x) ((x) & GENMASK(5, 0))
  113. #define HSIO_PLL5G_CFG6_DDR_CLK_DIV_M GENMASK(5, 0)
  114. #define HSIO_PLL5G_STATUS0_RANGE_LIM BIT(12)
  115. #define HSIO_PLL5G_STATUS0_OUT_OF_RANGE_ERR BIT(11)
  116. #define HSIO_PLL5G_STATUS0_CALIBRATION_ERR BIT(10)
  117. #define HSIO_PLL5G_STATUS0_CALIBRATION_DONE BIT(9)
  118. #define HSIO_PLL5G_STATUS0_READBACK_DATA(x) (((x) << 1) & GENMASK(8, 1))
  119. #define HSIO_PLL5G_STATUS0_READBACK_DATA_M GENMASK(8, 1)
  120. #define HSIO_PLL5G_STATUS0_READBACK_DATA_X(x) (((x) & GENMASK(8, 1)) >> 1)
  121. #define HSIO_PLL5G_STATUS0_LOCK_STATUS BIT(0)
  122. #define HSIO_PLL5G_STATUS1_SIG_DEL(x) (((x) << 21) & GENMASK(28, 21))
  123. #define HSIO_PLL5G_STATUS1_SIG_DEL_M GENMASK(28, 21)
  124. #define HSIO_PLL5G_STATUS1_SIG_DEL_X(x) (((x) & GENMASK(28, 21)) >> 21)
  125. #define HSIO_PLL5G_STATUS1_GAIN_STAT(x) (((x) << 16) & GENMASK(20, 16))
  126. #define HSIO_PLL5G_STATUS1_GAIN_STAT_M GENMASK(20, 16)
  127. #define HSIO_PLL5G_STATUS1_GAIN_STAT_X(x) (((x) & GENMASK(20, 16)) >> 16)
  128. #define HSIO_PLL5G_STATUS1_FBCNT_DIF(x) (((x) << 4) & GENMASK(13, 4))
  129. #define HSIO_PLL5G_STATUS1_FBCNT_DIF_M GENMASK(13, 4)
  130. #define HSIO_PLL5G_STATUS1_FBCNT_DIF_X(x) (((x) & GENMASK(13, 4)) >> 4)
  131. #define HSIO_PLL5G_STATUS1_FSM_STAT(x) (((x) << 1) & GENMASK(3, 1))
  132. #define HSIO_PLL5G_STATUS1_FSM_STAT_M GENMASK(3, 1)
  133. #define HSIO_PLL5G_STATUS1_FSM_STAT_X(x) (((x) & GENMASK(3, 1)) >> 1)
  134. #define HSIO_PLL5G_STATUS1_FSM_LOCK BIT(0)
  135. #define HSIO_PLL5G_BIST_CFG0_PLLB_START_BIST BIT(31)
  136. #define HSIO_PLL5G_BIST_CFG0_PLLB_MEAS_MODE BIT(30)
  137. #define HSIO_PLL5G_BIST_CFG0_PLLB_LOCK_REPEAT(x) (((x) << 20) & GENMASK(23, 20))
  138. #define HSIO_PLL5G_BIST_CFG0_PLLB_LOCK_REPEAT_M GENMASK(23, 20)
  139. #define HSIO_PLL5G_BIST_CFG0_PLLB_LOCK_REPEAT_X(x) (((x) & GENMASK(23, 20)) >> 20)
  140. #define HSIO_PLL5G_BIST_CFG0_PLLB_LOCK_UNCERT(x) (((x) << 16) & GENMASK(19, 16))
  141. #define HSIO_PLL5G_BIST_CFG0_PLLB_LOCK_UNCERT_M GENMASK(19, 16)
  142. #define HSIO_PLL5G_BIST_CFG0_PLLB_LOCK_UNCERT_X(x) (((x) & GENMASK(19, 16)) >> 16)
  143. #define HSIO_PLL5G_BIST_CFG0_PLLB_DIV_FACTOR_PRE(x) ((x) & GENMASK(15, 0))
  144. #define HSIO_PLL5G_BIST_CFG0_PLLB_DIV_FACTOR_PRE_M GENMASK(15, 0)
  145. #define HSIO_PLL5G_BIST_STAT0_PLLB_FSM_STAT(x) (((x) << 4) & GENMASK(7, 4))
  146. #define HSIO_PLL5G_BIST_STAT0_PLLB_FSM_STAT_M GENMASK(7, 4)
  147. #define HSIO_PLL5G_BIST_STAT0_PLLB_FSM_STAT_X(x) (((x) & GENMASK(7, 4)) >> 4)
  148. #define HSIO_PLL5G_BIST_STAT0_PLLB_BUSY BIT(2)
  149. #define HSIO_PLL5G_BIST_STAT0_PLLB_DONE_N BIT(1)
  150. #define HSIO_PLL5G_BIST_STAT0_PLLB_FAIL BIT(0)
  151. #define HSIO_PLL5G_BIST_STAT1_PLLB_CNT_OUT(x) (((x) << 16) & GENMASK(31, 16))
  152. #define HSIO_PLL5G_BIST_STAT1_PLLB_CNT_OUT_M GENMASK(31, 16)
  153. #define HSIO_PLL5G_BIST_STAT1_PLLB_CNT_OUT_X(x) (((x) & GENMASK(31, 16)) >> 16)
  154. #define HSIO_PLL5G_BIST_STAT1_PLLB_CNT_REF_DIFF(x) ((x) & GENMASK(15, 0))
  155. #define HSIO_PLL5G_BIST_STAT1_PLLB_CNT_REF_DIFF_M GENMASK(15, 0)
  156. #define HSIO_RCOMP_CFG0_PWD_ENA BIT(13)
  157. #define HSIO_RCOMP_CFG0_RUN_CAL BIT(12)
  158. #define HSIO_RCOMP_CFG0_SPEED_SEL(x) (((x) << 10) & GENMASK(11, 10))
  159. #define HSIO_RCOMP_CFG0_SPEED_SEL_M GENMASK(11, 10)
  160. #define HSIO_RCOMP_CFG0_SPEED_SEL_X(x) (((x) & GENMASK(11, 10)) >> 10)
  161. #define HSIO_RCOMP_CFG0_MODE_SEL(x) (((x) << 8) & GENMASK(9, 8))
  162. #define HSIO_RCOMP_CFG0_MODE_SEL_M GENMASK(9, 8)
  163. #define HSIO_RCOMP_CFG0_MODE_SEL_X(x) (((x) & GENMASK(9, 8)) >> 8)
  164. #define HSIO_RCOMP_CFG0_FORCE_ENA BIT(4)
  165. #define HSIO_RCOMP_CFG0_RCOMP_VAL(x) ((x) & GENMASK(3, 0))
  166. #define HSIO_RCOMP_CFG0_RCOMP_VAL_M GENMASK(3, 0)
  167. #define HSIO_RCOMP_STATUS_BUSY BIT(12)
  168. #define HSIO_RCOMP_STATUS_DELTA_ALERT BIT(7)
  169. #define HSIO_RCOMP_STATUS_RCOMP(x) ((x) & GENMASK(3, 0))
  170. #define HSIO_RCOMP_STATUS_RCOMP_M GENMASK(3, 0)
  171. #define HSIO_SYNC_ETH_CFG_RSZ 0x4
  172. #define HSIO_SYNC_ETH_CFG_SEL_RECO_CLK_SRC(x) (((x) << 4) & GENMASK(7, 4))
  173. #define HSIO_SYNC_ETH_CFG_SEL_RECO_CLK_SRC_M GENMASK(7, 4)
  174. #define HSIO_SYNC_ETH_CFG_SEL_RECO_CLK_SRC_X(x) (((x) & GENMASK(7, 4)) >> 4)
  175. #define HSIO_SYNC_ETH_CFG_SEL_RECO_CLK_DIV(x) (((x) << 1) & GENMASK(3, 1))
  176. #define HSIO_SYNC_ETH_CFG_SEL_RECO_CLK_DIV_M GENMASK(3, 1)
  177. #define HSIO_SYNC_ETH_CFG_SEL_RECO_CLK_DIV_X(x) (((x) & GENMASK(3, 1)) >> 1)
  178. #define HSIO_SYNC_ETH_CFG_RECO_CLK_ENA BIT(0)
  179. #define HSIO_SYNC_ETH_PLL_CFG_PLL_AUTO_SQUELCH_ENA BIT(0)
  180. #define HSIO_S1G_DES_CFG_DES_PHS_CTRL(x) (((x) << 13) & GENMASK(16, 13))
  181. #define HSIO_S1G_DES_CFG_DES_PHS_CTRL_M GENMASK(16, 13)
  182. #define HSIO_S1G_DES_CFG_DES_PHS_CTRL_X(x) (((x) & GENMASK(16, 13)) >> 13)
  183. #define HSIO_S1G_DES_CFG_DES_CPMD_SEL(x) (((x) << 11) & GENMASK(12, 11))
  184. #define HSIO_S1G_DES_CFG_DES_CPMD_SEL_M GENMASK(12, 11)
  185. #define HSIO_S1G_DES_CFG_DES_CPMD_SEL_X(x) (((x) & GENMASK(12, 11)) >> 11)
  186. #define HSIO_S1G_DES_CFG_DES_MBTR_CTRL(x) (((x) << 8) & GENMASK(10, 8))
  187. #define HSIO_S1G_DES_CFG_DES_MBTR_CTRL_M GENMASK(10, 8)
  188. #define HSIO_S1G_DES_CFG_DES_MBTR_CTRL_X(x) (((x) & GENMASK(10, 8)) >> 8)
  189. #define HSIO_S1G_DES_CFG_DES_BW_ANA(x) (((x) << 5) & GENMASK(7, 5))
  190. #define HSIO_S1G_DES_CFG_DES_BW_ANA_M GENMASK(7, 5)
  191. #define HSIO_S1G_DES_CFG_DES_BW_ANA_X(x) (((x) & GENMASK(7, 5)) >> 5)
  192. #define HSIO_S1G_DES_CFG_DES_SWAP_ANA BIT(4)
  193. #define HSIO_S1G_DES_CFG_DES_BW_HYST(x) (((x) << 1) & GENMASK(3, 1))
  194. #define HSIO_S1G_DES_CFG_DES_BW_HYST_M GENMASK(3, 1)
  195. #define HSIO_S1G_DES_CFG_DES_BW_HYST_X(x) (((x) & GENMASK(3, 1)) >> 1)
  196. #define HSIO_S1G_DES_CFG_DES_SWAP_HYST BIT(0)
  197. #define HSIO_S1G_IB_CFG_IB_FX100_ENA BIT(27)
  198. #define HSIO_S1G_IB_CFG_ACJTAG_HYST(x) (((x) << 24) & GENMASK(26, 24))
  199. #define HSIO_S1G_IB_CFG_ACJTAG_HYST_M GENMASK(26, 24)
  200. #define HSIO_S1G_IB_CFG_ACJTAG_HYST_X(x) (((x) & GENMASK(26, 24)) >> 24)
  201. #define HSIO_S1G_IB_CFG_IB_DET_LEV(x) (((x) << 19) & GENMASK(21, 19))
  202. #define HSIO_S1G_IB_CFG_IB_DET_LEV_M GENMASK(21, 19)
  203. #define HSIO_S1G_IB_CFG_IB_DET_LEV_X(x) (((x) & GENMASK(21, 19)) >> 19)
  204. #define HSIO_S1G_IB_CFG_IB_HYST_LEV BIT(14)
  205. #define HSIO_S1G_IB_CFG_IB_ENA_CMV_TERM BIT(13)
  206. #define HSIO_S1G_IB_CFG_IB_ENA_DC_COUPLING BIT(12)
  207. #define HSIO_S1G_IB_CFG_IB_ENA_DETLEV BIT(11)
  208. #define HSIO_S1G_IB_CFG_IB_ENA_HYST BIT(10)
  209. #define HSIO_S1G_IB_CFG_IB_ENA_OFFSET_COMP BIT(9)
  210. #define HSIO_S1G_IB_CFG_IB_EQ_GAIN(x) (((x) << 6) & GENMASK(8, 6))
  211. #define HSIO_S1G_IB_CFG_IB_EQ_GAIN_M GENMASK(8, 6)
  212. #define HSIO_S1G_IB_CFG_IB_EQ_GAIN_X(x) (((x) & GENMASK(8, 6)) >> 6)
  213. #define HSIO_S1G_IB_CFG_IB_SEL_CORNER_FREQ(x) (((x) << 4) & GENMASK(5, 4))
  214. #define HSIO_S1G_IB_CFG_IB_SEL_CORNER_FREQ_M GENMASK(5, 4)
  215. #define HSIO_S1G_IB_CFG_IB_SEL_CORNER_FREQ_X(x) (((x) & GENMASK(5, 4)) >> 4)
  216. #define HSIO_S1G_IB_CFG_IB_RESISTOR_CTRL(x) ((x) & GENMASK(3, 0))
  217. #define HSIO_S1G_IB_CFG_IB_RESISTOR_CTRL_M GENMASK(3, 0)
  218. #define HSIO_S1G_OB_CFG_OB_SLP(x) (((x) << 17) & GENMASK(18, 17))
  219. #define HSIO_S1G_OB_CFG_OB_SLP_M GENMASK(18, 17)
  220. #define HSIO_S1G_OB_CFG_OB_SLP_X(x) (((x) & GENMASK(18, 17)) >> 17)
  221. #define HSIO_S1G_OB_CFG_OB_AMP_CTRL(x) (((x) << 13) & GENMASK(16, 13))
  222. #define HSIO_S1G_OB_CFG_OB_AMP_CTRL_M GENMASK(16, 13)
  223. #define HSIO_S1G_OB_CFG_OB_AMP_CTRL_X(x) (((x) & GENMASK(16, 13)) >> 13)
  224. #define HSIO_S1G_OB_CFG_OB_CMM_BIAS_CTRL(x) (((x) << 10) & GENMASK(12, 10))
  225. #define HSIO_S1G_OB_CFG_OB_CMM_BIAS_CTRL_M GENMASK(12, 10)
  226. #define HSIO_S1G_OB_CFG_OB_CMM_BIAS_CTRL_X(x) (((x) & GENMASK(12, 10)) >> 10)
  227. #define HSIO_S1G_OB_CFG_OB_DIS_VCM_CTRL BIT(9)
  228. #define HSIO_S1G_OB_CFG_OB_EN_MEAS_VREG BIT(8)
  229. #define HSIO_S1G_OB_CFG_OB_VCM_CTRL(x) (((x) << 4) & GENMASK(7, 4))
  230. #define HSIO_S1G_OB_CFG_OB_VCM_CTRL_M GENMASK(7, 4)
  231. #define HSIO_S1G_OB_CFG_OB_VCM_CTRL_X(x) (((x) & GENMASK(7, 4)) >> 4)
  232. #define HSIO_S1G_OB_CFG_OB_RESISTOR_CTRL(x) ((x) & GENMASK(3, 0))
  233. #define HSIO_S1G_OB_CFG_OB_RESISTOR_CTRL_M GENMASK(3, 0)
  234. #define HSIO_S1G_SER_CFG_SER_IDLE BIT(9)
  235. #define HSIO_S1G_SER_CFG_SER_DEEMPH BIT(8)
  236. #define HSIO_S1G_SER_CFG_SER_CPMD_SEL BIT(7)
  237. #define HSIO_S1G_SER_CFG_SER_SWAP_CPMD BIT(6)
  238. #define HSIO_S1G_SER_CFG_SER_ALISEL(x) (((x) << 4) & GENMASK(5, 4))
  239. #define HSIO_S1G_SER_CFG_SER_ALISEL_M GENMASK(5, 4)
  240. #define HSIO_S1G_SER_CFG_SER_ALISEL_X(x) (((x) & GENMASK(5, 4)) >> 4)
  241. #define HSIO_S1G_SER_CFG_SER_ENHYS BIT(3)
  242. #define HSIO_S1G_SER_CFG_SER_BIG_WIN BIT(2)
  243. #define HSIO_S1G_SER_CFG_SER_EN_WIN BIT(1)
  244. #define HSIO_S1G_SER_CFG_SER_ENALI BIT(0)
  245. #define HSIO_S1G_COMMON_CFG_SYS_RST BIT(31)
  246. #define HSIO_S1G_COMMON_CFG_SE_AUTO_SQUELCH_ENA BIT(21)
  247. #define HSIO_S1G_COMMON_CFG_ENA_LANE BIT(18)
  248. #define HSIO_S1G_COMMON_CFG_PWD_RX BIT(17)
  249. #define HSIO_S1G_COMMON_CFG_PWD_TX BIT(16)
  250. #define HSIO_S1G_COMMON_CFG_LANE_CTRL(x) (((x) << 13) & GENMASK(15, 13))
  251. #define HSIO_S1G_COMMON_CFG_LANE_CTRL_M GENMASK(15, 13)
  252. #define HSIO_S1G_COMMON_CFG_LANE_CTRL_X(x) (((x) & GENMASK(15, 13)) >> 13)
  253. #define HSIO_S1G_COMMON_CFG_ENA_DIRECT BIT(12)
  254. #define HSIO_S1G_COMMON_CFG_ENA_ELOOP BIT(11)
  255. #define HSIO_S1G_COMMON_CFG_ENA_FLOOP BIT(10)
  256. #define HSIO_S1G_COMMON_CFG_ENA_ILOOP BIT(9)
  257. #define HSIO_S1G_COMMON_CFG_ENA_PLOOP BIT(8)
  258. #define HSIO_S1G_COMMON_CFG_HRATE BIT(7)
  259. #define HSIO_S1G_COMMON_CFG_IF_MODE BIT(0)
  260. #define HSIO_S1G_PLL_CFG_PLL_ENA_FB_DIV2 BIT(22)
  261. #define HSIO_S1G_PLL_CFG_PLL_ENA_RC_DIV2 BIT(21)
  262. #define HSIO_S1G_PLL_CFG_PLL_FSM_CTRL_DATA(x) (((x) << 8) & GENMASK(15, 8))
  263. #define HSIO_S1G_PLL_CFG_PLL_FSM_CTRL_DATA_M GENMASK(15, 8)
  264. #define HSIO_S1G_PLL_CFG_PLL_FSM_CTRL_DATA_X(x) (((x) & GENMASK(15, 8)) >> 8)
  265. #define HSIO_S1G_PLL_CFG_PLL_FSM_ENA BIT(7)
  266. #define HSIO_S1G_PLL_CFG_PLL_FSM_FORCE_SET_ENA BIT(6)
  267. #define HSIO_S1G_PLL_CFG_PLL_FSM_OOR_RECAL_ENA BIT(5)
  268. #define HSIO_S1G_PLL_CFG_PLL_RB_DATA_SEL BIT(3)
  269. #define HSIO_S1G_PLL_STATUS_PLL_CAL_NOT_DONE BIT(12)
  270. #define HSIO_S1G_PLL_STATUS_PLL_CAL_ERR BIT(11)
  271. #define HSIO_S1G_PLL_STATUS_PLL_OUT_OF_RANGE_ERR BIT(10)
  272. #define HSIO_S1G_PLL_STATUS_PLL_RB_DATA(x) ((x) & GENMASK(7, 0))
  273. #define HSIO_S1G_PLL_STATUS_PLL_RB_DATA_M GENMASK(7, 0)
  274. #define HSIO_S1G_DFT_CFG0_LAZYBIT BIT(31)
  275. #define HSIO_S1G_DFT_CFG0_INV_DIS BIT(23)
  276. #define HSIO_S1G_DFT_CFG0_PRBS_SEL(x) (((x) << 20) & GENMASK(21, 20))
  277. #define HSIO_S1G_DFT_CFG0_PRBS_SEL_M GENMASK(21, 20)
  278. #define HSIO_S1G_DFT_CFG0_PRBS_SEL_X(x) (((x) & GENMASK(21, 20)) >> 20)
  279. #define HSIO_S1G_DFT_CFG0_TEST_MODE(x) (((x) << 16) & GENMASK(18, 16))
  280. #define HSIO_S1G_DFT_CFG0_TEST_MODE_M GENMASK(18, 16)
  281. #define HSIO_S1G_DFT_CFG0_TEST_MODE_X(x) (((x) & GENMASK(18, 16)) >> 16)
  282. #define HSIO_S1G_DFT_CFG0_RX_PHS_CORR_DIS BIT(4)
  283. #define HSIO_S1G_DFT_CFG0_RX_PDSENS_ENA BIT(3)
  284. #define HSIO_S1G_DFT_CFG0_RX_DFT_ENA BIT(2)
  285. #define HSIO_S1G_DFT_CFG0_TX_DFT_ENA BIT(0)
  286. #define HSIO_S1G_DFT_CFG1_TX_JITTER_AMPL(x) (((x) << 8) & GENMASK(17, 8))
  287. #define HSIO_S1G_DFT_CFG1_TX_JITTER_AMPL_M GENMASK(17, 8)
  288. #define HSIO_S1G_DFT_CFG1_TX_JITTER_AMPL_X(x) (((x) & GENMASK(17, 8)) >> 8)
  289. #define HSIO_S1G_DFT_CFG1_TX_STEP_FREQ(x) (((x) << 4) & GENMASK(7, 4))
  290. #define HSIO_S1G_DFT_CFG1_TX_STEP_FREQ_M GENMASK(7, 4)
  291. #define HSIO_S1G_DFT_CFG1_TX_STEP_FREQ_X(x) (((x) & GENMASK(7, 4)) >> 4)
  292. #define HSIO_S1G_DFT_CFG1_TX_JI_ENA BIT(3)
  293. #define HSIO_S1G_DFT_CFG1_TX_WAVEFORM_SEL BIT(2)
  294. #define HSIO_S1G_DFT_CFG1_TX_FREQOFF_DIR BIT(1)
  295. #define HSIO_S1G_DFT_CFG1_TX_FREQOFF_ENA BIT(0)
  296. #define HSIO_S1G_DFT_CFG2_RX_JITTER_AMPL(x) (((x) << 8) & GENMASK(17, 8))
  297. #define HSIO_S1G_DFT_CFG2_RX_JITTER_AMPL_M GENMASK(17, 8)
  298. #define HSIO_S1G_DFT_CFG2_RX_JITTER_AMPL_X(x) (((x) & GENMASK(17, 8)) >> 8)
  299. #define HSIO_S1G_DFT_CFG2_RX_STEP_FREQ(x) (((x) << 4) & GENMASK(7, 4))
  300. #define HSIO_S1G_DFT_CFG2_RX_STEP_FREQ_M GENMASK(7, 4)
  301. #define HSIO_S1G_DFT_CFG2_RX_STEP_FREQ_X(x) (((x) & GENMASK(7, 4)) >> 4)
  302. #define HSIO_S1G_DFT_CFG2_RX_JI_ENA BIT(3)
  303. #define HSIO_S1G_DFT_CFG2_RX_WAVEFORM_SEL BIT(2)
  304. #define HSIO_S1G_DFT_CFG2_RX_FREQOFF_DIR BIT(1)
  305. #define HSIO_S1G_DFT_CFG2_RX_FREQOFF_ENA BIT(0)
  306. #define HSIO_S1G_RC_PLL_BIST_CFG_PLL_BIST_ENA BIT(20)
  307. #define HSIO_S1G_RC_PLL_BIST_CFG_PLL_BIST_FBS_HIGH(x) (((x) << 16) & GENMASK(17, 16))
  308. #define HSIO_S1G_RC_PLL_BIST_CFG_PLL_BIST_FBS_HIGH_M GENMASK(17, 16)
  309. #define HSIO_S1G_RC_PLL_BIST_CFG_PLL_BIST_FBS_HIGH_X(x) (((x) & GENMASK(17, 16)) >> 16)
  310. #define HSIO_S1G_RC_PLL_BIST_CFG_PLL_BIST_HIGH(x) (((x) << 8) & GENMASK(15, 8))
  311. #define HSIO_S1G_RC_PLL_BIST_CFG_PLL_BIST_HIGH_M GENMASK(15, 8)
  312. #define HSIO_S1G_RC_PLL_BIST_CFG_PLL_BIST_HIGH_X(x) (((x) & GENMASK(15, 8)) >> 8)
  313. #define HSIO_S1G_RC_PLL_BIST_CFG_PLL_BIST_LOW(x) ((x) & GENMASK(7, 0))
  314. #define HSIO_S1G_RC_PLL_BIST_CFG_PLL_BIST_LOW_M GENMASK(7, 0)
  315. #define HSIO_S1G_MISC_CFG_DES_100FX_KICK_MODE(x) (((x) << 11) & GENMASK(12, 11))
  316. #define HSIO_S1G_MISC_CFG_DES_100FX_KICK_MODE_M GENMASK(12, 11)
  317. #define HSIO_S1G_MISC_CFG_DES_100FX_KICK_MODE_X(x) (((x) & GENMASK(12, 11)) >> 11)
  318. #define HSIO_S1G_MISC_CFG_DES_100FX_CPMD_SWAP BIT(10)
  319. #define HSIO_S1G_MISC_CFG_DES_100FX_CPMD_MODE BIT(9)
  320. #define HSIO_S1G_MISC_CFG_DES_100FX_CPMD_ENA BIT(8)
  321. #define HSIO_S1G_MISC_CFG_RX_LPI_MODE_ENA BIT(5)
  322. #define HSIO_S1G_MISC_CFG_TX_LPI_MODE_ENA BIT(4)
  323. #define HSIO_S1G_MISC_CFG_RX_DATA_INV_ENA BIT(3)
  324. #define HSIO_S1G_MISC_CFG_TX_DATA_INV_ENA BIT(2)
  325. #define HSIO_S1G_MISC_CFG_LANE_RST BIT(0)
  326. #define HSIO_S1G_DFT_STATUS_PLL_BIST_NOT_DONE BIT(7)
  327. #define HSIO_S1G_DFT_STATUS_PLL_BIST_FAILED BIT(6)
  328. #define HSIO_S1G_DFT_STATUS_PLL_BIST_TIMEOUT_ERR BIT(5)
  329. #define HSIO_S1G_DFT_STATUS_BIST_ACTIVE BIT(3)
  330. #define HSIO_S1G_DFT_STATUS_BIST_NOSYNC BIT(2)
  331. #define HSIO_S1G_DFT_STATUS_BIST_COMPLETE_N BIT(1)
  332. #define HSIO_S1G_DFT_STATUS_BIST_ERROR BIT(0)
  333. #define HSIO_S1G_MISC_STATUS_DES_100FX_PHASE_SEL BIT(0)
  334. #define HSIO_MCB_S1G_ADDR_CFG_SERDES1G_WR_ONE_SHOT BIT(31)
  335. #define HSIO_MCB_S1G_ADDR_CFG_SERDES1G_RD_ONE_SHOT BIT(30)
  336. #define HSIO_MCB_S1G_ADDR_CFG_SERDES1G_ADDR(x) ((x) & GENMASK(8, 0))
  337. #define HSIO_MCB_S1G_ADDR_CFG_SERDES1G_ADDR_M GENMASK(8, 0)
  338. #define HSIO_S6G_DIG_CFG_GP(x) (((x) << 16) & GENMASK(18, 16))
  339. #define HSIO_S6G_DIG_CFG_GP_M GENMASK(18, 16)
  340. #define HSIO_S6G_DIG_CFG_GP_X(x) (((x) & GENMASK(18, 16)) >> 16)
  341. #define HSIO_S6G_DIG_CFG_TX_BIT_DOUBLING_MODE_ENA BIT(7)
  342. #define HSIO_S6G_DIG_CFG_SIGDET_TESTMODE BIT(6)
  343. #define HSIO_S6G_DIG_CFG_SIGDET_AST(x) (((x) << 3) & GENMASK(5, 3))
  344. #define HSIO_S6G_DIG_CFG_SIGDET_AST_M GENMASK(5, 3)
  345. #define HSIO_S6G_DIG_CFG_SIGDET_AST_X(x) (((x) & GENMASK(5, 3)) >> 3)
  346. #define HSIO_S6G_DIG_CFG_SIGDET_DST(x) ((x) & GENMASK(2, 0))
  347. #define HSIO_S6G_DIG_CFG_SIGDET_DST_M GENMASK(2, 0)
  348. #define HSIO_S6G_DFT_CFG0_LAZYBIT BIT(31)
  349. #define HSIO_S6G_DFT_CFG0_INV_DIS BIT(23)
  350. #define HSIO_S6G_DFT_CFG0_PRBS_SEL(x) (((x) << 20) & GENMASK(21, 20))
  351. #define HSIO_S6G_DFT_CFG0_PRBS_SEL_M GENMASK(21, 20)
  352. #define HSIO_S6G_DFT_CFG0_PRBS_SEL_X(x) (((x) & GENMASK(21, 20)) >> 20)
  353. #define HSIO_S6G_DFT_CFG0_TEST_MODE(x) (((x) << 16) & GENMASK(18, 16))
  354. #define HSIO_S6G_DFT_CFG0_TEST_MODE_M GENMASK(18, 16)
  355. #define HSIO_S6G_DFT_CFG0_TEST_MODE_X(x) (((x) & GENMASK(18, 16)) >> 16)
  356. #define HSIO_S6G_DFT_CFG0_RX_PHS_CORR_DIS BIT(4)
  357. #define HSIO_S6G_DFT_CFG0_RX_PDSENS_ENA BIT(3)
  358. #define HSIO_S6G_DFT_CFG0_RX_DFT_ENA BIT(2)
  359. #define HSIO_S6G_DFT_CFG0_TX_DFT_ENA BIT(0)
  360. #define HSIO_S6G_DFT_CFG1_TX_JITTER_AMPL(x) (((x) << 8) & GENMASK(17, 8))
  361. #define HSIO_S6G_DFT_CFG1_TX_JITTER_AMPL_M GENMASK(17, 8)
  362. #define HSIO_S6G_DFT_CFG1_TX_JITTER_AMPL_X(x) (((x) & GENMASK(17, 8)) >> 8)
  363. #define HSIO_S6G_DFT_CFG1_TX_STEP_FREQ(x) (((x) << 4) & GENMASK(7, 4))
  364. #define HSIO_S6G_DFT_CFG1_TX_STEP_FREQ_M GENMASK(7, 4)
  365. #define HSIO_S6G_DFT_CFG1_TX_STEP_FREQ_X(x) (((x) & GENMASK(7, 4)) >> 4)
  366. #define HSIO_S6G_DFT_CFG1_TX_JI_ENA BIT(3)
  367. #define HSIO_S6G_DFT_CFG1_TX_WAVEFORM_SEL BIT(2)
  368. #define HSIO_S6G_DFT_CFG1_TX_FREQOFF_DIR BIT(1)
  369. #define HSIO_S6G_DFT_CFG1_TX_FREQOFF_ENA BIT(0)
  370. #define HSIO_S6G_DFT_CFG2_RX_JITTER_AMPL(x) (((x) << 8) & GENMASK(17, 8))
  371. #define HSIO_S6G_DFT_CFG2_RX_JITTER_AMPL_M GENMASK(17, 8)
  372. #define HSIO_S6G_DFT_CFG2_RX_JITTER_AMPL_X(x) (((x) & GENMASK(17, 8)) >> 8)
  373. #define HSIO_S6G_DFT_CFG2_RX_STEP_FREQ(x) (((x) << 4) & GENMASK(7, 4))
  374. #define HSIO_S6G_DFT_CFG2_RX_STEP_FREQ_M GENMASK(7, 4)
  375. #define HSIO_S6G_DFT_CFG2_RX_STEP_FREQ_X(x) (((x) & GENMASK(7, 4)) >> 4)
  376. #define HSIO_S6G_DFT_CFG2_RX_JI_ENA BIT(3)
  377. #define HSIO_S6G_DFT_CFG2_RX_WAVEFORM_SEL BIT(2)
  378. #define HSIO_S6G_DFT_CFG2_RX_FREQOFF_DIR BIT(1)
  379. #define HSIO_S6G_DFT_CFG2_RX_FREQOFF_ENA BIT(0)
  380. #define HSIO_S6G_RC_PLL_BIST_CFG_PLL_BIST_ENA BIT(20)
  381. #define HSIO_S6G_RC_PLL_BIST_CFG_PLL_BIST_FBS_HIGH(x) (((x) << 16) & GENMASK(19, 16))
  382. #define HSIO_S6G_RC_PLL_BIST_CFG_PLL_BIST_FBS_HIGH_M GENMASK(19, 16)
  383. #define HSIO_S6G_RC_PLL_BIST_CFG_PLL_BIST_FBS_HIGH_X(x) (((x) & GENMASK(19, 16)) >> 16)
  384. #define HSIO_S6G_RC_PLL_BIST_CFG_PLL_BIST_HIGH(x) (((x) << 8) & GENMASK(15, 8))
  385. #define HSIO_S6G_RC_PLL_BIST_CFG_PLL_BIST_HIGH_M GENMASK(15, 8)
  386. #define HSIO_S6G_RC_PLL_BIST_CFG_PLL_BIST_HIGH_X(x) (((x) & GENMASK(15, 8)) >> 8)
  387. #define HSIO_S6G_RC_PLL_BIST_CFG_PLL_BIST_LOW(x) ((x) & GENMASK(7, 0))
  388. #define HSIO_S6G_RC_PLL_BIST_CFG_PLL_BIST_LOW_M GENMASK(7, 0)
  389. #define HSIO_S6G_MISC_CFG_SEL_RECO_CLK(x) (((x) << 13) & GENMASK(14, 13))
  390. #define HSIO_S6G_MISC_CFG_SEL_RECO_CLK_M GENMASK(14, 13)
  391. #define HSIO_S6G_MISC_CFG_SEL_RECO_CLK_X(x) (((x) & GENMASK(14, 13)) >> 13)
  392. #define HSIO_S6G_MISC_CFG_DES_100FX_KICK_MODE(x) (((x) << 11) & GENMASK(12, 11))
  393. #define HSIO_S6G_MISC_CFG_DES_100FX_KICK_MODE_M GENMASK(12, 11)
  394. #define HSIO_S6G_MISC_CFG_DES_100FX_KICK_MODE_X(x) (((x) & GENMASK(12, 11)) >> 11)
  395. #define HSIO_S6G_MISC_CFG_DES_100FX_CPMD_SWAP BIT(10)
  396. #define HSIO_S6G_MISC_CFG_DES_100FX_CPMD_MODE BIT(9)
  397. #define HSIO_S6G_MISC_CFG_DES_100FX_CPMD_ENA BIT(8)
  398. #define HSIO_S6G_MISC_CFG_RX_BUS_FLIP_ENA BIT(7)
  399. #define HSIO_S6G_MISC_CFG_TX_BUS_FLIP_ENA BIT(6)
  400. #define HSIO_S6G_MISC_CFG_RX_LPI_MODE_ENA BIT(5)
  401. #define HSIO_S6G_MISC_CFG_TX_LPI_MODE_ENA BIT(4)
  402. #define HSIO_S6G_MISC_CFG_RX_DATA_INV_ENA BIT(3)
  403. #define HSIO_S6G_MISC_CFG_TX_DATA_INV_ENA BIT(2)
  404. #define HSIO_S6G_MISC_CFG_LANE_RST BIT(0)
  405. #define HSIO_S6G_OB_ANEG_CFG_AN_OB_POST0(x) (((x) << 23) & GENMASK(28, 23))
  406. #define HSIO_S6G_OB_ANEG_CFG_AN_OB_POST0_M GENMASK(28, 23)
  407. #define HSIO_S6G_OB_ANEG_CFG_AN_OB_POST0_X(x) (((x) & GENMASK(28, 23)) >> 23)
  408. #define HSIO_S6G_OB_ANEG_CFG_AN_OB_POST1(x) (((x) << 18) & GENMASK(22, 18))
  409. #define HSIO_S6G_OB_ANEG_CFG_AN_OB_POST1_M GENMASK(22, 18)
  410. #define HSIO_S6G_OB_ANEG_CFG_AN_OB_POST1_X(x) (((x) & GENMASK(22, 18)) >> 18)
  411. #define HSIO_S6G_OB_ANEG_CFG_AN_OB_PREC(x) (((x) << 13) & GENMASK(17, 13))
  412. #define HSIO_S6G_OB_ANEG_CFG_AN_OB_PREC_M GENMASK(17, 13)
  413. #define HSIO_S6G_OB_ANEG_CFG_AN_OB_PREC_X(x) (((x) & GENMASK(17, 13)) >> 13)
  414. #define HSIO_S6G_OB_ANEG_CFG_AN_OB_ENA_CAS(x) (((x) << 6) & GENMASK(8, 6))
  415. #define HSIO_S6G_OB_ANEG_CFG_AN_OB_ENA_CAS_M GENMASK(8, 6)
  416. #define HSIO_S6G_OB_ANEG_CFG_AN_OB_ENA_CAS_X(x) (((x) & GENMASK(8, 6)) >> 6)
  417. #define HSIO_S6G_OB_ANEG_CFG_AN_OB_LEV(x) ((x) & GENMASK(5, 0))
  418. #define HSIO_S6G_OB_ANEG_CFG_AN_OB_LEV_M GENMASK(5, 0)
  419. #define HSIO_S6G_DFT_STATUS_PRBS_SYNC_STAT BIT(8)
  420. #define HSIO_S6G_DFT_STATUS_PLL_BIST_NOT_DONE BIT(7)
  421. #define HSIO_S6G_DFT_STATUS_PLL_BIST_FAILED BIT(6)
  422. #define HSIO_S6G_DFT_STATUS_PLL_BIST_TIMEOUT_ERR BIT(5)
  423. #define HSIO_S6G_DFT_STATUS_BIST_ACTIVE BIT(3)
  424. #define HSIO_S6G_DFT_STATUS_BIST_NOSYNC BIT(2)
  425. #define HSIO_S6G_DFT_STATUS_BIST_COMPLETE_N BIT(1)
  426. #define HSIO_S6G_DFT_STATUS_BIST_ERROR BIT(0)
  427. #define HSIO_S6G_MISC_STATUS_DES_100FX_PHASE_SEL BIT(0)
  428. #define HSIO_S6G_DES_CFG_DES_PHS_CTRL(x) (((x) << 13) & GENMASK(16, 13))
  429. #define HSIO_S6G_DES_CFG_DES_PHS_CTRL_M GENMASK(16, 13)
  430. #define HSIO_S6G_DES_CFG_DES_PHS_CTRL_X(x) (((x) & GENMASK(16, 13)) >> 13)
  431. #define HSIO_S6G_DES_CFG_DES_MBTR_CTRL(x) (((x) << 10) & GENMASK(12, 10))
  432. #define HSIO_S6G_DES_CFG_DES_MBTR_CTRL_M GENMASK(12, 10)
  433. #define HSIO_S6G_DES_CFG_DES_MBTR_CTRL_X(x) (((x) & GENMASK(12, 10)) >> 10)
  434. #define HSIO_S6G_DES_CFG_DES_CPMD_SEL(x) (((x) << 8) & GENMASK(9, 8))
  435. #define HSIO_S6G_DES_CFG_DES_CPMD_SEL_M GENMASK(9, 8)
  436. #define HSIO_S6G_DES_CFG_DES_CPMD_SEL_X(x) (((x) & GENMASK(9, 8)) >> 8)
  437. #define HSIO_S6G_DES_CFG_DES_BW_HYST(x) (((x) << 5) & GENMASK(7, 5))
  438. #define HSIO_S6G_DES_CFG_DES_BW_HYST_M GENMASK(7, 5)
  439. #define HSIO_S6G_DES_CFG_DES_BW_HYST_X(x) (((x) & GENMASK(7, 5)) >> 5)
  440. #define HSIO_S6G_DES_CFG_DES_SWAP_HYST BIT(4)
  441. #define HSIO_S6G_DES_CFG_DES_BW_ANA(x) (((x) << 1) & GENMASK(3, 1))
  442. #define HSIO_S6G_DES_CFG_DES_BW_ANA_M GENMASK(3, 1)
  443. #define HSIO_S6G_DES_CFG_DES_BW_ANA_X(x) (((x) & GENMASK(3, 1)) >> 1)
  444. #define HSIO_S6G_DES_CFG_DES_SWAP_ANA BIT(0)
  445. #define HSIO_S6G_IB_CFG_IB_SOFSI(x) (((x) << 29) & GENMASK(30, 29))
  446. #define HSIO_S6G_IB_CFG_IB_SOFSI_M GENMASK(30, 29)
  447. #define HSIO_S6G_IB_CFG_IB_SOFSI_X(x) (((x) & GENMASK(30, 29)) >> 29)
  448. #define HSIO_S6G_IB_CFG_IB_VBULK_SEL BIT(28)
  449. #define HSIO_S6G_IB_CFG_IB_RTRM_ADJ(x) (((x) << 24) & GENMASK(27, 24))
  450. #define HSIO_S6G_IB_CFG_IB_RTRM_ADJ_M GENMASK(27, 24)
  451. #define HSIO_S6G_IB_CFG_IB_RTRM_ADJ_X(x) (((x) & GENMASK(27, 24)) >> 24)
  452. #define HSIO_S6G_IB_CFG_IB_ICML_ADJ(x) (((x) << 20) & GENMASK(23, 20))
  453. #define HSIO_S6G_IB_CFG_IB_ICML_ADJ_M GENMASK(23, 20)
  454. #define HSIO_S6G_IB_CFG_IB_ICML_ADJ_X(x) (((x) & GENMASK(23, 20)) >> 20)
  455. #define HSIO_S6G_IB_CFG_IB_TERM_MODE_SEL(x) (((x) << 18) & GENMASK(19, 18))
  456. #define HSIO_S6G_IB_CFG_IB_TERM_MODE_SEL_M GENMASK(19, 18)
  457. #define HSIO_S6G_IB_CFG_IB_TERM_MODE_SEL_X(x) (((x) & GENMASK(19, 18)) >> 18)
  458. #define HSIO_S6G_IB_CFG_IB_SIG_DET_CLK_SEL(x) (((x) << 15) & GENMASK(17, 15))
  459. #define HSIO_S6G_IB_CFG_IB_SIG_DET_CLK_SEL_M GENMASK(17, 15)
  460. #define HSIO_S6G_IB_CFG_IB_SIG_DET_CLK_SEL_X(x) (((x) & GENMASK(17, 15)) >> 15)
  461. #define HSIO_S6G_IB_CFG_IB_REG_PAT_SEL_HP(x) (((x) << 13) & GENMASK(14, 13))
  462. #define HSIO_S6G_IB_CFG_IB_REG_PAT_SEL_HP_M GENMASK(14, 13)
  463. #define HSIO_S6G_IB_CFG_IB_REG_PAT_SEL_HP_X(x) (((x) & GENMASK(14, 13)) >> 13)
  464. #define HSIO_S6G_IB_CFG_IB_REG_PAT_SEL_MID(x) (((x) << 11) & GENMASK(12, 11))
  465. #define HSIO_S6G_IB_CFG_IB_REG_PAT_SEL_MID_M GENMASK(12, 11)
  466. #define HSIO_S6G_IB_CFG_IB_REG_PAT_SEL_MID_X(x) (((x) & GENMASK(12, 11)) >> 11)
  467. #define HSIO_S6G_IB_CFG_IB_REG_PAT_SEL_LP(x) (((x) << 9) & GENMASK(10, 9))
  468. #define HSIO_S6G_IB_CFG_IB_REG_PAT_SEL_LP_M GENMASK(10, 9)
  469. #define HSIO_S6G_IB_CFG_IB_REG_PAT_SEL_LP_X(x) (((x) & GENMASK(10, 9)) >> 9)
  470. #define HSIO_S6G_IB_CFG_IB_REG_PAT_SEL_OFFSET(x) (((x) << 7) & GENMASK(8, 7))
  471. #define HSIO_S6G_IB_CFG_IB_REG_PAT_SEL_OFFSET_M GENMASK(8, 7)
  472. #define HSIO_S6G_IB_CFG_IB_REG_PAT_SEL_OFFSET_X(x) (((x) & GENMASK(8, 7)) >> 7)
  473. #define HSIO_S6G_IB_CFG_IB_ANA_TEST_ENA BIT(6)
  474. #define HSIO_S6G_IB_CFG_IB_SIG_DET_ENA BIT(5)
  475. #define HSIO_S6G_IB_CFG_IB_CONCUR BIT(4)
  476. #define HSIO_S6G_IB_CFG_IB_CAL_ENA BIT(3)
  477. #define HSIO_S6G_IB_CFG_IB_SAM_ENA BIT(2)
  478. #define HSIO_S6G_IB_CFG_IB_EQZ_ENA BIT(1)
  479. #define HSIO_S6G_IB_CFG_IB_REG_ENA BIT(0)
  480. #define HSIO_S6G_IB_CFG1_IB_TJTAG(x) (((x) << 17) & GENMASK(21, 17))
  481. #define HSIO_S6G_IB_CFG1_IB_TJTAG_M GENMASK(21, 17)
  482. #define HSIO_S6G_IB_CFG1_IB_TJTAG_X(x) (((x) & GENMASK(21, 17)) >> 17)
  483. #define HSIO_S6G_IB_CFG1_IB_TSDET(x) (((x) << 12) & GENMASK(16, 12))
  484. #define HSIO_S6G_IB_CFG1_IB_TSDET_M GENMASK(16, 12)
  485. #define HSIO_S6G_IB_CFG1_IB_TSDET_X(x) (((x) & GENMASK(16, 12)) >> 12)
  486. #define HSIO_S6G_IB_CFG1_IB_SCALY(x) (((x) << 8) & GENMASK(11, 8))
  487. #define HSIO_S6G_IB_CFG1_IB_SCALY_M GENMASK(11, 8)
  488. #define HSIO_S6G_IB_CFG1_IB_SCALY_X(x) (((x) & GENMASK(11, 8)) >> 8)
  489. #define HSIO_S6G_IB_CFG1_IB_FILT_HP BIT(7)
  490. #define HSIO_S6G_IB_CFG1_IB_FILT_MID BIT(6)
  491. #define HSIO_S6G_IB_CFG1_IB_FILT_LP BIT(5)
  492. #define HSIO_S6G_IB_CFG1_IB_FILT_OFFSET BIT(4)
  493. #define HSIO_S6G_IB_CFG1_IB_FRC_HP BIT(3)
  494. #define HSIO_S6G_IB_CFG1_IB_FRC_MID BIT(2)
  495. #define HSIO_S6G_IB_CFG1_IB_FRC_LP BIT(1)
  496. #define HSIO_S6G_IB_CFG1_IB_FRC_OFFSET BIT(0)
  497. #define HSIO_S6G_IB_CFG2_IB_TINFV(x) (((x) << 27) & GENMASK(29, 27))
  498. #define HSIO_S6G_IB_CFG2_IB_TINFV_M GENMASK(29, 27)
  499. #define HSIO_S6G_IB_CFG2_IB_TINFV_X(x) (((x) & GENMASK(29, 27)) >> 27)
  500. #define HSIO_S6G_IB_CFG2_IB_OINFI(x) (((x) << 22) & GENMASK(26, 22))
  501. #define HSIO_S6G_IB_CFG2_IB_OINFI_M GENMASK(26, 22)
  502. #define HSIO_S6G_IB_CFG2_IB_OINFI_X(x) (((x) & GENMASK(26, 22)) >> 22)
  503. #define HSIO_S6G_IB_CFG2_IB_TAUX(x) (((x) << 19) & GENMASK(21, 19))
  504. #define HSIO_S6G_IB_CFG2_IB_TAUX_M GENMASK(21, 19)
  505. #define HSIO_S6G_IB_CFG2_IB_TAUX_X(x) (((x) & GENMASK(21, 19)) >> 19)
  506. #define HSIO_S6G_IB_CFG2_IB_OINFS(x) (((x) << 16) & GENMASK(18, 16))
  507. #define HSIO_S6G_IB_CFG2_IB_OINFS_M GENMASK(18, 16)
  508. #define HSIO_S6G_IB_CFG2_IB_OINFS_X(x) (((x) & GENMASK(18, 16)) >> 16)
  509. #define HSIO_S6G_IB_CFG2_IB_OCALS(x) (((x) << 10) & GENMASK(15, 10))
  510. #define HSIO_S6G_IB_CFG2_IB_OCALS_M GENMASK(15, 10)
  511. #define HSIO_S6G_IB_CFG2_IB_OCALS_X(x) (((x) & GENMASK(15, 10)) >> 10)
  512. #define HSIO_S6G_IB_CFG2_IB_TCALV(x) (((x) << 5) & GENMASK(9, 5))
  513. #define HSIO_S6G_IB_CFG2_IB_TCALV_M GENMASK(9, 5)
  514. #define HSIO_S6G_IB_CFG2_IB_TCALV_X(x) (((x) & GENMASK(9, 5)) >> 5)
  515. #define HSIO_S6G_IB_CFG2_IB_UMAX(x) (((x) << 3) & GENMASK(4, 3))
  516. #define HSIO_S6G_IB_CFG2_IB_UMAX_M GENMASK(4, 3)
  517. #define HSIO_S6G_IB_CFG2_IB_UMAX_X(x) (((x) & GENMASK(4, 3)) >> 3)
  518. #define HSIO_S6G_IB_CFG2_IB_UREG(x) ((x) & GENMASK(2, 0))
  519. #define HSIO_S6G_IB_CFG2_IB_UREG_M GENMASK(2, 0)
  520. #define HSIO_S6G_IB_CFG3_IB_INI_HP(x) (((x) << 18) & GENMASK(23, 18))
  521. #define HSIO_S6G_IB_CFG3_IB_INI_HP_M GENMASK(23, 18)
  522. #define HSIO_S6G_IB_CFG3_IB_INI_HP_X(x) (((x) & GENMASK(23, 18)) >> 18)
  523. #define HSIO_S6G_IB_CFG3_IB_INI_MID(x) (((x) << 12) & GENMASK(17, 12))
  524. #define HSIO_S6G_IB_CFG3_IB_INI_MID_M GENMASK(17, 12)
  525. #define HSIO_S6G_IB_CFG3_IB_INI_MID_X(x) (((x) & GENMASK(17, 12)) >> 12)
  526. #define HSIO_S6G_IB_CFG3_IB_INI_LP(x) (((x) << 6) & GENMASK(11, 6))
  527. #define HSIO_S6G_IB_CFG3_IB_INI_LP_M GENMASK(11, 6)
  528. #define HSIO_S6G_IB_CFG3_IB_INI_LP_X(x) (((x) & GENMASK(11, 6)) >> 6)
  529. #define HSIO_S6G_IB_CFG3_IB_INI_OFFSET(x) ((x) & GENMASK(5, 0))
  530. #define HSIO_S6G_IB_CFG3_IB_INI_OFFSET_M GENMASK(5, 0)
  531. #define HSIO_S6G_IB_CFG4_IB_MAX_HP(x) (((x) << 18) & GENMASK(23, 18))
  532. #define HSIO_S6G_IB_CFG4_IB_MAX_HP_M GENMASK(23, 18)
  533. #define HSIO_S6G_IB_CFG4_IB_MAX_HP_X(x) (((x) & GENMASK(23, 18)) >> 18)
  534. #define HSIO_S6G_IB_CFG4_IB_MAX_MID(x) (((x) << 12) & GENMASK(17, 12))
  535. #define HSIO_S6G_IB_CFG4_IB_MAX_MID_M GENMASK(17, 12)
  536. #define HSIO_S6G_IB_CFG4_IB_MAX_MID_X(x) (((x) & GENMASK(17, 12)) >> 12)
  537. #define HSIO_S6G_IB_CFG4_IB_MAX_LP(x) (((x) << 6) & GENMASK(11, 6))
  538. #define HSIO_S6G_IB_CFG4_IB_MAX_LP_M GENMASK(11, 6)
  539. #define HSIO_S6G_IB_CFG4_IB_MAX_LP_X(x) (((x) & GENMASK(11, 6)) >> 6)
  540. #define HSIO_S6G_IB_CFG4_IB_MAX_OFFSET(x) ((x) & GENMASK(5, 0))
  541. #define HSIO_S6G_IB_CFG4_IB_MAX_OFFSET_M GENMASK(5, 0)
  542. #define HSIO_S6G_IB_CFG5_IB_MIN_HP(x) (((x) << 18) & GENMASK(23, 18))
  543. #define HSIO_S6G_IB_CFG5_IB_MIN_HP_M GENMASK(23, 18)
  544. #define HSIO_S6G_IB_CFG5_IB_MIN_HP_X(x) (((x) & GENMASK(23, 18)) >> 18)
  545. #define HSIO_S6G_IB_CFG5_IB_MIN_MID(x) (((x) << 12) & GENMASK(17, 12))
  546. #define HSIO_S6G_IB_CFG5_IB_MIN_MID_M GENMASK(17, 12)
  547. #define HSIO_S6G_IB_CFG5_IB_MIN_MID_X(x) (((x) & GENMASK(17, 12)) >> 12)
  548. #define HSIO_S6G_IB_CFG5_IB_MIN_LP(x) (((x) << 6) & GENMASK(11, 6))
  549. #define HSIO_S6G_IB_CFG5_IB_MIN_LP_M GENMASK(11, 6)
  550. #define HSIO_S6G_IB_CFG5_IB_MIN_LP_X(x) (((x) & GENMASK(11, 6)) >> 6)
  551. #define HSIO_S6G_IB_CFG5_IB_MIN_OFFSET(x) ((x) & GENMASK(5, 0))
  552. #define HSIO_S6G_IB_CFG5_IB_MIN_OFFSET_M GENMASK(5, 0)
  553. #define HSIO_S6G_OB_CFG_OB_IDLE BIT(31)
  554. #define HSIO_S6G_OB_CFG_OB_ENA1V_MODE BIT(30)
  555. #define HSIO_S6G_OB_CFG_OB_POL BIT(29)
  556. #define HSIO_S6G_OB_CFG_OB_POST0(x) (((x) << 23) & GENMASK(28, 23))
  557. #define HSIO_S6G_OB_CFG_OB_POST0_M GENMASK(28, 23)
  558. #define HSIO_S6G_OB_CFG_OB_POST0_X(x) (((x) & GENMASK(28, 23)) >> 23)
  559. #define HSIO_S6G_OB_CFG_OB_PREC(x) (((x) << 18) & GENMASK(22, 18))
  560. #define HSIO_S6G_OB_CFG_OB_PREC_M GENMASK(22, 18)
  561. #define HSIO_S6G_OB_CFG_OB_PREC_X(x) (((x) & GENMASK(22, 18)) >> 18)
  562. #define HSIO_S6G_OB_CFG_OB_R_ADJ_MUX BIT(17)
  563. #define HSIO_S6G_OB_CFG_OB_R_ADJ_PDR BIT(16)
  564. #define HSIO_S6G_OB_CFG_OB_POST1(x) (((x) << 11) & GENMASK(15, 11))
  565. #define HSIO_S6G_OB_CFG_OB_POST1_M GENMASK(15, 11)
  566. #define HSIO_S6G_OB_CFG_OB_POST1_X(x) (((x) & GENMASK(15, 11)) >> 11)
  567. #define HSIO_S6G_OB_CFG_OB_R_COR BIT(10)
  568. #define HSIO_S6G_OB_CFG_OB_SEL_RCTRL BIT(9)
  569. #define HSIO_S6G_OB_CFG_OB_SR_H BIT(8)
  570. #define HSIO_S6G_OB_CFG_OB_SR(x) (((x) << 4) & GENMASK(7, 4))
  571. #define HSIO_S6G_OB_CFG_OB_SR_M GENMASK(7, 4)
  572. #define HSIO_S6G_OB_CFG_OB_SR_X(x) (((x) & GENMASK(7, 4)) >> 4)
  573. #define HSIO_S6G_OB_CFG_OB_RESISTOR_CTRL(x) ((x) & GENMASK(3, 0))
  574. #define HSIO_S6G_OB_CFG_OB_RESISTOR_CTRL_M GENMASK(3, 0)
  575. #define HSIO_S6G_OB_CFG1_OB_ENA_CAS(x) (((x) << 6) & GENMASK(8, 6))
  576. #define HSIO_S6G_OB_CFG1_OB_ENA_CAS_M GENMASK(8, 6)
  577. #define HSIO_S6G_OB_CFG1_OB_ENA_CAS_X(x) (((x) & GENMASK(8, 6)) >> 6)
  578. #define HSIO_S6G_OB_CFG1_OB_LEV(x) ((x) & GENMASK(5, 0))
  579. #define HSIO_S6G_OB_CFG1_OB_LEV_M GENMASK(5, 0)
  580. #define HSIO_S6G_SER_CFG_SER_4TAP_ENA BIT(8)
  581. #define HSIO_S6G_SER_CFG_SER_CPMD_SEL BIT(7)
  582. #define HSIO_S6G_SER_CFG_SER_SWAP_CPMD BIT(6)
  583. #define HSIO_S6G_SER_CFG_SER_ALISEL(x) (((x) << 4) & GENMASK(5, 4))
  584. #define HSIO_S6G_SER_CFG_SER_ALISEL_M GENMASK(5, 4)
  585. #define HSIO_S6G_SER_CFG_SER_ALISEL_X(x) (((x) & GENMASK(5, 4)) >> 4)
  586. #define HSIO_S6G_SER_CFG_SER_ENHYS BIT(3)
  587. #define HSIO_S6G_SER_CFG_SER_BIG_WIN BIT(2)
  588. #define HSIO_S6G_SER_CFG_SER_EN_WIN BIT(1)
  589. #define HSIO_S6G_SER_CFG_SER_ENALI BIT(0)
  590. #define HSIO_S6G_COMMON_CFG_SYS_RST BIT(17)
  591. #define HSIO_S6G_COMMON_CFG_SE_DIV2_ENA BIT(16)
  592. #define HSIO_S6G_COMMON_CFG_SE_AUTO_SQUELCH_ENA BIT(15)
  593. #define HSIO_S6G_COMMON_CFG_ENA_LANE BIT(14)
  594. #define HSIO_S6G_COMMON_CFG_PWD_RX BIT(13)
  595. #define HSIO_S6G_COMMON_CFG_PWD_TX BIT(12)
  596. #define HSIO_S6G_COMMON_CFG_LANE_CTRL(x) (((x) << 9) & GENMASK(11, 9))
  597. #define HSIO_S6G_COMMON_CFG_LANE_CTRL_M GENMASK(11, 9)
  598. #define HSIO_S6G_COMMON_CFG_LANE_CTRL_X(x) (((x) & GENMASK(11, 9)) >> 9)
  599. #define HSIO_S6G_COMMON_CFG_ENA_DIRECT BIT(8)
  600. #define HSIO_S6G_COMMON_CFG_ENA_ELOOP BIT(7)
  601. #define HSIO_S6G_COMMON_CFG_ENA_FLOOP BIT(6)
  602. #define HSIO_S6G_COMMON_CFG_ENA_ILOOP BIT(5)
  603. #define HSIO_S6G_COMMON_CFG_ENA_PLOOP BIT(4)
  604. #define HSIO_S6G_COMMON_CFG_HRATE BIT(3)
  605. #define HSIO_S6G_COMMON_CFG_QRATE BIT(2)
  606. #define HSIO_S6G_COMMON_CFG_IF_MODE(x) ((x) & GENMASK(1, 0))
  607. #define HSIO_S6G_COMMON_CFG_IF_MODE_M GENMASK(1, 0)
  608. #define HSIO_S6G_PLL_CFG_PLL_ENA_OFFS(x) (((x) << 16) & GENMASK(17, 16))
  609. #define HSIO_S6G_PLL_CFG_PLL_ENA_OFFS_M GENMASK(17, 16)
  610. #define HSIO_S6G_PLL_CFG_PLL_ENA_OFFS_X(x) (((x) & GENMASK(17, 16)) >> 16)
  611. #define HSIO_S6G_PLL_CFG_PLL_DIV4 BIT(15)
  612. #define HSIO_S6G_PLL_CFG_PLL_ENA_ROT BIT(14)
  613. #define HSIO_S6G_PLL_CFG_PLL_FSM_CTRL_DATA(x) (((x) << 6) & GENMASK(13, 6))
  614. #define HSIO_S6G_PLL_CFG_PLL_FSM_CTRL_DATA_M GENMASK(13, 6)
  615. #define HSIO_S6G_PLL_CFG_PLL_FSM_CTRL_DATA_X(x) (((x) & GENMASK(13, 6)) >> 6)
  616. #define HSIO_S6G_PLL_CFG_PLL_FSM_ENA BIT(5)
  617. #define HSIO_S6G_PLL_CFG_PLL_FSM_FORCE_SET_ENA BIT(4)
  618. #define HSIO_S6G_PLL_CFG_PLL_FSM_OOR_RECAL_ENA BIT(3)
  619. #define HSIO_S6G_PLL_CFG_PLL_RB_DATA_SEL BIT(2)
  620. #define HSIO_S6G_PLL_CFG_PLL_ROT_DIR BIT(1)
  621. #define HSIO_S6G_PLL_CFG_PLL_ROT_FRQ BIT(0)
  622. #define HSIO_S6G_ACJTAG_CFG_ACJTAG_INIT_DATA_N BIT(5)
  623. #define HSIO_S6G_ACJTAG_CFG_ACJTAG_INIT_DATA_P BIT(4)
  624. #define HSIO_S6G_ACJTAG_CFG_ACJTAG_INIT_CLK BIT(3)
  625. #define HSIO_S6G_ACJTAG_CFG_OB_DIRECT BIT(2)
  626. #define HSIO_S6G_ACJTAG_CFG_ACJTAG_ENA BIT(1)
  627. #define HSIO_S6G_ACJTAG_CFG_JTAG_CTRL_ENA BIT(0)
  628. #define HSIO_S6G_GP_CFG_GP_MSB(x) (((x) << 16) & GENMASK(31, 16))
  629. #define HSIO_S6G_GP_CFG_GP_MSB_M GENMASK(31, 16)
  630. #define HSIO_S6G_GP_CFG_GP_MSB_X(x) (((x) & GENMASK(31, 16)) >> 16)
  631. #define HSIO_S6G_GP_CFG_GP_LSB(x) ((x) & GENMASK(15, 0))
  632. #define HSIO_S6G_GP_CFG_GP_LSB_M GENMASK(15, 0)
  633. #define HSIO_S6G_IB_STATUS0_IB_CAL_DONE BIT(8)
  634. #define HSIO_S6G_IB_STATUS0_IB_HP_GAIN_ACT BIT(7)
  635. #define HSIO_S6G_IB_STATUS0_IB_MID_GAIN_ACT BIT(6)
  636. #define HSIO_S6G_IB_STATUS0_IB_LP_GAIN_ACT BIT(5)
  637. #define HSIO_S6G_IB_STATUS0_IB_OFFSET_ACT BIT(4)
  638. #define HSIO_S6G_IB_STATUS0_IB_OFFSET_VLD BIT(3)
  639. #define HSIO_S6G_IB_STATUS0_IB_OFFSET_ERR BIT(2)
  640. #define HSIO_S6G_IB_STATUS0_IB_OFFSDIR BIT(1)
  641. #define HSIO_S6G_IB_STATUS0_IB_SIG_DET BIT(0)
  642. #define HSIO_S6G_IB_STATUS1_IB_HP_GAIN_STAT(x) (((x) << 18) & GENMASK(23, 18))
  643. #define HSIO_S6G_IB_STATUS1_IB_HP_GAIN_STAT_M GENMASK(23, 18)
  644. #define HSIO_S6G_IB_STATUS1_IB_HP_GAIN_STAT_X(x) (((x) & GENMASK(23, 18)) >> 18)
  645. #define HSIO_S6G_IB_STATUS1_IB_MID_GAIN_STAT(x) (((x) << 12) & GENMASK(17, 12))
  646. #define HSIO_S6G_IB_STATUS1_IB_MID_GAIN_STAT_M GENMASK(17, 12)
  647. #define HSIO_S6G_IB_STATUS1_IB_MID_GAIN_STAT_X(x) (((x) & GENMASK(17, 12)) >> 12)
  648. #define HSIO_S6G_IB_STATUS1_IB_LP_GAIN_STAT(x) (((x) << 6) & GENMASK(11, 6))
  649. #define HSIO_S6G_IB_STATUS1_IB_LP_GAIN_STAT_M GENMASK(11, 6)
  650. #define HSIO_S6G_IB_STATUS1_IB_LP_GAIN_STAT_X(x) (((x) & GENMASK(11, 6)) >> 6)
  651. #define HSIO_S6G_IB_STATUS1_IB_OFFSET_STAT(x) ((x) & GENMASK(5, 0))
  652. #define HSIO_S6G_IB_STATUS1_IB_OFFSET_STAT_M GENMASK(5, 0)
  653. #define HSIO_S6G_ACJTAG_STATUS_ACJTAG_CAPT_DATA_N BIT(2)
  654. #define HSIO_S6G_ACJTAG_STATUS_ACJTAG_CAPT_DATA_P BIT(1)
  655. #define HSIO_S6G_ACJTAG_STATUS_IB_DIRECT BIT(0)
  656. #define HSIO_S6G_PLL_STATUS_PLL_CAL_NOT_DONE BIT(10)
  657. #define HSIO_S6G_PLL_STATUS_PLL_CAL_ERR BIT(9)
  658. #define HSIO_S6G_PLL_STATUS_PLL_OUT_OF_RANGE_ERR BIT(8)
  659. #define HSIO_S6G_PLL_STATUS_PLL_RB_DATA(x) ((x) & GENMASK(7, 0))
  660. #define HSIO_S6G_PLL_STATUS_PLL_RB_DATA_M GENMASK(7, 0)
  661. #define HSIO_S6G_REVID_SERDES_REV(x) (((x) << 26) & GENMASK(31, 26))
  662. #define HSIO_S6G_REVID_SERDES_REV_M GENMASK(31, 26)
  663. #define HSIO_S6G_REVID_SERDES_REV_X(x) (((x) & GENMASK(31, 26)) >> 26)
  664. #define HSIO_S6G_REVID_RCPLL_REV(x) (((x) << 21) & GENMASK(25, 21))
  665. #define HSIO_S6G_REVID_RCPLL_REV_M GENMASK(25, 21)
  666. #define HSIO_S6G_REVID_RCPLL_REV_X(x) (((x) & GENMASK(25, 21)) >> 21)
  667. #define HSIO_S6G_REVID_SER_REV(x) (((x) << 16) & GENMASK(20, 16))
  668. #define HSIO_S6G_REVID_SER_REV_M GENMASK(20, 16)
  669. #define HSIO_S6G_REVID_SER_REV_X(x) (((x) & GENMASK(20, 16)) >> 16)
  670. #define HSIO_S6G_REVID_DES_REV(x) (((x) << 10) & GENMASK(15, 10))
  671. #define HSIO_S6G_REVID_DES_REV_M GENMASK(15, 10)
  672. #define HSIO_S6G_REVID_DES_REV_X(x) (((x) & GENMASK(15, 10)) >> 10)
  673. #define HSIO_S6G_REVID_OB_REV(x) (((x) << 5) & GENMASK(9, 5))
  674. #define HSIO_S6G_REVID_OB_REV_M GENMASK(9, 5)
  675. #define HSIO_S6G_REVID_OB_REV_X(x) (((x) & GENMASK(9, 5)) >> 5)
  676. #define HSIO_S6G_REVID_IB_REV(x) ((x) & GENMASK(4, 0))
  677. #define HSIO_S6G_REVID_IB_REV_M GENMASK(4, 0)
  678. #define HSIO_MCB_S6G_ADDR_CFG_SERDES6G_WR_ONE_SHOT BIT(31)
  679. #define HSIO_MCB_S6G_ADDR_CFG_SERDES6G_RD_ONE_SHOT BIT(30)
  680. #define HSIO_MCB_S6G_ADDR_CFG_SERDES6G_ADDR(x) ((x) & GENMASK(24, 0))
  681. #define HSIO_MCB_S6G_ADDR_CFG_SERDES6G_ADDR_M GENMASK(24, 0)
  682. #define HSIO_HW_CFG_DEV2G5_10_MODE BIT(6)
  683. #define HSIO_HW_CFG_DEV1G_9_MODE BIT(5)
  684. #define HSIO_HW_CFG_DEV1G_6_MODE BIT(4)
  685. #define HSIO_HW_CFG_DEV1G_5_MODE BIT(3)
  686. #define HSIO_HW_CFG_DEV1G_4_MODE BIT(2)
  687. #define HSIO_HW_CFG_PCIE_ENA BIT(1)
  688. #define HSIO_HW_CFG_QSGMII_ENA BIT(0)
  689. #define HSIO_HW_QSGMII_CFG_SHYST_DIS BIT(3)
  690. #define HSIO_HW_QSGMII_CFG_E_DET_ENA BIT(2)
  691. #define HSIO_HW_QSGMII_CFG_USE_I1_ENA BIT(1)
  692. #define HSIO_HW_QSGMII_CFG_FLIP_LANES BIT(0)
  693. #define HSIO_HW_QSGMII_STAT_DELAY_VAR_X200PS(x) (((x) << 1) & GENMASK(6, 1))
  694. #define HSIO_HW_QSGMII_STAT_DELAY_VAR_X200PS_M GENMASK(6, 1)
  695. #define HSIO_HW_QSGMII_STAT_DELAY_VAR_X200PS_X(x) (((x) & GENMASK(6, 1)) >> 1)
  696. #define HSIO_HW_QSGMII_STAT_SYNC BIT(0)
  697. #define HSIO_CLK_CFG_CLKDIV_PHY(x) (((x) << 1) & GENMASK(8, 1))
  698. #define HSIO_CLK_CFG_CLKDIV_PHY_M GENMASK(8, 1)
  699. #define HSIO_CLK_CFG_CLKDIV_PHY_X(x) (((x) & GENMASK(8, 1)) >> 1)
  700. #define HSIO_CLK_CFG_CLKDIV_PHY_DIS BIT(0)
  701. #define HSIO_TEMP_SENSOR_CTRL_FORCE_TEMP_RD BIT(5)
  702. #define HSIO_TEMP_SENSOR_CTRL_FORCE_RUN BIT(4)
  703. #define HSIO_TEMP_SENSOR_CTRL_FORCE_NO_RST BIT(3)
  704. #define HSIO_TEMP_SENSOR_CTRL_FORCE_POWER_UP BIT(2)
  705. #define HSIO_TEMP_SENSOR_CTRL_FORCE_CLK BIT(1)
  706. #define HSIO_TEMP_SENSOR_CTRL_SAMPLE_ENA BIT(0)
  707. #define HSIO_TEMP_SENSOR_CFG_RUN_WID(x) (((x) << 8) & GENMASK(15, 8))
  708. #define HSIO_TEMP_SENSOR_CFG_RUN_WID_M GENMASK(15, 8)
  709. #define HSIO_TEMP_SENSOR_CFG_RUN_WID_X(x) (((x) & GENMASK(15, 8)) >> 8)
  710. #define HSIO_TEMP_SENSOR_CFG_SAMPLE_PER(x) ((x) & GENMASK(7, 0))
  711. #define HSIO_TEMP_SENSOR_CFG_SAMPLE_PER_M GENMASK(7, 0)
  712. #define HSIO_TEMP_SENSOR_STAT_TEMP_VALID BIT(8)
  713. #define HSIO_TEMP_SENSOR_STAT_TEMP(x) ((x) & GENMASK(7, 0))
  714. #define HSIO_TEMP_SENSOR_STAT_TEMP_M GENMASK(7, 0)
  715. #endif