blob: cf2f986281eac295ffa5346ca48b9f1f763a822d [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Stefan Roese8f64e262016-05-23 11:12:05 +02002/*
3 * Copyright (C) 2015-2016 Marvell International Ltd.
Stefan Roese8f64e262016-05-23 11:12:05 +02004 */
5
6#ifndef _COMPHY_HPIPE_H_
7#define _COMPHY_HPIPE_H_
8
Igal Liberman6795a662021-03-23 11:57:57 +01009#define MAX_NUM_OF_FFE 8
10#define RX_TRAINING_TIMEOUT 500
11
Stefan Roese8f64e262016-05-23 11:12:05 +020012/* SerDes IP register */
13#define SD_EXTERNAL_CONFIG0_REG 0
14#define SD_EXTERNAL_CONFIG0_SD_PU_PLL_OFFSET 1
15#define SD_EXTERNAL_CONFIG0_SD_PU_PLL_MASK \
16 (1 << SD_EXTERNAL_CONFIG0_SD_PU_PLL_OFFSET)
17#define SD_EXTERNAL_CONFIG0_SD_PHY_GEN_RX_OFFSET 3
18#define SD_EXTERNAL_CONFIG0_SD_PHY_GEN_RX_MASK \
19 (0xf << SD_EXTERNAL_CONFIG0_SD_PHY_GEN_RX_OFFSET)
20#define SD_EXTERNAL_CONFIG0_SD_PHY_GEN_TX_OFFSET 7
21#define SD_EXTERNAL_CONFIG0_SD_PHY_GEN_TX_MASK \
22 (0xf << SD_EXTERNAL_CONFIG0_SD_PHY_GEN_TX_OFFSET)
23#define SD_EXTERNAL_CONFIG0_SD_PU_RX_OFFSET 11
24#define SD_EXTERNAL_CONFIG0_SD_PU_RX_MASK \
25 (1 << SD_EXTERNAL_CONFIG0_SD_PU_RX_OFFSET)
26#define SD_EXTERNAL_CONFIG0_SD_PU_TX_OFFSET 12
27#define SD_EXTERNAL_CONFIG0_SD_PU_TX_MASK \
28 (1 << SD_EXTERNAL_CONFIG0_SD_PU_TX_OFFSET)
29#define SD_EXTERNAL_CONFIG0_HALF_BUS_MODE_OFFSET 14
30#define SD_EXTERNAL_CONFIG0_HALF_BUS_MODE_MASK \
31 (1 << SD_EXTERNAL_CONFIG0_HALF_BUS_MODE_OFFSET)
32#define SD_EXTERNAL_CONFIG0_MEDIA_MODE_OFFSET 15
33#define SD_EXTERNAL_CONFIG0_MEDIA_MODE_MASK \
34 (0x1 << SD_EXTERNAL_CONFIG0_MEDIA_MODE_OFFSET)
35
36#define SD_EXTERNAL_CONFIG1_REG 0x4
37#define SD_EXTERNAL_CONFIG1_RESET_IN_OFFSET 3
38#define SD_EXTERNAL_CONFIG1_RESET_IN_MASK \
39 (0x1 << SD_EXTERNAL_CONFIG1_RESET_IN_OFFSET)
40#define SD_EXTERNAL_CONFIG1_RX_INIT_OFFSET 4
41#define SD_EXTERNAL_CONFIG1_RX_INIT_MASK \
42 (0x1 << SD_EXTERNAL_CONFIG1_RX_INIT_OFFSET)
43#define SD_EXTERNAL_CONFIG1_RESET_CORE_OFFSET 5
44#define SD_EXTERNAL_CONFIG1_RESET_CORE_MASK \
45 (0x1 << SD_EXTERNAL_CONFIG1_RESET_CORE_OFFSET)
46#define SD_EXTERNAL_CONFIG1_RF_RESET_IN_OFFSET 6
47#define SD_EXTERNAL_CONFIG1_RF_RESET_IN_MASK \
48 (0x1 << SD_EXTERNAL_CONFIG1_RF_RESET_IN_OFFSET)
49
50#define SD_EXTERNAL_CONFIG2_REG 0x8
51#define SD_EXTERNAL_CONFIG2_PIN_DFE_EN_OFFSET 4
52#define SD_EXTERNAL_CONFIG2_PIN_DFE_EN_MASK \
53 (0x1 << SD_EXTERNAL_CONFIG2_PIN_DFE_EN_OFFSET)
Igal Liberman547a98f2017-04-24 18:45:26 +030054#define SD_EXTERNAL_CONFIG2_SSC_ENABLE_OFFSET 7
55#define SD_EXTERNAL_CONFIG2_SSC_ENABLE_MASK \
56 (0x1 << SD_EXTERNAL_CONFIG2_SSC_ENABLE_OFFSET)
Stefan Roese8f64e262016-05-23 11:12:05 +020057
Igal Liberman6795a662021-03-23 11:57:57 +010058#define SD_EXTERNAL_STATUS_REG 0xc
59#define SD_EXTERNAL_STATUS_START_RX_TRAINING_OFFSET 7
60#define SD_EXTERNAL_STATUS_START_RX_TRAINING_MASK \
61 (1 << SD_EXTERNAL_STATUS_START_RX_TRAINING_OFFSET)
62
Stefan Roese8f64e262016-05-23 11:12:05 +020063#define SD_EXTERNAL_STATUS0_REG 0x18
64#define SD_EXTERNAL_STATUS0_PLL_TX_OFFSET 2
65#define SD_EXTERNAL_STATUS0_PLL_TX_MASK \
66 (0x1 << SD_EXTERNAL_STATUS0_PLL_TX_OFFSET)
67#define SD_EXTERNAL_STATUS0_PLL_RX_OFFSET 3
68#define SD_EXTERNAL_STATUS0_PLL_RX_MASK \
69 (0x1 << SD_EXTERNAL_STATUS0_PLL_RX_OFFSET)
70#define SD_EXTERNAL_STATUS0_RX_INIT_OFFSET 4
71#define SD_EXTERNAL_STATUS0_RX_INIT_MASK \
72 (0x1 << SD_EXTERNAL_STATUS0_RX_INIT_OFFSET)
73#define SD_EXTERNAL_STATUS0_RF_RESET_IN_OFFSET 6
74#define SD_EXTERNAL_STATUS0_RF_RESET_IN_MASK \
75 (0x1 << SD_EXTERNAL_STATUS0_RF_RESET_IN_OFFSET)
76
Igal Liberman6795a662021-03-23 11:57:57 +010077#define SD_EXTERNAL_STATUS1_REG 0x1c
78#define SD_EXTERNAL_STATUS1_REG_RX_TRAIN_COMP_OFFSET 0
79#define SD_EXTERNAL_STATUS1_REG_RX_TRAIN_COMP_MASK \
80 (1 << SD_EXTERNAL_STATUS1_REG_RX_TRAIN_COMP_OFFSET)
81#define SD_EXTERNAL_STATUS1_REG_RX_TRAIN_FAILED_OFFSET 1
82#define SD_EXTERNAL_STATUS1_REG_RX_TRAIN_FAILED_MASK \
83 (1 << SD_EXTERNAL_STATUS1_REG_RX_TRAIN_FAILED_OFFSET)
84
Stefan Roese8f64e262016-05-23 11:12:05 +020085/* HPIPE register */
86#define HPIPE_PWR_PLL_REG 0x4
87#define HPIPE_PWR_PLL_REF_FREQ_OFFSET 0
88#define HPIPE_PWR_PLL_REF_FREQ_MASK \
89 (0x1f << HPIPE_PWR_PLL_REF_FREQ_OFFSET)
90#define HPIPE_PWR_PLL_PHY_MODE_OFFSET 5
91#define HPIPE_PWR_PLL_PHY_MODE_MASK \
92 (0x7 << HPIPE_PWR_PLL_PHY_MODE_OFFSET)
93
94#define HPIPE_KVCO_CALIB_CTRL_REG 0x8
95#define HPIPE_KVCO_CALIB_CTRL_MAX_PLL_OFFSET 12
96#define HPIPE_KVCO_CALIB_CTRL_MAX_PLL_MASK \
97 (0x1 << HPIPE_KVCO_CALIB_CTRL_MAX_PLL_OFFSET)
98
Stefan Roese648391c2016-08-30 16:48:20 +020099#define HPIPE_CAL_REG1_REG 0xc
100#define HPIPE_CAL_REG_1_EXT_TXIMP_OFFSET 10
101#define HPIPE_CAL_REG_1_EXT_TXIMP_MASK \
102 (0x1f << HPIPE_CAL_REG_1_EXT_TXIMP_OFFSET)
103#define HPIPE_CAL_REG_1_EXT_TXIMP_EN_OFFSET 15
104#define HPIPE_CAL_REG_1_EXT_TXIMP_EN_MASK \
105 (0x1 << HPIPE_CAL_REG_1_EXT_TXIMP_EN_OFFSET)
106
Igal Liberman6795a662021-03-23 11:57:57 +0100107#define HPIPE_SQUELCH_FFE_SETTING_REG 0x18
108#define HPIPE_SQUELCH_THRESH_IN_OFFSET 8
109#define HPIPE_SQUELCH_THRESH_IN_MASK \
110 (0xf << HPIPE_SQUELCH_THRESH_IN_OFFSET)
111#define HPIPE_SQUELCH_DETECTED_OFFSET 14
112#define HPIPE_SQUELCH_DETECTED_MASK \
113 (0x1 << HPIPE_SQUELCH_DETECTED_OFFSET)
Stefan Roese8f64e262016-05-23 11:12:05 +0200114
115#define HPIPE_DFE_REG0 0x01C
116#define HPIPE_DFE_RES_FORCE_OFFSET 15
117#define HPIPE_DFE_RES_FORCE_MASK \
118 (0x1 << HPIPE_DFE_RES_FORCE_OFFSET)
119
120#define HPIPE_DFE_F3_F5_REG 0x028
121#define HPIPE_DFE_F3_F5_DFE_EN_OFFSET 14
122#define HPIPE_DFE_F3_F5_DFE_EN_MASK \
123 (0x1 << HPIPE_DFE_F3_F5_DFE_EN_OFFSET)
124#define HPIPE_DFE_F3_F5_DFE_CTRL_OFFSET 15
125#define HPIPE_DFE_F3_F5_DFE_CTRL_MASK \
126 (0x1 << HPIPE_DFE_F3_F5_DFE_CTRL_OFFSET)
127
128#define HPIPE_G1_SET_0_REG 0x034
Stefan Roese648391c2016-08-30 16:48:20 +0200129#define HPIPE_G1_SET_0_G1_TX_AMP_OFFSET 1
130#define HPIPE_G1_SET_0_G1_TX_AMP_MASK \
131 (0x1f << HPIPE_G1_SET_0_G1_TX_AMP_OFFSET)
Igal Liberman547a98f2017-04-24 18:45:26 +0300132#define HPIPE_G1_SET_0_G1_TX_AMP_ADJ_OFFSET 6
133#define HPIPE_G1_SET_0_G1_TX_AMP_ADJ_MASK \
134 (0x1 << HPIPE_G1_SET_0_G1_TX_AMP_ADJ_OFFSET)
Stefan Roese8f64e262016-05-23 11:12:05 +0200135#define HPIPE_G1_SET_0_G1_TX_EMPH1_OFFSET 7
136#define HPIPE_G1_SET_0_G1_TX_EMPH1_MASK \
137 (0xf << HPIPE_G1_SET_0_G1_TX_EMPH1_OFFSET)
Igal Liberman547a98f2017-04-24 18:45:26 +0300138#define HPIPE_G1_SET_0_G1_TX_EMPH1_EN_OFFSET 11
139#define HPIPE_G1_SET_0_G1_TX_EMPH1_EN_MASK \
140 (0x1 << HPIPE_G1_SET_0_G1_TX_EMPH1_EN_OFFSET)
Stefan Roese8f64e262016-05-23 11:12:05 +0200141
142#define HPIPE_G1_SET_1_REG 0x038
143#define HPIPE_G1_SET_1_G1_RX_SELMUPI_OFFSET 0
144#define HPIPE_G1_SET_1_G1_RX_SELMUPI_MASK \
145 (0x7 << HPIPE_G1_SET_1_G1_RX_SELMUPI_OFFSET)
146#define HPIPE_G1_SET_1_G1_RX_SELMUPP_OFFSET 3
147#define HPIPE_G1_SET_1_G1_RX_SELMUPP_MASK \
148 (0x7 << HPIPE_G1_SET_1_G1_RX_SELMUPP_OFFSET)
Igal Liberman547a98f2017-04-24 18:45:26 +0300149#define HPIPE_G1_SET_1_G1_RX_SELMUFI_OFFSET 6
150#define HPIPE_G1_SET_1_G1_RX_SELMUFI_MASK \
151 (0x3 << HPIPE_G1_SET_1_G1_RX_SELMUFI_OFFSET)
152#define HPIPE_G1_SET_1_G1_RX_SELMUFF_OFFSET 8
153#define HPIPE_G1_SET_1_G1_RX_SELMUFF_MASK \
154 (0x3 << HPIPE_G1_SET_1_G1_RX_SELMUFF_OFFSET)
Stefan Roese8f64e262016-05-23 11:12:05 +0200155#define HPIPE_G1_SET_1_G1_RX_DFE_EN_OFFSET 10
156#define HPIPE_G1_SET_1_G1_RX_DFE_EN_MASK \
157 (0x1 << HPIPE_G1_SET_1_G1_RX_DFE_EN_OFFSET)
158
Igal Liberman547a98f2017-04-24 18:45:26 +0300159#define HPIPE_G1_SET_1_G1_RX_DIGCK_DIV_OFFSET 11
160#define HPIPE_G1_SET_1_G1_RX_DIGCK_DIV_MASK \
161 (0x3 << HPIPE_G1_SET_1_G1_RX_DIGCK_DIV_OFFSET)
Stefan Roese8f64e262016-05-23 11:12:05 +0200162
Igal Liberman547a98f2017-04-24 18:45:26 +0300163#define HPIPE_G2_SET_0_REG 0x3c
164#define HPIPE_G2_SET_0_G2_TX_AMP_OFFSET 1
165#define HPIPE_G2_SET_0_G2_TX_AMP_MASK \
166 (0x1f << HPIPE_G2_SET_0_G2_TX_AMP_OFFSET)
167#define HPIPE_G2_SET_0_G2_TX_AMP_ADJ_OFFSET 6
168#define HPIPE_G2_SET_0_G2_TX_AMP_ADJ_MASK \
169 (0x1 << HPIPE_G2_SET_0_G2_TX_AMP_ADJ_OFFSET)
170#define HPIPE_G2_SET_0_G2_TX_EMPH1_OFFSET 7
171#define HPIPE_G2_SET_0_G2_TX_EMPH1_MASK \
172 (0xf << HPIPE_G2_SET_0_G2_TX_EMPH1_OFFSET)
173#define HPIPE_G2_SET_0_G2_TX_EMPH1_EN_OFFSET 11
174#define HPIPE_G2_SET_0_G2_TX_EMPH1_EN_MASK \
175 (0x1 << HPIPE_G2_SET_0_G2_TX_EMPH1_EN_OFFSET)
176
177#define HPIPE_G2_SET_1_REG 0x040
178#define HPIPE_G2_SET_1_G2_RX_SELMUPI_OFFSET 0
179#define HPIPE_G2_SET_1_G2_RX_SELMUPI_MASK \
180 (0x7 << HPIPE_G2_SET_1_G2_RX_SELMUPI_OFFSET)
181#define HPIPE_G2_SET_1_G2_RX_SELMUPP_OFFSET 3
182#define HPIPE_G2_SET_1_G2_RX_SELMUPP_MASK \
183 (0x7 << HPIPE_G2_SET_1_G2_RX_SELMUPP_OFFSET)
184#define HPIPE_G2_SET_1_G2_RX_SELMUFI_OFFSET 6
185#define HPIPE_G2_SET_1_G2_RX_SELMUFI_MASK \
186 (0x3 << HPIPE_G2_SET_1_G2_RX_SELMUFI_OFFSET)
187#define HPIPE_G2_SET_1_G2_RX_SELMUFF_OFFSET 8
188#define HPIPE_G2_SET_1_G2_RX_SELMUFF_MASK \
189 (0x3 << HPIPE_G2_SET_1_G2_RX_SELMUFF_OFFSET)
190#define HPIPE_G2_SET_1_G2_RX_DFE_EN_OFFSET 10
191#define HPIPE_G2_SET_1_G2_RX_DFE_EN_MASK \
192 (0x1 << HPIPE_G2_SET_1_G2_RX_DFE_EN_OFFSET)
193#define HPIPE_G2_SET_1_G2_RX_DIGCK_DIV_OFFSET 11
194#define HPIPE_G2_SET_1_G2_RX_DIGCK_DIV_MASK \
195 (0x3 << HPIPE_G2_SET_1_G2_RX_DIGCK_DIV_OFFSET)
196
197#define HPIPE_G3_SET_0_REG 0x44
198#define HPIPE_G3_SET_0_G3_TX_AMP_OFFSET 1
199#define HPIPE_G3_SET_0_G3_TX_AMP_MASK \
200 (0x1f << HPIPE_G3_SET_0_G3_TX_AMP_OFFSET)
201#define HPIPE_G3_SET_0_G3_TX_AMP_ADJ_OFFSET 6
202#define HPIPE_G3_SET_0_G3_TX_AMP_ADJ_MASK \
203 (0x1 << HPIPE_G3_SET_0_G3_TX_AMP_ADJ_OFFSET)
204#define HPIPE_G3_SET_0_G3_TX_EMPH1_OFFSET 7
205#define HPIPE_G3_SET_0_G3_TX_EMPH1_MASK \
206 (0xf << HPIPE_G3_SET_0_G3_TX_EMPH1_OFFSET)
207#define HPIPE_G3_SET_0_G3_TX_EMPH1_EN_OFFSET 11
208#define HPIPE_G3_SET_0_G3_TX_EMPH1_EN_MASK \
209 (0x1 << HPIPE_G3_SET_0_G3_TX_EMPH1_EN_OFFSET)
210#define HPIPE_G3_SET_0_G3_TX_SLEW_RATE_SEL_OFFSET 12
211#define HPIPE_G3_SET_0_G3_TX_SLEW_RATE_SEL_MASK \
212 (0x7 << HPIPE_G3_SET_0_G3_TX_SLEW_RATE_SEL_OFFSET)
213#define HPIPE_G3_SET_0_G3_TX_SLEW_CTRL_EN_OFFSET 15
214#define HPIPE_G3_SET_0_G3_TX_SLEW_CTRL_EN_MASK \
215 (0x1 << HPIPE_G3_SET_0_G3_TX_SLEW_CTRL_EN_OFFSET)
216
217#define HPIPE_G3_SET_1_REG 0x048
218#define HPIPE_G3_SET_1_G3_RX_SELMUPI_OFFSET 0
219#define HPIPE_G3_SET_1_G3_RX_SELMUPI_MASK \
220 (0x7 << HPIPE_G3_SET_1_G3_RX_SELMUPI_OFFSET)
221#define HPIPE_G3_SET_1_G3_RX_SELMUPF_OFFSET 3
222#define HPIPE_G3_SET_1_G3_RX_SELMUPF_MASK \
223 (0x7 << HPIPE_G3_SET_1_G3_RX_SELMUPF_OFFSET)
224#define HPIPE_G3_SET_1_G3_RX_SELMUFI_OFFSET 6
225#define HPIPE_G3_SET_1_G3_RX_SELMUFI_MASK \
226 (0x3 << HPIPE_G3_SET_1_G3_RX_SELMUFI_OFFSET)
227#define HPIPE_G3_SET_1_G3_RX_SELMUFF_OFFSET 8
228#define HPIPE_G3_SET_1_G3_RX_SELMUFF_MASK \
229 (0x3 << HPIPE_G3_SET_1_G3_RX_SELMUFF_OFFSET)
230#define HPIPE_G3_SET_1_G3_RX_DFE_EN_OFFSET 10
231#define HPIPE_G3_SET_1_G3_RX_DFE_EN_MASK \
232 (0x1 << HPIPE_G3_SET_1_G3_RX_DFE_EN_OFFSET)
233#define HPIPE_G3_SET_1_G3_RX_DIGCK_DIV_OFFSET 11
234#define HPIPE_G3_SET_1_G3_RX_DIGCK_DIV_MASK \
235 (0x3 << HPIPE_G3_SET_1_G3_RX_DIGCK_DIV_OFFSET)
236#define HPIPE_G3_SET_1_G3_SAMPLER_INPAIRX2_EN_OFFSET 13
237#define HPIPE_G3_SET_1_G3_SAMPLER_INPAIRX2_EN_MASK \
238 (0x1 << HPIPE_G3_SET_1_G3_SAMPLER_INPAIRX2_EN_OFFSET)
Stefan Roese8f64e262016-05-23 11:12:05 +0200239
Igal Liberman6795a662021-03-23 11:57:57 +0100240#define HPIPE_PHY_TEST_CONTROL_REG 0x54
241#define HPIPE_PHY_TEST_PATTERN_SEL_OFFSET 4
242#define HPIPE_PHY_TEST_PATTERN_SEL_MASK \
243 (0xf << HPIPE_PHY_TEST_PATTERN_SEL_OFFSET)
244#define HPIPE_PHY_TEST_RESET_OFFSET 14
245#define HPIPE_PHY_TEST_RESET_MASK \
246 (0x1 << HPIPE_PHY_TEST_RESET_OFFSET)
247#define HPIPE_PHY_TEST_EN_OFFSET 15
248#define HPIPE_PHY_TEST_EN_MASK \
249 (0x1 << HPIPE_PHY_TEST_EN_OFFSET)
250
251#define HPIPE_PHY_TEST_DATA_REG 0x6c
252#define HPIPE_PHY_TEST_DATA_OFFSET 0
253#define HPIPE_PHY_TEST_DATA_MASK \
254 (0xffff << HPIPE_PHY_TEST_DATA_OFFSET)
255
Stefan Roese8f64e262016-05-23 11:12:05 +0200256#define HPIPE_LOOPBACK_REG 0x08c
257#define HPIPE_LOOPBACK_SEL_OFFSET 1
258#define HPIPE_LOOPBACK_SEL_MASK \
259 (0x7 << HPIPE_LOOPBACK_SEL_OFFSET)
Igal Liberman6795a662021-03-23 11:57:57 +0100260#define HPIPE_CDR_LOCK_OFFSET 7
261#define HPIPE_CDR_LOCK_MASK \
262 (0x1 << HPIPE_CDR_LOCK_OFFSET)
263#define HPIPE_CDR_LOCK_DET_EN_OFFSET 8
264#define HPIPE_CDR_LOCK_DET_EN_MASK \
265 (0x1 << HPIPE_CDR_LOCK_DET_EN_OFFSET)
Stefan Roese8f64e262016-05-23 11:12:05 +0200266
267#define HPIPE_SYNC_PATTERN_REG 0x090
Rabeeh Khoury320bd152018-09-06 12:37:48 +0300268#define HPIPE_SYNC_PATTERN_TXD_SWAP_OFFSET 10
269#define HPIPE_SYNC_PATTERN_TXD_SWAP_MASK \
270 (0x1 << HPIPE_SYNC_PATTERN_TXD_SWAP_OFFSET)
271#define HPIPE_SYNC_PATTERN_RXD_SWAP_OFFSET 11
272#define HPIPE_SYNC_PATTERN_RXD_SWAP_MASK \
273 (0x1 << HPIPE_SYNC_PATTERN_RXD_SWAP_OFFSET)
Stefan Roese8f64e262016-05-23 11:12:05 +0200274
275#define HPIPE_INTERFACE_REG 0x94
276#define HPIPE_INTERFACE_GEN_MAX_OFFSET 10
277#define HPIPE_INTERFACE_GEN_MAX_MASK \
278 (0x3 << HPIPE_INTERFACE_GEN_MAX_OFFSET)
Igal Liberman50dd09e2017-04-24 18:45:33 +0300279#define HPIPE_INTERFACE_DET_BYPASS_OFFSET 12
280#define HPIPE_INTERFACE_DET_BYPASS_MASK \
281 (0x1 << HPIPE_INTERFACE_DET_BYPASS_OFFSET)
Stefan Roese8f64e262016-05-23 11:12:05 +0200282#define HPIPE_INTERFACE_LINK_TRAIN_OFFSET 14
283#define HPIPE_INTERFACE_LINK_TRAIN_MASK \
284 (0x1 << HPIPE_INTERFACE_LINK_TRAIN_OFFSET)
285
286#define HPIPE_ISOLATE_MODE_REG 0x98
287#define HPIPE_ISOLATE_MODE_GEN_RX_OFFSET 0
288#define HPIPE_ISOLATE_MODE_GEN_RX_MASK \
289 (0xf << HPIPE_ISOLATE_MODE_GEN_RX_OFFSET)
290#define HPIPE_ISOLATE_MODE_GEN_TX_OFFSET 4
291#define HPIPE_ISOLATE_MODE_GEN_TX_MASK \
292 (0xf << HPIPE_ISOLATE_MODE_GEN_TX_OFFSET)
293
Stefan Roese648391c2016-08-30 16:48:20 +0200294#define HPIPE_G1_SET_2_REG 0xf4
295#define HPIPE_G1_SET_2_G1_TX_EMPH0_OFFSET 0
296#define HPIPE_G1_SET_2_G1_TX_EMPH0_MASK \
297 (0xf << HPIPE_G1_SET_2_G1_TX_EMPH0_OFFSET)
298#define HPIPE_G1_SET_2_G1_TX_EMPH0_EN_OFFSET 4
299#define HPIPE_G1_SET_2_G1_TX_EMPH0_EN_MASK \
300 (0x1 << HPIPE_G1_SET_2_G1_TX_EMPH0_MASK)
301
Stefan Roese8f64e262016-05-23 11:12:05 +0200302#define HPIPE_VTHIMPCAL_CTRL_REG 0x104
303
Igal Liberman547a98f2017-04-24 18:45:26 +0300304#define HPIPE_VDD_CAL_CTRL_REG 0x114
305#define HPIPE_EXT_SELLV_RXSAMPL_OFFSET 5
306#define HPIPE_EXT_SELLV_RXSAMPL_MASK \
307 (0x1f << HPIPE_EXT_SELLV_RXSAMPL_OFFSET)
308
Igal Liberman980d8092017-04-24 18:45:31 +0300309#define HPIPE_VDD_CAL_0_REG 0x108
310#define HPIPE_CAL_VDD_CONT_MODE_OFFSET 15
311#define HPIPE_CAL_VDD_CONT_MODE_MASK \
312 (0x1 << HPIPE_CAL_VDD_CONT_MODE_OFFSET)
313
Stefan Roese8f64e262016-05-23 11:12:05 +0200314#define HPIPE_PCIE_REG0 0x120
315#define HPIPE_PCIE_IDLE_SYNC_OFFSET 12
316#define HPIPE_PCIE_IDLE_SYNC_MASK \
317 (0x1 << HPIPE_PCIE_IDLE_SYNC_OFFSET)
318#define HPIPE_PCIE_SEL_BITS_OFFSET 13
319#define HPIPE_PCIE_SEL_BITS_MASK \
320 (0x3 << HPIPE_PCIE_SEL_BITS_OFFSET)
321
322#define HPIPE_LANE_ALIGN_REG 0x124
323#define HPIPE_LANE_ALIGN_OFF_OFFSET 12
324#define HPIPE_LANE_ALIGN_OFF_MASK \
325 (0x1 << HPIPE_LANE_ALIGN_OFF_OFFSET)
326
327#define HPIPE_MISC_REG 0x13C
328#define HPIPE_MISC_CLK100M_125M_OFFSET 4
329#define HPIPE_MISC_CLK100M_125M_MASK \
330 (0x1 << HPIPE_MISC_CLK100M_125M_OFFSET)
Stefan Roese648391c2016-08-30 16:48:20 +0200331#define HPIPE_MISC_ICP_FORCE_OFFSET 5
332#define HPIPE_MISC_ICP_FORCE_MASK \
333 (0x1 << HPIPE_MISC_ICP_FORCE_OFFSET)
Stefan Roese8f64e262016-05-23 11:12:05 +0200334#define HPIPE_MISC_TXDCLK_2X_OFFSET 6
335#define HPIPE_MISC_TXDCLK_2X_MASK \
336 (0x1 << HPIPE_MISC_TXDCLK_2X_OFFSET)
337#define HPIPE_MISC_CLK500_EN_OFFSET 7
338#define HPIPE_MISC_CLK500_EN_MASK \
339 (0x1 << HPIPE_MISC_CLK500_EN_OFFSET)
340#define HPIPE_MISC_REFCLK_SEL_OFFSET 10
341#define HPIPE_MISC_REFCLK_SEL_MASK \
342 (0x1 << HPIPE_MISC_REFCLK_SEL_OFFSET)
343
344#define HPIPE_RX_CONTROL_1_REG 0x140
345#define HPIPE_RX_CONTROL_1_RXCLK2X_SEL_OFFSET 11
346#define HPIPE_RX_CONTROL_1_RXCLK2X_SEL_MASK \
347 (0x1 << HPIPE_RX_CONTROL_1_RXCLK2X_SEL_OFFSET)
348#define HPIPE_RX_CONTROL_1_CLK8T_EN_OFFSET 12
349#define HPIPE_RX_CONTROL_1_CLK8T_EN_MASK \
350 (0x1 << HPIPE_RX_CONTROL_1_CLK8T_EN_OFFSET)
351
352#define HPIPE_PWR_CTR_REG 0x148
353#define HPIPE_PWR_CTR_RST_DFE_OFFSET 0
354#define HPIPE_PWR_CTR_RST_DFE_MASK \
355 (0x1 << HPIPE_PWR_CTR_RST_DFE_OFFSET)
356#define HPIPE_PWR_CTR_SFT_RST_OFFSET 10
357#define HPIPE_PWR_CTR_SFT_RST_MASK \
358 (0x1 << HPIPE_PWR_CTR_SFT_RST_OFFSET)
359
Igal Liberman989b96f2017-04-24 18:45:28 +0300360#define HPIPE_SPD_DIV_FORCE_REG 0x154
Igal Liberman980d8092017-04-24 18:45:31 +0300361#define HPIPE_TXDIGCK_DIV_FORCE_OFFSET 7
362#define HPIPE_TXDIGCK_DIV_FORCE_MASK \
363 (0x1 << HPIPE_TXDIGCK_DIV_FORCE_OFFSET)
Igal Liberman989b96f2017-04-24 18:45:28 +0300364#define HPIPE_SPD_DIV_FORCE_RX_SPD_DIV_OFFSET 8
365#define HPIPE_SPD_DIV_FORCE_RX_SPD_DIV_MASK \
366 (0x3 << HPIPE_SPD_DIV_FORCE_RX_SPD_DIV_OFFSET)
367#define HPIPE_SPD_DIV_FORCE_RX_SPD_DIV_FORCE_OFFSET 10
368#define HPIPE_SPD_DIV_FORCE_RX_SPD_DIV_FORCE_MASK \
369 (0x1 << HPIPE_SPD_DIV_FORCE_RX_SPD_DIV_FORCE_OFFSET)
370#define HPIPE_SPD_DIV_FORCE_TX_SPD_DIV_OFFSET 13
371#define HPIPE_SPD_DIV_FORCE_TX_SPD_DIV_MASK \
372 (0x3 << HPIPE_SPD_DIV_FORCE_TX_SPD_DIV_OFFSET)
373#define HPIPE_SPD_DIV_FORCE_TX_SPD_DIV_FORCE_OFFSET 15
374#define HPIPE_SPD_DIV_FORCE_TX_SPD_DIV_FORCE_MASK \
375 (0x1 << HPIPE_SPD_DIV_FORCE_TX_SPD_DIV_FORCE_OFFSET)
376
Stefan Roese8f64e262016-05-23 11:12:05 +0200377#define HPIPE_PLLINTP_REG1 0x150
378
379#define HPIPE_SAMPLER_N_PROC_CALIB_CTRL_REG 0x16C
Igal Liberman980d8092017-04-24 18:45:31 +0300380#define HPIPE_RX_SAMPLER_OS_GAIN_OFFSET 6
381#define HPIPE_RX_SAMPLER_OS_GAIN_MASK \
382 (0x3 << HPIPE_RX_SAMPLER_OS_GAIN_OFFSET)
Stefan Roese8f64e262016-05-23 11:12:05 +0200383#define HPIPE_SMAPLER_OFFSET 12
384#define HPIPE_SMAPLER_MASK \
385 (0x1 << HPIPE_SMAPLER_OFFSET)
386
Stefan Roese648391c2016-08-30 16:48:20 +0200387#define HPIPE_TX_REG1_REG 0x174
388#define HPIPE_TX_REG1_TX_EMPH_RES_OFFSET 5
389#define HPIPE_TX_REG1_TX_EMPH_RES_MASK \
390 (0x3 << HPIPE_TX_REG1_TX_EMPH_RES_OFFSET)
391#define HPIPE_TX_REG1_SLC_EN_OFFSET 10
392#define HPIPE_TX_REG1_SLC_EN_MASK \
393 (0x3f << HPIPE_TX_REG1_SLC_EN_OFFSET)
394
Igal Liberman547a98f2017-04-24 18:45:26 +0300395#define HPIPE_PWR_CTR_DTL_REG 0x184
396#define HPIPE_PWR_CTR_DTL_SQ_DET_EN_OFFSET 0
397#define HPIPE_PWR_CTR_DTL_SQ_DET_EN_MASK \
398 (0x1 << HPIPE_PWR_CTR_DTL_SQ_DET_EN_OFFSET)
399#define HPIPE_PWR_CTR_DTL_SQ_PLOOP_EN_OFFSET 1
400#define HPIPE_PWR_CTR_DTL_SQ_PLOOP_EN_MASK \
401 (0x1 << HPIPE_PWR_CTR_DTL_SQ_PLOOP_EN_OFFSET)
402#define HPIPE_PWR_CTR_DTL_FLOOP_EN_OFFSET 2
403#define HPIPE_PWR_CTR_DTL_FLOOP_EN_MASK \
Stefan Roese8f64e262016-05-23 11:12:05 +0200404 (0x1 << HPIPE_PWR_CTR_DTL_FLOOP_EN_OFFSET)
Igal Liberman547a98f2017-04-24 18:45:26 +0300405#define HPIPE_PWR_CTR_DTL_CLAMPING_SEL_OFFSET 4
406#define HPIPE_PWR_CTR_DTL_CLAMPING_SEL_MASK \
407 (0x7 << HPIPE_PWR_CTR_DTL_CLAMPING_SEL_OFFSET)
408#define HPIPE_PWR_CTR_DTL_INTPCLK_DIV_FORCE_OFFSET 10
409#define HPIPE_PWR_CTR_DTL_INTPCLK_DIV_FORCE_MASK \
410 (0x1 << HPIPE_PWR_CTR_DTL_INTPCLK_DIV_FORCE_OFFSET)
411#define HPIPE_PWR_CTR_DTL_CLK_MODE_OFFSET 12
412#define HPIPE_PWR_CTR_DTL_CLK_MODE_MASK \
413 (0x3 << HPIPE_PWR_CTR_DTL_CLK_MODE_OFFSET)
414#define HPIPE_PWR_CTR_DTL_CLK_MODE_FORCE_OFFSET 14
415#define HPIPE_PWR_CTR_DTL_CLK_MODE_FORCE_MASK \
416 (1 << HPIPE_PWR_CTR_DTL_CLK_MODE_FORCE_OFFSET)
Stefan Roese8f64e262016-05-23 11:12:05 +0200417
Igal Liberman547a98f2017-04-24 18:45:26 +0300418#define HPIPE_PHASE_CONTROL_REG 0x188
419#define HPIPE_OS_PH_OFFSET_OFFSET 0
420#define HPIPE_OS_PH_OFFSET_MASK \
421 (0x7f << HPIPE_OS_PH_OFFSET_OFFSET)
422#define HPIPE_OS_PH_OFFSET_FORCE_OFFSET 7
423#define HPIPE_OS_PH_OFFSET_FORCE_MASK \
424 (0x1 << HPIPE_OS_PH_OFFSET_FORCE_OFFSET)
425#define HPIPE_OS_PH_VALID_OFFSET 8
426#define HPIPE_OS_PH_VALID_MASK \
427 (0x1 << HPIPE_OS_PH_VALID_OFFSET)
Stefan Roese8f64e262016-05-23 11:12:05 +0200428
Igal Liberman6795a662021-03-23 11:57:57 +0100429#define HPIPE_SQ_GLITCH_FILTER_CTRL 0x1c8
430#define HPIPE_SQ_DEGLITCH_WIDTH_P_OFFSET 0
431#define HPIPE_SQ_DEGLITCH_WIDTH_P_MASK \
432 (0xf << HPIPE_SQ_DEGLITCH_WIDTH_P_OFFSET)
433#define HPIPE_SQ_DEGLITCH_WIDTH_N_OFFSET 4
434#define HPIPE_SQ_DEGLITCH_WIDTH_N_MASK \
435 (0xf << HPIPE_SQ_DEGLITCH_WIDTH_N_OFFSET)
436#define HPIPE_SQ_DEGLITCH_EN_OFFSET 8
437#define HPIPE_SQ_DEGLITCH_EN_MASK \
438 (0x1 << HPIPE_SQ_DEGLITCH_EN_OFFSET)
439
Igal Liberman980d8092017-04-24 18:45:31 +0300440#define HPIPE_FRAME_DETECT_CTRL_0_REG 0x214
441#define HPIPE_TRAIN_PAT_NUM_OFFSET 0x7
442#define HPIPE_TRAIN_PAT_NUM_MASK \
443 (0x1FF << HPIPE_TRAIN_PAT_NUM_OFFSET)
444
445#define HPIPE_FRAME_DETECT_CTRL_3_REG 0x220
446#define HPIPE_PATTERN_LOCK_LOST_TIMEOUT_EN_OFFSET 12
447#define HPIPE_PATTERN_LOCK_LOST_TIMEOUT_EN_MASK \
448 (0x1 << HPIPE_PATTERN_LOCK_LOST_TIMEOUT_EN_OFFSET)
449
450#define HPIPE_DME_REG 0x228
451#define HPIPE_DME_ETHERNET_MODE_OFFSET 7
452#define HPIPE_DME_ETHERNET_MODE_MASK \
453 (0x1 << HPIPE_DME_ETHERNET_MODE_OFFSET)
454
Stefan Roese8f64e262016-05-23 11:12:05 +0200455#define HPIPE_TX_TRAIN_CTRL_0_REG 0x268
456#define HPIPE_TX_TRAIN_P2P_HOLD_OFFSET 15
457#define HPIPE_TX_TRAIN_P2P_HOLD_MASK \
458 (0x1 << HPIPE_TX_TRAIN_P2P_HOLD_OFFSET)
459
460#define HPIPE_TX_TRAIN_CTRL_REG 0x26C
461#define HPIPE_TX_TRAIN_CTRL_G1_OFFSET 0
462#define HPIPE_TX_TRAIN_CTRL_G1_MASK \
463 (0x1 << HPIPE_TX_TRAIN_CTRL_G1_OFFSET)
464#define HPIPE_TX_TRAIN_CTRL_GN1_OFFSET 1
465#define HPIPE_TX_TRAIN_CTRL_GN1_MASK \
466 (0x1 << HPIPE_TX_TRAIN_CTRL_GN1_OFFSET)
467#define HPIPE_TX_TRAIN_CTRL_G0_OFFSET 2
468#define HPIPE_TX_TRAIN_CTRL_G0_MASK \
469 (0x1 << HPIPE_TX_TRAIN_CTRL_G0_OFFSET)
470
471#define HPIPE_TX_TRAIN_CTRL_4_REG 0x278
472#define HPIPE_TRX_TRAIN_TIMER_OFFSET 0
473#define HPIPE_TRX_TRAIN_TIMER_MASK \
474 (0x3FF << HPIPE_TRX_TRAIN_TIMER_OFFSET)
475
476#define HPIPE_PCIE_REG1 0x288
477#define HPIPE_PCIE_REG3 0x290
478
479#define HPIPE_TX_TRAIN_CTRL_5_REG 0x2A4
Igal Liberman980d8092017-04-24 18:45:31 +0300480#define HPIPE_RX_TRAIN_TIMER_OFFSET 0
481#define HPIPE_RX_TRAIN_TIMER_MASK \
482 (0x3ff << HPIPE_RX_TRAIN_TIMER_OFFSET)
Stefan Roese8f64e262016-05-23 11:12:05 +0200483#define HPIPE_TX_TRAIN_START_SQ_EN_OFFSET 11
484#define HPIPE_TX_TRAIN_START_SQ_EN_MASK \
485 (0x1 << HPIPE_TX_TRAIN_START_SQ_EN_OFFSET)
486#define HPIPE_TX_TRAIN_START_FRM_DET_EN_OFFSET 12
487#define HPIPE_TX_TRAIN_START_FRM_DET_EN_MASK \
488 (0x1 << HPIPE_TX_TRAIN_START_FRM_DET_EN_OFFSET)
489#define HPIPE_TX_TRAIN_START_FRM_LOCK_EN_OFFSET 13
490#define HPIPE_TX_TRAIN_START_FRM_LOCK_EN_MASK \
491 (0x1 << HPIPE_TX_TRAIN_START_FRM_LOCK_EN_OFFSET)
492#define HPIPE_TX_TRAIN_WAIT_TIME_EN_OFFSET 14
493#define HPIPE_TX_TRAIN_WAIT_TIME_EN_MASK \
494 (0x1 << HPIPE_TX_TRAIN_WAIT_TIME_EN_OFFSET)
495
496#define HPIPE_TX_TRAIN_REG 0x31C
497#define HPIPE_TX_TRAIN_CHK_INIT_OFFSET 4
498#define HPIPE_TX_TRAIN_CHK_INIT_MASK \
499 (0x1 << HPIPE_TX_TRAIN_CHK_INIT_OFFSET)
500#define HPIPE_TX_TRAIN_COE_FM_PIN_PCIE3_OFFSET 7
501#define HPIPE_TX_TRAIN_COE_FM_PIN_PCIE3_MASK \
502 (0x1 << HPIPE_TX_TRAIN_COE_FM_PIN_PCIE3_OFFSET)
Igal Liberman980d8092017-04-24 18:45:31 +0300503#define HPIPE_TX_TRAIN_16BIT_AUTO_EN_OFFSET 8
504#define HPIPE_TX_TRAIN_16BIT_AUTO_EN_MASK \
505 (0x1 << HPIPE_TX_TRAIN_16BIT_AUTO_EN_OFFSET)
506#define HPIPE_TX_TRAIN_PAT_SEL_OFFSET 9
507#define HPIPE_TX_TRAIN_PAT_SEL_MASK \
508 (0x1 << HPIPE_TX_TRAIN_PAT_SEL_OFFSET)
Stefan Roese8f64e262016-05-23 11:12:05 +0200509
Igal Liberman6795a662021-03-23 11:57:57 +0100510#define HPIPE_SAVED_DFE_VALUES_REG 0x328
511#define HPIPE_SAVED_DFE_VALUES_SAV_F0D_OFFSET 10
512#define HPIPE_SAVED_DFE_VALUES_SAV_F0D_MASK \
513 (0x3f << HPIPE_SAVED_DFE_VALUES_SAV_F0D_OFFSET)
514
Igal Liberman50dd09e2017-04-24 18:45:33 +0300515#define HPIPE_CDR_CONTROL_REG 0x418
516#define HPIPE_CDR_RX_MAX_DFE_ADAPT_1_OFFSET 12
517#define HPIPE_CDR_RX_MAX_DFE_ADAPT_1_MASK \
518 (0x3 << HPIPE_CDR_RX_MAX_DFE_ADAPT_1_OFFSET)
519#define HPIPE_CDR_MAX_DFE_ADAPT_0_OFFSET 9
520#define HPIPE_CDR_MAX_DFE_ADAPT_0_MASK \
521 (0x7 << HPIPE_CDR_MAX_DFE_ADAPT_0_OFFSET)
522#define HPIPE_CDR_MAX_DFE_ADAPT_1_OFFSET 6
523#define HPIPE_CDR_MAX_DFE_ADAPT_1_MASK \
524 (0x7 << HPIPE_CDR_MAX_DFE_ADAPT_1_OFFSET)
525
Stefan Roese8f64e262016-05-23 11:12:05 +0200526#define HPIPE_TX_TRAIN_CTRL_11_REG 0x438
527#define HPIPE_TX_STATUS_CHECK_MODE_OFFSET 6
528#define HPIPE_TX_TX_STATUS_CHECK_MODE_MASK \
529 (0x1 << HPIPE_TX_STATUS_CHECK_MODE_OFFSET)
530#define HPIPE_TX_NUM_OF_PRESET_OFFSET 10
531#define HPIPE_TX_NUM_OF_PRESET_MASK \
532 (0x7 << HPIPE_TX_NUM_OF_PRESET_OFFSET)
533#define HPIPE_TX_SWEEP_PRESET_EN_OFFSET 15
534#define HPIPE_TX_SWEEP_PRESET_EN_MASK \
535 (0x1 << HPIPE_TX_SWEEP_PRESET_EN_OFFSET)
536
Igal Liberman547a98f2017-04-24 18:45:26 +0300537#define HPIPE_G1_SETTINGS_3_REG 0x440
538#define HPIPE_G1_SETTINGS_3_G1_FFE_CAP_SEL_OFFSET 0
539#define HPIPE_G1_SETTINGS_3_G1_FFE_CAP_SEL_MASK \
540 (0xf << HPIPE_G1_SETTINGS_3_G1_FFE_CAP_SEL_OFFSET)
541#define HPIPE_G1_SETTINGS_3_G1_FFE_RES_SEL_OFFSET 4
542#define HPIPE_G1_SETTINGS_3_G1_FFE_RES_SEL_MASK \
543 (0x7 << HPIPE_G1_SETTINGS_3_G1_FFE_RES_SEL_OFFSET)
544#define HPIPE_G1_SETTINGS_3_G1_FFE_SETTING_FORCE_OFFSET 7
545#define HPIPE_G1_SETTINGS_3_G1_FFE_SETTING_FORCE_MASK \
546 (0x1 << HPIPE_G1_SETTINGS_3_G1_FFE_SETTING_FORCE_OFFSET)
547#define HPIPE_G1_SETTINGS_3_G1_FBCK_SEL_OFFSET 9
548#define HPIPE_G1_SETTINGS_3_G1_FBCK_SEL_MASK \
Stefan Roese648391c2016-08-30 16:48:20 +0200549 (0x1 << HPIPE_G1_SETTINGS_3_G1_FBCK_SEL_OFFSET)
Igal Liberman547a98f2017-04-24 18:45:26 +0300550#define HPIPE_G1_SETTINGS_3_G1_FFE_DEG_RES_LEVEL_OFFSET 12
551#define HPIPE_G1_SETTINGS_3_G1_FFE_DEG_RES_LEVEL_MASK \
552 (0x3 << HPIPE_G1_SETTINGS_3_G1_FFE_DEG_RES_LEVEL_OFFSET)
553#define HPIPE_G1_SETTINGS_3_G1_FFE_LOAD_RES_LEVEL_OFFSET 14
554#define HPIPE_G1_SETTINGS_3_G1_FFE_LOAD_RES_LEVEL_MASK \
555 (0x3 << HPIPE_G1_SETTINGS_3_G1_FFE_LOAD_RES_LEVEL_OFFSET)
Stefan Roese8f64e262016-05-23 11:12:05 +0200556
557#define HPIPE_G1_SETTINGS_4_REG 0x444
558#define HPIPE_G1_SETTINGS_4_G1_DFE_RES_OFFSET 8
559#define HPIPE_G1_SETTINGS_4_G1_DFE_RES_MASK \
560 (0x3 << HPIPE_G1_SETTINGS_4_G1_DFE_RES_OFFSET)
561
562#define HPIPE_G2_SETTINGS_3_REG 0x448
Igal Liberman50dd09e2017-04-24 18:45:33 +0300563
564#define HPIPE_G2_SETTINGS_4_REG 0x44c
565#define HPIPE_G2_DFE_RES_OFFSET 8
566#define HPIPE_G2_DFE_RES_MASK \
567 (0x3 << HPIPE_G2_DFE_RES_OFFSET)
Stefan Roese8f64e262016-05-23 11:12:05 +0200568
569#define HPIPE_G3_SETTING_3_REG 0x450
Igal Liberman547a98f2017-04-24 18:45:26 +0300570#define HPIPE_G3_FFE_CAP_SEL_OFFSET 0
571#define HPIPE_G3_FFE_CAP_SEL_MASK \
572 (0xf << HPIPE_G3_FFE_CAP_SEL_OFFSET)
573#define HPIPE_G3_FFE_RES_SEL_OFFSET 4
574#define HPIPE_G3_FFE_RES_SEL_MASK \
575 (0x7 << HPIPE_G3_FFE_RES_SEL_OFFSET)
576#define HPIPE_G3_FFE_SETTING_FORCE_OFFSET 7
577#define HPIPE_G3_FFE_SETTING_FORCE_MASK \
578 (0x1 << HPIPE_G3_FFE_SETTING_FORCE_OFFSET)
Stefan Roese8f64e262016-05-23 11:12:05 +0200579#define HPIPE_G3_FFE_DEG_RES_LEVEL_OFFSET 12
580#define HPIPE_G3_FFE_DEG_RES_LEVEL_MASK \
581 (0x3 << HPIPE_G3_FFE_DEG_RES_LEVEL_OFFSET)
582#define HPIPE_G3_FFE_LOAD_RES_LEVEL_OFFSET 14
583#define HPIPE_G3_FFE_LOAD_RES_LEVEL_MASK \
584 (0x3 << HPIPE_G3_FFE_LOAD_RES_LEVEL_OFFSET)
585
586#define HPIPE_G3_SETTING_4_REG 0x454
587#define HPIPE_G3_DFE_RES_OFFSET 8
588#define HPIPE_G3_DFE_RES_MASK \
589 (0x3 << HPIPE_G3_DFE_RES_OFFSET)
590
Igal Liberman980d8092017-04-24 18:45:31 +0300591#define HPIPE_TX_PRESET_INDEX_REG 0x468
592#define HPIPE_TX_PRESET_INDEX_OFFSET 0
593#define HPIPE_TX_PRESET_INDEX_MASK \
594 (0xf << HPIPE_TX_PRESET_INDEX_OFFSET)
595
Igal Liberman50dd09e2017-04-24 18:45:33 +0300596#define HPIPE_DFE_CONTROL_REG 0x470
597#define HPIPE_DFE_TX_MAX_DFE_ADAPT_OFFSET 14
598#define HPIPE_DFE_TX_MAX_DFE_ADAPT_MASK \
599 (0x3 << HPIPE_DFE_TX_MAX_DFE_ADAPT_OFFSET)
600
Stefan Roese8f64e262016-05-23 11:12:05 +0200601#define HPIPE_DFE_CTRL_28_REG 0x49C
602#define HPIPE_DFE_CTRL_28_PIPE4_OFFSET 7
603#define HPIPE_DFE_CTRL_28_PIPE4_MASK \
604 (0x1 << HPIPE_DFE_CTRL_28_PIPE4_OFFSET)
605
Stefan Roese648391c2016-08-30 16:48:20 +0200606#define HPIPE_G1_SETTING_5_REG 0x538
607#define HPIPE_G1_SETTING_5_G1_ICP_OFFSET 0
608#define HPIPE_G1_SETTING_5_G1_ICP_MASK \
609 (0xf << HPIPE_G1_SETTING_5_G1_ICP_OFFSET)
610
Igal Liberman50dd09e2017-04-24 18:45:33 +0300611#define HPIPE_G3_SETTING_5_REG 0x548
612#define HPIPE_G3_SETTING_5_G3_ICP_OFFSET 0
613#define HPIPE_G3_SETTING_5_G3_ICP_MASK \
614 (0xf << HPIPE_G3_SETTING_5_G3_ICP_OFFSET)
615
Stefan Roese8f64e262016-05-23 11:12:05 +0200616#define HPIPE_LANE_CONFIG0_REG 0x600
617#define HPIPE_LANE_CONFIG0_TXDEEMPH0_OFFSET 0
618#define HPIPE_LANE_CONFIG0_TXDEEMPH0_MASK \
619 (0x1 << HPIPE_LANE_CONFIG0_TXDEEMPH0_OFFSET)
620
621#define HPIPE_LANE_CONFIG1_REG 0x604
622#define HPIPE_LANE_CONFIG1_MAX_PLL_OFFSET 9
623#define HPIPE_LANE_CONFIG1_MAX_PLL_MASK \
624 (0x1 << HPIPE_LANE_CONFIG1_MAX_PLL_OFFSET)
625#define HPIPE_LANE_CONFIG1_GEN2_PLL_OFFSET 10
626#define HPIPE_LANE_CONFIG1_GEN2_PLL_MASK \
627 (0x1 << HPIPE_LANE_CONFIG1_GEN2_PLL_OFFSET)
628
629#define HPIPE_LANE_STATUS1_REG 0x60C
630#define HPIPE_LANE_STATUS1_PCLK_EN_OFFSET 0
631#define HPIPE_LANE_STATUS1_PCLK_EN_MASK \
632 (0x1 << HPIPE_LANE_STATUS1_PCLK_EN_OFFSET)
633
634#define HPIPE_LANE_CFG4_REG 0x620
635#define HPIPE_LANE_CFG4_DFE_CTRL_OFFSET 0
636#define HPIPE_LANE_CFG4_DFE_CTRL_MASK \
637 (0x7 << HPIPE_LANE_CFG4_DFE_CTRL_OFFSET)
Igal Liberman50dd09e2017-04-24 18:45:33 +0300638#define HPIPE_LANE_CFG4_DFE_EN_SEL_OFFSET 3
639#define HPIPE_LANE_CFG4_DFE_EN_SEL_MASK \
640 (0x1 << HPIPE_LANE_CFG4_DFE_EN_SEL_OFFSET)
Stefan Roese8f64e262016-05-23 11:12:05 +0200641#define HPIPE_LANE_CFG4_DFE_OVER_OFFSET 6
642#define HPIPE_LANE_CFG4_DFE_OVER_MASK \
643 (0x1 << HPIPE_LANE_CFG4_DFE_OVER_OFFSET)
644#define HPIPE_LANE_CFG4_SSC_CTRL_OFFSET 7
645#define HPIPE_LANE_CFG4_SSC_CTRL_MASK \
646 (0x1 << HPIPE_LANE_CFG4_SSC_CTRL_OFFSET)
647
648#define HPIPE_LANE_EQU_CONFIG_0_REG 0x69C
649#define HPIPE_CFG_PHY_RC_EP_OFFSET 12
650#define HPIPE_CFG_PHY_RC_EP_MASK \
651 (0x1 << HPIPE_CFG_PHY_RC_EP_OFFSET)
652
653#define HPIPE_LANE_EQ_CFG1_REG 0x6a0
654#define HPIPE_CFG_UPDATE_POLARITY_OFFSET 12
655#define HPIPE_CFG_UPDATE_POLARITY_MASK \
656 (0x1 << HPIPE_CFG_UPDATE_POLARITY_OFFSET)
657
Igal Liberman50dd09e2017-04-24 18:45:33 +0300658#define HPIPE_LANE_EQ_REMOTE_SETTING_REG 0x6f8
659#define HPIPE_LANE_CFG_FOM_DIRN_OVERRIDE_OFFSET 0
660#define HPIPE_LANE_CFG_FOM_DIRN_OVERRIDE_MASK \
661 (0x1 << HPIPE_LANE_CFG_FOM_DIRN_OVERRIDE_OFFSET)
662#define HPIPE_LANE_CFG_FOM_ONLY_MODE_OFFFSET 1
663#define HPIPE_LANE_CFG_FOM_ONLY_MODE_MASK \
664 (0x1 << HPIPE_LANE_CFG_FOM_ONLY_MODE_OFFFSET)
665#define HPIPE_LANE_CFG_FOM_PRESET_VECTOR_OFFSET 2
666#define HPIPE_LANE_CFG_FOM_PRESET_VECTOR_MASK \
667 (0xf << HPIPE_LANE_CFG_FOM_PRESET_VECTOR_OFFSET)
668
Stefan Roese8f64e262016-05-23 11:12:05 +0200669#define HPIPE_RST_CLK_CTRL_REG 0x704
670#define HPIPE_RST_CLK_CTRL_PIPE_RST_OFFSET 0
671#define HPIPE_RST_CLK_CTRL_PIPE_RST_MASK \
672 (0x1 << HPIPE_RST_CLK_CTRL_PIPE_RST_OFFSET)
673#define HPIPE_RST_CLK_CTRL_FIXED_PCLK_OFFSET 2
674#define HPIPE_RST_CLK_CTRL_FIXED_PCLK_MASK \
675 (0x1 << HPIPE_RST_CLK_CTRL_FIXED_PCLK_OFFSET)
676#define HPIPE_RST_CLK_CTRL_PIPE_WIDTH_OFFSET 3
677#define HPIPE_RST_CLK_CTRL_PIPE_WIDTH_MASK \
678 (0x1 << HPIPE_RST_CLK_CTRL_PIPE_WIDTH_OFFSET)
679#define HPIPE_RST_CLK_CTRL_CORE_FREQ_SEL_OFFSET 9
680#define HPIPE_RST_CLK_CTRL_CORE_FREQ_SEL_MASK \
681 (0x1 << HPIPE_RST_CLK_CTRL_CORE_FREQ_SEL_OFFSET)
682
683#define HPIPE_TST_MODE_CTRL_REG 0x708
684#define HPIPE_TST_MODE_CTRL_MODE_MARGIN_OFFSET 2
685#define HPIPE_TST_MODE_CTRL_MODE_MARGIN_MASK \
686 (0x1 << HPIPE_TST_MODE_CTRL_MODE_MARGIN_OFFSET)
687
688#define HPIPE_CLK_SRC_LO_REG 0x70c
689#define HPIPE_CLK_SRC_LO_BUNDLE_PERIOD_SEL_OFFSET 1
690#define HPIPE_CLK_SRC_LO_BUNDLE_PERIOD_SEL_MASK \
691 (0x1 << HPIPE_CLK_SRC_LO_BUNDLE_PERIOD_SEL_OFFSET)
692#define HPIPE_CLK_SRC_LO_BUNDLE_PERIOD_SCALE_OFFSET 2
693#define HPIPE_CLK_SRC_LO_BUNDLE_PERIOD_SCALE_MASK \
694 (0x3 << HPIPE_CLK_SRC_LO_BUNDLE_PERIOD_SCALE_OFFSET)
695#define HPIPE_CLK_SRC_LO_PLL_RDY_DL_OFFSET 5
696#define HPIPE_CLK_SRC_LO_PLL_RDY_DL_MASK \
697 (0x7 << HPIPE_CLK_SRC_LO_PLL_RDY_DL_OFFSET)
698
699#define HPIPE_CLK_SRC_HI_REG 0x710
700#define HPIPE_CLK_SRC_HI_LANE_STRT_OFFSET 0
701#define HPIPE_CLK_SRC_HI_LANE_STRT_MASK \
702 (0x1 << HPIPE_CLK_SRC_HI_LANE_STRT_OFFSET)
703#define HPIPE_CLK_SRC_HI_LANE_BREAK_OFFSET 1
704#define HPIPE_CLK_SRC_HI_LANE_BREAK_MASK \
705 (0x1 << HPIPE_CLK_SRC_HI_LANE_BREAK_OFFSET)
706#define HPIPE_CLK_SRC_HI_LANE_MASTER_OFFSET 2
707#define HPIPE_CLK_SRC_HI_LANE_MASTER_MASK \
708 (0x1 << HPIPE_CLK_SRC_HI_LANE_MASTER_OFFSET)
709#define HPIPE_CLK_SRC_HI_MODE_PIPE_OFFSET 7
710#define HPIPE_CLK_SRC_HI_MODE_PIPE_MASK \
711 (0x1 << HPIPE_CLK_SRC_HI_MODE_PIPE_OFFSET)
712
713#define HPIPE_GLOBAL_MISC_CTRL 0x718
714#define HPIPE_GLOBAL_PM_CTRL 0x740
715#define HPIPE_GLOBAL_PM_RXDLOZ_WAIT_OFFSET 0
716#define HPIPE_GLOBAL_PM_RXDLOZ_WAIT_MASK \
717 (0xFF << HPIPE_GLOBAL_PM_RXDLOZ_WAIT_OFFSET)
718
719#endif /* _COMPHY_HPIPE_H_ */
720