46#define ADF4377_REG(x) (x)
49#define ADF4377_SOFT_RESET_R_MSK NO_OS_BIT(7)
50#define ADF4377_SOFT_RESET_R(x) no_os_field_prep(ADF4377_SOFT_RESET_R_MSK, x)
51#define ADF4377_SOFT_RESET_MSK NO_OS_BIT(0)
52#define ADF4377_SOFT_RESET(x) no_os_field_prep(ADF4377_SOFT_RESET_MSK, x)
53#define ADF4377_LSB_FIRST_R_MSK NO_OS_BIT(6)
54#define ADF4377_LSB_FIRST_R(x) no_os_field_prep(ADF4377_LSB_FIRST_R_MSK, x)
55#define ADF4377_LSB_FIRST_MSK NO_OS_BIT(1)
56#define ADF4377_LSB_FIRST(x) no_os_field_prep(ADF4377_LSB_FIRST_MSK, x)
57#define ADF4377_ADDRESS_ASC_R_MSK NO_OS_BIT(5)
58#define ADF4377_ADDRESS_ASC_R(x) no_os_field_prep(ADF4377_ADDRESS_ASC_R_MSK, x)
59#define ADF4377_ADDRESS_ASC_MSK NO_OS_BIT(2)
60#define ADF4377_ADDRESS_ASC(x) no_os_field_prep(ADF4377_ADDRESS_ASC_MSK, x)
61#define ADF4377_SDO_ACTIVE_R_MSK NO_OS_BIT(4)
62#define ADF4377_SDO_ACTIVE_R(x) no_os_field_prep(ADF4377_SDO_ACTIVE_R_MSK, x)
63#define ADF4377_SDO_ACTIVE_MSK NO_OS_BIT(3)
64#define ADF4377_SDO_ACTIVE(x) no_os_field_prep(ADF4377_SDO_ACTIVE_MSK, x)
65#define ADF4377_RESET_CMD 0x81
68#define ADF4377_SDO_ACTIVE_SPI_3W 0x0
69#define ADF4377_SDO_ACTIVE_SPI_4W 0x1
71#define ADF4377_ADDR_ASC_AUTO_DECR 0x0
72#define ADF4377_ADDR_ASC_AUTO_INCR 0x1
74#define ADF4377_LSB_FIRST_MSB 0x0
75#define ADF4377_LSB_FIRST_LSB 0x1
77#define ADF4377_SOFT_RESET_N_OP 0x0
78#define ADF4377_SOFT_RESET_EN 0x1
81#define ADF4377_SINGLE_INSTR_MSK NO_OS_BIT(7)
82#define ADF4377_SINGLE_INSTR(x) no_os_field_prep(ADF4377_SINGLE_INSTRUCTION_MSK, x)
83#define ADF4377_MASTER_RB_CTRL_MSK NO_OS_BIT(5)
84#define ADF4377_MASTER_RB_CTRL(x) no_os_field_prep(ADF4377_MASTER_RB_CTRL_MSK, x)
87#define ADF4377_SPI_STREAM_EN 0x0
88#define ADF4377_SPI_STREAM_DIS 0x1
90#define ADF4377_RB_SLAVE_REG 0x0
91#define ADF4377_RB_MASTER_REG 0x1
94#define ADF4377_CHIP_TYPE 0x06
97#define ADF4377_PRODUCT_ID_LSB 0x0005
100#define ADF4377_PRODUCT_ID_MSB 0x0005
103#define ADF4377_SCRATCHPAD_MSK NO_OS_GENMASK(7, 0)
104#define ADF4377_SCRATCHPAD(x) no_os_field_prep(ADF4377_SCRATCHPAD_MSK, x)
107#define ADF4377_SPI_REVISION 0x01
110#define ADF4377_VENDOR_ID_LSB 0x456
113#define ADF4377_VENDOR_ID_MSB 0x456
116#define ADF4377_R00F_RSV1 0x14
119#define ADF4377_N_INT_LSB_MSK NO_OS_GENMASK(7, 0)
120#define ADF4377_N_INT_LSB(x) no_os_field_prep(ADF4377_N_INT_LSB_MSK, x)
123#define ADF4377_EN_AUTOCAL_MSK NO_OS_BIT(7)
124#define ADF4377_EN_AUTOCAL(x) no_os_field_prep(ADF4377_EN_AUTOCAL_MSK, x)
125#define ADF4377_EN_RDBLR_MSK NO_OS_BIT(6)
126#define ADF4377_EN_RDBLR(x) no_os_field_prep(ADF4377_EN_RDBLR_MSK, x)
127#define ADF4377_DCLK_DIV2_MSK NO_OS_GENMASK(5,4)
128#define ADF4377_DCLK_DIV2(x) no_os_field_prep(ADF4377_DCLK_DIV2_MSK, x)
129#define ADF4377_N_INT_MSB_MSK NO_OS_GENMASK(3,0)
130#define ADF4377_N_INT_MSB(x) no_os_field_prep(ADF4377_N_INT_MSB_MSK, x)
133#define ADF4377_VCO_CALIB_DIS 0x0
134#define ADF4377_VCO_CALIB_EN 0x1
136#define ADF4377_REF_DBLR_DIS 0x0
137#define ADF4377_REF_DBLR_EN 0x1
139#define ADF4377_DCLK_DIV2_1 0x0
140#define ADF4377_DCLK_DIV2_2 0x1
141#define ADF4377_DCLK_DIV2_4 0x2
142#define ADF4377_DCLK_DIV2_8 0x3
145#define ADF4377_CLKOUT_DIV_MSK NO_OS_GENMASK(7, 6)
146#define ADF4377_CLKOUT_DIV(x) no_os_field_prep(ADF4377_CLKOUT_DIV_MSK, x)
147#define ADF4377_R_DIV_MSK NO_OS_GENMASK(5, 0)
148#define ADF4377_R_DIV(x) no_os_field_prep(ADF4377_R_DIV_MSK, x)
151#define ADF4377_CLKOUT_DIV_1 0x0
152#define ADF4377_CLKOUT_DIV_2 0x1
153#define ADF4377_CLKOUT_DIV_4 0x2
154#define ADF4377_CLKOUT_DIV_8 0x3
156#define ADF4377_MIN_R_DIV 0x00
157#define ADF4378_MAX_R_DIV 0x3F
160#define ADF4377_M_VCO_CORE_MSK NO_OS_GENMASK(5,4)
161#define ADF4377_M_VCO_CORE(x) no_os_field_prep(ADF4377_M_VCO_CORE_MSK, x)
162#define ADF4377_M_VCO_BIAS_MSK NO_OS_GENMASK(3,0)
163#define ADF4377_M_VCO_BIAS(x) no_os_field_prep(ADF4377_M_VCO_BIAS_MSK, x)
166#define ADF4377_M_VCO_0 0x0
167#define ADF4377_M_VCO_1 0x1
168#define ADF4377_M_VCO_2 0x2
169#define ADF4377_M_VCO_3 0x3
171#define M_VCO_BIAS_MIN 0xF
172#define M_VCO_BIAS_MAX 0x0
175#define ADF4377_M_VCO_BAND_MSK NO_OS_GENMASK(7,0)
176#define ADF4377_M_VCO_BAND(x) no_os_field_prep(ADF4377_M_VCO_BAND_MSK, x)
179#define ADF4377_VCO_BAND_MIN 0xFF
180#define ADF4377_VCO_BAND_MAX 0x00
183#define ADF4377_BLEED_I_LSB_MSK NO_OS_GENMASK(7, 6)
184#define ADF4377_BLEED_I_LSB(x) no_os_field_prep(ADF4377_BLEED_I_LSB_MSK, x)
185#define ADF4377_BLEED_POL_MSK NO_OS_BIT(5)
186#define ADF4377_BLEED_POL(x) no_os_field_prep(ADF4377_BLEED_POL_MSK, x)
187#define ADF4377_EN_BLEED_MSK NO_OS_BIT(4)
188#define ADF4377_EN_BLEED(x) no_os_field_prep(ADF4377_EN_BLEED_MSK, x)
189#define ADF4377_CP_I_MSK NO_OS_GENMASK(3, 0)
190#define ADF4377_CP_I(x) no_os_field_prep(ADF4377_CP_I_MSK, x)
193#define ADF4377_CURRENT_SINK 0x0
194#define ADF4377_CURRENT_SOURCE 0x1
196#define ADF4377_CP_0MA7 0x0
197#define ADF4377_CP_0MA9 0x1
198#define ADF4377_CP_1MA1 0x2
199#define ADF4377_CP_1MA3 0x3
200#define ADF4377_CP_1MA4 0x4
201#define ADF4377_CP_1MA8 0x5
202#define ADF4377_CP_2MA2 0x6
203#define ADF4377_CP_2MA5 0x7
204#define ADF4377_CP_2MA9 0x8
205#define ADF4377_CP_3MA6 0x9
206#define ADF4377_CP_4MA3 0xA
207#define ADF4377_CP_5MA0 0xB
208#define ADF4377_CP_5MA7 0xC
209#define ADF4377_CP_7MA2 0xD
210#define ADF4377_CP_8MA6 0xE
211#define ADF4377_CP_10MA1 0xF
214#define ADF4377_BLEED_I_MSB_MSK NO_OS_GENMASK(7, 0)
215#define ADF4377_BLEED_I_MSB(x) no_os_field_prep(ADF4377_BLEED_I_MSB_MSK, x)
218#define ADF4377_INV_CLKOUT_MSK NO_OS_BIT(7)
219#define ADF4377_INV_CLKOUT(x) no_os_field_prep(ADF4377_INV_CLKOUT_MSK, x)
220#define ADF4377_N_DEL_MSK NO_OS_GENMASK(6, 0)
221#define ADF4377_N_DEL(x) no_os_field_prep(ADF4377_N_DEL_MSK, x)
224#define ADF4377_CMOS_OV_MSK NO_OS_BIT(7)
225#define ADF4377_CMOS_OV(x) no_os_field_prep(ADF4377_CMOS_OV_MSK, x)
226#define ADF4377_R_DEL_MSK NO_OS_GENMASK(6, 0)
227#define ADF4377_R_DEL(x) no_os_field_prep(ADF4377_R_DEL_MSK, x)
230#define ADF4377_1V8_LOGIC 0x0
231#define ADF4377_3V3_LOGIC 0x1
233#define ADF4377_R_N_DEL_MIN 0x00
234#define ADF4377_R_N_DEL_MAX 0x7F
237#define ADF4377_CLKOUT2_OP_MSK NO_OS_GENMASK(7, 6)
238#define ADF4377_CLKOUT2_OP(x) no_os_field_prep(ADF4377_CLKOUT2_OP_MSK, x)
239#define ADF4377_CLKOUT1_OP_MSK NO_OS_GENMASK(5, 4)
240#define ADF4377_CLKOUT1_OP(x) no_os_field_prep(ADF4377_CLKOUT1_OP_MSK, x)
241#define ADF4377_PD_CLK_MSK NO_OS_BIT(3)
242#define ADF4377_PD_CLK(x) no_os_field_prep(ADF4377_PD_CLK_MSK, x)
243#define ADF4377_PD_RDET_MSK NO_OS_BIT(2)
244#define ADF4377_PD_RDET(x) no_os_field_prep(ADF4377_PD_RDET_MSK, x)
245#define ADF4377_PD_ADC_MSK NO_OS_BIT(1)
246#define ADF4377_PD_ADC(x) no_os_field_prep(ADF4377_PD_ADC_MSK, x)
247#define ADF4377_PD_CALADC_MSK NO_OS_BIT(0)
248#define ADF4377_PD_CALADC(x) no_os_field_prep(ADF4377_PD_CALADC_MSK, x)
251#define ADF4377_CLKOUT_320MV 0x0
252#define ADF4377_CLKOUT_420MV 0x1
253#define ADF4377_CLKOUT_530MV 0x2
254#define ADF4377_CLKOUT_640MV 0x3
256#define ADF4377_PD_CLK_N_OP 0x0
257#define ADF4377_PD_CLK_PD 0x1
259#define ADF4377_PD_RDET_N_OP 0x0
260#define ADF4377_PD_RDET_PD 0x1
262#define ADF4377_PD_ADC_N_OP 0x0
263#define ADF4377_PD_ADC_PD 0x1
265#define ADF4377_PD_CALADC_N_OP 0x0
266#define ADF4377_PD_CALADC_PD 0x1
269#define ADF4377_PD_ALL_MSK NO_OS_BIT(7)
270#define ADF4377_PD_ALL(x) no_os_field_prep(ADF4377_PD_ALL_MSK, x)
271#define ADF4377_PD_RDIV_MSK NO_OS_BIT(6)
272#define ADF4377_PD_RDIV(x) no_os_field_prep(ADF4377_PD_RDIV_MSK, x)
273#define ADF4377_PD_NDIV_MSK NO_OS_BIT(5)
274#define ADF4377_PD_NDIV(x) no_os_field_prep(ADF4377_PD_NDIV_MSK, x)
275#define ADF4377_PD_VCO_MSK NO_OS_BIT(4)
276#define ADF4377_PD_VCO(x) no_os_field_prep(ADF4377_PD_VCO_MSK, x)
277#define ADF4377_PD_LD_MSK NO_OS_BIT(3)
278#define ADF4377_PD_LD(x) no_os_field_prep(ADF4377_PD_LD_MSK, x)
279#define ADF4377_PD_PFDCP_MSK NO_OS_BIT(2)
280#define ADF4377_PD_PFDCP(x) no_os_field_prep(ADF4377_PD_PFDCP_MSK, x)
281#define ADF4377_PD_CLKOUT1_MSK NO_OS_BIT(1)
282#define ADF4377_PD_CLKOUT1(x) no_os_field_prep(ADF4377_PD_CLKOUT1_MSK, x)
283#define ADF4377_PD_CLKOUT2_MSK NO_OS_BIT(0)
284#define ADF4377_PD_CLKOUT2(x) no_os_field_prep(ADF4377_PD_CLKOUT2_MSK, x)
287#define ADF4377_PD_ALL_N_OP 0x0
288#define ADF4377_PD_ALL_PD 0x1
290#define ADF4377_PD_RDIV_N_OP 0x0
291#define ADF4377_PD_RDIV_PD 0x1
293#define ADF4377_PD_NDIV_N_OP 0x0
294#define ADF4377_PD_NDIV_PD 0x1
296#define ADF4377_PD_VCO_N_OP 0x0
297#define ADF4377_PD_VCO_PD 0x1
299#define ADF4377_PD_LD_N_OP 0x0
300#define ADF4377_PD_LD_PD 0x1
302#define ADF4377_PD_PFDCP_N_OP 0x0
303#define ADF4377_PD_PFDCP_PD 0x1
305#define ADF4377_PD_CLKOUT1_N_OP 0x0
306#define ADF4377_PD_CLKOUT1_PD 0x1
308#define ADF4377_PD_CLKOUT2_N_OP 0x0
309#define ADF4377_PD_CLKOUT2_PD 0x1
312#define ADF4377_EN_LOL_MSK NO_OS_BIT(7)
313#define ADF4377_EN_LOL(x) no_os_field_prep(ADF4377_EN_LOL_MSK, x)
314#define ADF4377_LDWIN_PW_MSK NO_OS_BIT(6)
315#define ADF4377_LDWIN_PW(x) no_os_field_prep(ADF4377_LDWIN_PW_MSK, x)
316#define ADF4377_EN_LDWIN_MSK NO_OS_BIT(5)
317#define ADF4377_EN_LDWIN(x) no_os_field_prep(ADF4377_EN_LDWIN_MSK, x)
318#define ADF4377_LD_COUNT_MSK NO_OS_GENMASK(4, 0)
319#define ADF4377_LD_COUNT(x) no_os_field_prep(ADF4377_LD_COUNT_MSK, x)
323#define ADF4377_LDWIN_PW_NARROW 0x0
324#define ADF4377_LDWIN_PW_WIDE 0x1
327#define ADF4377_EN_DNCLK_MSK NO_OS_BIT(7)
328#define ADF4377_EN_DNCLK(x) no_os_field_prep(ADF4377_EN_DNCLK_MSK, x)
329#define ADF4377_EN_DRCLK_MSK NO_OS_BIT(6)
330#define ADF4377_EN_DRCLK(x) no_os_field_prep(ADF4377_EN_DRCLK_MSK, x)
331#define ADF4377_RST_LD_MSK NO_OS_BIT(2)
332#define ADF4377_RST_LD(x) no_os_field_prep(ADF4377_RST_LD_MSK, x)
333#define ADF4377_R01C_RSV1_MSK NO_OS_BIT(0)
334#define ADF4377_R01C_RSV1(x) no_os_field_prep(ADF4377_R01C_RSV1_MSK, x)
337#define ADF4377_EN_DNCLK_OFF 0x0
338#define ADF4377_EN_DNCLK_ON 0x1
340#define ADF4377_EN_DRCLK_OFF 0x0
341#define ADF4377_EN_DRCLK_ON 0x1
343#define ADF4377_RST_LD_INACTIVE 0x0
344#define ADF4377_RST_LD_ACTIVE 0x1
347#define ADF4377_MUXOUT_MSK NO_OS_GENMASK(7, 4)
348#define ADF4377_MUXOUT(x) no_os_field_prep(ADF4377_MUXOUT_MSK, x)
349#define ADF4377_EN_CPTEST_MSK NO_OS_BIT(2)
350#define ADF4377_EN_CPTEST(x) no_os_field_prep(ADF4377_EN_CPTEST_MSK, x)
351#define ADF4377_CP_DOWN_MSK NO_OS_BIT(1)
352#define ADF4377_CP_DOWN(x) no_os_field_prep(ADF4377_CP_DOWN_MSK, x)
353#define ADF4377_CP_UP_MSK NO_OS_BIT(0)
354#define ADF4377_CP_UP(x) no_os_field_prep(ADF4377_CP_UP_MSK, x)
357#define ADF4377_MUXOUT_HIGH_Z 0x0
358#define ADF4377_MUXOUT_LKDET 0x1
359#define ADF4377_MUXOUT_LOW 0x2
360#define ADF4377_MUXOUT_DIV_RCLK_2 0x4
361#define ADF4377_MUXOUT_DIV_NCLK_2 0x5
362#define ADF4377_MUXOUT_HIGH 0x8
364#define ADF4377_EN_CPTEST_OFF 0x0
365#define ADF4377_EN_CPTEST_ON 0x1
367#define ADF4377_CP_DOWN_OFF 0x0
368#define ADF4377_CP_DOWN_ON 0x1
370#define ADF4377_CP_UP_OFF 0x0
371#define ADF4377_CP_UP_ON 0x1
374#define ADF4377_BST_REF_MSK NO_OS_BIT(7)
375#define ADF4377_BST_REF(x) no_os_field_prep(ADF4377_BST_REF_MSK, x)
376#define ADF4377_FILT_REF_MSK NO_OS_BIT(6)
377#define ADF4377_FILT_REF(x) no_os_field_prep(ADF4377_FILT_REF_MSK, x)
378#define ADF4377_REF_SEL_MSK NO_OS_BIT(5)
379#define ADF4377_REF_SEL(x) no_os_field_prep(ADF4377_REF_SEL_MSK, x)
380#define ADF4377_R01F_RSV1_MSK NO_OS_GENMASK(2, 0)
381#define ADF4377_R01F_RSV1(x) no_os_field_prep(ADF4377_R01F_RSV1_MSK, x)
384#define ADF4377_BST_LARGE_REF_IN 0x0
385#define ADF4377_BST_SMALL_REF_IN 0x1
387#define ADF4377_FILT_REF_OFF 0x0
388#define ADF4377_FILT_REF_ON 0x1
390#define ADF4377_REF_SEL_DMA 0x0
391#define ADF4377_REF_SEL_LNA 0x1
394#define ADF4377_RST_SYS_MSK NO_OS_BIT(4)
395#define ADF4377_RST_SYS(x) no_os_field_prep(ADF4377_RST_SYS_MSK, x)
396#define ADF4377_EN_ADC_CLK_MSK NO_OS_BIT(3)
397#define ADF4377_EN_ADC_CLK(x) no_os_field_prep(ADF4377_EN_ADC_CLK_MSK, x)
398#define ADF4377_R020_RSV1_MSK NO_OS_BIT(0)
399#define ADF4377_R020_RSV1(x) no_os_field_prep(ADF4377_R020_RSV1_MSK, x)
402#define ADF4377_RST_SYS_INACTIVE 0x0
403#define ADF4377_RST_SYS_ACTIVE 0x1
406#define ADF4377_R021_RSV1 0xD3
409#define ADF4377_R022_RSV1 0x32
412#define ADF4377_R023_RSV1 0x18
415#define ADF4377_DCLK_MODE_MSK NO_OS_BIT(2)
416#define ADF4377_DCLK_MODE(x) no_os_field_prep(ADF4377_DCLK_MODE_MSK, x)
419#define ADF4377_CLKODIV_DB_MSK NO_OS_BIT(7)
420#define ADF4377_CLKODIV_DB(x) no_os_field_prep(ADF4377_CLKODIV_DB_MSK, x)
421#define ADF4377_DCLK_DB_MSK NO_OS_BIT(6)
422#define ADF4377_DCLK_DB(x) no_os_field_prep(ADF4377_DCLK_DB_MSK, x)
423#define ADF4377_R025_RSV1_MSK NO_OS_BIT(4) | NO_OS_BIT(2) | NO_OS_BIT(1)
424#define ADF4377_R025_RSV1(x) no_os_field_prep(ADF4377_R025_RSV1_MSK, x)
427#define ADF4377_VCO_BAND_DIV_MSK NO_OS_GENMASK(7, 0)
428#define ADF4377_VCO_BAND_DIV(x) no_os_field_prep(ADF4377_VCO_BAND_DIV_MSK, x)
431#define ADF4377_VCO_BAND_DIV_MIN 0x00
432#define ADF4377_VCO_BAND_DIV_MAX 0xFF
435#define ADF4377_SYNTH_LOCK_TO_LSB_MSK NO_OS_GENMASK(7, 0)
436#define ADF4377_SYNTH_LOCK_TO_LSB(x) no_os_field_prep(ADF4377_SYNTH_LOCK_TO_LSB_MSK, x)
439#define ADF4377_O_VCO_DB_MSK NO_OS_BIT(7)
440#define ADF4377_O_VCO_DB(x) no_os_field_prep(ADF4377_O_VCO_DB_MSK, x)
441#define ADF4377_SYNTH_LOCK_TO_MSB_MSK NO_OS_GENMASK(6, 0)
442#define ADF4377_SYNTH_LOCK_TO_MSB(x) no_os_field_prep(ADF4377_SYNTH_LOCK_TO_MSB_MSK, x)
445#define ADF4377_VCO_ALC_TO_LSB_MSK NO_OS_GENMASK(7, 0)
446#define ADF4377_VCO_ALC_TO_LSB(x) no_os_field_prep(ADF4377_VCO_ALC_TO_LSB_MSK, x)
449#define ADF4377_DEL_CTRL_DB_MSK NO_OS_BIT(7)
450#define ADF4377_DEL_CTRL_DB(x) no_os_field_prep(ADF4377_DEL_CTRL_DB_MSK, x)
451#define ADF4377_VCO_ALC_TO_MSB_MSK NO_OS_GENMASK(6, 0)
452#define ADF4377_VCO_ALC_TO_MSB(x) no_os_field_prep(ADF4377_VCO_ALC_TO_MSB_MSK, x)
455#define ADF4377_R02C_RSV1 0xC0
458#define ADF4377_ADC_CLK_DIV_MSK NO_OS_GENMASK(7, 0)
459#define ADF4377_ADC_CLK_DIV(x) no_os_field_prep(ADF4377_ADC_CLK_DIV_MSK, x)
462#define ADF4377_EN_ADC_CNV_MSK NO_OS_BIT(7)
463#define ADF4377_EN_ADC_CNV(x) no_os_field_prep(ADF4377_EN_ADC_CNV_MSK, x)
464#define ADF4377_EN_ADC_MSK NO_OS_BIT(1)
465#define ADF4377_EN_ADC(x) no_os_field_prep(ADF4377_EN_ADC_MSK, x)
466#define ADF4377_ADC_A_CONV_MSK NO_OS_BIT(0)
467#define ADF4377_ADC_A_CONV(x) no_os_field_prep(ADF4377_ADC_A_CONV_MSK, x)
470#define ADF4377_ADC_A_CONV_ADC_ST_CNV 0x0
471#define ADF4377_ADC_A_CONV_VCO_CALIB 0x1
474#define ADF4377_DCLK_DIV1_MSK NO_OS_GENMASK(1, 0)
475#define ADF4377_DCLK_DIV1(x) no_os_field_prep(ADF4377_DCLK_DIV1_MSK, x)
478#define ADF4377_DCLK_DIV1_1 0x0
479#define ADF4377_DCLK_DIV1_2 0x1
480#define ADF4377_DCLK_DIV1_8 0x2
481#define ADF4377_DCLK_DIV1_32 0x3
484#define ADF4377_R031_RSV1 0x09
487#define ADF4377_ADC_CLK_SEL_MSK NO_OS_BIT(6)
488#define ADF4377_ADC_CLK_SEL(x) no_os_field_prep(ADF4377_ADC_CLK_SEL_MSK, x)
489#define ADF4377_R032_RSV1_MSK NO_OS_BIT(3) | NO_OS_BIT(0)
490#define ADF4377_R032_RSV1(x) no_os_field_prep(ADF4377_R032_RSV1_MSK, x)
493#define ADF4377_ADC_CLK_SEL_N_OP 0x0
494#define ADF4377_ADC_CLK_SEL_SPI_CLK 0x1
497#define ADF4377_R033_RSV1 0x18
500#define ADF4377_R034_RSV1 0x08
503#define ADF4377_R03A_RSV1 0x5C
506#define ADF4377_R03B_RSV1 0x2B
509#define ADF4377_O_VCO_BAND_MSK NO_OS_BIT(3)
510#define ADF4377_O_VCO_BAND(x) no_os_field_prep(ADF4377_O_VCO_BAND_MSK, x)
511#define ADF4377_O_VCO_CORE_MSK NO_OS_BIT(2)
512#define ADF4377_O_VCO_CORE(x) no_os_field_prep(ADF4377_O_VCO_CORE_MSK, x)
513#define ADF4377_O_VCO_BIAS_MSK NO_OS_BIT(1)
514#define ADF4377_O_VCO_BIAS(x) no_os_field_prep(ADF4377_O_VCO_BIAS_MSK, x)
517#define ADF4377_O_VCO_BAND_VCO_CALIB 0x0
518#define ADF4377_O_VCO_BAND_M_VCO 0x1
520#define ADF4377_O_VCO_CORE_VCO_CALIB 0x0
521#define ADF4377_O_VCO_CORE_M_VCO 0x1
523#define ADF4377_O_VCO_BIAS_VCO_CALIB 0x0
524#define ADF4377_O_VCO_BIAS_M_VCO 0x1
527#define ADF4377_R042_RSV5_MSK NO_OS_BIT(7)
528#define ADF4377_PD_SR_MON_MSK NO_OS_BIT(6)
529#define ADF4377_PD_SR_MON(x) no_os_field_prep(ADF4377_PD_SR_MON_MSK, x)
530#define ADF4377_SR_SEL_MSK NO_OS_BIT(5)
531#define ADF4377_SR_SEL(x) no_os_field_prep(ADF4377_SR_SEL_MSK, x)
532#define ADF4377_RST_SR_MON_MSK NO_OS_BIT(4)
533#define ADF4377_RST_SR_MON(x) no_os_field_prep(ADF4377_RST_SR_MON_MSK, x)
534#define ADF4377_R042_RSV1_MSK NO_OS_GENMASK(3, 0)
537#define ADF4377_R042_RSV1 0x05
540#define ADF4377_INV_SR_MSK NO_OS_BIT(7)
541#define ADF4377_INV_SR(x) no_os_field_prep(ADF4377_INV_SR_MSK, x)
542#define ADF4377_SR_DEL_MSK NO_OS_GENMASK(6, 0)
543#define ADF4377_SR_DEL(x) no_os_field_prep(ADF4377_SR_DEL_MSK, x)
546#define ADF4377_ADC_ST_CNV_MSK NO_OS_BIT(0)
547#define ADF4377_ADC_ST_CNV(x) no_os_field_prep(ADF4377_ADC_ST_CNV_MSK, x)
550#define ADF4377_EN_CLK2_MSK NO_OS_BIT(7)
551#define ADF4377_EN_CLK2(x) no_os_field_prep(ADF4377_EN_CLK2_MSK, x)
552#define ADF4377_EN_CLK1_MSK NO_OS_BIT(6)
553#define ADF4377_EN_CLK1(x) no_os_field_prep(ADF4377_EN_CLK1_MSK, x)
554#define ADF4377_REF_OK_MSK NO_OS_BIT(3)
555#define ADF4377_REF_OK(x) no_os_field_prep(ADF4377_REF_OK_MSK, x)
556#define ADF4377_ADC_BUSY_MSK NO_OS_BIT(2)
557#define ADF4377_ADC_BUSY(x) no_os_field_prep(ADF4377_ADC_BUSY_MSK, x)
558#define ADF4377_FSM_BUSY_MSK NO_OS_BIT(1)
559#define ADF4377_FSM_BUSY(x) no_os_field_prep(ADF4377_FSM_BUSY_MSK, x)
560#define ADF4377_LOCKED_MSK NO_OS_BIT(0)
561#define ADF4377_LOCKED(x) no_os_field_prep(ADF4377_LOCKED_MSK, x)
564#define ADF4377_VCO_CORE_MSK NO_OS_GENMASK(1, 0)
565#define ADF4377_VCO_CORE(x) no_os_field_prep(ADF4377_VCO_CORE_MSK, x)
568#define ADF4377_CHIP_TEMP_LSB_MSK NO_OS_GENMASK(7, 0)
569#define ADF4377_CHIP_TEMP_LSB(x) no_os_field_prep(ADF4377_CHIP_TEMP_LSB_MSK, x)
572#define ADF4377_CHIP_TEMP_MSB_MSK NO_OS_BIT(0)
573#define ADF4377_CHIP_TEMP_MSB(x) no_os_field_prep(ADF4377_CHIP_TEMP_MSB_MSK, x)
576#define ADF4377_VCO_BAND_MSK NO_OS_GENMASK(7, 0)
577#define ADF4377_VCO_BAND(x) no_os_field_prep(ADF4377_VCO_BAND_MSK, x)
580#define ADF4377_CHIP_VERSION_MSK NO_OS_GENMASK(7, 0)
581#define ADF4377_CHIP_VERSION(x) no_os_field_prep(ADF4377_CHIP_VERSION_MSK, x)
583#define ADF4377_SPI_4W_CFG(x) (no_os_field_prep(ADF4377_SDO_ACTIVE_MSK, x) | \
584 no_os_field_prep(ADF4377_SDO_ACTIVE_R_MSK, x))
586#define ADF4377_SPI_LSB_CFG(x) (no_os_field_prep(ADF4377_LSB_FIRST_MSK, x) | \
587 no_os_field_prep(ADF4377_LSB_FIRST_R_MSK, x))
589#define ADF4377_SPI_WRITE_CMD 0x0
590#define ADF4377_SPI_READ_CMD NO_OS_BIT(7)
591#define ADF4377_BUFF_SIZE_BYTES 3
592#define ADF4377_MAX_VCO_FREQ 12800000000ull
593#define ADF4377_MIN_VCO_FREQ 6400000000ull
594#define ADF4377_MAX_REFIN_FREQ 1000000000
595#define ADF4377_MIN_REFIN_FREQ 10000000
596#define ADF4377_MAX_FREQ_PFD 500000000
597#define ADF4377_MIN_FREQ_PFD 3000000
598#define ADF4377_MAX_CLKPN_FREQ ADF4377_MAX_VCO_FREQ
599#define ADF4377_MIN_CLKPN_FREQ (ADF4377_MIN_VCO_FREQ / 8)
600#define ADF4377_FREQ_PFD_80MHZ 80000000
601#define ADF4377_FREQ_PFD_125MHZ 125000000
602#define ADF4377_FREQ_PFD_160MHZ 160000000
603#define ADF4377_FREQ_PFD_250MHZ 250000000
604#define ADF4377_FREQ_PFD_320MHZ 320000000
605#define ADF4377_CPI_VAL_MAX 15
606#define ADF4377_RFOUT_MAX 12800000000U
607#define ADF4377_RFOUT_MIN 800000000U
608#define ADF4377_CLKOUT_DIV_REG_VAL_MAX 3
609#define ADF4377_LKD_DELAY_US 5000
610#define ADF4377_POR_DELAY_US 200
611#define ADF4377_BLEED_WORD_MAX 1023
612#define ADF4377_REF_DIV_MAX 63
613#define ADF4377_OUT_PWR_MAX ADF4377_CLKOUT_DIV_REG_VAL_MAX
614#define ADF4377_CLKIN_REF_MIN 10000000
615#define ADF4377_CLKIN_REF_MAX 10000000000U
616#define ADF4377_SR_DEL_MAX 127
617#define ADF4377_SR_MON_DELAY_US 100U
620#define ADF4377_SPI_SCRATCHPAD_TEST_A 0xA5u
621#define ADF4377_SPI_SCRATCHPAD_TEST_B 0x5Au
622#define ADF4377_SPI_DUMMY_DATA 0x00
623#define ADF4377_CHECK_RANGE(freq, range) \
624 ((freq > ADF4377_MAX_ ## range) || (freq < ADF4377_MIN_ ## range))
723 uint8_t mask, uint8_t data);
struct ad7616_init_param init_param
Definition ad7616_sdz.c:107
int adf4377_get_sr_del_adj(struct adf4377_dev *dev, int32_t *val)
Gets the value of the set SR_DEL Adjustment Feature Translated to Pico Seconds on the output.
Definition adf4377.c:870
int adf4377_set_en_ref_doubler(struct adf4377_dev *dev, bool en)
Set the reference doubler to enable or disable based on the passed parameter. If the parameter is dif...
Definition adf4377.c:344
int32_t adf4377_init(struct adf4377_dev **device, struct adf4377_init_param *init_param)
Initializes the ADF4377.
Definition adf4377.c:1124
int adf4377_set_ref_clk(struct adf4377_dev *dev, uint64_t val)
Set the desired reference frequency and reset everything over to maximum supported value of 5GHz to t...
Definition adf4377.c:219
int adf4377_set_rfout(struct adf4377_dev *dev, uint64_t val)
Set the desired output frequency and reset everything over to maximum supported value of 12....
Definition adf4377.c:641
int adf4377_get_en_sysref_monitor(struct adf4377_dev *dev, bool *en)
Gets the value of the set sysref monitoring.
Definition adf4377.c:968
adf4377_dev_id
ID of Devices supported by the driver.
Definition adf4377.h:630
@ ADF4378
Definition adf4377.h:632
@ ADF4377
Definition adf4377.h:631
int adf4377_get_rfout(struct adf4377_dev *dev, uint64_t *val)
Gets the user proposed output frequency.
Definition adf4377.c:730
int adf4377_set_rfout_divider(struct adf4377_dev *dev, uint8_t div)
Set the rfout frequency divider register value and reset everything over to maximum supported value o...
Definition adf4377.c:596
int adf4377_set_ndel(struct adf4377_dev *dev, int32_t val)
Set the NDEL (N divider Delay) register value.
Definition adf4377.c:764
int adf4377_get_ref_div(struct adf4377_dev *dev, int32_t *div)
Gets the value the reference divider.
Definition adf4377.c:321
int adf4377_spi_write(struct adf4377_dev *dev, uint8_t reg_addr, uint8_t data)
Writes data to ADF4377 over SPI.
Definition adf4377.c:104
int adf4377_get_ndel(struct adf4377_dev *dev, int32_t *val)
Gets the value of the set NDEL (N divider Delay) register.
Definition adf4377.c:784
int adf4377_set_out_power(struct adf4377_dev *dev, uint8_t ch, int8_t pwr)
Set the output power register value of a channel and reset everything over to maximum supported value...
Definition adf4377.c:547
int adf4377_set_sr_del_adj(struct adf4377_dev *dev, int32_t val)
Set the value of SR_DEL Adjustment Feature Translated to Pico Seconds on the output....
Definition adf4377.c:847
int adf4377_get_ref_clk(struct adf4377_dev *dev, uint64_t *val)
Gets the user proposed reference frequency.
Definition adf4377.c:241
int adf4377_set_cp_i(struct adf4377_dev *dev, int32_t reg_val)
Set the charge pump value which will be written to the register. The value will be between 0 and 15 o...
Definition adf4377.c:259
int adf4377_get_cp_i(struct adf4377_dev *dev, int32_t *reg_val)
Gets the charge pump value from the register. The value will be between 0 and 15 on 8 bits....
Definition adf4377.c:280
int adf4377_get_rdel(struct adf4377_dev *dev, int32_t *val)
Gets the value of the set RDEL (R divider Delay) register.
Definition adf4377.c:825
int adf4377_set_en_sysref_monitor(struct adf4377_dev *dev, bool en)
Set enable/disable sysref monitoring.
Definition adf4377.c:933
int adf4377_set_ref_div(struct adf4377_dev *dev, int32_t div)
Set the reference divider value and reset everything over to maximum supported value of 63 to the max...
Definition adf4377.c:302
int adf4377_check_scratchpad(struct adf4377_dev *dev)
ADF4377 SPI Scratchpad check.
Definition adf4377.c:192
int adf4377_get_en_ref_doubler(struct adf4377_dev *dev, bool *en)
Gets the value the doubler if it is enabled or disable and stores it it the dev structure.
Definition adf4377.c:361
int32_t adf4377_remove(struct adf4377_dev *dev)
Free resoulces allocated for ADF4377.
Definition adf4377.c:1248
int adf4377_spi_update_bit(struct adf4377_dev *dev, uint16_t reg_addr, uint8_t mask, uint8_t data)
Update ADF4377 register.
Definition adf4377.c:169
int adf4377_set_freq(struct adf4377_dev *dev)
Definition adf4377.c:662
int adf4377_set_rdel(struct adf4377_dev *dev, int32_t val)
Set the RDEL (R divider Delay) register value.
Definition adf4377.c:805
int adf4377_set_en_chan(struct adf4377_dev *dev, uint8_t ch, bool en)
Set the output channel to enable or disable based on the passed parameter. If the parameter is differ...
Definition adf4377.c:497
int adf4377_get_rfout_divider(struct adf4377_dev *dev, int8_t *div)
Gets the rfout divider register value.
Definition adf4377.c:617
int adf4377_set_en_sr_inv_adj(struct adf4377_dev *dev, bool en)
Set the value of SR_INV_ADJ Adjustment to enable or disable which adds a constant value to the skew a...
Definition adf4377.c:892
int adf4377_get_bleed_word(struct adf4377_dev *dev, int32_t *word)
Gets the value of the set bleed word.
Definition adf4377.c:468
int adf4377_get_en_sr_inv_adj(struct adf4377_dev *dev, bool *en)
Gets the value of the set SR_INV_ADJ Adjustment to enable or disable which adds a constant value to t...
Definition adf4377.c:912
int adf4377_soft_reset(struct adf4377_dev *dev, bool spi_4wire)
Software reset and loads default register values to bring the part to a known state.
Definition adf4377.c:399
int adf4377_get_out_power(struct adf4377_dev *dev, uint8_t ch, int8_t *pwr)
Gets the output power register value.
Definition adf4377.c:571
int adf4377_set_bleed_word(struct adf4377_dev *dev, int32_t word)
Set the bleed word, which represents the value of the bleed current written to the register space.
Definition adf4377.c:439
int adf4377_spi_read(struct adf4377_dev *dev, uint8_t reg_addr, uint8_t *data)
Reads data from ADF4377 over SPI.
Definition adf4377.c:135
int adf4377_get_en_chan(struct adf4377_dev *dev, uint8_t ch, bool *en)
Gets the value the output channel if it is enabled or disable.
Definition adf4377.c:519
Header file of GPIO Interface.
Header file of SPI Interface.
Header file of utility functions.
ADF4377 Device Descriptor.
Definition adf4377.h:672
bool spi4wire
Definition adf4377.h:684
struct no_os_gpio_desc * gpio_ce
Definition adf4377.h:680
uint8_t sr_del_adj
Definition adf4377.h:710
uint8_t muxout_default
Definition adf4377.h:696
uint32_t f_pfd
Definition adf4377.h:686
uint8_t sr_inv
Definition adf4377.h:712
struct no_os_gpio_desc * gpio_enclk1
Definition adf4377.h:676
uint32_t ref_div_factor
Definition adf4377.h:700
enum adf4377_dev_id dev_id
Definition adf4377.h:682
uint8_t cp_i
Definition adf4377.h:694
uint16_t bleed_word
Definition adf4377.h:708
bool sysrefout
Definition adf4377.h:714
uint64_t f_clk
Definition adf4377.h:688
uint64_t f_vco
Definition adf4377.h:690
uint8_t clkout_op
Definition adf4377.h:706
uint16_t n_int
Definition adf4377.h:704
struct no_os_spi_desc * spi_desc
Definition adf4377.h:674
struct no_os_gpio_desc * gpio_enclk2
Definition adf4377.h:678
uint8_t ref_doubler_en
Definition adf4377.h:698
uint64_t clkin_freq
Definition adf4377.h:692
uint8_t clkout_div_sel
Definition adf4377.h:702
ADF4377 Initialization Parameters structure.
Definition adf4377.h:639
uint32_t muxout_select
Definition adf4377.h:659
struct no_os_spi_init_param * spi_init
Definition adf4377.h:641
struct no_os_gpio_init_param * gpio_ce_param
Definition adf4377.h:643
struct no_os_gpio_init_param * gpio_enclk1_param
Definition adf4377.h:645
enum adf4377_dev_id dev_id
Definition adf4377.h:649
bool spi4wire
Definition adf4377.h:651
uint8_t clkout_op
Definition adf4377.h:663
uint32_t ref_div_factor
Definition adf4377.h:665
uint8_t ref_doubler_en
Definition adf4377.h:661
struct no_os_gpio_init_param * gpio_enclk2_param
Definition adf4377.h:647
uint64_t clkin_freq
Definition adf4377.h:653
uint64_t f_clk
Definition adf4377.h:655
uint8_t cp_i
Definition adf4377.h:657
Definition ad9361_util.h:63
Structure holding the GPIO descriptor.
Definition no_os_gpio.h:84
Structure holding the parameters for GPIO initialization.
Definition no_os_gpio.h:67
Structure holding SPI descriptor.
Definition no_os_spi.h:180
Structure holding the parameters for SPI initialization.
Definition no_os_spi.h:128