no-OS
ad9545.h
Go to the documentation of this file.
1 /***************************************************************************/
40 #ifndef AD9545_H_
41 #define AD9545_H_
42 
43 /******************************************************************************/
44 /***************************** Include Files **********************************/
45 /******************************************************************************/
46 #include <stdint.h>
47 #include "no_os_util.h"
48 #include "no_os_delay.h"
49 #include "no_os_clk.h"
50 #include "no_os_gpio.h"
51 #include "no_os_i2c.h"
52 #include "no_os_spi.h"
53 
54 /******************************************************************************/
55 /********************** Macros and Constants Definitions **********************/
56 /******************************************************************************/
57 
58 /* Input Driver Mode */
59 #define DRIVER_MODE_AC_COUPLED_IF 0
60 #define DRIVER_MODE_DC_COUPLED_1V2 1
61 #define DRIVER_MODE_DC_COUPLED_1V8 2
62 #define DRIVER_MODE_IN_PULL_UP 3
63 
64 /* Input Driver Mode */
65 #define DRIVER_MODE_AC_COUPLED 0
66 #define DRIVER_MODE_DC_COUPLED 1
67 #define DRIVER_MODE_DC_COUPLED_LVDS 2
68 
69 /* Output Driver Mode */
70 #define DRIVER_MODE_SINGLE_DIV_DIF 0
71 #define DRIVER_MODE_SINGLE_DIV 1
72 #define DRIVER_MODE_DUAL_DIV 2
73 
74 /* Clock types */
75 #define AD9545_CLK_OUT 0
76 #define AD9545_CLK_PLL 1
77 #define AD9545_CLK_NCO 2
78 #define AD9545_CLK_AUX_TDC 3
79 
80 /* PLL addresses */
81 #define AD9545_PLL0 0
82 #define AD9545_PLL1 1
83 
84 /* Outputs addresses */
85 #define AD9545_Q0A 0
86 #define AD9545_Q0AA 1
87 #define AD9545_Q0B 2
88 #define AD9545_Q0BB 3
89 #define AD9545_Q0C 4
90 #define AD9545_Q0CC 5
91 #define AD9545_Q1A 6
92 #define AD9545_Q1AA 7
93 #define AD9545_Q1B 8
94 #define AD9545_Q1BB 9
95 
96 /* NCO addresses */
97 #define AD9545_NCO0 0
98 #define AD9545_NCO1 1
99 
100 /* TDC addresses */
101 #define AD9545_CLK_AUX_TDC0 0
102 #define AD9545_CLK_AUX_TDC1 1
103 
104 /* Ex:
105  * Output Q0C clock: <&ad9545_clock AD9545_CLK_OUT AD9545_Q0C>;
106  * PLL0 clock: <&ad9545_clock AD9545_CLK_PLL AD9545_PLL0>;
107  * NCO1 clock: <&ad9545_clock AD9545_CLK_NCO AD9545_NCO1>;
108  */
109 #define BYTE_ADDR_H NO_OS_GENMASK(14, 8)
110 #define BYTE_ADDR_L NO_OS_GENMASK(7, 0)
111 
112 /*
113  * ad9545 registers definition
114  */
115 
116 #define AD9545_CONFIG_0 0x0000
117 #define AD9545_PRODUCT_ID_LOW 0x0004
118 #define AD9545_PRODUCT_ID_HIGH 0x0005
119 #define AD9545_IO_UPDATE 0x000F
120 #define AD9545_M0_PIN 0x0102
121 #define AD9545_CHIP_ID 0x0121
122 #define AD9545_SYS_CLK_FB_DIV 0x0200
123 #define AD9545_SYS_CLK_INPUT 0x0201
124 #define AD9545_SYS_CLK_REF_FREQ 0x0202
125 #define AD9545_STABILITY_TIMER 0x0207
126 #define AD9545_COMPENSATE_TDCS 0x0280
127 #define AD9545_COMPENSATE_NCOS 0x0281
128 #define AD9545_COMPENSATE_DPLL 0x0282
129 #define AD9545_AUX_DPLL_CHANGE_LIMIT 0x0283
130 #define AD9545_AUX_DPLL_SOURCE 0x0284
131 #define AD9545_AUX_DPLL_LOOP_BW 0x0285
132 #define AD9545_REF_A_CTRL 0x0300
133 #define AD9545_REF_A_RDIV 0x0400
134 #define AD9545_REF_A_PERIOD 0x0404
135 #define AD9545_REF_A_OFFSET_LIMIT 0x040C
136 #define AD9545_REF_A_MONITOR_HYST 0x040F
137 #define AD9545_REF_A_VALID_TIMER 0x0410
138 #define AD9545_PHASE_LOCK_THRESH 0x0800
139 #define AD9545_PHASE_LOCK_FILL_RATE 0x0803
140 #define AD9545_PHASE_LOCK_DRAIN_RATE 0x0804
141 #define AD9545_FREQ_LOCK_THRESH 0x0805
142 #define AD9545_FREQ_LOCK_FILL_RATE 0x0808
143 #define AD9545_FREQ_LOCK_DRAIN_RATE 0x0809
144 #define AD9545_DPLL0_FTW 0x1000
145 #define AD9545_DPLL0_SLEW_RATE 0x1011
146 #define AD9545_MODULATION_COUNTER_A0 0x10C2
147 #define AD9545_MODULATION_COUNTER_B0 0x10C6
148 #define AD9545_MODULATION_COUNTER_C0 0x10CA
149 #define AD9545_MODULATOR_A0 0x10CF
150 #define AD9545_MODULATOR_B0 0x10D0
151 #define AD9545_MODULATOR_C0 0x10D1
152 #define AD9545_NSHOT_REQ_CH0 0x10D3
153 #define AD9545_NSHOT_EN_AB0 0x10D4
154 #define AD9545_NSHOT_EN_C0 0x10D5
155 #define AD9545_DRIVER_0A_CONF 0x10D7
156 #define AD9545_SYNC_CTRL0 0x10DB
157 #define AD9545_APLL0_M_DIV 0x1081
158 #define AD9545_Q0A_DIV 0x1100
159 #define AD9545_Q0A_PHASE 0x1104
160 #define AD9545_Q0A_PHASE_CONF 0x1108
161 #define AD9545_DPLL0_EN 0x1200
162 #define AD9545_DPLL0_SOURCE 0x1201
163 #define AD9545_DPLL0_ZERO_DELAY_FB 0x1202
164 #define AD9545_DPLL0_FB_MODE 0x1203
165 #define AD9545_DPLL0_LOOP_BW 0x1204
166 #define AD9545_DPLL0_HITLESS_N 0x1208
167 #define AD9545_DPLL0_N_DIV 0x120C
168 #define AD9545_DPLL0_FRAC 0x1210
169 #define AD9545_DPLL0_MOD 0x1213
170 #define AD9545_DPLL0_FAST_L1 0x1216
171 #define AD9545_DPLL0_FAST_L2 0x1217
172 #define AD9545_MODULATION_COUNTER_A1 0x14C2
173 #define AD9545_MODULATION_COUNTER_B1 0x14C6
174 #define AD9545_MODULATOR_A1 0x14CF
175 #define AD9545_MODULATOR_B1 0x14D0
176 #define AD9545_NSHOT_EN_AB1 0x14D4
177 #define AD9545_DRIVER_1A_CONF 0x14D7
178 #define AD9545_Q1A_DIV 0x1500
179 #define AD9545_Q1A_PHASE 0x1504
180 #define AD9545_Q1A_PHASE_CONF 0x1508
181 #define AD9545_CALIB_CLK 0x2000
182 #define AD9545_POWER_DOWN_REF 0x2001
183 #define AD9545_PWR_CALIB_CH0 0x2100
184 #define AD9545_CTRL_CH0 0x2101
185 #define AD9545_DIV_OPS_Q0A 0x2102
186 #define AD9545_DPLL0_MODE 0x2105
187 #define AD9545_DPLL0_FAST_MODE 0x2106
188 #define AD9545_DIV_OPS_Q1A 0x2202
189 #define AD9545_NCO0_CENTER_FREQ 0x2800
190 #define AD9545_NCO0_OFFSET_FREQ 0x2807
191 #define AD9545_NCO0_TAG_RATIO 0x280B
192 #define AD9545_NCO0_TAG_DELTA 0x280D
193 #define AD9545_NCO0_TYPE_ADJUST 0x280F
194 #define AD9545_NCO0_DELTA_RATE_LIMIT 0x2810
195 #define AD9545_NCO0_DELTA_ADJUST 0x2814
196 #define AD9545_NCO0_CYCLE_ADJUST 0x2819
197 #define AD9545_TDC0_DIV 0x2A00
198 #define AD9545_TDC0_PERIOD 0x2A01
199 #define AD9545_PLL_STATUS 0x3001
200 #define AD9545_MISC 0x3002
201 #define AD9545_TEMP0 0x3003
202 #define AD9545_REFA_STATUS 0x3005
203 #define AD9545_PLL0_STATUS 0x3100
204 #define AD9545_PLL0_OPERATION 0x3101
205 
206 #define AD9545_SYS_CLK_STABILITY_PERIOD_MASK NO_OS_GENMASK(19, 0)
207 
208 #define AD9545_REF_CTRL_DIF_MSK NO_OS_GENMASK(3, 2)
209 #define AD9545_REF_CTRL_REFA_MSK NO_OS_GENMASK(5, 4)
210 #define AD9545_REF_CTRL_REFAA_MSK NO_OS_GENMASK(7, 6)
211 
212 #define AD9545_UPDATE_REGS 0x1
213 #define AD9545_RESET_REGS 0x81
214 
215 #define AD9545_MX_PIN(x) (AD9545_M0_PIN + (x))
216 
217 #define AD9545_SYNC_CTRLX(x) (AD9545_SYNC_CTRL0 + ((x) * 0x400))
218 #define AD9545_REF_X_RDIV(x) (AD9545_REF_A_RDIV + ((x) * 0x20))
219 #define AD9545_REF_X_PERIOD(x) (AD9545_REF_A_PERIOD + ((x) * 0x20))
220 #define AD9545_REF_X_OFFSET_LIMIT(x) (AD9545_REF_A_OFFSET_LIMIT + ((x) * 0x20))
221 #define AD9545_REF_X_MONITOR_HYST(x) (AD9545_REF_A_MONITOR_HYST + ((x) * 0x20))
222 #define AD9545_REF_X_VALID_TIMER(x) (AD9545_REF_A_VALID_TIMER + ((x) * 0x20))
223 #define AD9545_REF_X_PHASE_LOCK_FILL(x) (AD9545_PHASE_LOCK_FILL_RATE + ((x) * 0x20))
224 #define AD9545_REF_X_PHASE_LOCK_DRAIN(x) (AD9545_PHASE_LOCK_DRAIN_RATE + ((x) * 0x20))
225 #define AD9545_REF_X_FREQ_LOCK_FILL(x) (AD9545_FREQ_LOCK_FILL_RATE + ((x) * 0x20))
226 #define AD9545_REF_X_FREQ_LOCK_DRAIN(x) (AD9545_FREQ_LOCK_DRAIN_RATE + ((x) * 0x20))
227 
228 #define AD9545_SOURCEX_PHASE_THRESH(x) (AD9545_PHASE_LOCK_THRESH + ((x) * 0x20))
229 #define AD9545_SOURCEX_FREQ_THRESH(x) (AD9545_FREQ_LOCK_THRESH + ((x) * 0x20))
230 #define AD9545_NCOX_PHASE_THRESH(x) (AD9545_SOURCEX_PHASE_THRESH((x) + 4))
231 #define AD9545_NCOX_FREQ_THRESH(x) (AD9545_SOURCEX_FREQ_THRESH((x) + 4))
232 
233 #define AD9545_APLLX_M_DIV(x) (AD9545_APLL0_M_DIV + ((x) * 0x400))
234 
235 #define AD9545_Q0_DIV(x) (AD9545_Q0A_DIV + ((x) * 0x9))
236 #define AD9545_Q1_DIV(x) (AD9545_Q1A_DIV + ((x) * 0x9))
237 #define AD9545_QX_DIV(x) ({ \
238  typeof(x) x_ = (x); \
239  \
240  (x_ > 5) ? AD9545_Q1_DIV(x_ - 6) : AD9545_Q0_DIV(x_); \
241 })
242 
243 #define AD9545_Q0_PHASE(x) (AD9545_Q0A_PHASE + ((x) * 0x9))
244 #define AD9545_Q1_PHASE(x) (AD9545_Q1A_PHASE + ((x) * 0x9))
245 #define AD9545_QX_PHASE(x) ({ \
246  typeof(x) x_ = (x); \
247  \
248  (x_ > 5) ? AD9545_Q1_PHASE(x_ - 6) : AD9545_Q0_PHASE(x_); \
249 })
250 
251 #define AD9545_Q0_PHASE_CONF(x) (AD9545_Q0A_PHASE_CONF + ((x) * 0x9))
252 #define AD9545_Q1_PHASE_CONF(x) (AD9545_Q1A_PHASE_CONF + ((x) * 0x9))
253 #define AD9545_QX_PHASE_CONF(x) ({ \
254  typeof(x) x_ = (x); \
255  \
256  (x_ > 5) ? AD9545_Q1_PHASE_CONF(x_ - 6) : AD9545_Q0_PHASE_CONF(x_); \
257 })
258 
259 #define AD9545_NSHOT_REQ_CH(x) (AD9545_NSHOT_REQ_CH0 + ((x) * 0x400))
260 #define AD9545_DPLLX_FTW(x) (AD9545_DPLL0_FTW + ((x) * 0x400))
261 #define AD9545_DPLLX_SLEW_RATE(x) (AD9545_DPLL0_SLEW_RATE + ((x) * 0x400))
262 #define AD9545_DPLLX_EN(x, y) (AD9545_DPLL0_EN + ((x) * 0x400) + ((y) * 0x20))
263 #define AD9545_DPLLX_SOURCE(x, y) (AD9545_DPLL0_SOURCE + ((x) * 0x400) + ((y) * 0x20))
264 #define AD9545_DPLLX_FB_PATH(x, y) (AD9545_DPLL0_ZERO_DELAY_FB + ((x) * 0x400) + ((y) * 0x20))
265 #define AD9545_DPLLX_FB_MODE(x, y) (AD9545_DPLL0_FB_MODE + ((x) * 0x400) + ((y) * 0x20))
266 #define AD9545_DPLLX_LOOP_BW(x, y) (AD9545_DPLL0_LOOP_BW + ((x) * 0x400) + ((y) * 0x20))
267 #define AD9545_DPLLX_HITLESS_N(x, y) (AD9545_DPLL0_HITLESS_N + ((x) * 0x400) + ((y) * 0x20))
268 #define AD9545_DPLLX_N_DIV(x, y) (AD9545_DPLL0_N_DIV + ((x) * 0x400) + ((y) * 0x20))
269 #define AD9545_DPLLX_FRAC_DIV(x, y) (AD9545_DPLL0_FRAC + ((x) * 0x400) + ((y) * 0x20))
270 #define AD9545_DPLLX_MOD_DIV(x, y) (AD9545_DPLL0_MOD + ((x) * 0x400) + ((y) * 0x20))
271 #define AD9545_DPLLX_FAST_L1(x, y) (AD9545_DPLL0_FAST_L1 + ((x) * 0x400) + ((y) * 0x20))
272 #define AD9545_DPLLX_FAST_L2(x, y) (AD9545_DPLL0_FAST_L2 + ((x) * 0x400) + ((y) * 0x20))
273 
274 #define AD9545_DIV_OPS_Q0(x) (AD9545_DIV_OPS_Q0A + (x))
275 #define AD9545_DIV_OPS_Q1(x) (AD9545_DIV_OPS_Q1A + (x))
276 #define AD9545_DIV_OPS_QX(x) ({ \
277  typeof(x) x_ = (x) / 2; \
278  \
279  (x_ > 2) ? AD9545_DIV_OPS_Q1(x_ - 3) : AD9545_DIV_OPS_Q0(x_); \
280 })
281 
282 #define AD9545_PWR_CALIB_CHX(x) (AD9545_PWR_CALIB_CH0 + ((x) * 0x100))
283 #define AD9545_PLLX_STATUS(x) (AD9545_PLL0_STATUS + ((x) * 0x100))
284 #define AD9545_PLLX_OPERATION(x) (AD9545_PLL0_OPERATION + ((x) * 0x100))
285 #define AD9545_CTRL_CH(x) (AD9545_CTRL_CH0 + ((x) * 0x100))
286 #define AD9545_DPLLX_FAST_MODE(x) (AD9545_DPLL0_FAST_MODE + ((x) * 0x100))
287 #define AD9545_REFX_STATUS(x) (AD9545_REFA_STATUS + (x))
288 
289 #define AD9545_PROFILE_SEL_MODE_MSK NO_OS_GENMASK(3, 2)
290 #define AD9545_PROFILE_SEL_MODE(x) no_os_field_prep(AD9545_PROFILE_SEL_MODE_MSK, x)
291 
292 #define AD9545_NCOX_CENTER_FREQ(x) (AD9545_NCO0_CENTER_FREQ + ((x) * 0x40))
293 #define AD9545_NCOX_OFFSET_FREQ(x) (AD9545_NCO0_OFFSET_FREQ + ((x) * 0x40))
294 #define AD9545_NCOX_TAG_RATIO(x) (AD9545_NCO0_TAG_RATIO + ((x) * 0x40))
295 #define AD9545_NCOX_TAG_DELTA(x) (AD9545_NCO0_TAG_DELTA + ((x) * 0x40))
296 #define AD9545_NCOX_TYPE_ADJUST(x) (AD9545_NCO0_TYPE_ADJUST + ((x) * 0x40))
297 #define AD9545_NCOX_DELTA_RATE_LIMIT(x) (AD9545_NCO0_DELTA_RATE_LIMIT + ((x) * 0x40))
298 #define AD9545_NCOX_DELTA_ADJUST(x) (AD9545_NCO0_DELTA_ADJUST + ((x) * 0x40))
299 #define AD9545_NCOX_CYCLE_ADJUST(x) (AD9545_NCO0_CYCLE_ADJUST + ((x) * 0x40))
300 
301 /*
302  * AD9545 AUX NCO center frequency register has 16-bit integer part and
303  * 40-bit fractional part.
304  */
305 #define AD9545_NCO_CENTER_FREQ_INT_WIDTH 16
306 #define AD9545_NCO_CENTER_FREQ_FRAC_WIDTH 40
307 #define AD9545_NCO_CENTER_FREQ_WIDTH (AD9545_NCO_CENTER_FREQ_INT_WIDTH + \
308  AD9545_NCO_CENTER_FREQ_FRAC_WIDTH)
309 
310 #define AD9545_NCO_CENTER_FREQ_MSK NO_OS_GENMASK_ULL(AD9545_NCO_CENTER_FREQ_WIDTH - 1, 0)
311 #define AD9545_NCO_CENTER_FREQ_INT_MSK NO_OS_GENMASK_ULL(AD9545_NCO_CENTER_FREQ_WIDTH - 1, \
312  AD9545_NCO_CENTER_FREQ_FRAC_WIDTH)
313 #define AD9545_NCO_CENTER_FREQ_FRAC_MSK NO_OS_GENMASK_ULL(AD9545_NCO_CENTER_FREQ_FRAC_WIDTH - 1, 0)
314 
315 #define AD9545_NCO_CENTER_FREQ_MAX no_os_field_max_u64(AD9545_NCO_CENTER_FREQ_MSK)
316 #define AD9545_NCO_CENTER_FREQ_INT_MAX no_os_field_max_u64(AD9545_NCO_CENTER_FREQ_INT_MSK)
317 #define AD9545_NCO_CENTER_FREQ_FRAC_MAX no_os_field_max_u64(AD9545_NCO_CENTER_FREQ_FRAC_MSK)
318 
319 /*
320  * AD9545 AUX NCO offset frequency register has 8-bit integer part and
321  * 24-bit fractional part.
322  */
323 #define AD9545_NCO_OFFSET_FREQ_INT_WIDTH 8
324 #define AD9545_NCO_OFFSET_FREQ_FRAC_WIDTH 24
325 #define AD9545_NCO_OFFSET_FREQ_WIDTH (AD9545_NCO_OFFSET_FREQ_INT_WIDTH + \
326  AD9545_NCO_OFFSET_FREQ_FRAC_WIDTH)
327 
328 #define AD9545_NCO_OFFSET_FREQ_MSK NO_OS_GENMASK_ULL(AD9545_NCO_OFFSET_FREQ_WIDTH - 1, 0)
329 #define AD9545_NCO_OFFSET_FREQ_INT_MSK NO_OS_GENMASK_ULL(AD9545_NCO_OFFSET_FREQ_WIDTH - 1, \
330  AD9545_NCO_OFFSET_FREQ_FRAC_WIDTH)
331 #define AD9545_NCO_OFFSET_FREQ_FRAC_MSK NO_OS_GENMASK_ULL(AD9545_NCO_OFFSET_FREQ_FRAC_WIDTH - 1, 0)
332 
333 #define AD9545_NCO_OFFSET_FREQ_MAX no_os_field_max(AD9545_NCO_OFFSET_FREQ_MSK)
334 #define AD9545_NCO_OFFSET_FREQ_INT_MAX no_os_field_max(AD9545_NCO_OFFSET_FREQ_INT_MSK)
335 #define AD9545_NCO_OFFSET_FREQ_FRAC_MAX no_os_field_max(AD9545_NCO_OFFSET_FREQ_FRAC_MSK)
336 
337 #define AD9545_NCO_FREQ_INT_MAX (AD9545_NCO_CENTER_FREQ_INT_MAX + \
338  AD9545_NCO_OFFSET_FREQ_INT_MAX)
339 
340 #define AD9545_TDCX_DIV(x) (AD9545_TDC0_DIV + ((x) * 0x9))
341 #define AD9545_TDCX_PERIOD(x) (AD9545_TDC0_PERIOD + ((x) * 0x9))
342 
343 /* AD9545 MX PIN bitfields */
344 #define AD9545_MX_TO_TDCX(x) (0x30 + (x))
345 
346 /* AD9545 COMPENSATE TDCS bitfields */
347 #define AD9545_COMPENSATE_TDCS_VIA_AUX_DPLL 0x4
348 
349 /* AD9545 COMPENSATE NCOS bitfields */
350 #define AD9545_COMPENSATE_NCOS_VIA_AUX_DPLL 0x44
351 
352 /* AD9545 COMPENSATE DPLL bitfields */
353 #define AD9545_COMPNESATE_VIA_AUX_DPLL 0x44
354 
355 /* define AD9545_DPLLX_EN bitfields */
356 #define AD9545_EN_PROFILE_MSK NO_OS_BIT(0)
357 #define AD9545_SEL_PRIORITY_MSK NO_OS_GENMASK(5, 1)
358 
359 /* define AD9545_DPLLX_FB_MODE bitfields */
360 #define AD9545_EN_HITLESS_MSK NO_OS_BIT(0)
361 #define AD9545_TAG_MODE_MSK NO_OS_GENMASK(4, 2)
362 #define AD9545_BASE_FILTER_MSK NO_OS_BIT(7)
363 
364 /* AD9545_PWR_CALIB_CHX bitfields */
365 #define AD9545_PWR_DOWN_CH NO_OS_BIT(0)
366 #define AD9545_CALIB_APLL NO_OS_BIT(1)
367 
368 /* AD9545_SYNC_CTRLX bitfields */
369 #define AD9545_SYNC_CTRL_DPLL_REF_MSK NO_OS_BIT(2)
370 #define AD9545_SYNC_CTRL_MODE_MSK NO_OS_GENMASK(1, 0)
371 
372 /* AD9545_QX_PHASE_CONF bitfields */
373 #define AD9545_QX_HALF_DIV_MSK NO_OS_BIT(5)
374 #define AD9545_QX_PHASE_32_MSK NO_OS_BIT(6)
375 
376 /* AD9545_DIV_OPS_QX bitfields */
377 #define AD9545_DIV_OPS_MUTE_A_MSK NO_OS_BIT(2)
378 #define AD9545_DIV_OPS_MUTE_AA_MSK NO_OS_BIT(3)
379 
380 /* AD9545 Modulator bitfields */
381 #define AD9545_MODULATOR_EN NO_OS_BIT(0)
382 
383 /* AD9545_NSHOT_REQ_CH bitfields */
384 #define AD9545_NSHOT_NR_MSK NO_OS_GENMASK(5, 0)
385 
386 /* AD9545_CTRL_CH bitfields */
387 #define AD9545_CTRL_CH_NSHOT_MSK NO_OS_BIT(0)
388 
389 /* AD9545_PLL_STATUS bitfields */
390 #define AD9545_PLLX_LOCK(x, y) ((1 << (4 + (x))) & (y))
391 
392 /* AD9545_MISC bitfields */
393 #define AD9545_MISC_AUX_NC0_ERR_MSK NO_OS_GENMASK(5, 4)
394 #define AD9545_MISC_AUX_NC1_ERR_MSK NO_OS_GENMASK(7, 6)
395 #define AD9545_AUX_DPLL_LOCK_MSK NO_OS_BIT(1)
396 #define AD9545_AUX_DPLL_REF_FAULT NO_OS_BIT(2)
397 
398 /* AD9545_REFX_STATUS bitfields */
399 #define AD9545_REFX_SLOW_MSK NO_OS_BIT(0)
400 #define AD9545_REFX_FAST_MSK NO_OS_BIT(1)
401 #define AD9545_REFX_JITTER_MSK NO_OS_BIT(2)
402 #define AD9545_REFX_FAULT_MSK NO_OS_BIT(3)
403 #define AD9545_REFX_VALID_MSK NO_OS_BIT(4)
404 #define AD9545_REFX_LOS_MSK NO_OS_BIT(5)
405 
406 /* AD9545_PLL0_STATUS bitfields */
407 #define AD9545_PLL_LOCKED NO_OS_BIT(0)
408 
409 /* AD9545_PLL0_OPERATION bitfields */
410 #define AD9545_PLL_FREERUN NO_OS_BIT(0)
411 #define AD9545_PLL_HOLDOVER NO_OS_BIT(1)
412 #define AD9545_PLL_ACTIVE NO_OS_BIT(3)
413 #define AD9545_PLL_ACTIVE_PROFILE NO_OS_GENMASK(6, 4)
414 
415 #define AD9545_SYS_PLL_STABLE_MSK NO_OS_GENMASK(1, 0)
416 #define AD9545_SYS_PLL_STABLE(x) (((x) & AD9545_SYS_PLL_STABLE_MSK) == 0x3)
417 
418 #define AD9545_APLL_LOCKED(x) ((x) & NO_OS_BIT(3))
419 
420 /* AD9545 tagging modes */
421 #define AD9545_NO_TAGGING 0
422 #define AD9545_FB_PATH_TAG 2
423 
424 #define AD9545_SYS_CLK_STABILITY_MS 50
425 
426 #define AD9545_R_DIV_MSK NO_OS_GENMASK(29, 0)
427 #define AD9545_R_DIV_MAX 0x40000000
428 #define AD9545_IN_MAX_TDC_FREQ_HZ 200000
429 
430 #define AD9545_MAX_REFS 4
431 
432 #define AD9545_APLL_M_DIV_MIN 1
433 #define AD9545_APLL_M_DIV_MAX 255
434 
435 #define AD9545_DPLL_MAX_N 1073741823
436 #define AD9545_DPLL_MAX_FRAC 16777215
437 #define AD9545_DPLL_MAX_MOD 16777215
438 #define AD9545_MAX_DPLL_PROFILES 6
439 
440 #define AD9545_MAX_NSHOT_PULSES 63
441 
442 #define AD9545_MAX_ZERO_DELAY_RATE 200000000
443 
444 #define AD9545_MIN_SYS_CLK_FREQ 2250
445 #define AD9545_MAX_SYS_CLK_FREQ 2415
446 #define AD9545_MIN_DIV_RATIO 4
447 #define AD9545_MAX_DIV_RATIO 256
448 
452 };
453 
454 static const unsigned int ad9545_apll_rate_ranges_hz[2][2] = {
455  {2424000000U, 3232000000U}, {3232000000U, 4040000000U}
456 };
457 
458 static const unsigned int ad9545_apll_pfd_rate_ranges_hz[2] = {
459  162000000U, 350000000U
460 };
461 
462 static const unsigned short ad9545_vco_calibration_op[][2] = {
463  {AD9545_CALIB_CLK, 0},
467 };
468 
469 static const uint8_t ad9545_tdc_source_mapping[] = {
470  0, 1, 2, 3, 8, 9,
471 };
472 
473 static const uint32_t ad9545_fast_acq_excess_bw_map[] = {
474  0, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024,
475 };
476 
477 static const uint32_t ad9545_fast_acq_timeout_map[] = {
478  1, 10, 50, 100, 500, 1000, 10000, 50000,
479 };
480 
481 static const uint32_t ad9545_hyst_scales_bp[] = {
482  0, 3125, 6250, 12500, 25000, 50000, 75000, 87500
483 };
484 
485 static const uint32_t ad9545_out_source_ua[] = {
486  7500, 12500, 15000
487 };
488 
489 static const uint32_t ad9545_rate_change_limit_map[] = {
490  715, 1430, 2860, 5720, 11440, 22880, 45760,
491 };
492 
493 static const char * const ad9545_ref_m_clk_names[] = {
494  "Ref-M0", "Ref-M1", "Ref-M2",
495 };
496 
497 static const char * const ad9545_ref_clk_names[] = {
498  "Ref-A", "Ref-AA", "Ref-B", "Ref-BB",
499 };
500 
501 static const char * const ad9545_in_clk_names[] = {
502  "Ref-A-Div", "Ref-AA-Div", "Ref-B-Div", "Ref-BB-Div",
503 };
504 
505 static const char * const ad9545_out_clk_names[] = {
506  "Q0A-div", "Q0AA-div", "Q0B-div", "Q0BB-div", "Q0C-div", "Q0CC-div", "Q1A-div", "Q1AA-div",
507  "Q1B-div", "Q1BB-div",
508 };
509 
510 static const char * const ad9545_pll_clk_names[] = {
511  "PLL0", "PLL1",
512 };
513 
514 static const char * const ad9545_aux_nco_clk_names[] = {
515  "AUX_NCO0", "AUX_NCO1",
516 };
517 
518 static const char * const ad9545_aux_tdc_clk_names[] = {
519  "AUX_TDC0", "AUX_TDC1",
520 };
521 
525 };
526 
532 };
533 
538 };
539 
544 };
545 
547  uint16_t modulator_reg;
549  uint16_t nshot_en_reg;
550  uint8_t nshot_en_msk;
551 };
552 
553 static const struct ad9545_outputs_regs ad9545_out_regs[] = {
554  {
556  .modulation_counter_reg = AD9545_MODULATION_COUNTER_A0,
557  .nshot_en_reg = AD9545_NSHOT_EN_AB0,
558  .nshot_en_msk = NO_OS_BIT(0),
559  },
560  {
561  .modulator_reg = AD9545_MODULATOR_A0,
562  .modulation_counter_reg = AD9545_MODULATION_COUNTER_A0,
563  .nshot_en_reg = AD9545_NSHOT_EN_AB0,
564  .nshot_en_msk = NO_OS_BIT(2),
565  },
566  {
567  .modulator_reg = AD9545_MODULATOR_B0,
568  .modulation_counter_reg = AD9545_MODULATION_COUNTER_B0,
569  .nshot_en_reg = AD9545_NSHOT_EN_AB0,
570  .nshot_en_msk = NO_OS_BIT(4),
571  },
572  {
573  .modulator_reg = AD9545_MODULATOR_B0,
574  .modulation_counter_reg = AD9545_MODULATION_COUNTER_B0,
575  .nshot_en_reg = AD9545_NSHOT_EN_AB0,
576  .nshot_en_msk = NO_OS_BIT(6),
577  },
578  {
579  .modulator_reg = AD9545_MODULATOR_C0,
580  .modulation_counter_reg = AD9545_MODULATION_COUNTER_C0,
581  .nshot_en_reg = AD9545_NSHOT_EN_C0,
582  .nshot_en_msk = NO_OS_BIT(0),
583  },
584  {
585  .modulator_reg = AD9545_MODULATOR_C0,
586  .modulation_counter_reg = AD9545_MODULATION_COUNTER_C0,
587  .nshot_en_reg = AD9545_NSHOT_EN_C0,
588  .nshot_en_msk = NO_OS_BIT(2),
589  },
590  {
591  .modulator_reg = AD9545_MODULATOR_A1,
592  .modulation_counter_reg = AD9545_MODULATION_COUNTER_A1,
593  .nshot_en_reg = AD9545_NSHOT_EN_AB1,
594  .nshot_en_msk = NO_OS_BIT(0),
595  },
596  {
597  .modulator_reg = AD9545_MODULATOR_A1,
598  .modulation_counter_reg = AD9545_MODULATION_COUNTER_A1,
599  .nshot_en_reg = AD9545_NSHOT_EN_AB1,
600  .nshot_en_msk = NO_OS_BIT(2),
601  },
602  {
603  .modulator_reg = AD9545_MODULATOR_B1,
604  .modulation_counter_reg = AD9545_MODULATION_COUNTER_B1,
605  .nshot_en_reg = AD9545_NSHOT_EN_AB1,
606  .nshot_en_msk = NO_OS_BIT(4),
607  },
608  {
609  .modulator_reg = AD9545_MODULATOR_B1,
610  .modulation_counter_reg = AD9545_MODULATION_COUNTER_B1,
611  .nshot_en_reg = AD9545_NSHOT_EN_AB1,
612  .nshot_en_msk = NO_OS_BIT(6),
613  },
614 };
615 
617  struct ad9545_dev *dev;
621  uint32_t source_ua;
623  unsigned int address;
626 };
627 
629  unsigned int address;
630  unsigned int parent_index;
631  unsigned int priority;
632  unsigned int loop_bw_uhz;
633  unsigned int fast_acq_excess_bw;
634  unsigned int fast_acq_timeout_ms;
635  unsigned int fast_acq_settle_ms;
636  bool en;
637  uint8_t tdc_source;
639 };
640 
642  struct ad9545_dev *dev;
643  bool pll_used;
644  unsigned int address;
646  uint8_t num_parents;
649  unsigned int free_run_freq;
650  unsigned int fast_acq_trigger_mode;
656 };
657 
660  struct ad9545_dev *dev;
661  uint32_t r_div_ratio;
662  bool ref_used;
663  uint32_t d_tol_ppb;
665  uint32_t valid_t_ms;
667  unsigned int address;
669  unsigned int freq_thresh_ps;
670  unsigned int phase_thresh_ps;
671  unsigned int phase_lock_fill_rate;
672  unsigned int phase_lock_drain_rate;
673  unsigned int freq_lock_fill_rate;
674  unsigned int freq_lock_drain_rate;
675  union {
678  };
679 };
680 
683  bool nco_used;
684  struct ad9545_dev *dev;
685  unsigned int address;
686  unsigned int freq_thresh_ps;
687  unsigned int phase_thresh_ps;
688 };
689 
692  bool tdc_used;
693  struct ad9545_dev *dev;
694  unsigned int address;
695  unsigned int pin_nr;
697 };
698 
701  bool dpll_used;
702  struct ad9545_dev *dev;
703  unsigned int source;
704  unsigned int loop_bw_mhz;
705  unsigned int rate_change_limit;
707 };
708 
712  uint32_t ref_freq_hz;
713  uint32_t sys_freq_hz;
714 };
715 
716 struct ad9545_dev;
717 
718 typedef int32_t (*ad9545_reg_read_func)(struct ad9545_dev *dev,
719  uint16_t reg_addr,
720  uint8_t *reg_data);
721 typedef int32_t (*ad9545_reg_write_func)(struct ad9545_dev *dev,
722  uint16_t reg_addr,
723  uint8_t reg_data);
724 typedef int32_t (*ad9545_reg_read_multi_func)(struct ad9545_dev *dev,
725  uint16_t reg_addr,
726  uint8_t *reg_data,
727  uint16_t count);
728 typedef int32_t (*ad9545_reg_write_multi_func)(struct ad9545_dev *dev,
729  uint16_t reg_addr,
730  uint8_t *reg_data,
731  uint16_t count);
732 
733 struct ad9545_dev {
734  /* SPI */
736  /* I2C */
738  /* Device Settings */
743  /* Device Settings */
747  struct ad9545_pll_clk pll_clks[NO_OS_ARRAY_SIZE(ad9545_pll_clk_names)];
748  struct ad9545_ref_in_clk ref_in_clks[NO_OS_ARRAY_SIZE(ad9545_ref_clk_names)];
749  struct ad9545_out_clk out_clks[NO_OS_ARRAY_SIZE(ad9545_out_clk_names)];
751  ad9545_aux_nco_clk_names)];
753  ad9545_aux_tdc_clk_names)];
754  /* CLK descriptors */
755  struct no_os_clk_desc **clks[4];
756 
757 };
758 
760  /* SPI */
762  /* I2C */
764  /* Device Settings */
768  struct ad9545_pll_clk pll_clks[NO_OS_ARRAY_SIZE(ad9545_pll_clk_names)];
769  struct ad9545_ref_in_clk ref_in_clks[NO_OS_ARRAY_SIZE(ad9545_ref_clk_names)];
770  struct ad9545_out_clk out_clks[NO_OS_ARRAY_SIZE(ad9545_out_clk_names)];
772  ad9545_aux_nco_clk_names)];
774  ad9545_aux_tdc_clk_names)];
775 
776 };
777 
778 /******************************************************************************/
779 /************************ Functions Declarations ******************************/
780 /******************************************************************************/
781 /* Reads a single byte from the specified SPI register address */
782 int32_t ad9545_spi_reg_read(struct ad9545_dev *dev,
783  uint16_t reg_addr,
784  uint8_t *reg_data);
785 
786 /* Reads multiple bytes starting from the specified SPI register address */
788  uint16_t reg_addr,
789  uint8_t *reg_data,
790  uint16_t count);
791 /* Writes a single byte to the specified SPI register address */
792 int32_t ad9545_spi_reg_write(struct ad9545_dev *dev,
793  uint16_t reg_addr,
794  uint8_t reg_data);
795 /* Writes multiple bytes starting from the specified SPI register address */
797  uint16_t reg_addr,
798  uint8_t *reg_data,
799  uint16_t count);
800 /* Reads a single byte from the specified I2C register address */
801 int32_t ad9545_i2c_reg_read(struct ad9545_dev *dev,
802  uint16_t reg_addr,
803  uint8_t *reg_data);
804 /* Writes a single byte to the specified I2C register address */
805 int32_t ad9545_i2c_reg_write(struct ad9545_dev *dev,
806  uint16_t reg_addr,
807  uint8_t reg_data);
808 /* Reads multiple bytes starting from the specified I2C register address */
810  uint16_t reg_addr,
811  uint8_t *reg_data,
812  uint16_t count);
813 /* Writes multiple bytes starting from the specified I2C register address */
815  uint16_t reg_addr,
816  uint8_t *reg_data,
817  uint16_t count);
818 /* Modifies specific bits in the specified register and writes the new value. */
819 int32_t ad9545_write_mask(struct ad9545_dev *dev,
820  uint16_t reg_addr,
821  uint32_t mask,
822  uint8_t data);
823 
824 /* Calibrates the APLLs of the AD9545 device. */
825 int ad9545_calib_aplls(struct ad9545_dev *dev);
826 
827 /* Device Setup */
828 int32_t ad9545_setup(struct ad9545_dev *dev);
829 
830 /* Device Initialization */
831 int32_t ad9545_init(struct ad9545_dev **device,
832  struct ad9545_init_param *init_param);
833 
834 /* Free resources */
835 int32_t ad9545_remove(struct ad9545_dev *dev);
836 
837 
838 #endif // AD9545_H_
AD9545_DPLLX_FB_PATH
#define AD9545_DPLLX_FB_PATH(x, y)
Definition: ad9545.h:264
ad9545_ref_in_clk::mode
enum ad9545_ref_mode mode
Definition: ad9545.h:668
ad9545_pll_clk::pll_used
bool pll_used
Definition: ad9545.h:643
AD9545_NCOX_FREQ_THRESH
#define AD9545_NCOX_FREQ_THRESH(x)
Definition: ad9545.h:231
AD9545_MODULATOR_C0
#define AD9545_MODULATOR_C0
Definition: ad9545.h:151
AD9545_DPLLX_HITLESS_N
#define AD9545_DPLLX_HITLESS_N(x, y)
Definition: ad9545.h:267
ad9545_write_reg_multiple
int32_t ad9545_write_reg_multiple(struct ad9545_dev *dev, uint16_t reg_addr, uint8_t *reg_data, uint16_t count)
Definition: ad9545.c:113
no_os_alloc.h
AD9545_CLK_PLL
#define AD9545_CLK_PLL
Definition: ad9545.h:76
ad9545_aux_nco_clk::address
unsigned int address
Definition: ad9545.h:685
ad9545_aux_tdc_clk::tdc_used
bool tdc_used
Definition: ad9545.h:692
AD9545_MISC_AUX_NC0_ERR_MSK
#define AD9545_MISC_AUX_NC0_ERR_MSK
Definition: ad9545.h:393
AD9545_EN_PROFILE_MSK
#define AD9545_EN_PROFILE_MSK
Definition: ad9545.h:356
ad9545_sys_clk::sys_clk_crystal
bool sys_clk_crystal
Definition: ad9545.h:711
AD9545_SINGLE_DIV_DIF
@ AD9545_SINGLE_DIV_DIF
Definition: ad9545.h:541
AD9545_DIV_OPS_MUTE_A_MSK
#define AD9545_DIV_OPS_MUTE_A_MSK
Definition: ad9545.h:377
AD9545_MAX_DPLL_PROFILES
#define AD9545_MAX_DPLL_PROFILES
Definition: ad9545.h:438
ad9545_ref_in_clk::phase_thresh_ps
unsigned int phase_thresh_ps
Definition: ad9545.h:670
AD9545_DC_COUPLED_LVDS
@ AD9545_DC_COUPLED_LVDS
Definition: ad9545.h:537
AD9545_DPLLX_FRAC_DIV
#define AD9545_DPLLX_FRAC_DIV(x, y)
Definition: ad9545.h:269
ad9545_ref_in_clk::hw
struct no_os_clk_desc * hw
Definition: ad9545.h:659
ad9545_read_reg
int32_t ad9545_read_reg(struct ad9545_dev *dev, uint16_t reg_addr, uint8_t *reg_data)
Definition: ad9545.c:68
no_os_i2c_init
int32_t no_os_i2c_init(struct no_os_i2c_desc **desc, const struct no_os_i2c_init_param *param)
Initialize the I2C communication peripheral.
Definition: no_os_i2c.c:58
AD9545_IN_MAX_TDC_FREQ_HZ
#define AD9545_IN_MAX_TDC_FREQ_HZ
Definition: ad9545.h:428
ad9545_aux_tdc_clk
Definition: ad9545.h:690
ad9545_ref_in_clk::dev
struct ad9545_dev * dev
Definition: ad9545.h:660
no_os_field_prep_u64
uint64_t no_os_field_prep_u64(uint64_t mask, uint64_t val)
ad9545_aux_dpll_clk::loop_bw_mhz
unsigned int loop_bw_mhz
Definition: ad9545.h:704
ad9545_aux_tdc_clk::hw
struct no_os_clk_desc * hw
Definition: ad9545.h:691
ad9545_pll_clk::hw
struct no_os_clk_desc * hw
Definition: ad9545.h:645
ad9545_write_mask
int32_t ad9545_write_mask(struct ad9545_dev *dev, uint16_t reg_addr, uint32_t mask, uint8_t data)
Definition: ad9545.c:129
NO_OS_GENMASK
#define NO_OS_GENMASK(h, l)
Definition: no_os_util.h:88
ad9545_ref_in_clk::valid_t_ms
uint32_t valid_t_ms
Definition: ad9545.h:665
AD9545_NSHOT_NR_MSK
#define AD9545_NSHOT_NR_MSK
Definition: ad9545.h:384
AD9545_DPLLX_EN
#define AD9545_DPLLX_EN(x, y)
Definition: ad9545.h:262
no_os_clk_init_param::platform_ops
const struct no_os_clk_platform_ops * platform_ops
Definition: no_os_clk.h:56
AD9545_MODULATOR_B0
#define AD9545_MODULATOR_B0
Definition: ad9545.h:150
SPI
@ SPI
Definition: ad9545.h:450
NO_OS_BIT_ULL
#define NO_OS_BIT_ULL(x)
Definition: no_os_util.h:53
ad9545_outputs_regs
Definition: ad9545.h:546
no_os_spi.h
Header file of SPI Interface.
AD9545_DC_COUPLED_1V8
@ AD9545_DC_COUPLED_1V8
Definition: ad9545.h:530
AD9545_REF_X_PHASE_LOCK_DRAIN
#define AD9545_REF_X_PHASE_LOCK_DRAIN(x)
Definition: ad9545.h:224
AD9545_DPLLX_MOD_DIV
#define AD9545_DPLLX_MOD_DIV(x, y)
Definition: ad9545.h:270
ad9545_dev::i2c_desc
struct no_os_i2c_desc * i2c_desc
Definition: ad9545.h:737
no_os_i2c_remove
int32_t no_os_i2c_remove(struct no_os_i2c_desc *desc)
Free the resources allocated by no_os_i2c_init().
Definition: no_os_i2c.c:119
AD9545_REF_X_MONITOR_HYST
#define AD9545_REF_X_MONITOR_HYST(x)
Definition: ad9545.h:221
AD9545_NCOX_PHASE_THRESH
#define AD9545_NCOX_PHASE_THRESH(x)
Definition: ad9545.h:230
no_os_mul_u64_u32_shr
uint64_t no_os_mul_u64_u32_shr(uint64_t a, uint32_t mul, unsigned int shift)
ad9545_dpll_profile::priority
unsigned int priority
Definition: ad9545.h:631
ad9545_aux_tdc_clk::dev
struct ad9545_dev * dev
Definition: ad9545.h:693
ad9545_dpll_profile
Definition: ad9545.h:628
ad9545_out_clk::output_mode
enum ad9545_output_mode output_mode
Definition: ad9545.h:620
pr_err
#define pr_err(fmt, args...)
Definition: no_os_print_log.h:94
AD9545_SYS_CLK_STABILITY_PERIOD_MASK
#define AD9545_SYS_CLK_STABILITY_PERIOD_MASK
Definition: ad9545.h:206
ad9545_init_param::aux_dpll_clk
struct ad9545_aux_dpll_clk aux_dpll_clk
Definition: ad9545.h:767
no_os_rational_best_approximation_u64
void no_os_rational_best_approximation_u64(uint64_t given_numerator, uint64_t given_denominator, uint64_t max_numerator, uint64_t max_denominator, uint64_t *best_numerator, uint64_t *best_denominator)
AD9545_AUX_DPLL_LOOP_BW
#define AD9545_AUX_DPLL_LOOP_BW
Definition: ad9545.h:131
AD9545_QX_DIV
#define AD9545_QX_DIV(x)
Definition: ad9545.h:237
AD9545_NCO_OFFSET_FREQ_INT_MSK
#define AD9545_NCO_OFFSET_FREQ_INT_MSK
Definition: ad9545.h:329
ad9545_aux_nco_clk
Definition: ad9545.h:681
no_os_delay.h
Header file of Delay functions.
AD9545_DPLL_MAX_N
#define AD9545_DPLL_MAX_N
Definition: ad9545.h:435
ad9545_init_param::aux_nco_clks
struct ad9545_aux_nco_clk aux_nco_clks[NO_OS_ARRAY_SIZE(ad9545_aux_nco_clk_names)]
Definition: ad9545.h:771
AD9545_MX_PIN
#define AD9545_MX_PIN(x)
Definition: ad9545.h:215
AD9545_SYS_CLK_STABILITY_MS
#define AD9545_SYS_CLK_STABILITY_MS
Definition: ad9545.h:424
AD9545_PLLX_LOCK
#define AD9545_PLLX_LOCK(x, y)
Definition: ad9545.h:390
no_os_clk_init_param::name
const char * name
Definition: no_os_clk.h:52
AD9545_SEL_PRIORITY_MSK
#define AD9545_SEL_PRIORITY_MSK
Definition: ad9545.h:357
ad9545_calib_aplls
int ad9545_calib_aplls(struct ad9545_dev *dev)
Definition: ad9545.c:2051
NO_OS_DIV_ROUND_CLOSEST_ULL
#define NO_OS_DIV_ROUND_CLOSEST_ULL(x, y)
Definition: no_os_util.h:62
no_os_clk_init
int32_t no_os_clk_init(struct no_os_clk_desc **desc, const struct no_os_clk_init_param *param)
AD9545_DUAL_DIV
@ AD9545_DUAL_DIV
Definition: ad9545.h:543
ad9545_pll_clk::internal_zero_delay_source_rate_hz
uint64_t internal_zero_delay_source_rate_hz
Definition: ad9545.h:654
AD9545_DPLLX_SOURCE
#define AD9545_DPLLX_SOURCE(x, y)
Definition: ad9545.h:263
AD9545_APLL_M_DIV_MIN
#define AD9545_APLL_M_DIV_MIN
Definition: ad9545.h:432
AD9545_MAX_DIV_RATIO
#define AD9545_MAX_DIV_RATIO
Definition: ad9545.h:447
ad9545_dpll_profile::fast_acq_excess_bw
unsigned int fast_acq_excess_bw
Definition: ad9545.h:633
ad9545_pll_clk::free_run_freq
unsigned int free_run_freq
Definition: ad9545.h:649
AD9545_CONFIG_0
#define AD9545_CONFIG_0
Definition: ad9545.h:116
device
Definition: ad9361_util.h:75
AD9545_NCOX_CENTER_FREQ
#define AD9545_NCOX_CENTER_FREQ(x)
Definition: ad9545.h:292
ad9545_dev::clks
struct no_os_clk_desc ** clks[4]
Definition: ad9545.h:755
no_os_print_log.h
Print messages helpers.
AD9545_PLL_STATUS
#define AD9545_PLL_STATUS
Definition: ad9545.h:199
ad9545_reg_read_func
int32_t(* ad9545_reg_read_func)(struct ad9545_dev *dev, uint16_t reg_addr, uint8_t *reg_data)
Definition: ad9545.h:718
AD9545_NCO_CENTER_FREQ_INT_MAX
#define AD9545_NCO_CENTER_FREQ_INT_MAX
Definition: ad9545.h:316
ad9545_aux_dpll_clk::dpll_used
bool dpll_used
Definition: ad9545.h:701
no_os_clk_platform_ops::clk_recalc_rate
int(* clk_recalc_rate)(struct no_os_clk_desc *, uint64_t *)
Definition: no_os_clk.h:105
ad9545_dev::out_clks
struct ad9545_out_clk out_clks[NO_OS_ARRAY_SIZE(ad9545_out_clk_names)]
Definition: ad9545.h:749
AD9545_AUX_DPLL_REF_FAULT
#define AD9545_AUX_DPLL_REF_FAULT
Definition: ad9545.h:396
ad9545_dev::comm_type
enum ad9545_comm_type comm_type
Definition: ad9545.h:744
AD9545_TDCX_DIV
#define AD9545_TDCX_DIV(x)
Definition: ad9545.h:340
no_os_calloc
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:60
NO_OS_ARRAY_SIZE
#define NO_OS_ARRAY_SIZE(x)
Definition: no_os_util.h:55
ad9545_remove
int32_t ad9545_remove(struct ad9545_dev *dev)
Free the memory allocated by ad9545_init().
Definition: ad9545.c:2411
no_os_mul_u64_u32_div
uint64_t no_os_mul_u64_u32_div(uint64_t a, uint32_t mul, uint32_t divisor)
AD9545_SYNC_CTRL_DPLL_REF_MSK
#define AD9545_SYNC_CTRL_DPLL_REF_MSK
Definition: ad9545.h:369
AD9545_EN_HITLESS_MSK
#define AD9545_EN_HITLESS_MSK
Definition: ad9545.h:360
AD9545_Q0CC
#define AD9545_Q0CC
Definition: ad9545.h:90
AD9545_MODULATOR_A1
#define AD9545_MODULATOR_A1
Definition: ad9545.h:174
ad7616_init_param::mode
enum ad7616_mode mode
Definition: ad7616.h:232
ad9545_ref_in_clk::parent_clk
struct no_os_clk_desc * parent_clk
Definition: ad9545.h:666
ad9545_ref_in_clk::s_conf
enum ad9545_single_ended_config s_conf
Definition: ad9545.h:676
ad9545_sys_clk::sys_clk_freq_doubler
bool sys_clk_freq_doubler
Definition: ad9545.h:710
ad9545_out_clk::source_current
bool source_current
Definition: ad9545.h:619
AD9545_CALIB_APLL
#define AD9545_CALIB_APLL
Definition: ad9545.h:366
AD9545_COMPENSATE_DPLL
#define AD9545_COMPENSATE_DPLL
Definition: ad9545.h:128
ad9545_pll_clk::num_parents
uint8_t num_parents
Definition: ad9545.h:646
AD9545_MODULATION_COUNTER_A1
#define AD9545_MODULATION_COUNTER_A1
Definition: ad9545.h:172
AD9545_R_DIV_MAX
#define AD9545_R_DIV_MAX
Definition: ad9545.h:427
ad9545_dpll_profile::tdc_source
uint8_t tdc_source
Definition: ad9545.h:637
AD9545_CALIB_CLK
#define AD9545_CALIB_CLK
Definition: ad9545.h:181
AD9545_NSHOT_EN_C0
#define AD9545_NSHOT_EN_C0
Definition: ad9545.h:154
AD9545_REF_X_OFFSET_LIMIT
#define AD9545_REF_X_OFFSET_LIMIT(x)
Definition: ad9545.h:220
AD9545_IN_PULL_UP
@ AD9545_IN_PULL_UP
Definition: ad9545.h:531
ad9545_setup
int32_t ad9545_setup(struct ad9545_dev *dev)
Definition: ad9545.c:2336
ad9545_out_clk::dev
struct ad9545_dev * dev
Definition: ad9545.h:617
ad9545_calib_aplls
int ad9545_calib_aplls(struct ad9545_dev *dev)
Definition: ad9545.c:2051
no_os_clk.h
Header file of Clock Driver.
ad9545_pll_clk::parents
struct no_os_clk_desc ** parents
Definition: ad9545.h:647
AD9545_COMPENSATE_NCOS_VIA_AUX_DPLL
#define AD9545_COMPENSATE_NCOS_VIA_AUX_DPLL
Definition: ad9545.h:350
no_os_mdelay
void no_os_mdelay(uint32_t msecs)
Wait until msecs milliseconds passed.
Definition: aducm3029_delay.c:132
AD9545_PWR_CALIB_CHX
#define AD9545_PWR_CALIB_CHX(x)
Definition: ad9545.h:282
no_os_field_prep
uint32_t no_os_field_prep(uint32_t mask, uint32_t val)
no_os_min
#define no_os_min(x, y)
Definition: no_os_util.h:65
ad9545_ref_in_clk::d_conf
enum ad9545_diferential_config d_conf
Definition: ad9545.h:677
ad9545_dev::sys_clk
struct ad9545_sys_clk sys_clk
Definition: ad9545.h:745
no_os_error.h
Error codes definition.
AD9545_DC_COUPLED
@ AD9545_DC_COUPLED
Definition: ad9545.h:536
NO_OS_DIV_ROUND_UP
#define NO_OS_DIV_ROUND_UP(x, y)
Definition: no_os_util.h:58
AD9545_BASE_FILTER_MSK
#define AD9545_BASE_FILTER_MSK
Definition: ad9545.h:362
AD9545_APLL_M_DIV_MAX
#define AD9545_APLL_M_DIV_MAX
Definition: ad9545.h:433
ad9545_out_clk::rate_requested_hz
uint64_t rate_requested_hz
Definition: ad9545.h:624
ad9545_pll_clk::dev
struct ad9545_dev * dev
Definition: ad9545.h:642
ad9545_outputs_regs::nshot_en_reg
uint16_t nshot_en_reg
Definition: ad9545.h:549
ad9545_ref_mode
ad9545_ref_mode
Definition: ad9545.h:522
AD9545_DPLLX_FB_MODE
#define AD9545_DPLLX_FB_MODE(x, y)
Definition: ad9545.h:265
ad9545_out_clk::address
unsigned int address
Definition: ad9545.h:623
AD9545_SYNC_CTRL_MODE_MSK
#define AD9545_SYNC_CTRL_MODE_MSK
Definition: ad9545.h:370
ad9545_init_param
Definition: ad9545.h:759
ad9545_outputs_regs::nshot_en_msk
uint8_t nshot_en_msk
Definition: ad9545.h:550
AD9545_MAX_ZERO_DELAY_RATE
#define AD9545_MAX_ZERO_DELAY_RATE
Definition: ad9545.h:442
ad9545_dpll_profile::address
unsigned int address
Definition: ad9545.h:629
AD9545_DPLLX_FTW
#define AD9545_DPLLX_FTW(x)
Definition: ad9545.h:260
AD9545_REF_X_RDIV
#define AD9545_REF_X_RDIV(x)
Definition: ad9545.h:218
ad9545_dev::reg_write_multiple
ad9545_reg_write_multi_func reg_write_multiple
Definition: ad9545.h:742
AD9545_MIN_DIV_RATIO
#define AD9545_MIN_DIV_RATIO
Definition: ad9545.h:446
ad9545_dpll_profile::fast_acq_settle_ms
unsigned int fast_acq_settle_ms
Definition: ad9545.h:635
ad9545_dev::aux_nco_clks
struct ad9545_aux_nco_clk aux_nco_clks[NO_OS_ARRAY_SIZE(ad9545_aux_nco_clk_names)]
Definition: ad9545.h:750
ad9545_pll_clk::internal_zero_delay
bool internal_zero_delay
Definition: ad9545.h:652
ad9545_pll_clk::fast_acq_trigger_mode
unsigned int fast_acq_trigger_mode
Definition: ad9545.h:650
AD9545_SOURCEX_FREQ_THRESH
#define AD9545_SOURCEX_FREQ_THRESH(x)
Definition: ad9545.h:229
ad9545_ref_in_clk::freq_lock_fill_rate
unsigned int freq_lock_fill_rate
Definition: ad9545.h:673
ad9545_pll_clk
Definition: ad9545.h:641
ad9545_sys_clk::sys_freq_hz
uint32_t sys_freq_hz
Definition: ad9545.h:713
AD9545_NCO_FREQ_INT_MAX
#define AD9545_NCO_FREQ_INT_MAX
Definition: ad9545.h:337
AD9545_REF_X_FREQ_LOCK_DRAIN
#define AD9545_REF_X_FREQ_LOCK_DRAIN(x)
Definition: ad9545.h:226
ad9545_dev::pll_clks
struct ad9545_pll_clk pll_clks[NO_OS_ARRAY_SIZE(ad9545_pll_clk_names)]
Definition: ad9545.h:747
NO_OS_DIV_U64
#define NO_OS_DIV_U64(x, y)
Definition: no_os_util.h:121
AD9545_DPLL_MAX_FRAC
#define AD9545_DPLL_MAX_FRAC
Definition: ad9545.h:436
AD9545_SYS_CLK_FB_DIV
#define AD9545_SYS_CLK_FB_DIV
Definition: ad9545.h:122
ad9545_dpll_profile::fb_tagging
bool fb_tagging
Definition: ad9545.h:638
AD9545_AC_COUPLED_IF
@ AD9545_AC_COUPLED_IF
Definition: ad9545.h:528
AD9545_AUX_DPLL_LOCK_MSK
#define AD9545_AUX_DPLL_LOCK_MSK
Definition: ad9545.h:395
AD9545_PRODUCT_ID_LOW
#define AD9545_PRODUCT_ID_LOW
Definition: ad9545.h:117
AD9545_COMPNESATE_VIA_AUX_DPLL
#define AD9545_COMPNESATE_VIA_AUX_DPLL
Definition: ad9545.h:353
AD9545_DPLLX_FAST_MODE
#define AD9545_DPLLX_FAST_MODE(x)
Definition: ad9545.h:286
AD9545_APLL_LOCKED
#define AD9545_APLL_LOCKED(x)
Definition: ad9545.h:418
ad9545_dpll_profile::loop_bw_uhz
unsigned int loop_bw_uhz
Definition: ad9545.h:632
ad9545_dev::reg_read
ad9545_reg_read_func reg_read
Definition: ad9545.h:739
AD9545_TAG_MODE_MSK
#define AD9545_TAG_MODE_MSK
Definition: ad9545.h:361
AD9545_MAX_REFS
#define AD9545_MAX_REFS
Definition: ad9545.h:430
AD9545_IO_UPDATE
#define AD9545_IO_UPDATE
Definition: ad9545.h:119
AD9545_TDCX_PERIOD
#define AD9545_TDCX_PERIOD(x)
Definition: ad9545.h:341
no_os_clk_desc::hw_ch_num
uint8_t hw_ch_num
Definition: no_os_clk.h:85
AD9545_SYS_CLK_INPUT
#define AD9545_SYS_CLK_INPUT
Definition: ad9545.h:123
AD9545_REF_CTRL_DIF_MSK
#define AD9545_REF_CTRL_DIF_MSK
Definition: ad9545.h:208
ad9545.h
Header file for ad9545 Driver.
AD9545_MX_TO_TDCX
#define AD9545_MX_TO_TDCX(x)
Definition: ad9545.h:344
ad9545_remove
int32_t ad9545_remove(struct ad9545_dev *dev)
Free the memory allocated by ad9545_init().
Definition: ad9545.c:2411
ad9545_dev::spi_desc
struct no_os_spi_desc * spi_desc
Definition: ad9545.h:735
ad9545_aux_dpll_clk::dev
struct ad9545_dev * dev
Definition: ad9545.h:702
no_os_mul_u32_u32
uint64_t no_os_mul_u32_u32(uint32_t a, uint32_t b)
ad9545_ref_in_clk::freq_lock_drain_rate
unsigned int freq_lock_drain_rate
Definition: ad9545.h:674
ad9545_out_clk
Definition: ad9545.h:616
no_os_clk_desc
Structure holding CLK descriptor.
Definition: no_os_clk.h:81
AD9545_REFX_VALID_MSK
#define AD9545_REFX_VALID_MSK
Definition: ad9545.h:403
ad9545_ref_in_clk::address
unsigned int address
Definition: ad9545.h:667
ad9545_diferential_config
ad9545_diferential_config
Definition: ad9545.h:534
AD9545_DPLLX_FAST_L1
#define AD9545_DPLLX_FAST_L1(x, y)
Definition: ad9545.h:271
ad9545_dev::reg_write
ad9545_reg_write_func reg_write
Definition: ad9545.h:740
ad9545_aux_nco_clk::freq_thresh_ps
unsigned int freq_thresh_ps
Definition: ad9545.h:686
AD9545_NCO_CENTER_FREQ_INT_MSK
#define AD9545_NCO_CENTER_FREQ_INT_MSK
Definition: ad9545.h:311
no_os_spi_desc
Structure holding SPI descriptor.
Definition: no_os_spi.h:177
ad9545_aux_tdc_clk::address
unsigned int address
Definition: ad9545.h:694
ad9545_aux_tdc_clk::parent_clk
struct no_os_clk_desc * parent_clk
Definition: ad9545.h:696
AD9545_DPLLX_SLEW_RATE
#define AD9545_DPLLX_SLEW_RATE(x)
Definition: ad9545.h:261
AD9545_UPDATE_REGS
#define AD9545_UPDATE_REGS
Definition: ad9545.h:212
no_os_clk_init_param::dev_desc
void * dev_desc
Definition: no_os_clk.h:58
AD9545_DPLLX_LOOP_BW
#define AD9545_DPLLX_LOOP_BW(x, y)
Definition: ad9545.h:266
ad9545_ref_in_clk::phase_lock_fill_rate
unsigned int phase_lock_fill_rate
Definition: ad9545.h:671
ad9545_aux_dpll_clk::source
unsigned int source
Definition: ad9545.h:703
ad9545_pll_clk::internal_zero_delay_source
uint8_t internal_zero_delay_source
Definition: ad9545.h:653
no_os_div_u64_rem
uint64_t no_os_div_u64_rem(uint64_t dividend, uint32_t divisor, uint32_t *remainder)
ad9545_spi_reg_write
int32_t ad9545_spi_reg_write(struct ad9545_dev *dev, uint16_t reg_addr, uint8_t reg_data)
Definition: ad9545_spi.c:83
AD9545_DIV_OPS_MUTE_AA_MSK
#define AD9545_DIV_OPS_MUTE_AA_MSK
Definition: ad9545.h:378
ad9545_ref_in_clk::r_div_ratio
uint32_t r_div_ratio
Definition: ad9545.h:661
AD9545_SYNC_CTRLX
#define AD9545_SYNC_CTRLX(x)
Definition: ad9545.h:217
AD9545_DPLLX_N_DIV
#define AD9545_DPLLX_N_DIV(x, y)
Definition: ad9545.h:268
no_os_clk_init_param
Definition: no_os_clk.h:50
AD9545_MODULATOR_A0
#define AD9545_MODULATOR_A0
Definition: ad9545.h:149
ad9545_i2c_reg_read_multiple
int32_t ad9545_i2c_reg_read_multiple(struct ad9545_dev *dev, uint16_t reg_addr, uint8_t *reg_data, uint16_t count)
Definition: ad9545_i2c.c:105
AD9545_FB_PATH_TAG
#define AD9545_FB_PATH_TAG
Definition: ad9545.h:422
AD9545_MODULATION_COUNTER_A0
#define AD9545_MODULATION_COUNTER_A0
Definition: ad9545.h:146
ad9545_i2c_reg_write_multiple
int32_t ad9545_i2c_reg_write_multiple(struct ad9545_dev *dev, uint16_t reg_addr, uint8_t *reg_data, uint16_t count)
Definition: ad9545_i2c.c:142
AD9545_SOURCEX_PHASE_THRESH
#define AD9545_SOURCEX_PHASE_THRESH(x)
Definition: ad9545.h:228
no_os_i2c_desc
Structure holding I2C address descriptor.
Definition: no_os_i2c.h:107
AD9545_DPLL_MAX_MOD
#define AD9545_DPLL_MAX_MOD
Definition: ad9545.h:437
AD9545_AC_COUPLED
@ AD9545_AC_COUPLED
Definition: ad9545.h:535
no_os_malloc
void * no_os_malloc(size_t size)
Allocate memory and return a pointer to it.
Definition: chibios_alloc.c:49
ad9545_dev::reg_read_multiple
ad9545_reg_read_multi_func reg_read_multiple
Definition: ad9545.h:741
AD9545_MISC_AUX_NC1_ERR_MSK
#define AD9545_MISC_AUX_NC1_ERR_MSK
Definition: ad9545.h:394
AD9545_REF_X_FREQ_LOCK_FILL
#define AD9545_REF_X_FREQ_LOCK_FILL(x)
Definition: ad9545.h:225
no_os_clamp_t
#define no_os_clamp_t(type, val, min_val, max_val)
Definition: no_os_util.h:77
no_os_i2c.h
Header file of I2C Interface.
AD9545_DIV_OPS_QX
#define AD9545_DIV_OPS_QX(x)
Definition: ad9545.h:276
AD9545_NCOX_OFFSET_FREQ
#define AD9545_NCOX_OFFSET_FREQ(x)
Definition: ad9545.h:293
AD9545_COMPENSATE_TDCS_VIA_AUX_DPLL
#define AD9545_COMPENSATE_TDCS_VIA_AUX_DPLL
Definition: ad9545.h:347
AD9545_REF_X_PERIOD
#define AD9545_REF_X_PERIOD(x)
Definition: ad9545.h:219
AD9545_SINGLE_DIV
@ AD9545_SINGLE_DIV
Definition: ad9545.h:542
ad9545_init_param::ref_in_clks
struct ad9545_ref_in_clk ref_in_clks[NO_OS_ARRAY_SIZE(ad9545_ref_clk_names)]
Definition: ad9545.h:769
no_os_field_get
uint32_t no_os_field_get(uint32_t mask, uint32_t word)
ad9545_out_clk::source_ua
uint32_t source_ua
Definition: ad9545.h:621
ad9545_pll_clk::address
unsigned int address
Definition: ad9545.h:644
ad9545_spi_reg_read_multiple
int32_t ad9545_spi_reg_read_multiple(struct ad9545_dev *dev, uint16_t reg_addr, uint8_t *reg_data, uint16_t count)
Definition: ad9545_spi.c:104
ad9545_init_param::spi_init
struct no_os_spi_init_param * spi_init
Definition: ad9545.h:761
ad9545_reg_read_multi_func
int32_t(* ad9545_reg_read_multi_func)(struct ad9545_dev *dev, uint16_t reg_addr, uint8_t *reg_data, uint16_t count)
Definition: ad9545.h:724
ad9545_aux_tdc_clk::pin_nr
unsigned int pin_nr
Definition: ad9545.h:695
AD9545_MIN_SYS_CLK_FREQ
#define AD9545_MIN_SYS_CLK_FREQ
Definition: ad9545.h:444
ad9545_init_param::out_clks
struct ad9545_out_clk out_clks[NO_OS_ARRAY_SIZE(ad9545_out_clk_names)]
Definition: ad9545.h:770
AD9545_NCO_CENTER_FREQ_MAX
#define AD9545_NCO_CENTER_FREQ_MAX
Definition: ad9545.h:315
NO_OS_BIT
#define NO_OS_BIT(x)
Definition: no_os_util.h:51
ad9545_outputs_regs::modulation_counter_reg
uint16_t modulation_counter_reg
Definition: ad9545.h:548
no_os_free
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:75
ad9545_dpll_profile::en
bool en
Definition: ad9545.h:636
ad9545_reg_write_func
int32_t(* ad9545_reg_write_func)(struct ad9545_dev *dev, uint16_t reg_addr, uint8_t reg_data)
Definition: ad9545.h:721
ad9545_aux_dpll_clk::hw
struct no_os_clk_desc * hw
Definition: ad9545.h:700
ad9545_sys_clk::ref_freq_hz
uint32_t ref_freq_hz
Definition: ad9545.h:712
no_os_clk_platform_ops
Structure holding CLK function pointers that point to the platform specific function.
Definition: no_os_clk.h:97
AD9545_REFX_STATUS
#define AD9545_REFX_STATUS(x)
Definition: ad9545.h:287
AD9545_APLLX_M_DIV
#define AD9545_APLLX_M_DIV(x)
Definition: ad9545.h:233
ad9545_out_clk::hw
struct no_os_clk_desc * hw
Definition: ad9545.h:622
ad9545_out_clk::parent_clk
struct no_os_clk_desc * parent_clk
Definition: ad9545.h:625
ad9545_read_reg_multiple
int32_t ad9545_read_reg_multiple(struct ad9545_dev *dev, uint16_t reg_addr, uint8_t *reg_data, uint16_t count)
Definition: ad9545.c:97
ad9545_single_ended_config
ad9545_single_ended_config
Definition: ad9545.h:527
AD9545_AUX_DPLL_CHANGE_LIMIT
#define AD9545_AUX_DPLL_CHANGE_LIMIT
Definition: ad9545.h:129
AD9545_MODULATOR_EN
#define AD9545_MODULATOR_EN
Definition: ad9545.h:381
no_os_i2c_init_param
Structure holding the parameters for I2C initialization.
Definition: no_os_i2c.h:70
ad9545_aux_nco_clk::nco_used
bool nco_used
Definition: ad9545.h:683
AD9545_REF_X_VALID_TIMER
#define AD9545_REF_X_VALID_TIMER(x)
Definition: ad9545.h:222
ad9545_reg_write_multi_func
int32_t(* ad9545_reg_write_multi_func)(struct ad9545_dev *dev, uint16_t reg_addr, uint8_t *reg_data, uint16_t count)
Definition: ad9545.h:728
ad9545_output_mode
ad9545_output_mode
Definition: ad9545.h:540
ad9545_ref_in_clk::phase_lock_drain_rate
unsigned int phase_lock_drain_rate
Definition: ad9545.h:672
ad9545_dev
Definition: ad9545.h:733
AD9545_DRIVER_1A_CONF
#define AD9545_DRIVER_1A_CONF
Definition: ad9545.h:177
init_param
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:119
ad9545_init
int32_t ad9545_init(struct ad9545_dev **device, struct ad9545_init_param *init_param)
Definition: ad9545.c:1541
ad9545_aux_dpll_clk
Definition: ad9545.h:699
ad9545_ref_in_clk::d_tol_ppb
uint32_t d_tol_ppb
Definition: ad9545.h:663
ad9545_spi_reg_read
int32_t ad9545_spi_reg_read(struct ad9545_dev *dev, uint16_t reg_addr, uint8_t *reg_data)
Definition: ad9545_spi.c:56
ad9545_ref_in_clk::monitor_hyst_scale
uint8_t monitor_hyst_scale
Definition: ad9545.h:664
AD9545_SINGLE_ENDED
@ AD9545_SINGLE_ENDED
Definition: ad9545.h:523
AD9545_AUX_DPLL_SOURCE
#define AD9545_AUX_DPLL_SOURCE
Definition: ad9545.h:130
ad9545_aux_nco_clk::dev
struct ad9545_dev * dev
Definition: ad9545.h:684
ad9545_aux_dpll_clk::rate_change_limit
unsigned int rate_change_limit
Definition: ad9545.h:705
AD9545_NCO_CENTER_FREQ_FRAC_WIDTH
#define AD9545_NCO_CENTER_FREQ_FRAC_WIDTH
Definition: ad9545.h:306
no_os_clk_desc::dev_desc
void * dev_desc
Definition: no_os_clk.h:89
AD9545_MODULATION_COUNTER_C0
#define AD9545_MODULATION_COUNTER_C0
Definition: ad9545.h:148
AD9545_RESET_REGS
#define AD9545_RESET_REGS
Definition: ad9545.h:213
ad9545_init_param::sys_clk
struct ad9545_sys_clk sys_clk
Definition: ad9545.h:766
ad9545_dev::aux_tdc_clks
struct ad9545_aux_tdc_clk aux_tdc_clks[NO_OS_ARRAY_SIZE(ad9545_aux_tdc_clk_names)]
Definition: ad9545.h:752
AD9545_NSHOT_EN_AB0
#define AD9545_NSHOT_EN_AB0
Definition: ad9545.h:153
no_os_clk_init_param::hw_ch_num
uint8_t hw_ch_num
Definition: no_os_clk.h:54
AD9545_CLK_NCO
#define AD9545_CLK_NCO
Definition: ad9545.h:77
ad9545_dev::ref_in_clks
struct ad9545_ref_in_clk ref_in_clks[NO_OS_ARRAY_SIZE(ad9545_ref_clk_names)]
Definition: ad9545.h:748
ad9545_aux_nco_clk::phase_thresh_ps
unsigned int phase_thresh_ps
Definition: ad9545.h:687
no_os_clk_platform_ops::clk_enable
int(* clk_enable)(struct no_os_clk_desc *)
Definition: no_os_clk.h:101
ad9545_init
int32_t ad9545_init(struct ad9545_dev **device, struct ad9545_init_param *init_param)
Definition: ad9545.c:1541
no_os_spi_remove
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:122
ad9545_dev::aux_dpll_clk
struct ad9545_aux_dpll_clk aux_dpll_clk
Definition: ad9545.h:746
AD9545_COMPENSATE_NCOS
#define AD9545_COMPENSATE_NCOS
Definition: ad9545.h:127
AD9545_CTRL_CH_NSHOT_MSK
#define AD9545_CTRL_CH_NSHOT_MSK
Definition: ad9545.h:387
AD9545_PRODUCT_ID_HIGH
#define AD9545_PRODUCT_ID_HIGH
Definition: ad9545.h:118
no_os_gpio.h
Header file of GPIO Interface.
ad9545_aux_nco_clk::hw
struct no_os_clk_desc * hw
Definition: ad9545.h:682
ad9545_spi_reg_write_multiple
int32_t ad9545_spi_reg_write_multiple(struct ad9545_dev *dev, uint16_t reg_addr, uint8_t *reg_data, uint16_t count)
Definition: ad9545_spi.c:137
AD9545_DC_COUPLED_1V2
@ AD9545_DC_COUPLED_1V2
Definition: ad9545.h:529
AD9545_REF_X_PHASE_LOCK_FILL
#define AD9545_REF_X_PHASE_LOCK_FILL(x)
Definition: ad9545.h:223
AD9545_CHIP_ID
#define AD9545_CHIP_ID
Definition: ad9545.h:121
AD9545_CLK_AUX_TDC
#define AD9545_CLK_AUX_TDC
Definition: ad9545.h:78
AD9545_MAX_SYS_CLK_FREQ
#define AD9545_MAX_SYS_CLK_FREQ
Definition: ad9545.h:445
ad9545_ref_in_clk::freq_thresh_ps
unsigned int freq_thresh_ps
Definition: ad9545.h:669
ad9545_init_param::i2c_init
struct no_os_i2c_init_param * i2c_init
Definition: ad9545.h:763
ad9545_dpll_profile::parent_index
unsigned int parent_index
Definition: ad9545.h:630
ad9545_i2c_reg_read
int32_t ad9545_i2c_reg_read(struct ad9545_dev *dev, uint16_t reg_addr, uint8_t *reg_data)
Definition: ad9545_i2c.c:54
no_os_spi_init
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:58
ad9545_ref_in_clk
Definition: ad9545.h:658
AD9545_MODULATOR_B1
#define AD9545_MODULATOR_B1
Definition: ad9545.h:175
AD9545_SYS_CLK_REF_FREQ
#define AD9545_SYS_CLK_REF_FREQ
Definition: ad9545.h:124
AD9545_PLLX_STATUS
#define AD9545_PLLX_STATUS(x)
Definition: ad9545.h:283
ad9545_i2c_reg_write
int32_t ad9545_i2c_reg_write(struct ad9545_dev *dev, uint16_t reg_addr, uint8_t reg_data)
Definition: ad9545_i2c.c:83
no_os_util.h
Header file of utility functions.
ad9545_init_param::comm_type
enum ad9545_comm_type comm_type
Definition: ad9545.h:765
ad9545_sys_clk
Definition: ad9545.h:709
SPI
@ SPI
Definition: adxl372.h:322
AD9545_REF_CTRL_REFAA_MSK
#define AD9545_REF_CTRL_REFAA_MSK
Definition: ad9545.h:210
AD9545_NSHOT_REQ_CH
#define AD9545_NSHOT_REQ_CH(x)
Definition: ad9545.h:259
profile
CUSTOM_FILE profile
Definition: no_os_platform.c:30
ad9545_pll_clk::rate_requested_hz
uint64_t rate_requested_hz
Definition: ad9545.h:651
ad9545_ref_in_clk::ref_used
bool ref_used
Definition: ad9545.h:662
ad9545_init_param::aux_tdc_clks
struct ad9545_aux_tdc_clk aux_tdc_clks[NO_OS_ARRAY_SIZE(ad9545_aux_tdc_clk_names)]
Definition: ad9545.h:773
AD9545_CTRL_CH
#define AD9545_CTRL_CH(x)
Definition: ad9545.h:285
AD9545_CLK_OUT
#define AD9545_CLK_OUT
Definition: ad9545.h:75
AD9545_DIFFERENTIAL
@ AD9545_DIFFERENTIAL
Definition: ad9545.h:524
ad9545_out_clk::output_used
bool output_used
Definition: ad9545.h:618
pr_warning
#define pr_warning(fmt, args...)
Definition: no_os_print_log.h:103
AD9545_SYS_PLL_STABLE
#define AD9545_SYS_PLL_STABLE(x)
Definition: ad9545.h:416
AD9545_MODULATION_COUNTER_B1
#define AD9545_MODULATION_COUNTER_B1
Definition: ad9545.h:173
ad9545_outputs_regs::modulator_reg
uint16_t modulator_reg
Definition: ad9545.h:547
ad9545_setup
int32_t ad9545_setup(struct ad9545_dev *dev)
Definition: ad9545.c:2336
AD9545_POWER_DOWN_REF
#define AD9545_POWER_DOWN_REF
Definition: ad9545.h:182
AD9545_COMPENSATE_TDCS
#define AD9545_COMPENSATE_TDCS
Definition: ad9545.h:126
ad9545_pll_clk::slew_rate_limit_ps
uint32_t slew_rate_limit_ps
Definition: ad9545.h:655
AD9545_MISC
#define AD9545_MISC
Definition: ad9545.h:200
ad9545_init_param::pll_clks
struct ad9545_pll_clk pll_clks[NO_OS_ARRAY_SIZE(ad9545_pll_clk_names)]
Definition: ad9545.h:768
no_os_clk_recalc_rate
int32_t no_os_clk_recalc_rate(struct no_os_clk_desc *desc, uint64_t *rate)
ad9545_write_reg
int32_t ad9545_write_reg(struct ad9545_dev *dev, uint16_t reg_addr, uint8_t reg_data)
Definition: ad9545.c:82
ad9545_write_mask
int32_t ad9545_write_mask(struct ad9545_dev *dev, uint16_t reg_addr, uint32_t mask, uint8_t data)
Definition: ad9545.c:129
AD9545_NCO_OFFSET_FREQ_FRAC_WIDTH
#define AD9545_NCO_OFFSET_FREQ_FRAC_WIDTH
Definition: ad9545.h:324
I2C
@ I2C
Definition: ad9545.h:451
ad9545_pll_clk::profiles
struct ad9545_dpll_profile profiles[AD9545_MAX_DPLL_PROFILES]
Definition: ad9545.h:648
AD9545_R_DIV_MSK
#define AD9545_R_DIV_MSK
Definition: ad9545.h:426
ad9545_comm_type
ad9545_comm_type
Definition: ad9545.h:449
ad9545_dpll_profile::fast_acq_timeout_ms
unsigned int fast_acq_timeout_ms
Definition: ad9545.h:634
ad9545_aux_dpll_clk::parent_clk
struct no_os_clk_desc * parent_clk
Definition: ad9545.h:706
AD9545_MODULATION_COUNTER_B0
#define AD9545_MODULATION_COUNTER_B0
Definition: ad9545.h:147
NO_OS_DIV_ROUND_CLOSEST
#define NO_OS_DIV_ROUND_CLOSEST(x, y)
Definition: no_os_util.h:60
AD9545_REF_CTRL_REFA_MSK
#define AD9545_REF_CTRL_REFA_MSK
Definition: ad9545.h:209
AD9545_STABILITY_TIMER
#define AD9545_STABILITY_TIMER
Definition: ad9545.h:125
AD9545_DPLLX_FAST_L2
#define AD9545_DPLLX_FAST_L2(x, y)
Definition: ad9545.h:272
AD9545_REF_A_CTRL
#define AD9545_REF_A_CTRL
Definition: ad9545.h:132
AD9545_NSHOT_EN_AB1
#define AD9545_NSHOT_EN_AB1
Definition: ad9545.h:176
chip_id
chip_id
Definition: ad9172.h:57
no_os_spi_init_param
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:131
AD9545_DRIVER_0A_CONF
#define AD9545_DRIVER_0A_CONF
Definition: ad9545.h:155
no_os_div_u64
uint64_t no_os_div_u64(uint64_t dividend, uint32_t divisor)