45#define ADF4377_REG(x) (x)
48#define ADF4377_SOFT_RESET_R_MSK NO_OS_BIT(7)
49#define ADF4377_SOFT_RESET_R(x) no_os_field_prep(ADF4377_SOFT_RESET_R_MSK, x)
50#define ADF4377_SOFT_RESET_MSK NO_OS_BIT(0)
51#define ADF4377_SOFT_RESET(x) no_os_field_prep(ADF4377_SOFT_RESET_MSK, x)
52#define ADF4377_LSB_FIRST_R_MSK NO_OS_BIT(6)
53#define ADF4377_LSB_FIRST_R(x) no_os_field_prep(ADF4377_LSB_FIRST_R_MSK, x)
54#define ADF4377_LSB_FIRST_MSK NO_OS_BIT(1)
55#define ADF4377_LSB_FIRST(x) no_os_field_prep(ADF4377_LSB_FIRST_MSK, x)
56#define ADF4377_ADDRESS_ASC_R_MSK NO_OS_BIT(5)
57#define ADF4377_ADDRESS_ASC_R(x) no_os_field_prep(ADF4377_ADDRESS_ASC_R_MSK, x)
58#define ADF4377_ADDRESS_ASC_MSK NO_OS_BIT(2)
59#define ADF4377_ADDRESS_ASC(x) no_os_field_prep(ADF4377_ADDRESS_ASC_MSK, x)
60#define ADF4377_SDO_ACTIVE_R_MSK NO_OS_BIT(4)
61#define ADF4377_SDO_ACTIVE_R(x) no_os_field_prep(ADF4377_SDO_ACTIVE_R_MSK, x)
62#define ADF4377_SDO_ACTIVE_MSK NO_OS_BIT(3)
63#define ADF4377_SDO_ACTIVE(x) no_os_field_prep(ADF4377_SDO_ACTIVE_MSK, x)
64#define ADF4377_RESET_CMD 0x81
67#define ADF4377_SDO_ACTIVE_SPI_3W 0x0
68#define ADF4377_SDO_ACTIVE_SPI_4W 0x1
70#define ADF4377_ADDR_ASC_AUTO_DECR 0x0
71#define ADF4377_ADDR_ASC_AUTO_INCR 0x1
73#define ADF4377_LSB_FIRST_MSB 0x0
74#define ADF4377_LSB_FIRST_LSB 0x1
76#define ADF4377_SOFT_RESET_N_OP 0x0
77#define ADF4377_SOFT_RESET_EN 0x1
80#define ADF4377_SINGLE_INSTR_MSK NO_OS_BIT(7)
81#define ADF4377_SINGLE_INSTR(x) no_os_field_prep(ADF4377_SINGLE_INSTRUCTION_MSK, x)
82#define ADF4377_MASTER_RB_CTRL_MSK NO_OS_BIT(5)
83#define ADF4377_MASTER_RB_CTRL(x) no_os_field_prep(ADF4377_MASTER_RB_CTRL_MSK, x)
86#define ADF4377_SPI_STREAM_EN 0x0
87#define ADF4377_SPI_STREAM_DIS 0x1
89#define ADF4377_RB_SLAVE_REG 0x0
90#define ADF4377_RB_MASTER_REG 0x1
93#define ADF4377_CHIP_TYPE 0x06
96#define ADF4377_PRODUCT_ID_LSB 0x0005
99#define ADF4377_PRODUCT_ID_MSB 0x0005
102#define ADF4377_SCRATCHPAD_MSK NO_OS_GENMASK(7, 0)
103#define ADF4377_SCRATCHPAD(x) no_os_field_prep(ADF4377_SCRATCHPAD_MSK, x)
106#define ADF4377_SPI_REVISION 0x01
109#define ADF4377_VENDOR_ID_LSB 0x456
112#define ADF4377_VENDOR_ID_MSB 0x456
115#define ADF4377_R00F_RSV1 0x14
118#define ADF4377_N_INT_LSB_MSK NO_OS_GENMASK(7, 0)
119#define ADF4377_N_INT_LSB(x) no_os_field_prep(ADF4377_N_INT_LSB_MSK, x)
122#define ADF4377_EN_AUTOCAL_MSK NO_OS_BIT(7)
123#define ADF4377_EN_AUTOCAL(x) no_os_field_prep(ADF4377_EN_AUTOCAL_MSK, x)
124#define ADF4377_EN_RDBLR_MSK NO_OS_BIT(6)
125#define ADF4377_EN_RDBLR(x) no_os_field_prep(ADF4377_EN_RDBLR_MSK, x)
126#define ADF4377_DCLK_DIV2_MSK NO_OS_GENMASK(5,4)
127#define ADF4377_DCLK_DIV2(x) no_os_field_prep(ADF4377_DCLK_DIV2_MSK, x)
128#define ADF4377_N_INT_MSB_MSK NO_OS_GENMASK(3,0)
129#define ADF4377_N_INT_MSB(x) no_os_field_prep(ADF4377_N_INT_MSB_MSK, x)
132#define ADF4377_VCO_CALIB_DIS 0x0
133#define ADF4377_VCO_CALIB_EN 0x1
135#define ADF4377_REF_DBLR_DIS 0x0
136#define ADF4377_REF_DBLR_EN 0x1
138#define ADF4377_DCLK_DIV2_1 0x0
139#define ADF4377_DCLK_DIV2_2 0x1
140#define ADF4377_DCLK_DIV2_4 0x2
141#define ADF4377_DCLK_DIV2_8 0x3
144#define ADF4377_CLKOUT_DIV_MSK NO_OS_GENMASK(7, 6)
145#define ADF4377_CLKOUT_DIV(x) no_os_field_prep(ADF4377_CLKOUT_DIV_MSK, x)
146#define ADF4377_R_DIV_MSK NO_OS_GENMASK(5, 0)
147#define ADF4377_R_DIV(x) no_os_field_prep(ADF4377_R_DIV_MSK, x)
150#define ADF4377_CLKOUT_DIV_1 0x0
151#define ADF4377_CLKOUT_DIV_2 0x1
152#define ADF4377_CLKOUT_DIV_4 0x2
153#define ADF4377_CLKOUT_DIV_8 0x3
155#define ADF4377_MIN_R_DIV 0x00
156#define ADF4378_MAX_R_DIV 0x3F
159#define ADF4377_M_VCO_CORE_MSK NO_OS_GENMASK(5,4)
160#define ADF4377_M_VCO_CORE(x) no_os_field_prep(ADF4377_M_VCO_CORE_MSK, x)
161#define ADF4377_M_VCO_BIAS_MSK NO_OS_GENMASK(3,0)
162#define ADF4377_M_VCO_BIAS(x) no_os_field_prep(ADF4377_M_VCO_BIAS_MSK, x)
165#define ADF4377_M_VCO_0 0x0
166#define ADF4377_M_VCO_1 0x1
167#define ADF4377_M_VCO_2 0x2
168#define ADF4377_M_VCO_3 0x3
170#define M_VCO_BIAS_MIN 0xF
171#define M_VCO_BIAS_MAX 0x0
174#define ADF4377_M_VCO_BAND_MSK NO_OS_GENMASK(7,0)
175#define ADF4377_M_VCO_BAND(x) no_os_field_prep(ADF4377_M_VCO_BAND_MSK, x)
178#define ADF4377_VCO_BAND_MIN 0xFF
179#define ADF4377_VCO_BAND_MAX 0x00
182#define ADF4377_BLEED_I_LSB_MSK NO_OS_GENMASK(7, 6)
183#define ADF4377_BLEED_I_LSB(x) no_os_field_prep(ADF4377_BLEED_I_LSB_MSK, x)
184#define ADF4377_BLEED_POL_MSK NO_OS_BIT(5)
185#define ADF4377_BLEED_POL(x) no_os_field_prep(ADF4377_BLEED_POL_MSK, x)
186#define ADF4377_EN_BLEED_MSK NO_OS_BIT(4)
187#define ADF4377_EN_BLEED(x) no_os_field_prep(ADF4377_EN_BLEED_MSK, x)
188#define ADF4377_CP_I_MSK NO_OS_GENMASK(3, 0)
189#define ADF4377_CP_I(x) no_os_field_prep(ADF4377_CP_I_MSK, x)
192#define ADF4377_CURRENT_SINK 0x0
193#define ADF4377_CURRENT_SOURCE 0x1
195#define ADF4377_CP_0MA7 0x0
196#define ADF4377_CP_0MA9 0x1
197#define ADF4377_CP_1MA1 0x2
198#define ADF4377_CP_1MA3 0x3
199#define ADF4377_CP_1MA4 0x4
200#define ADF4377_CP_1MA8 0x5
201#define ADF4377_CP_2MA2 0x6
202#define ADF4377_CP_2MA5 0x7
203#define ADF4377_CP_2MA9 0x8
204#define ADF4377_CP_3MA6 0x9
205#define ADF4377_CP_4MA3 0xA
206#define ADF4377_CP_5MA0 0xB
207#define ADF4377_CP_5MA7 0xC
208#define ADF4377_CP_7MA2 0xD
209#define ADF4377_CP_8MA6 0xE
210#define ADF4377_CP_10MA1 0xF
213#define ADF4377_BLEED_I_MSB_MSK NO_OS_GENMASK(7, 0)
214#define ADF4377_BLEED_I_MSB(x) no_os_field_prep(ADF4377_BLEED_I_MSB_MSK, x)
217#define ADF4377_INV_CLKOUT_MSK NO_OS_BIT(7)
218#define ADF4377_INV_CLKOUT(x) no_os_field_prep(ADF4377_INV_CLKOUT_MSK, x)
219#define ADF4377_N_DEL_MSK NO_OS_GENMASK(6, 0)
220#define ADF4377_N_DEL(x) no_os_field_prep(ADF4377_N_DEL_MSK, x)
223#define ADF4377_CMOS_OV_MSK NO_OS_BIT(7)
224#define ADF4377_CMOS_OV(x) no_os_field_prep(ADF4377_CMOS_OV_MSK, x)
225#define ADF4377_R_DEL_MSK NO_OS_GENMASK(6, 0)
226#define ADF4377_R_DEL(x) no_os_field_prep(ADF4377_R_DEL_MSK, x)
229#define ADF4377_1V8_LOGIC 0x0
230#define ADF4377_3V3_LOGIC 0x1
232#define ADF4377_R_DEL_MIN 0x00
233#define ADF4377_R_DEL_MAX 0x7F
236#define ADF4377_CLKOUT2_OP_MSK NO_OS_GENMASK(7, 6)
237#define ADF4377_CLKOUT2_OP(x) no_os_field_prep(ADF4377_CLKOUT2_OP_MSK, x)
238#define ADF4377_CLKOUT1_OP_MSK NO_OS_GENMASK(5, 4)
239#define ADF4377_CLKOUT1_OP(x) no_os_field_prep(ADF4377_CLKOUT1_OP_MSK, x)
240#define ADF4377_PD_CLK_MSK NO_OS_BIT(3)
241#define ADF4377_PD_CLK(x) no_os_field_prep(ADF4377_PD_CLK_MSK, x)
242#define ADF4377_PD_RDET_MSK NO_OS_BIT(2)
243#define ADF4377_PD_RDET(x) no_os_field_prep(ADF4377_PD_RDET_MSK, x)
244#define ADF4377_PD_ADC_MSK NO_OS_BIT(1)
245#define ADF4377_PD_ADC(x) no_os_field_prep(ADF4377_PD_ADC_MSK, x)
246#define ADF4377_PD_CALADC_MSK NO_OS_BIT(0)
247#define ADF4377_PD_CALADC(x) no_os_field_prep(ADF4377_PD_CALADC_MSK, x)
250#define ADF4377_CLKOUT_320MV 0x0
251#define ADF4377_CLKOUT_420MV 0x1
252#define ADF4377_CLKOUT_530MV 0x2
253#define ADF4377_CLKOUT_640MV 0x3
255#define ADF4377_PD_CLK_N_OP 0x0
256#define ADF4377_PD_CLK_PD 0x1
258#define ADF4377_PD_RDET_N_OP 0x0
259#define ADF4377_PD_RDET_PD 0x1
261#define ADF4377_PD_ADC_N_OP 0x0
262#define ADF4377_PD_ADC_PD 0x1
264#define ADF4377_PD_CALADC_N_OP 0x0
265#define ADF4377_PD_CALADC_PD 0x1
268#define ADF4377_PD_ALL_MSK NO_OS_BIT(7)
269#define ADF4377_PD_ALL(x) no_os_field_prep(ADF4377_PD_ALL_MSK, x)
270#define ADF4377_PD_RDIV_MSK NO_OS_BIT(6)
271#define ADF4377_PD_RDIV(x) no_os_field_prep(ADF4377_PD_RDIV_MSK, x)
272#define ADF4377_PD_NDIV_MSK NO_OS_BIT(5)
273#define ADF4377_PD_NDIV(x) no_os_field_prep(ADF4377_PD_NDIV_MSK, x)
274#define ADF4377_PD_VCO_MSK NO_OS_BIT(4)
275#define ADF4377_PD_VCO(x) no_os_field_prep(ADF4377_PD_VCO_MSK, x)
276#define ADF4377_PD_LD_MSK NO_OS_BIT(3)
277#define ADF4377_PD_LD(x) no_os_field_prep(ADF4377_PD_LD_MSK, x)
278#define ADF4377_PD_PFDCP_MSK NO_OS_BIT(2)
279#define ADF4377_PD_PFDCP(x) no_os_field_prep(ADF4377_PD_PFDCP_MSK, x)
280#define ADF4377_PD_CLKOUT1_MSK NO_OS_BIT(1)
281#define ADF4377_PD_CLKOUT1(x) no_os_field_prep(ADF4377_PD_CLKOUT1_MSK, x)
282#define ADF4377_PD_CLKOUT2_MSK NO_OS_BIT(0)
283#define ADF4377_PD_CLKOUT2(x) no_os_field_prep(ADF4377_PD_CLKOUT2_MSK, x)
286#define ADF4377_PD_ALL_N_OP 0x0
287#define ADF4377_PD_ALL_PD 0x1
289#define ADF4377_PD_RDIV_N_OP 0x0
290#define ADF4377_PD_RDIV_PD 0x1
292#define ADF4377_PD_NDIV_N_OP 0x0
293#define ADF4377_PD_NDIV_PD 0x1
295#define ADF4377_PD_VCO_N_OP 0x0
296#define ADF4377_PD_VCO_PD 0x1
298#define ADF4377_PD_LD_N_OP 0x0
299#define ADF4377_PD_LD_PD 0x1
301#define ADF4377_PD_PFDCP_N_OP 0x0
302#define ADF4377_PD_PFDCP_PD 0x1
304#define ADF4377_PD_CLKOUT1_N_OP 0x0
305#define ADF4377_PD_CLKOUT1_PD 0x1
307#define ADF4377_PD_CLKOUT2_N_OP 0x0
308#define ADF4377_PD_CLKOUT2_PD 0x1
311#define ADF4377_EN_LOL_MSK NO_OS_BIT(7)
312#define ADF4377_EN_LOL(x) no_os_field_prep(ADF4377_EN_LOL_MSK, x)
313#define ADF4377_LDWIN_PW_MSK NO_OS_BIT(6)
314#define ADF4377_LDWIN_PW(x) no_os_field_prep(ADF4377_LDWIN_PW_MSK, x)
315#define ADF4377_EN_LDWIN_MSK NO_OS_BIT(5)
316#define ADF4377_EN_LDWIN(x) no_os_field_prep(ADF4377_EN_LDWIN_MSK, x)
317#define ADF4377_LD_COUNT_MSK NO_OS_GENMASK(4, 0)
318#define ADF4377_LD_COUNT(x) no_os_field_prep(ADF4377_LD_COUNT_MSK, x)
322#define ADF4377_LDWIN_PW_NARROW 0x0
323#define ADF4377_LDWIN_PW_WIDE 0x1
326#define ADF4377_EN_DNCLK_MSK NO_OS_BIT(7)
327#define ADF4377_EN_DNCLK(x) no_os_field_prep(ADF4377_EN_DNCLK_MSK, x)
328#define ADF4377_EN_DRCLK_MSK NO_OS_BIT(6)
329#define ADF4377_EN_DRCLK(x) no_os_field_prep(ADF4377_EN_DRCLK_MSK, x)
330#define ADF4377_RST_LD_MSK NO_OS_BIT(2)
331#define ADF4377_RST_LD(x) no_os_field_prep(ADF4377_RST_LD_MSK, x)
332#define ADF4377_R01C_RSV1_MSK NO_OS_BIT(0)
333#define ADF4377_R01C_RSV1(x) no_os_field_prep(ADF4377_R01C_RSV1_MSK, x)
336#define ADF4377_EN_DNCLK_OFF 0x0
337#define ADF4377_EN_DNCLK_ON 0x1
339#define ADF4377_EN_DRCLK_OFF 0x0
340#define ADF4377_EN_DRCLK_ON 0x1
342#define ADF4377_RST_LD_INACTIVE 0x0
343#define ADF4377_RST_LD_ACTIVE 0x1
346#define ADF4377_MUXOUT_MSK NO_OS_GENMASK(7, 4)
347#define ADF4377_MUXOUT(x) no_os_field_prep(ADF4377_MUXOUT_MSK, x)
348#define ADF4377_EN_CPTEST_MSK NO_OS_BIT(2)
349#define ADF4377_EN_CPTEST(x) no_os_field_prep(ADF4377_EN_CPTEST_MSK, x)
350#define ADF4377_CP_DOWN_MSK NO_OS_BIT(1)
351#define ADF4377_CP_DOWN(x) no_os_field_prep(ADF4377_CP_DOWN_MSK, x)
352#define ADF4377_CP_UP_MSK NO_OS_BIT(0)
353#define ADF4377_CP_UP(x) no_os_field_prep(ADF4377_CP_UP_MSK, x)
356#define ADF4377_MUXOUT_HIGH_Z 0x0
357#define ADF4377_MUXOUT_LKDET 0x1
358#define ADF4377_MUXOUT_LOW 0x2
359#define ADF4377_MUXOUT_DIV_RCLK_2 0x4
360#define ADF4377_MUXOUT_DIV_NCLK_2 0x5
361#define ADF4377_MUXOUT_HIGH 0x8
363#define ADF4377_EN_CPTEST_OFF 0x0
364#define ADF4377_EN_CPTEST_ON 0x1
366#define ADF4377_CP_DOWN_OFF 0x0
367#define ADF4377_CP_DOWN_ON 0x1
369#define ADF4377_CP_UP_OFF 0x0
370#define ADF4377_CP_UP_ON 0x1
373#define ADF4377_BST_REF_MSK NO_OS_BIT(7)
374#define ADF4377_BST_REF(x) no_os_field_prep(ADF4377_BST_REF_MSK, x)
375#define ADF4377_FILT_REF_MSK NO_OS_BIT(6)
376#define ADF4377_FILT_REF(x) no_os_field_prep(ADF4377_FILT_REF_MSK, x)
377#define ADF4377_REF_SEL_MSK NO_OS_BIT(5)
378#define ADF4377_REF_SEL(x) no_os_field_prep(ADF4377_REF_SEL_MSK, x)
379#define ADF4377_R01F_RSV1_MSK NO_OS_GENMASK(2, 0)
380#define ADF4377_R01F_RSV1(x) no_os_field_prep(ADF4377_R01F_RSV1_MSK, x)
383#define ADF4377_BST_LARGE_REF_IN 0x0
384#define ADF4377_BST_SMALL_REF_IN 0x1
386#define ADF4377_FILT_REF_OFF 0x0
387#define ADF4377_FILT_REF_ON 0x1
389#define ADF4377_REF_SEL_DMA 0x0
390#define ADF4377_REF_SEL_LNA 0x1
393#define ADF4377_RST_SYS_MSK NO_OS_BIT(4)
394#define ADF4377_RST_SYS(x) no_os_field_prep(ADF4377_RST_SYS_MSK, x)
395#define ADF4377_EN_ADC_CLK_MSK NO_OS_BIT(3)
396#define ADF4377_EN_ADC_CLK(x) no_os_field_prep(ADF4377_EN_ADC_CLK_MSK, x)
397#define ADF4377_R020_RSV1_MSK NO_OS_BIT(0)
398#define ADF4377_R020_RSV1(x) no_os_field_prep(ADF4377_R020_RSV1_MSK, x)
401#define ADF4377_RST_SYS_INACTIVE 0x0
402#define ADF4377_RST_SYS_ACTIVE 0x1
405#define ADF4377_R021_RSV1 0xD3
408#define ADF4377_R022_RSV1 0x32
411#define ADF4377_R023_RSV1 0x18
414#define ADF4377_DCLK_MODE_MSK NO_OS_BIT(2)
415#define ADF4377_DCLK_MODE(x) no_os_field_prep(ADF4377_DCLK_MODE_MSK, x)
418#define ADF4377_CLKODIV_DB_MSK NO_OS_BIT(7)
419#define ADF4377_CLKODIV_DB(x) no_os_field_prep(ADF4377_CLKODIV_DB_MSK, x)
420#define ADF4377_DCLK_DB_MSK NO_OS_BIT(6)
421#define ADF4377_DCLK_DB(x) no_os_field_prep(ADF4377_DCLK_DB_MSK, x)
422#define ADF4377_R025_RSV1_MSK NO_OS_BIT(4) | NO_OS_BIT(2) | NO_OS_BIT(1)
423#define ADF4377_R025_RSV1(x) no_os_field_prep(ADF4377_R025_RSV1_MSK, x)
426#define ADF4377_VCO_BAND_DIV_MSK NO_OS_GENMASK(7, 0)
427#define ADF4377_VCO_BAND_DIV(x) no_os_field_prep(ADF4377_VCO_BAND_DIV_MSK, x)
430#define ADF4377_VCO_BAND_DIV_MIN 0x00
431#define ADF4377_VCO_BAND_DIV_MAX 0xFF
434#define ADF4377_SYNTH_LOCK_TO_LSB_MSK NO_OS_GENMASK(7, 0)
435#define ADF4377_SYNTH_LOCK_TO_LSB(x) no_os_field_prep(ADF4377_SYNTH_LOCK_TO_LSB_MSK, x)
438#define ADF4377_O_VCO_DB_MSK NO_OS_BIT(7)
439#define ADF4377_O_VCO_DB(x) no_os_field_prep(ADF4377_O_VCO_DB_MSK, x)
440#define ADF4377_SYNTH_LOCK_TO_MSB_MSK NO_OS_GENMASK(6, 0)
441#define ADF4377_SYNTH_LOCK_TO_MSB(x) no_os_field_prep(ADF4377_SYNTH_LOCK_TO_MSB_MSK, x)
444#define ADF4377_VCO_ALC_TO_LSB_MSK NO_OS_GENMASK(7, 0)
445#define ADF4377_VCO_ALC_TO_LSB(x) no_os_field_prep(ADF4377_VCO_ALC_TO_LSB_MSK, x)
448#define ADF4377_DEL_CTRL_DB_MSK NO_OS_BIT(7)
449#define ADF4377_DEL_CTRL_DB(x) no_os_field_prep(ADF4377_DEL_CTRL_DB_MSK, x)
450#define ADF4377_VCO_ALC_TO_MSB_MSK NO_OS_GENMASK(6, 0)
451#define ADF4377_VCO_ALC_TO_MSB(x) no_os_field_prep(ADF4377_VCO_ALC_TO_MSB_MSK, x)
454#define ADF4377_R02C_RSV1 0xC0
457#define ADF4377_ADC_CLK_DIV_MSK NO_OS_GENMASK(7, 0)
458#define ADF4377_ADC_CLK_DIV(x) no_os_field_prep(ADF4377_ADC_CLK_DIV_MSK, x)
461#define ADF4377_EN_ADC_CNV_MSK NO_OS_BIT(7)
462#define ADF4377_EN_ADC_CNV(x) no_os_field_prep(ADF4377_EN_ADC_CNV_MSK, x)
463#define ADF4377_EN_ADC_MSK NO_OS_BIT(1)
464#define ADF4377_EN_ADC(x) no_os_field_prep(ADF4377_EN_ADC_MSK, x)
465#define ADF4377_ADC_A_CONV_MSK NO_OS_BIT(0)
466#define ADF4377_ADC_A_CONV(x) no_os_field_prep(ADF4377_ADC_A_CONV_MSK, x)
469#define ADF4377_ADC_A_CONV_ADC_ST_CNV 0x0
470#define ADF4377_ADC_A_CONV_VCO_CALIB 0x1
473#define ADF4377_DCLK_DIV1_MSK NO_OS_GENMASK(1, 0)
474#define ADF4377_DCLK_DIV1(x) no_os_field_prep(ADF4377_DCLK_DIV1_MSK, x)
477#define ADF4377_DCLK_DIV1_1 0x0
478#define ADF4377_DCLK_DIV1_2 0x1
479#define ADF4377_DCLK_DIV1_8 0x2
480#define ADF4377_DCLK_DIV1_32 0x3
483#define ADF4377_R031_RSV1 0x09
486#define ADF4377_ADC_CLK_SEL_MSK NO_OS_BIT(6)
487#define ADF4377_ADC_CLK_SEL(x) no_os_field_prep(ADF4377_ADC_CLK_SEL_MSK, x)
488#define ADF4377_R032_RSV1_MSK NO_OS_BIT(3) | NO_OS_BIT(0)
489#define ADF4377_R032_RSV1(x) no_os_field_prep(ADF4377_R032_RSV1_MSK, x)
492#define ADF4377_ADC_CLK_SEL_N_OP 0x0
493#define ADF4377_ADC_CLK_SEL_SPI_CLK 0x1
496#define ADF4377_R033_RSV1 0x18
499#define ADF4377_R034_RSV1 0x08
502#define ADF4377_R03A_RSV1 0x5C
505#define ADF4377_R03B_RSV1 0x2B
508#define ADF4377_O_VCO_BAND_MSK NO_OS_BIT(3)
509#define ADF4377_O_VCO_BAND(x) no_os_field_prep(ADF4377_O_VCO_BAND_MSK, x)
510#define ADF4377_O_VCO_CORE_MSK NO_OS_BIT(2)
511#define ADF4377_O_VCO_CORE(x) no_os_field_prep(ADF4377_O_VCO_CORE_MSK, x)
512#define ADF4377_O_VCO_BIAS_MSK NO_OS_BIT(1)
513#define ADF4377_O_VCO_BIAS(x) no_os_field_prep(ADF4377_O_VCO_BIAS_MSK, x)
516#define ADF4377_O_VCO_BAND_VCO_CALIB 0x0
517#define ADF4377_O_VCO_BAND_M_VCO 0x1
519#define ADF4377_O_VCO_CORE_VCO_CALIB 0x0
520#define ADF4377_O_VCO_CORE_M_VCO 0x1
522#define ADF4377_O_VCO_BIAS_VCO_CALIB 0x0
523#define ADF4377_O_VCO_BIAS_M_VCO 0x1
526#define ADF4377_R042_RSV5_MSK NO_OS_BIT(7)
527#define ADF4377_PD_SR_MON_MSK NO_OS_BIT(6)
528#define ADF4377_PD_SR_MON(x) no_os_field_prep(ADF4377_PD_SR_MON_MSK, x)
529#define ADF4377_SR_SEL_MSK NO_OS_BIT(5)
530#define ADF4377_SR_SEL(x) no_os_field_prep(ADF4377_SR_SEL_MSK, x)
531#define ADF4377_RST_SR_MON_MSK NO_OS_BIT(4)
532#define ADF4377_RST_SR_MON(x) no_os_field_prep(ADF4377_RST_SR_MON_MSK, x)
533#define ADF4377_R042_RSV1_MSK NO_OS_GENMASK(3, 0)
536#define ADF4377_R042_RSV1 0x05
539#define ADF4377_INV_SR_MSK NO_OS_BIT(7)
540#define ADF4377_INV_SR(x) no_os_field_prep(ADF4377_INV_SR_MSK, x)
541#define ADF4377_SR_DEL_MSK NO_OS_GENMASK(6, 0)
542#define ADF4377_SR_DEL(x) no_os_field_prep(ADF4377_SR_DEL_MSK, x)
545#define ADF4377_ADC_ST_CNV_MSK NO_OS_BIT(0)
546#define ADF4377_ADC_ST_CNV(x) no_os_field_prep(ADF4377_ADC_ST_CNV_MSK, x)
549#define ADF4377_EN_CLK2_MSK NO_OS_BIT(7)
550#define ADF4377_EN_CLK2(x) no_os_field_prep(ADF4377_EN_CLK2_MSK, x)
551#define ADF4377_EN_CLK1_MSK NO_OS_BIT(6)
552#define ADF4377_EN_CLK1(x) no_os_field_prep(ADF4377_EN_CLK1_MSK, x)
553#define ADF4377_REF_OK_MSK NO_OS_BIT(3)
554#define ADF4377_REF_OK(x) no_os_field_prep(ADF4377_REF_OK_MSK, x)
555#define ADF4377_ADC_BUSY_MSK NO_OS_BIT(2)
556#define ADF4377_ADC_BUSY(x) no_os_field_prep(ADF4377_ADC_BUSY_MSK, x)
557#define ADF4377_FSM_BUSY_MSK NO_OS_BIT(1)
558#define ADF4377_FSM_BUSY(x) no_os_field_prep(ADF4377_FSM_BUSY_MSK, x)
559#define ADF4377_LOCKED_MSK NO_OS_BIT(0)
560#define ADF4377_LOCKED(x) no_os_field_prep(ADF4377_LOCKED_MSK, x)
563#define ADF4377_VCO_CORE_MSK NO_OS_GENMASK(1, 0)
564#define ADF4377_VCO_CORE(x) no_os_field_prep(ADF4377_VCO_CORE_MSK, x)
567#define ADF4377_CHIP_TEMP_LSB_MSK NO_OS_GENMASK(7, 0)
568#define ADF4377_CHIP_TEMP_LSB(x) no_os_field_prep(ADF4377_CHIP_TEMP_LSB_MSK, x)
571#define ADF4377_CHIP_TEMP_MSB_MSK NO_OS_BIT(0)
572#define ADF4377_CHIP_TEMP_MSB(x) no_os_field_prep(ADF4377_CHIP_TEMP_MSB_MSK, x)
575#define ADF4377_VCO_BAND_MSK NO_OS_GENMASK(7, 0)
576#define ADF4377_VCO_BAND(x) no_os_field_prep(ADF4377_VCO_BAND_MSK, x)
579#define ADF4377_CHIP_VERSION_MSK NO_OS_GENMASK(7, 0)
580#define ADF4377_CHIP_VERSION(x) no_os_field_prep(ADF4377_CHIP_VERSION_MSK, x)
582#define ADF4377_SPI_4W_CFG(x) (no_os_field_prep(ADF4377_SDO_ACTIVE_MSK, x) | \
583 no_os_field_prep(ADF4377_SDO_ACTIVE_R_MSK, x))
582#define ADF4377_SPI_4W_CFG(x) (no_os_field_prep(ADF4377_SDO_ACTIVE_MSK, x) | \ …
585#define ADF4377_SPI_LSB_CFG(x) (no_os_field_prep(ADF4377_LSB_FIRST_MSK, x) | \
586 no_os_field_prep(ADF4377_LSB_FIRST_R_MSK, x))
585#define ADF4377_SPI_LSB_CFG(x) (no_os_field_prep(ADF4377_LSB_FIRST_MSK, x) | \ …
588#define ADF4377_SPI_WRITE_CMD 0x0
589#define ADF4377_SPI_READ_CMD NO_OS_BIT(7)
590#define ADF4377_BUFF_SIZE_BYTES 3
591#define ADF4377_MAX_VCO_FREQ 12800000000ull
592#define ADF4377_MIN_VCO_FREQ 6400000000ull
593#define ADF4377_MAX_REFIN_FREQ 1000000000
594#define ADF4377_MIN_REFIN_FREQ 10000000
595#define ADF4377_MAX_FREQ_PFD 500000000
596#define ADF4377_MIN_FREQ_PFD 3000000
597#define ADF4377_MAX_CLKPN_FREQ ADF4377_MAX_VCO_FREQ
598#define ADF4377_MIN_CLKPN_FREQ (ADF4377_MIN_VCO_FREQ / 8)
599#define ADF4377_FREQ_PFD_80MHZ 80000000
600#define ADF4377_FREQ_PFD_125MHZ 125000000
601#define ADF4377_FREQ_PFD_160MHZ 160000000
602#define ADF4377_FREQ_PFD_250MHZ 250000000
603#define ADF4377_FREQ_PFD_320MHZ 320000000
604#define ADF4377_CPI_VAL_MAX 15
605#define ADF4377_RFOUT_MAX 12800000000U
606#define ADF4377_RFOUT_MIN 800000000U
607#define ADF4377_CLKOUT_DIV_REG_VAL_MAX 3
608#define ADF4377_LKD_DELAY_US 5000
609#define ADF4377_POR_DELAY_US 200
610#define ADF4377_BLEED_WORD_MAX 1023
611#define ADF4377_REF_DIV_MAX 63
612#define ADF4377_OUT_PWR_MAX ADF4377_CLKOUT_DIV_REG_VAL_MAX
613#define ADF4377_CLKIN_REF_MIN 10000000
614#define ADF4377_CLKIN_REF_MAX 10000000000U
615#define ADF4377_SR_DEL_MAX 127
616#define ADF4377_SR_MON_DELAY_US 100U
619#define ADF4377_SPI_SCRATCHPAD_TEST_A 0xA5u
620#define ADF4377_SPI_SCRATCHPAD_TEST_B 0x5Au
621#define ADF4377_SPI_DUMMY_DATA 0x00
622#define ADF4377_CHECK_RANGE(freq, range) \
623 ((freq > ADF4377_MAX_ ## range) || (freq < ADF4377_MIN_ ## range))
622#define ADF4377_CHECK_RANGE(freq, range) \ …
722 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:786
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:343
int32_t adf4377_init(struct adf4377_dev **device, struct adf4377_init_param *init_param)
Initializes the ADF4377.
Definition adf4377.c:1040
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:218
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:640
int adf4377_get_en_sysref_monitor(struct adf4377_dev *dev, bool *en)
Gets the value of the set sysref monitoring.
Definition adf4377.c:884
adf4377_dev_id
ID of Devices supported by the driver.
Definition adf4377.h:629
@ ADF4378
Definition adf4377.h:631
@ ADF4377
Definition adf4377.h:630
int adf4377_get_rfout(struct adf4377_dev *dev, uint64_t *val)
Gets the user proposed output frequency.
Definition adf4377.c:729
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:595
int adf4377_get_ref_div(struct adf4377_dev *dev, int32_t *div)
Gets the value the reference divider.
Definition adf4377.c:320
int adf4377_spi_write(struct adf4377_dev *dev, uint8_t reg_addr, uint8_t data)
Writes data to ADF4377 over SPI.
Definition adf4377.c:103
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:546
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:763
int adf4377_get_ref_clk(struct adf4377_dev *dev, uint64_t *val)
Gets the user proposed reference frequency.
Definition adf4377.c:240
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:258
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:279
int adf4377_set_en_sysref_monitor(struct adf4377_dev *dev, bool en)
Set enable/disable sysref monitoring.
Definition adf4377.c:849
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:301
int adf4377_check_scratchpad(struct adf4377_dev *dev)
ADF4377 SPI Scratchpad check.
Definition adf4377.c:191
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:360
int32_t adf4377_remove(struct adf4377_dev *dev)
Free resoulces allocated for ADF4377.
Definition adf4377.c:1164
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:168
int adf4377_set_freq(struct adf4377_dev *dev)
Definition adf4377.c:661
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:496
int adf4377_get_rfout_divider(struct adf4377_dev *dev, int8_t *div)
Gets the rfout divider register value.
Definition adf4377.c:616
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:808
int adf4377_get_bleed_word(struct adf4377_dev *dev, int32_t *word)
Gets the value of the set bleed word.
Definition adf4377.c:467
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:828
int adf4377_get_out_power(struct adf4377_dev *dev, uint8_t ch, int8_t *pwr)
Gets the output power register value.
Definition adf4377.c:570
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:438
int adf4377_spi_read(struct adf4377_dev *dev, uint8_t reg_addr, uint8_t *data)
Reads data from ADF4377 over SPI.
Definition adf4377.c:134
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:518
Header file of GPIO Interface.
Header file of SPI Interface.
Header file of utility functions.
ADF4377 Device Descriptor.
Definition adf4377.h:671
bool spi4wire
Definition adf4377.h:683
struct no_os_gpio_desc * gpio_ce
Definition adf4377.h:679
uint8_t sr_del_adj
Definition adf4377.h:709
uint8_t muxout_default
Definition adf4377.h:695
uint32_t f_pfd
Definition adf4377.h:685
uint8_t sr_inv
Definition adf4377.h:711
struct no_os_gpio_desc * gpio_enclk1
Definition adf4377.h:675
uint32_t ref_div_factor
Definition adf4377.h:699
enum adf4377_dev_id dev_id
Definition adf4377.h:681
uint8_t cp_i
Definition adf4377.h:693
uint16_t bleed_word
Definition adf4377.h:707
bool sysrefout
Definition adf4377.h:713
uint64_t f_clk
Definition adf4377.h:687
uint64_t f_vco
Definition adf4377.h:689
uint8_t clkout_op
Definition adf4377.h:705
uint16_t n_int
Definition adf4377.h:703
struct no_os_spi_desc * spi_desc
Definition adf4377.h:673
struct no_os_gpio_desc * gpio_enclk2
Definition adf4377.h:677
uint8_t ref_doubler_en
Definition adf4377.h:697
uint64_t clkin_freq
Definition adf4377.h:691
uint8_t clkout_div_sel
Definition adf4377.h:701
ADF4377 Initialization Parameters structure.
Definition adf4377.h:638
uint32_t muxout_select
Definition adf4377.h:658
struct no_os_spi_init_param * spi_init
Definition adf4377.h:640
struct no_os_gpio_init_param * gpio_ce_param
Definition adf4377.h:642
struct no_os_gpio_init_param * gpio_enclk1_param
Definition adf4377.h:644
enum adf4377_dev_id dev_id
Definition adf4377.h:648
bool spi4wire
Definition adf4377.h:650
uint8_t clkout_op
Definition adf4377.h:662
uint32_t ref_div_factor
Definition adf4377.h:664
uint8_t ref_doubler_en
Definition adf4377.h:660
struct no_os_gpio_init_param * gpio_enclk2_param
Definition adf4377.h:646
uint64_t clkin_freq
Definition adf4377.h:652
uint64_t f_clk
Definition adf4377.h:654
uint8_t cp_i
Definition adf4377.h:656
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