1 /*
2  * Copyright (C) 2015-2016 Marvell International Ltd.
3  *
4  * SPDX-License-Identifier:	GPL-2.0+
5  */
6 
7 #ifndef _COMPHY_HPIPE_H_
8 #define _COMPHY_HPIPE_H_
9 
10 /* SerDes IP register */
11 #define SD_EXTERNAL_CONFIG0_REG			0
12 #define SD_EXTERNAL_CONFIG0_SD_PU_PLL_OFFSET	1
13 #define SD_EXTERNAL_CONFIG0_SD_PU_PLL_MASK	\
14 	(1 << SD_EXTERNAL_CONFIG0_SD_PU_PLL_OFFSET)
15 #define SD_EXTERNAL_CONFIG0_SD_PHY_GEN_RX_OFFSET 3
16 #define SD_EXTERNAL_CONFIG0_SD_PHY_GEN_RX_MASK	\
17 	(0xf << SD_EXTERNAL_CONFIG0_SD_PHY_GEN_RX_OFFSET)
18 #define SD_EXTERNAL_CONFIG0_SD_PHY_GEN_TX_OFFSET 7
19 #define SD_EXTERNAL_CONFIG0_SD_PHY_GEN_TX_MASK	\
20 	(0xf << SD_EXTERNAL_CONFIG0_SD_PHY_GEN_TX_OFFSET)
21 #define SD_EXTERNAL_CONFIG0_SD_PU_RX_OFFSET	11
22 #define SD_EXTERNAL_CONFIG0_SD_PU_RX_MASK	\
23 	(1 << SD_EXTERNAL_CONFIG0_SD_PU_RX_OFFSET)
24 #define SD_EXTERNAL_CONFIG0_SD_PU_TX_OFFSET	12
25 #define SD_EXTERNAL_CONFIG0_SD_PU_TX_MASK	\
26 	(1 << SD_EXTERNAL_CONFIG0_SD_PU_TX_OFFSET)
27 #define SD_EXTERNAL_CONFIG0_HALF_BUS_MODE_OFFSET 14
28 #define SD_EXTERNAL_CONFIG0_HALF_BUS_MODE_MASK	\
29 	(1 << SD_EXTERNAL_CONFIG0_HALF_BUS_MODE_OFFSET)
30 #define SD_EXTERNAL_CONFIG0_MEDIA_MODE_OFFSET	15
31 #define SD_EXTERNAL_CONFIG0_MEDIA_MODE_MASK	\
32 	(0x1 << SD_EXTERNAL_CONFIG0_MEDIA_MODE_OFFSET)
33 
34 #define SD_EXTERNAL_CONFIG1_REG			0x4
35 #define SD_EXTERNAL_CONFIG1_RESET_IN_OFFSET	3
36 #define SD_EXTERNAL_CONFIG1_RESET_IN_MASK	\
37 	(0x1 << SD_EXTERNAL_CONFIG1_RESET_IN_OFFSET)
38 #define SD_EXTERNAL_CONFIG1_RX_INIT_OFFSET	4
39 #define SD_EXTERNAL_CONFIG1_RX_INIT_MASK	\
40 	(0x1 << SD_EXTERNAL_CONFIG1_RX_INIT_OFFSET)
41 #define SD_EXTERNAL_CONFIG1_RESET_CORE_OFFSET	5
42 #define SD_EXTERNAL_CONFIG1_RESET_CORE_MASK	\
43 	(0x1 << SD_EXTERNAL_CONFIG1_RESET_CORE_OFFSET)
44 #define SD_EXTERNAL_CONFIG1_RF_RESET_IN_OFFSET	6
45 #define SD_EXTERNAL_CONFIG1_RF_RESET_IN_MASK	\
46 	(0x1 << SD_EXTERNAL_CONFIG1_RF_RESET_IN_OFFSET)
47 
48 #define SD_EXTERNAL_CONFIG2_REG			0x8
49 #define SD_EXTERNAL_CONFIG2_PIN_DFE_EN_OFFSET	4
50 #define SD_EXTERNAL_CONFIG2_PIN_DFE_EN_MASK	\
51 	(0x1 << SD_EXTERNAL_CONFIG2_PIN_DFE_EN_OFFSET)
52 #define SD_EXTERNAL_CONFIG2_SSC_ENABLE_OFFSET	7
53 #define SD_EXTERNAL_CONFIG2_SSC_ENABLE_MASK	\
54 	(0x1 << SD_EXTERNAL_CONFIG2_SSC_ENABLE_OFFSET)
55 
56 #define SD_EXTERNAL_STATUS0_REG			0x18
57 #define SD_EXTERNAL_STATUS0_PLL_TX_OFFSET	2
58 #define SD_EXTERNAL_STATUS0_PLL_TX_MASK		\
59 	(0x1 << SD_EXTERNAL_STATUS0_PLL_TX_OFFSET)
60 #define SD_EXTERNAL_STATUS0_PLL_RX_OFFSET	3
61 #define SD_EXTERNAL_STATUS0_PLL_RX_MASK		\
62 	(0x1 << SD_EXTERNAL_STATUS0_PLL_RX_OFFSET)
63 #define SD_EXTERNAL_STATUS0_RX_INIT_OFFSET	4
64 #define SD_EXTERNAL_STATUS0_RX_INIT_MASK	\
65 	(0x1 << SD_EXTERNAL_STATUS0_RX_INIT_OFFSET)
66 #define SD_EXTERNAL_STATUS0_RF_RESET_IN_OFFSET	6
67 #define SD_EXTERNAL_STATUS0_RF_RESET_IN_MASK	\
68 	(0x1 << SD_EXTERNAL_STATUS0_RF_RESET_IN_OFFSET)
69 
70 /* HPIPE register */
71 #define HPIPE_PWR_PLL_REG			0x4
72 #define HPIPE_PWR_PLL_REF_FREQ_OFFSET		0
73 #define HPIPE_PWR_PLL_REF_FREQ_MASK		\
74 	(0x1f << HPIPE_PWR_PLL_REF_FREQ_OFFSET)
75 #define HPIPE_PWR_PLL_PHY_MODE_OFFSET		5
76 #define HPIPE_PWR_PLL_PHY_MODE_MASK		\
77 	(0x7 << HPIPE_PWR_PLL_PHY_MODE_OFFSET)
78 
79 #define HPIPE_KVCO_CALIB_CTRL_REG		0x8
80 #define HPIPE_KVCO_CALIB_CTRL_MAX_PLL_OFFSET	12
81 #define HPIPE_KVCO_CALIB_CTRL_MAX_PLL_MASK	\
82 	(0x1 << HPIPE_KVCO_CALIB_CTRL_MAX_PLL_OFFSET)
83 
84 #define HPIPE_CAL_REG1_REG			0xc
85 #define HPIPE_CAL_REG_1_EXT_TXIMP_OFFSET	10
86 #define HPIPE_CAL_REG_1_EXT_TXIMP_MASK		\
87 	(0x1f << HPIPE_CAL_REG_1_EXT_TXIMP_OFFSET)
88 #define HPIPE_CAL_REG_1_EXT_TXIMP_EN_OFFSET	15
89 #define HPIPE_CAL_REG_1_EXT_TXIMP_EN_MASK	\
90 	(0x1 << HPIPE_CAL_REG_1_EXT_TXIMP_EN_OFFSET)
91 
92 #define HPIPE_SQUELCH_FFE_SETTING_REG           0x018
93 
94 #define HPIPE_DFE_REG0				0x01C
95 #define HPIPE_DFE_RES_FORCE_OFFSET		15
96 #define HPIPE_DFE_RES_FORCE_MASK		\
97 	(0x1 << HPIPE_DFE_RES_FORCE_OFFSET)
98 
99 #define HPIPE_DFE_F3_F5_REG			0x028
100 #define HPIPE_DFE_F3_F5_DFE_EN_OFFSET		14
101 #define HPIPE_DFE_F3_F5_DFE_EN_MASK		\
102 	(0x1 << HPIPE_DFE_F3_F5_DFE_EN_OFFSET)
103 #define HPIPE_DFE_F3_F5_DFE_CTRL_OFFSET		15
104 #define HPIPE_DFE_F3_F5_DFE_CTRL_MASK		\
105 	(0x1 << HPIPE_DFE_F3_F5_DFE_CTRL_OFFSET)
106 
107 #define HPIPE_G1_SET_0_REG			0x034
108 #define HPIPE_G1_SET_0_G1_TX_AMP_OFFSET		1
109 #define HPIPE_G1_SET_0_G1_TX_AMP_MASK		\
110 	(0x1f << HPIPE_G1_SET_0_G1_TX_AMP_OFFSET)
111 #define HPIPE_G1_SET_0_G1_TX_AMP_ADJ_OFFSET	6
112 #define HPIPE_G1_SET_0_G1_TX_AMP_ADJ_MASK	\
113 	(0x1 << HPIPE_G1_SET_0_G1_TX_AMP_ADJ_OFFSET)
114 #define HPIPE_G1_SET_0_G1_TX_EMPH1_OFFSET	7
115 #define HPIPE_G1_SET_0_G1_TX_EMPH1_MASK		\
116 	(0xf << HPIPE_G1_SET_0_G1_TX_EMPH1_OFFSET)
117 #define HPIPE_G1_SET_0_G1_TX_EMPH1_EN_OFFSET	11
118 #define HPIPE_G1_SET_0_G1_TX_EMPH1_EN_MASK	\
119 	(0x1 << HPIPE_G1_SET_0_G1_TX_EMPH1_EN_OFFSET)
120 
121 #define HPIPE_G1_SET_1_REG			0x038
122 #define HPIPE_G1_SET_1_G1_RX_SELMUPI_OFFSET	0
123 #define HPIPE_G1_SET_1_G1_RX_SELMUPI_MASK	\
124 	(0x7 << HPIPE_G1_SET_1_G1_RX_SELMUPI_OFFSET)
125 #define HPIPE_G1_SET_1_G1_RX_SELMUPP_OFFSET	3
126 #define HPIPE_G1_SET_1_G1_RX_SELMUPP_MASK	\
127 	(0x7 << HPIPE_G1_SET_1_G1_RX_SELMUPP_OFFSET)
128 #define HPIPE_G1_SET_1_G1_RX_SELMUFI_OFFSET	6
129 #define HPIPE_G1_SET_1_G1_RX_SELMUFI_MASK	\
130 	(0x3 << HPIPE_G1_SET_1_G1_RX_SELMUFI_OFFSET)
131 #define HPIPE_G1_SET_1_G1_RX_SELMUFF_OFFSET	8
132 #define HPIPE_G1_SET_1_G1_RX_SELMUFF_MASK	\
133 	(0x3 << HPIPE_G1_SET_1_G1_RX_SELMUFF_OFFSET)
134 #define HPIPE_G1_SET_1_G1_RX_DFE_EN_OFFSET	10
135 #define HPIPE_G1_SET_1_G1_RX_DFE_EN_MASK	\
136 	(0x1 << HPIPE_G1_SET_1_G1_RX_DFE_EN_OFFSET)
137 
138 #define HPIPE_G1_SET_1_G1_RX_DIGCK_DIV_OFFSET	11
139 #define HPIPE_G1_SET_1_G1_RX_DIGCK_DIV_MASK	\
140 	(0x3 << HPIPE_G1_SET_1_G1_RX_DIGCK_DIV_OFFSET)
141 
142 #define HPIPE_G2_SET_0_REG			0x3c
143 #define HPIPE_G2_SET_0_G2_TX_AMP_OFFSET		1
144 #define HPIPE_G2_SET_0_G2_TX_AMP_MASK		\
145 	(0x1f << HPIPE_G2_SET_0_G2_TX_AMP_OFFSET)
146 #define HPIPE_G2_SET_0_G2_TX_AMP_ADJ_OFFSET	6
147 #define HPIPE_G2_SET_0_G2_TX_AMP_ADJ_MASK	\
148 	(0x1 << HPIPE_G2_SET_0_G2_TX_AMP_ADJ_OFFSET)
149 #define HPIPE_G2_SET_0_G2_TX_EMPH1_OFFSET	7
150 #define HPIPE_G2_SET_0_G2_TX_EMPH1_MASK		\
151 	(0xf << HPIPE_G2_SET_0_G2_TX_EMPH1_OFFSET)
152 #define HPIPE_G2_SET_0_G2_TX_EMPH1_EN_OFFSET	11
153 #define HPIPE_G2_SET_0_G2_TX_EMPH1_EN_MASK	\
154 	(0x1 << HPIPE_G2_SET_0_G2_TX_EMPH1_EN_OFFSET)
155 
156 #define HPIPE_G2_SET_1_REG			0x040
157 #define HPIPE_G2_SET_1_G2_RX_SELMUPI_OFFSET	0
158 #define HPIPE_G2_SET_1_G2_RX_SELMUPI_MASK	\
159 	(0x7 << HPIPE_G2_SET_1_G2_RX_SELMUPI_OFFSET)
160 #define HPIPE_G2_SET_1_G2_RX_SELMUPP_OFFSET	3
161 #define HPIPE_G2_SET_1_G2_RX_SELMUPP_MASK	\
162 	(0x7 << HPIPE_G2_SET_1_G2_RX_SELMUPP_OFFSET)
163 #define HPIPE_G2_SET_1_G2_RX_SELMUFI_OFFSET	6
164 #define HPIPE_G2_SET_1_G2_RX_SELMUFI_MASK	\
165 	(0x3 << HPIPE_G2_SET_1_G2_RX_SELMUFI_OFFSET)
166 #define HPIPE_G2_SET_1_G2_RX_SELMUFF_OFFSET	8
167 #define HPIPE_G2_SET_1_G2_RX_SELMUFF_MASK	\
168 	(0x3 << HPIPE_G2_SET_1_G2_RX_SELMUFF_OFFSET)
169 #define HPIPE_G2_SET_1_G2_RX_DFE_EN_OFFSET	10
170 #define HPIPE_G2_SET_1_G2_RX_DFE_EN_MASK	\
171 	(0x1 << HPIPE_G2_SET_1_G2_RX_DFE_EN_OFFSET)
172 #define HPIPE_G2_SET_1_G2_RX_DIGCK_DIV_OFFSET	11
173 #define HPIPE_G2_SET_1_G2_RX_DIGCK_DIV_MASK	\
174 	(0x3 << HPIPE_G2_SET_1_G2_RX_DIGCK_DIV_OFFSET)
175 
176 #define HPIPE_G3_SET_0_REG			0x44
177 #define HPIPE_G3_SET_0_G3_TX_AMP_OFFSET		1
178 #define HPIPE_G3_SET_0_G3_TX_AMP_MASK		\
179 	(0x1f << HPIPE_G3_SET_0_G3_TX_AMP_OFFSET)
180 #define HPIPE_G3_SET_0_G3_TX_AMP_ADJ_OFFSET	6
181 #define HPIPE_G3_SET_0_G3_TX_AMP_ADJ_MASK	\
182 	(0x1 << HPIPE_G3_SET_0_G3_TX_AMP_ADJ_OFFSET)
183 #define HPIPE_G3_SET_0_G3_TX_EMPH1_OFFSET	7
184 #define HPIPE_G3_SET_0_G3_TX_EMPH1_MASK		\
185 	(0xf << HPIPE_G3_SET_0_G3_TX_EMPH1_OFFSET)
186 #define HPIPE_G3_SET_0_G3_TX_EMPH1_EN_OFFSET	11
187 #define HPIPE_G3_SET_0_G3_TX_EMPH1_EN_MASK	\
188 	(0x1 << HPIPE_G3_SET_0_G3_TX_EMPH1_EN_OFFSET)
189 #define HPIPE_G3_SET_0_G3_TX_SLEW_RATE_SEL_OFFSET 12
190 #define HPIPE_G3_SET_0_G3_TX_SLEW_RATE_SEL_MASK	\
191 	(0x7 << HPIPE_G3_SET_0_G3_TX_SLEW_RATE_SEL_OFFSET)
192 #define HPIPE_G3_SET_0_G3_TX_SLEW_CTRL_EN_OFFSET 15
193 #define HPIPE_G3_SET_0_G3_TX_SLEW_CTRL_EN_MASK	\
194 	(0x1 << HPIPE_G3_SET_0_G3_TX_SLEW_CTRL_EN_OFFSET)
195 
196 #define HPIPE_G3_SET_1_REG			0x048
197 #define HPIPE_G3_SET_1_G3_RX_SELMUPI_OFFSET	0
198 #define HPIPE_G3_SET_1_G3_RX_SELMUPI_MASK	\
199 	(0x7 << HPIPE_G3_SET_1_G3_RX_SELMUPI_OFFSET)
200 #define HPIPE_G3_SET_1_G3_RX_SELMUPF_OFFSET	3
201 #define HPIPE_G3_SET_1_G3_RX_SELMUPF_MASK	\
202 	(0x7 << HPIPE_G3_SET_1_G3_RX_SELMUPF_OFFSET)
203 #define HPIPE_G3_SET_1_G3_RX_SELMUFI_OFFSET	6
204 #define HPIPE_G3_SET_1_G3_RX_SELMUFI_MASK	\
205 	(0x3 << HPIPE_G3_SET_1_G3_RX_SELMUFI_OFFSET)
206 #define HPIPE_G3_SET_1_G3_RX_SELMUFF_OFFSET	8
207 #define HPIPE_G3_SET_1_G3_RX_SELMUFF_MASK	\
208 	(0x3 << HPIPE_G3_SET_1_G3_RX_SELMUFF_OFFSET)
209 #define HPIPE_G3_SET_1_G3_RX_DFE_EN_OFFSET	10
210 #define HPIPE_G3_SET_1_G3_RX_DFE_EN_MASK	\
211 	(0x1 << HPIPE_G3_SET_1_G3_RX_DFE_EN_OFFSET)
212 #define HPIPE_G3_SET_1_G3_RX_DIGCK_DIV_OFFSET	11
213 #define HPIPE_G3_SET_1_G3_RX_DIGCK_DIV_MASK	 \
214 	(0x3 << HPIPE_G3_SET_1_G3_RX_DIGCK_DIV_OFFSET)
215 #define HPIPE_G3_SET_1_G3_SAMPLER_INPAIRX2_EN_OFFSET	13
216 #define HPIPE_G3_SET_1_G3_SAMPLER_INPAIRX2_EN_MASK	\
217 	(0x1 << HPIPE_G3_SET_1_G3_SAMPLER_INPAIRX2_EN_OFFSET)
218 
219 #define HPIPE_LOOPBACK_REG			0x08c
220 #define HPIPE_LOOPBACK_SEL_OFFSET		1
221 #define HPIPE_LOOPBACK_SEL_MASK			\
222 	(0x7 << HPIPE_LOOPBACK_SEL_OFFSET)
223 
224 #define HPIPE_SYNC_PATTERN_REG                  0x090
225 
226 #define HPIPE_INTERFACE_REG			0x94
227 #define HPIPE_INTERFACE_GEN_MAX_OFFSET		10
228 #define HPIPE_INTERFACE_GEN_MAX_MASK		\
229 	(0x3 << HPIPE_INTERFACE_GEN_MAX_OFFSET)
230 #define HPIPE_INTERFACE_DET_BYPASS_OFFSET	12
231 #define HPIPE_INTERFACE_DET_BYPASS_MASK		\
232 	(0x1 << HPIPE_INTERFACE_DET_BYPASS_OFFSET)
233 #define HPIPE_INTERFACE_LINK_TRAIN_OFFSET	14
234 #define HPIPE_INTERFACE_LINK_TRAIN_MASK		\
235 	(0x1 << HPIPE_INTERFACE_LINK_TRAIN_OFFSET)
236 
237 #define HPIPE_ISOLATE_MODE_REG			0x98
238 #define HPIPE_ISOLATE_MODE_GEN_RX_OFFSET	0
239 #define HPIPE_ISOLATE_MODE_GEN_RX_MASK		\
240 	(0xf << HPIPE_ISOLATE_MODE_GEN_RX_OFFSET)
241 #define HPIPE_ISOLATE_MODE_GEN_TX_OFFSET	4
242 #define HPIPE_ISOLATE_MODE_GEN_TX_MASK		\
243 	(0xf << HPIPE_ISOLATE_MODE_GEN_TX_OFFSET)
244 
245 #define HPIPE_G1_SET_2_REG			0xf4
246 #define HPIPE_G1_SET_2_G1_TX_EMPH0_OFFSET	0
247 #define HPIPE_G1_SET_2_G1_TX_EMPH0_MASK		\
248 	(0xf << HPIPE_G1_SET_2_G1_TX_EMPH0_OFFSET)
249 #define HPIPE_G1_SET_2_G1_TX_EMPH0_EN_OFFSET	4
250 #define HPIPE_G1_SET_2_G1_TX_EMPH0_EN_MASK	\
251 	(0x1 << HPIPE_G1_SET_2_G1_TX_EMPH0_MASK)
252 
253 #define HPIPE_VTHIMPCAL_CTRL_REG                0x104
254 
255 #define HPIPE_VDD_CAL_CTRL_REG			0x114
256 #define HPIPE_EXT_SELLV_RXSAMPL_OFFSET		5
257 #define HPIPE_EXT_SELLV_RXSAMPL_MASK		\
258 	(0x1f << HPIPE_EXT_SELLV_RXSAMPL_OFFSET)
259 
260 #define HPIPE_VDD_CAL_0_REG			0x108
261 #define HPIPE_CAL_VDD_CONT_MODE_OFFSET		15
262 #define HPIPE_CAL_VDD_CONT_MODE_MASK		\
263 	(0x1 << HPIPE_CAL_VDD_CONT_MODE_OFFSET)
264 
265 #define HPIPE_PCIE_REG0                         0x120
266 #define HPIPE_PCIE_IDLE_SYNC_OFFSET		12
267 #define HPIPE_PCIE_IDLE_SYNC_MASK		\
268 	(0x1 << HPIPE_PCIE_IDLE_SYNC_OFFSET)
269 #define HPIPE_PCIE_SEL_BITS_OFFSET		13
270 #define HPIPE_PCIE_SEL_BITS_MASK		\
271 	(0x3 << HPIPE_PCIE_SEL_BITS_OFFSET)
272 
273 #define HPIPE_LANE_ALIGN_REG			0x124
274 #define HPIPE_LANE_ALIGN_OFF_OFFSET		12
275 #define HPIPE_LANE_ALIGN_OFF_MASK		\
276 	(0x1 << HPIPE_LANE_ALIGN_OFF_OFFSET)
277 
278 #define HPIPE_MISC_REG				0x13C
279 #define HPIPE_MISC_CLK100M_125M_OFFSET		4
280 #define HPIPE_MISC_CLK100M_125M_MASK		\
281 	(0x1 << HPIPE_MISC_CLK100M_125M_OFFSET)
282 #define HPIPE_MISC_ICP_FORCE_OFFSET		5
283 #define HPIPE_MISC_ICP_FORCE_MASK		\
284 	(0x1 << HPIPE_MISC_ICP_FORCE_OFFSET)
285 #define HPIPE_MISC_TXDCLK_2X_OFFSET		6
286 #define HPIPE_MISC_TXDCLK_2X_MASK		\
287 	(0x1 << HPIPE_MISC_TXDCLK_2X_OFFSET)
288 #define HPIPE_MISC_CLK500_EN_OFFSET		7
289 #define HPIPE_MISC_CLK500_EN_MASK		\
290 	(0x1 << HPIPE_MISC_CLK500_EN_OFFSET)
291 #define HPIPE_MISC_REFCLK_SEL_OFFSET		10
292 #define HPIPE_MISC_REFCLK_SEL_MASK		\
293 	(0x1 << HPIPE_MISC_REFCLK_SEL_OFFSET)
294 
295 #define HPIPE_RX_CONTROL_1_REG			0x140
296 #define HPIPE_RX_CONTROL_1_RXCLK2X_SEL_OFFSET	11
297 #define HPIPE_RX_CONTROL_1_RXCLK2X_SEL_MASK	\
298 	(0x1 << HPIPE_RX_CONTROL_1_RXCLK2X_SEL_OFFSET)
299 #define HPIPE_RX_CONTROL_1_CLK8T_EN_OFFSET	12
300 #define HPIPE_RX_CONTROL_1_CLK8T_EN_MASK	\
301 	(0x1 << HPIPE_RX_CONTROL_1_CLK8T_EN_OFFSET)
302 
303 #define HPIPE_PWR_CTR_REG			0x148
304 #define HPIPE_PWR_CTR_RST_DFE_OFFSET		0
305 #define HPIPE_PWR_CTR_RST_DFE_MASK		\
306 	(0x1 << HPIPE_PWR_CTR_RST_DFE_OFFSET)
307 #define HPIPE_PWR_CTR_SFT_RST_OFFSET		10
308 #define HPIPE_PWR_CTR_SFT_RST_MASK		\
309 	(0x1 << HPIPE_PWR_CTR_SFT_RST_OFFSET)
310 
311 #define HPIPE_SPD_DIV_FORCE_REG				0x154
312 #define HPIPE_TXDIGCK_DIV_FORCE_OFFSET			7
313 #define HPIPE_TXDIGCK_DIV_FORCE_MASK			\
314 	(0x1 << HPIPE_TXDIGCK_DIV_FORCE_OFFSET)
315 #define HPIPE_SPD_DIV_FORCE_RX_SPD_DIV_OFFSET		8
316 #define HPIPE_SPD_DIV_FORCE_RX_SPD_DIV_MASK		\
317 	(0x3 << HPIPE_SPD_DIV_FORCE_RX_SPD_DIV_OFFSET)
318 #define HPIPE_SPD_DIV_FORCE_RX_SPD_DIV_FORCE_OFFSET	10
319 #define HPIPE_SPD_DIV_FORCE_RX_SPD_DIV_FORCE_MASK	\
320 	(0x1 << HPIPE_SPD_DIV_FORCE_RX_SPD_DIV_FORCE_OFFSET)
321 #define HPIPE_SPD_DIV_FORCE_TX_SPD_DIV_OFFSET		13
322 #define HPIPE_SPD_DIV_FORCE_TX_SPD_DIV_MASK		\
323 	(0x3 << HPIPE_SPD_DIV_FORCE_TX_SPD_DIV_OFFSET)
324 #define HPIPE_SPD_DIV_FORCE_TX_SPD_DIV_FORCE_OFFSET	15
325 #define HPIPE_SPD_DIV_FORCE_TX_SPD_DIV_FORCE_MASK	\
326 	(0x1 << HPIPE_SPD_DIV_FORCE_TX_SPD_DIV_FORCE_OFFSET)
327 
328 #define HPIPE_PLLINTP_REG1			0x150
329 
330 #define HPIPE_SAMPLER_N_PROC_CALIB_CTRL_REG	0x16C
331 #define HPIPE_RX_SAMPLER_OS_GAIN_OFFSET		6
332 #define HPIPE_RX_SAMPLER_OS_GAIN_MASK		\
333 	(0x3 << HPIPE_RX_SAMPLER_OS_GAIN_OFFSET)
334 #define HPIPE_SMAPLER_OFFSET			12
335 #define HPIPE_SMAPLER_MASK			\
336 	(0x1 << HPIPE_SMAPLER_OFFSET)
337 
338 #define HPIPE_TX_REG1_REG			0x174
339 #define HPIPE_TX_REG1_TX_EMPH_RES_OFFSET	5
340 #define HPIPE_TX_REG1_TX_EMPH_RES_MASK		\
341 	(0x3 << HPIPE_TX_REG1_TX_EMPH_RES_OFFSET)
342 #define HPIPE_TX_REG1_SLC_EN_OFFSET		10
343 #define HPIPE_TX_REG1_SLC_EN_MASK		\
344 	(0x3f << HPIPE_TX_REG1_SLC_EN_OFFSET)
345 
346 #define HPIPE_PWR_CTR_DTL_REG				0x184
347 #define HPIPE_PWR_CTR_DTL_SQ_DET_EN_OFFSET		0
348 #define HPIPE_PWR_CTR_DTL_SQ_DET_EN_MASK		\
349 	(0x1 << HPIPE_PWR_CTR_DTL_SQ_DET_EN_OFFSET)
350 #define HPIPE_PWR_CTR_DTL_SQ_PLOOP_EN_OFFSET		1
351 #define HPIPE_PWR_CTR_DTL_SQ_PLOOP_EN_MASK		\
352 	(0x1 << HPIPE_PWR_CTR_DTL_SQ_PLOOP_EN_OFFSET)
353 #define HPIPE_PWR_CTR_DTL_FLOOP_EN_OFFSET		2
354 #define HPIPE_PWR_CTR_DTL_FLOOP_EN_MASK			\
355 	(0x1 << HPIPE_PWR_CTR_DTL_FLOOP_EN_OFFSET)
356 #define HPIPE_PWR_CTR_DTL_CLAMPING_SEL_OFFSET		4
357 #define HPIPE_PWR_CTR_DTL_CLAMPING_SEL_MASK		\
358 	(0x7 << HPIPE_PWR_CTR_DTL_CLAMPING_SEL_OFFSET)
359 #define HPIPE_PWR_CTR_DTL_INTPCLK_DIV_FORCE_OFFSET	10
360 #define HPIPE_PWR_CTR_DTL_INTPCLK_DIV_FORCE_MASK	\
361 	(0x1 << HPIPE_PWR_CTR_DTL_INTPCLK_DIV_FORCE_OFFSET)
362 #define HPIPE_PWR_CTR_DTL_CLK_MODE_OFFSET		12
363 #define HPIPE_PWR_CTR_DTL_CLK_MODE_MASK			\
364 	(0x3 << HPIPE_PWR_CTR_DTL_CLK_MODE_OFFSET)
365 #define HPIPE_PWR_CTR_DTL_CLK_MODE_FORCE_OFFSET		14
366 #define HPIPE_PWR_CTR_DTL_CLK_MODE_FORCE_MASK		\
367 	(1 << HPIPE_PWR_CTR_DTL_CLK_MODE_FORCE_OFFSET)
368 
369 #define HPIPE_PHASE_CONTROL_REG			0x188
370 #define HPIPE_OS_PH_OFFSET_OFFSET		0
371 #define HPIPE_OS_PH_OFFSET_MASK			\
372 	(0x7f << HPIPE_OS_PH_OFFSET_OFFSET)
373 #define HPIPE_OS_PH_OFFSET_FORCE_OFFSET		7
374 #define HPIPE_OS_PH_OFFSET_FORCE_MASK		\
375 	(0x1 << HPIPE_OS_PH_OFFSET_FORCE_OFFSET)
376 #define HPIPE_OS_PH_VALID_OFFSET		8
377 #define HPIPE_OS_PH_VALID_MASK			\
378 	(0x1 << HPIPE_OS_PH_VALID_OFFSET)
379 
380 #define HPIPE_FRAME_DETECT_CTRL_0_REG			0x214
381 #define HPIPE_TRAIN_PAT_NUM_OFFSET			0x7
382 #define HPIPE_TRAIN_PAT_NUM_MASK			\
383 	(0x1FF << HPIPE_TRAIN_PAT_NUM_OFFSET)
384 
385 #define HPIPE_FRAME_DETECT_CTRL_3_REG			0x220
386 #define HPIPE_PATTERN_LOCK_LOST_TIMEOUT_EN_OFFSET	12
387 #define HPIPE_PATTERN_LOCK_LOST_TIMEOUT_EN_MASK		\
388 	(0x1 << HPIPE_PATTERN_LOCK_LOST_TIMEOUT_EN_OFFSET)
389 
390 #define HPIPE_DME_REG					0x228
391 #define HPIPE_DME_ETHERNET_MODE_OFFSET			7
392 #define HPIPE_DME_ETHERNET_MODE_MASK			\
393 	(0x1 << HPIPE_DME_ETHERNET_MODE_OFFSET)
394 
395 #define HPIPE_TX_TRAIN_CTRL_0_REG		0x268
396 #define HPIPE_TX_TRAIN_P2P_HOLD_OFFSET		15
397 #define HPIPE_TX_TRAIN_P2P_HOLD_MASK		\
398 	(0x1 << HPIPE_TX_TRAIN_P2P_HOLD_OFFSET)
399 
400 #define HPIPE_TX_TRAIN_CTRL_REG			0x26C
401 #define HPIPE_TX_TRAIN_CTRL_G1_OFFSET		0
402 #define HPIPE_TX_TRAIN_CTRL_G1_MASK		\
403 	(0x1 << HPIPE_TX_TRAIN_CTRL_G1_OFFSET)
404 #define HPIPE_TX_TRAIN_CTRL_GN1_OFFSET		1
405 #define HPIPE_TX_TRAIN_CTRL_GN1_MASK		\
406 	(0x1 << HPIPE_TX_TRAIN_CTRL_GN1_OFFSET)
407 #define HPIPE_TX_TRAIN_CTRL_G0_OFFSET		2
408 #define HPIPE_TX_TRAIN_CTRL_G0_MASK		\
409 	(0x1 << HPIPE_TX_TRAIN_CTRL_G0_OFFSET)
410 
411 #define HPIPE_TX_TRAIN_CTRL_4_REG		0x278
412 #define HPIPE_TRX_TRAIN_TIMER_OFFSET		0
413 #define HPIPE_TRX_TRAIN_TIMER_MASK		\
414 	(0x3FF << HPIPE_TRX_TRAIN_TIMER_OFFSET)
415 
416 #define HPIPE_PCIE_REG1				0x288
417 #define HPIPE_PCIE_REG3				0x290
418 
419 #define HPIPE_TX_TRAIN_CTRL_5_REG		0x2A4
420 #define HPIPE_RX_TRAIN_TIMER_OFFSET		0
421 #define HPIPE_RX_TRAIN_TIMER_MASK		\
422 	(0x3ff << HPIPE_RX_TRAIN_TIMER_OFFSET)
423 #define HPIPE_TX_TRAIN_START_SQ_EN_OFFSET	11
424 #define HPIPE_TX_TRAIN_START_SQ_EN_MASK		\
425 	(0x1 << HPIPE_TX_TRAIN_START_SQ_EN_OFFSET)
426 #define HPIPE_TX_TRAIN_START_FRM_DET_EN_OFFSET	12
427 #define HPIPE_TX_TRAIN_START_FRM_DET_EN_MASK	\
428 	(0x1 << HPIPE_TX_TRAIN_START_FRM_DET_EN_OFFSET)
429 #define HPIPE_TX_TRAIN_START_FRM_LOCK_EN_OFFSET	13
430 #define HPIPE_TX_TRAIN_START_FRM_LOCK_EN_MASK	\
431 	(0x1 << HPIPE_TX_TRAIN_START_FRM_LOCK_EN_OFFSET)
432 #define HPIPE_TX_TRAIN_WAIT_TIME_EN_OFFSET	14
433 #define HPIPE_TX_TRAIN_WAIT_TIME_EN_MASK	\
434 	(0x1 << HPIPE_TX_TRAIN_WAIT_TIME_EN_OFFSET)
435 
436 #define HPIPE_TX_TRAIN_REG			0x31C
437 #define HPIPE_TX_TRAIN_CHK_INIT_OFFSET		4
438 #define HPIPE_TX_TRAIN_CHK_INIT_MASK		\
439 	(0x1 << HPIPE_TX_TRAIN_CHK_INIT_OFFSET)
440 #define HPIPE_TX_TRAIN_COE_FM_PIN_PCIE3_OFFSET	7
441 #define HPIPE_TX_TRAIN_COE_FM_PIN_PCIE3_MASK	\
442 	(0x1 << HPIPE_TX_TRAIN_COE_FM_PIN_PCIE3_OFFSET)
443 #define HPIPE_TX_TRAIN_16BIT_AUTO_EN_OFFSET	8
444 #define HPIPE_TX_TRAIN_16BIT_AUTO_EN_MASK	\
445 	(0x1 << HPIPE_TX_TRAIN_16BIT_AUTO_EN_OFFSET)
446 #define HPIPE_TX_TRAIN_PAT_SEL_OFFSET		9
447 #define HPIPE_TX_TRAIN_PAT_SEL_MASK		\
448 	(0x1 << HPIPE_TX_TRAIN_PAT_SEL_OFFSET)
449 
450 #define HPIPE_CDR_CONTROL_REG			0x418
451 #define HPIPE_CDR_RX_MAX_DFE_ADAPT_1_OFFSET	12
452 #define HPIPE_CDR_RX_MAX_DFE_ADAPT_1_MASK	\
453 	(0x3 << HPIPE_CDR_RX_MAX_DFE_ADAPT_1_OFFSET)
454 #define HPIPE_CDR_MAX_DFE_ADAPT_0_OFFSET	9
455 #define HPIPE_CDR_MAX_DFE_ADAPT_0_MASK		\
456 	(0x7 << HPIPE_CDR_MAX_DFE_ADAPT_0_OFFSET)
457 #define HPIPE_CDR_MAX_DFE_ADAPT_1_OFFSET	6
458 #define HPIPE_CDR_MAX_DFE_ADAPT_1_MASK		\
459 	(0x7 << HPIPE_CDR_MAX_DFE_ADAPT_1_OFFSET)
460 
461 #define HPIPE_TX_TRAIN_CTRL_11_REG		0x438
462 #define HPIPE_TX_STATUS_CHECK_MODE_OFFSET	6
463 #define HPIPE_TX_TX_STATUS_CHECK_MODE_MASK	\
464 	(0x1 << HPIPE_TX_STATUS_CHECK_MODE_OFFSET)
465 #define HPIPE_TX_NUM_OF_PRESET_OFFSET		10
466 #define HPIPE_TX_NUM_OF_PRESET_MASK		\
467 	(0x7 << HPIPE_TX_NUM_OF_PRESET_OFFSET)
468 #define HPIPE_TX_SWEEP_PRESET_EN_OFFSET		15
469 #define HPIPE_TX_SWEEP_PRESET_EN_MASK		\
470 	(0x1 << HPIPE_TX_SWEEP_PRESET_EN_OFFSET)
471 
472 #define HPIPE_G1_SETTINGS_3_REG				0x440
473 #define HPIPE_G1_SETTINGS_3_G1_FFE_CAP_SEL_OFFSET	0
474 #define HPIPE_G1_SETTINGS_3_G1_FFE_CAP_SEL_MASK		\
475 	(0xf << HPIPE_G1_SETTINGS_3_G1_FFE_CAP_SEL_OFFSET)
476 #define HPIPE_G1_SETTINGS_3_G1_FFE_RES_SEL_OFFSET	4
477 #define HPIPE_G1_SETTINGS_3_G1_FFE_RES_SEL_MASK		\
478 	(0x7 << HPIPE_G1_SETTINGS_3_G1_FFE_RES_SEL_OFFSET)
479 #define HPIPE_G1_SETTINGS_3_G1_FFE_SETTING_FORCE_OFFSET	7
480 #define HPIPE_G1_SETTINGS_3_G1_FFE_SETTING_FORCE_MASK	\
481 	(0x1 << HPIPE_G1_SETTINGS_3_G1_FFE_SETTING_FORCE_OFFSET)
482 #define HPIPE_G1_SETTINGS_3_G1_FBCK_SEL_OFFSET		9
483 #define HPIPE_G1_SETTINGS_3_G1_FBCK_SEL_MASK		\
484 	(0x1 << HPIPE_G1_SETTINGS_3_G1_FBCK_SEL_OFFSET)
485 #define HPIPE_G1_SETTINGS_3_G1_FFE_DEG_RES_LEVEL_OFFSET	12
486 #define HPIPE_G1_SETTINGS_3_G1_FFE_DEG_RES_LEVEL_MASK	\
487 	(0x3 << HPIPE_G1_SETTINGS_3_G1_FFE_DEG_RES_LEVEL_OFFSET)
488 #define HPIPE_G1_SETTINGS_3_G1_FFE_LOAD_RES_LEVEL_OFFSET	14
489 #define HPIPE_G1_SETTINGS_3_G1_FFE_LOAD_RES_LEVEL_MASK	\
490 	(0x3 << HPIPE_G1_SETTINGS_3_G1_FFE_LOAD_RES_LEVEL_OFFSET)
491 
492 #define HPIPE_G1_SETTINGS_4_REG			0x444
493 #define HPIPE_G1_SETTINGS_4_G1_DFE_RES_OFFSET	8
494 #define HPIPE_G1_SETTINGS_4_G1_DFE_RES_MASK	\
495 	(0x3 << HPIPE_G1_SETTINGS_4_G1_DFE_RES_OFFSET)
496 
497 #define HPIPE_G2_SETTINGS_3_REG			0x448
498 
499 #define HPIPE_G2_SETTINGS_4_REG			0x44c
500 #define HPIPE_G2_DFE_RES_OFFSET			8
501 #define HPIPE_G2_DFE_RES_MASK			\
502 	(0x3 << HPIPE_G2_DFE_RES_OFFSET)
503 
504 #define HPIPE_G3_SETTING_3_REG			0x450
505 #define HPIPE_G3_FFE_CAP_SEL_OFFSET		0
506 #define HPIPE_G3_FFE_CAP_SEL_MASK		\
507 	(0xf << HPIPE_G3_FFE_CAP_SEL_OFFSET)
508 #define HPIPE_G3_FFE_RES_SEL_OFFSET		4
509 #define HPIPE_G3_FFE_RES_SEL_MASK		\
510 	(0x7 << HPIPE_G3_FFE_RES_SEL_OFFSET)
511 #define HPIPE_G3_FFE_SETTING_FORCE_OFFSET	7
512 #define HPIPE_G3_FFE_SETTING_FORCE_MASK		\
513 	(0x1 << HPIPE_G3_FFE_SETTING_FORCE_OFFSET)
514 #define HPIPE_G3_FFE_DEG_RES_LEVEL_OFFSET	12
515 #define HPIPE_G3_FFE_DEG_RES_LEVEL_MASK		\
516 	(0x3 << HPIPE_G3_FFE_DEG_RES_LEVEL_OFFSET)
517 #define HPIPE_G3_FFE_LOAD_RES_LEVEL_OFFSET	14
518 #define HPIPE_G3_FFE_LOAD_RES_LEVEL_MASK	\
519 	(0x3 << HPIPE_G3_FFE_LOAD_RES_LEVEL_OFFSET)
520 
521 #define HPIPE_G3_SETTING_4_REG			0x454
522 #define HPIPE_G3_DFE_RES_OFFSET			8
523 #define HPIPE_G3_DFE_RES_MASK			\
524 	(0x3 << HPIPE_G3_DFE_RES_OFFSET)
525 
526 #define HPIPE_TX_PRESET_INDEX_REG		0x468
527 #define HPIPE_TX_PRESET_INDEX_OFFSET		0
528 #define HPIPE_TX_PRESET_INDEX_MASK		\
529 	(0xf << HPIPE_TX_PRESET_INDEX_OFFSET)
530 
531 #define HPIPE_DFE_CONTROL_REG			0x470
532 #define HPIPE_DFE_TX_MAX_DFE_ADAPT_OFFSET	14
533 #define HPIPE_DFE_TX_MAX_DFE_ADAPT_MASK		\
534 	(0x3 << HPIPE_DFE_TX_MAX_DFE_ADAPT_OFFSET)
535 
536 #define HPIPE_DFE_CTRL_28_REG			0x49C
537 #define HPIPE_DFE_CTRL_28_PIPE4_OFFSET		7
538 #define HPIPE_DFE_CTRL_28_PIPE4_MASK		\
539 	(0x1 << HPIPE_DFE_CTRL_28_PIPE4_OFFSET)
540 
541 #define HPIPE_G1_SETTING_5_REG			0x538
542 #define HPIPE_G1_SETTING_5_G1_ICP_OFFSET	0
543 #define HPIPE_G1_SETTING_5_G1_ICP_MASK		\
544 	(0xf << HPIPE_G1_SETTING_5_G1_ICP_OFFSET)
545 
546 #define HPIPE_G3_SETTING_5_REG			0x548
547 #define HPIPE_G3_SETTING_5_G3_ICP_OFFSET	0
548 #define HPIPE_G3_SETTING_5_G3_ICP_MASK		\
549 	(0xf << HPIPE_G3_SETTING_5_G3_ICP_OFFSET)
550 
551 #define HPIPE_LANE_CONFIG0_REG			0x600
552 #define HPIPE_LANE_CONFIG0_TXDEEMPH0_OFFSET	0
553 #define HPIPE_LANE_CONFIG0_TXDEEMPH0_MASK	\
554 	(0x1 << HPIPE_LANE_CONFIG0_TXDEEMPH0_OFFSET)
555 
556 #define HPIPE_LANE_CONFIG1_REG			0x604
557 #define HPIPE_LANE_CONFIG1_MAX_PLL_OFFSET	9
558 #define HPIPE_LANE_CONFIG1_MAX_PLL_MASK		\
559 	(0x1 << HPIPE_LANE_CONFIG1_MAX_PLL_OFFSET)
560 #define HPIPE_LANE_CONFIG1_GEN2_PLL_OFFSET	10
561 #define HPIPE_LANE_CONFIG1_GEN2_PLL_MASK	\
562 	(0x1 << HPIPE_LANE_CONFIG1_GEN2_PLL_OFFSET)
563 
564 #define HPIPE_LANE_STATUS1_REG			0x60C
565 #define HPIPE_LANE_STATUS1_PCLK_EN_OFFSET	0
566 #define HPIPE_LANE_STATUS1_PCLK_EN_MASK		\
567 	(0x1 << HPIPE_LANE_STATUS1_PCLK_EN_OFFSET)
568 
569 #define HPIPE_LANE_CFG4_REG                     0x620
570 #define HPIPE_LANE_CFG4_DFE_CTRL_OFFSET		0
571 #define HPIPE_LANE_CFG4_DFE_CTRL_MASK		\
572 	(0x7 << HPIPE_LANE_CFG4_DFE_CTRL_OFFSET)
573 #define HPIPE_LANE_CFG4_DFE_EN_SEL_OFFSET	3
574 #define HPIPE_LANE_CFG4_DFE_EN_SEL_MASK		\
575 	(0x1 << HPIPE_LANE_CFG4_DFE_EN_SEL_OFFSET)
576 #define HPIPE_LANE_CFG4_DFE_OVER_OFFSET		6
577 #define HPIPE_LANE_CFG4_DFE_OVER_MASK		\
578 	(0x1 << HPIPE_LANE_CFG4_DFE_OVER_OFFSET)
579 #define HPIPE_LANE_CFG4_SSC_CTRL_OFFSET		7
580 #define HPIPE_LANE_CFG4_SSC_CTRL_MASK		\
581 	(0x1 << HPIPE_LANE_CFG4_SSC_CTRL_OFFSET)
582 
583 #define HPIPE_LANE_EQU_CONFIG_0_REG		0x69C
584 #define HPIPE_CFG_PHY_RC_EP_OFFSET		12
585 #define HPIPE_CFG_PHY_RC_EP_MASK		\
586 	(0x1 << HPIPE_CFG_PHY_RC_EP_OFFSET)
587 
588 #define HPIPE_LANE_EQ_CFG1_REG			0x6a0
589 #define HPIPE_CFG_UPDATE_POLARITY_OFFSET	12
590 #define HPIPE_CFG_UPDATE_POLARITY_MASK		\
591 	(0x1 << HPIPE_CFG_UPDATE_POLARITY_OFFSET)
592 
593 #define HPIPE_LANE_EQ_REMOTE_SETTING_REG	0x6f8
594 #define HPIPE_LANE_CFG_FOM_DIRN_OVERRIDE_OFFSET	0
595 #define HPIPE_LANE_CFG_FOM_DIRN_OVERRIDE_MASK	\
596 	(0x1 << HPIPE_LANE_CFG_FOM_DIRN_OVERRIDE_OFFSET)
597 #define HPIPE_LANE_CFG_FOM_ONLY_MODE_OFFFSET	1
598 #define HPIPE_LANE_CFG_FOM_ONLY_MODE_MASK	\
599 	(0x1 << HPIPE_LANE_CFG_FOM_ONLY_MODE_OFFFSET)
600 #define HPIPE_LANE_CFG_FOM_PRESET_VECTOR_OFFSET	2
601 #define HPIPE_LANE_CFG_FOM_PRESET_VECTOR_MASK	\
602 	(0xf << HPIPE_LANE_CFG_FOM_PRESET_VECTOR_OFFSET)
603 
604 #define HPIPE_RST_CLK_CTRL_REG			0x704
605 #define HPIPE_RST_CLK_CTRL_PIPE_RST_OFFSET	0
606 #define HPIPE_RST_CLK_CTRL_PIPE_RST_MASK	\
607 	(0x1 << HPIPE_RST_CLK_CTRL_PIPE_RST_OFFSET)
608 #define HPIPE_RST_CLK_CTRL_FIXED_PCLK_OFFSET	2
609 #define HPIPE_RST_CLK_CTRL_FIXED_PCLK_MASK	\
610 	(0x1 << HPIPE_RST_CLK_CTRL_FIXED_PCLK_OFFSET)
611 #define HPIPE_RST_CLK_CTRL_PIPE_WIDTH_OFFSET	3
612 #define HPIPE_RST_CLK_CTRL_PIPE_WIDTH_MASK	\
613 	(0x1 << HPIPE_RST_CLK_CTRL_PIPE_WIDTH_OFFSET)
614 #define HPIPE_RST_CLK_CTRL_CORE_FREQ_SEL_OFFSET	9
615 #define HPIPE_RST_CLK_CTRL_CORE_FREQ_SEL_MASK	\
616 	(0x1 << HPIPE_RST_CLK_CTRL_CORE_FREQ_SEL_OFFSET)
617 
618 #define HPIPE_TST_MODE_CTRL_REG			0x708
619 #define HPIPE_TST_MODE_CTRL_MODE_MARGIN_OFFSET	2
620 #define HPIPE_TST_MODE_CTRL_MODE_MARGIN_MASK	\
621 	(0x1 << HPIPE_TST_MODE_CTRL_MODE_MARGIN_OFFSET)
622 
623 #define HPIPE_CLK_SRC_LO_REG			0x70c
624 #define HPIPE_CLK_SRC_LO_BUNDLE_PERIOD_SEL_OFFSET 1
625 #define HPIPE_CLK_SRC_LO_BUNDLE_PERIOD_SEL_MASK	\
626 	(0x1 << HPIPE_CLK_SRC_LO_BUNDLE_PERIOD_SEL_OFFSET)
627 #define HPIPE_CLK_SRC_LO_BUNDLE_PERIOD_SCALE_OFFSET 2
628 #define HPIPE_CLK_SRC_LO_BUNDLE_PERIOD_SCALE_MASK \
629 	(0x3 << HPIPE_CLK_SRC_LO_BUNDLE_PERIOD_SCALE_OFFSET)
630 #define HPIPE_CLK_SRC_LO_PLL_RDY_DL_OFFSET	5
631 #define HPIPE_CLK_SRC_LO_PLL_RDY_DL_MASK	\
632 	(0x7 << HPIPE_CLK_SRC_LO_PLL_RDY_DL_OFFSET)
633 
634 #define HPIPE_CLK_SRC_HI_REG			0x710
635 #define HPIPE_CLK_SRC_HI_LANE_STRT_OFFSET	0
636 #define HPIPE_CLK_SRC_HI_LANE_STRT_MASK		\
637 	(0x1 << HPIPE_CLK_SRC_HI_LANE_STRT_OFFSET)
638 #define HPIPE_CLK_SRC_HI_LANE_BREAK_OFFSET	1
639 #define HPIPE_CLK_SRC_HI_LANE_BREAK_MASK	\
640 	(0x1 << HPIPE_CLK_SRC_HI_LANE_BREAK_OFFSET)
641 #define HPIPE_CLK_SRC_HI_LANE_MASTER_OFFSET	2
642 #define HPIPE_CLK_SRC_HI_LANE_MASTER_MASK	\
643 	(0x1 << HPIPE_CLK_SRC_HI_LANE_MASTER_OFFSET)
644 #define HPIPE_CLK_SRC_HI_MODE_PIPE_OFFSET	7
645 #define HPIPE_CLK_SRC_HI_MODE_PIPE_MASK		\
646 	(0x1 << HPIPE_CLK_SRC_HI_MODE_PIPE_OFFSET)
647 
648 #define HPIPE_GLOBAL_MISC_CTRL                  0x718
649 #define HPIPE_GLOBAL_PM_CTRL                    0x740
650 #define HPIPE_GLOBAL_PM_RXDLOZ_WAIT_OFFSET	0
651 #define HPIPE_GLOBAL_PM_RXDLOZ_WAIT_MASK	\
652 	(0xFF << HPIPE_GLOBAL_PM_RXDLOZ_WAIT_OFFSET)
653 
654 #endif /* _COMPHY_HPIPE_H_ */
655 
656