Go to the documentation of this file.
55 #define AD6673_READ (1 << 15)
56 #define AD6673_WRITE (0 << 15)
57 #define AD6673_CNT(x) ((((x) & 0x3) - 1) << 13)
58 #define AD6673_ADDR(x) ((x) & 0xFF)
60 #define AD6673_R1B (1 << 8)
61 #define AD6673_R2B (2 << 8)
62 #define AD6673_R3B (3 << 8)
63 #define AD6673_TRANSF_LEN(x) (((x) >> 8) & 0xFF)
64 #define SHADOW(x) ((x) << 16)
67 #define AD6673_REG_SPI_CFG (AD6673_R1B | 0x00)
68 #define AD6673_REG_CHIP_ID (AD6673_R1B | 0x01)
69 #define AD6673_REG_CHIP_INFO (AD6673_R1B | 0x02)
72 #define AD6673_REG_CH_INDEX (AD6673_R1B | 0x05)
73 #define AD6673_REG_DEVICE_UPDATE (AD6673_R1B | 0xFF)
76 #define AD6673_REG_PDWN (AD6673_R1B | 0x08)
77 #define AD6673_REG_CLOCK (AD6673_R1B | 0x09 | SHADOW(1))
78 #define AD6673_REG_PLL_STAT (AD6673_R1B | 0x0A)
79 #define AD6673_REG_CLOCK_DIV (AD6673_R1B | 0x0B | SHADOW(2))
80 #define AD6673_REG_TEST (AD6673_R1B | 0x0D | SHADOW(3))
81 #define AD6673_REG_BIST (AD6673_R1B | 0x0E | SHADOW(4))
82 #define AD6673_REG_OFFSET (AD6673_R1B | 0x10 | SHADOW(5))
83 #define AD6673_REG_OUT_MODE (AD6673_R1B | 0x14 | SHADOW(6))
84 #define AD6673_REG_CML (AD6673_R1B | 0x15)
85 #define AD6673_REG_VREF (AD6673_R1B | 0x18 | SHADOW(7))
86 #define AD6673_REG_USER_TEST1 (AD6673_R2B | 0x1A)
87 #define AD6673_REG_USER_TEST2 (AD6673_R2B | 0x1C)
88 #define AD6673_REG_USER_TEST3 (AD6673_R2B | 0x1E)
89 #define AD6673_REG_USER_TEST4 (AD6673_R2B | 0x20)
90 #define AD6673_REG_PLL_ENCODE (AD6673_R1B | 0x21)
91 #define AD6673_REG_BIST_MISR (AD6673_R2B | 0x25)
92 #define AD6673_REG_SYS_CTRL (AD6673_R1B | 0x3A | SHADOW(8))
93 #define AD6673_REG_NSR_CTRL (AD6673_R1B | 0x3C | SHADOW(9))
94 #define AD6673_REG_NSR_TUNING (AD6673_R1B | 0x3E | SHADOW(10))
95 #define AD6673_REG_DCC_CTRL (AD6673_R1B | 0x40 | SHADOW(11))
96 #define AD6673_REG_DCC_VAL (AD6673_R2B | 0x42 | SHADOW(12))
97 #define AD6673_REG_FAST_DETECT (AD6673_R1B | 0x45 | SHADOW(13))
98 #define AD6673_REG_FD_UPPER_THD (AD6673_R2B | 0x48 | SHADOW(14))
99 #define AD6673_REG_FD_LOWER_THD (AD6673_R2B | 0x4A | SHADOW(15))
100 #define AD6673_REG_FD_DWELL_TIME (AD6673_R2B | 0x4C | SHADOW(16))
101 #define AD6673_REG_204B_QUICK_CFG (AD6673_R1B | 0x5E)
102 #define AD6673_REG_204B_CTRL1 (AD6673_R1B | 0x5F)
103 #define AD6673_REG_204B_CTRL2 (AD6673_R1B | 0x60)
104 #define AD6673_REG_204B_CTRL3 (AD6673_R1B | 0x61)
105 #define AD6673_REG_204B_DID_CFG (AD6673_R1B | 0x64)
106 #define AD6673_REG_204B_BID_CFG (AD6673_R1B | 0x65)
107 #define AD6673_REG_204B_LID_CFG1 (AD6673_R1B | 0x67)
108 #define AD6673_REG_204B_LID_CFG2 (AD6673_R1B | 0x68)
109 #define AD6673_REG_204B_PARAM_SCR_L (AD6673_R1B | 0x6E)
110 #define AD6673_REG_204B_PARAM_F (AD6673_R1B | 0x6F)
111 #define AD6673_REG_204B_PARAM_K (AD6673_R1B | 0x70)
112 #define AD6673_REG_204B_PARAM_M (AD6673_R1B | 0x71)
113 #define AD6673_REG_204B_PARAM_CS_N (AD6673_R1B | 0x72)
114 #define AD6673_REG_204B_PARAM_NP (AD6673_R1B | 0x73)
115 #define AD6673_REG_204B_PARAM_S (AD6673_R1B | 0x74)
116 #define AD6673_REG_204B_PARAM_HD_CF (AD6673_R1B | 0x75)
117 #define AD6673_REG_204B_RESV1 (AD6673_R1B | 0x76)
118 #define AD6673_REG_204B_RESV2 (AD6673_R1B | 0x77)
119 #define AD6673_REG_204B_CHKSUM0 (AD6673_R1B | 0x79)
120 #define AD6673_REG_204B_CHKSUM1 (AD6673_R1B | 0x7A)
121 #define AD6673_REG_204B_LANE_ASSGN1 (AD6673_R1B | 0x82)
122 #define AD6673_REG_204B_LANE_ASSGN2 (AD6673_R1B | 0x83)
123 #define AD6673_REG_204B_LMFC_OFFSET (AD6673_R1B | 0x8B)
124 #define AD6673_REG_204B_PRE_EMPHASIS (AD6673_R1B | 0xA8)
127 #define AD6673_SPI_CFG_LSB_FIRST ((1 << 6) | (1 << 1))
128 #define AD6673_SPI_CFG_SOFT_RST ((1 << 5) | (1 << 2))
131 #define AD6673_CH_INDEX_ADC_A (1 << 0)
132 #define AD6673_CH_INDEX_ADC_B (1 << 1)
135 #define AD6673_DEVICE_UPDATE_SW (1 << 0)
138 #define AD6673_PDWN_EXTERN (1 << 5)
139 #define AD6673_PDWN_JTX (1 << 4)
140 #define AD6673_PDWN_JESD204B(x) (((x) & 0x3) << 2)
141 #define AD6673_PDWN_CHIP(x) (((x) & 0x3) << 0)
144 #define AD6673_CLOCK_SELECTION(x) (((x) & 0x3) << 4)
145 #define AD6673_CLOCK_DUTY_CYCLE (1 << 0)
148 #define AD6673_PLL_STAT_LOCKED (1 << 7)
149 #define AD6673_PLL_STAT_204B_LINK_RDY (1 << 0)
152 #define AD6673_CLOCK_DIV_PHASE(x) (((x) & 0x7) << 3)
153 #define AD6673_CLOCK_DIV_RATIO(x) (((x) & 0x7) << 0)
156 #define AD6673_TEST_USER_TEST_MODE(x) (((x) & 0x3) << 6)
157 #define AD6673_TEST_RST_PN_LONG (1 << 5)
158 #define AD6673_TEST_RST_PN_SHOR (1 << 4)
159 #define AD6673_TEST_OUTPUT_TEST(x) (((x) & 0xF) << 0)
162 #define AD6673_BIST_RESET (1 << 2)
163 #define AD6673_BIST_ENABLE (1 << 0)
166 #define AD6673_REG_OFFSET_ADJUST(x) (((x) & 0x3F) << 0)
169 #define AD6673_OUT_MODE_JTX_BIT_ASSIGN(x) (((x) & 0x7) << 5)
170 #define AD6673_OUT_MODE_DISABLE (1 << 4)
171 #define AD6673_OUT_MODE_INVERT_DATA (1 << 3)
172 #define AD6673_OUT_MODE_DATA_FORMAT(x) (((x) & 0x1) << 0)
175 #define AD6673_CML_DIFF_OUT_LEVEL(x) (((x) & 0x7) << 0)
178 #define AD6673_VREF_FS_ADJUST(x) (((x) & 0x1F) << 0)
181 #define AD6673_PLL_ENCODE(x) (((x) & 0x3) << 3)
184 #define AD6673_SYS_CTRL_REALIGN_ON_SYNCINB (1 << 4)
185 #define AD6673_SYS_CTRL_REALIGN_ON_SYSREF (1 << 3)
186 #define AD6673_SYS_CTRL_SYSREF_MODE (1 << 2)
187 #define AD6673_SYS_CTRL_SYSREF_EN (1 << 1)
188 #define AD6673_SYS_CTRL_SYNCINB_EN (1 << 0)
191 #define AD6673_NSR_CTRL_BW_MODE (1 << 1)
192 #define AD6673_NSR_CTRL_ENABLE (1 << 0)
195 #define AD6673_NSR_TUNING(x) (((x) & 0x3F) << 0)
198 #define AD6673_DCC_CTRL_FREEZE_DCC (1 << 6)
199 #define AD6673_DCC_CTRL_DCC_BW(x) (((x) & 0xF) << 2)
200 #define AD6673_DCC_CTRL_DCC_EN (1 << 1)
203 #define AD6673_FAST_DETECT_PIN_FCT (1 << 4)
204 #define AD6673_FAST_DETECT_FORCE_FDA_FDB_PIN (1 << 3)
205 #define AD6673_FAST_DETECT_FORCE_FDA_FDB_VAL (1 << 2)
206 #define AD6673_FAST_DETECT_OUTPUT_ENABLE (1 << 0)
209 #define AD6673_204B_QUICK_CFG(x) (((x) & 0xFF) << 0)
212 #define AD6673_204B_CTRL1_TAIL_BITS (1 << 6)
213 #define AD6673_204B_CTRL1_TEST_SAMPLE_EN (1 << 5)
214 #define AD6673_204B_CTRL1_ILAS_MODE(x) (((x) & 0x3) << 2)
215 #define AD6673_204B_CTRL1_POWER_DOWN (1 << 0)
218 #define AD6673_204B_CTRL2_INVERT_JESD_BITS (1 << 1)
221 #define AD6673_204B_CTRL3_TEST_DATA_INJ_PT(x) (((x) & 0x3) << 4)
222 #define AD6673_204B_CTRL3_JESD_TEST_MODE(x) (((x) & 0xF) << 0)
225 #define AD6673_204B_PARAM_SCR_L_SCRAMBLING (1 << 7)
226 #define AD6673_204B_PARAM_SCR_L_LANES (1 << 0)
229 #define AD6673_204B_PARAM_CS_N_NR_CTRL_BITS(x) (((x) & 0x3) << 6)
230 #define AD6673_204B_PARAM_CS_N_ADC_RESOLUTION(x) (((x) & 0xF) << 0)
233 #define AD6673_204B_PARAM_NP_JESD_SUBCLASS(x) (((x) & 0x3) << 5)
234 #define AD6673_204B_PARAM_NP_JESD_N_VAL(x) (((x) & 0xF) << 0)
237 #define AD6673_204B_PARAM_S(x) (((x) << 0x1F) << 0)
240 #define AD6673_204B_PARAM_HD_CF_HD_VAL (1 << 7)
241 #define AD6673_204B_PARAM_HD_CF_CF_VAL(x) (((x) & 0x1F) << 0)
244 #define AD6673_204B_LANE_ASSGN1(x) (((x) & 0x3) << 4)
247 #define AD6673_204B_LANE_ASSGN2(x) (((x) &0x3) << 0)
250 #define AD6673_204B_LMFC_OFFSET(x) (((x) & 0x1F) << 0)
547 int32_t register_address);
550 int32_t register_address,
551 int32_t register_value);
586 int32_t user_pattern);
#define AD6673_REG_PLL_ENCODE
Definition: ad6673.h:90
int32_t ad6673_output_disable(struct ad6673_dev *dev, int32_t en)
Disables (1) or enables (0) the data output. Note: This function modifies a shadowed register,...
Definition: ad6673.c:551
@ AD6673_SHD_REG_CLOCK
Definition: ad6673.h:504
int16_t fd_lower_tresh
Definition: ad6673.h:486
int8_t en_fd
Definition: ad6673.h:464
#define AD6673_FAST_DETECT_FORCE_FDA_FDB_VAL
Definition: ad6673.h:205
#define AD6673_REG_204B_CTRL1
Definition: ad6673.h:102
@ AD6673_REG_SHD_NSR_CTRL
Definition: ad6673.h:512
uint32_t timeout
Definition: ad413x.c:55
int32_t ad6673_write(struct ad6673_dev *dev, int32_t register_address, int32_t register_value)
Writes a value to the selected register.
Definition: ad6673.c:250
#define AD6673_CML_DIFF_OUT_LEVEL(x)
Definition: ad6673.h:175
#define AD6673_NSR_CTRL_ENABLE
Definition: ad6673.h:192
#define AD6673_204B_QUICK_CFG(x)
Definition: ad6673.h:209
shadow_registers
Definition: ad6673.h:503
#define SHADOW(x)
Definition: ad6673.h:64
@ AD6673_SHD_REG_SYS_CTRL
Definition: ad6673.h:511
int32_t ad6673_dcc_enable(struct ad6673_dev *dev, int32_t enable)
Enables DC correction for use in the output data signal path.
Definition: ad6673.c:1213
int32_t ad6673_nsr_bandwidth_mode(struct ad6673_dev *dev, int32_t mode)
Selects the NSR Bandwidth mode.
Definition: ad6673.c:1343
int32_t ad6673_jesd204b_invert_logic(struct ad6673_dev *dev, int32_t invert)
Inverts the logic of JESD204B bits.
Definition: ad6673.c:1137
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:165
Header file of AD6673 Driver Configuration.
#define AD6673_REG_204B_QUICK_CFG
Definition: ad6673.h:101
int32_t ad6673_output_invert(struct ad6673_dev *dev, int32_t invert)
Activates the inverted (1) or normal (0) output mode. Note: This function modifies a shadowed registe...
Definition: ad6673.c:586
int8_t ctrl_bits_assign
Definition: ad6673.h:367
#define AD6673_REG_FD_LOWER_THD
Definition: ad6673.h:99
struct ad6673_platform_data * pdata
Definition: ad6673.h:498
Header file of SPI Interface.
int32_t ad6673_dcc_enable(struct ad6673_dev *dev, int32_t enable)
Enables DC correction for use in the output data signal path.
Definition: ad6673.c:1213
#define AD6673_TEST_RST_PN_SHOR
Definition: ad6673.h:158
#define AD6673_REG_204B_PARAM_K
Definition: ad6673.h:111
#define AD6673_REG_204B_BID_CFG
Definition: ad6673.h:106
#define AD6673_REG_FAST_DETECT
Definition: ad6673.h:97
#define AD6673_204B_CTRL1_TEST_SAMPLE_EN
Definition: ad6673.h:213
#define AD6673_204B_PARAM_CS_N_NR_CTRL_BITS(x)
Definition: ad6673.h:229
struct ad6673_state ad6673_st
Definition: ad6673.h:527
int32_t ad6673_output_invert(struct ad6673_dev *dev, int32_t invert)
Activates the inverted (1) or normal (0) output mode. Note: This function modifies a shadowed registe...
Definition: ad6673.c:586
#define AD6673_REG_PDWN
Definition: ad6673.h:76
int32_t ad6673_reset_pn9(struct ad6673_dev *dev, int32_t rst)
Sets (1) or clears (0) the reset short PN sequence bit(PN9).
Definition: ad6673.c:654
@ AD6673_SHD_REG_DCC_VAL
Definition: ad6673.h:515
int32_t ad6673_nsr_enable(struct ad6673_dev *dev, int32_t enable)
Enables the Noise shaped requantizer(NRS).
Definition: ad6673.c:1311
int8_t pin_function
Definition: ad6673.h:470
int32_t ad6673_nsr_tuning_freq(int64_t tune_freq, int64_t f_adc, struct ad6673_type_band *p_band)
Sets the NSR frequency range.
Definition: ad6673.c:1376
#define AD6673_REG_204B_CTRL2
Definition: ad6673.h:103
int32_t ad6673_dcc_bandwidth(struct ad6673_dev *dev, int32_t bw)
Selects the bandwidth value for the DC correction circuit.
Definition: ad6673.c:1247
int32_t ad6673_bist_enable(struct ad6673_dev *dev, int32_t enable)
Enables the Build-In-Self-Test.
Definition: ad6673.c:739
#define AD6673_REG_OUT_MODE
Definition: ad6673.h:83
int32_t ad6673_soft_reset(struct ad6673_dev *dev)
Resets all registers to their default values.
Definition: ad6673.c:326
#define AD6673_BIST_RESET
Definition: ad6673.h:162
#define AD6673_REG_NSR_CTRL
Definition: ad6673.h:93
#define AD6673_204B_CTRL3_TEST_DATA_INJ_PT(x)
Definition: ad6673.h:221
int32_t ad6673_select_channel_for_config(struct ad6673_dev *dev, int32_t channel)
Selects a channel as the current channel for further configurations.
Definition: ad6673.c:451
int8_t bid
Definition: ad6673.h:377
enum no_os_spi_mode mode
Definition: no_os_spi.h:139
#define AD6673_PLL_ENCODE(x)
Definition: ad6673.h:181
@ AD6673_SHD_REG_CLOCK_DIV
Definition: ad6673.h:505
#define AD6673_READ
Definition: ad6673.h:55
const int32_t shadow_regs[SHADOW_REGISTER_COUNT]
Definition: ad9250.c:51
struct ad6673_jesd204b_cfg ad6673_jesd204b_interface
Definition: ad6673_cfg.h:61
Definition: ad9361_util.h:75
@ AD6673_REG_SHD_NSR_TUNING
Definition: ad6673.h:513
#define AD6673_REG_CLOCK_DIV
Definition: ad6673.h:79
int32_t ad6673_reset_pn23(struct ad6673_dev *dev, int32_t rst)
Sets (1) or clears (0) the reset long PN sequence bit(PN23).
Definition: ad6673.c:686
int8_t did
Definition: ad6673.h:375
int32_t ad6673_fast_detect_setup(struct ad6673_dev *dev)
Configures the Fast-Detect module.
Definition: ad6673.c:1166
int32_t ad6673_set_bits_to_reg(struct ad6673_dev *dev, uint32_t register_address, uint8_t bits_value, uint8_t mask)
Sets a bit/group of bits inside a register without modifying other bits.
Definition: ad6673.c:361
#define AD6673_CLOCK_DIV_PHASE(x)
Definition: ad6673.h:152
struct no_os_spi_init_param spi_init
Definition: ad6673.h:533
#define AD6673_PDWN_EXTERN
Definition: ad6673.h:138
int32_t ad6673_reset_pn9(struct ad6673_dev *dev, int32_t rst)
Sets (1) or clears (0) the reset short PN sequence bit(PN9).
Definition: ad6673.c:654
#define AD6673_BIST_ENABLE
Definition: ad6673.h:163
#define AD6673_CLOCK_SELECTION(x)
Definition: ad6673.h:144
int32_t ad6673_chip_pwr_mode(struct ad6673_dev *dev, int32_t mode)
Configures the power mode of the chip.
Definition: ad6673.c:418
#define AD6673_SYS_CTRL_SYSREF_EN
Definition: ad6673.h:187
#define AD6673_DCC_CTRL_FREEZE_DCC
Definition: ad6673.h:198
int32_t ad6673_jesd204b_test_mode(struct ad6673_dev *dev, int32_t test_mode)
Selects a JESD204B test mode.
Definition: ad6673.c:1105
#define AD6673_WRITE
Definition: ad6673.h:56
int32_t ad6673_jesd204b_select_test_injection_point(struct ad6673_dev *dev, int32_t inj_point)
Selects the point in the processing path of a lane, where the test data will be inserted.
Definition: ad6673.c:1064
int32_t ad6673_bist_enable(struct ad6673_dev *dev, int32_t enable)
Enables the Build-In-Self-Test.
Definition: ad6673.c:739
#define AD6673_204B_CTRL1_POWER_DOWN
Definition: ad6673.h:215
int32_t ad6673_output_format(struct ad6673_dev *dev, int32_t format)
Specifies the output format. Note: This function modifies a shadowed register, therefore a call of ad...
Definition: ad6673.c:622
int32_t ad6673_read(struct ad6673_dev *dev, int32_t register_address)
Reads the value of the selected register.
Definition: ad6673.c:213
#define AD6673_REG_CH_INDEX
Definition: ad6673.h:72
#define AD6673_REG_USER_TEST1
Definition: ad6673.h:86
#define AD6673_SYS_CTRL_REALIGN_ON_SYSREF
Definition: ad6673.h:185
int32_t ad6673_remove(struct ad6673_dev *dev)
Free the resources allocated by ad6673_setup().
Definition: ad6673.c:194
int8_t lane0_assign
Definition: ad6673.h:446
int8_t subclass
Definition: ad6673.h:350
@ SHADOW_REGISTER_COUNT
Definition: ad6673.h:520
int8_t lid0
Definition: ad6673.h:379
#define AD6673_DEVICE_UPDATE_SW
Definition: ad6673.h:135
int8_t align_sys_ref
Definition: ad6673.h:440
int8_t force_pins
Definition: ad6673.h:476
int32_t ad6673_jesd204b_setup(struct ad6673_dev *dev)
Configures the JESD204B interface.
Definition: ad6673.c:838
int32_t ad6673_dcc_bandwidth(struct ad6673_dev *dev, int32_t bw)
Selects the bandwidth value for the DC correction circuit.
Definition: ad6673.c:1247
@ AD6673_SHD_REG_OFFSET
Definition: ad6673.h:508
int8_t lane1_assign
Definition: ad6673.h:451
#define AD6673_DCC_CTRL_DCC_BW(x)
Definition: ad6673.h:199
#define AD6673_REG_BIST
Definition: ad6673.h:81
#define AD6673_CLOCK_DUTY_CYCLE
Definition: ad6673.h:145
#define AD6673_REG_FD_DWELL_TIME
Definition: ad6673.h:100
int32_t ad6673_is_shadow_register(int32_t register_address)
Checks if the register is shadowed.
Definition: ad6673.c:402
int32_t ad6673_select_channel_for_config(struct ad6673_dev *dev, int32_t channel)
Selects a channel as the current channel for further configurations.
Definition: ad6673.c:451
#define AD6673_REG_204B_PARAM_SCR_L
Definition: ad6673.h:109
int8_t jtx_in_standby
Definition: ad6673.h:327
#define AD6673_OUT_MODE_INVERT_DATA
Definition: ad6673.h:171
#define AD6673_REG_204B_LANE_ASSGN2
Definition: ad6673.h:122
int32_t ad6673_output_format(struct ad6673_dev *dev, int32_t format)
Specifies the output format. Note: This function modifies a shadowed register, therefore a call of ad...
Definition: ad6673.c:622
int8_t ilas_mode
Definition: ad6673.h:398
int32_t ad6673_read(struct ad6673_dev *dev, int32_t register_address)
Reads the value of the selected register.
Definition: ad6673.c:213
#define AD6673_204B_CTRL1_ILAS_MODE(x)
Definition: ad6673.h:214
@ AD6673_SHD_REG_OUT_MODE
Definition: ad6673.h:509
@ AD6673_SHD_REG_FD_DWELL_TIME
Definition: ad6673.h:519
int32_t ad6673_test_mode(struct ad6673_dev *dev, int32_t mode)
Sets the ADC's test mode.
Definition: ad6673.c:491
int32_t ad6673_jesd204b_invert_logic(struct ad6673_dev *dev, int32_t invert)
Inverts the logic of JESD204B bits.
Definition: ad6673.c:1137
int32_t ad6673_offset_adj(struct ad6673_dev *dev, int32_t adj)
Sets the offset adjustment.
Definition: ad6673.c:521
#define AD6673_TRANSF_LEN(x)
Definition: ad6673.h:63
#define AD6673_TEST_OUTPUT_TEST(x)
Definition: ad6673.h:159
struct ad6673_fast_detect_cfg * p_fd
Definition: ad6673.h:500
#define AD6673_FAST_DETECT_OUTPUT_ENABLE
Definition: ad6673.h:206
#define AD6673_REG_204B_LID_CFG2
Definition: ad6673.h:108
@ AD6673_SHD_REG_FD_LOWER_THD
Definition: ad6673.h:518
int8_t align_sync_in_b
Definition: ad6673.h:434
#define AD6673_204B_CTRL1_TAIL_BITS
Definition: ad6673.h:212
Structure holding SPI descriptor.
Definition: no_os_spi.h:177
Header file of AD6673 Driver.
#define AD6673_VREF_FS_ADJUST(x)
Definition: ad6673.h:178
#define AD6673_CH_INDEX_ADC_A
Definition: ad6673.h:131
int8_t invert_logic_bits
Definition: ad6673.h:410
#define AD6673_REG_DCC_CTRL
Definition: ad6673.h:95
int8_t scrambling
Definition: ad6673.h:392
#define AD6673_204B_PARAM_SCR_L_SCRAMBLING
Definition: ad6673.h:225
int16_t fd_upper_tresh
Definition: ad6673.h:484
#define AD6673_NSR_CTRL_BW_MODE
Definition: ad6673.h:191
@ AD6673_SHD_REG_BIST
Definition: ad6673.h:507
int32_t ad6673_transfer(struct ad6673_dev *dev)
Initiates a transfer and waits for the operation to end. Note: This function may be called after a sh...
Definition: ad6673.c:294
int32_t ad6673_output_disable(struct ad6673_dev *dev, int32_t en)
Disables (1) or enables (0) the data output. Note: This function modifies a shadowed register,...
Definition: ad6673.c:551
#define AD6673_SYS_CTRL_SYNCINB_EN
Definition: ad6673.h:188
int32_t ad6673_soft_reset(struct ad6673_dev *dev)
Resets all registers to their default values.
Definition: ad6673.c:326
#define AD6673_REG_DEVICE_UPDATE
Definition: ad6673.h:73
#define AD6673_REG_204B_LANE_ASSGN1
Definition: ad6673.h:121
int32_t ad6673_remove(struct ad6673_dev *dev)
Free the resources allocated by ad6673_setup().
Definition: ad6673.c:194
int32_t ad6673_bist_reset(struct ad6673_dev *dev, int32_t reset)
Resets the Build-In-Self-Test.
Definition: ad6673.c:769
@ AD6673_SHD_REG_TEST
Definition: ad6673.h:506
#define AD6673_PDWN_CHIP(x)
Definition: ad6673.h:141
#define AD6673_FAST_DETECT_PIN_FCT
Definition: ad6673.h:203
int8_t sys_ref_mode
Definition: ad6673.h:428
#define AD6673_REG_SYS_CTRL
Definition: ad6673.h:92
int32_t f0
Definition: ad6673.h:492
#define AD6673_REG_FD_UPPER_THD
Definition: ad6673.h:98
@ AD6673_SHD_REG_DCC_CTRL
Definition: ad6673.h:514
int32_t ad6673_bist_reset(struct ad6673_dev *dev, int32_t reset)
Resets the Build-In-Self-Test.
Definition: ad6673.c:769
void * no_os_malloc(size_t size)
Allocate memory and return a pointer to it.
Definition: chibios_alloc.c:49
int8_t en_sys_ref
Definition: ad6673.h:416
int32_t ad6673_set_user_pattern(struct ad6673_dev *dev, int32_t pattern_no, int32_t user_pattern)
Configures a User Test Pattern.
Definition: ad6673.c:717
int32_t ad6673_jesd204b_pwr_mode(struct ad6673_dev *dev, int32_t mode)
Configures the power mode of the JESD204B data transmit block.
Definition: ad6673.c:1030
#define AD6673_204B_CTRL3_JESD_TEST_MODE(x)
Definition: ad6673.h:222
int8_t en_ilas_test
Definition: ad6673.h:404
#define AD6673_CLOCK_DIV_RATIO(x)
Definition: ad6673.h:153
#define AD6673_SYS_CTRL_SYSREF_MODE
Definition: ad6673.h:186
int32_t ad6673_nsr_bandwidth_mode(struct ad6673_dev *dev, int32_t mode)
Selects the NSR Bandwidth mode.
Definition: ad6673.c:1343
int8_t k
Definition: ad6673.h:386
int8_t pin_force_value
Definition: ad6673.h:482
#define AD6673_REG_204B_DID_CFG
Definition: ad6673.h:105
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
#define AD6673_ADDR(x)
Definition: ad6673.h:58
int32_t ad6673_chip_pwr_mode(struct ad6673_dev *dev, int32_t mode)
Configures the power mode of the chip.
Definition: ad6673.c:418
#define AD6673_SYS_CTRL_REALIGN_ON_SYNCINB
Definition: ad6673.h:184
#define AD6673_CH_INDEX_ADC_B
Definition: ad6673.h:132
#define AD6673_OUT_MODE_JTX_BIT_ASSIGN(x)
Definition: ad6673.h:169
int32_t ad6673_jesd204b_select_test_injection_point(struct ad6673_dev *dev, int32_t inj_point)
Selects the point in the processing path of a lane, where the test data will be inserted.
Definition: ad6673.c:1064
int32_t ad6673_transfer(struct ad6673_dev *dev)
Initiates a transfer and waits for the operation to end. Note: This function may be called after a sh...
Definition: ad6673.c:294
#define AD6673_PDWN_JTX
Definition: ad6673.h:139
#define AD6673_REG_OFFSET_ADJUST(x)
Definition: ad6673.h:166
int32_t ad6673_dcc_freeze(struct ad6673_dev *dev, int32_t freeze)
Freezes DC correction value.
Definition: ad6673.c:1279
int32_t ad6673_nsr_enable(struct ad6673_dev *dev, int32_t enable)
Enables the Noise shaped requantizer(NRS).
Definition: ad6673.c:1311
#define AD6673_REG_SPI_CFG
Definition: ad6673.h:67
#define AD6673_REG_TEST
Definition: ad6673.h:80
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:119
int32_t ad6673_nsr_tuning_freq(int64_t tune_freq, int64_t f_adc, struct ad6673_type_band *p_band)
Sets the NSR frequency range.
Definition: ad6673.c:1376
#define AD6673_204B_CTRL2_INVERT_JESD_BITS
Definition: ad6673.h:218
int8_t lid1
Definition: ad6673.h:381
int8_t en_sync_in_b
Definition: ad6673.h:422
int32_t ad6673_set_user_pattern(struct ad6673_dev *dev, int32_t pattern_no, int32_t user_pattern)
Configures a User Test Pattern.
Definition: ad6673.c:717
int32_t ad6673_jesd204b_pwr_mode(struct ad6673_dev *dev, int32_t mode)
Configures the power mode of the JESD204B data transmit block.
Definition: ad6673.c:1030
@ AD6673_SHD_REG_VREF
Definition: ad6673.h:510
JESD204B interface configuration.
Definition: ad6673.h:321
int8_t ctrl_bits_no
Definition: ad6673.h:357
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
#define AD6673_OUT_MODE_DISABLE
Definition: ad6673.h:170
int8_t cml_level
Definition: ad6673.h:336
struct ad6673_fast_detect_cfg ad6673_fast_detect
Definition: ad6673_cfg.h:87
int16_t df_dwell_time
Definition: ad6673.h:488
int32_t f_center
Definition: ad6673.h:493
int32_t ad6673_reset_pn23(struct ad6673_dev *dev, int32_t rst)
Sets (1) or clears (0) the reset long PN sequence bit(PN23).
Definition: ad6673.c:686
struct ad6673_jesd204b_cfg * p_jesd204b
Definition: ad6673.h:499
int32_t ad6673_setup(struct ad6673_dev **device, struct ad6673_init_param init_param)
Configures the device.
Definition: ad6673.c:94
int32_t ad6673_fast_detect_setup(struct ad6673_dev *dev)
Configures the Fast-Detect module.
Definition: ad6673.c:1166
@ AD6673_SHD_REG_FD_UPPER_THD
Definition: ad6673.h:517
#define AD6673_204B_LANE_ASSGN2(x)
Definition: ad6673.h:247
#define AD6673_204B_PARAM_NP_JESD_SUBCLASS(x)
Definition: ad6673.h:233
#define AD6673_REG_CLOCK
Definition: ad6673.h:77
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
Fast Detect module configuration.
Definition: ad6673.h:458
#define AD6673_REG_VREF
Definition: ad6673.h:85
int32_t ad6673_jesd204b_set_frames(struct ad6673_dev *dev, int32_t k_frames)
Sets number of frames per multiframe (K).
Definition: ad6673.c:801
#define AD6673_REG_204B_CTRL3
Definition: ad6673.h:104
#define AD6673_204B_LANE_ASSGN1(x)
Definition: ad6673.h:244
struct no_os_spi_desc * spi_desc
Definition: ad6673.h:525
#define AD6673_REG_204B_PARAM_CS_N
Definition: ad6673.h:113
#define AD6673_SPI_CFG_SOFT_RST
Definition: ad6673.h:128
int32_t ad6673_setup(struct ad6673_dev **device, struct ad6673_init_param init_param)
Configures the device.
Definition: ad6673.c:94
int32_t ad6673_test_mode(struct ad6673_dev *dev, int32_t mode)
Sets the ADC's test mode.
Definition: ad6673.c:491
#define AD6673_PDWN_JESD204B(x)
Definition: ad6673.h:140
int32_t ad6673_jesd204b_test_mode(struct ad6673_dev *dev, int32_t test_mode)
Selects a JESD204B test mode.
Definition: ad6673.c:1105
int32_t ad6673_offset_adj(struct ad6673_dev *dev, int32_t adj)
Sets the offset adjustment.
Definition: ad6673.c:521
#define AD6673_OUT_MODE_DATA_FORMAT(x)
Definition: ad6673.h:172
#define AD6673_DCC_CTRL_DCC_EN
Definition: ad6673.h:200
struct ad6673_platform_data ad6673_pdata_lpc
Definition: ad6673_cfg.h:50
#define AD6673_REG_204B_PARAM_NP
Definition: ad6673.h:114
int32_t shadow_regs[SHADOW_REGISTER_COUNT]
Definition: ad6673.h:528
int32_t f1
Definition: ad6673.h:494
#define AD6673_FAST_DETECT_FORCE_FDA_FDB_PIN
Definition: ad6673.h:204
#define AD6673_REG_OFFSET
Definition: ad6673.h:82
#define AD6673_REG_CML
Definition: ad6673.h:84
@ AD6673_SHD_REG_FAST_DETECT
Definition: ad6673.h:516
#define AD6673_TEST_RST_PN_LONG
Definition: ad6673.h:157
int32_t ad6673_dcc_freeze(struct ad6673_dev *dev, int32_t freeze)
Freezes DC correction value.
Definition: ad6673.c:1279
#define AD6673_REG_204B_LID_CFG1
Definition: ad6673.h:107
int8_t tail_bits_mode
Definition: ad6673.h:373
int8_t quick_cfg_option
Definition: ad6673.h:344
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:131
int32_t ad6673_jesd204b_setup(struct ad6673_dev *dev)
Configures the JESD204B interface.
Definition: ad6673.c:838
int32_t ad6673_write(struct ad6673_dev *dev, int32_t register_address, int32_t register_value)
Writes a value to the selected register.
Definition: ad6673.c:250