Go to the documentation of this file.
51 #define ADF4377_REG(x) (x)
54 #define ADF4377_SOFT_RESET_R_MSK NO_OS_BIT(7)
55 #define ADF4377_SOFT_RESET_R(x) no_os_field_prep(ADF4377_SOFT_RESET_R_MSK, x)
56 #define ADF4377_SOFT_RESET_MSK NO_OS_BIT(0)
57 #define ADF4377_SOFT_RESET(x) no_os_field_prep(ADF4377_SOFT_RESET_MSK, x)
58 #define ADF4377_LSB_FIRST_R_MSK NO_OS_BIT(6)
59 #define ADF4377_LSB_FIRST_R(x) no_os_field_prep(ADF4377_LSB_FIRST_R_MSK, x)
60 #define ADF4377_LSB_FIRST_MSK NO_OS_BIT(1)
61 #define ADF4377_LSB_FIRST(x) no_os_field_prep(ADF4377_LSB_FIRST_MSK, x)
62 #define ADF4377_ADDRESS_ASC_R_MSK NO_OS_BIT(5)
63 #define ADF4377_ADDRESS_ASC_R(x) no_os_field_prep(ADF4377_ADDRESS_ASC_R_MSK, x)
64 #define ADF4377_ADDRESS_ASC_MSK NO_OS_BIT(2)
65 #define ADF4377_ADDRESS_ASC(x) no_os_field_prep(ADF4377_ADDRESS_ASC_MSK, x)
66 #define ADF4377_SDO_ACTIVE_R_MSK NO_OS_BIT(4)
67 #define ADF4377_SDO_ACTIVE_R(x) no_os_field_prep(ADF4377_SDO_ACTIVE_R_MSK, x)
68 #define ADF4377_SDO_ACTIVE_MSK NO_OS_BIT(3)
69 #define ADF4377_SDO_ACTIVE(x) no_os_field_prep(ADF4377_SDO_ACTIVE_MSK, x)
72 #define ADF4377_SDO_ACTIVE_SPI_3W 0x0
73 #define ADF4377_SDO_ACTIVE_SPI_4W 0x1
75 #define ADF4377_ADDR_ASC_AUTO_DECR 0x0
76 #define ADF4377_ADDR_ASC_AUTO_INCR 0x1
78 #define ADF4377_LSB_FIRST_MSB 0x0
79 #define ADF4377_LSB_FIRST_LSB 0x1
81 #define ADF4377_SOFT_RESET_N_OP 0x0
82 #define ADF4377_SOFT_RESET_EN 0x1
85 #define ADF4377_SINGLE_INSTR_MSK NO_OS_BIT(7)
86 #define ADF4377_SINGLE_INSTR(x) no_os_field_prep(ADF4377_SINGLE_INSTRUCTION_MSK, x)
87 #define ADF4377_MASTER_RB_CTRL_MSK NO_OS_BIT(5)
88 #define ADF4377_MASTER_RB_CTRL(x) no_os_field_prep(ADF4377_MASTER_RB_CTRL_MSK, x)
91 #define ADF4377_SPI_STREAM_EN 0x0
92 #define ADF4377_SPI_STREAM_DIS 0x1
94 #define ADF4377_RB_SLAVE_REG 0x0
95 #define ADF4377_RB_MASTER_REG 0x1
98 #define ADF4377_CHIP_TYPE 0x06
101 #define ADF4377_PRODUCT_ID_LSB 0x0005
104 #define ADF4377_PRODUCT_ID_MSB 0x0005
107 #define ADF4377_SCRATCHPAD_MSK NO_OS_GENMASK(7, 0)
108 #define ADF4377_SCRATCHPAD(x) no_os_field_prep(ADF4377_SCRATCHPAD_MSK, x)
111 #define ADF4377_SPI_REVISION 0x01
114 #define ADF4377_VENDOR_ID_LSB 0x456
117 #define ADF4377_VENDOR_ID_MSB 0x456
120 #define ADF4377_R00F_RSV1 0x14
123 #define ADF4377_N_INT_LSB_MSK NO_OS_GENMASK(7, 0)
124 #define ADF4377_N_INT_LSB(x) no_os_field_prep(ADF4377_N_INT_LSB_MSK, x)
127 #define ADF4377_EN_AUTOCAL_MSK NO_OS_BIT(7)
128 #define ADF4377_EN_AUTOCAL(x) no_os_field_prep(ADF4377_EN_AUTOCAL_MSK, x)
129 #define ADF4377_EN_RDBLR_MSK NO_OS_BIT(6)
130 #define ADF4377_EN_RDBLR(x) no_os_field_prep(ADF4377_EN_RDBLR_MSK, x)
131 #define ADF4377_DCLK_DIV2_MSK NO_OS_GENMASK(5,4)
132 #define ADF4377_DCLK_DIV2(x) no_os_field_prep(ADF4377_DCLK_DIV2_MSK, x)
133 #define ADF4377_N_INT_MSB_MSK NO_OS_GENMASK(3,0)
134 #define ADF4377_N_INT_MSB(x) no_os_field_prep(ADF4377_N_INT_MSB_MSK, x)
137 #define ADF4377_VCO_CALIB_DIS 0x0
138 #define ADF4377_VCO_CALIB_EN 0x1
140 #define ADF4377_REF_DBLR_DIS 0x0
141 #define ADF4377_REF_DBLR_EN 0x1
143 #define ADF4377_DCLK_DIV2_1 0x0
144 #define ADF4377_DCLK_DIV2_2 0x1
145 #define ADF4377_DCLK_DIV2_4 0x2
146 #define ADF4377_DCLK_DIV2_8 0x3
149 #define ADF4377_CLKOUT_DIV_MSK NO_OS_GENMASK(7, 6)
150 #define ADF4377_CLKOUT_DIV(x) no_os_field_prep(ADF4377_CLKOUT_DIV_MSK, x)
151 #define ADF4377_R_DIV_MSK NO_OS_GENMASK(5, 0)
152 #define ADF4377_R_DIV(x) no_os_field_prep(ADF4377_R_DIV_MSK, x)
155 #define ADF4377_CLKOUT_DIV_1 0x0
156 #define ADF4377_CLKOUT_DIV_2 0x1
157 #define ADF4377_CLKOUT_DIV_4 0x2
158 #define ADF4377_CLKOUT_DIV_8 0x3
160 #define ADF4377_MIN_R_DIV 0x00
161 #define ADF4378_MAX_R_DIV 0x3F
164 #define ADF4377_M_VCO_CORE_MSK NO_OS_GENMASK(5,4)
165 #define ADF4377_M_VCO_CORE(x) no_os_field_prep(ADF4377_M_VCO_CORE_MSK, x)
166 #define ADF4377_M_VCO_BIAS_MSK NO_OS_GENMASK(3,0)
167 #define ADF4377_M_VCO_BIAS(x) no_os_field_prep(ADF4377_M_VCO_BIAS_MSK, x)
170 #define ADF4377_M_VCO_0 0x0
171 #define ADF4377_M_VCO_1 0x1
172 #define ADF4377_M_VCO_2 0x2
173 #define ADF4377_M_VCO_3 0x3
175 #define M_VCO_BIAS_MIN 0xF
176 #define M_VCO_BIAS_MAX 0x0
179 #define ADF4377_M_VCO_BAND_MSK NO_OS_GENMASK(7,0)
180 #define ADF4377_M_VCO_BAND(x) no_os_field_prep(ADF4377_M_VCO_BAND_MSK, x)
183 #define ADF4377_VCO_BAND_MIN 0xFF
184 #define ADF4377_VCO_BAND_MAX 0x00
187 #define ADF4377_BLEED_I_LSB_MSK NO_OS_GENMASK(7, 6)
188 #define ADF4377_BLEED_I_LSB(x) no_os_field_prep(ADF4377_BLEED_I_LSB_MSK, x)
189 #define ADF4377_BLEED_POL_MSK NO_OS_BIT(5)
190 #define ADF4377_BLEED_POL(x) no_os_field_prep(ADF4377_BLEED_POL_MSK, x)
191 #define ADF4377_EN_BLEED_MSK NO_OS_BIT(4)
192 #define ADF4377_EN_BLEED(x) no_os_field_prep(ADF4377_EN_BLEED_MSK, x)
193 #define ADF4377_CP_I_MSK NO_OS_GENMASK(3, 0)
194 #define ADF4377_CP_I(x) no_os_field_prep(ADF4377_CP_I_MSK, x)
197 #define ADF4377_CURRENT_SINK 0x0
198 #define ADF4377_CURRENT_SOURCE 0x1
200 #define ADF4377_CP_0MA7 0x0
201 #define ADF4377_CP_0MA9 0x1
202 #define ADF4377_CP_1MA1 0x2
203 #define ADF4377_CP_1MA3 0x3
204 #define ADF4377_CP_1MA4 0x4
205 #define ADF4377_CP_1MA8 0x5
206 #define ADF4377_CP_2MA2 0x6
207 #define ADF4377_CP_2MA5 0x7
208 #define ADF4377_CP_2MA9 0x8
209 #define ADF4377_CP_3MA6 0x9
210 #define ADF4377_CP_4MA3 0xA
211 #define ADF4377_CP_5MA0 0xB
212 #define ADF4377_CP_5MA7 0xC
213 #define ADF4377_CP_7MA2 0xD
214 #define ADF4377_CP_8MA6 0xE
215 #define ADF4377_CP_10MA1 0xF
218 #define ADF4377_BLEED_I_MSB_MSK NO_OS_GENMASK(7, 0)
219 #define ADF4377_BLEED_I_MSB(x) no_os_field_prep(ADF4377_BLEED_I_MSB_MSK, x)
222 #define ADF4377_INV_CLKOUT_MSK NO_OS_BIT(7)
223 #define ADF4377_INV_CLKOUT(x) no_os_field_prep(ADF4377_INV_CLKOUT_MSK, x)
224 #define ADF4377_N_DEL_MSK NO_OS_GENMASK(6, 0)
225 #define ADF4377_N_DEL(x) no_os_field_prep(ADF4377_N_DEL_MSK, x)
228 #define ADF4377_CMOS_OV_MSK NO_OS_BIT(7)
229 #define ADF4377_CMOS_OV(x) no_os_field_prep(ADF4377_CMOS_OV_MSK, x)
230 #define ADF4377_R_DEL_MSK NO_OS_GENMASK(6, 0)
231 #define ADF4377_R_DEL(x) no_os_field_prep(ADF4377_R_DEL_MSK, x)
234 #define ADF4377_1V8_LOGIC 0x0
235 #define ADF4377_3V3_LOGIC 0x1
237 #define ADF4377_R_DEL_MIN 0x00
238 #define ADF4377_R_DEL_MAX 0x7F
241 #define ADF4377_CLKOUT2_OP_MSK NO_OS_GENMASK(7, 6)
242 #define ADF4377_CLKOUT2_OP(x) no_os_field_prep(ADF4377_CLKOUT2_OP_MSK, x)
243 #define ADF4377_CLKOUT1_OP_MSK NO_OS_GENMASK(5, 4)
244 #define ADF4377_CLKOUT1_OP(x) no_os_field_prep(ADF4377_CLKOUT1_OP_MSK, x)
245 #define ADF4377_PD_CLK_MSK NO_OS_BIT(3)
246 #define ADF4377_PD_CLK(x) no_os_field_prep(ADF4377_PD_CLK_MSK, x)
247 #define ADF4377_PD_RDET_MSK NO_OS_BIT(2)
248 #define ADF4377_PD_RDET(x) no_os_field_prep(ADF4377_PD_RDET_MSK, x)
249 #define ADF4377_PD_ADC_MSK NO_OS_BIT(1)
250 #define ADF4377_PD_ADC(x) no_os_field_prep(ADF4377_PD_ADC_MSK, x)
251 #define ADF4377_PD_CALADC_MSK NO_OS_BIT(0)
252 #define ADF4377_PD_CALADC(x) no_os_field_prep(ADF4377_PD_CALADC_MSK, x)
255 #define ADF4377_CLKOUT_320MV 0x0
256 #define ADF4377_CLKOUT_420MV 0x1
257 #define ADF4377_CLKOUT_530MV 0x2
258 #define ADF4377_CLKOUT_640MV 0x3
260 #define ADF4377_PD_CLK_N_OP 0x0
261 #define ADF4377_PD_CLK_PD 0x1
263 #define ADF4377_PD_RDET_N_OP 0x0
264 #define ADF4377_PD_RDET_PD 0x1
266 #define ADF4377_PD_ADC_N_OP 0x0
267 #define ADF4377_PD_ADC_PD 0x1
269 #define ADF4377_PD_CALADC_N_OP 0x0
270 #define ADF4377_PD_CALADC_PD 0x1
273 #define ADF4377_PD_ALL_MSK NO_OS_BIT(7)
274 #define ADF4377_PD_ALL(x) no_os_field_prep(ADF4377_PD_ALL_MSK, x)
275 #define ADF4377_PD_RDIV_MSK NO_OS_BIT(6)
276 #define ADF4377_PD_RDIV(x) no_os_field_prep(ADF4377_PD_RDIV_MSK, x)
277 #define ADF4377_PD_NDIV_MSK NO_OS_BIT(5)
278 #define ADF4377_PD_NDIV(x) no_os_field_prep(ADF4377_PD_NDIV_MSK, x)
279 #define ADF4377_PD_VCO_MSK NO_OS_BIT(4)
280 #define ADF4377_PD_VCO(x) no_os_field_prep(ADF4377_PD_VCO_MSK, x)
281 #define ADF4377_PD_LD_MSK NO_OS_BIT(3)
282 #define ADF4377_PD_LD(x) no_os_field_prep(ADF4377_PD_LD_MSK, x)
283 #define ADF4377_PD_PFDCP_MSK NO_OS_BIT(2)
284 #define ADF4377_PD_PFDCP(x) no_os_field_prep(ADF4377_PD_PFDCP_MSK, x)
285 #define ADF4377_PD_CLKOUT1_MSK NO_OS_BIT(1)
286 #define ADF4377_PD_CLKOUT1(x) no_os_field_prep(ADF4377_PD_CLKOUT1_MSK, x)
287 #define ADF4377_PD_CLKOUT2_MSK NO_OS_BIT(0)
288 #define ADF4377_PD_CLKOUT2(x) no_os_field_prep(ADF4377_PD_CLKOUT2_MSK, x)
291 #define ADF4377_PD_ALL_N_OP 0x0
292 #define ADF4377_PD_ALL_PD 0x1
294 #define ADF4377_PD_RDIV_N_OP 0x0
295 #define ADF4377_PD_RDIV_PD 0x1
297 #define ADF4377_PD_NDIV_N_OP 0x0
298 #define ADF4377_PD_NDIV_PD 0x1
300 #define ADF4377_PD_VCO_N_OP 0x0
301 #define ADF4377_PD_VCO_PD 0x1
303 #define ADF4377_PD_LD_N_OP 0x0
304 #define ADF4377_PD_LD_PD 0x1
306 #define ADF4377_PD_PFDCP_N_OP 0x0
307 #define ADF4377_PD_PFDCP_PD 0x1
309 #define ADF4377_PD_CLKOUT1_N_OP 0x0
310 #define ADF4377_PD_CLKOUT1_PD 0x1
312 #define ADF4377_PD_CLKOUT2_N_OP 0x0
313 #define ADF4377_PD_CLKOUT2_PD 0x1
316 #define ADF4377_EN_LOL_MSK NO_OS_BIT(7)
317 #define ADF4377_EN_LOL(x) no_os_field_prep(ADF4377_EN_LOL_MSK, x)
318 #define ADF4377_LDWIN_PW_MSK NO_OS_BIT(6)
319 #define ADF4377_LDWIN_PW(x) no_os_field_prep(ADF4377_LDWIN_PW_MSK, x)
320 #define ADF4377_EN_LDWIN_MSK NO_OS_BIT(5)
321 #define ADF4377_EN_LDWIN(x) no_os_field_prep(ADF4377_EN_LDWIN_MSK, x)
322 #define ADF4377_LD_COUNT_MSK NO_OS_GENMASK(4, 0)
323 #define ADF4377_LD_COUNT(x) no_os_field_prep(ADF4377_LD_COUNT_MSK, x)
327 #define ADF4377_LDWIN_PW_NARROW 0x0
328 #define ADF4377_LDWIN_PW_WIDE 0x1
331 #define ADF4377_EN_DNCLK_MSK NO_OS_BIT(7)
332 #define ADF4377_EN_DNCLK(x) no_os_field_prep(ADF4377_EN_DNCLK_MSK, x)
333 #define ADF4377_EN_DRCLK_MSK NO_OS_BIT(6)
334 #define ADF4377_EN_DRCLK(x) no_os_field_prep(ADF4377_EN_DRCLK_MSK, x)
335 #define ADF4377_RST_LD_MSK NO_OS_BIT(2)
336 #define ADF4377_RST_LD(x) no_os_field_prep(ADF4377_RST_LD_MSK, x)
337 #define ADF4377_R01C_RSV1_MSK NO_OS_BIT(0)
338 #define ADF4377_R01C_RSV1(x) no_os_field_prep(ADF4377_R01C_RSV1_MSK, x)
341 #define ADF4377_EN_DNCLK_OFF 0x0
342 #define ADF4377_EN_DNCLK_ON 0x1
344 #define ADF4377_EN_DRCLK_OFF 0x0
345 #define ADF4377_EN_DRCLK_ON 0x1
347 #define ADF4377_RST_LD_INACTIVE 0x0
348 #define ADF4377_RST_LD_ACTIVE 0x1
351 #define ADF4377_MUXOUT_MSK NO_OS_GENMASK(7, 4)
352 #define ADF4377_MUXOUT(x) no_os_field_prep(ADF4377_MUXOUT_MSK, x)
353 #define ADF4377_EN_CPTEST_MSK NO_OS_BIT(2)
354 #define ADF4377_EN_CPTEST(x) no_os_field_prep(ADF4377_EN_CPTEST_MSK, x)
355 #define ADF4377_CP_DOWN_MSK NO_OS_BIT(1)
356 #define ADF4377_CP_DOWN(x) no_os_field_prep(ADF4377_CP_DOWN_MSK, x)
357 #define ADF4377_CP_UP_MSK NO_OS_BIT(0)
358 #define ADF4377_CP_UP(x) no_os_field_prep(ADF4377_CP_UP_MSK, x)
361 #define ADF4377_MUXOUT_HIGH_Z 0x0
362 #define ADF4377_MUXOUT_LKDET 0x1
363 #define ADF4377_MUXOUT_LOW 0x2
364 #define ADF4377_MUXOUT_DIV_RCLK_2 0x4
365 #define ADF4377_MUXOUT_DIV_NCLK_2 0x5
366 #define ADF4377_MUXOUT_HIGH 0x8
368 #define ADF4377_EN_CPTEST_OFF 0x0
369 #define ADF4377_EN_CPTEST_ON 0x1
371 #define ADF4377_CP_DOWN_OFF 0x0
372 #define ADF4377_CP_DOWN_ON 0x1
374 #define ADF4377_CP_UP_OFF 0x0
375 #define ADF4377_CP_UP_ON 0x1
378 #define ADF4377_BST_REF_MSK NO_OS_BIT(7)
379 #define ADF4377_BST_REF(x) no_os_field_prep(ADF4377_BST_REF_MSK, x)
380 #define ADF4377_FILT_REF_MSK NO_OS_BIT(6)
381 #define ADF4377_FILT_REF(x) no_os_field_prep(ADF4377_FILT_REF_MSK, x)
382 #define ADF4377_REF_SEL_MSK NO_OS_BIT(5)
383 #define ADF4377_REF_SEL(x) no_os_field_prep(ADF4377_REF_SEL_MSK, x)
384 #define ADF4377_R01F_RSV1_MSK NO_OS_GENMASK(2, 0)
385 #define ADF4377_R01F_RSV1(x) no_os_field_prep(ADF4377_R01F_RSV1_MSK, x)
388 #define ADF4377_BST_LARGE_REF_IN 0x0
389 #define ADF4377_BST_SMALL_REF_IN 0x1
391 #define ADF4377_FILT_REF_OFF 0x0
392 #define ADF4377_FILT_REF_ON 0x1
394 #define ADF4377_REF_SEL_DMA 0x0
395 #define ADF4377_REF_SEL_LNA 0x1
398 #define ADF4377_RST_SYS_MSK NO_OS_BIT(4)
399 #define ADF4377_RST_SYS(x) no_os_field_prep(ADF4377_RST_SYS_MSK, x)
400 #define ADF4377_EN_ADC_CLK_MSK NO_OS_BIT(3)
401 #define ADF4377_EN_ADC_CLK(x) no_os_field_prep(ADF4377_EN_ADC_CLK_MSK, x)
402 #define ADF4377_R020_RSV1_MSK NO_OS_BIT(0)
403 #define ADF4377_R020_RSV1(x) no_os_field_prep(ADF4377_R020_RSV1_MSK, x)
406 #define ADF4377_RST_SYS_INACTIVE 0x0
407 #define ADF4377_RST_SYS_ACTIVE 0x1
410 #define ADF4377_R021_RSV1 0xD3
413 #define ADF4377_R022_RSV1 0x32
416 #define ADF4377_R023_RSV1 0x18
419 #define ADF4377_DCLK_MODE_MSK NO_OS_BIT(2)
420 #define ADF4377_DCLK_MODE(x) no_os_field_prep(ADF4377_DCLK_MODE_MSK, x)
423 #define ADF4377_CLKODIV_DB_MSK NO_OS_BIT(7)
424 #define ADF4377_CLKODIV_DB(x) no_os_field_prep(ADF4377_CLKODIV_DB_MSK, x)
425 #define ADF4377_DCLK_DB_MSK NO_OS_BIT(6)
426 #define ADF4377_DCLK_DB(x) no_os_field_prep(ADF4377_DCLK_DB_MSK, x)
427 #define ADF4377_R025_RSV1_MSK NO_OS_BIT(4) | NO_OS_BIT(2) | NO_OS_BIT(1)
428 #define ADF4377_R025_RSV1(x) no_os_field_prep(ADF4377_R025_RSV1_MSK, x)
431 #define ADF4377_VCO_BAND_DIV_MSK NO_OS_GENMASK(7, 0)
432 #define ADF4377_VCO_BAND_DIV(x) no_os_field_prep(ADF4377_VCO_BAND_DIV_MSK, x)
435 #define ADF4377_VCO_BAND_DIV_MIN 0x00
436 #define ADF4377_VCO_BAND_DIV_MAX 0xFF
439 #define ADF4377_SYNTH_LOCK_TO_LSB_MSK NO_OS_GENMASK(7, 0)
440 #define ADF4377_SYNTH_LOCK_TO_LSB(x) no_os_field_prep(ADF4377_SYNTH_LOCK_TO_LSB_MSK, x)
443 #define ADF4377_O_VCO_DB_MSK NO_OS_BIT(7)
444 #define ADF4377_O_VCO_DB(x) no_os_field_prep(ADF4377_O_VCO_DB_MSK, x)
445 #define ADF4377_SYNTH_LOCK_TO_MSB_MSK NO_OS_GENMASK(6, 0)
446 #define ADF4377_SYNTH_LOCK_TO_MSB(x) no_os_field_prep(ADF4377_SYNTH_LOCK_TO_MSB_MSK, x)
449 #define ADF4377_VCO_ALC_TO_LSB_MSK NO_OS_GENMASK(7, 0)
450 #define ADF4377_VCO_ALC_TO_LSB(x) no_os_field_prep(ADF4377_VCO_ALC_TO_LSB_MSK, x)
453 #define ADF4377_DEL_CTRL_DB_MSK NO_OS_BIT(7)
454 #define ADF4377_DEL_CTRL_DB(x) no_os_field_prep(ADF4377_DEL_CTRL_DB_MSK, x)
455 #define ADF4377_VCO_ALC_TO_MSB_MSK NO_OS_GENMASK(6, 0)
456 #define ADF4377_VCO_ALC_TO_MSB(x) no_os_field_prep(ADF4377_VCO_ALC_TO_MSB_MSK, x)
459 #define ADF4377_R02C_RSV1 0xC0
462 #define ADF4377_ADC_CLK_DIV_MSK NO_OS_GENMASK(7, 0)
463 #define ADF4377_ADC_CLK_DIV(x) no_os_field_prep(ADF4377_ADC_CLK_DIV_MSK, x)
466 #define ADF4377_EN_ADC_CNV_MSK NO_OS_BIT(7)
467 #define ADF4377_EN_ADC_CNV(x) no_os_field_prep(ADF4377_EN_ADC_CNV_MSK, x)
468 #define ADF4377_EN_ADC_MSK NO_OS_BIT(1)
469 #define ADF4377_EN_ADC(x) no_os_field_prep(ADF4377_EN_ADC_MSK, x)
470 #define ADF4377_ADC_A_CONV_MSK NO_OS_BIT(0)
471 #define ADF4377_ADC_A_CONV(x) no_os_field_prep(ADF4377_ADC_A_CONV_MSK, x)
474 #define ADF4377_ADC_A_CONV_ADC_ST_CNV 0x0
475 #define ADF4377_ADC_A_CONV_VCO_CALIB 0x1
478 #define ADF4377_DCLK_DIV1_MSK NO_OS_GENMASK(1, 0)
479 #define ADF4377_DCLK_DIV1(x) no_os_field_prep(ADF4377_DCLK_DIV1_MSK, x)
482 #define ADF4377_DCLK_DIV1_1 0x0
483 #define ADF4377_DCLK_DIV1_2 0x1
484 #define ADF4377_DCLK_DIV1_8 0x2
485 #define ADF4377_DCLK_DIV1_32 0x3
488 #define ADF4377_R031_RSV1 0x09
491 #define ADF4377_ADC_CLK_SEL_MSK NO_OS_BIT(6)
492 #define ADF4377_ADC_CLK_SEL(x) no_os_field_prep(ADF4377_ADC_CLK_SEL_MSK, x)
493 #define ADF4377_R032_RSV1_MSK NO_OS_BIT(3) | NO_OS_BIT(0)
494 #define ADF4377_R032_RSV1(x) no_os_field_prep(ADF4377_R032_RSV1_MSK, x)
497 #define ADF4377_ADC_CLK_SEL_N_OP 0x0
498 #define ADF4377_ADC_CLK_SEL_SPI_CLK 0x1
501 #define ADF4377_R033_RSV1 0x18
504 #define ADF4377_R034_RSV1 0x08
507 #define ADF4377_R03A_RSV1 0x5C
510 #define ADF4377_R03B_RSV1 0x2B
513 #define ADF4377_O_VCO_BAND_MSK NO_OS_BIT(3)
514 #define ADF4377_O_VCO_BAND(x) no_os_field_prep(ADF4377_O_VCO_BAND_MSK, x)
515 #define ADF4377_O_VCO_CORE_MSK NO_OS_BIT(2)
516 #define ADF4377_O_VCO_CORE(x) no_os_field_prep(ADF4377_O_VCO_CORE_MSK, x)
517 #define ADF4377_O_VCO_BIAS_MSK NO_OS_BIT(1)
518 #define ADF4377_O_VCO_BIAS(x) no_os_field_prep(ADF4377_O_VCO_BIAS_MSK, x)
521 #define ADF4377_O_VCO_BAND_VCO_CALIB 0x0
522 #define ADF4377_O_VCO_BAND_M_VCO 0x1
524 #define ADF4377_O_VCO_CORE_VCO_CALIB 0x0
525 #define ADF4377_O_VCO_CORE_M_VCO 0x1
527 #define ADF4377_O_VCO_BIAS_VCO_CALIB 0x0
528 #define ADF4377_O_VCO_BIAS_M_VCO 0x1
531 #define ADF4377_R042_RSV1 0x05
534 #define ADF4377_ADC_ST_CNV_MSK NO_OS_BIT(0)
535 #define ADF4377_ADC_ST_CNV(x) no_os_field_prep(ADF4377_ADC_ST_CNV_MSK, x)
538 #define ADF4377_EN_CLK2_MSK NO_OS_BIT(7)
539 #define ADF4377_EN_CLK2(x) no_os_field_prep(ADF4377_EN_CLK2_MSK, x)
540 #define ADF4377_EN_CLK1_MSK NO_OS_BIT(6)
541 #define ADF4377_EN_CLK1(x) no_os_field_prep(ADF4377_EN_CLK1_MSK, x)
542 #define ADF4377_REF_OK_MSK NO_OS_BIT(3)
543 #define ADF4377_REF_OK(x) no_os_field_prep(ADF4377_REF_OK_MSK, x)
544 #define ADF4377_ADC_BUSY_MSK NO_OS_BIT(2)
545 #define ADF4377_ADC_BUSY(x) no_os_field_prep(ADF4377_ADC_BUSY_MSK, x)
546 #define ADF4377_FSM_BUSY_MSK NO_OS_BIT(1)
547 #define ADF4377_FSM_BUSY(x) no_os_field_prep(ADF4377_FSM_BUSY_MSK, x)
548 #define ADF4377_LOCKED_MSK NO_OS_BIT(0)
549 #define ADF4377_LOCKED(x) no_os_field_prep(ADF4377_LOCKED_MSK, x)
552 #define ADF4377_VCO_CORE_MSK NO_OS_GENMASK(1, 0)
553 #define ADF4377_VCO_CORE(x) no_os_field_prep(ADF4377_VCO_CORE_MSK, x)
556 #define ADF4377_CHIP_TEMP_LSB_MSK NO_OS_GENMASK(7, 0)
557 #define ADF4377_CHIP_TEMP_LSB(x) no_os_field_prep(ADF4377_CHIP_TEMP_LSB_MSK, x)
560 #define ADF4377_CHIP_TEMP_MSB_MSK NO_OS_BIT(0)
561 #define ADF4377_CHIP_TEMP_MSB(x) no_os_field_prep(ADF4377_CHIP_TEMP_MSB_MSK, x)
564 #define ADF4377_VCO_BAND_MSK NO_OS_GENMASK(7, 0)
565 #define ADF4377_VCO_BAND(x) no_os_field_prep(ADF4377_VCO_BAND_MSK, x)
568 #define ADF4377_CHIP_VERSION_MSK NO_OS_GENMASK(7, 0)
569 #define ADF4377_CHIP_VERSION(x) no_os_field_prep(ADF4377_CHIP_VERSION_MSK, x)
572 #define ADF4377_SPI_WRITE_CMD 0x0
573 #define ADF4377_SPI_READ_CMD NO_OS_BIT(7)
574 #define ADF4377_BUFF_SIZE_BYTES 3
575 #define ADF4377_MAX_VCO_FREQ 12800000000ull
576 #define ADF4377_MIN_VCO_FREQ 6400000000ull
577 #define ADF4377_MAX_REFIN_FREQ 1000000000
578 #define ADF4377_MIN_REFIN_FREQ 10000000
579 #define ADF4377_MAX_FREQ_PFD 500000000
580 #define ADF4377_MIN_FREQ_PFD 3000000
581 #define ADF4377_MAX_CLKPN_FREQ ADF4377_MAX_VCO_FREQ
582 #define ADF4377_MIN_CLKPN_FREQ (ADF4377_MIN_VCO_FREQ / 8)
583 #define ADF4377_FREQ_PFD_80MHZ 80000000
584 #define ADF4377_FREQ_PFD_125MHZ 125000000
585 #define ADF4377_FREQ_PFD_160MHZ 160000000
586 #define ADF4377_FREQ_PFD_250MHZ 250000000
587 #define ADF4377_FREQ_PFD_320MHZ 320000000
590 #define ADF4377_SPI_SCRATCHPAD_TEST_A 0xA5u
591 #define ADF4377_SPI_SCRATCHPAD_TEST_B 0x5Au
592 #define ADF4377_SPI_DUMMY_DATA 0x00
593 #define ADF4377_CHECK_RANGE(freq, range) \
594 ((freq > ADF4377_MAX_ ## range) || (freq < ADF4377_MIN_ ## range))
691 uint8_t mask, uint8_t data);
#define ADF4377_EN_DNCLK_ON
Definition: adf4377.h:342
#define ADF4377_R020_RSV1(x)
Definition: adf4377.h:403
#define ADF4377_FREQ_PFD_125MHZ
Definition: adf4377.h:584
uint32_t f_pfd
Definition: adf4377.h:658
#define ADF4377_CLKOUT1_OP(x)
Definition: adf4377.h:244
uint32_t timeout
Definition: ad413x.c:49
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:79
uint8_t ref_doubler_en
Definition: adf4377.h:670
#define ADF4377_CLKOUT_DIV(x)
Definition: adf4377.h:150
#define ADF4377_PD_CLKOUT1(x)
Definition: adf4377.h:286
uint8_t clkout_div_sel
Definition: adf4377.h:674
#define ADF4377_ADC_A_CONV_VCO_CALIB
Definition: adf4377.h:475
#define ADF4377_PD_ALL_N_OP
Definition: adf4377.h:291
uint64_t f_vco
Definition: adf4377.h:662
#define ADF4377_SYNTH_LOCK_TO_MSB_MSK
Definition: adf4377.h:445
int32_t adf4377_spi_write(struct adf4377_dev *dev, uint8_t reg_addr, uint8_t data)
Writes data to ADF4377 over SPI.
Definition: adf4377.c:54
#define ADF4377_EN_DRCLK(x)
Definition: adf4377.h:334
#define ADF4377_R01F_RSV1_MSK
Definition: adf4377.h:384
#define ADF4377_PD_LD(x)
Definition: adf4377.h:282
uint8_t cp_i
Definition: adf4377.h:631
#define ADF4377_SPI_SCRATCHPAD_TEST_B
Definition: adf4377.h:591
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
int32_t adf4377_spi_read(struct adf4377_dev *dev, uint8_t reg_addr, uint8_t *data)
Reads data from ADF4377 over SPI.
Definition: adf4377.c:103
#define ADF4377_R03B_RSV1
Definition: adf4377.h:510
#define ADF4377_N_INT_LSB(x)
Definition: adf4377.h:124
#define ADF4377_CLKOUT2_OP_MSK
Definition: adf4377.h:241
#define ADF4377_N_INT_MSB(x)
Definition: adf4377.h:134
ADF4377 Initialization Parameters structure.
Definition: adf4377.h:613
Header file of SPI Interface.
#define ADF4377_R01C_RSV1(x)
Definition: adf4377.h:338
#define ADF4377_ADC_CLK_DIV(x)
Definition: adf4377.h:463
#define ADF4377_EN_DRCLK_MSK
Definition: adf4377.h:333
#define ADF4377_LSB_FIRST_R(x)
Definition: adf4377.h:59
#define ADF4377_CLKOUT2_OP(x)
Definition: adf4377.h:242
int32_t adf4377_init(struct adf4377_dev **device, struct adf4377_init_param *init_param)
Initializes the ADF4377.
Definition: adf4377.c:514
Header file of Delay functions.
uint32_t clkin_freq
Definition: adf4377.h:627
#define ADF4377_SDO_ACTIVE_R(x)
Definition: adf4377.h:67
#define ADF4377_PD_NDIV(x)
Definition: adf4377.h:278
#define ADF4377_CLKOUT_DIV_MSK
Definition: adf4377.h:149
int32_t adf4377_soft_reset(struct adf4377_dev *dev)
Software reset.
Definition: adf4377.c:245
int32_t adf4377_remove(struct adf4377_dev *dev)
Free resoulces allocated for ADF4377.
Definition: adf4377.c:645
#define ADF4377_DCLK_DIV2(x)
Definition: adf4377.h:132
#define ADF4377_EN_AUTOCAL_MSK
Definition: adf4377.h:127
#define ADF4377_SYNTH_LOCK_TO_MSB(x)
Definition: adf4377.h:446
#define ADF4377_VCO_ALC_TO_MSB_MSK
Definition: adf4377.h:455
Header file for adf4377 Driver.
#define ADF4377_EN_AUTOCAL(x)
Definition: adf4377.h:128
Definition: ad9361_util.h:69
#define ADF4377_R032_RSV1(x)
Definition: adf4377.h:494
@ NO_OS_GPIO_HIGH
Definition: no_os_gpio.h:117
#define ADF4377_R025_RSV1_MSK
Definition: adf4377.h:427
uint8_t ref_doubler_en
Definition: adf4377.h:635
#define ADF4377_ADC_BUSY(x)
Definition: adf4377.h:545
#define ADF4377_BUFF_SIZE_BYTES
Definition: adf4377.h:574
#define ADF4377_EN_ADC_CLK_MSK
Definition: adf4377.h:400
#define ADF4377_R01C_RSV1_MSK
Definition: adf4377.h:337
void * no_os_calloc(size_t nitems, size_t size)
Allocate memory and return a pointer to it, set memory to 0.
Definition: chibios_alloc.c:54
uint32_t clkin_freq
Definition: adf4377.h:664
#define ADF4377_DCLK_DIV2_2
Definition: adf4377.h:144
#define ADF4377_N_INT_MSB_MSK
Definition: adf4377.h:133
#define ADF4377_SOFT_RESET_EN
Definition: adf4377.h:82
#define ADF4377_R033_RSV1
Definition: adf4377.h:501
#define ADF4377_CP_I(x)
Definition: adf4377.h:194
uint64_t f_clk
Definition: adf4377.h:629
#define ADF4377_FREQ_PFD_160MHZ
Definition: adf4377.h:585
#define ADF4377_ADDRESS_ASC_R(x)
Definition: adf4377.h:63
struct no_os_gpio_desc * gpio_enclk2
Definition: adf4377.h:650
uint8_t muxout_default
Definition: adf4377.h:668
ADF4377 Device Descriptor.
Definition: adf4377.h:644
#define ADF4377_DCLK_DIV1_1
Definition: adf4377.h:482
#define ADF4377_PD_CLKOUT2_N_OP
Definition: adf4377.h:312
#define ADF4377_EN_ADC_CNV(x)
Definition: adf4377.h:467
#define NO_OS_DIV_ROUND_UP(x, y)
Definition: no_os_util.h:52
#define ADF4377_EN_ADC_CNV_MSK
Definition: adf4377.h:466
#define ADF4377_SPI_SCRATCHPAD_TEST_A
Definition: adf4377.h:590
#define ADF4377_FSM_BUSY(x)
Definition: adf4377.h:547
#define ADF4377_PD_LD_N_OP
Definition: adf4377.h:303
#define ADF4377_CHECK_RANGE(freq, range)
Definition: adf4377.h:593
#define ADF4377_R022_RSV1
Definition: adf4377.h:413
#define ADF4377_R021_RSV1
Definition: adf4377.h:410
#define ADF4377_DCLK_DIV2_1
Definition: adf4377.h:143
#define ADF4377_EN_DRCLK_ON
Definition: adf4377.h:345
struct no_os_gpio_desc * gpio_enclk1
Definition: adf4377.h:648
uint16_t n_int
Definition: adf4377.h:676
#define ADF4377_FREQ_PFD_80MHZ
Definition: adf4377.h:583
#define ADF4377_SOFT_RESET(x)
Definition: adf4377.h:57
bool spi4wire
Definition: adf4377.h:656
#define ADF4377_R_DIV(x)
Definition: adf4377.h:152
#define ADF4377_PD_ALL(x)
Definition: adf4377.h:274
#define ADF4377_SDO_ACTIVE(x)
Definition: adf4377.h:69
#define ADF4377_R020_RSV1_MSK
Definition: adf4377.h:402
struct no_os_gpio_desc * gpio_ce
Definition: adf4377.h:652
#define ADF4377_R034_RSV1
Definition: adf4377.h:504
#define ADF4377_CLKOUT1_OP_MSK
Definition: adf4377.h:243
uint32_t muxout_select
Definition: adf4377.h:633
#define ADF4377_EN_ADC_MSK
Definition: adf4377.h:468
uint8_t cp_i
Definition: adf4377.h:666
#define ADF4377_EN_RDBLR_MSK
Definition: adf4377.h:129
#define ADF4377_DCLK_DIV1(x)
Definition: adf4377.h:479
#define ADF4377_PD_CLKOUT2(x)
Definition: adf4377.h:288
enum no_os_spi_bit_order bit_order
Definition: no_os_spi.h:204
int32_t no_os_gpio_remove(struct no_os_gpio_desc *desc)
Free the resources allocated by no_os_gpio_get().
Definition: no_os_gpio.c:104
Structure holding SPI descriptor.
Definition: no_os_spi.h:192
#define ADF4377_EN_DNCLK_OFF
Definition: adf4377.h:341
#define ADF4377_PD_VCO(x)
Definition: adf4377.h:280
#define ADF4377_EN_RDBLR(x)
Definition: adf4377.h:130
#define ADF4377_SOFT_RESET_R(x)
Definition: adf4377.h:55
int32_t adf4377_init(struct adf4377_dev **device, struct adf4377_init_param *init_param)
Initializes the ADF4377.
Definition: adf4377.c:514
int32_t adf4377_spi_write_mask(struct adf4377_dev *dev, uint8_t reg_addr, uint8_t mask, uint8_t data)
Update ADF4377 register.
Definition: adf4377.c:80
enum adf4377_dev_id dev_id
Definition: adf4377.h:654
@ ADF4377
Definition: adf4377.h:605
#define ADF4377_MIN_VCO_FREQ
Definition: adf4377.h:576
#define ADF4377_PD_VCO_N_OP
Definition: adf4377.h:300
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:96
#define ADF4377_DCLK_DIV2_MSK
Definition: adf4377.h:131
#define ADF4377_EN_DRCLK_OFF
Definition: adf4377.h:344
#define ADF4377_MUXOUT(x)
Definition: adf4377.h:352
int32_t adf4377_soft_reset(struct adf4377_dev *dev)
Software reset.
Definition: adf4377.c:245
#define ADF4377_EN_ADC_CLK(x)
Definition: adf4377.h:401
int32_t adf4377_spi_write(struct adf4377_dev *dev, uint8_t reg_addr, uint8_t data)
Writes data to ADF4377 over SPI.
Definition: adf4377.c:54
#define ADF4377_R02C_RSV1
Definition: adf4377.h:459
struct no_os_spi_init_param * spi_init
Definition: adf4377.h:615
#define ADF4377_LSB_FIRST(x)
Definition: adf4377.h:61
#define ADF4377_R042_RSV1
Definition: adf4377.h:531
#define ADF4377_MUXOUT_MSK
Definition: adf4377.h:351
#define ADF4377_SOFT_RESET_R_MSK
Definition: adf4377.h:54
#define ADF4377_PD_PFDCP(x)
Definition: adf4377.h:284
int32_t adf4377_check_scratchpad(struct adf4377_dev *dev)
ADF4377 SPI Scratchpad check.
Definition: adf4377.c:133
#define ADF4377_R023_RSV1
Definition: adf4377.h:416
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 no_os_spi_desc * spi_desc
Definition: adf4377.h:646
#define ADF4377_R032_RSV1_MSK
Definition: adf4377.h:493
#define ADF4377_R01F_RSV1(x)
Definition: adf4377.h:385
int32_t adf4377_spi_read(struct adf4377_dev *dev, uint8_t reg_addr, uint8_t *data)
Reads data from ADF4377 over SPI.
Definition: adf4377.c:103
@ ADF4378
Definition: adf4377.h:606
#define ADF4377_R_DIV_MSK
Definition: adf4377.h:151
uint8_t clkout_op
Definition: adf4377.h:637
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
#define ADF4377_FREQ_PFD_250MHZ
Definition: adf4377.h:586
#define ADF4377_ADDRESS_ASC(x)
Definition: adf4377.h:65
#define ADF4377_R031_RSV1
Definition: adf4377.h:488
#define ADF4377_R025_RSV1(x)
Definition: adf4377.h:428
#define ADF4377_SOFT_RESET_MSK
Definition: adf4377.h:56
#define ADF4377_MAX_FREQ_PFD
Definition: adf4377.h:579
#define ADF4377_VCO_BAND_DIV(x)
Definition: adf4377.h:432
bool spi4wire
Definition: adf4377.h:625
#define ADF4377_R00F_RSV1
Definition: adf4377.h:120
struct no_os_gpio_init_param * gpio_enclk2_param
Definition: adf4377.h:621
int32_t adf4377_spi_write_mask(struct adf4377_dev *dev, uint8_t reg_addr, uint8_t mask, uint8_t data)
Update ADF4377 register.
Definition: adf4377.c:80
#define ADF4377_VCO_ALC_TO_MSB(x)
Definition: adf4377.h:456
#define ADF4377_EN_DNCLK_MSK
Definition: adf4377.h:331
#define ADF4377_CHIP_TYPE
Definition: adf4377.h:98
#define ADF4377_FREQ_PFD_320MHZ
Definition: adf4377.h:587
#define ADF4377_SPI_DUMMY_DATA
Definition: adf4377.h:592
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 ADF4377_ADDR_ASC_AUTO_DECR
Definition: adf4377.h:75
#define ADF4377_PD_CLKOUT1_N_OP
Definition: adf4377.h:309
Header file of GPIO Interface.
uint8_t clkout_op
Definition: adf4377.h:678
#define ADF4377_PD_RDIV_N_OP
Definition: adf4377.h:294
#define ADF4377_DCLK_DIV1_2
Definition: adf4377.h:483
#define ADF4377_CP_I_MSK
Definition: adf4377.h:193
#define ADF4377_PD_RDIV(x)
Definition: adf4377.h:276
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
int32_t adf4377_check_scratchpad(struct adf4377_dev *dev)
ADF4377 SPI Scratchpad check.
Definition: adf4377.c:133
#define ADF4377_REG(x)
Definition: adf4377.h:51
int32_t adf4377_remove(struct adf4377_dev *dev)
Free resoulces allocated for ADF4377.
Definition: adf4377.c:645
Header file of utility functions.
struct no_os_gpio_init_param * gpio_enclk1_param
Definition: adf4377.h:619
int32_t adf4377_set_freq(struct adf4377_dev *dev, uint64_t freq)
Definition: adf4377.c:275
uint64_t f_clk
Definition: adf4377.h:660
#define ADF4377_SPI_WRITE_CMD
Definition: adf4377.h:572
#define ADF4377_ADC_A_CONV_MSK
Definition: adf4377.h:470
adf4377_dev_id
ID of Devices supported by the driver.
Definition: adf4377.h:604
enum adf4377_dev_id dev_id
Definition: adf4377.h:623
#define ADF4377_R03A_RSV1
Definition: adf4377.h:507
#define ADF4377_PD_PFDCP_N_OP
Definition: adf4377.h:306
int32_t no_os_gpio_direction_output(struct no_os_gpio_desc *desc, uint8_t value)
Enable the output direction of the specified GPIO.
Definition: no_os_gpio.c:147
#define ADF4377_DCLK_MODE(x)
Definition: adf4377.h:420
uint32_t ref_div_factor
Definition: adf4377.h:672
#define ADF4377_SYNTH_LOCK_TO_LSB(x)
Definition: adf4377.h:440
#define no_os_bit_swap_constant_8(x)
Definition: no_os_util.h:102
#define ADF4377_SPI_READ_CMD
Definition: adf4377.h:573
#define ADF4377_PD_NDIV_N_OP
Definition: adf4377.h:297
#define ADF4377_EN_ADC(x)
Definition: adf4377.h:469
#define ADF4377_DCLK_DIV1_MSK
Definition: adf4377.h:478
int32_t adf4377_set_freq(struct adf4377_dev *dev, uint64_t freq)
Definition: adf4377.c:275
#define ADF4377_EN_DNCLK(x)
Definition: adf4377.h:332
#define ADF4377_VCO_CALIB_EN
Definition: adf4377.h:138
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:140
#define ADF4377_VCO_ALC_TO_LSB(x)
Definition: adf4377.h:450
#define ADF4377_ADC_A_CONV(x)
Definition: adf4377.h:471
#define ADF4377_DCLK_MODE_MSK
Definition: adf4377.h:419
int32_t no_os_gpio_get_optional(struct no_os_gpio_desc **desc, const struct no_os_gpio_init_param *param)
Get the value of an optional GPIO.
Definition: no_os_gpio.c:75
struct no_os_gpio_init_param * gpio_ce_param
Definition: adf4377.h:617