no-OS
ad9081.h
Go to the documentation of this file.
1 /***************************************************************************/
33 #ifndef AD9081_H_
34 #define AD9081_H_
35 
36 /******************************************************************************/
37 /***************************** Include Files **********************************/
38 /******************************************************************************/
39 #include <stdbool.h>
40 #include <stdint.h>
41 #include "no_os_clk.h"
42 #include "no_os_spi.h"
43 #include "no_os_gpio.h"
44 #include "adi_ad9081.h"
45 #include "jesd204.h"
46 
47 /******************************************************************************/
48 /********************** Macros and Types Declarations *************************/
49 /******************************************************************************/
50 #define MAX_NUM_MAIN_DATAPATHS 4
51 #define MAX_NUM_CHANNELIZER 8
52 
54  bool is_jrx;
55  adi_cms_jesd_param_t jesd_param;
58  uint8_t logiclane_mapping[8];
59  uint8_t link_converter_select[16];
60  uint64_t lane_rate;
61  unsigned long lane_rate_kbps;
62  unsigned long lane_cal_rate_kbps;
63 };
64 
67 };
68 
69 struct ad9081_phy {
75  struct no_os_clk *dev_clk;
76  struct jesd204_dev *jdev;
82  adi_ad9081_device_t ad9081;
88  uint32_t lmfc_delay;
94  bool tx_disable;
95  bool rx_disable;
96  /* TX */
97  uint64_t dac_frequency_hz;
98  /* The 4 DAC Main Datapaths */
99  uint32_t tx_main_interp;
103  /* The 8 DAC Channelizers */
104  uint32_t tx_chan_interp;
109  /* RX */
110  uint32_t adc_dcm[2];
113  /* The 4 ADC Main Datapaths */
119  uint8_t rx_cddc_select;
120  /* The 8 ADC Channelizers */
127  uint8_t rx_fddc_select;
130 };
131 
133  uint32_t device_id;
137  uint32_t high_density;
139  uint32_t bits_per_sample;
143  uint32_t subclass;
144  uint32_t link_mode;
145  uint32_t dual_link;
146  uint32_t version;
148  /* JTX */
150  /* JRX */
152 };
153 
176  /* TX */
178  /* The 4 DAC Main Datapaths */
184  /* The 8 DAC Channelizers */
189  /* RX */
192  /* The 4 ADC Main Datapaths */
198  /* The 8 ADC Channelizers */
208 };
209 
210 /* ffh: 2 - gpio6, 3 - gpio7, 4 - gpio8, 5 - gpio9, 6 - gpio10, 7 - syncinb1_p, 8 - syncinb1_n */
211 
212 #define AD9081_PERI_SEL_GPIO6 2
213 #define AD9081_PERI_SEL_GPIO7 3
214 #define AD9081_PERI_SEL_GPIO8 4
215 #define AD9081_PERI_SEL_GPIO9 5
216 #define AD9081_PERI_SEL_GPIO10 6
217 #define AD9081_PERI_SEL_SYNCINB1_P 7
218 #define AD9081_PERI_SEL_SYNCINB1_N 8
219 
220 #define AD9081_FFH_CHAN_SEL_REG_MODE 0 /* 0: Register Map control (Use ddc_nco_regmap_chan_sel) */
221 #define AD9081_FFH_CHAN_SEL_1GPIO_MODE 1 /* 1: profile_pins[0] is used. Pin level control {3'b0, profile_pins[0]} */
222 #define AD9081_FFH_CHAN_SEL_2GPIO_MODE 2 /* 2: profile_pins[1 :0] are used. Pin level control {2'b0, profile_pins[1:0]} */
223 #define AD9081_FFH_CHAN_SEL_3GPIO_MODE 3 /* 3: profile_pins[2 :0] are used. Pin level control {1'b0, profile_pins[2:0]} */
224 #define AD9081_FFH_CHAN_SEL_4GPIO_MODE 4 /* 4: profile_pins[3 :0] are used. Pin level control { profile_pins[3:0]} */
225 #define AD9081_FFH_CHAN_SEL_GPIO0_EDGE_MODE 8 /* 8: profile_pins[0] Pin edge control- increment internal counter when rising edge of profile_pins[0] Pin. */
226 #define AD9081_FFH_CHAN_SEL_GPIO1_EDGE_MODE 9 /* 9: profile_pins[1] Pin edge control- increment internal counter when rising edge of profile_pins[1] Pin. */
227 #define AD9081_FFH_CHAN_SEL_GPIO2_EDGE_MODE 10 /* 10: profile_pins[2] Pin edge control- increment internal counter when rising edge of profile_pins[2] Pin. */
228 #define AD9081_FFH_CHAN_SEL_GPIO3_EDGE_MODE 11 /* 11: profile_pins[3] Pin edge control- increment internal counter when rising edge of profile_pins[3] Pin. */
229 #define AD9081_FFH_CHAN_SEL_FHT_EXP_MODE 12 /* 12: FHT expire based control - increment internal counter when FHT is expired. */
230 
231 /*
232  * JESD204-FSM defines
233  */
234 #define DEFRAMER_LINK0_TX 0
235 #define DEFRAMER_LINK1_TX 1
236 #define FRAMER_LINK0_RX 2
237 #define FRAMER_LINK1_RX 3
238 
239 /******************************************************************************/
240 /************************ Functions Declarations ******************************/
241 /******************************************************************************/
242 /* Initialize the device. */
243 int32_t ad9081_init(struct ad9081_phy **device,
244  const struct ad9081_init_param *init_param);
245 /* Remove the device. */
246 int32_t ad9081_remove(struct ad9081_phy *device);
247 /* Work function. */
248 void ad9081_work_func(struct ad9081_phy *phy);
249 #endif
ad9081_init_param::nyquist_zone
uint32_t nyquist_zone[MAX_NUM_MAIN_DATAPATHS]
Definition: ad9081.h:191
ad9081_init_param::rx_main_complex_to_real_enable
uint8_t rx_main_complex_to_real_enable[MAX_NUM_MAIN_DATAPATHS]
Definition: ad9081.h:195
jesd204_state_op::per_device
jesd204_dev_cb per_device
Definition: jesd204.h:191
SPI_SDO
@ SPI_SDO
Definition: api_def.h:182
JESD204_OP_OPT_SETUP_STAGE1
@ JESD204_OP_OPT_SETUP_STAGE1
Definition: jesd204.h:205
SIGNAL_CMOS
@ SIGNAL_CMOS
Definition: api_def.h:194
no_os_alloc.h
no_os_gpio_init_param
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:79
ad9081_parse_init_param
int32_t ad9081_parse_init_param(struct ad9081_phy *phy, const struct ad9081_init_param *init_param)
Definition: ad9081.c:946
ad9081_init_param::rx_main_nco_frequency_shift_hz
int64_t rx_main_nco_frequency_shift_hz[MAX_NUM_MAIN_DATAPATHS]
Definition: ad9081.h:193
ad9081_init_param::dac_frequency_hz
uint64_t dac_frequency_hz
Definition: ad9081.h:177
ad9081_init_param::gpio_reset
struct no_os_gpio_init_param * gpio_reset
Definition: ad9081.h:156
ad9081_init_param::rx_channel_enable
uint8_t rx_channel_enable[MAX_NUM_CHANNELIZER]
Definition: ad9081.h:204
ad9081_init_param::rx_channel_decimation
uint32_t rx_channel_decimation[MAX_NUM_CHANNELIZER]
Definition: ad9081.h:200
jesd204_dev_data::state_ops
struct jesd204_state_op state_ops[__JESD204_MAX_OPS]
Definition: jesd204.h:232
no_os_spi_write_and_read
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
ad9081_init_param::jrx_link_tx
struct link_init_param * jrx_link_tx[2]
Definition: ad9081.h:188
JESD204_STATE_OP_REASON_INIT
@ JESD204_STATE_OP_REASON_INIT
Definition: jesd204.h:148
ad9081_phy::jtx_link_rx
struct ad9081_jesd_link jtx_link_rx[2]
Definition: ad9081.h:84
DEFRAMER_LINK0_TX
#define DEFRAMER_LINK0_TX
Definition: ad9081.h:234
no_os_spi.h
Header file of SPI Interface.
JESD_SUBCLASS_0
@ JESD_SUBCLASS_0
Definition: api_def.h:251
ad9081_init_param::sysref_cmos_single_end_term_neg
uint8_t sysref_cmos_single_end_term_neg
Definition: ad9081.h:165
ad9081_phy::tx_dac_chan_xbar
uint8_t tx_dac_chan_xbar[MAX_NUM_MAIN_DATAPATHS]
Definition: ad9081.h:100
jesd204_copy_link_params
void jesd204_copy_link_params(struct jesd204_link *dst, const struct jesd204_link *src)
COUPLING_DC
@ COUPLING_DC
Definition: api_def.h:202
pr_err
#define pr_err(fmt, args...)
Definition: no_os_print_log.h:88
ad9081_work_func
void ad9081_work_func(struct ad9081_phy *phy)
ad9081_init_param::rx_ffh_gpio_mux_selection
uint8_t rx_ffh_gpio_mux_selection[6]
Definition: ad9081.h:206
dac_settings_cache::chan_gain
uint16_t chan_gain[MAX_NUM_CHANNELIZER]
Definition: ad9081.h:66
JESD204_STATE_OP_MODE_PER_DEVICE
@ JESD204_STATE_OP_MODE_PER_DEVICE
Definition: jesd204.h:176
no_os_delay.h
Header file of Delay functions.
ad9081_init_param::nco_sync_direct_sysref_mode_enable
bool nco_sync_direct_sysref_mode_enable
Definition: ad9081.h:171
JESD204_ENCODER_8B10B
@ JESD204_ENCODER_8B10B
Definition: jesd204.h:30
ad9081_init_param::rx_main_enable
uint8_t rx_main_enable[MAX_NUM_MAIN_DATAPATHS]
Definition: ad9081.h:197
SYSREF_CONT
@ SYSREF_CONT
Definition: api_def.h:224
jesd204_sysref::mode
enum jesd204_sysref_mode mode
Definition: jesd204.h:61
jesd204_state_op_reason
jesd204_state_op_reason
Definition: jesd204.h:147
pr_info
#define pr_info(fmt, args...)
Definition: no_os_print_log.h:115
JESD204_VERSION_C
@ JESD204_VERSION_C
Definition: jesd204.h:24
no_os_clk
Definition: no_os_clk.h:64
NO_OS_DIV_ROUND_CLOSEST_ULL
#define NO_OS_DIV_ROUND_CLOSEST_ULL(x, y)
Definition: no_os_util.h:56
ad9081_parse_jesd_link_init_param
int32_t ad9081_parse_jesd_link_init_param(struct ad9081_jesd_link *link, const struct link_init_param *init_param, bool jtx)
Definition: ad9081.c:897
ad9081_init_param::rx_main_digital_gain_6db_enable
uint8_t rx_main_digital_gain_6db_enable[MAX_NUM_MAIN_DATAPATHS]
Definition: ad9081.h:196
ad9081_phy::adc_chan_decimation
uint32_t adc_chan_decimation[MAX_NUM_CHANNELIZER]
Definition: ad9081.h:122
device
Definition: ad9361_util.h:69
no_os_print_log.h
Print messages helpers.
ad9081_phy::rx_cddc_c2r
uint8_t rx_cddc_c2r[MAX_NUM_MAIN_DATAPATHS]
Definition: ad9081.h:118
SIGNAL_LVDS
@ SIGNAL_LVDS
Definition: api_def.h:195
ad9081_init_param::tx_channel_gain
uint16_t tx_channel_gain[MAX_NUM_CHANNELIZER]
Definition: ad9081.h:187
ad9081_init_param::nco_sync_ms_extra_lmfc_num
uint32_t nco_sync_ms_extra_lmfc_num
Definition: ad9081.h:170
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:54
NO_OS_ARRAY_SIZE
#define NO_OS_ARRAY_SIZE(x)
Definition: no_os_util.h:49
JESD204_STATE_OP_REASON_UNINIT
@ JESD204_STATE_OP_REASON_UNINIT
Definition: jesd204.h:149
ad9081_init_param::rx_main_decimation
uint32_t rx_main_decimation[MAX_NUM_MAIN_DATAPATHS]
Definition: ad9081.h:194
ad9081_init_param::rx_channel_nco_frequency_shift_hz
int64_t rx_channel_nco_frequency_shift_hz[MAX_NUM_CHANNELIZER]
Definition: ad9081.h:199
no_os_clk::clk_desc
const struct no_os_clk_desc * clk_desc
Definition: no_os_clk.h:68
ad9081_phy::is_initialized
bool is_initialized
Definition: ad9081.h:93
ad9081_init_param::tx_disable
bool tx_disable
Definition: ad9081.h:174
jesd204_dev_priv
void * jesd204_dev_priv(struct jesd204_dev *jdev)
ad9081_phy::sysref_coupling_ac_en
bool sysref_coupling_ac_en
Definition: ad9081.h:78
no_os_clk.h
Header file of Clock Driver.
ad9081_init_param::tx_main_interpolation
uint32_t tx_main_interpolation
Definition: ad9081.h:179
no_os_do_div
uint64_t no_os_do_div(uint64_t *n, uint64_t base)
no_os_mdelay
void no_os_mdelay(uint32_t msecs)
Wait until msecs milliseconds passed.
Definition: aducm3029_delay.c:126
ad9081_phy::rx_disable
bool rx_disable
Definition: ad9081.h:95
JESD204_OP_OPT_SETUP_STAGE3
@ JESD204_OP_OPT_SETUP_STAGE3
Definition: jesd204.h:207
ad9081_phy::adc_main_decimation
uint32_t adc_main_decimation[MAX_NUM_MAIN_DATAPATHS]
Definition: ad9081.h:115
ad9081_phy::rx_fddc_dcm
uint8_t rx_fddc_dcm[MAX_NUM_CHANNELIZER]
Definition: ad9081.h:123
JESD204_OP_CLOCKS_ENABLE
@ JESD204_OP_CLOCKS_ENABLE
Definition: jesd204.h:210
for_each_fddc
#define for_each_fddc(bit, mask)
Definition: ad9081.c:70
no_os_error.h
Error codes definition.
pr_debug
#define pr_debug(fmt, args...)
Definition: no_os_print_log.h:129
ad9081_phy::sysref_cmos_single_end_term_pos
uint8_t sysref_cmos_single_end_term_pos
Definition: ad9081.h:80
ad9081_remove
int32_t ad9081_remove(struct ad9081_phy *dev)
Definition: ad9081.c:1583
ad9081_init_param::jtx_link_rx
struct link_init_param * jtx_link_rx[2]
Definition: ad9081.h:207
ad9081_phy::tx_main_shift
int64_t tx_main_shift[MAX_NUM_MAIN_DATAPATHS]
Definition: ad9081.h:102
JESD204_OP_LINK_INIT
@ JESD204_OP_LINK_INIT
Definition: jesd204.h:198
ad9081_phy::rx_fddc_mxr_if
uint8_t rx_fddc_mxr_if[MAX_NUM_CHANNELIZER]
Definition: ad9081.h:117
JESD204_SYSREF_ONESHOT
@ JESD204_SYSREF_ONESHOT
Definition: jesd204.h:40
jesd204.h
jesd204_dev_is_top
bool jesd204_dev_is_top(struct jesd204_dev *jdev)
ad9081_init_param::spi_init
struct no_os_spi_init_param * spi_init
Definition: ad9081.h:155
ad9081_log_write
int32_t ad9081_log_write(void *user_data, int32_t log_type, const char *message, va_list argp)
Definition: ad9081.c:867
ad9081_phy::sysref_average_cnt_exp
uint32_t sysref_average_cnt_exp
Definition: ad9081.h:91
ad9081_init_param::rx_channel_digital_gain_6db_enable
uint8_t rx_channel_digital_gain_6db_enable[MAX_NUM_CHANNELIZER]
Definition: ad9081.h:203
ad9081_init_param::rx_channel_nco_mixer_mode
uint8_t rx_channel_nco_mixer_mode[MAX_NUM_CHANNELIZER]
Definition: ad9081.h:202
ad9081_phy::rx_cddc_shift
int64_t rx_cddc_shift[MAX_NUM_MAIN_DATAPATHS]
Definition: ad9081.h:114
ad9081_phy::nco_sync_ms_extra_lmfc_num
uint32_t nco_sync_ms_extra_lmfc_num
Definition: ad9081.h:89
ad9081_jesd_tx_link_status_print
int ad9081_jesd_tx_link_status_print(struct ad9081_phy *phy, struct jesd204_link *lnk, int retry)
Definition: ad9081.c:443
ad9081_init_param::dev_clk
struct no_os_clk * dev_clk
Definition: ad9081.h:158
JESD204_OP_DEVICE_INIT
@ JESD204_OP_DEVICE_INIT
Definition: jesd204.h:197
AD9081_PERI_SEL_SYNCINB1_N
#define AD9081_PERI_SEL_SYNCINB1_N
Definition: ad9081.c:59
ad9081_phy::rx_cddc_gain_6db_en
uint8_t rx_cddc_gain_6db_en[MAX_NUM_MAIN_DATAPATHS]
Definition: ad9081.h:125
ad9081_phy::rx_cddc_dcm
uint8_t rx_cddc_dcm[MAX_NUM_MAIN_DATAPATHS]
Definition: ad9081.h:116
ad9081_init_param::jesd_rx_clk
struct no_os_clk * jesd_rx_clk
Definition: ad9081.h:159
ad9081_phy::rx_nyquist_zone
uint32_t rx_nyquist_zone[MAX_NUM_MAIN_DATAPATHS]
Definition: ad9081.h:112
ad9081_phy::sysref_cmos_single_end_term_neg
uint8_t sysref_cmos_single_end_term_neg
Definition: ad9081.h:81
CHIPID_MASK
#define CHIPID_MASK
Definition: ad9081.c:63
ad9081_phy::dac_cache
struct dac_settings_cache dac_cache
Definition: ad9081.h:108
ad9081_phy::rx_fddc_c2r
uint8_t rx_fddc_c2r[MAX_NUM_CHANNELIZER]
Definition: ad9081.h:124
ad9081_init_param::tx_channel_interpolation
uint32_t tx_channel_interpolation
Definition: ad9081.h:185
CHIPID_AD9081
#define CHIPID_AD9081
Definition: ad9081.c:61
no_os_spi_desc::bit_order
enum no_os_spi_bit_order bit_order
Definition: no_os_spi.h:204
ad9081_phy::tx_chan_interp
uint32_t tx_chan_interp
Definition: ad9081.h:104
no_os_gpio_remove
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
JESD204_OP_LINK_ENABLE
@ JESD204_OP_LINK_ENABLE
Definition: jesd204.h:211
no_os_spi_desc
Structure holding SPI descriptor.
Definition: no_os_spi.h:192
ad9081_phy::ms_sync_en_gpio
struct no_os_gpio_desc * ms_sync_en_gpio
Definition: ad9081.h:72
ad9081_phy::adc_frequency_hz
uint64_t adc_frequency_hz
Definition: ad9081.h:111
no_os_gpio_desc
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:96
JESD204_ENCODER_64B66B
@ JESD204_ENCODER_64B66B
Definition: jesd204.h:31
ad9081_phy::tx_dac_chan_xbar_1x_non1x
uint8_t tx_dac_chan_xbar_1x_non1x[MAX_NUM_MAIN_DATAPATHS]
Definition: ad9081.h:101
ad9081_phy::jesd_tx_clk
struct no_os_clk * jesd_tx_clk
Definition: ad9081.h:74
ad9081_init_param::rx_channel_complex_to_real_enable
uint8_t rx_channel_complex_to_real_enable[MAX_NUM_CHANNELIZER]
Definition: ad9081.h:201
ad9081_phy::spi_desc
struct no_os_spi_desc * spi_desc
Definition: ad9081.h:70
ad9081_init_param::multidevice_instance_count
uint32_t multidevice_instance_count
Definition: ad9081.h:166
ad9081_phy::dev_clk
struct no_os_clk * dev_clk
Definition: ad9081.h:75
JESD204_STATE_CHANGE_ERROR
@ JESD204_STATE_CHANGE_ERROR
Definition: jesd204.h:44
ad9081_init_param::sysref_cmos_single_end_term_pos
uint8_t sysref_cmos_single_end_term_pos
Definition: ad9081.h:164
ad9081_init_param::tx_channel_nco_frequency_shift_hz
int64_t tx_channel_nco_frequency_shift_hz[MAX_NUM_CHANNELIZER]
Definition: ad9081.h:186
AD9081_PERI_SEL_SYNCINB1_P
#define AD9081_PERI_SEL_SYNCINB1_P
Definition: ad9081.c:58
ad9081_init_param::master_slave_sync_gpio_num
uint8_t master_slave_sync_gpio_num
Definition: ad9081.h:161
ad9081_phy::sysref_cmos_input_en
bool sysref_cmos_input_en
Definition: ad9081.h:79
ad9081_init_param::tx_main_nco_frequency_shift_hz
int64_t tx_main_nco_frequency_shift_hz[MAX_NUM_MAIN_DATAPATHS]
Definition: ad9081.h:180
ad9081_phy::config_sync_01_swapped
bool config_sync_01_swapped
Definition: ad9081.h:86
no_os_gpio_get
int32_t no_os_gpio_get(struct no_os_gpio_desc **desc, const struct no_os_gpio_init_param *param)
Obtain the GPIO decriptor.
Definition: no_os_gpio.c:49
ad9081_init_param::tx_dac_channel_crossbar_select
uint8_t tx_dac_channel_crossbar_select[MAX_NUM_MAIN_DATAPATHS]
Definition: ad9081.h:181
for_each_cddc
#define for_each_cddc(bit, mask)
Definition: ad9081.c:65
ad9081_init
int32_t ad9081_init(struct ad9081_phy **device, const struct ad9081_init_param *init_param)
Definition: ad9081.c:1419
ad9081_phy::tx_main_interp
uint32_t tx_main_interp
Definition: ad9081.h:99
ad9081_phy::gpio_reset
struct no_os_gpio_desc * gpio_reset
Definition: ad9081.h:71
ad9081_init_param::sysref_cmos_input_enable
bool sysref_cmos_input_enable
Definition: ad9081.h:163
FRAMER_LINK1_RX
#define FRAMER_LINK1_RX
Definition: ad9081.h:237
ad9081_phy::rx_fddc_select
uint8_t rx_fddc_select
Definition: ad9081.h:127
NO_OS_BIT
#define NO_OS_BIT(x)
Definition: no_os_util.h:45
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:69
ad9081_phy::rx_fddc_shift
int64_t rx_fddc_shift[MAX_NUM_CHANNELIZER]
Definition: ad9081.h:121
NO_OS_SPI_BIT_ORDER_MSB_FIRST
@ NO_OS_SPI_BIT_ORDER_MSB_FIRST
Definition: no_os_spi.h:76
ad9081_init_param::tx_maindp_dac_1x_non1x_crossbar_select
uint8_t tx_maindp_dac_1x_non1x_crossbar_select[MAX_NUM_MAIN_DATAPATHS]
Definition: ad9081.h:182
FRAMER_LINK0_RX
#define FRAMER_LINK0_RX
Definition: ad9081.h:236
jesd204_dev_register
int jesd204_dev_register(struct jesd204_dev **jdev, const struct jesd204_dev_data *dev_data)
ad9081_phy::tx_chan_shift
int64_t tx_chan_shift[MAX_NUM_CHANNELIZER]
Definition: ad9081.h:105
ad9081_phy::jesd_rx_clk
struct no_os_clk * jesd_rx_clk
Definition: ad9081.h:73
ad9081_init
int32_t ad9081_init(struct ad9081_phy **dev, const struct ad9081_init_param *init_param)
Definition: ad9081.c:1419
ad9081_init_param::rx_cddc_nco_channel_select_mode
uint8_t rx_cddc_nco_channel_select_mode[MAX_NUM_MAIN_DATAPATHS]
Definition: ad9081.h:205
no_os_udelay
void no_os_udelay(uint32_t usecs)
Wait until usecs microseconds passed.
Definition: aducm3029_delay.c:114
ad9081_phy::multidevice_instance_count
uint32_t multidevice_instance_count
Definition: ad9081.h:85
COUPLING_AC
@ COUPLING_AC
Definition: api_def.h:201
ad9081_init_param
Definition: ad9081.h:154
ad9081_phy
Definition: ad9081.h:69
adi_ad9081_device_gpio_set_highz
int adi_ad9081_device_gpio_set_highz(adi_ad9081_device_t *device, uint8_t gpio_index)
Definition: ad9081.c:193
ad9081_init_param::ms_sync_enable
struct no_os_gpio_init_param * ms_sync_enable
Definition: ad9081.h:157
MAX_NUM_MAIN_DATAPATHS
#define MAX_NUM_MAIN_DATAPATHS
Definition: ad9081.h:50
no_os_gpio_set_value
int32_t no_os_gpio_set_value(struct no_os_gpio_desc *desc, uint8_t value)
Set the value of the specified GPIO.
Definition: no_os_gpio.c:197
init_param
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
JESD204_OP_OPT_SETUP_STAGE2
@ JESD204_OP_OPT_SETUP_STAGE2
Definition: jesd204.h:206
ad9081_phy::rx_cddc_select
uint8_t rx_cddc_select
Definition: ad9081.h:119
ad9081_phy::jrx_link_tx
struct ad9081_jesd_link jrx_link_tx[2]
Definition: ad9081.h:83
ad9081_phy::ad9081
adi_ad9081_device_t ad9081
Definition: ad9081.h:82
jesd204_link_get_rate_khz
int jesd204_link_get_rate_khz(struct jesd204_link *lnk, unsigned long *lane_rate_khz)
ad9081_init_param::tx_full_scale_current_ua
uint32_t tx_full_scale_current_ua[MAX_NUM_MAIN_DATAPATHS]
Definition: ad9081.h:183
JESD204_STATE_CHANGE_DONE
@ JESD204_STATE_CHANGE_DONE
Definition: jesd204.h:46
ad9081_init_param::sysref_coupling_ac_en
bool sysref_coupling_ac_en
Definition: ad9081.h:162
ad9081_remove
int32_t ad9081_remove(struct ad9081_phy *device)
Definition: ad9081.c:1583
ad9081_phy::tx_disable
bool tx_disable
Definition: ad9081.h:94
JESD204_SYSREF_CONTINUOUS
@ JESD204_SYSREF_CONTINUOUS
Definition: jesd204.h:39
ad9081_phy::rx_cddc_nco_channel_select_mode
uint8_t rx_cddc_nco_channel_select_mode[MAX_NUM_MAIN_DATAPATHS]
Definition: ad9081.h:128
ad9081_phy::sync_ms_gpio_num
uint8_t sync_ms_gpio_num
Definition: ad9081.h:77
ad9081_init_param::jesd_tx_clk
struct no_os_clk * jesd_tx_clk
Definition: ad9081.h:160
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:116
JESD_SUBCLASS_1
@ JESD_SUBCLASS_1
Definition: api_def.h:252
ad9081_phy::rx_fddc_gain_6db_en
uint8_t rx_fddc_gain_6db_en[MAX_NUM_CHANNELIZER]
Definition: ad9081.h:126
ad9081_phy::adc_dcm
uint32_t adc_dcm[2]
Definition: ad9081.h:110
no_os_gpio.h
Header file of GPIO Interface.
ad9081_init_param::lmfc_delay_dac_clk_cycles
uint32_t lmfc_delay_dac_clk_cycles
Definition: ad9081.h:169
ad9081_jesd204_priv::phy
struct ad9081_phy * phy
Definition: ad9081.c:75
MAX_NUM_CHANNELIZER
#define MAX_NUM_CHANNELIZER
Definition: ad9081.h:51
ad9081.h
Header file of AD9081 Driver.
ad9081_jesd204_uninit
int ad9081_jesd204_uninit(struct jesd204_dev *jdev, enum jesd204_state_op_reason reason)
Definition: ad9081.c:1174
ad9081_init_param::sysref_average_cnt_exp
uint32_t sysref_average_cnt_exp
Definition: ad9081.h:172
ad9081_phy::config_sync_0a_cmos_en
bool config_sync_0a_cmos_en
Definition: ad9081.h:87
dac_settings_cache
Definition: ad9081.h:65
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:52
ad9081_reset_pin_ctrl
int32_t ad9081_reset_pin_ctrl(void *user_data, uint8_t enable)
Definition: ad9081.c:824
ad9081_phy::rx_ffh_gpio_mux_sel
uint8_t rx_ffh_gpio_mux_sel[6]
Definition: ad9081.h:129
ad9081_phy::tx_dac_fsc
uint32_t tx_dac_fsc[MAX_NUM_MAIN_DATAPATHS]
Definition: ad9081.h:106
no_os_util.h
Header file of utility functions.
ad9081_init_param::jesd_sync_pins_01_swap_enable
bool jesd_sync_pins_01_swap_enable
Definition: ad9081.h:167
CHIPID_AD9082
#define CHIPID_AD9082
Definition: ad9081.c:62
ad9081_jesd204_priv
Definition: ad9081.c:74
JESD204_OP_LINK_RUNNING
@ JESD204_OP_LINK_RUNNING
Definition: jesd204.h:212
ad9081_init_param::config_sync_0a_cmos_enable
bool config_sync_0a_cmos_enable
Definition: ad9081.h:168
ad9081_init_param::continuous_sysref_mode_disable
bool continuous_sysref_mode_disable
Definition: ad9081.h:173
no_os_gpio_direction_output
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
ad9081_phy::dac_frequency_hz
uint64_t dac_frequency_hz
Definition: ad9081.h:97
no_os_clk_recalc_rate
int32_t no_os_clk_recalc_rate(struct no_os_clk_desc *desc, uint64_t *rate)
ad9081_init_param::rx_disable
bool rx_disable
Definition: ad9081.h:175
jesd204_dev_data
JESD204 device initialization data.
Definition: jesd204.h:227
ad9081_phy::tx_ffh_hopf_via_gpio_en
bool tx_ffh_hopf_via_gpio_en
Definition: ad9081.h:107
SYSREF_ONESHOT
@ SYSREF_ONESHOT
Definition: api_def.h:223
ad9081_phy::lmfc_delay
uint32_t lmfc_delay
Definition: ad9081.h:88
ad9081_init_param::adc_frequency_hz
uint64_t adc_frequency_hz
Definition: ad9081.h:190
ad9081_phy::sysref_continuous_dis
bool sysref_continuous_dis
Definition: ad9081.h:92
ad9081_phy::nco_sync_direct_sysref_mode_en
bool nco_sync_direct_sysref_mode_en
Definition: ad9081.h:90
DEFRAMER_LINK1_TX
#define DEFRAMER_LINK1_TX
Definition: ad9081.h:235
ad9081_phy::jdev
struct jesd204_dev * jdev
Definition: ad9081.h:76
chip_id
chip_id
Definition: ad9172.h:51
no_os_spi_init_param
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:140
no_os_gpio_get_optional
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