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