Go to the documentation of this file.
46 #define REG_SPI_INTFCONFA 0x000
47 #define REG_SPI_INTFCONFB 0x001
48 #define REG_SPI_DEVCONF 0x002
49 #define REG_SPI_PRODIDL 0x004
50 #define REG_SPI_PRODIDH 0x005
51 #define REG_SPI_CHIPGRADE 0x006
52 #define REG_SPI_PAGEINDX 0x008
53 #define REG_SPI_DEVINDX2 0x009
54 #define REG_SPI_SCRATCHPAD 0x00A
55 #define REG_SPI_MS_UPDATE 0x00F
56 #define REG_PWRCNTRL0 0x011
57 #define REG_TXENMASK1 0x012
58 #define REG_PWRCNTRL3 0x013
59 #define REG_COARSE_GROUP_DLY 0x014
60 #define REG_IRQ_ENABLE0 0x01F
61 #define REG_IRQ_ENABLE1 0x020
62 #define REG_IRQ_ENABLE2 0x021
63 #define REG_IRQ_ENABLE3 0x022
64 #define REG_IRQ_STATUS0 0x023
65 #define REG_IRQ_STATUS1 0x024
66 #define REG_IRQ_STATUS2 0x025
67 #define REG_IRQ_STATUS3 0x026
68 #define REG_JESD_CHECKS 0x030
69 #define REG_SYNC_TESTCTRL 0x031
70 #define REG_SYNC_DACDELAY_L 0x032
71 #define REG_SYNC_DACDELAY_H 0x033
72 #define REG_SYNC_ERRWINDOW 0x034
73 #define REG_SYNC_DLYCOUNT 0x035
74 #define REG_SYNC_REFCOUNT 0x036
75 #define REG_SYNC_LASTERR_L 0x038
76 #define REG_SYNC_LASTERR_H 0x039
77 #define REG_SYNC_CTRL 0x03A
78 #define REG_SYNC_STATUS 0x03B
79 #define REG_SYNC_CURRERR_L 0x03C
80 #define REG_SYNC_CURRERR_H 0x03D
81 #define REG_ERROR_THERM 0x03E
82 #define REG_DACGAIN0_1 0x040
83 #define REG_DACGAIN0_0 0x041
84 #define REG_DACGAIN1_1 0x042
85 #define REG_DACGAIN1_0 0x043
86 #define REG_DACGAIN2_1 0x044
87 #define REG_DACGAIN2_0 0x045
88 #define REG_DACGAIN3_1 0x046
89 #define REG_DACGAIN3_0 0x047
90 #define REG_PD_DACLDO 0x048
91 #define REG_STAT_DACLDO 0x049
92 #define REG_DECODE_CTRL0 0x04B
93 #define REG_DECODE_CTRL1 0x04C
94 #define REG_DECODE_CTRL2 0x04D
95 #define REG_DECODE_CTRL3 0x04E
96 #define REG_NCO_CLRMODE 0x050
97 #define REG_NCOKEY_ILSB 0x051
98 #define REG_NCOKEY_IMSB 0x052
99 #define REG_NCOKEY_QLSB 0x053
100 #define REG_NCOKEY_QMSB 0x054
101 #define REG_PA_THRES0 0x060
102 #define REG_PA_THRES1 0x061
103 #define REG_PA_AVG_TIME 0x062
104 #define REG_PA_POWER0 0x063
105 #define REG_PA_POWER1 0x064
106 #define REG_CLKCFG0 0x080
107 #define REG_SYSREF_ACTRL0 0x081
108 #define REG_SYSREF_ACTRL1 0x082
109 #define REG_DACPLLCNTRL 0x083
110 #define REG_DACPLLSTATUS 0x084
111 #define REG_DACINTEGERWORD0 0x085
112 #define REG_DACLOOPFILT1 0x087
113 #define REG_DACLOOPFILT2 0x088
114 #define REG_DACLOOPFILT3 0x089
115 #define REG_DACCPCNTRL 0x08A
116 #define REG_DACLOGENCNTRL 0x08B
117 #define REG_DACLDOCNTRL1 0x08C
118 #define REG_CAL_DAC_ERR 0x0E0
119 #define REG_CAL_MSB_THRES 0x0E1
120 #define REG_CAL_CTRL_GLOBAL 0x0E2
121 #define REG_CAL_MSBHILVL 0x0E3
122 #define REG_CAL_MSBLOLVL 0x0E4
123 #define REG_CAL_THRESH 0x0E5
124 #define REG_CAL_AVG_CNT 0x0E6
125 #define REG_CAL_CLKDIV 0x0E7
126 #define REG_CAL_INDX 0x0E8
127 #define REG_CAL_CTRL 0x0E9
128 #define REG_CAL_ADDR 0x0EA
129 #define REG_CAL_DATA 0x0EB
130 #define REG_CAL_UPDATE 0x0EC
131 #define REG_DATA_FORMAT 0x110
132 #define REG_DATAPATH_CTRL 0x111
133 #define REG_INTERP_MODE 0x112
134 #define REG_NCO_FTW_UPDATE 0x113
135 #define REG_FTW0 0x114
136 #define REG_FTW1 0x115
137 #define REG_FTW2 0x116
138 #define REG_FTW3 0x117
139 #define REG_FTW4 0x118
140 #define REG_FTW5 0x119
141 #define REG_NCO_PHASE_OFFSET0 0x11A
142 #define REG_NCO_PHASE_OFFSET1 0x11B
143 #define REG_NCO_PHASE_ADJ0 0x11C
144 #define REG_NCO_PHASE_ADJ1 0x11D
145 #define REG_TXEN_FUNC 0x11E
146 #define REG_TXEN_SM_0 0x11F
147 #define REG_TXEN_SM_1 0x120
148 #define REG_TXEN_SM_2 0x121
149 #define REG_TXEN_SM_3 0x122
150 #define REG_TXEN_SM_4 0x123
151 #define REG_TXEN_SM_5 0x124
152 #define REG_DACOUT_ON_DOWN 0x125
153 #define REG_DACOFF 0x12C
154 #define REG_DATA_PATH_FLUSH_COUNT0 0x12D
155 #define REG_DATA_PATH_FLUSH_COUNT1 0x12E
156 #define REG_DIE_TEMP_CTRL0 0x12F
157 #define REG_DIE_TEMP_CTRL1 0x130
158 #define REG_DIE_TEMP_CTRL2 0x131
159 #define REG_DIE_TEMP0 0x132
160 #define REG_DIE_TEMP1 0x133
161 #define REG_DIE_TEMP_UPDATE 0x134
162 #define REG_DC_OFFSET_CTRL 0x135
163 #define REG_IPATH_DC_OFFSET_1PART0 0x136
164 #define REG_IPATH_DC_OFFSET_1PART1 0x137
165 #define REG_QPATH_DC_OFFSET_1PART0 0x138
166 #define REG_QPATH_DC_OFFSET_1PART1 0x139
167 #define REG_IPATH_DC_OFFSET_2PART 0x13A
168 #define REG_QPATH_DC_OFFSET_2PART 0x13B
169 #define REG_IDAC_DIG_GAIN0 0x13C
170 #define REG_IDAC_DIG_GAIN1 0x13D
171 #define REG_QDAC_DIG_GAIN0 0x13E
172 #define REG_QDAC_DIG_GAIN1 0x13F
173 #define REG_GAIN_RAMP_UP_STP0 0x140
174 #define REG_GAIN_RAMP_UP_STP1 0x141
175 #define REG_GAIN_RAMP_DOWN_STP0 0x142
176 #define REG_GAIN_RAMP_DOWN_STP1 0x143
177 #define REG_BLSM_CTRL 0x146
178 #define REG_BLSM_STAT 0x147
179 #define REG_PRBS 0x14B
180 #define REG_PRBS_ERROR_I 0x14C
181 #define REG_PRBS_ERROR_Q 0x14D
182 #define REG_DACPLLT5 0x1B5
183 #define REG_DACPLLTB 0x1BB
184 #define REG_DACPLLTD 0x1BD
185 #define REG_DACPLLT17 0x1C4
186 #define REG_ASPI_SPARE0 0x1C6
187 #define REG_ASPI_SPARE1 0x1C7
188 #define REG_SPISTRENGTH 0x1DF
189 #define REG_CLK_TEST 0x1EB
190 #define REG_ATEST_VOLTS 0x1EC
191 #define REG_ASPI_CLKSRC 0x1ED
192 #define REG_MASTER_PD 0x200
193 #define REG_PHY_PD 0x201
194 #define REG_GENERIC_PD 0x203
195 #define REG_CDR_OPERATING_MODE_REG_0 0x230
196 #define REG_EQ_CONFIG_PHY_0_1 0x250
197 #define REG_EQ_CONFIG_PHY_2_3 0x251
198 #define REG_EQ_CONFIG_PHY_4_5 0x252
199 #define REG_EQ_CONFIG_PHY_6_7 0x253
200 #define REG_EQ_BIAS_REG 0x268
201 #define REG_SYNTH_ENABLE_CNTRL 0x280
202 #define REG_PLL_STATUS 0x281
203 #define REG_REF_CLK_DIVIDER_LDO 0x289
204 #define REG_TERM_BLK1_CTRLREG0 0x2A7
205 #define REG_TERM_BLK1_CTRLREG1 0x2A8
206 #define REG_TERM_BLK2_CTRLREG0 0x2AE
207 #define REG_TERM_BLK2_CTRLREG1 0x2AF
208 #define REG_GENERAL_JRX_CTRL_0 0x300
209 #define REG_GENERAL_JRX_CTRL_1 0x301
210 #define REG_DYN_LINK_LATENCY_0 0x302
211 #define REG_DYN_LINK_LATENCY_1 0x303
212 #define REG_LMFC_DELAY_0 0x304
213 #define REG_LMFC_DELAY_1 0x305
214 #define REG_LMFC_VAR_0 0x306
215 #define REG_LMFC_VAR_1 0x307
216 #define REG_XBAR_LN_0_1 0x308
217 #define REG_XBAR_LN_2_3 0x309
218 #define REG_XBAR_LN_4_5 0x30A
219 #define REG_XBAR_LN_6_7 0x30B
220 #define REG_FIFO_STATUS_REG_0 0x30C
221 #define REG_FIFO_STATUS_REG_1 0x30D
222 #define REG_FIFO_STATUS_REG_2 0x30E
223 #define REG_SYNCB_GEN_0 0x311
224 #define REG_SYNCB_GEN_1 0x312
225 #define REG_SYNCB_GEN_3 0x313
226 #define REG_PHY_PRBS_TEST_EN 0x315
227 #define REG_PHY_PRBS_TEST_CTRL 0x316
228 #define REG_PHY_PRBS_TEST_THRESH_LOBITS 0x317
229 #define REG_PHY_PRBS_TEST_THRESH_MIDBITS 0x318
230 #define REG_PHY_PRBS_TEST_THRESH_HIBITS 0x319
231 #define REG_PHY_PRBS_TEST_ERRCNT_LOBITS 0x31A
232 #define REG_PHY_PRBS_TEST_ERRCNT_MIDBITS 0x31B
233 #define REG_PHY_PRBS_TEST_ERRCNT_HIBITS 0x31C
234 #define REG_PHY_PRBS_TEST_STATUS 0x31D
235 #define REG_SHORT_TPL_TEST_0 0x32C
236 #define REG_SHORT_TPL_TEST_1 0x32D
237 #define REG_SHORT_TPL_TEST_2 0x32E
238 #define REG_SHORT_TPL_TEST_3 0x32F
239 #define REG_JESD_BIT_INVERSE_CTRL 0x334
240 #define REG_DID_REG 0x400
241 #define REG_BID_REG 0x401
242 #define REG_LID0_REG 0x402
243 #define REG_SCR_L_REG 0x403
244 #define REG_F_REG 0x404
245 #define REG_K_REG 0x405
246 #define REG_M_REG 0x406
247 #define REG_CS_N_REG 0x407
248 #define REG_NP_REG 0x408
249 #define REG_S_REG 0x409
250 #define REG_HD_CF_REG 0x40A
251 #define REG_RES1_REG 0x40B
252 #define REG_RES2_REG 0x40C
253 #define REG_CHECKSUM_REG 0x40D
254 #define REG_COMPSUM0_REG 0x40E
255 #define REG_LID1_REG 0x412
256 #define REG_CHECKSUM1_REG 0x415
257 #define REG_COMPSUM1_REG 0x416
258 #define REG_LID2_REG 0x41A
259 #define REG_CHECKSUM2_REG 0x41D
260 #define REG_COMPSUM2_REG 0x41E
261 #define REG_LID3_REG 0x422
262 #define REG_CHECKSUM3_REG 0x425
263 #define REG_COMPSUM3_REG 0x426
264 #define REG_LID4_REG 0x42A
265 #define REG_CHECKSUM4_REG 0x42D
266 #define REG_COMPSUM4_REG 0x42E
267 #define REG_LID5_REG 0x432
268 #define REG_CHECKSUM5_REG 0x435
269 #define REG_COMPSUM5_REG 0x436
270 #define REG_LID6_REG 0x43A
271 #define REG_CHECKSUM6_REG 0x43D
272 #define REG_COMPSUM6_REG 0x43E
273 #define REG_LID7_REG 0x442
274 #define REG_CHECKSUM7_REG 0x445
275 #define REG_COMPSUM7_REG 0x446
276 #define REG_ILS_DID 0x450
277 #define REG_ILS_BID 0x451
278 #define REG_ILS_LID0 0x452
279 #define REG_ILS_SCR_L 0x453
280 #define REG_ILS_K 0x455
281 #define REG_ILS_M 0x456
282 #define REG_ILS_CS_N 0x457
283 #define REG_ILS_NP 0x458
284 #define REG_ILS_S 0x459
285 #define REG_ILS_HD_CF 0x45A
286 #define REG_ILS_RES1 0x45B
287 #define REG_ILS_RES2 0x45C
288 #define REG_ILS_CHECKSUM 0x45D
289 #define REG_ERRCNTRMON 0x46B
290 #define REG_LANEDESKEW 0x46C
291 #define REG_BADDISPARITY 0x46D
292 #define REG_NITDISPARITY 0x46E
293 #define REG_UNEXPECTEDKCHAR 0x46F
294 #define REG_CODEGRPSYNCFLG 0x470
295 #define REG_FRAMESYNCFLG 0x471
296 #define REG_GOODCHKSUMFLG 0x472
297 #define REG_INITLANESYNCFLG 0x473
298 #define REG_CTRLREG1 0x476
299 #define REG_CTRLREG2 0x477
300 #define REG_KVAL 0x478
301 #define REG_IRQVECTOR 0x47A
302 #define REG_SYNCASSERTIONMASK 0x47B
303 #define REG_ERRORTHRES 0x47C
304 #define REG_LANEENABLE 0x47D
309 #define SOFTRESET_M (1 << 7)
310 #define LSBFIRST_M (1 << 6)
311 #define ADDRINC_M (1 << 5)
312 #define SDOACTIVE_M (1 << 4)
313 #define SDOACTIVE (1 << 3)
314 #define ADDRINC (1 << 2)
315 #define LSBFIRST (1 << 1)
316 #define SOFTRESET (1 << 0)
321 #define SINGLEINS (1 << 7)
322 #define CSBSTALL (1 << 6)
327 #define DEVSTATUS(x) (((x) & 0xF) << 4)
328 #define CUSTOPMODE(x) (((x) & 0x3) << 2)
329 #define SYSOPMODE(x) (((x) & 0x3) << 0)
334 #define PROD_GRADE(x) (((x) & 0xF) << 4)
335 #define DEV_REVISION(x) (((x) & 0xF) << 0)
340 #define PAGEINDX(x) (((x) & 0x3) << 0)
345 #define SLAVEUPDATE (1 << 0)
350 #define PD_BG (1 << 7)
351 #define PD_DAC_0 (1 << 6)
352 #define PD_DAC_1 (1 << 5)
353 #define PD_DAC_2 (1 << 4)
354 #define PD_DAC_3 (1 << 3)
355 #define PD_DACM (1 << 2)
360 #define SYS_MASK (1 << 2)
361 #define DACB_MASK (1 << 1)
362 #define DACA_MASK (1 << 0)
367 #define ENA_PA_CTRL_FROM_PAPROT_ERR (1 << 6)
368 #define ENA_PA_CTRL_FROM_TXENSM (1 << 5)
369 #define ENA_PA_CTRL_FROM_BLSM (1 << 4)
370 #define ENA_PA_CTRL_FROM_SPI (1 << 3)
371 #define SPI_PA_CTRL (1 << 2)
372 #define ENA_SPI_TXEN (1 << 1)
373 #define SPI_TXEN (1 << 0)
378 #define COARSE_GROUP_DLY(x) (((x) & 0xF) << 0)
383 #define EN_CALPASS (1 << 7)
384 #define EN_CALFAIL (1 << 6)
385 #define EN_DACPLLLOST (1 << 5)
386 #define EN_DACPLLLOCK (1 << 4)
387 #define EN_SERPLLLOST (1 << 3)
388 #define EN_SERPLLLOCK (1 << 2)
389 #define EN_LANEFIFOERR (1 << 1)
390 #define EN_DRDLFIFOERR (1 << 0)
395 #define EN_PARMBAD (1 << 7)
396 #define EN_PRBSQ1 (1 << 3)
397 #define EN_PRBSI1 (1 << 2)
398 #define EN_PRBSQ0 (1 << 1)
399 #define EN_PRBSI0 (1 << 0)
404 #define EN_PAERR0 (1 << 7)
405 #define EN_BIST_DONE0 (1 << 6)
406 #define EN_BLNKDONE0 (1 << 5)
407 #define EN_REFNCOCLR0 (1 << 4)
408 #define EN_REFLOCK0 (1 << 3)
409 #define EN_REFROTA0 (1 << 2)
410 #define EN_REFWLIM0 (1 << 1)
411 #define EN_REFTRIP0 (1 << 0)
416 #define EN_PAERR1 (1 << 7)
417 #define EN_BIST_DONE1 (1 << 6)
418 #define EN_BLNKDONE1 (1 << 5)
419 #define EN_REFNCOCLR1 (1 << 4)
420 #define EN_REFLOCK1 (1 << 3)
421 #define EN_REFROTA1 (1 << 2)
422 #define EN_REFWLIM1 (1 << 1)
423 #define EN_REFTRIP1 (1 << 0)
428 #define IRQ_CALPASS (1 << 7)
429 #define IRQ_CALFAIL (1 << 6)
430 #define IRQ_DACPLLLOST (1 << 5)
431 #define IRQ_DACPLLLOCK (1 << 4)
432 #define IRQ_SERPLLLOST (1 << 3)
433 #define IRQ_SERPLLLOCK (1 << 2)
434 #define IRQ_LANEFIFOERR (1 << 1)
435 #define IRQ_DRDLFIFOERR (1 << 0)
440 #define IRQ_PARMBAD (1 << 7)
441 #define IRQ_PRBSQ1 (1 << 3)
442 #define IRQ_PRBSI1 (1 << 2)
443 #define IRQ_PRBSQ0 (1 << 1)
444 #define IRQ_PRBSI0 (1 << 0)
449 #define IRQ_PAERR0 (1 << 7)
450 #define IRQ_BIST_DONE0 (1 << 6)
451 #define IRQ_BLNKDONE0 (1 << 5)
452 #define IRQ_REFNCOCLR0 (1 << 4)
453 #define IRQ_REFLOCK0 (1 << 3)
454 #define IRQ_REFROTA0 (1 << 2)
455 #define IRQ_REFWLIM0 (1 << 1)
456 #define IRQ_REFTRIP0 (1 << 0)
461 #define IRQ_PAERR1 (1 << 7)
462 #define IRQ_BIST_DONE1 (1 << 6)
463 #define IRQ_BLNKDONE1 (1 << 5)
464 #define IRQ_REFNCOCLR1 (1 << 4)
465 #define IRQ_REFLOCK1 (1 << 3)
466 #define IRQ_REFROTA1 (1 << 2)
467 #define IRQ_REFWLIM1 (1 << 1)
468 #define IRQ_REFTRIP1 (1 << 0)
473 #define ERR_DLYOVER (1 << 5)
474 #define ERR_WINLIMIT (1 << 4)
475 #define ERR_JESDBAD (1 << 3)
476 #define ERR_KUNSUPP (1 << 2)
477 #define ERR_SUBCLASS (1 << 1)
478 #define ERR_INTSUPP (1 << 0)
483 #define TARRFAPHAZ (1 << 0)
484 #define SYNCBYPASS(x) (((x) & 0x3) << 6)
489 #define DAC_DELAY_H (1 << 0)
494 #define ERRWINDOW(x) (((x) & 0x7) << 0)
499 #define LASTUNDER (1 << 7)
500 #define LASTOVER (1 << 6)
501 #define LASTERROR_H (1 << 0)
506 #define SYNCENABLE (1 << 7)
507 #define SYNCARM (1 << 6)
508 #define SYNCCLRSTKY (1 << 5)
509 #define SYNCCLRLAST (1 << 4)
510 #define SYNCMODE(x) (((x) & 0xF) << 0)
515 #define REFBUSY (1 << 7)
516 #define REFLOCK (1 << 3)
517 #define REFROTA (1 << 2)
518 #define REFWLIM (1 << 1)
519 #define REFTRIP (1 << 0)
524 #define CURRUNDER (1 << 7)
525 #define CURROVER (1 << 6)
526 #define CURRERROR_H (1 << 0)
531 #define THRMOLD (1 << 7)
532 #define THRMOVER (1 << 4)
533 #define THRMPOS (1 << 3)
534 #define THRMZERO (1 << 2)
535 #define THRMNEG (1 << 1)
536 #define THRMUNDER (1 << 0)
541 #define DACGAIN_IM0(x) (((x) & 0x3) << 0)
546 #define DACGAIN_IM1(x) (((x) & 0x3) << 0)
551 #define DACGAIN_IM2(x) (((x) & 0x3) << 0)
556 #define DACGAIN_IM3(x) (((x) & 0x3) << 0)
561 #define ENB_DACLDO3 (1 << 7)
562 #define ENB_DACLDO2 (1 << 6)
563 #define ENB_DACLDO1 (1 << 5)
564 #define ENB_DACLDO0 (1 << 4)
569 #define STAT_LDO3 (1 << 3)
570 #define STAT_LDO2 (1 << 2)
571 #define STAT_LDO1 (1 << 1)
572 #define STAT_LDO0 (1 << 0)
577 #define SHUFFLE_MSB0 (1 << 2)
578 #define SHUFFLE_ISB0 (1 << 1)
583 #define SHUFFLE_MSB1 (1 << 2)
584 #define SHUFFLE_ISB1 (1 << 1)
589 #define SHUFFLE_MSB2 (1 << 2)
590 #define SHUFFLE_ISB2 (1 << 1)
595 #define SHUFFLE_MSB3 (1 << 2)
596 #define SHUFFLE_ISB3 (1 << 1)
601 #define NCOCLRARM (1 << 7)
602 #define NCOCLRMTCH (1 << 5)
603 #define NCOCLRPASS (1 << 4)
604 #define NCOCLRFAIL (1 << 3)
605 #define NCOCLRMODE(x) (((x) & 0x3) << 0)
610 #define PA_THRESH_MSB(x) (((x) & 0x1F) << 0)
615 #define PA_ENABLE (1 << 7)
616 #define PA_BUS_SWAP (1 << 6)
617 #define PA_AVG_TIME(x) (((x) & 0xF) << 0)
622 #define PA_POWER_MSB(x) (((x) & 0x1F) << 0)
627 #define PD_CLK01 (1 << 7)
628 #define PD_CLK23 (1 << 6)
629 #define PD_CLK_DIG (1 << 5)
630 #define PD_PCLK (1 << 4)
631 #define PD_CLK_REC (1 << 3)
636 #define PD_SYSREF (1 << 4)
637 #define HYS_ON (1 << 3)
638 #define SYSREF_RISE (1 << 2)
639 #define HYS_CNTRL1(x) (((x) & 0x3) << 0)
644 #define SYNTH_RECAL (1 << 7)
645 #define ENABLE_SYNTH (1 << 4)
650 #define CP_CAL_VALID (1 << 5)
651 #define RFPLL_LOCK (1 << 1)
656 #define LF_C2_WORD(x) (((x) & 0xF) << 4)
657 #define LF_C1_WORD(x) (((x) & 0xF) << 0)
662 #define LF_R1_WORD(x) (((x) & 0xF) << 4)
663 #define LF_C3_WORD(x) (((x) & 0xF) << 0)
668 #define LF_BYPASS_R3 (1 << 7)
669 #define LF_BYPASS_R1 (1 << 6)
670 #define LF_BYPASS_C2 (1 << 5)
671 #define LF_BYPASS_C1 (1 << 4)
672 #define LF_R3_WORD(x) (((x) & 0xF) << 0)
677 #define CP_CURRENT(x) (((x) & 0x3F) << 0)
682 #define LO_DIV_MODE(x) (((x) & 0x3) << 0)
687 #define REF_DIVRATE(x) (((x) & 0x7) << 0)
692 #define INIT_SWEEP_ERR_DAC (1 << 1)
693 #define MSB_SWEEP_ERR_DAC (1 << 0)
698 #define CAL_MSB_TAC(x) (((x) & 0x7) << 0)
703 #define CAL_START_GL (1 << 1)
704 #define CAL_EN_GL (1 << 0)
709 #define CAL_MSBLVLHI(x) (((x) & 0x3F) << 0)
714 #define CAL_MSBLVLLO(x) (((x) & 0x3F) << 0)
719 #define CAL_LTAC_THRES(x) (((x) & 0x7) << 3)
720 #define CAL_TAC_THRES(x) (((x) & 0x7) << 0)
725 #define MSB_GLOBAL_SUBAVG(x) (((x) & 0x3) << 6)
726 #define GLOBAL_AVG_CNT(x) (((x) & 0x7) << 3)
727 #define LOCAL_AVRG_CNT(x) (((x) & 0x7) << 0)
732 #define CAL_CLKDIV(x) (((x) & 0xF) << 0)
737 #define CAL_INDX(x) (((x) & 0xF) << 0)
742 #define CAL_FIN (1 << 7)
743 #define CAL_ACTIVE (1 << 6)
744 #define CAL_ERRHI (1 << 5)
745 #define CAL_ERRLO (1 << 4)
746 #define CAL_TXDACBYDAC (1 << 3)
747 #define CAL_START (1 << 1)
748 #define CAL_EN (1 << 0)
753 #define CAL_ADDR(x) (((x) & 0x3F) << 0)
758 #define CAL_DATA(x) (((x) & 0x3F) << 0)
763 #define CAL_UPDATE (1 << 7)
768 #define BINARY_FORMAT (1 << 7)
773 #define INVSINC_ENABLE (1 << 7)
774 #define DIG_GAIN_ENABLE (1 << 5)
775 #define PHASE_ADJ_ENABLE (1 << 4)
776 #define SEL_SIDEBAND (1 << 1)
777 #define I_TO_Q (1 << 0)
778 #define MODULATION_TYPE(x) (((x) & 0x3) << 2)
783 #define INTERP_MODE(x) (((x) & 0x7) << 0)
788 #define FTW_UPDATE_ACK (1 << 1)
789 #define FTW_UPDATE_REQ (1 << 0)
794 #define TX_DIG_CLK_PD (1 << 0)
799 #define GP_PA_ON_INVERT (1 << 2)
800 #define GP_PA_CTRL (1 << 1)
801 #define TXEN_SM_EN (1 << 0)
802 #define PA_FALL(x) (((x) & 0x3) << 6)
803 #define PA_RISE(x) (((x) & 0x3) << 4)
808 #define DIG_FALL(x) (((x) & 0x3) << 6)
809 #define DIG_RISE(x) (((x) & 0x3) << 4)
810 #define DAC_FALL(x) (((x) & 0x3) << 2)
811 #define DAC_RISE(x) (((x) & 0x3) << 0)
816 #define DACOUT_SHUTDOWN (1 << 1)
817 #define DACOUT_ON_TRIGGER (1 << 0)
822 #define PROTECT_MODE (1 << 7)
823 #define DACOFF_AVG_PW (1 << 0)
828 #define ADC_TESTMODE (1 << 7)
829 #define AUXADC_ENABLE (1 << 0)
830 #define FS_CURRENT(x) (((x) & 0x7) << 4)
831 #define REF_CURRENT(x) (((x) & 0x7) << 1)
836 #define SELECT_CLKDIG (1 << 3)
837 #define EN_DIV2 (1 << 2)
838 #define INCAP_CTRL(x) (((x) & 0x3) << 0)
843 #define DIE_TEMP_UPDATE (1 << 0)
848 #define DISABLE_NOISE (1 << 1)
849 #define DC_OFFSET_ON (1 << 0)
854 #define IPATH_DC_OFFSET_2PART(x) (((x) & 0x1F) << 0)
859 #define QPATH_DC_OFFSET_2PART(x) (((x) & 0x1F) << 0)
864 #define IDAC_DIG_GAIN1(x) (((x) & 0xF) << 0)
869 #define QDAC_DIG_GAIN1(x) (((x) & 0xF) << 0)
874 #define GAIN_RAMP_UP_STP1(x) (((x) & 0xF) << 0)
879 #define GAIN_RAMP_DOWN_STP1(x) (((x) & 0xF) << 0)
884 #define RESET_BLSM (1 << 7)
885 #define EN_FORCE_GAIN_SOFT_OFF (1 << 4)
886 #define GAIN_SOFT_OFF (1 << 3)
887 #define GAIN_SOFT_ON (1 << 2)
888 #define EN_FORCE_GAIN_SOFT_ON (1 << 1)
893 #define SOFT_OFF_DONE (1 << 5)
894 #define SOFT_ON_DONE (1 << 4)
895 #define GAIN_SOFT_OFF_RB (1 << 3)
896 #define GAIN_SOFT_ON_RB (1 << 2)
897 #define SOFT_OFF_EN_RB (1 << 1)
898 #define SOFT_ON_EN_RB (1 << 0)
899 #define SOFTBLANKRB(x) (((x) & 0x3) << 6)
904 #define PRBS_GOOD_Q (1 << 7)
905 #define PRBS_GOOD_I (1 << 6)
906 #define PRBS_INV_Q (1 << 4)
907 #define PRBS_INV_I (1 << 3)
908 #define PRBS_MODE (1 << 2)
909 #define PRBS_RESET (1 << 1)
910 #define PRBS_EN (1 << 0)
915 #define VCO_VAR(x) (((x) & 0xF) << 0)
920 #define VCO_BIAS_REF(x) (((x) & 0x7) << 0)
925 #define VCO_CAL_REF_MON (1 << 3)
926 #define VCO_CAL_REF_TCF(x) (((x) & 0x7) << 0)
931 #define VCO_VAR_REF_TCF(x) (((x) & 0x7) << 4)
932 #define VCO_VAR_OFF(x) (((x) & 0xF) << 0)
937 #define SPIDRV(x) (((x) & 0xF) << 0)
942 #define DUTYCYCLEON (1 << 0)
947 #define ATEST_EN (1 << 0)
948 #define ATEST_TOPVSEL(x) (((x) & 0x3) << 5)
949 #define ATEST_DACSEL(x) (((x) & 0x3) << 3)
950 #define ATEST_VSEL(x) (((x) & 0x3) << 1)
955 #define EN_CLKDIV (1 << 3)
956 #define ASPI_OSC_RATE (1 << 2)
957 #define ASPI_CLK_SRC (1 << 1)
958 #define EN_ASPI_OSC (1 << 0)
963 #define SPI_PD_MASTER (1 << 0)
968 #define SPI_SYNC1_PD (1 << 1)
969 #define SPI_SYNC2_PD (1 << 0)
974 #define SPI_ENHALFRATE (1 << 5)
975 #define SPI_DIVISION_RATE(x) (((x) & 0x3) << 1)
980 #define SPI_EQ_CONFIG1(x) (((x) & 0xF) << 4)
981 #define SPI_EQ_CONFIG0(x) (((x) & 0xF) << 0)
986 #define SPI_EQ_CONFIG3(x) (((x) & 0xF) << 4)
987 #define SPI_EQ_CONFIG2(x) (((x) & 0xF) << 0)
992 #define SPI_EQ_CONFIG5(x) (((x) & 0xF) << 4)
993 #define SPI_EQ_CONFIG4(x) (((x) & 0xF) << 0)
998 #define SPI_EQ_CONFIG7(x) (((x) & 0xF) << 4)
999 #define SPI_EQ_CONFIG6(x) (((x) & 0xF) << 0)
1004 #define SPI_EQ_EXTRA_SPI_LSBITS(x) (((x) & 0x3) << 6)
1005 #define SPI_EQ_BIASPTAT(x) (((x) & 0x7) << 3)
1006 #define SPI_EQ_BIASPLY(x) (((x) & 0x7) << 0)
1011 #define SPI_RECAL_SYNTH (1 << 2)
1012 #define SPI_ENABLE_SYNTH (1 << 0)
1017 #define SPI_CP_CAL_VALID_RB (1 << 3)
1018 #define SPI_PLL_LOCK_RB (1 << 0)
1023 #define SPI_CDR_OVERSAMP(x) (((x) & 0x3) << 0)
1028 #define SPI_I_TUNE_R_CAL_TERMBLK1 (1 << 0)
1033 #define SPI_I_TUNE_R_CAL_TERMBLK2 (1 << 0)
1038 #define CHECKSUM_MODE (1 << 6)
1039 #define LINK_MODE (1 << 3)
1040 #define SEL_REG_MAP_1 (1 << 2)
1041 #define LINK_EN(x) (((x) & 0x3) << 0)
1046 #define SUBCLASSV_LOCAL(x) (((x) & 0x7) << 0)
1051 #define DYN_LINK_LATENCY_0(x) (((x) & 0x1F) << 0)
1056 #define DYN_LINK_LATENCY_1(x) (((x) & 0x1F) << 0)
1061 #define LMFC_DELAY_0(x) (((x) & 0x1F) << 0)
1066 #define LMFC_DELAY_1(x) (((x) & 0x1F) << 0)
1071 #define LMFC_VAR_0(x) (((x) & 0x1F) << 0)
1076 #define LMFC_VAR_1(x) (((x) & 0x1F) << 0)
1081 #define SRC_LANE1(x) (((x) & 0x7) << 3)
1082 #define SRC_LANE0(x) (((x) & 0x7) << 0)
1087 #define SRC_LANE3(x) (((x) & 0x7) << 3)
1088 #define SRC_LANE2(x) (((x) & 0x7) << 0)
1093 #define SRC_LANE5(x) (((x) & 0x7) << 3)
1094 #define SRC_LANE4(x) (((x) & 0x7) << 0)
1099 #define SRC_LANE7(x) (((x) & 0x7) << 3)
1100 #define SRC_LANE6(x) (((x) & 0x7) << 0)
1105 #define DRDL_FIFO_EMPTY (1 << 1)
1106 #define DRDL_FIFO_FULL (1 << 0)
1111 #define EOMF_MASK_1 (1 << 3)
1112 #define EOMF_MASK_0 (1 << 2)
1113 #define EOF_MASK_1 (1 << 1)
1114 #define EOF_MASK_0 (1 << 0)
1119 #define SYNCB_ERR_DUR(x) (((x) & 0xF) << 4)
1120 #define SYNCB_SYNCREQ_DUR(x) (((x) & 0xF) << 0)
1125 #define PHY_TEST_START (1 << 1)
1126 #define PHY_TEST_RESET (1 << 0)
1127 #define PHY_SRC_ERR_CNT(x) (((x) & 0x7) << 4)
1128 #define PHY_PRBS_PAT_SEL(x) (((x) & 0x3) << 2)
1133 #define SHORT_TPL_TEST_RESET (1 << 1)
1134 #define SHORT_TPL_TEST_EN (1 << 0)
1135 #define SHORT_TPL_SP_SEL(x) (((x) & 0x3) << 4)
1136 #define SHORT_TPL_M_SEL(x) (((x) & 0x3) << 2)
1141 #define SHORT_TPL_FAIL (1 << 0)
1146 #define ADJCNT_RD(x) (((x) & 0xF) << 4)
1147 #define BID_RD(x) (((x) & 0xF) << 0)
1152 #define ADJDIR_RD (1 << 6)
1153 #define PHADJ_RD (1 << 5)
1154 #define LID0_RD(x) (((x) & 0x1F) << 0)
1159 #define SCR_RD (1 << 7)
1160 #define L_RD(x) (((x) & 0x1F) << 0)
1165 #define K_RD(x) (((x) & 0x1F) << 0)
1170 #define CS_RD(x) (((x) & 0x3) << 6)
1171 #define N_RD(x) (((x) & 0x1F) << 0)
1176 #define SUBCLASSV_RD(x) (((x) & 0x7) << 5)
1177 #define NP_RD(x) (((x) & 0x1F) << 0)
1182 #define JESDV_RD(x) (((x) & 0x7) << 5)
1183 #define S_RD(x) (((x) & 0x1F) << 0)
1188 #define HD_RD (1 << 7)
1189 #define CF_RD(x) (((x) & 0x1F) << 0)
1194 #define LID1_RD(x) (((x) & 0x1F) << 0)
1199 #define LID2_RD(x) (((x) & 0x1F) << 0)
1204 #define LID3_RD(x) (((x) & 0x1F) << 0)
1209 #define LID4_RD(x) (((x) & 0x1F) << 0)
1214 #define LID5_RD(x) (((x) & 0x1F) << 0)
1219 #define LID6_RD(x) (((x) & 0x1F) << 0)
1224 #define LID7_RD(x) (((x) & 0x1F) << 0)
1229 #define ADJCNT(x) (((x) & 0xF) << 4)
1230 #define BID(x) (((x) & 0xF) << 0)
1235 #define ADJDIR (1 << 6)
1236 #define PHADJ (1 << 5)
1237 #define LID0(x) (((x) & 0x1F) << 0)
1242 #define SCR (1 << 7)
1243 #define L(x) (((x) & 0x1F) << 0)
1248 #define K(x) (((x) & 0x1F) << 0)
1253 #define CS(x) (((x) & 0x3) << 6)
1254 #define N(x) (((x) & 0x1F) << 0)
1259 #define SUBCLASSV(x) (((x) & 0x7) << 5)
1260 #define NP(x) (((x) & 0x1F) << 0)
1265 #define JESDV(x) (((x) & 0x7) << 5)
1266 #define S(x) (((x) & 0x1F) << 0)
1272 #define CF(x) (((x) & 0x1F) << 0)
1277 #define LANESEL(x) (((x) & 0x7) << 4)
1278 #define CNTRSEL(x) (((x) & 0x3) << 0)
1283 #define RST_IRQ_DIS (1 << 7)
1284 #define DIS_ERR_CNTR_DIS (1 << 6)
1285 #define RST_ERR_CNTR_DIS (1 << 5)
1286 #define LANE_ADDR_DIS(x) (((x) & 0x7) << 0)
1291 #define RST_IRQ_NIT (1 << 7)
1292 #define DIS_ERR_CNTR_NIT (1 << 6)
1293 #define RST_ERR_CNTR_NIT (1 << 5)
1294 #define LANE_ADDR_NIT(x) (((x) & 0x7) << 0)
1299 #define RST_IRQ_K (1 << 7)
1300 #define DIS_ERR_CNTR_K (1 << 6)
1301 #define RST_ERR_CNTR_K (1 << 5)
1302 #define LANE_ADDR_K(x) (((x) & 0x7) << 0)
1307 #define ILAS_MODE (1 << 7)
1308 #define REPDATATEST (1 << 5)
1309 #define QUETESTERR (1 << 4)
1310 #define AUTO_ECNTR_RST (1 << 3)
1315 #define BADDIS_FLAG_OR_MASK (1 << 7)
1316 #define NITD_FLAG_OR_MASK (1 << 6)
1317 #define UEKC_FLAG_OR_MASK (1 << 5)
1318 #define INITIALLANESYNC_FLAG_OR_MASK (1 << 3)
1319 #define BADCHECKSUM_FLAG_OR_MASK (1 << 2)
1320 #define CODEGRPSYNC_FLAG_OR_MASK (1 << 0)
1325 #define BAD_DIS_S (1 << 7)
1326 #define NIT_DIS_S (1 << 6)
1327 #define UNEX_K_S (1 << 5)
1328 #define CMM_FLAG_OR_MASK (1 << 4)
1329 #define CMM_ENABLE (1 << 3)
1332 #define AD9152_MAX_DAC_RATE 2000000000UL
1333 #define AD9152_CHIP_ID 0x52
1334 #define AD9152_TEST_PN15 0x01
1335 #define AD9152_TEST_PN7 0x00
Definition: ad9152.h:1351
int32_t ad9152_datapath_prbs_test(struct ad9152_dev *dev, struct ad9152_init_param init_param)
ad9152_setup
Definition: ad9152.c:256
Definition: ad9152.h:1341
uint32_t lane_rate_kbps
Definition: ad9152.h:1348
int32_t no_os_spi_write_and_read(struct no_os_spi_desc *desc, uint8_t *data, uint16_t bytes_number)
Write and read data to/from SPI.
Definition: no_os_spi.c:159
#define REG_PRBS_ERROR_I
Definition: ad9144.h:183
#define REG_GOODCHKSUMFLG
Definition: ad9144.h:310
#define SOFTRESET_M
Definition: ad9144.h:323
Header file of SPI Interface.
int32_t ad9152_spi_read(struct ad9152_dev *dev, uint16_t reg_addr, uint8_t *reg_data)
ad9152_spi_read
Definition: ad9152.c:45
Header file of Delay functions.
Definition: ad9361_util.h:69
#define REG_FRAMESYNCFLG
Definition: ad9144.h:309
int32_t ad9152_setup(struct ad9152_dev **device, struct ad9152_init_param init_param)
ad9152_setup
Definition: ad9152.c:90
int32_t ad9152_setup(struct ad9152_dev **device, struct ad9152_init_param init_param)
ad9152_setup
Definition: ad9152.c:90
void no_os_mdelay(uint32_t msecs)
Wait until msecs milliseconds passed.
Definition: aducm3029_delay.c:126
uint32_t prbs_type
Definition: ad9152.h:1347
int32_t ad9152_short_pattern_test(struct ad9152_dev *dev, struct ad9152_init_param init_param)
ad9152_setup
Definition: ad9152.c:216
#define AD9152_CHIP_ID
Definition: ad9152.h:1333
#define REG_INITLANESYNCFLG
Definition: ad9144.h:311
#define SOFTRESET
Definition: ad9144.h:330
int32_t ad9152_spi_write(struct ad9152_dev *dev, uint16_t reg_addr, uint8_t reg_data)
ad9152_spi_write
Definition: ad9152.c:68
int32_t ad9152_spi_write(struct ad9152_dev *dev, uint16_t reg_addr, uint8_t reg_data)
ad9152_spi_write
Definition: ad9152.c:68
#define REG_SPI_PRODIDL
Definition: ad9144.h:51
Structure holding SPI descriptor.
Definition: no_os_spi.h:192
int32_t ad9152_status(struct ad9152_dev *dev)
ad9152_setup
Definition: ad9152.c:296
uint32_t stpl_samples[2][4]
Definition: ad9152.h:1345
int32_t ad9152_datapath_prbs_test(struct ad9152_dev *dev, struct ad9152_init_param init_param)
ad9152_setup
Definition: ad9152.c:256
void * no_os_malloc(size_t size)
Allocate memory and return a pointer to it.
Definition: chibios_alloc.c:43
int32_t ad9152_remove(struct ad9152_dev *dev)
Free the resources allocated by ad9152_setup().
Definition: ad9152.c:201
void no_os_free(void *ptr)
Deallocate memory previously allocated by a call to no_os_calloc or no_os_malloc.
Definition: chibios_alloc.c:69
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
Header file of AD9152 Driver.
int32_t ad9152_short_pattern_test(struct ad9152_dev *dev, struct ad9152_init_param init_param)
ad9152_setup
Definition: ad9152.c:216
#define REG_SPI_INTFCONFA
Definition: ad9144.h:48
int32_t no_os_spi_remove(struct no_os_spi_desc *desc)
Free the resources allocated by no_os_spi_init().
Definition: no_os_spi.c:116
#define REG_CODEGRPSYNCFLG
Definition: ad9144.h:308
int32_t no_os_spi_init(struct no_os_spi_desc **desc, const struct no_os_spi_init_param *param)
Initialize the SPI communication peripheral.
Definition: no_os_spi.c:52
struct no_os_spi_desc * spi_desc
Definition: ad9152.h:1353
int32_t ad9152_remove(struct ad9152_dev *dev)
Free the resources allocated by ad9152_setup().
Definition: ad9152.c:201
struct no_os_spi_init_param spi_init
Definition: ad9152.h:1343
int32_t ad9152_spi_read(struct ad9152_dev *dev, uint16_t reg_addr, uint8_t *reg_data)
ad9152_spi_read
Definition: ad9152.c:45
uint32_t interpolation
Definition: ad9152.h:1346
#define REG_PRBS_ERROR_Q
Definition: ad9144.h:184
int32_t ad9152_status(struct ad9152_dev *dev)
ad9152_setup
Definition: ad9152.c:296
chip_id
Definition: ad9172.h:51
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:140
#define REG_PRBS
Definition: ad9144.h:182