| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
#ifndef _AD9523_H_ |
| 43 |
#define _AD9523_H_ |
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
#include <stdint.h> |
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
#define AD9523_READ (1 << 15) |
| 56 |
#define AD9523_WRITE (0 << 15) |
| 57 |
#define AD9523_CNT(x) (((x) - 1) << 13) |
| 58 |
#define AD9523_ADDR(x) ((x) & 0xFFF) |
| 59 |
|
| 60 |
#define AD9523_R1B (1 << 16) |
| 61 |
#define AD9523_R2B (2 << 16) |
| 62 |
#define AD9523_R3B (3 << 16) |
| 63 |
#define AD9523_TRANSF_LEN(x) ((x) >> 16) |
| 64 |
|
| 65 |
#define AD9523_SERIAL_PORT_CONFIG (AD9523_R1B | 0x0) |
| 66 |
#define AD9523_VERSION_REGISTER (AD9523_R1B | 0x2) |
| 67 |
#define AD9523_PART_REGISTER (AD9523_R1B | 0x3) |
| 68 |
#define AD9523_READBACK_CTRL (AD9523_R1B | 0x4) |
| 69 |
|
| 70 |
#define AD9523_EEPROM_CUSTOMER_VERSION_ID (AD9523_R2B | 0x6) |
| 71 |
|
| 72 |
#define AD9523_PLL1_REF_A_DIVIDER (AD9523_R2B | 0x11) |
| 73 |
#define AD9523_PLL1_REF_B_DIVIDER (AD9523_R2B | 0x13) |
| 74 |
#define AD9523_PLL1_REF_TEST_DIVIDER (AD9523_R1B | 0x14) |
| 75 |
#define AD9523_PLL1_FEEDBACK_DIVIDER (AD9523_R2B | 0x17) |
| 76 |
#define AD9523_PLL1_CHARGE_PUMP_CTRL (AD9523_R2B | 0x19) |
| 77 |
#define AD9523_PLL1_INPUT_RECEIVERS_CTRL (AD9523_R1B | 0x1A) |
| 78 |
#define AD9523_PLL1_REF_CTRL (AD9523_R1B | 0x1B) |
| 79 |
#define AD9523_PLL1_MISC_CTRL (AD9523_R1B | 0x1C) |
| 80 |
#define AD9523_PLL1_LOOP_FILTER_CTRL (AD9523_R1B | 0x1D) |
| 81 |
|
| 82 |
#define AD9523_PLL2_CHARGE_PUMP (AD9523_R1B | 0xF0) |
| 83 |
#define AD9523_PLL2_FEEDBACK_DIVIDER_AB (AD9523_R1B | 0xF1) |
| 84 |
#define AD9523_PLL2_CTRL (AD9523_R1B | 0xF2) |
| 85 |
#define AD9523_PLL2_VCO_CTRL (AD9523_R1B | 0xF3) |
| 86 |
#define AD9523_PLL2_VCO_DIVIDER (AD9523_R1B | 0xF4) |
| 87 |
#define AD9523_PLL2_LOOP_FILTER_CTRL (AD9523_R2B | 0xF6) |
| 88 |
#define AD9523_PLL2_R2_DIVIDER (AD9523_R1B | 0xF7) |
| 89 |
|
| 90 |
#define AD9523_CHANNEL_CLOCK_DIST(ch) (AD9523_R3B | (0x192 + 3 * ch)) |
| 91 |
|
| 92 |
#define AD9523_PLL1_OUTPUT_CTRL (AD9523_R1B | 0x1BA) |
| 93 |
#define AD9523_PLL1_OUTPUT_CHANNEL_CTRL (AD9523_R1B | 0x1BB) |
| 94 |
|
| 95 |
#define AD9523_READBACK_0 (AD9523_R1B | 0x22C) |
| 96 |
#define AD9523_READBACK_1 (AD9523_R1B | 0x22D) |
| 97 |
|
| 98 |
#define AD9523_STATUS_SIGNALS (AD9523_R3B | 0x232) |
| 99 |
#define AD9523_POWER_DOWN_CTRL (AD9523_R1B | 0x233) |
| 100 |
#define AD9523_IO_UPDATE (AD9523_R1B | 0x234) |
| 101 |
|
| 102 |
#define AD9523_EEPROM_DATA_XFER_STATUS (AD9523_R1B | 0xB00) |
| 103 |
#define AD9523_EEPROM_ERROR_READBACK (AD9523_R1B | 0xB01) |
| 104 |
#define AD9523_EEPROM_CTRL1 (AD9523_R1B | 0xB02) |
| 105 |
#define AD9523_EEPROM_CTRL2 (AD9523_R1B | 0xB03) |
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
#define AD9523_SER_CONF_SDO_ACTIVE (1 << 7) |
| 110 |
#define AD9523_SER_CONF_SOFT_RESET (1 << 5) |
| 111 |
|
| 112 |
|
| 113 |
#define AD9523_READBACK_CTRL_READ_BUFFERED (1 << 0) |
| 114 |
|
| 115 |
|
| 116 |
#define AD9523_PLL1_CHARGE_PUMP_CURRENT_nA(x) (((x) / 500) & 0x7F) |
| 117 |
#define AD9523_PLL1_CHARGE_PUMP_TRISTATE (1 << 7) |
| 118 |
#define AD9523_PLL1_CHARGE_PUMP_MODE_NORMAL (3 << 8) |
| 119 |
#define AD9523_PLL1_CHARGE_PUMP_MODE_PUMP_DOWN (2 << 8) |
| 120 |
#define AD9523_PLL1_CHARGE_PUMP_MODE_PUMP_UP (1 << 8) |
| 121 |
#define AD9523_PLL1_CHARGE_PUMP_MODE_TRISTATE (0 << 8) |
| 122 |
#define AD9523_PLL1_BACKLASH_PW_MIN (0 << 10) |
| 123 |
#define AD9523_PLL1_BACKLASH_PW_LOW (1 << 10) |
| 124 |
#define AD9523_PLL1_BACKLASH_PW_HIGH (2 << 10) |
| 125 |
#define AD9523_PLL1_BACKLASH_PW_MAX (3 << 10) |
| 126 |
|
| 127 |
|
| 128 |
#define AD9523_PLL1_REF_TEST_RCV_EN (1 << 7) |
| 129 |
#define AD9523_PLL1_REFB_DIFF_RCV_EN (1 << 6) |
| 130 |
#define AD9523_PLL1_REFA_DIFF_RCV_EN (1 << 5) |
| 131 |
#define AD9523_PLL1_REFB_RCV_EN (1 << 4) |
| 132 |
#define AD9523_PLL1_REFA_RCV_EN (1 << 3) |
| 133 |
#define AD9523_PLL1_REFA_REFB_PWR_CTRL_EN (1 << 2) |
| 134 |
#define AD9523_PLL1_OSC_IN_CMOS_NEG_INP_EN (1 << 1) |
| 135 |
#define AD9523_PLL1_OSC_IN_DIFF_EN (1 << 0) |
| 136 |
|
| 137 |
|
| 138 |
#define AD9523_PLL1_BYPASS_REF_TEST_DIV_EN (1 << 7) |
| 139 |
#define AD9523_PLL1_BYPASS_FEEDBACK_DIV_EN (1 << 6) |
| 140 |
#define AD9523_PLL1_ZERO_DELAY_MODE_INT (1 << 5) |
| 141 |
#define AD9523_PLL1_ZERO_DELAY_MODE_EXT (0 << 5) |
| 142 |
#define AD9523_PLL1_OSC_IN_PLL_FEEDBACK_EN (1 << 4) |
| 143 |
#define AD9523_PLL1_ZD_IN_CMOS_NEG_INP_EN (1 << 3) |
| 144 |
#define AD9523_PLL1_ZD_IN_DIFF_EN (1 << 2) |
| 145 |
#define AD9523_PLL1_REFB_CMOS_NEG_INP_EN (1 << 1) |
| 146 |
#define AD9523_PLL1_REFA_CMOS_NEG_INP_EN (1 << 0) |
| 147 |
|
| 148 |
|
| 149 |
#define AD9523_PLL1_REFB_INDEP_DIV_CTRL_EN (1 << 7) |
| 150 |
#define AD9523_PLL1_OSC_CTRL_FAIL_VCC_BY2_EN (1 << 6) |
| 151 |
#define AD9523_PLL1_REF_MODE(x) ((x) << 2) |
| 152 |
#define AD9523_PLL1_BYPASS_REFB_DIV (1 << 1) |
| 153 |
#define AD9523_PLL1_BYPASS_REFA_DIV (1 << 0) |
| 154 |
|
| 155 |
|
| 156 |
#define AD9523_PLL1_LOOP_FILTER_RZERO(x) ((x) & 0xF) |
| 157 |
|
| 158 |
|
| 159 |
#define AD9523_PLL2_CHARGE_PUMP_CURRENT_nA(x) ((x) / 3500) |
| 160 |
|
| 161 |
|
| 162 |
#define AD9523_PLL2_FB_NDIV_A_CNT(x) (((x) & 0x3) << 6) |
| 163 |
#define AD9523_PLL2_FB_NDIV_B_CNT(x) (((x) & 0x3F) << 0) |
| 164 |
#define AD9523_PLL2_FB_NDIV(a, b) (4 * (b) + (a)) |
| 165 |
|
| 166 |
|
| 167 |
#define AD9523_PLL2_CHARGE_PUMP_MODE_NORMAL (3 << 0) |
| 168 |
#define AD9523_PLL2_CHARGE_PUMP_MODE_PUMP_DOWN (2 << 0) |
| 169 |
#define AD9523_PLL2_CHARGE_PUMP_MODE_PUMP_UP (1 << 0) |
| 170 |
#define AD9523_PLL2_CHARGE_PUMP_MODE_TRISTATE (0 << 0) |
| 171 |
#define AD9523_PLL2_BACKLASH_PW_MIN (0 << 2) |
| 172 |
#define AD9523_PLL2_BACKLASH_PW_LOW (1 << 2) |
| 173 |
#define AD9523_PLL2_BACKLASH_PW_HIGH (2 << 2) |
| 174 |
#define AD9523_PLL2_BACKLASH_PW_MAX (3 << 1) |
| 175 |
#define AD9523_PLL2_BACKLASH_CTRL_EN (1 << 4) |
| 176 |
#define AD9523_PLL2_FREQ_DOUBLER_EN (1 << 5) |
| 177 |
#define AD9523_PLL2_LOCK_DETECT_PWR_DOWN_EN (1 << 7) |
| 178 |
|
| 179 |
|
| 180 |
#define AD9523_PLL2_VCO_CALIBRATE (1 << 1) |
| 181 |
#define AD9523_PLL2_FORCE_VCO_MIDSCALE (1 << 2) |
| 182 |
#define AD9523_PLL2_FORCE_REFERENCE_VALID (1 << 3) |
| 183 |
#define AD9523_PLL2_FORCE_RELEASE_SYNC (1 << 4) |
| 184 |
|
| 185 |
|
| 186 |
#define AD9523_PLL2_VCO_DIV_M1(x) ((((x) - 3) & 0x3) << 0) |
| 187 |
#define AD9523_PLL2_VCO_DIV_M2(x) ((((x) - 3) & 0x3) << 4) |
| 188 |
#define AD9523_PLL2_VCO_DIV_M1_PWR_DOWN_EN (1 << 2) |
| 189 |
#define AD9523_PLL2_VCO_DIV_M2_PWR_DOWN_EN (1 << 6) |
| 190 |
|
| 191 |
|
| 192 |
#define AD9523_PLL2_LOOP_FILTER_CPOLE1(x) (((x) & 0x7) << 0) |
| 193 |
#define AD9523_PLL2_LOOP_FILTER_RZERO(x) (((x) & 0x7) << 3) |
| 194 |
#define AD9523_PLL2_LOOP_FILTER_RPOLE2(x) (((x) & 0x7) << 6) |
| 195 |
#define AD9523_PLL2_LOOP_FILTER_RZERO_BYPASS_EN (1 << 8) |
| 196 |
|
| 197 |
|
| 198 |
#define AD9523_PLL2_R2_DIVIDER_VAL(x) (((x) & 0x1F) << 0) |
| 199 |
|
| 200 |
|
| 201 |
#define AD9523_CLK_DIST_DIV_PHASE(x) (((x) & 0x3F) << 18) |
| 202 |
#define AD9523_CLK_DIST_DIV_PHASE_REV(x) ((ret >> 18) & 0x3F) |
| 203 |
#define AD9523_CLK_DIST_DIV(x) ((((x) - 1) & 0x3FF) << 8) |
| 204 |
#define AD9523_CLK_DIST_DIV_REV(x) (((ret >> 8) & 0x3FF) + 1) |
| 205 |
#define AD9523_CLK_DIST_INV_DIV_OUTPUT_EN (1 << 7) |
| 206 |
#define AD9523_CLK_DIST_IGNORE_SYNC_EN (1 << 6) |
| 207 |
#define AD9523_CLK_DIST_PWR_DOWN_EN (1 << 5) |
| 208 |
#define AD9523_CLK_DIST_LOW_PWR_MODE_EN (1 << 4) |
| 209 |
#define AD9523_CLK_DIST_DRIVER_MODE(x) (((x) & 0xF) << 0) |
| 210 |
|
| 211 |
|
| 212 |
#define AD9523_PLL1_OUTP_CTRL_VCO_DIV_SEL_CH6_M2 (1 << 7) |
| 213 |
#define AD9523_PLL1_OUTP_CTRL_VCO_DIV_SEL_CH5_M2 (1 << 6) |
| 214 |
#define AD9523_PLL1_OUTP_CTRL_VCO_DIV_SEL_CH4_M2 (1 << 5) |
| 215 |
#define AD9523_PLL1_OUTP_CTRL_CMOS_DRV_WEAK (1 << 4) |
| 216 |
#define AD9523_PLL1_OUTP_CTRL_OUTPUT_DIV_1 (0 << 0) |
| 217 |
#define AD9523_PLL1_OUTP_CTRL_OUTPUT_DIV_2 (1 << 0) |
| 218 |
#define AD9523_PLL1_OUTP_CTRL_OUTPUT_DIV_4 (2 << 0) |
| 219 |
#define AD9523_PLL1_OUTP_CTRL_OUTPUT_DIV_8 (4 << 0) |
| 220 |
#define AD9523_PLL1_OUTP_CTRL_OUTPUT_DIV_16 (8 << 0) |
| 221 |
|
| 222 |
|
| 223 |
#define AD9523_PLL1_OUTP_CH_CTRL_OUTPUT_PWR_DOWN_EN (1 << 7) |
| 224 |
#define AD9523_PLL1_OUTP_CH_CTRL_VCO_DIV_SEL_CH9_M2 (1 << 6) |
| 225 |
#define AD9523_PLL1_OUTP_CH_CTRL_VCO_DIV_SEL_CH8_M2 (1 << 5) |
| 226 |
#define AD9523_PLL1_OUTP_CH_CTRL_VCO_DIV_SEL_CH7_M2 (1 << 4) |
| 227 |
#define AD9523_PLL1_OUTP_CH_CTRL_VCXO_SRC_SEL_CH3 (1 << 3) |
| 228 |
#define AD9523_PLL1_OUTP_CH_CTRL_VCXO_SRC_SEL_CH2 (1 << 2) |
| 229 |
#define AD9523_PLL1_OUTP_CH_CTRL_VCXO_SRC_SEL_CH1 (1 << 1) |
| 230 |
#define AD9523_PLL1_OUTP_CH_CTRL_VCXO_SRC_SEL_CH0 (1 << 0) |
| 231 |
|
| 232 |
|
| 233 |
#define AD9523_READBACK_0_STAT_PLL2_REF_CLK (1 << 7) |
| 234 |
#define AD9523_READBACK_0_STAT_PLL2_FB_CLK (1 << 6) |
| 235 |
#define AD9523_READBACK_0_STAT_VCXO (1 << 5) |
| 236 |
#define AD9523_READBACK_0_STAT_REF_TEST (1 << 4) |
| 237 |
#define AD9523_READBACK_0_STAT_REFB (1 << 3) |
| 238 |
#define AD9523_READBACK_0_STAT_REFA (1 << 2) |
| 239 |
#define AD9523_READBACK_0_STAT_PLL2_LD (1 << 1) |
| 240 |
#define AD9523_READBACK_0_STAT_PLL1_LD (1 << 0) |
| 241 |
|
| 242 |
|
| 243 |
#define AD9523_READBACK_1_HOLDOVER_ACTIVE (1 << 3) |
| 244 |
#define AD9523_READBACK_1_AUTOMODE_SEL_REFB (1 << 2) |
| 245 |
#define AD9523_READBACK_1_VCO_CALIB_IN_PROGRESS (1 << 0) |
| 246 |
|
| 247 |
|
| 248 |
#define AD9523_STATUS_SIGNALS_SYNC_MAN_CTRL (1 << 16) |
| 249 |
#define AD9523_STATUS_MONITOR_01_PLL12_LOCKED (0x302) |
| 250 |
|
| 251 |
#define AD9523_POWER_DOWN_CTRL_PLL1_PWR_DOWN (1 << 2) |
| 252 |
#define AD9523_POWER_DOWN_CTRL_PLL2_PWR_DOWN (1 << 1) |
| 253 |
#define AD9523_POWER_DOWN_CTRL_DIST_PWR_DOWN (1 << 0) |
| 254 |
|
| 255 |
|
| 256 |
#define AD9523_IO_UPDATE_EN (1 << 0) |
| 257 |
|
| 258 |
|
| 259 |
#define AD9523_EEPROM_DATA_XFER_IN_PROGRESS (1 << 0) |
| 260 |
|
| 261 |
|
| 262 |
#define AD9523_EEPROM_ERROR_READBACK_FAIL (1 << 0) |
| 263 |
|
| 264 |
|
| 265 |
#define AD9523_EEPROM_CTRL1_SOFT_EEPROM (1 << 1) |
| 266 |
#define AD9523_EEPROM_CTRL1_EEPROM_WRITE_PROT_DIS (1 << 0) |
| 267 |
|
| 268 |
|
| 269 |
#define AD9523_EEPROM_CTRL2_REG2EEPROM (1 << 0) |
| 270 |
|
| 271 |
#define AD9523_NUM_CHAN 14 |
| 272 |
#define AD9523_NUM_CHAN_ALT_CLK_SRC 10 |
| 273 |
|
| 274 |
|
| 275 |
|
| 276 |
|
| 277 |
enum outp_drv_mode |
| 278 |
{ |
| 279 |
TRISTATE, |
| 280 |
LVPECL_8mA, |
| 281 |
LVDS_4mA, |
| 282 |
LVDS_7mA, |
| 283 |
HSTL0_16mA, |
| 284 |
HSTL1_8mA, |
| 285 |
CMOS_CONF1, |
| 286 |
CMOS_CONF2, |
| 287 |
CMOS_CONF3, |
| 288 |
CMOS_CONF4, |
| 289 |
CMOS_CONF5, |
| 290 |
CMOS_CONF6, |
| 291 |
CMOS_CONF7, |
| 292 |
CMOS_CONF8, |
| 293 |
CMOS_CONF9 |
| 294 |
}; |
| 295 |
|
| 296 |
enum ref_sel_mode |
| 297 |
{ |
| 298 |
NONEREVERTIVE_STAY_ON_REFB, |
| 299 |
REVERT_TO_REFA, |
| 300 |
SELECT_REFA, |
| 301 |
SELECT_REFB, |
| 302 |
EXT_REF_SEL |
| 303 |
}; |
| 304 |
|
| 305 |
|
| 306 |
|
| 307 |
|
| 308 |
|
| 309 |
|
| 310 |
|
| 311 |
|
| 312 |
|
| 313 |
|
| 314 |
|
| 315 |
|
| 316 |
|
| 317 |
|
| 318 |
|
| 319 |
|
| 320 |
|
| 321 |
struct ad9523_channel_spec |
| 322 |
{ |
| 323 |
unsigned channel_num; |
| 324 |
unsigned char divider_output_invert_en; |
| 325 |
unsigned char sync_ignore_en; |
| 326 |
unsigned char low_power_mode_en; |
| 327 |
unsigned char use_alt_clock_src; |
| 328 |
unsigned char output_dis; |
| 329 |
unsigned char driver_mode; |
| 330 |
unsigned char divider_phase; |
| 331 |
unsigned short channel_divider; |
| 332 |
char extended_name[16]; |
| 333 |
}; |
| 334 |
|
| 335 |
enum pll1_rzero_resistor { |
| 336 |
RZERO_883_OHM, |
| 337 |
RZERO_677_OHM, |
| 338 |
RZERO_341_OHM, |
| 339 |
RZERO_135_OHM, |
| 340 |
RZERO_10_OHM, |
| 341 |
RZERO_USE_EXT_RES = 8, |
| 342 |
}; |
| 343 |
|
| 344 |
enum rpole2_resistor { |
| 345 |
RPOLE2_900_OHM, |
| 346 |
RPOLE2_450_OHM, |
| 347 |
RPOLE2_300_OHM, |
| 348 |
RPOLE2_225_OHM, |
| 349 |
}; |
| 350 |
|
| 351 |
enum rzero_resistor { |
| 352 |
RZERO_3250_OHM, |
| 353 |
RZERO_2750_OHM, |
| 354 |
RZERO_2250_OHM, |
| 355 |
RZERO_2100_OHM, |
| 356 |
RZERO_3000_OHM, |
| 357 |
RZERO_2500_OHM, |
| 358 |
RZERO_2000_OHM, |
| 359 |
RZERO_1850_OHM, |
| 360 |
}; |
| 361 |
|
| 362 |
enum cpole1_capacitor { |
| 363 |
CPOLE1_0_PF, |
| 364 |
CPOLE1_8_PF, |
| 365 |
CPOLE1_16_PF, |
| 366 |
CPOLE1_24_PF, |
| 367 |
_CPOLE1_24_PF, |
| 368 |
CPOLE1_32_PF, |
| 369 |
CPOLE1_40_PF, |
| 370 |
CPOLE1_48_PF, |
| 371 |
}; |
| 372 |
|
| 373 |
|
| 374 |
|
| 375 |
|
| 376 |
|
| 377 |
|
| 378 |
|
| 379 |
|
| 380 |
|
| 381 |
|
| 382 |
|
| 383 |
|
| 384 |
|
| 385 |
|
| 386 |
|
| 387 |
|
| 388 |
|
| 389 |
|
| 390 |
|
| 391 |
|
| 392 |
|
| 393 |
|
| 394 |
|
| 395 |
|
| 396 |
|
| 397 |
|
| 398 |
|
| 399 |
|
| 400 |
|
| 401 |
|
| 402 |
|
| 403 |
|
| 404 |
|
| 405 |
|
| 406 |
|
| 407 |
|
| 408 |
|
| 409 |
|
| 410 |
struct ad9523_platform_data |
| 411 |
{ |
| 412 |
unsigned long vcxo_freq; |
| 413 |
|
| 414 |
|
| 415 |
unsigned char refa_diff_rcv_en; |
| 416 |
unsigned char refb_diff_rcv_en; |
| 417 |
unsigned char zd_in_diff_en; |
| 418 |
unsigned char osc_in_diff_en; |
| 419 |
|
| 420 |
|
| 421 |
|
| 422 |
|
| 423 |
|
| 424 |
unsigned char refa_cmos_neg_inp_en; |
| 425 |
unsigned char refb_cmos_neg_inp_en; |
| 426 |
unsigned char zd_in_cmos_neg_inp_en; |
| 427 |
unsigned char osc_in_cmos_neg_inp_en; |
| 428 |
|
| 429 |
|
| 430 |
unsigned short refa_r_div; |
| 431 |
unsigned short refb_r_div; |
| 432 |
unsigned short pll1_feedback_div; |
| 433 |
unsigned short pll1_charge_pump_current_nA; |
| 434 |
unsigned char zero_delay_mode_internal_en; |
| 435 |
unsigned char osc_in_feedback_en; |
| 436 |
unsigned char pll1_loop_filter_rzero; |
| 437 |
|
| 438 |
|
| 439 |
unsigned char ref_mode; |
| 440 |
|
| 441 |
|
| 442 |
unsigned int pll2_charge_pump_current_nA; |
| 443 |
unsigned char pll2_ndiv_a_cnt; |
| 444 |
unsigned char pll2_ndiv_b_cnt; |
| 445 |
unsigned char pll2_freq_doubler_en; |
| 446 |
unsigned char pll2_r2_div; |
| 447 |
unsigned char pll2_vco_diff_m1; |
| 448 |
unsigned char pll2_vco_diff_m2; |
| 449 |
|
| 450 |
|
| 451 |
unsigned char rpole2; |
| 452 |
unsigned char rzero; |
| 453 |
unsigned char cpole1; |
| 454 |
unsigned char rzero_bypass_en; |
| 455 |
|
| 456 |
|
| 457 |
int num_channels; |
| 458 |
struct ad9523_channel_spec *channels; |
| 459 |
|
| 460 |
char name[16]; |
| 461 |
}; |
| 462 |
|
| 463 |
#define ARRAY_SIZE(ar) (sizeof(ar)/sizeof(ar[0])) |
| 464 |
|
| 465 |
|
| 466 |
|
| 467 |
|
| 468 |
|
| 469 |
int32_t ad9523_setup(); |
| 470 |
|
| 471 |
int32_t ad9523_reset(); |
| 472 |
|
| 473 |
uint32_t ad9523_clk_round_rate_DAC_CLK(uint32_t rate); |
| 474 |
|
| 475 |
uint32_t ad9523_clk_round_rate_DAC_DCO_CLK(uint32_t rate); |
| 476 |
|
| 477 |
uint32_t ad9523_clk_round_rate_DAC_REF_CLK(uint32_t rate); |
| 478 |
|
| 479 |
int64_t ad9523_out_altvoltage_ZD_OUTPUT_frequency(int64_t Hz); |
| 480 |
|
| 481 |
int64_t ad9523_out_altvoltage_ZD_OUTPUT_phase(int64_t rad); |
| 482 |
|
| 483 |
int64_t ad9523_out_altvoltage_ZD_OUTPUT_raw(int64_t raw_data); |
| 484 |
|
| 485 |
int64_t ad9523_out_altvoltage_DAC_CLK_frequency(int64_t Hz); |
| 486 |
|
| 487 |
int64_t ad9523_out_altvoltage_DAC_CLK_phase(int64_t rad); |
| 488 |
|
| 489 |
int64_t ad9523_out_altvoltage_DAC_CLK_raw(int64_t raw_data); |
| 490 |
|
| 491 |
int64_t ad9523_out_altvoltage_ADC_CLK_frequency(int64_t Hz); |
| 492 |
|
| 493 |
int64_t ad9523_out_altvoltage_ADC_CLK_phase(int64_t rad); |
| 494 |
|
| 495 |
int64_t ad9523_out_altvoltage_ADC_CLK_raw(int64_t raw_data); |
| 496 |
|
| 497 |
int64_t ad9523_out_altvoltage_DAC_REF_CLK_frequency(int64_t Hz); |
| 498 |
|
| 499 |
int64_t ad9523_out_altvoltage_DAC_REF_CLK_phase(int64_t rad); |
| 500 |
|
| 501 |
int64_t ad9523_out_altvoltage_DAC_REF_CLK_raw(int64_t raw_data); |
| 502 |
|
| 503 |
int64_t ad9523_out_altvoltage_TX_LO_REF_CLK_frequency(int64_t Hz); |
| 504 |
|
| 505 |
int64_t ad9523_out_altvoltage_TX_LO_REF_CLK_phase(int64_t rad); |
| 506 |
|
| 507 |
int64_t ad9523_out_altvoltage_TX_LO_REF_CLK_raw(int64_t raw_data); |
| 508 |
|
| 509 |
int64_t ad9523_out_altvoltage_DAC_DCO_CLK_frequency(int64_t Hz); |
| 510 |
|
| 511 |
int64_t ad9523_out_altvoltage_DAC_DCO_CLK_phase(int64_t rad); |
| 512 |
|
| 513 |
int64_t ad9523_out_altvoltage_DAC_DCO_CLK_raw(int64_t raw_data); |
| 514 |
|
| 515 |
int64_t ad9523_out_altvoltage_ADC_SYNC_CLK_frequency(int64_t Hz); |
| 516 |
|
| 517 |
int64_t ad9523_out_altvoltage_ADC_SYNC_CLK_phase(int64_t rad); |
| 518 |
|
| 519 |
int64_t ad9523_out_altvoltage_ADC_SYNC_CLK_raw(int64_t raw_data); |
| 520 |
|
| 521 |
int64_t ad9523_out_altvoltage_RX_LO_REF_CLK_frequency(int64_t Hz); |
| 522 |
|
| 523 |
int64_t ad9523_out_altvoltage_RX_LO_REF_CLK_phase(int64_t rad); |
| 524 |
|
| 525 |
int64_t ad9523_out_altvoltage_RX_LO_REF_CLK_raw(int64_t raw_data); |
| 526 |
|
| 527 |
int32_t ad9523_pll2_feedback_clk_present(); |
| 528 |
|
| 529 |
int32_t ad9523_pll2_reference_clk_present(); |
| 530 |
|
| 531 |
int32_t ad9523_pll1_reference_clk_a_present(); |
| 532 |
|
| 533 |
int32_t ad9523_pll1_reference_clk_b_present(); |
| 534 |
|
| 535 |
int32_t ad9523_pll1_reference_clk_test_present(); |
| 536 |
|
| 537 |
int32_t ad9523_vcxo_clk_present(); |
| 538 |
|
| 539 |
int32_t ad9523_store_eeprom(); |
| 540 |
|
| 541 |
int32_t ad9523_sync_dividers(); |
| 542 |
|
| 543 |
#endif |