Go to the documentation of this file.
32 #ifndef IIO_FREQUENCY_AD9361_H_
33 #define IIO_FREQUENCY_AD9361_H_
45 #define REG_SPI_CONF 0x000
46 #define REG_MULTICHIP_SYNC_AND_TX_MON_CTRL 0x001
47 #define REG_TX_ENABLE_FILTER_CTRL 0x002
48 #define REG_RX_ENABLE_FILTER_CTRL 0x003
49 #define REG_INPUT_SELECT 0x004
50 #define REG_RFPLL_DIVIDERS 0x005
51 #define REG_RX_CLOCK_DATA_DELAY 0x006
52 #define REG_TX_CLOCK_DATA_DELAY 0x007
53 #define REG_CLOCK_ENABLE 0x009
54 #define REG_BBPLL 0x00A
55 #define REG_TEMP_OFFSET 0x00B
56 #define REG_START_TEMP_READING 0x00C
57 #define REG_TEMP_SENSE2 0x00D
58 #define REG_TEMPERATURE 0x00E
59 #define REG_TEMP_SENSOR_CONFIG 0x00F
60 #define REG_PARALLEL_PORT_CONF_1 0x010
61 #define REG_PARALLEL_PORT_CONF_2 0x011
62 #define REG_PARALLEL_PORT_CONF_3 0x012
63 #define REG_ENSM_MODE 0x013
64 #define REG_ENSM_CONFIG_1 0x014
65 #define REG_ENSM_CONFIG_2 0x015
66 #define REG_CALIBRATION_CTRL 0x016
67 #define REG_STATE 0x017
68 #define REG_AUXDAC_1_WORD 0x018
69 #define REG_AUXDAC_2_WORD 0x019
70 #define REG_AUXDAC_1_CONFIG 0x01A
71 #define REG_AUXDAC_2_CONFIG 0x01B
72 #define REG_AUXADC_CLOCK_DIVIDER 0x01C
73 #define REG_AUXADC_CONFIG 0x01D
74 #define REG_AUXADC_WORD_MSB 0x01E
75 #define REG_AUXADC_LSB 0x01F
76 #define REG_AUTO_GPO 0x020
77 #define REG_AGC_GAIN_LOCK_DELAY 0x021
78 #define REG_AGC_ATTACK_DELAY 0x022
79 #define REG_AUXDAC_ENABLE_CTRL 0x023
80 #define REG_RX_LOAD_SYNTH_DELAY 0x024
81 #define REG_TX_LOAD_SYNTH_DELAY 0x025
82 #define REG_EXTERNAL_LNA_CTRL 0x026
83 #define REG_GPO_FORCE_AND_INIT 0x027
84 #define REG_GPO0_RX_DELAY 0x028
85 #define REG_GPO1_RX_DELAY 0x029
86 #define REG_GPO2_RX_DELAY 0x02A
87 #define REG_GPO3_RX_DELAY 0x02B
88 #define REG_GPO0_TX_DELAY 0x02C
89 #define REG_GPO1_TX_DELAY 0x02D
90 #define REG_GPO2_TX_DELAY 0x02E
91 #define REG_GPO3_TX_DELAY 0x02F
92 #define REG_AUXDAC1_RX_DELAY 0x030
93 #define REG_AUXDAC1_TX_DELAY 0x031
94 #define REG_AUXDAC2_RX_DELAY 0x032
95 #define REG_AUXDAC2_TX_DELAY 0x033
96 #define REG_CTRL_OUTPUT_POINTER 0x035
97 #define REG_CTRL_OUTPUT_ENABLE 0x036
98 #define REG_PRODUCT_ID 0x037
99 #define REG_REFERENCE_CLOCK_CYCLES 0x03A
100 #define REG_DIGITAL_IO_CTRL 0x03B
101 #define REG_LVDS_BIAS_CTRL 0x03C
102 #define REG_LVDS_INVERT_CTRL1 0x03D
103 #define REG_LVDS_INVERT_CTRL2 0x03E
104 #define REG_SDM_CTRL_1 0x03F
105 #define REG_FRACT_BB_FREQ_WORD_1 0x041
106 #define REG_FRACT_BB_FREQ_WORD_2 0x042
107 #define REG_FRACT_BB_FREQ_WORD_3 0x043
108 #define REG_INTEGER_BB_FREQ_WORD 0x044
109 #define REG_CLOCK_CTRL 0x045
110 #define REG_CP_CURRENT 0x046
111 #define REG_CP_BLEED_CURRENT 0x047
112 #define REG_LOOP_FILTER_1 0x048
113 #define REG_LOOP_FILTER_2 0x049
114 #define REG_LOOP_FILTER_3 0x04A
115 #define REG_VCO_CTRL 0x04B
116 #define REG_VCO_PROGRAM_1 0x04C
117 #define REG_VCO_PROGRAM_2 0x04D
118 #define REG_SDM_CTRL 0x04E
119 #define REG_RX_SYNTH_POWER_DOWN_OVERRIDE 0x050
120 #define REG_TX_SYNTH_POWER_DOWN_OVERRIDE 0x051
121 #define REG_RX_ANALOG_POWER_DOWN_OVERRIDE_1 0x052
122 #define REG_RX_ANALOG_POWER_DOWN_OVERRIDE_2 0x053
123 #define REG_RX1_ADC_POWER_DOWN_OVERRIDE 0x054
124 #define REG_RX2_ADC_POWER_DOWN_OVERRIDE 0x055
125 #define REG_TX_ANALOG_POWER_DOWN_OVERRIDE_1 0x056
126 #define REG_ANALOG_POWER_DOWN_OVERRIDE 0x057
127 #define REG_MISC_POWER_DOWN_OVERRIDE 0x058
128 #define REG_CH_1_OVERFLOW 0x05E
129 #define REG_CH_2_OVERFLOW 0x05F
130 #define REG_TX_FILTER_COEF_ADDR 0x060
131 #define REG_TX_FILTER_COEF_WRITE_DATA_1 0x061
132 #define REG_TX_FILTER_COEF_WRITE_DATA_2 0x062
133 #define REG_TX_FILTER_COEF_READ_DATA_1 0x063
134 #define REG_TX_FILTER_COEF_READ_DATA_2 0x064
135 #define REG_TX_FILTER_CONF 0x065
136 #define REG_TX_MON_LOW_GAIN 0x067
137 #define REG_TX_MON_HIGH_GAIN 0x068
138 #define REG_TX_MON_DELAY 0x069
139 #define REG_TX_LEVEL_THRESH 0x06A
140 #define REG_TX_RSSI1 0x06B
141 #define REG_TX_RSSI2 0x06C
142 #define REG_TX_RSSI_LSB 0x06D
143 #define REG_TPM_MODE_ENABLE 0x06E
144 #define REG_TX_MON_TEMP_GAIN_COEF 0x06F
145 #define REG_TX_MON_1_CONFIG 0x070
146 #define REG_TX_MON_2_CONFIG 0x071
147 #define REG_TX1_ATTEN_0 0x073
148 #define REG_TX1_ATTEN_1 0x074
149 #define REG_TX2_ATTEN_0 0x075
150 #define REG_TX2_ATTEN_1 0x076
151 #define REG_TX_ATTEN_OFFSET 0x077
152 #define REG_TX_ATTEN_THRESH 0x078
153 #define REG_TX1_DIG_ATTEN 0x079
154 #define REG_TX2_DIG_ATTEN 0x07C
155 #define REG_TX1_SYMBOL_ATTEN 0x07F
156 #define REG_TX2_SYMBOL_ATTEN 0x080
157 #define REG_TX_SYMBOL_ATTEN_CONFIG 0x081
158 #define REG_TX1_OUT_1_PHASE_CORR 0x08E
159 #define REG_TX1_OUT_1_GAIN_CORR 0x08F
160 #define REG_TX2_OUT_1_PHASE_CORR 0x090
161 #define REG_TX2_OUT_1_GAIN_CORR 0x091
162 #define REG_TX1_OUT_1_OFFSET_I 0x092
163 #define REG_TX1_OUT_1_OFFSET_Q 0x093
164 #define REG_TX2_OUT_1_OFFSET_I 0x094
165 #define REG_TX2_OUT_1_OFFSET_Q 0x095
166 #define REG_TX1_OUT_2_PHASE_CORR 0x096
167 #define REG_TX1_OUT_2_GAIN_CORR 0x097
168 #define REG_TX2_OUT_2_PHASE_CORR 0x098
169 #define REG_TX2_OUT_2_GAIN_CORR 0x099
170 #define REG_TX1_OUT_2_OFFSET_I 0x09A
171 #define REG_TX1_OUT_2_OFFSET_Q 0x09B
172 #define REG_TX2_OUT_2_OFFSET_I 0x09C
173 #define REG_TX2_OUT_2_OFFSET_Q 0x09D
174 #define REG_TX_FORCE_BITS 0x09F
175 #define REG_QUAD_CAL_NCO_FREQ_PHASE_OFFSET 0x0A0
176 #define REG_QUAD_CAL_CTRL 0x0A1
177 #define REG_KEXP_1 0x0A2
178 #define REG_KEXP_2 0x0A3
179 #define REG_QUAD_SETTLE_COUNT 0x0A4
180 #define REG_MAG_FTEST_THRESH 0x0A5
181 #define REG_MAG_FTEST_THRESH_2 0x0A6
182 #define REG_QUAD_CAL_STATUS_TX1 0x0A7
183 #define REG_QUAD_CAL_STATUS_TX2 0x0A8
184 #define REG_QUAD_CAL_COUNT 0x0A9
185 #define REG_TX_QUAD_FULL_LMT_GAIN 0x0AA
186 #define REG_SQUARER_CONFIG 0x0AB
187 #define REG_TX_QUAD_CAL_ATTEN 0x0AC
188 #define REG_THRESH_ACCUM 0x0AD
189 #define REG_TX_QUAD_LPF_GAIN 0x0AE
190 #define REG_TXDAC_VDS_I 0x0B0
191 #define REG_TXDAC_VDS_Q 0x0B1
192 #define REG_TXDAC_GN_I 0x0B2
193 #define REG_TXDAC_GN_Q 0x0B3
194 #define REG_TXBBF_OPAMP_A 0x0C0
195 #define REG_TXBBF_OPAMP_B 0x0C1
196 #define REG_TX_BBF_R1 0x0C2
197 #define REG_TX_BBF_R2 0x0C3
198 #define REG_TX_BBF_R3 0x0C4
199 #define REG_TX_BBF_R4 0x0C5
200 #define REG_TX_BBF_RP 0x0C6
201 #define REG_TX_BBF_C1 0x0C7
202 #define REG_TX_BBF_C2 0x0C8
203 #define REG_TX_BBF_CP 0x0C9
204 #define REG_TX_TUNE_CTRL 0x0CA
205 #define REG_TX_BBF_R2B 0x0CB
206 #define REG_TX_BBF_TUNE 0x0CC
207 #define REG_CONFIG0 0x0D0
208 #define REG_RESISTOR 0x0D1
209 #define REG_CAPACITOR 0x0D2
210 #define REG_LO_CM 0x0D3
211 #define REG_TX_BBF_TUNE_DIVIDER 0x0D6
212 #define REG_TX_BBF_TUNE_MODE 0x0D7
213 #define REG_RX_FILTER_COEF_ADDR 0x0F0
214 #define REG_RX_FILTER_COEF_DATA_1 0x0F1
215 #define REG_RX_FILTER_COEF_DATA_2 0x0F2
216 #define REG_RX_FILTER_COEF_READ_DATA_1 0x0F3
217 #define REG_RX_FILTER_COEF_READ_DATA_2 0x0F4
218 #define REG_RX_FILTER_CONFIG 0x0F5
219 #define REG_RX_FILTER_GAIN 0x0F6
220 #define REG_AGC_CONFIG_1 0x0FA
221 #define REG_AGC_CONFIG_2 0x0FB
222 #define REG_AGC_CONFIG_3 0x0FC
223 #define REG_MAX_LMT_FULL_GAIN 0x0FD
224 #define REG_PEAK_WAIT_TIME 0x0FE
225 #define REG_DIGITAL_GAIN 0x100
226 #define REG_AGC_LOCK_LEVEL 0x101
227 #define REG_ADC_NOISE_CORRECTION_FACTOR 0x102
228 #define REG_GAIN_STP_CONFIG1 0x103
229 #define REG_ADC_SMALL_OVERLOAD_THRESH 0x104
230 #define REG_ADC_LARGE_OVERLOAD_THRESH 0x105
231 #define REG_GAIN_STP_CONFIG_2 0x106
232 #define REG_SMALL_LMT_OVERLOAD_THRESH 0x107
233 #define REG_LARGE_LMT_OVERLOAD_THRESH 0x108
234 #define REG_RX1_MANUAL_LMT_FULL_GAIN 0x109
235 #define REG_RX1_MANUAL_LPF_GAIN 0x10A
236 #define REG_RX1_MANUAL_DIGITALFORCED_GAIN 0x10B
237 #define REG_RX2_MANUAL_LMT_FULL_GAIN 0x10C
238 #define REG_RX2_MANUAL_LPF_GAIN 0x10D
239 #define REG_RX2_MANUAL_DIGITALFORCED_GAIN 0x10E
240 #define REG_FAST_CONFIG_1 0x110
241 #define REG_FAST_CONFIG_2_SETTLING_DELAY 0x111
242 #define REG_FAST_ENERGY_LOST_THRESH 0x112
243 #define REG_FAST_STRONGER_SIGNAL_THRESH 0x113
244 #define REG_FAST_LOW_POWER_THRESH 0x114
245 #define REG_FAST_STRONG_SIGNAL_FREEZE 0x115
246 #define REG_FAST_FINAL_OVER_RANGE_AND_OPT_GAIN 0x116
247 #define REG_FAST_ENERGY_DETECT_COUNT 0x117
248 #define REG_FAST_AGCLL_UPPER_LIMIT 0x118
249 #define REG_FAST_GAIN_LOCK_EXIT_COUNT 0x119
250 #define REG_FAST_INITIAL_LMT_GAIN_LIMIT 0x11A
251 #define REG_FAST_INCREMENT_TIME 0x11B
252 #define REG_AGC_INNER_LOW_THRESH 0x120
253 #define REG_LMT_OVERLOAD_COUNTERS 0x121
254 #define REG_ADC_OVERLOAD_COUNTERS 0x122
255 #define REG_GAIN_STP1 0x123
256 #define REG_GAIN_UPDATE_COUNTER1 0x124
257 #define REG_GAIN_UPDATE_COUNTER2 0x125
258 #define REG_DIGITAL_SAT_COUNTER 0x128
259 #define REG_OUTER_POWER_THRESHS 0x129
260 #define REG_GAIN_STP_2 0x12A
261 #define REG_EXT_LNA_HIGH_GAIN 0x12C
262 #define REG_EXT_LNA_LOW_GAIN 0x12D
263 #define REG_GAIN_TABLE_ADDRESS 0x130
264 #define REG_GAIN_TABLE_WRITE_DATA1 0x131
265 #define REG_GAIN_TABLE_WRITE_DATA2 0x132
266 #define REG_GAIN_TABLE_WRITE_DATA3 0x133
267 #define REG_GAIN_TABLE_READ_DATA1 0x134
268 #define REG_GAIN_TABLE_READ_DATA2 0x135
269 #define REG_GAIN_TABLE_READ_DATA3 0x136
270 #define REG_GAIN_TABLE_CONFIG 0x137
271 #define REG_GM_SUB_TABLE_ADDRESS 0x138
272 #define REG_GM_SUB_TABLE_GAIN_WRITE 0x139
273 #define REG_GM_SUB_TABLE_BIAS_WRITE 0x13A
274 #define REG_GM_SUB_TABLE_CTRL_WRITE 0x13B
275 #define REG_GM_SUB_TABLE_GAIN_READ 0x13C
276 #define REG_GM_SUB_TABLE_BIAS_READ 0x13D
277 #define REG_GM_SUB_TABLE_CTRL_READ 0x13E
278 #define REG_GM_SUB_TABLE_CONFIG 0x13F
279 #define REG_WORD_ADDRESS 0x140
280 #define REG_GAIN_DIFF_WORDERROR_WRITE 0x141
281 #define REG_GAIN_ERROR_READ 0x142
282 #define REG_CONFIG 0x143
283 #define REG_LNA_GAIN_DIFF_READ_BACK 0x144
284 #define REG_MAX_MIXER_CALIBRATION_GAIN_INDEX 0x145
285 #define REG_TEMP_GAIN_COEF 0x146
286 #define REG_SETTLE_TIME 0x147
287 #define REG_MEASURE_DURATION 0x148
288 #define REG_CAL_TEMP_SENSOR_WORD 0x149
289 #define REG_MEASURE_DURATION_01 0x150
290 #define REG_MEASURE_DURATION_23 0x151
291 #define REG_RSSI_WEIGHT_0 0x152
292 #define REG_RSSI_WEIGHT_1 0x153
293 #define REG_RSSI_WEIGHT_2 0x154
294 #define REG_RSSI_WEIGHT_3 0x155
295 #define REG_RSSI_DELAY 0x156
296 #define REG_RSSI_WAIT_TIME 0x157
297 #define REG_RSSI_CONFIG 0x158
298 #define REG_ADC_MEASURE_DURATION_01 0x159
299 #define REG_ADC_WEIGHT_0 0x15A
300 #define REG_ADC_WEIGHT_1 0x15B
301 #define REG_DEC_POWER_MEASURE_DURATION_0 0x15C
302 #define REG_LNA_GAIN 0x15D
303 #define REG_CH1_ADC_POWER 0x160
304 #define REG_CH1_RX_FILTER_POWER 0x161
305 #define REG_CH2_ADC_POWER 0x162
306 #define REG_CH2_RX_FILTER_POWER 0x163
307 #define REG_RX_QUAD_CAL_LEVEL 0x168
308 #define REG_CALIBRATION_CONFIG_1 0x169
309 #define REG_CALIBRATION_CONFIG_2 0x16A
310 #define REG_CALIBRATION_CONFIG_3 0x16B
311 #define REG_CALIB_COUNT 0x16C
312 #define REG_SETTLE_COUNT 0x16D
313 #define REG_RX_QUAD_GAIN1 0x16E
314 #define REG_RX_QUAD_GAIN2 0x16F
315 #define REG_RX1_INPUT_A_PHASE_CORR 0x170
316 #define REG_RX1_INPUT_A_GAIN_CORR 0x171
317 #define REG_RX2_INPUT_A_PHASE_CORR 0x172
318 #define REG_RX2_INPUT_A_GAIN_CORR 0x173
319 #define REG_RX1_INPUT_A_Q_OFFSET 0x174
320 #define REG_RX1_INPUT_A_OFFSETS 0x175
321 #define REG_INPUT_A_OFFSETS_1 0x176
322 #define REG_RX2_INPUT_A_OFFSETS 0x177
323 #define REG_RX2_INPUT_A_I_OFFSET 0x178
324 #define REG_RX1_INPUT_BC_PHASE_CORR 0x179
325 #define REG_RX1_INPUT_BC_GAIN_CORR 0x17A
326 #define REG_RX2_INPUT_BC_PHASE_CORR 0x17B
327 #define REG_RX2_INPUT_BC_GAIN_CORR 0x17C
328 #define REG_RX1_INPUT_BC_Q_OFFSET 0x17D
329 #define REG_RX1_INPUT_BC_OFFSETS 0x17E
330 #define REG_INPUT_BC_OFFSETS_1 0x17F
331 #define REG_RX2_INPUT_BC_OFFSETS 0x180
332 #define REG_RX2_INPUT_BC_I_OFFSET 0x181
333 #define REG_FORCE_BITS 0x182
334 #define REG_WAIT_COUNT 0x185
335 #define REG_RF_DC_OFFSET_COUNT 0x186
336 #define REG_RF_DC_OFFSET_CONFIG_1 0x187
337 #define REG_RF_DC_OFFSET_ATTEN 0x188
338 #define REG_INVERT_BITS 0x189
339 #define REG_DC_OFFSET_CONFIG2 0x18B
340 #define REG_RF_CAL_GAIN_INDEX 0x18C
341 #define REG_SOI_THRESH 0x18D
342 #define REG_BB_DC_OFFSET_SHIFT 0x190
343 #define REG_BB_DC_OFFSET_FAST_SETTLE_SHIFT 0x191
344 #define REG_BB_FAST_SETTLE_DUR 0x192
345 #define REG_BB_DC_OFFSET_COUNT 0x193
346 #define REG_BB_DC_OFFSET_ATTEN 0x194
347 #define REG_RX1_BB_DC_WORD_I_MSB 0x19A
348 #define REG_RX1_BB_DC_WORD_I_LSB 0x19B
349 #define REG_RX1_BB_DC_WORD_Q_MSB 0x19C
350 #define REG_RX1_BB_DC_WORD_Q_LSB 0x19D
351 #define REG_RX2_BB_DC_WORD_I_MSB 0x19E
352 #define REG_RX2_BB_DC_WORD_I_LSB 0x19F
353 #define REG_RX2_BB_DC_WORD_Q_MSB 0x1A0
354 #define REG_RX2_BB_DC_WORD_Q_LSB 0x1A1
355 #define REG_BB_TRACK_CORR_WORD_I_MSB 0x1A2
356 #define REG_BB_TRACK_CORR_WORD_I_LSB 0x1A3
357 #define REG_BB_TRACK_CORR_WORD_Q_MSB 0x1A4
358 #define REG_BB_TRACK_CORR_WORD_Q_LSB 0x1A5
359 #define REG_RX1_RSSI_SYMBOL 0x1A7
360 #define REG_RX1_RSSI_PREAMBLE 0x1A8
361 #define REG_RX2_RSSI_SYMBOL 0x1A9
362 #define REG_RX2_RSSI_PREAMBLE 0x1AA
363 #define REG_SYMBOL_LSB 0x1AB
364 #define REG_PREAMBLE_LSB 0x1AC
365 #define REG_RX_PATH_GAIN_MSB 0x1AD
366 #define REG_RX_PATH_GAIN_LSB 0x1AE
367 #define REG_RX_DIFF_LNA_FORCE 0x1B0
368 #define REG_RX_LNA_BIAS_COARSE 0x1B1
369 #define REG_RX_LNA_BIAS_FINE_0 0x1B2
370 #define REG_RX_LNA_BIAS_FINE_1 0x1B3
371 #define REG_RX_MIX_GM_CONFIG 0x1C0
372 #define REG_RX1_MIX_GM_FORCE 0x1C1
373 #define REG_RX1_MIX_GM_BIAS_FORCE 0x1C2
374 #define REG_RX2_MIX_GM_FORCE 0x1C3
375 #define REG_RX2_MIX_GM_BIAS_FORCE 0x1C4
376 #define REG_INPUT_A_MSBS 0x1C8
377 #define REG_INPUT_A_RX1_I 0x1C9
378 #define REG_INPUT_A_RX1_Q 0x1CA
379 #define REG_INPUT_A_RX2_I 0x1CB
380 #define REG_INPUT_A_RX2_Q 0x1CC
381 #define REG_INPUTS_BC_RX1_I 0x1CD
382 #define REG_BAND1_RX1_Q 0x1CE
383 #define REG_INPUTS_BC_RX2_I 0x1CF
384 #define REG_INPUTS_BC_RX2_Q 0x1D0
385 #define REG_INPUTS_BC_MSBS 0x1D1
386 #define REG_FORCE_OS_DAC 0x1D2
387 #define REG_RX_MIX_LO_CM 0x1D5
388 #define REG_RX_CGB_SEG_ENABLE 0x1D6
389 #define REG_RX_MIX_INPUTBIAS 0x1D7
390 #define REG_RX_TIA_CONFIG 0x1DB
391 #define REG_TIA1_C_LSB 0x1DC
392 #define REG_TIA1_C_MSB 0x1DD
393 #define REG_TIA2_C_LSB 0x1DE
394 #define REG_TIA2_C_MSB 0x1DF
395 #define REG_RX1_BBF_R1A 0x1E0
396 #define REG_RX2_BBF_R1A 0x1E1
397 #define REG_RX1_TUNE_CTRL 0x1E2
398 #define REG_RX2_TUNE_CTRL 0x1E3
399 #define REG_RX1_BBF_R5 0x1E4
400 #define REG_RX2_BBF_R5 0x1E5
401 #define REG_RX_BBF_R2346 0x1E6
402 #define REG_RX_BBF_C1_MSB 0x1E7
403 #define REG_RX_BBF_C1_LSB 0x1E8
404 #define REG_RX_BBF_C2_MSB 0x1E9
405 #define REG_RX_BBF_C2_LSB 0x1EA
406 #define REG_RX_BBF_C3_MSB 0x1EB
407 #define REG_RX_BBF_C3_LSB 0x1EC
408 #define REG_RX_BBF_CC1_CTR 0x1ED
409 #define REG_RX_BBF_POW_RZ_BYTE0 0x1EE
410 #define REG_RX_BBF_CC2_CTR 0x1EF
411 #define REG_RX_BBF_POW_RZ_BYTE1 0x1F0
412 #define REG_RX_BBF_CC3_CTR 0x1F1
413 #define REG_RX_BBF_R5_TUNE 0x1F2
414 #define REG_RX_BBF_TUNE 0x1F3
415 #define REG_RX1_BBF_MAN_GAIN 0x1F4
416 #define REG_RX2_BBF_MAN_GAIN 0x1F5
417 #define REG_RX_BBF_TUNE_DIVIDE 0x1F8
418 #define REG_RX_BBF_TUNE_CONFIG 0x1F9
419 #define REG_POLE_GAIN 0x1FA
420 #define REG_RX_BBBW_MHZ 0x1FB
421 #define REG_RX_BBBW_KHZ 0x1FC
422 #define REG_FB_DAC_CLK_DELAY1 0x201
423 #define REG_FB_DAC_CLK_DELAY2 0x202
424 #define REG_FLASH_SAMPLE_CLK_DELAY_3P 0x203
425 #define REG_FLASH_SAMPLE_CLK_DELAY_3N 0x204
426 #define REG_TEST_MUX_2I 0x205
427 #define REG_TEST_MUX_2Q 0x206
428 #define REG_INTEGRATOR_1_RESISTANCE 0x207
429 #define REG_INTEGRATOR_1_CAPACITANCE 0x208
430 #define REG_INTEGRATOR_23_RESISTANCE 0x209
431 #define REG_INTEGRATOR_2_RESISTANCE 0x20A
432 #define REG_INTEGRATOR_2_CAPACITANCE 0x20B
433 #define REG_INTEGRATOR_3_RESISTANCE 0x20C
434 #define REG_INTEGRATOR_3_CAPACITANCE 0x20D
435 #define REG_INTEGRATOR_AMP_CC 0x20E
436 #define REG_INT_1_FB_DAC_NMOS_CURRENT_SOURCE 0x20F
437 #define REG_INT_1_FB_DAC_NMOS_CASOADE_BIAS_CURRENT 0x210
438 #define REG_INT_1_FB_DAC_PMOS_CURRENT_SOURCE 0x211
439 #define REG_INT_2_FB_DAC_NMOS_CURRENT_SOURCE 0x212
440 #define REG_INT_2_FB_DAC_NMOS_CASCODE_BIAS_CURRENT 0x213
441 #define REG_INT_2_FB_DAC_PMOS_CURRENT_SOURCE 0x214
442 #define REG_INT_3_FB_DAC_NMOS_CURRENT_SOURCE 0x215
443 #define REG_INT_3_FB_DAC_NMOS_CASCODE_BIAS_CURRENT 0x216
444 #define REG_INT_3_FB_DAC_PMOS_CURRENT_SOURCE 0x217
445 #define REG_FB_DAC_BIAS_CURRENT 0x218
446 #define REG_INT_1_1ST_STAGE_CURRENT 0x219
447 #define REG_INT_1_1ST_STAGE_CASCODE_CURRENT 0x21A
448 #define REG_INT_1_2ND_STAGE_CURRENT 0x21B
449 #define REG_INTEGRATOR_2_1ST_STAGE_CURRENT 0x21C
450 #define REG_INT_2_1ST_STAGE_CASCODE_CURRENT 0x21D
451 #define REG_INT_2_2ND_STAGE_CURRENT 0x21E
452 #define REG_INT_3_1ST_STAGE_CURRENT 0x21F
453 #define REG_INT_3_1ST_STAGE_CASCODE_CURRENT 0x220
454 #define REG_INT_3_2ND_STAGE_CURRENT 0x221
455 #define REG_FLASH_BIAS_CURRENT 0x222
456 #define REG_FLASH_LADDER_BIAS 0x223
457 #define REG_FLASH_LADDER_CASCODE_CURRENT 0x224
458 #define REG_FLASH_LADDER_BIAS2 0x225
459 #define REG_RESET 0x226
460 #define REG_RX_PFD_CONFIG 0x230
461 #define REG_RX_INTEGER_BYTE_0 0x231
462 #define REG_RX_INTEGER_BYTE_1 0x232
463 #define REG_RX_FRACT_BYTE_0 0x233
464 #define REG_RX_FRACT_BYTE_1 0x234
465 #define REG_RX_FRACT_BYTE_2 0x235
466 #define REG_RX_FORCE_ALC 0x236
467 #define REG_RX_FORCE_VCO_TUNE_0 0x237
468 #define REG_RX_FORCE_VCO_TUNE_1 0x238
469 #define REG_RX_ALC_VARACTOR 0x239
470 #define REG_RX_VCO_OUTPUT 0x23A
471 #define REG_RX_CP_CURRENT 0x23B
472 #define REG_RX_CP_OFFSET 0x23C
473 #define REG_RX_CP_CONFIG 0x23D
474 #define REG_RX_LOOP_FILTER_1 0x23E
475 #define REG_RX_LOOP_FILTER_2 0x23F
476 #define REG_RX_LOOP_FILTER_3 0x240
477 #define REG_RX_DITHERCP_CAL 0x241
478 #define REG_RX_VCO_BIAS_1 0x242
479 #define REG_RX_CAL_STATUS 0x244
480 #define REG_RX_VCO_CAL_REF 0x245
481 #define REG_RX_VCO_PD_OVERRIDES 0x246
482 #define REG_RX_CP_OVERRANGE_VCO_LOCK 0x247
483 #define REG_RX_VCO_LDO 0x248
484 #define REG_RX_VCO_CAL 0x249
485 #define REG_RX_LOCK_DETECT_CONFIG 0x24A
486 #define REG_RX_CP_LEVEL_DETECT 0x24B
487 #define REG_RX_DSM_SETUP_0 0x24C
488 #define REG_RX_DSM_SETUP_1 0x24D
489 #define REG_RX_CORRECTION_WORD0 0x24E
490 #define REG_RX_CORRECTION_WORD1 0x24F
491 #define REG_RX_VCO_VARACTOR_CTRL_0 0x250
492 #define REG_RX_VCO_VARACTOR_CTRL_1 0x251
493 #define REG_RX_FAST_LOCK_SETUP 0x25A
494 #define REG_RX_FAST_LOCK_SETUP_INIT_DELAY 0x25B
495 #define REG_RX_FAST_LOCK_PROGRAM_ADDR 0x25C
496 #define REG_RX_FAST_LOCK_PROGRAM_DATA 0x25D
497 #define REG_RX_FAST_LOCK_PROGRAM_READ 0x25E
498 #define REG_RX_FAST_LOCK_PROGRAM_CTRL 0x25F
499 #define REG_RX_LO_GEN_POWER_MODE 0x261
500 #define REG_TX_PFD_CONFIG 0x270
501 #define REG_TX_INTEGER_BYTE_0 0x271
502 #define REG_TX_INTEGER_BYTE_1 0x272
503 #define REG_TX_FRACT_BYTE_0 0x273
504 #define REG_TX_FRACT_BYTE_1 0x274
505 #define REG_TX_FRACT_BYTE_2 0x275
506 #define REG_TX_FORCE_ALC 0x276
507 #define REG_TX_FORCE_VCO_TUNE_0 0x277
508 #define REG_TX_FORCE_VCO_TUNE_1 0x278
509 #define REG_TX_ALCVARACT_OR 0x279
510 #define REG_TX_VCO_OUTPUT 0x27A
511 #define REG_TX_CP_CURRENT 0x27B
512 #define REG_TX_CP_OFFSET 0x27C
513 #define REG_TX_CP_CONFIG 0x27D
514 #define REG_TX_LOOP_FILTER_1 0x27E
515 #define REG_TX_LOOP_FILTER_2 0x27F
516 #define REG_TX_LOOP_FILTER_3 0x280
517 #define REG_TX_DITHERCP_CAL 0x281
518 #define REG_TX_VCO_BIAS_1 0x282
519 #define REG_TX_VCO_BIAS_2 0x283
520 #define REG_TX_CAL_STATUS 0x284
521 #define REG_TX_VCO_CAL_REF 0x285
522 #define REG_TX_VCO_PD_OVERRIDES 0x286
523 #define REG_TX_CP_OVERRANGE_VCO_LOCK 0x287
524 #define REG_TX_VCO_LDO 0x288
525 #define REG_TX_VCO_CAL 0x289
526 #define REG_TX_LOCK_DETECT_CONFIG 0x28A
527 #define REG_TX_CP_LEVEL_DETECT 0x28B
528 #define REG_TX_DSM_SETUP_0 0x28C
529 #define REG_TX_DSM_SETUP_1 0x28D
530 #define REG_TX_CORRECTION_WORD0 0x28E
531 #define REG_TX_CORRECTION_WORD1 0x28F
532 #define REG_TX_VCO_VARACTOR_CTRL_0 0x290
533 #define REG_TX_VCO_VARACTOR_CTRL_1 0x291
534 #define REG_DCXO_COARSE_TUNE 0x292
535 #define REG_DCXO_FINE_TUNE_HIGH 0x293
536 #define REG_DCXO_FINE_TUNE_LOW 0x294
537 #define REG_DCXO_CONFIG 0x295
538 #define REG_DCXO_TEMPCO_WRITE 0x296
539 #define REG_DCXO_TEMPCO_READ 0x297
540 #define REG_DCXO_TEMPCO_ADDR 0x298
541 #define REG_DELTA_T_READ 0x299
542 #define REG_TX_FAST_LOCK_SETUP 0x29A
543 #define REG_TX_FAST_LOCK_SETUP_INIT_DELAY 0x29B
544 #define REG_TX_FAST_LOCK_PROGRAM_ADDR 0x29C
545 #define REG_TX_FAST_LOCK_PROGRAM_DATA 0x29D
546 #define REG_TX_FAST_LOCK_PROGRAM_READ 0x29E
547 #define REG_TX_FAST_LOCK_PROGRAM_CTRL 0x29F
548 #define REG_TX_LO_GEN_POWER_MODE 0x2A1
549 #define REG_BANDGAP_CONFIG0 0x2A6
550 #define REG_BANDGAP_CONFIG1 0x2A8
551 #define REG_REF_DIVIDE_CONFIG_1 0x2AB
552 #define REG_REF_DIVIDE_CONFIG_2 0x2AC
553 #define REG_GAIN_RX1 0x2B0
554 #define REG_LPF_GAIN_RX1 0x2B1
555 #define REG_DIG_GAIN_RX1 0x2B2
556 #define REG_FAST_ATTACK_STATE 0x2B3
557 #define REG_SLOW_LOOP_STATE 0x2B4
558 #define REG_GAIN_RX2 0x2B5
559 #define REG_LPF_GAIN_RX2 0x2B6
560 #define REG_DIG_GAIN_RX2 0x2B7
561 #define REG_OVRG_SIGS_RX1 0x2B8
562 #define REG_OVRG_SIGS_RX2 0x2B9
563 #define REG_CTRL 0x3DF
564 #define REG_BIST_CONFIG 0x3F4
565 #define REG_OBSERVE_CONFIG 0x3F5
566 #define REG_BIST_AND_DATA_PORT_TEST_CONFIG 0x3F6
567 #define REG_DAC_TEST_0 0x3FC
568 #define REG_DAC_TEST_1 0x3FD
569 #define REG_DAC_TEST_2 0x3FE
574 #define SOFT_RESET (1 << 7)
575 #define WIRE3_SPI (1 << 6)
576 #define LSB_FIRST (1 << 5)
577 #define _LSB_FIRST (1 << 2)
578 #define _WIRE3_SPI (1 << 1)
579 #define _SOFT_RESET (1 << 0)
584 #define TX2_MONITOR_ENABLE (1 << 6)
585 #define TX1_MONITOR_ENABLE (1 << 5)
586 #define MCS_RF_ENABLE (1 << 3)
587 #define MCS_BBPLL_ENABLE (1 << 2)
588 #define MCS_DIGITAL_CLK_ENABLE (1 << 1)
589 #define MCS_BB_ENABLE (1 << 0)
594 #define THB2_EN (1 << 3)
595 #define THB1_EN (1 << 2)
596 #define TX_CHANNEL_ENABLE(x) (((x) & 0x3) << 6)
597 #define THB3_ENABLE_INTERP(x) (((x) & 0x3) << 4)
598 #define TX_FIR_ENABLE_INTERPOLATION(x) (((x) & 0x3) << 0)
607 #define RHB2_EN (1 << 3)
608 #define RHB1_EN (1 << 2)
609 #define RX_CHANNEL_ENABLE(x) (((x) & 0x3) << 6)
610 #define DEC3_ENABLE_DECIMATION(x) (((x) & 0x3) << 4)
611 #define RX_FIR_ENABLE_DECIMATION(x) (((x) & 0x3) << 0)
620 #define TX_OUTPUT (1 << 6)
621 #define RX_INPUT(x) (((x) & 0x3F) << 0)
626 #define TX_VCO_DIVIDER(x) (((x) & 0xF) << 4)
627 #define RX_VCO_DIVIDER(x) (((x) & 0xF) << 0)
632 #define DATA_CLK_DELAY(x) (((x) & 0xF) << 4)
633 #define RX_DATA_DELAY(x) (((x) & 0xF) << 0)
638 #define FB_CLK_DELAY(x) (((x) & 0xF) << 4)
639 #define TX_DATA_DELAY(x) (((x) & 0xF) << 0)
644 #define XO_BYPASS (1 << 4)
645 #define DIGITAL_POWER_UP (1 << 2)
646 #define CLOCK_ENABLE_DFLT (1 << 1)
647 #define BBPLL_ENABLE (1 << 0)
652 #define CLKOUT_ENABLE (1 << 4)
653 #define DAC_CLK_DIV2 (1 << 3)
654 #define CLKOUT_SELECT(x) (((x) & 0x7) << 5)
655 #define BBPLL_DIVIDER(x) (((x) & 0x7) << 0)
660 #define START_TEMP_READING (1 << 0)
665 #define TEMP_SENSE_PERIODIC_ENABLE (1 << 0)
666 #define MEASUREMENT_TIME_INTERVAL(x) (((x) & 0x7F) << 1)
671 #define TEMP_SENSOR_DECIMATION(x) (((x) & 0x7) << 0)
676 #define PP_TX_SWAP_IQ (1 << 7)
677 #define PP_RX_SWAP_IQ (1 << 6)
678 #define TX_CHANNEL_SWAP (1 << 5)
679 #define RX_CHANNEL_SWAP (1 << 4)
680 #define RX_FRAME_PULSE_MODE (1 << 3)
681 #define R2T2_TIMING (1 << 2)
682 #define INVERT_DATA_BUS (1 << 1)
683 #define INVERT_DATA_CLK (1 << 0)
688 #define FDD_ALT_WORD_ORDER (1 << 7)
689 #define INVERT_RX1 (1 << 6)
690 #define INVERT_RX2 (1 << 5)
691 #define INVERT_TX1 (1 << 4)
692 #define INVERT_TX2 (1 << 3)
693 #define INVERT_RX_FRAME (1 << 2)
694 #define DELAY_RX_DATA(x) (((x) & 0x3) << 0)
699 #define FDD_RX_RATE_2TX_RATE (1 << 7)
700 #define SWAP_PORTS (1 << 6)
701 #define SINGLE_DATA_RATE (1 << 5)
702 #define LVDS_MODE (1 << 4)
703 #define HALF_DUPLEX_MODE (1 << 3)
704 #define SINGLE_PORT_MODE (1 << 2)
705 #define FULL_PORT (1 << 1)
706 #define FULL_DUPLEX_SWAP_BITS (1 << 0)
711 #define FDD_MODE (1 << 0)
716 #define ENABLE_RX_DATA_PORT_FOR_CAL (1 << 7)
717 #define FORCE_RX_ON (1 << 6)
718 #define FORCE_TX_ON (1 << 5)
719 #define ENABLE_ENSM_PIN_CTRL (1 << 4)
720 #define LEVEL_MODE (1 << 3)
721 #define FORCE_ALERT_STATE (1 << 2)
722 #define AUTO_GAIN_LOCK (1 << 1)
723 #define TO_ALERT (1 << 0)
728 #define FDD_EXTERNAL_CTRL_ENABLE (1 << 7)
729 #define POWER_DOWN_RX_SYNTH (1 << 6)
730 #define POWER_DOWN_TX_SYNTH (1 << 5)
731 #define TXNRX_SPI_CTRL (1 << 4)
732 #define SYNTH_ENABLE_PIN_CTRL_MODE (1 << 3)
733 #define DUAL_SYNTH_MODE (1 << 2)
734 #define RX_SYNTH_READY_MASK (1 << 1)
735 #define TX_SYNTH_READY_MASK (1 << 0)
740 #define RX_BB_TUNE_CAL (1 << 7)
741 #define TX_BB_TUNE_CAL (1 << 6)
742 #define RX_QUAD_CAL (1 << 5)
743 #define TX_QUAD_CAL (1 << 4)
744 #define RX_GAIN_STEP_CAL (1 << 3)
745 #define TXMON_CAL (1 << 2)
746 #define RFDC_CAL (1 << 1)
747 #define BBDC_CAL (1 << 0)
753 #define CALIBRATION_SEQUENCE_STATE(x) (((x) & 0xF) << 4)
754 #define ENSM_STATE(x) (((x) & 0xF) << 0)
755 #define ENSM_STATE_SLEEP_WAIT 0x0
756 #define ENSM_STATE_ALERT 0x5
757 #define ENSM_STATE_TX 0x6
758 #define ENSM_STATE_TX_FLUSH 0x7
759 #define ENSM_STATE_RX 0x8
760 #define ENSM_STATE_RX_FLUSH 0x9
761 #define ENSM_STATE_FDD 0xA
762 #define ENSM_STATE_FDD_FLUSH 0xB
763 #define ENSM_STATE_INVALID 0xFF
764 #define ENSM_STATE_SLEEP 0x80
769 #define AUXDAC_2_WORD_MSB(x) (((x) & 0x3F) << 2)
770 #define AUXDAC_1_WORD(x) (((x) & 0x3) << 0)
775 #define COMP_CTRL_1 (1 << 5)
776 #define AUXDAC1_STP_FACTOR (1 << 4)
777 #define AUXDAC_1_VREF(x) (((x) & 0x3) << 2)
778 #define AUXDAC_1_WORD_LSB(x) (((x) & 0x3) << 0)
783 #define COMP_CTRL_2 (1 << 5)
784 #define AUXDAC2_STP_FACTOR (1 << 4)
785 #define AUXDAC_2_VREF(x) (((x) & 0xF) << 2)
786 #define AUXDAC_2_WORD_LSB(x) (((x) & 0x3) << 0)
791 #define AUXADC_CLOCK_DIVIDER(x) (((x) & 0x3F) << 0)
796 #define AUXADC_POWER_DOWN (1 << 0)
797 #define AUX_ADC_DECIMATION(x) (((x) & 0x7) << 1)
802 #define AUXADC_WORD_LSB(x) (((x) & 0xF) << 0)
807 #define GPO_ENABLE_AUTO_RX(x) (((x) & 0xF) << 4)
808 #define GPO_ENABLE_AUTO_TX(x) (((x) & 0xF) << 0)
813 #define INVERT_BYPASSED_LNA_POLARITY (1 << 6)
814 #define AGC_ATTACK_DELAY(x) (((x) & 0x3F) << 0)
819 #define AUXDAC_MANUAL_BAR(x) (((x) & 0x3) << 6)
820 #define AUXDAC_AUTO_TX_BAR(x) (((x) & 0x3) << 4)
821 #define AUXDAC_AUTO_RX_BAR(x) (((x) & 0x3) << 2)
822 #define AUXDAC_INIT_BAR(x) (((x) & 0x3) << 0)
827 #define AUXDAC_MANUAL_SELECT (1 << 7)
828 #define EXTERNAL_LNA2_CTRL (1 << 6)
829 #define EXTERNAL_LNA1_CTRL (1 << 5)
830 #define GPO_MANUAL_SELECT (1 << 4)
831 #define OPEN(x) (((x) & 0xF) << 0)
836 #define GPO_MANUAL_CTRL(x) (((x) & 0xF) << 4)
837 #define GPO_INIT_STATE(x) (((x) & 0xF) << 0)
842 #define EN_CTRL7 (1 << 7)
843 #define EN_CTRL6 (1 << 6)
844 #define EN_CTRL5 (1 << 5)
845 #define EN_CTRL4 (1 << 4)
846 #define EN_CTRL3 (1 << 3)
847 #define EN_CTRL2 (1 << 2)
848 #define EN_CTRL1 (1 << 1)
849 #define EN_CTRL0 (1 << 0)
854 #define PRODUCT_ID_MASK 0xF8
855 #define PRODUCT_ID_9361 0x08
856 #define REV_MASK 0x07
861 #define REFERENCE_CLOCK_CYCLES_PER_US(x) (((x) & 0x7F) << 0)
866 #define CLK_OUT_DRIVE (1 << 7)
867 #define DATACLK_DRIVE (1 << 6)
868 #define DATA_PORT_DRIVE (1 << 2)
869 #define DATACLK_SLEW(x) (((x) & 0x3) << 4)
870 #define DATA_PORT_SLEW(x) (((x) & 0x3) << 0)
875 #define RX_ON_CHIP_TERM (1 << 5)
876 #define LVDS_BYPASS_BIAS_R (1 << 4)
877 #define LVDS_TX_LO_VCM (1 << 3)
878 #define CLK_OUT_SLEW(x) (((x) & 0x3) << 6)
879 #define LVDS_BIAS(x) (((x) & 0x7) << 0)
884 #define INIT_BB_FO_CAL (1 << 2)
885 #define BBPLL_RESET_BAR (1 << 0)
890 #define REF_FREQ_SCALER(x) (((x) & 0x3) << 0)
895 #define CHARGE_PUMP_CURRENT(x) (((x) & 0x3F) << 0)
900 #define MCS_REFCLK_SCALE_EN (1 << 7)
905 #define C1_WORD(x) (((x) & 0x7) << 5)
906 #define R1_WORD(x) (((x) & 0x1F) << 0)
911 #define R2_WORD (1 << 7)
912 #define C2_WORD(x) (((x) & 0x1F) << 2)
913 #define C1_WORD_LSB(x) (((x) & 0x3) << 0)
918 #define BYPASS_C3 (1 << 7)
919 #define BYPASS_R2 (1 << 6)
920 #define C3_WORD(x) (((x) & 0xF) << 2)
921 #define R2_WORD_LSB(x) (((x) & 0x3) << 0)
926 #define FREQ_CAL_ENABLE (1 << 7)
927 #define FREQ_CAL_RESET (1 << 4)
928 #define FREQ_CAL_COUNT_LENGTH(x) (((x) & 0x3) << 5)
933 #define CAL_CLOCK_DIV_4 (1 << 4)
938 #define RX_LO_POWER_DOWN (1 << 4)
939 #define RX_SYNTH_VCO_ALC_POWER_DOWN (1 << 3)
940 #define RX_SYNTH_PTAT_POWER_DOWN (1 << 2)
941 #define RX_SYNTH_VCO_POWER_DOWN (1 << 1)
942 #define RX_SYNTH_VCO_LDO_POWER_DOWN (1 << 0)
947 #define TX_LO_POWER_DOWN (1 << 4)
948 #define TX_SYNTH_VCO_ALC_POWER_DOWN (1 << 3)
949 #define TX_SYNTH_PTAT_POWER_DOWN (1 << 2)
950 #define TX_SYNTH_VCO_POWER_DOWN (1 << 1)
951 #define TX_SYNTH_VCO_LDO_POWER_DOWN (1 << 0)
956 #define RX_OFFSET_DAC_CGIN_POWER_DOWN(x) (((x) & 0x3) << 6)
957 #define RX_LMT_OVERLOAD_POWER_DOWN(x) (((x) & 0x3) << 4)
958 #define RX_MIXER_GM_POWER_DOWN(x) (((x) & 0x3) << 2)
959 #define RX_CGB_POWER_DOWN(x) (((x) & 0x3) << 0)
964 #define RX_BBF_POWER_DOWN(x) (((x) & 0x3) << 6)
965 #define RX_TIA_POWER_DOWN(x) (((x) & 0x3) << 4)
966 #define RX_MIXER_POWER_DOWN(x) (((x) & 0x3) << 2)
967 #define RX_OFFSET_DAC_CGOUT_POWER_DOWN(x) (((x) & 0x3) << 0)
972 #define TX_SECONDARY_FILTER_POWER_DOWN(x) (((x) & 0x3) << 6)
973 #define TX_BBF_POWER_DOWN(x) (((x) & 0x3) << 4)
974 #define TX_DAC_POWER_DOWN(x) (((x) & 0x3) << 2)
975 #define TX_DAC_BIAS_POWER_DOWN(x) (((x) & 0x3) << 0)
980 #define RX_EXT_VCO_BUFFER_POWER_DOWN (1 << 5)
981 #define TX_EXT_VCO_BUFFER_POWER_DOWN (1 << 4)
982 #define TX_MONITOR_POWER_DOWN(x) (((x) & 0x3) << 2)
983 #define TX_UPCONVERTER_POWER_DOWN(x) (((x) & 0x3) << 0)
988 #define RX_LNA_POWER_DOWN (1 << 6)
989 #define DCXO_POWER_DOWN (1 << 1)
990 #define MASTER_BIAS_POWER_DOWN (1 << 0)
991 #define RX_CALIBRATION_POWER_DOWN(x) (((x) & 0x3) << 2)
996 #define BBPLL_LOCK (1 << 7)
997 #define CH_1_INT3 (1 << 6)
998 #define CH1_HB3 (1 << 5)
999 #define CH1_HB2 (1 << 4)
1000 #define CH1_QEC (1 << 3)
1001 #define CH1_HB1 (1 << 2)
1002 #define CH1_TFIR (1 << 1)
1003 #define CH1_RFIR (1 << 0)
1008 #define CH2_INT3 (1 << 6)
1009 #define CH2_HB3 (1 << 5)
1010 #define CH2_HB2 (1 << 4)
1011 #define CH2_QEC (1 << 3)
1012 #define CH2_HB1 (1 << 2)
1013 #define CH2_TFIR (1 << 1)
1014 #define CH2_RFIR (1 << 0)
1019 #define TX_FIR_GAIN_6DB (1 << 0)
1020 #define FIR_START_CLK (1 << 1)
1021 #define FIR_WRITE (1 << 2)
1022 #define FIR_SELECT(x) (((x) & 0x3) << 3)
1023 #define FIR_NUM_TAPS(x) (((x) & 0x7) << 5)
1028 #define TX_MON_TRACK (1 << 5)
1029 #define TX_MON_LOW_GAIN(x) (((x) & 0x1F) << 0)
1034 #define TX_MON_HIGH_GAIN(x) (((x) & 0x1F) << 0)
1039 #define TX_LEVEL_THRESH(x) (((x) & 0x3F) << 2)
1040 #define TX_MON_DELAY_COUNTER(x) (((x) & 0x3) << 0)
1045 #define TX_RSSI_2 (1 << 1)
1046 #define TX_RSSI_1 (1 << 0)
1051 #define TX2_MON_ENABLE (1 << 7)
1052 #define TX1_MON_ENABLE (1 << 5)
1053 #define ONE_SHOT_MODE (1 << 6)
1054 #define TX_MON_DURATION(x) (((x) & 0xF) << 0)
1059 #define TX_MON_1_LO_CM(x) (((x) & 0x3F) << 2)
1060 #define TX_MON_1_GAIN(x) (((x) & 0x3) << 0)
1065 #define TX_MON_2_LO_CM(x) (((x) & 0x3F) << 2)
1066 #define TX_MON_2_GAIN(x) (((x) & 0x3) << 0)
1071 #define TX_1_ATTEN (1 << 0)
1076 #define TX_2_ATTEN (1 << 0)
1081 #define MASK_CLR_ATTEN_UPDATE (1 << 6)
1082 #define TX_ATTEN_OFFSET(x) (((x) & 0x3F) << 0)
1087 #define SEL_TX1_TX2 (1 << 6)
1092 #define IMMEDIATELY_UPDATE_TPC_ATTEN (1 << 6)
1097 #define TX_1_SYMBOL_ATTEN(x) (((x) & 0x7F) << 0)
1102 #define TX_2_SYMBOL_ATTEN(x) (((x) & 0x7F) << 0)
1107 #define USE_TX1_PIN_SYMBOL_ATTEN (1 << 3)
1108 #define USE_CTRL_IN_FOR_SYMBOL_ATTEN (1 << 1)
1109 #define ENABLE_SYMBOL_ATTEN (1 << 0)
1114 #define FORCE_OUT_2_TX2_OFFSET (1 << 7)
1115 #define FORCE_OUT_2_TX1_OFFSET (1 << 6)
1116 #define FORCE_OUT_2_TX2_PHASE_GAIN (1 << 5)
1117 #define FORCE_OUT_2_TX1_PHASE_GAIN (1 << 4)
1118 #define FORCE_OUT_1_TX2_OFFSET (1 << 3)
1119 #define FORCE_OUT_1_TX1_OFFSET (1 << 2)
1120 #define FORCE_OUT_1_TX2_PHASE_GAIN (1 << 1)
1121 #define FORCE_OUT_1_TX1_PHASE_GAIN (1 << 0)
1126 #define RX_NCO_FREQ(x) (((x) & 0x3) << 5)
1127 #define RX_NCO_PHASE_OFFSET(x) (((x) & 0x1F) << 0)
1132 #define FREE_RUN_ENABLE (1 << 7)
1133 #define SETTLE_MAIN_ENABLE (1 << 6)
1134 #define DC_OFFSET_ENABLE (1 << 5)
1135 #define GAIN_ENABLE (1 << 4)
1136 #define PHASE_ENABLE (1 << 3)
1137 #define QUAD_CAL_SOFT_RESET (1 << 2)
1138 #define M_DECIM(x) (((x) & 0x3) << 0)
1143 #define KEXP_TX(x) (((x) & 0x3) << 6)
1144 #define KEXP_TX_COMP(x) (((x) & 0x3) << 4)
1145 #define KEXP_DC_I(x) (((x) & 0x3) << 2)
1146 #define KEXP_DC_Q(x) (((x) & 0x3) << 0)
1151 #define INVERT_I_DATA (1 << 5)
1152 #define INVERT_Q_DATA (1 << 4)
1153 #define TX_NCO_FREQ(x) (((x) & 0x3) << 6)
1154 #define KEXP_PHASE(x) (((x) & 0x3) << 2)
1155 #define KEXP_AMP(x) (((x) & 0x3) << 0)
1160 #define TX1_LO_CONV (1 << 1)
1161 #define TX1_SSB_CONV (1 << 0)
1162 #define TX1_CONVERGENCE_COUNT(x) (((x) & 0x3F) << 2)
1167 #define TX2_LO_CONV (1 << 1)
1168 #define TX2_SSB_CONV (1 << 0)
1169 #define TX2_CONVERGENCE_COUNT(x) (((x) & 0x3F) << 2)
1174 #define RX_FULL_TABLELMT_TABLE_GAIN(x) (((x) & 0x7F) << 0)
1179 #define GM_STAGE_TIME_CON_OVERRIDE (1 << 5)
1180 #define GM_STAGE_MV_HP_POLE (1 << 4)
1181 #define GM_STAGE_LOWER_CM (1 << 3)
1182 #define BYPASS_BIAS_R (1 << 0)
1183 #define VBIAS_CTRL(x) (((x) & 0x3) << 1)
1188 #define THRESH_ACCUMULATOR(x) (((x) & 0xF) << 0)
1193 #define RX_LPF_GAIN(x) (((x) & 0x1F) << 0)
1198 #define TXDAC_VDS_I(x) (((x) & 0x3F) << 0)
1203 #define TXDAC_VDS_Q(x) (((x) & 0x3F) << 0)
1208 #define TXDAC_GN_I(x) (((x) & 0x3F) << 0)
1213 #define TXDAC_GN_Q(x) (((x) & 0x3F) << 0)
1218 #define OPAMPA_OUTPUT_BIAS(x) (((x) & 0x3) << 5)
1219 #define OPAMPA_RZ(x) (((x) & 0x3) << 3)
1220 #define OPAMP_A_CC(x) (((x) & 0x7) << 0)
1225 #define OPAMPB_OUTPUT_BIAS(x) (((x) & 0x3) << 5)
1226 #define OPAMPB_RZ(x) (((x) & 0x3) << 3)
1227 #define OPAMP_B_CC(x) (((x) & 0x7) << 0)
1232 #define OVERRIDE_ENABLE (1 << 7)
1233 #define R1(x) (((x) & 0x1F) << 0)
1238 #define R2(x) (((x) & 0x1F) << 0)
1243 #define R3(x) (((x) & 0x1F) << 0)
1248 #define R4(x) (((x) & 0x1F) << 0)
1253 #define RP(x) (((x) & 0x1F) << 0)
1258 #define C1(x) (((x) & 0x3F) << 0)
1263 #define C2(x) (((x) & 0x3F) << 0)
1268 #define CP(x) (((x) & 0x3F) << 0)
1273 #define PD_TUNE (1 << 2)
1274 #define TUNER_RESAMPLE (1 << 1)
1275 #define TUNER_RESAMPLE_PHASE (1 << 0)
1276 #define TUNE_CTRL(x) (((x) & 0x3) << 5)
1281 #define TX_BBF_BYPASS_BIAS_R (1 << 7)
1282 #define R2B_OVR (1 << 5)
1283 #define R2B(x) (((x) & 0x1F) << 0)
1288 #define BBF1_COMP_I (1 << 3)
1289 #define BBF1_COMP_Q (1 << 2)
1290 #define BBF2_COMP_I (1 << 1)
1291 #define BBF2_COMP_Q (1 << 0)
1296 #define BIAS(x) (((x) & 0x3) << 6)
1297 #define RGM(x) (((x) & 0x3) << 4)
1298 #define CC(x) (((x) & 0x3) << 2)
1299 #define AMPBIAS(x) (((x) & 0x3) << 0)
1304 #define RESISTOR(x) (((x) & 0xF) << 0)
1309 #define CAPACITOR(x) (((x) & 0x3F) << 0)
1314 #define LO_COMMON_MODE(x) (((x) & 0x3) << 5)
1319 #define EVALTIME (1 << 4)
1320 #define TX_BBF_TUNE_DIVIDER (1 << 0)
1321 #define TUNE_COMP_MASK(x) (((x) & 0x3) << 5)
1322 #define TUNER_MODE(x) (((x) & 0x7) << 1)
1327 #define WRITE_RX (1 << 2)
1328 #define START_RX_CLOCK (1 << 1)
1329 #define NUMBER_OF_TAPS(x) (((x) & 0x7) << 5)
1330 #define SELECT_RX_CH(x) (((x) & 0x3) << 3)
1335 #define FILTER_GAIN(x) (((x) & 0x3) << 0)
1340 #define DEC_PWR_FOR_LOW_PWR (1 << 7)
1341 #define DEC_PWR_FOR_LOCK_LEVEL (1 << 6)
1342 #define DEC_PWR_FOR_GAIN_LOCK_EXIT (1 << 5)
1343 #define SLOW_ATTACK_HYBRID_MODE (1 << 4)
1344 #define RX2_GAIN_CTRL_SETUP(x) (((x) & 0x3) << 2)
1345 #define RX1_GAIN_CTRL_SETUP(x) (((x) & 0x3) << 0)
1346 #define RX_GAIN_CTL_MASK 0x03
1347 #define RX2_GAIN_CTRL_SHIFT 2
1348 #define RX1_GAIN_CTRL_SHIFT 0
1349 #define RX_GAIN_CTL_MGC 0x00
1350 #define RX_GAIN_CTL_AGC_FAST_ATK 0x01
1351 #define RX_GAIN_CTL_AGC_SLOW_ATK 0x02
1352 #define RX_GAIN_CTL_AGC_SLOW_ATK_HYBD 0x03
1357 #define AGC_SOFT_RESET (1 << 7)
1358 #define AGC_GAIN_UNLOCK_CTRL (1 << 6)
1359 #define AGC_USE_FULL_GAIN_TABLE (1 << 3)
1360 #define DIG_GAIN_EN (1 << 2)
1361 #define MAN_GAIN_CTRL_RX2 (1 << 1)
1362 #define MAN_GAIN_CTRL_RX1 (1 << 0)
1367 #define INCDEC_LMT_GAIN (1 << 4)
1368 #define USE_AGC_FOR_LMTLPF_GAIN (1 << 3)
1369 #define MANUAL_INCR_STEP_SIZE(x) (((x) & 0x7) << 5)
1370 #define ADC_OVERRANGE_SAMPLE_SIZE(x) (((x) & 0x7) << 0)
1375 #define MAXIMUM_FULL_TABLELMT_TABLE_INDEX(x) (((x) & 0x7F) << 0)
1380 #define MANUAL_CTRL_IN_DECR_GAIN_STP_SIZE(x) (((x) & 0x7) << 5)
1381 #define PEAK_OVERLOAD_WAIT_TIME(x) (((x) & 0x1F) << 0)
1386 #define DIG_GAIN_STP_SIZE(x) (((x) & 0x7) << 5)
1387 #define MAXIMUM_DIGITAL_GAIN(x) (((x) & 0x1F) << 0)
1392 #define ENABLE_DIG_SAT_OVRG (1 << 7)
1393 #define AGC_LOCK_LEVEL_FAST_AGC_INNER_HIGH_THRESH_SLOW(x) (((x) & 0x7F) << 0)
1398 #define LMT_DETECTOR_SETTLING_TIME(x) (((x) & 0x7) << 5)
1399 #define DEC_STP_SIZE_FOR_LARGE_LMT_OVERLOAD(x) (((x) & 0x7) << 2)
1400 #define ADC_NOISE_CORRECTION_FACTOR(x) (((x) & 0x3) << 0)
1405 #define DECREMENT_STP_SIZE_FOR_SMALL_LPF_GAIN_CHANGE(x) (((x) & 0x7) << 4)
1406 #define LARGE_LPF_GAIN_STEP(x) (((x) & 0xF) << 0)
1411 #define FORCE_PD_RESET_RX2 (1 << 7)
1412 #define FORCE_PD_RESET_RX1 (1 << 6)
1413 #define SMALL_LMT_OVERLOAD_THRESH(x) (((x) & 0x3F) << 0)
1418 #define LARGE_LMT_OVERLOAD_THRESH(x) (((x) & 0x3F) << 0)
1423 #define POWER_MEAS_IN_STATE_5_MSB (1 << 7)
1424 #define RX1_MANUAL_FULL_TABLE_LMT_TABLE_GAIN_INDEX(x) (((x) & 0x7F) << 0)
1425 #define RX_FULL_TBL_IDX_MASK RX1_MANUAL_FULL_TABLE_LMT_TABLE_GAIN_INDEX(~0)
1430 #define POWER_MEAS_IN_STATE_5(x) (((x) & 0x7) << 5)
1431 #define RX1_MANUAL_LPF_GAIN(x) (((x) & 0x1F) << 0)
1432 #define RX_LPF_IDX_MASK RX1_MANUAL_LPF_GAIN(~0)
1437 #define FORCE_RX1_DIGITAL_GAIN (1 << 5)
1438 #define RX1_MANUALFORCED_DIGITAL_GAIN(x) (((x) & 0x1F) << 0)
1439 #define RX_DIGITAL_IDX_MASK RX1_MANUALFORCED_DIGITAL_GAIN(~0)
1443 #define RX2_MANUAL_FULL_TABLE_LMT_TABLE_GAIN_INDEX(x) (((x) & 0x7F) << 0)
1448 #define RX2_MANUAL_LPF_GAIN(x) (((x) & 0x1F) << 0)
1453 #define FORCE_RX2_DIGITAL_GAIN (1 << 5)
1454 #define RX2_MANUALFORCED_DIGITAL_GAIN(x) (((x) & 0x1F) << 0)
1459 #define ENABLE_GAIN_INC_AFTER_GAIN_LOCK (1 << 7)
1460 #define GOTO_OPT_GAIN_IF_ENERGY_LOST_OR_EN_AGC_HIGH (1 << 6)
1461 #define GOTO_SET_GAIN_IF_EN_AGC_HIGH (1 << 5)
1462 #define GOTO_SET_GAIN_IF_EXIT_RX_STATE (1 << 4)
1463 #define DONT_UNLOCK_GAIN_IF_ENERGY_LOST (1 << 3)
1464 #define GOTO_OPTIMIZED_GAIN_IF_EXIT_RX_STATE (1 << 2)
1465 #define DONT_UNLOCK_GAIN_IF_LG_ADC_OR_LMT_OVRG (1 << 1)
1466 #define ENABLE_INCR_GAIN (1 << 0)
1471 #define USE_LAST_LOCK_LEVEL_FOR_SET_GAIN (1 << 7)
1472 #define ENABLE_LMT_GAIN_INC_FOR_LOCK_LEVEL (1 << 6)
1473 #define GOTO_MAX_GAIN_OR_OPT_GAIN_IF_EN_AGC_HIGH (1 << 5)
1474 #define SETTLING_DELAY(x) (((x) & 0x1F) << 0)
1479 #define POST_LOCK_LEVEL_STP_SIZE_FOR_LPF_TABLE_FULL_TABLE(x) (((x) & 0x3) << 6)
1480 #define ENERGY_LOST_THRESH(x) (((x) & 0x3F) << 0)
1485 #define POST_LOCK_LEVEL_STP_FOR_LMT_TABLE(x) (((x) & 0x3) << 6)
1486 #define STRONGER_SIGNAL_THRESH(x) (((x) & 0x3F) << 0)
1491 #define DONT_UNLOCK_GAIN_IF_ADC_OVRG (1 << 7)
1492 #define LOW_POWER_THRESH(x) (((x) & 0x7F) << 0)
1497 #define DONT_UNLOCK_GAIN_IF_STRONGER_SIGNAL (1 << 7)
1502 #define FINAL_OVER_RANGE_COUNT(x) (((x) & 0x7) << 5)
1503 #define OPTIMIZE_GAIN_OFFSET(x) (((x) & 0xF) << 0)
1508 #define INCREMENT_GAIN_STP_LPFLMT(x) (((x) & 0x7) << 5)
1509 #define ENERGY_DETECT_COUNT(x) (((x) & 0x1F) << 0)
1514 #define AGCLL_MAX_INCREASE(x) (((x) & 0x3F) << 0)
1519 #define GAIN_LOCK_EXIT_COUNT(x) (((x) & 0x3F) << 0)
1524 #define INITIAL_LMT_GAIN_LIMIT(x) (((x) & 0x7F) << 0)
1529 #define PREVENT_GAIN_INC (1 << 7)
1530 #define AGC_INNER_LOW_THRESH(x) (((x) & 0x7F) << 0)
1535 #define LARGE_LMT_OVERLOAD_EXED_COUNTER(x) (((x) & 0xF) << 4)
1536 #define SMALL_LMT_OVERLOAD_EXED_COUNTER(x) (((x) & 0xF) << 0)
1541 #define LARGE_ADC_OVERLOAD_EXED_COUNTER(x) (((x) & 0xF) << 4)
1542 #define SMALL_ADC_OVERLOAD_EXED_COUNTER(x) (((x) & 0xF) << 0)
1547 #define IMMED_GAIN_CHANGE_IF_LG_LMT_OVERLOAD (1 << 7)
1548 #define IMMED_GAIN_CHANGE_IF_LG_ADC_OVERLOAD (1 << 3)
1549 #define AGC_INNER_HIGH_THRESH_EXED_STP_SIZE(x) (((x) & 0x7) << 4)
1550 #define AGC_INNER_LOW_THRESH_EXED_STP_SIZE(x) (((x) & 0x7) << 0)
1555 #define DOUBLE_GAIN_COUNTER (1 << 5)
1556 #define ENABLE_SYNC_FOR_GAIN_COUNTER (1 << 4)
1557 #define DIG_SATURATION_EXED_COUNTER(x) (((x) & 0xF) << 0)
1562 #define AGC_OUTER_HIGH_THRESH(x) (((x) & 0xF) << 4)
1563 #define AGC_OUTER_LOW_THRESH(x) (((x) & 0xF) << 0)
1568 #define AGC_OUTER_HIGH_THRESH_EXED_STP_SIZE(x) (((x) & 0xF) << 4)
1569 #define AGC_OUTER_LOW_THRESH_EXED_STP_SIZE(x) (((x) & 0xF) << 0)
1574 #define EXT_LNA_HIGH_GAIN(x) (((x) & 0x3F) << 0)
1579 #define EXT_LNA_LOW_GAIN(x) (((x) & 0x3F) << 0)
1584 #define GAIN_TABLE_ADDRESS(x) (((x) & 0x7F) << 0)
1589 #define EXT_LNA_CTRL (1 << 7)
1590 #define LNA_GAIN(x) (((x) & 0x3) << 5)
1591 #define MIXER_GM_GAIN(x) (((x) & 0x1F) << 0)
1596 #define TIA_GAIN (1 << 5)
1597 #define LPF_GAIN(x) (((x) & 0x1F) << 0)
1602 #define RF_DC_CAL (1 << 5)
1603 #define DIGITAL_GAIN(x) (((x) & 0x1F) << 0)
1608 #define TO_LNA_GAIN(x) (((x) >> 5) & 0x3)
1609 #define TO_MIXER_GM_GAIN(x) (((x) >> 0) & 0x1F)
1614 #define TO_LPF_GAIN(x) (((x) >> 0) & 0x1F)
1619 #define TO_DIGITAL_GAIN(x) (((x) >> 0) & 0x1F)
1624 #define WRITE_GAIN_TABLE (1 << 2)
1625 #define START_GAIN_TABLE_CLOCK (1 << 1)
1626 #define RECEIVER_SELECT(x) (((x) & 0x3) << 3)
1634 #define GM_SUB_TABLE_GAIN_WRITE(x) (((x) & 0x7F) << 0)
1639 #define GM_SUB_TABLE_BIAS_WRITE(x) (((x) & 0x1F) << 0)
1644 #define GM_SUB_TABLE_CTRL_WRITE(x) (((x) & 0x3F) << 0)
1649 #define GM_SUB_TABLE_GAIN_READ(x) (((x) & 0x7F) << 0)
1654 #define GM_SUB_TABLE_BIAS_READ(x) (((x) & 0x1F) << 0)
1659 #define GM_SUB_TABLE_CTRL_READ(x) (((x) & 0x3F) << 0)
1664 #define WRITE_GM_SUB_TABLE (1 << 2)
1665 #define START_GM_SUB_TABLE_CLOCK (1 << 1)
1670 #define CALIB_TABLE_GAIN_DIFFERROR_WORD(x) (((x) & 0x3F) << 0)
1675 #define CALIB_TABLE_GAIN_ERROR(x) (((x) & 0x1F) << 0)
1680 #define READ_SELECT (1 << 4)
1681 #define WRITE_MIXER_ERROR_TABLE (1 << 3)
1682 #define WRITE_LNA_ERROR_TABLE (1 << 2)
1683 #define WRITE_LNA_GAIN_DIFF (1 << 1)
1684 #define START_CALIB_TABLE_CLOCK (1 << 0)
1685 #define CALIB_TABLE_SELECT(x) (((x) & 0x3) << 5)
1690 #define LNA_CALIB_TABLE_GAIN_DIFFERENCE_WORD(x) (((x) & 0x3F) << 0)
1695 #define MAX_MIXER_CALIBRATION_GAIN_INDEX(x) (((x) & 0x1F) << 0)
1700 #define ENABLE_DIG_GAIN_CORR (1 << 7)
1701 #define FORCE_TEMP_SENSOR_FOR_CAL (1 << 6)
1702 #define SETTLE_TIME(x) (((x) & 0x3F) << 0)
1707 #define GAIN_CAL_MEAS_DURATION(x) (((x) & 0xF) << 0)
1712 #define MEASUREMENT_DURATION_1(x) (((x) & 0xF) << 4)
1713 #define MEASUREMENT_DURATION_0(x) (((x) & 0xF) << 0)
1718 #define MEASUREMENT_DURATION_3(x) (((x) & 0xF) << 4)
1719 #define MEASUREMENT_DURATION_2(x) (((x) & 0xF) << 0)
1724 #define START_RSSI_MEAS (1 << 5)
1725 #define ENABLE_ADC_POWER_MEAS (1 << 1)
1726 #define DEFAULT_RSSI_MEAS_MODE (1 << 0)
1727 #define RFIR_FOR_RSSI_MEASUREMENT(x) (((x) & 0x3) << 6)
1728 #define RSSI_MODE_SELECT(x) (((x) & 0x7) << 2)
1733 #define ADC_POWER_MEASUREMENT_DURATION_1(x) (((x) & 0xF) << 4)
1734 #define ADC_POWER_MEASUREMENT_DURATION_0(x) (((x) & 0xF) << 0)
1739 #define USE_HB3_OUT_FOR_ADC_PWR_MEAS (1 << 7)
1740 #define USE_HB1_OUT_FOR_DEC_PWR_MEAS (1 << 6)
1741 #define ENABLE_DEC_PWR_MEAS (1 << 5)
1742 #define DEFAULT_MODE_ADC_POWER (1 << 4)
1743 #define DEC_POWER_MEASUREMENT_DURATION(x) (((x) & 0xF) << 0)
1748 #define DB_GAIN_READBACK_CHANNEL (1 << 0)
1749 #define MAX_LNA_GAIN(x) (((x) & 0x7F) << 1)
1754 #define RX_QUAD_CAL_LEVEL(x) (((x) & 0xF) << 0)
1759 #define ENABLE_PHASE_CORR (1 << 7)
1760 #define ENABLE_GAIN_CORR (1 << 6)
1761 #define USE_SETTLE_COUNT_FOR_DC_CAL_WAIT (1 << 5)
1762 #define FIXED_DC_CAL_WAIT_TIME (1 << 4)
1763 #define FREE_RUN_MODE (1 << 3)
1764 #define ENABLE_CORR_WORD_DECIMATION (1 << 2)
1765 #define ENABLE_TRACKING_MODE_CH2 (1 << 1)
1766 #define ENABLE_TRACKING_MODE_CH1 (1 << 0)
1771 #define SOFT_RESET (1 << 7)
1772 #define CALIBRATION_CONFIG2_DFLT (0x3 << 5)
1773 #define K_EXP_PHASE(x) (((x) & 0x1F) << 0)
1778 #define PREVENT_POS_LOOP_GAIN (1 << 7)
1779 #define K_EXP_AMPLITUDE(x) (((x) & 0x1F) << 0)
1784 #define RX_FULL_TABLELMT_TABLE_GAIN(x) (((x) & 0x7F) << 0)
1789 #define CORRECTION_WORD_DECIMATION_M(x) (((x) & 0x7) << 5)
1790 #define RX_LPF_GAIN(x) (((x) & 0x1F) << 0)
1795 #define RX1_INPUT_A_I_DC_OFFSET_LSB(x) (((x) & 0x3F) << 2)
1796 #define RX1_INPUT_A_Q_DC_OFFSET(x) (((x) & 0x3) << 0)
1801 #define RX2_INPUT_A_Q_DC_OFFSET_LSB(x) (((x) & 0xF) << 4)
1802 #define RX1_INPUT_A_I_DC_OFFSET_MSB(x) (((x) & 0xF) << 0)
1807 #define RX2_INPUT_A_I_DC_OFFSET(x) (((x) & 0x3) << 6)
1808 #define RX2_INPUT_A_Q_DC_OFFSET_MSB(x) (((x) & 0x3F) << 0)
1813 #define RX1_INPUT_BC_I_DC_OFFSET_LSB(x) (((x) & 0x3F) << 2)
1814 #define RX1_INPUT_BC_Q_DC_OFFSET(x) (((x) & 0x3) << 0)
1819 #define RX2_INPUT_BC_Q_DC_OFFSET_LSB(x) (((x) & 0xF) << 4)
1820 #define RX1_INPUT_BC_I_DC_OFFSET_MSB(x) (((x) & 0xF) << 0)
1825 #define RX2_INPUT_BC_I_DC_OFFSET(x) (((x) & 0x3) << 6)
1826 #define RX2_INPUT_BC_Q_DC_OFFSET_MSB(x) (((x) & 0x3F) << 0)
1831 #define RX2_INPUT_BC_FORCE_OFFSET (1 << 7)
1832 #define RX1_INPUT_BC_FORCE_OFFSET (1 << 6)
1833 #define RX2_INPUT_BC_FORCE_PHGAIN (1 << 5)
1834 #define RX1_INPUT_BC_FORCE_PHGAIN (1 << 4)
1835 #define RX2_INPUT_A_FORCE_OFFSET (1 << 3)
1836 #define RX1_INPUT_A_FORCE_OFFSET (1 << 2)
1837 #define RX2_INPUT_A_FORCE_PHGAIN (1 << 1)
1838 #define RX1_INPUT_A_FORCE_PHGAIN (1 << 0)
1843 #define DAC_FS(x) (((x) & 0x3) << 4)
1844 #define RF_DC_CALIBRATION_COUNT(x) (((x) & 0xF) << 0)
1849 #define RF_DC_OFFSET_TABLE_UPDATE_COUNT(x) (((x) & 0x7) << 5)
1850 #define RF_DC_OFFSET_ATTEN(x) (((x) & 0x1F) << 0)
1855 #define INVERT_RX2_RF_DC_CGIN_WORD (1 << 7)
1856 #define INVERT_RX1_RF_DC_CGIN_WORD (1 << 6)
1857 #define INVERT_RX2_RF_DC_CGOUT_WORD (1 << 5)
1858 #define INVERT_RX1_RF_DC_CGOUT_WORD (1 << 4)
1863 #define USE_WAIT_COUNTER_FOR_RF_DC_INIT_CAL (1 << 7)
1864 #define ENABLE_FAST_SETTLE_MODE (1 << 6)
1865 #define ENABLE_BB_DC_OFFSET_TRACKING (1 << 5)
1866 #define RESET_ACC_ON_GAIN_CHANGE (1 << 4)
1867 #define ENABLE_RF_OFFSET_TRACKING (1 << 3)
1868 #define DC_OFFSET_UPDATE(x) (((x) & 0x7) << 0)
1873 #define RF_MINIMUM_CALIBRATION_GAIN_INDEX(x) (((x) & 0x7F) << 0)
1878 #define RF_SOI_THRESH(x) (((x) & 0x7F) << 0)
1883 #define INCREASE_COUNT_DURATION (1 << 7)
1884 #define BB_TRACKING_DECIMATE(x) (((x) & 0x3) << 5)
1885 #define BB_DC_M_SHIFT(x) (((x) & 0x1F) << 0)
1890 #define READ_BACK_CH_SEL (1 << 7)
1891 #define UPDATE_TRACKING_WORD (1 << 6)
1892 #define FORCE_RX_NULL (1 << 5)
1893 #define BB_DC_TRACKING_FAST_SETTLE_M_SHIFT(x) (((x) & 0x1F) << 0)
1898 #define BB_DC_OFFSET_ATTEN(x) (((x) & 0xF) << 0)
1903 #define RX1_BB_DC_OFFSET_CORRECTION_WORD_I(x) (((x) & 0x7F) << 0)
1908 #define RX1_BB_DC_OFFSET_CORRECTION_WORD_Q(x) (((x) & 0x7F) << 0)
1913 #define RX2_BB_DC_OFFSET_CORRECTION_WORD_I(x) (((x) & 0x7F) << 0)
1918 #define RX2_BB_DC_OFFSET_CORRECTION_WORD_Q(x) (((x) & 0x7F) << 0)
1923 #define RX1RX2_BB_DC_OFFSET_TRACKING_CORRECTION_WORD_I(x) (((x) & 0x7F) << 0)
1928 #define RX1RX2_BB_DC_OFFSET_TRACKING_CORRECTION_WORD_Q(x) (((x) & 0x7F) << 0)
1933 #define RX2_RSSI_SYMBOL (1 << 1)
1934 #define RX1_RSSI_SYMBOL (1 << 0)
1939 #define RX2_RSSI_PREAMBLE (1 << 1)
1940 #define RX1_RSSI_PREAMBLE (1 << 0)
1946 #define RSSI_LSB_SHIFT 1
1947 #define RSSI_LSB_MASK1 0x01
1948 #define RSSI_LSB_MASK2 0x02
1953 #define RX_PATH_GAIN (1 << 0)
1958 #define FORCE_RX2_LNA_GAIN (1 << 7)
1959 #define RX2_LNA_BYPASS (1 << 6)
1960 #define FORCE_RX1_LNA_GAIN (1 << 3)
1961 #define RX1_LNA_BYPASS (1 << 2)
1962 #define RX2_LNA_GAIN(x) (((x) & 0x3) << 4)
1963 #define RX1_LNA_GAIN(x) (((x) & 0x3) << 0)
1968 #define RX_LNA_BIAS_COARSE(x) (((x) & 0xF) << 0)
1973 #define RX_LNA_PCASCODE_BIAS(x) (((x) & 0x7) << 5)
1974 #define RX_LNA_BIAS(x) (((x) & 0x1F) << 0)
1979 #define RX_LNA_P_CASCODE_BIAS_FINE(x) (((x) & 0x3) << 0)
1984 #define RX_MIX_GM_CM_OUT(x) (((x) & 0x7) << 5)
1985 #define RX_MIX_GM_PLOAD(x) (((x) & 0x3) << 0)
1990 #define FORCE_RX1_MIX_GM (1 << 6)
1991 #define RX1_MIX_GM_GAIN(x) (((x) & 0x3F) << 0)
1996 #define RX1_MIX_GM_BIAS(x) (((x) & 0x1F) << 0)
2001 #define FORCE_RX2_MIX_GM (1 << 6)
2002 #define RX2_MIX_GM_GAIN(x) (((x) & 0x3F) << 0)
2007 #define RX2_MIX_GM_BIAS(x) (((x) & 0x1F) << 0)
2012 #define INPUT_A_RX1_Q(x) (((x) & 0x3) << 6)
2013 #define INPUT_A_RX1_I(x) (((x) & 0x3) << 4)
2014 #define INPUT_A_RX2_I(x) (((x) & 0x3) << 2)
2015 #define INPUT_A_RX2_Q(x) (((x) & 0x3) << 0)
2020 #define INPUTS_BC_RX1_Q(x) (((x) & 0x3) << 6)
2021 #define INPUTS_BC_RX1_I(x) (((x) & 0x3) << 4)
2022 #define INPUTS_BC_RX2_I(x) (((x) & 0x3) << 2)
2023 #define INPUTS_BC_RX2_Q(x) (((x) & 0x3) << 0)
2028 #define FORCE_CGIN_DAC (1 << 2)
2033 #define RX_MIX_LO_CM(x) (((x) & 0x3F) << 0)
2038 #define RX_CGB_SEG_ENABLE(x) (((x) & 0x3F) << 0)
2043 #define RX_CGB_INPUT_CM_SEL(x) (((x) & 0x3) << 4)
2044 #define RX_CGB_BIAS(x) (((x) & 0xF) << 0)
2049 #define TIA2_OVERRIDE_C (1 << 3)
2050 #define TIA2_OVERRIDE_R (1 << 2)
2051 #define TIA1_OVERRIDE_C (1 << 1)
2052 #define TIA1_OVERRIDE_R (1 << 0)
2053 #define TIA_SEL_CC(x) (((x) & 0x7) << 5)
2058 #define TIA1_RF(x) (((x) & 0x3) << 6)
2059 #define TIA1_C_LSB(x) (((x) & 0x3F) << 0)
2064 #define TIA1_C_MSB(x) (((x) & 0x7F) << 0)
2069 #define TIA2_RF(x) (((x) & 0x3) << 6)
2070 #define TIA2_C_LSB(x) (((x) & 0x3F) << 0)
2075 #define TIA2_C_MSB(x) (((x) & 0x7F) << 0)
2080 #define FORCE_RX1_RESISTORS (1 << 7)
2081 #define RX1_BBF_R1A(x) (((x) & 0x3F) << 0)
2086 #define FORCE_RX2_RESISTORS (1 << 7)
2087 #define RX2_BBF_R1A(x) (((x) & 0x3F) << 0)
2092 #define RX1_TUNE_RESAMPLE_PHASE (1 << 2)
2093 #define RX1_TUNE_RESAMPLE (1 << 1)
2094 #define RX1_PD_TUNE (1 << 0)
2099 #define RX2_TUNE_RESAMPLE_PHASE (1 << 2)
2100 #define RX2_TUNE_RESAMPLE (1 << 1)
2101 #define RX2_PD_TUNE (1 << 0)
2106 #define TUNE_OVERRIDE (1 << 7)
2107 #define RX_BBF_R2346(x) (((x) & 0x7) << 0)
2112 #define RX_BBF_C1_MSB(x) (((x) & 0x3F) << 0)
2117 #define RX_BBF_C1_LSB(x) (((x) & 0x7F) << 0)
2122 #define RX_BBF_C2_MSB(x) (((x) & 0x3F) << 0)
2127 #define RX_BBF_C2_LSB(x) (((x) & 0x7F) << 0)
2132 #define RX_BBF_C3_MSB(x) (((x) & 0x3F) << 0)
2137 #define RX_BBF_C3_LSB(x) (((x) & 0x7F) << 0)
2142 #define RX_BBF_CC1_CTR(x) (((x) & 0x7F) << 0)
2147 #define MUST_BE_ZERO (1 << 7)
2148 #define RX1_BBF_POW_CTR(x) (((x) & 0x3) << 5)
2149 #define RX_BBF_RZ1_CTR(x) (((x) & 0x3) << 3)
2154 #define RX_BBF_CC2_CTR(x) (((x) & 0x7F) << 0)
2159 #define RX_BBF_POW3_CTR(x) (((x) & 0x3) << 6)
2160 #define RX_BBF_RZ3_CTR(x) (((x) & 0x3) << 4)
2161 #define RX_BBF_POW2_CTR(x) (((x) & 0x3) << 2)
2162 #define RX_BBF_RZ2_CTR(x) (((x) & 0x3) << 0)
2167 #define RX_BBF_CC3_CTR(x) (((x) & 0x7F) << 0)
2172 #define RXBBF_BYPASS_BIAS_R (1 << 7)
2173 #define RX_BBF_R5_TUNE (1 << 4)
2174 #define RX1_BBF_TUNE_COMP_I (1 << 3)
2175 #define RX1_BBF_TUNE_COMP_Q (1 << 2)
2176 #define RX2_BBF_TUNE_COMP_I (1 << 1)
2177 #define RX2_BBF_TUNE_COMP_Q (1 << 0)
2178 #define RX_BBF_TUNE_CTR(x) (((x) & 0x3) << 5)
2183 #define RX1_BBF_FORCE_GAIN (1 << 5)
2184 #define RX1_BBF_BQ_GAIN(x) (((x) & 0x3) << 3)
2185 #define RX1_BBF_POLE_GAIN(x) (((x) & 0x7) << 0)
2190 #define RX2_BBF_FORCE_GAIN (1 << 5)
2191 #define RX2_BBF_BQ_GAIN(x) (((x) & 0x3) << 3)
2192 #define RX2_BBF_POLE_GAIN(x) (((x) & 0x7) << 0)
2197 #define RX_TUNE_EVALTIME (1 << 4)
2198 #define RX_BBF_TUNE_DIVIDE (1 << 0)
2199 #define TUNE_COMP_MASK(x) (((x) & 0x3) << 5)
2200 #define RX_TUNE_MODE(x) (((x) & 0x7) << 1)
2205 #define POLE_GAIN_TUNE(x) (((x) & 0x3) << 0)
2210 #define RX_TUNE_BBBW_MHZ(x) (((x) & 0x1F) << 0)
2215 #define RX_TUNE_BBBW_KHZ(x) (((x) & 0x7F) << 0)
2220 #define BYPASS_LD_SYNTH (1 << 0)
2225 #define SYNTH_INTEGER_WORD(x) (((x) & 0x7) << 0)
2230 #define SYNTH_FRACT_WORD(x) (((x) & 0x7F) << 0)
2235 #define VCO_CAL_OFFSET(x) (((x) & 0xF) << 3)
2240 #define INIT_ALC_VALUE(x) (((x) & 0xF) << 4)
2241 #define VCO_VARACTOR(x) (((x) & 0xF) << 0)
2246 #define PORB_VCO_LOGIC (1 << 6)
2247 #define VCO_OUTPUT_LEVEL(x) (((x) & 0xF) << 0)
2252 #define CHARGE_PUMP_CURRENT(x) (((x) & 0x3F) << 0)
2257 #define SYNTH_RECAL (1 << 7)
2262 #define HALF_VCO_CAL_CLK (1 << 7)
2263 #define CP_OFFSET_OFF (1 << 4)
2264 #define F_CPCAL (1 << 3)
2265 #define CP_CAL_ENABLE (1 << 2)
2270 #define LOOP_FILTER_C2(x) (((x) & 0xF) << 4)
2271 #define LOOP_FILTER_C1(x) (((x) & 0xF) << 0)
2276 #define LOOP_FILTER_R1(x) (((x) & 0xF) << 4)
2277 #define LOOP_FILTER_C3(x) (((x) & 0xF) << 0)
2282 #define LOOP_FILTER_BYPASS_R3 (1 << 7)
2283 #define LOOP_FILTER_BYPASS_R1 (1 << 6)
2284 #define LOOP_FILTER_BYPASS_C2 (1 << 5)
2285 #define LOOP_FILTER_BYPASS_C1 (1 << 4)
2286 #define LOOP_FILTER_R3(x) (((x) & 0xF) << 0)
2291 #define FORCED_CP_CAL_WORD(x) (((x) & 0xF) << 0)
2296 #define VCO_BIAS_TCF(x) (((x) & 0x3) << 3)
2297 #define VCO_BIAS_REF(x) (((x) & 0x7) << 0)
2302 #define CP_CAL_VALID (1 << 7)
2303 #define CP_CAL_DONE (1 << 5)
2304 #define VCO_CAL_BUSY (1 << 4)
2305 #define CP_CAL_WORD(x) (((x) & 0xF) << 0)
2310 #define VCO_CAL_REF_TCF(x) (((x) & 0x7) << 0)
2315 #define POWER_DOWN_VARACTOR_REF (1 << 3)
2316 #define PWR_DOWN_VARACT_REF_TCF (1 << 2)
2317 #define POWER_DOWN_CAL_TCF (1 << 1)
2318 #define POWER_DOWN_VCO_BUFFFER (1 << 0)
2323 #define CP_OVRG_HIGH (1 << 7)
2324 #define CP_OVRG_LOW (1 << 6)
2325 #define VCO_LOCK (1 << 1)
2330 #define VCO_LDO_BYPASS (1 << 7)
2331 #define VCO_LDO_INRUSH(x) (((x) & 0x3) << 5)
2332 #define VCO_LDO_SEL(x) (((x) & 0x7) << 2)
2333 #define VCO_LDO_VDROP_SEL(x) (((x) & 0x3) << 0)
2338 #define VCO_CAL_EN (1 << 7)
2339 #define VCO_CAL_ALC_WAIT(x) (((x) & 0x7) << 4)
2340 #define VCO_CAL_COUNT(x) (((x) & 0x3) << 2)
2345 #define LOCK_DETECT_COUNT(x) (((x) & 0x3) << 2)
2346 #define LOCK_DETECT_MODE(x) (((x) & 0x3) << 0)
2351 #define CP_LEVEL_DETECT_POWER_DOWN (1 << 6)
2352 #define CP_LEVEL_THRESH_LOW(x) (((x) & 0x7) << 3)
2353 #define CP_LEVEL_THRESH_HIGH(x) (((x) & 0x7) << 0)
2358 #define DSM_PROG(x) (((x) & 0xF) << 0)
2363 #define SIF_CLOCK (1 << 6)
2364 #define SIF_RESET_BAR (1 << 5)
2365 #define SIF_ADDR(x) (((x) & 0x1F) << 0)
2370 #define UPDATE_FREQ_WORD (1 << 7)
2371 #define READ_EFFECTIVE_TUNING_WORD (1 << 5)
2372 #define FREQ_CORRECTION_WORD_MSB(x) (((x) & 0x1F) << 0)
2377 #define UPDATE_FREQ_WORD (1 << 7)
2378 #define FREQ_CORRECTION_WORD_LSB(x) (((x) & 0x7F) << 0)
2383 #define VCO_VARACTOR_REFERENCE_TCF(x) (((x) & 0x7) << 4)
2384 #define VCO_VARACTOR_OFFSET(x) (((x) & 0xF) << 0)
2389 #define VCO_VARACTOR_REFERENCE(x) (((x) & 0xF) << 0)
2394 #define RX_FAST_LOCK_LOAD_SYNTH (1 << 3)
2395 #define RX_FAST_LOCK_PROFILE_INIT (1 << 2)
2396 #define RX_FAST_LOCK_PROFILE_PIN_SELECT (1 << 1)
2397 #define RX_FAST_LOCK_MODE_ENABLE (1 << 0)
2398 #define RX_FAST_LOCK_PROFILE(x) (((x) & 0x7) << 5)
2403 #define RX_FAST_LOCK_PROFILE_ADDR(x) (((x) & 0x7) << 4)
2404 #define RX_FAST_LOCK_PROFILE_WORD(x) (((x) & 0xF) << 0)
2410 #define RX_FAST_LOCK_PROGRAM_WRITE (1 << 1)
2411 #define RX_FAST_LOCK_PROGRAM_CLOCK_ENABLE (1 << 0)
2413 #define RX_FAST_LOCK_CONFIG_WORD_NUM 16
2418 #define RX_LO_GEN_POWER_MODE(x) (((x) & 0x3) << 4)
2423 #define DIV_TEST_EN (1 << 5)
2424 #define PFD_CLK_EDGE (1 << 1)
2425 #define BYPASS_LD_SYNTH (1 << 0)
2426 #define PFD_WIDTH(x) (((x) & 0x3) << 2)
2431 #define SDM_BYPASS (1 << 7)
2432 #define SDM_POWER_DOWN (1 << 6)
2433 #define SYNTH_INTEGER_WORD(x) (((x) & 0x7) << 0)
2438 #define SYNTH_FRACT_WORD(x) (((x) & 0x7F) << 0)
2443 #define FORCE_ALC_ENABLE (1 << 7)
2444 #define FORCE_ALC_WORD(x) (((x) & 0x7F) << 0)
2449 #define BYPASS_LOAD_DELAY (1 << 7)
2450 #define FORCE_VCO_TUNE_ENABLE (1 << 1)
2451 #define FORCE_VCO_TUNE (1 << 0)
2452 #define VCO_CAL_OFFSET(x) (((x) & 0xF) << 3)
2457 #define INIT_ALC_VALUE(x) (((x) & 0xF) << 4)
2458 #define VCO_VARACTOR(x) (((x) & 0xF) << 0)
2463 #define PORB_VCO_LOGIC (1 << 6)
2464 #define VCO_OUTPUT_LEVEL(x) (((x) & 0xF) << 0)
2469 #define TX_CP_CURRENT_DFLT (1 << 7)
2470 #define VTUNE_FORCE (1 << 6)
2471 #define CHARGE_PUMP_CURRENT(x) (((x) & 0x3F) << 0)
2476 #define SYNTH_RECAL (1 << 7)
2477 #define CHARGE_PUMP_OFFSET(x) (((x) & 0x3F) << 0)
2482 #define HALF_VCO_CAL_CLK (1 << 7)
2483 #define DITHER_MODE (1 << 6)
2484 #define CP_OFFSET_OFF (1 << 4)
2485 #define F_CPCAL (1 << 3)
2486 #define CP_CAL_ENABLE (1 << 2)
2487 #define CP_TEST(x) (((x) & 0x3) << 0)
2492 #define LOOP_FILTER_C2(x) (((x) & 0xF) << 4)
2493 #define LOOP_FILTER_C1(x) (((x) & 0xF) << 0)
2498 #define LOOP_FILTER_R1(x) (((x) & 0xF) << 4)
2499 #define LOOP_FILTER_C3(x) (((x) & 0xF) << 0)
2504 #define LOOP_FILTER_BYPASS_R3 (1 << 7)
2505 #define LOOP_FILTER_BYPASS_R1 (1 << 6)
2506 #define LOOP_FILTER_BYPASS_C2 (1 << 5)
2507 #define LOOP_FILTER_BYPASS_C1 (1 << 4)
2508 #define LOOP_FILTER_R3(x) (((x) & 0xF) << 0)
2513 #define NUMBER_SDM_DITHER_BITS(x) (((x) & 0xF) << 4)
2514 #define FORCED_CP_CAL_WORD(x) (((x) & 0xF) << 0)
2519 #define MUST_BE_ZEROS(x) (((x) & 0x3) << 5)
2520 #define VCO_BIAS_TCF(x) (((x) & 0x3) << 3)
2521 #define VCO_BIAS_REF(x) (((x) & 0x7) << 0)
2526 #define VCO_BYPASS_BIAS_DAC_R (1 << 7)
2527 #define VCO_COMP_BYPASS_BIAS_R (1 << 4)
2528 #define BYPASS_PRESCALE_R (1 << 3)
2529 #define LAST_ALC_ENABLE (1 << 2)
2530 #define PRESCALE_BIAS(x) (((x) & 0x3) << 0)
2535 #define CP_CAL_VALID (1 << 7)
2536 #define COMP_OUT (1 << 6)
2537 #define CP_CAL_DONE (1 << 5)
2538 #define VCO_CAL_BUSY (1 << 4)
2539 #define CP_CAL_WORD(x) (((x) & 0xF) << 0)
2544 #define VCO_CAL_REF_MONITOR (1 << 3)
2545 #define VCO_CAL_REF_TCF(x) (((x) & 0x7) << 0)
2550 #define POWER_DOWN_VARACTOR_REF (1 << 3)
2551 #define POWER_DOWN_VARACT_REF_TCF (1 << 2)
2552 #define POWER_DOWN_CAL_TCF (1 << 1)
2553 #define POWER_DOWN_VCO_BUFFFER (1 << 0)
2558 #define CP_OVRG_HIGH (1 << 7)
2559 #define CP_OVRG_LOW (1 << 6)
2560 #define VCO_LOCK (1 << 1)
2565 #define VCO_LDO_BYPASS (1 << 7)
2566 #define VCO_LDO_INRUSH(x) (((x) & 0x3) << 5)
2567 #define VCO_LDO_VOUT_SEL(x) (((x) & 0x7) << 2)
2568 #define VCO_LDO_VDROP_SEL(x) (((x) & 0x3) << 0)
2573 #define VCO_CAL_EN (1 << 7)
2574 #define VCO_CAL_ALC_WAIT(x) (((x) & 0x7) << 4)
2575 #define VCO_CAL_COUNT(x) (((x) & 0x3) << 2)
2576 #define FB_CLOCK_ADV(x) (((x) & 0x3) << 0)
2581 #define LOCK_DETECT_COUNT(x) (((x) & 0x3) << 2)
2582 #define LOCK_DETECT_MODE(x) (((x) & 0x3) << 0)
2587 #define CP_LEVEL_DETECT_POWER_DOWN (1 << 6)
2588 #define CP_LEVEL_DETECT_THRESH_LOW(x) (((x) & 0x7) << 3)
2589 #define CP_LEVEL_DETECT_THRESH_HIGH(x) (((x) & 0x7) << 0)
2594 #define DSM_PROG(x) (((x) & 0xF) << 0)
2599 #define SIF_CLOCK (1 << 6)
2600 #define SIF_RESET_BAR (1 << 5)
2601 #define SIF_ADDR(x) (((x) & 0x1F) << 0)
2606 #define UPDATE_FREQ_WORD (1 << 7)
2607 #define READ_EFFECTIVE_TUNING_WORD (1 << 5)
2608 #define FREQ_CORRECTION_WORD_MSB(x) (((x) & 0x1F) << 0)
2613 #define UPDATE_FREQ_WORD (1 << 7)
2614 #define FREQ_CORRECTION_WORD_LSB(x) (((x) & 0x7F) << 0)
2619 #define VCO_VARACTOR_REFERENCE_TCF(x) (((x) & 0x7) << 4)
2620 #define VCO_VARACTOR_OFFSET(x) (((x) & 0xF) << 0)
2625 #define VCO_VARACTOR_REFERENCE(x) (((x) & 0xF) << 0)
2630 #define DCXO_TUNE_COARSE(x) (((x) & 0x3F) << 0)
2635 #define DCXO_TUNE_FINE_LOW(x) (((x) & 0x1F) << 3)
2640 #define DCXO_TUNE_FINE_HIGH(x) ((x) >> 5)
2645 #define MUST_BE_ZERO (1 << 7)
2646 #define DCXO_RTAIL(x) (((x) & 0x7) << 4)
2647 #define DCXO_RD(x) (((x) & 0x3) << 2)
2652 #define DCXO_TEMPCO_EN (1 << 7)
2653 #define DCXO_TEMPCO_CLK (1 << 6)
2654 #define DCXO_TEMPERATURE_COEF_ADDRESS(x) (((x) & 0x3F) << 0)
2659 #define TX_FAST_LOCK_LOAD_SYNTH (1 << 3)
2660 #define TX_FAST_LOCK_PROFILE_INIT (1 << 2)
2661 #define TX_FAST_LOCK_PROFILE_PIN_SELECT (1 << 1)
2662 #define TX_FAST_LOCK_MODE_ENABLE (1 << 0)
2663 #define TX_FAST_LOCK_PROFILE(x) (((x) & 0x7) << 5)
2668 #define TX_FAST_LOCK_PROGRAM_WRITE (1 << 1)
2669 #define TX_FAST_LOCK_PROGRAM_CLOCK_ENABLE (1 << 0)
2674 #define TX_LO_GEN_POWER_MODE(x) (((x) & 0xF) << 4)
2679 #define POWER_DOWN_BANDGAP_REF (1 << 7)
2680 #define MASTER_BIAS_FILTER_BYPASS (1 << 6)
2681 #define MASTER_BIAS_REF_SEL (1 << 5)
2682 #define MASTER_BIAS_TRIM(x) (((x) & 0x1F) << 0)
2687 #define VCO_LDO_FILTER_BYPASS (1 << 7)
2688 #define VCO_LDO_REF_SEL (1 << 6)
2689 #define BANDGAP_REF_RESET (1 << 5)
2690 #define BANDGAP_TEMP_TRIM(x) (((x) & 0x1F) << 0)
2695 #define REF_DIVIDE_CONFIG_1_DFLT (1 << 2)
2696 #define RX_REF_RESET_BAR (1 << 1)
2697 #define RX_REF_DIVIDER_MSB (1 << 0)
2702 #define RX_REF_DIVIDER_LSB (1 << 7)
2703 #define TX_REF_RESET_BAR (1 << 4)
2704 #define RX_REF_DOUBLER_FB_DELAY(x) (((x) & 0x3) << 5)
2705 #define TX_REF_DIVIDER(x) (((x) & 0x3) << 2)
2706 #define TX_REF_DOUBLER_FB_DELAY(x) (((x) & 0x3) << 0)
2711 #define FULL_TABLE_GAIN_INDEX(x) (((x) & 0x7F) << 0)
2716 #define LPF_GAIN_RX(x) (((x) & 0x1F) << 0)
2721 #define DIGITAL_GAIN_RX(x) (((x) & 0x1F) << 0)
2726 #define FAST_ATTACK_STATE_RX2(x) (((x) & 0x7) << 4)
2727 #define FAST_ATTACK_STATE_RX1(x) (((x) & 0x7) << 0)
2728 #define FAST_ATK_MASK 0x7
2729 #define RX1_FAST_ATK_SHIFT 0
2730 #define RX2_FAST_ATK_SHIFT 4
2731 #define FAST_ATK_RESET 0
2732 #define FAST_ATK_PEAK_DETECT 1
2733 #define FAST_ATK_PWR_MEASURE 2
2734 #define FAST_ATK_FINAL_SETTELING 3
2735 #define FAST_ATK_FINAL_OVER 4
2736 #define FAST_ATK_GAIN_LOCKED 5
2741 #define SLOW_LOOP_STATE_RX2(x) (((x) & 0x7) << 4)
2742 #define SLOW_LOOP_STATE_RX1(x) (((x) & 0x7) << 0)
2748 #define GAIN_LOCK_1 (1 << 6)
2749 #define LOW_POWER_1 (1 << 5)
2750 #define LARGE_LMT_OL (1 << 4)
2751 #define SMALL_LMT_OL (1 << 3)
2752 #define LARGE_ADC_OL (1 << 2)
2753 #define SMALL_ADC_OL (1 << 1)
2754 #define DIG_SAT (1 << 0)
2758 #define CTRL_ENABLE (1 << 0)
2763 #define TONE_PRBS (1 << 1)
2764 #define BIST_ENABLE (1 << 0)
2765 #define TONE_FREQ(x) (((x) & 0x3) << 6)
2766 #define TONE_LEVEL(x) (((x) & 0x3) << 4)
2767 #define BIST_CTRL_POINT(x) (((x) & 0x3) << 2)
2772 #define DATA_PORT_SP_HD_LOOP_TEST_OE (1 << 7)
2773 #define RX_MASK (1 << 6)
2774 #define CHANNEL (1 << 5)
2775 #define DATA_PORT_LOOP_TEST_ENABLE (1 << 0)
2776 #define OBSERVATION_POINT(x) (((x) & 0xF) << 1)
2781 #define BIST_MASK_CHANNEL_2_Q_DATA (1 << 5)
2782 #define BIST_MASK_CHANNEL_2_I_DATA (1 << 4)
2783 #define BIST_MASK_CHANNEL_1_Q_DATA (1 << 3)
2784 #define BIST_MASK_CHANNEL_1_I_DATA (1 << 2)
2785 #define DATA_PORT_HILOW (1 << 1)
2786 #define USE_DATA_PORT (1 << 0)
2787 #define TEMP_SENSE_VBE_TEST(x) (((x) & 0x3) << 6)
2792 #define DAC_TEST_ENABLE (1 << 7)
2793 #define DAC_TEST_WORD(x) (((x) & 0x7F) << 0)
2798 #define AD_READ (0 << 15)
2799 #define AD_WRITE (1 << 15)
2800 #define AD_CNT(x) ((((x) - 1) & 0x7) << 12)
2801 #define AD_ADDR(x) ((x) & 0x3FF)
2808 #define RSSI_MULTIPLIER 100
2809 #define RSSI_RESOLUTION ((int) (0.25 * RSSI_MULTIPLIER))
2810 #define RSSI_MAX_WEIGHT 255
2812 #define MAX_LMT_INDEX 40
2813 #define MAX_LPF_GAIN 24
2814 #define MAX_DIG_GAIN 31
2816 #define MAX_BBPLL_FREF 70007000UL
2817 #define MIN_BBPLL_FREQ 714928500UL
2818 #define MAX_BBPLL_FREQ 1430143000UL
2819 #define MAX_BBPLL_DIV 64
2820 #define MIN_BBPLL_DIV 2
2828 #define MIN_ADC_CLK 25000000U
2830 #define MAX_ADC_CLK 640000000U
2831 #define MAX_DAC_CLK (MAX_ADC_CLK / 2)
2834 #define MAX_RX_HB1 245760000UL
2835 #define MAX_RX_HB2 320000000UL
2836 #define MAX_RX_HB3 640000000UL
2838 #define MAX_TX_HB1 160000000UL
2839 #define MAX_TX_HB2 320000000UL
2840 #define MAX_TX_HB3 320000000UL
2842 #define MAX_BASEBAND_RATE 61440000UL
2844 #define MAX_MBYTE_SPI 8
2846 #define RFPLL_MODULUS 8388593UL
2847 #define BBPLL_MODULUS 2088960UL
2849 #define MAX_SYNTH_FREF 80008000UL
2850 #define MIN_SYNTH_FREF 9999000UL
2851 #define MIN_VCO_FREQ_HZ 6000000000ULL
2852 #define MAX_CARRIER_FREQ_HZ 6000000000ULL
2853 #define MIN_RX_CARRIER_FREQ_HZ 70000000ULL
2854 #define MIN_TX_CARRIER_FREQ_HZ 46875001ULL
2856 #define AD9363A_MAX_CARRIER_FREQ_HZ 3800000000ULL
2857 #define AD9363A_MIN_CARRIER_FREQ_HZ 325000000ULL
2859 #define MAX_TX_ATTENUATION_DB 89750
3295 #define FASTLOOK_INIT 1
3341 #ifndef AXI_ADC_NOT_PRESENT
3438 uint8_t *rbuf, uint32_t num);
3441 uint32_t reg, uint32_t *val);
3443 uint32_t reg, uint32_t val);
3445 uint32_t reg, uint32_t val);
3461 uint32_t rf_rx_bw, uint32_t rf_tx_bw);
3463 uint32_t tx_sample_rate,
3465 uint32_t *rx_path_clks,
3466 uint32_t *tx_path_clks);
3468 uint32_t *rx_path_clks,
3469 uint32_t *tx_path_clks);
3471 uint32_t *rx_path_clks,
3472 uint32_t *tx_path_clks);
3479 enum fir_dest dest, int32_t gain_dB,
3480 uint32_t ntaps,
short *coef);
3483 bool tx1,
bool tx2,
bool immed);
3486 uint32_t parent_rate);
3491 uint32_t parent_rate);
3493 uint32_t parent_rate);
3497 uint32_t parent_rate);
3499 uint32_t parent_rate);
3504 uint32_t parent_rate);
3513 bool rfdc_track,
bool rxquad_track);
3521 uint32_t level_dB, uint32_t mask);
3524 uint32_t *level_dB, uint32_t *mask);
3526 uint32_t rx_inputs, uint32_t txb);
3535 uint32_t
profile, uint8_t *values);
3537 uint32_t
profile, uint8_t *values);
3544 int32_t
ad9361_find_opt(uint8_t *field, uint32_t size, uint32_t *ret_start);
3547 char *buf, int32_t buflen);
3558 uint32_t coarse, uint32_t fine);
#define REG_GAIN_UPDATE_COUNTER2
Definition: ad9361.h:257
#define REG_PREAMBLE_LSB
Definition: ad9361.h:364
int32_t ad9361_spi_read(struct no_os_spi_desc *spi, uint32_t reg)
Definition: ad9361.c:735
#define REG_GPO1_RX_DELAY
Definition: ad9361.h:85
#define ENABLE_BB_DC_OFFSET_TRACKING
Definition: ad9361.h:1865
uint8_t agc_inner_thresh_low
Definition: ad9361.h:2948
#define RX_MIX_GM_PLOAD(x)
Definition: ad9361.h:1985
#define REG_AGC_INNER_LOW_THRESH
Definition: ad9361.h:252
#define REG_DIGITAL_SAT_COUNTER
Definition: ad9361.h:258
#define TX2_MON_ENABLE
Definition: ad9361.h:1051
#define RSSI_MULTIPLIER
Definition: ad9361.h:2808
int32_t ad9361_rf_port_setup(struct ad9361_rf_phy *phy, bool is_out, uint32_t rx_inputs, uint32_t txb)
Definition: ad9361.c:3637
uint8_t lvds_bias_ctrl
Definition: ad9361.h:3065
bool gpo3_slave_rx_en
Definition: ad9361.h:3105
#define REG_GM_SUB_TABLE_CTRL_WRITE
Definition: ad9361.h:274
#define AD_ADDR(x)
Definition: ad9361.h:2801
#define REG_TX_FILTER_COEF_READ_DATA_1
Definition: ad9361.h:133
#define DIG_GAIN_EN
Definition: ad9361.h:1360
#define REG_GPO_FORCE_AND_INIT
Definition: ad9361.h:83
uint8_t lmt_overload_large_inc_steps
Definition: ad9361.h:2961
#define MAX_DIG_GAIN
Definition: ad9361.h:2814
#define REG_RX_ENABLE_FILTER_CTRL
Definition: ad9361.h:48
@ RF_GAIN_HYBRID_AGC
Definition: ad9361.h:2905
enum rx_gain_table_type tbl_type
Definition: ad9361.h:3052
#define ENSM_STATE_SLEEP
Definition: ad9361.h:764
#define REG_CTRL_OUTPUT_ENABLE
Definition: ad9361.h:97
#define LOOP_FILTER_R1(x)
Definition: ad9361.h:2498
int32_t ad9361_validate_enable_fir(struct ad9361_rf_phy *phy)
Definition: ad9361.c:6085
bool f_agc_rst_gla_large_lmt_overload_en
Definition: ad9361.h:3004
uint64_t start
Definition: ad9361.h:2878
#define REG_MAG_FTEST_THRESH
Definition: ad9361.h:180
uint8_t pp_conf[3]
Definition: ad9361.h:3061
#define REG_AUXDAC_2_CONFIG
Definition: ad9361.h:71
#define XO_BYPASS
Definition: ad9361.h:644
uint32_t div
Definition: ad9361.h:3418
#define REG_QUAD_CAL_STATUS_TX1
Definition: ad9361.h:182
#define MIN_VCO_FREQ_HZ
Definition: ad9361.h:2851
uint32_t fgt_lmt_index
Definition: ad9361.h:3219
bool bbdc_track_en
Definition: ad9361.h:3394
#define POWER_DOWN_RX_SYNTH
Definition: ad9361.h:729
#define REG_RSSI_CONFIG
Definition: ad9361.h:297
#define TX_REF_DIVIDER(x)
Definition: ad9361.h:2705
@ BB_REFCLK
Definition: ad9361.h:3261
#define AUXDAC_INIT_BAR(x)
Definition: ad9361.h:822
#define AGC_GAIN_UNLOCK_CTRL
Definition: ad9361.h:1358
uint32_t timeout
Definition: ad413x.c:49
#define REG_RX_TIA_CONFIG
Definition: ad9361.h:390
#define REG_TX_ATTEN_OFFSET
Definition: ad9361.h:151
int32_t ad9361_fastlock_load(struct ad9361_rf_phy *phy, bool tx, uint32_t profile, uint8_t *values)
Definition: ad9361.c:4998
#define ENABLE_ENSM_PIN_CTRL
Definition: ad9361.h:719
#define RX_REF_DIVIDER_LSB
Definition: ad9361.h:2702
Definition: ad9361_util.h:87
#define DUAL_SYNTH_MODE
Definition: ad9361.h:733
#define TX_LO_GEN_POWER_MODE(x)
Definition: ad9361.h:2674
#define ENABLE_CORR_WORD_DECIMATION
Definition: ad9361.h:1764
#define MANUAL_INCR_STEP_SIZE(x)
Definition: ad9361.h:1369
@ DBGFS_BIST_DT_ANALYSIS
Definition: ad9361.h:3429
#define no_os_min_t(type, x, y)
Definition: no_os_util.h:61
#define RX2_GAIN_CTRL_SETUP(x)
Definition: ad9361.h:1344
#define REG_RX_BBF_C3_MSB
Definition: ad9361.h:406
#define MAN_GAIN_CTRL_RX1
Definition: ad9361.h:1362
#define REG_VCO_PROGRAM_2
Definition: ad9361.h:117
Definition: ad9361.h:3301
Definition: ad9361.h:3285
#define REG_RX_CAL_STATUS
Definition: ad9361.h:479
void ad9361_get_bist_prbs(struct ad9361_rf_phy *phy, enum ad9361_bist_mode *mode)
Definition: ad9361.c:1215
bool elna_2_control_en
Definition: ad9361.h:3079
rx_gain_table_type
Definition: ad9361.h:2865
#define REG_EXT_LNA_HIGH_GAIN
Definition: ad9361.h:261
#define REG_RX_CP_OVERRANGE_VCO_LOCK
Definition: ad9361.h:482
#define REG_FAST_LOW_POWER_THRESH
Definition: ad9361.h:244
#define GPO_MANUAL_SELECT
Definition: ad9361.h:830
uint32_t ad9361_rfpll_int_recalc_rate(struct refclk_scale *clk_priv, uint32_t parent_rate)
Definition: ad9361.c:6778
#define FAST_ATK_MASK
Definition: ad9361.h:2728
int32_t ad9361_get_rx_gain(struct ad9361_rf_phy *phy, uint32_t rx_id, struct rf_rx_gain *rx_gain)
Definition: ad9361.c:1910
#define BIST_MASK_CHANNEL_1_I_DATA
Definition: ad9361.h:2784
int32_t ad9361_dig_tune(struct ad9361_rf_phy *phy, uint32_t max_freq, enum dig_tune_flags flags)
Definition: ad9361_conv.c:519
#define DOUBLE_GAIN_COUNTER
Definition: ad9361.h:1555
#define RX_FAST_LOCK_PROFILE_WORD(x)
Definition: ad9361.h:2404
#define REG_RX_BBF_TUNE_DIVIDE
Definition: ad9361.h:417
#define GOTO_OPTIMIZED_GAIN_IF_EXIT_RX_STATE
Definition: ad9361.h:1464
int32_t ad9361_fastlock_recall(struct ad9361_rf_phy *phy, bool tx, uint32_t profile)
Definition: ad9361.c:5173
bool immed_gain_change_if_large_lmt_overload
Definition: ad9361.h:2969
#define TO_MIXER_GM_GAIN(x)
Definition: ad9361.h:1609
int32_t ad9361_reg_write(struct ad9361_rf_phy *phy, uint32_t reg, uint32_t val)
Definition: ad9361.c:843
#define dev_err(dev, format,...)
Definition: ad9361_util.h:63
uint8_t LF_R1
Definition: ad9361.h:3248
uint8_t agc_inner_thresh_low_inc_steps
Definition: ad9361.h:2949
#define REG_MULTICHIP_SYNC_AND_TX_MON_CTRL
Definition: ad9361.h:46
#define FORCE_VCO_TUNE
Definition: ad9361.h:2451
#define RX_FAST_LOCK_PROGRAM_CLOCK_ENABLE
Definition: ad9361.h:2411
#define TEMP_SENSOR_DECIMATION(x)
Definition: ad9361.h:671
#define CLKOUT_SELECT(x)
Definition: ad9361.h:654
struct no_os_gpio_desc * gpio_desc_cal_sw2
Definition: ad9361.h:3340
int32_t ad9361_clk_factor_round_rate(struct refclk_scale *clk_priv, uint32_t rate, uint32_t *prate)
Definition: ad9361.c:6507
@ LUT_FTDD_ENT
Definition: ad9361.h:3257
#define AUX_ADC_DECIMATION(x)
Definition: ad9361.h:797
#define TX_BBF_TUNE_DIVIDER
Definition: ad9361.h:1320
#define VCO_LOCK
Definition: ad9361.h:2560
#define REG_GAIN_STP_CONFIG1
Definition: ad9361.h:228
@ LO_DONTCARE
Definition: ad9361.h:3323
#define REG_CALIBRATION_CONFIG_1
Definition: ad9361.h:308
#define SYNTH_ENABLE_PIN_CTRL_MODE
Definition: ad9361.h:732
#define POWER_MEAS_IN_STATE_5_MSB
Definition: ad9361.h:1423
uint8_t adc_large_overload_inc_steps
Definition: ad9361.h:2955
int32_t ad9361_rfpll_int_round_rate(struct refclk_scale *clk_priv, uint32_t rate, uint32_t *prate)
Definition: ad9361.c:6834
bool gpo0_inactive_state_high_en
Definition: ad9361.h:3095
#define TX_SYNTH_VCO_ALC_POWER_DOWN
Definition: ad9361.h:948
struct no_os_clk * clks[NUM_AD9361_CLKS]
Definition: ad9361.h:3346
int32_t ad9361_fastlock_save(struct ad9361_rf_phy *phy, bool tx, uint32_t profile, uint8_t *values)
Definition: ad9361.c:5229
@ BE_VERBOSE
Definition: ad9361.h:3308
#define TX_MONITOR_POWER_DOWN(x)
Definition: ad9361.h:982
#define CP_CAL_VALID
Definition: ad9144.h:664
#define REG_RF_DC_OFFSET_COUNT
Definition: ad9361.h:335
bool gpo3_inactive_state_high_en
Definition: ad9361.h:3098
Definition: ad9361.h:3216
#define DEC3_ENABLE_DECIMATION(x)
Definition: ad9361.h:610
#define MIN_BBPLL_DIV
Definition: ad9361.h:2820
#define REG_FAST_INITIAL_LMT_GAIN_LIMIT
Definition: ad9361.h:250
#define SIZE_FULL_TABLE
Definition: ad9361.c:395
uint8_t dac1_rx_delay_us
Definition: ad9361.h:3028
#define CHARGE_PUMP_CURRENT(x)
Definition: ad9361.h:2471
bool adc_lmt_small_overload_prevent_gain_inc
Definition: ad9361.h:2957
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
#define FIR_START_CLK
Definition: ad9361.h:1020
#define REG_TIA1_C_MSB
Definition: ad9361.h:392
#define REG_AUXDAC_1_CONFIG
Definition: ad9361.h:70
#define REG_RX_LOOP_FILTER_3
Definition: ad9361.h:476
#define FREQ_CAL_COUNT_LENGTH(x)
Definition: ad9361.h:928
#define FORCE_ALC_ENABLE
Definition: ad9361.h:2443
struct axiadc_state * adc_state
Definition: ad9361.h:3403
#define REG_BIST_AND_DATA_PORT_TEST_CONFIG
Definition: ad9361.h:566
#define RX_ENABLE
Definition: ad9361.h:614
#define REG_FRACT_BB_FREQ_WORD_1
Definition: ad9361.h:105
@ SPI_WRITE_TO_REGISTER
Definition: ad9361.h:3039
uint8_t rx_fir_ntaps
Definition: ad9361.h:3391
#define REFERENCE_CLOCK_CYCLES_PER_US(x)
Definition: ad9361.h:861
@ NUM_RX_CLOCKS
Definition: ad9361.h:3138
#define RX_DISABLE
Definition: ad9361.h:615
#define AGC_ATTACK_DELAY(x)
Definition: ad9361.h:814
Definition: ad9361.h:3294
#define MAX_LMT_INDEX
Definition: ad9361.h:2812
#define REG_TX_TUNE_CTRL
Definition: ad9361.h:204
#define REF_FREQ_SCALER(x)
Definition: ad9361.h:890
#define REG_CALIBRATION_CONFIG_2
Definition: ad9361.h:309
#define REG_TPM_MODE_ENABLE
Definition: ad9361.h:143
#define REG_RX2_TUNE_CTRL
Definition: ad9361.h:398
#define SYNTH_INTEGER_WORD(x)
Definition: ad9361.h:2433
int32_t ad9361_en_dis_rx(struct ad9361_rf_phy *phy, uint32_t rx_if, uint32_t enable)
Definition: ad9361.c:1090
int32_t ad9361_reset(struct ad9361_rf_phy *phy)
Definition: ad9361.c:1042
Header file of SPI Interface.
int32_t ad9361_register_clocks(struct ad9361_rf_phy *phy)
Definition: ad9361.c:7288
#define REG_GM_SUB_TABLE_CONFIG
Definition: ad9361.h:278
@ DBGFS_BIST_PRBS
Definition: ad9361.h:3427
bool manual_tx_quad_cal_en
Definition: ad9361.h:3365
#define MAX_ADC_CLK
Definition: ad9361.h:2830
#define REG_RX_VCO_CAL_REF
Definition: ad9361.h:480
#define REG_FAST_ATTACK_STATE
Definition: ad9361.h:556
#define FB_CLOCK_ADV(x)
Definition: ad9361.h:2576
uint8_t index
Definition: ad9361.h:3070
struct ad9361_rf_phy * phy
Definition: ad9361.h:3286
fir_dest
Definition: ad9361.h:2886
#define TONE_FREQ(x)
Definition: ad9361.h:2765
bool dac2_in_rx_en
Definition: ad9361.h:3024
@ ADC_CLK_DIV_4
Definition: ad9361.h:3156
uint8_t f_agc_rst_gla_engergy_lost_sig_thresh_below_ll
Definition: ad9361.h:3001
#define MEASUREMENT_TIME_INTERVAL(x)
Definition: ad9361.h:666
#define TX_MON_TRACK
Definition: ad9361.h:1028
#define REG_QUAD_CAL_COUNT
Definition: ad9361.h:184
uint8_t lmt_overload_small_exceed_counter
Definition: ad9361.h:2960
#define PHASE_ENABLE
Definition: ad9361.h:1136
#define MAX_TX_HB3
Definition: ad9361.h:2840
bool elna_in_gaintable_all_index_en
Definition: ad9361.h:3080
uint8_t adc_ovr_sample_size
Definition: ad9361.h:2920
#define REG_TIA2_C_MSB
Definition: ad9361.h:394
uint8_t current_profile[2]
Definition: ad9361.h:3303
#define REG_AUXADC_CONFIG
Definition: ad9361.h:73
void ad9361_ensm_restore_state(struct ad9361_rf_phy *phy, uint8_t ensm_state)
Definition: ad9361.c:2069
Definition: ad9361.h:3051
#define FDD_MODE
Definition: ad9361.h:711
@ MAX_GAIN
Definition: ad9361.h:2909
#define MAX_CARRIER_FREQ_HZ
Definition: ad9361.h:2852
#define REG_RX_SYNTH_POWER_DOWN_OVERRIDE
Definition: ad9361.h:119
#define REG_TEMP_OFFSET
Definition: ad9361.h:55
#define ENABLE_TRACKING_MODE_CH2
Definition: ad9361.h:1765
@ T1_CLK
Definition: ad9361.h:3272
@ AGC_IN_FAST_ATTACK_MODE_LOCKS_THE_GAIN
Definition: ad9361.h:3035
#define REG_TX_QUAD_FULL_LMT_GAIN
Definition: ad9361.h:185
void ad9361_clear_state(struct ad9361_rf_phy *phy)
Definition: ad9361.c:5304
#define RX_GAIN_CTL_AGC_FAST_ATK
Definition: ad9361.h:1350
#define DCXO_TUNE_COARSE(x)
Definition: ad9361.h:2630
bool gpo_manual_mode_en
Definition: ad9361.h:3094
#define ENABLE_INCR_GAIN
Definition: ad9361.h:1466
#define REG_TEMP_SENSE2
Definition: ad9361.h:57
#define REG_QUAD_CAL_NCO_FREQ_PHASE_OFFSET
Definition: ad9361.h:175
#define REG_BBPLL
Definition: ad9361.h:54
bool rfdc_track_en
Definition: ad9361.h:3393
#define POST_LOCK_LEVEL_STP_FOR_LMT_TABLE(x)
Definition: ad9361.h:1485
#define REG_RFPLL_DIVIDERS
Definition: ad9361.h:50
#define RX_SYNTH_PTAT_POWER_DOWN
Definition: ad9361.h:940
#define MAN_GAIN_CTRL_RX2
Definition: ad9361.h:1361
int32_t ad9361_spi_readm(struct no_os_spi_desc *spi, uint32_t reg, uint8_t *rbuf, uint32_t num)
Definition: ad9361.c:694
bool elna_1_control_en
Definition: ad9361.h:3078
#define printk(format,...)
Definition: ad9361_util.h:66
#define MAX_LPF_GAIN
Definition: ad9361.h:2813
void ad9361_ensm_force_state(struct ad9361_rf_phy *phy, uint8_t ensm_state)
Definition: ad9361.c:1989
#define REG_RX_VCO_LDO
Definition: ad9361.h:483
#define TONE_LEVEL(x)
Definition: ad9361.h:2766
bool f_agc_rst_gla_engergy_lost_goto_optim_gain_en
Definition: ad9361.h:3000
uint8_t VCO_Cal_Offset
Definition: ad9361.h:3243
int32_t ad9361_fastlock_load(struct ad9361_rf_phy *phy, bool tx, uint32_t profile, uint8_t *values)
Definition: ad9361.c:4998
uint8_t VCO_Bias_Tcf
Definition: ad9361.h:3242
uint8_t gpo3_tx_delay_us
Definition: ad9361.h:3114
#define FORCE_RX_ON
Definition: ad9361.h:717
int32_t ad9361_en_dis_rx(struct ad9361_rf_phy *phy, uint32_t rx_if, uint32_t enable)
Definition: ad9361.c:1090
int32_t ad9361_reset(struct ad9361_rf_phy *phy)
Definition: ad9361.c:1042
#define TX_SYNTH_PTAT_POWER_DOWN
Definition: ad9361.h:949
#define FIR_WRITE
Definition: ad9361.h:1021
#define RX_FAST_LOCK_PROFILE_ADDR(x)
Definition: ad9361.h:2403
int32_t ad9361_set_trx_clock_chain(struct ad9361_rf_phy *phy, uint32_t *rx_path_clks, uint32_t *tx_path_clks)
Definition: ad9361.c:4640
int32_t ad9361_get_temp(struct ad9361_rf_phy *phy)
Definition: ad9361.c:4214
#define HAVE_TDD_SYNTH_TABLE
Definition: app_config.h:37
void ad9361_get_bist_loopback(struct ad9361_rf_phy *phy, int32_t *mode)
Definition: ad9361.c:1173
#define RX_BBF_R2346(x)
Definition: ad9361.h:2107
@ EXT_REF_CLK
Definition: ad9361.h:3282
int8_t offset
Definition: ad9361.h:3084
#define RX_LO_POWER_DOWN
Definition: ad9361.h:938
#define AD9363A_MAX_CARRIER_FREQ_HZ
Definition: ad9361.h:2856
int32_t ad9361_get_tx_atten(struct ad9361_rf_phy *phy, uint32_t tx_num)
Definition: ad9361.c:1681
#define REG_MEASURE_DURATION_23
Definition: ad9361.h:290
struct gain_table_info ad9361_adi_gt_info[]
Definition: ad9361.c:599
#define CALIBRATION_CONFIG2_DFLT
Definition: ad9361.h:1772
#define DEC_PWR_FOR_LOCK_LEVEL
Definition: ad9361.h:1341
#define FORCE_PD_RESET_RX2
Definition: ad9361.h:1411
#define REG_GM_SUB_TABLE_GAIN_READ
Definition: ad9361.h:275
@ ID_AD9364
Definition: ad9361.h:3330
#define REG_TIA2_C_LSB
Definition: ad9361.h:393
#define REG_RX1_MANUAL_DIGITALFORCED_GAIN
Definition: ad9361.h:236
Definition: ad9361.h:3414
#define GPO_ENABLE_AUTO_RX(x)
Definition: ad9361.h:807
uint16_t dac2_default_value
Definition: ad9361.h:3016
#define MAX_RX_HB3
Definition: ad9361.h:2836
#define GOTO_MAX_GAIN_OR_OPT_GAIN_IF_EN_AGC_HIGH
Definition: ad9361.h:1473
Header file of Delay functions.
#define AD_READ
Definition: ad9361.h:2798
#define FORCE_VCO_TUNE_ENABLE
Definition: ad9361.h:2450
int32_t gain_step_db
Definition: ad9361.h:3055
#define ENSM_STATE_INVALID
Definition: ad9361.h:763
uint8_t LF_R3
Definition: ad9361.h:3250
@ TX_SAMPL_FREQ
Definition: ad9361.h:3147
#define RX_1
Definition: ad9361.h:612
#define FDD_EXTERNAL_CTRL_ENABLE
Definition: ad9361.h:728
#define AGC_INNER_HIGH_THRESH_EXED_STP_SIZE(x)
Definition: ad9361.h:1549
#define START_GM_SUB_TABLE_CLOCK
Definition: ad9361.h:1665
Definition: ad9361.h:2915
uint64_t end
Definition: ad9361.h:2879
@ NO_GAIN_CHANGE
Definition: ad9361.h:2912
#define LEVEL_MODE
Definition: ad9361.h:720
#define RX_FAST_LOCK_PROFILE(x)
Definition: ad9361.h:2398
#define PORB_VCO_LOGIC
Definition: ad9361.h:2463
#define REG_TX_CLOCK_DATA_DELAY
Definition: ad9361.h:52
#define REG_TX_MON_HIGH_GAIN
Definition: ad9361.h:137
#define PREVENT_GAIN_INC
Definition: ad9361.h:1529
#define REG_GAIN_STP1
Definition: ad9361.h:255
#define REG_AUXADC_LSB
Definition: ad9361.h:75
#define REG_RX_FAST_LOCK_PROGRAM_CTRL
Definition: ad9361.h:498
#define REG_TEMPERATURE
Definition: ad9361.h:58
AXI ADC Device Descriptor.
Definition: axi_adc_core.h:122
#define REG_FRACT_BB_FREQ_WORD_3
Definition: ad9361.h:107
#define KEXP_DC_Q(x)
Definition: ad9361.h:1146
#define REG_RX_BBF_C3_LSB
Definition: ad9361.h:407
#define ad9361_spi_writef(spi, reg, mask, val)
Definition: ad9361.c:885
int32_t ad9361_tx_mute(struct ad9361_rf_phy *phy, uint32_t state)
Definition: ad9361.c:1706
#define TX_SYNTH_READY_MASK
Definition: ad9361.h:735
#define REG_GAIN_UPDATE_COUNTER1
Definition: ad9361.h:256
#define FREQ_CAL_ENABLE
Definition: ad9361.h:926
uint8_t agc_mode[2]
Definition: ad9361.h:3392
uint8_t gpo0_tx_delay_us
Definition: ad9361.h:3108
int8_t * abs_gain_tbl
Definition: ad9361.h:2882
Definition: no_os_clk.h:64
#define REG_AUXDAC_2_WORD
Definition: ad9361.h:69
#define TO_ALERT
Definition: ad9361.h:723
#define REG_RX_FRACT_BYTE_0
Definition: ad9361.h:463
#define TX_MON_2_GAIN(x)
Definition: ad9361.h:1066
bool gpo3_slave_tx_en
Definition: ad9361.h:3106
#define MAX_SYNTH_FREF
Definition: ad9361.h:2849
#define SMALL_LMT_OVERLOAD_THRESH(x)
Definition: ad9361.h:1413
#define BBPLL_LOCK
Definition: ad9361.h:996
uint32_t gpo_manual_mode_enable_mask
Definition: ad9361.h:3093
#define REG_TX_VCO_OUTPUT
Definition: ad9361.h:510
@ TBL_1300_4000_MHZ
Definition: ad9361.h:2872
#define FORCE_ALC_WORD(x)
Definition: ad9361.h:2444
struct no_os_spi_desc * spi
Definition: ad9361.h:3336
#define LVDS_MODE
Definition: ad9361.h:702
#define RX_NCO_FREQ(x)
Definition: ad9361.h:1126
@ CLKOUT_ENABLE
Definition: ad5758.h:288
#define TX_REF_RESET_BAR
Definition: ad9361.h:2703
#define REG_DCXO_FINE_TUNE_LOW
Definition: ad9361.h:536
#define ENSM_STATE_SLEEP_WAIT
Definition: ad9361.h:755
#define REG_CALIBRATION_CTRL
Definition: ad9361.h:66
#define GT_RX1
Definition: ad9361.h:1627
uint8_t f_agc_optimized_gain_offset
Definition: ad9361.h:2996
@ TBL_4000_6000_MHZ
Definition: ad9361.h:2873
#define DONT_UNLOCK_GAIN_IF_ENERGY_LOST
Definition: ad9361.h:1463
#define DIG_GAIN_STP_SIZE(x)
Definition: ad9361.h:1386
#define REG_LARGE_LMT_OVERLOAD_THRESH
Definition: ad9361.h:233
int32_t ad9361_rf_port_setup(struct ad9361_rf_phy *phy, bool is_out, uint32_t rx_inputs, uint32_t txb)
Definition: ad9361.c:3637
#define ENABLE_RF_OFFSET_TRACKING
Definition: ad9361.h:1867
#define REG_RX_BBF_R2346
Definition: ad9361.h:401
#define REG_AGC_LOCK_LEVEL
Definition: ad9361.h:226
#define FINAL_OVER_RANGE_COUNT(x)
Definition: ad9361.h:1502
uint8_t rx_clk_data_delay
Definition: ad9361.h:3062
#define TX_OUTPUT
Definition: ad9361.h:620
void * ERR_PTR(long error)
ERR_PTR.
Definition: ad9361_util.c:308
#define REG_FAST_AGCLL_UPPER_LIMIT
Definition: ad9361.h:248
int32_t ilog2(int32_t x)
ilog2
Definition: ad9361_util.c:249
uint8_t cmd
Definition: ad9361.h:3291
#define REG_FAST_FINAL_OVER_RANGE_AND_OPT_GAIN
Definition: ad9361.h:246
int32_t ad9361_reg_read(struct ad9361_rf_phy *phy, uint32_t reg, uint32_t *val)
Definition: ad9361.c:754
#define REG_TX_MON_LOW_GAIN
Definition: ad9361.h:136
#define REG_GAIN_ERROR_READ
Definition: ad9361.h:281
#define DONT_UNLOCK_GAIN_IF_LG_ADC_OR_LMT_OVRG
Definition: ad9361.h:1465
bool current_tx_use_tdd_table
Definition: ad9361.h:3370
uint8_t VCO_Output_Level
Definition: ad9361.h:3239
@ LUT_FTDD_40
Definition: ad9361.h:3254
@ DBGFS_NONE
Definition: ad9361.h:3424
int32_t ad9361_rfpll_int_set_rate(struct refclk_scale *clk_priv, uint32_t rate, uint32_t parent_rate)
Definition: ad9361.c:6863
uint8_t gpo2_rx_delay_us
Definition: ad9361.h:3111
uint8_t cached_rx_rfpll_div
Definition: ad9361.h:3356
#define TX_MON_DELAY_COUNTER(x)
Definition: ad9361.h:1040
uint32_t ant
Definition: ad9361.h:3217
#define REG_RX_BBBW_MHZ
Definition: ad9361.h:420
#define _SOFT_RESET
Definition: ad9361.h:579
#define REG_CTRL
Definition: ad9361.h:563
AD9361 Header file of Util driver.
#define RX2_FAST_ATK_SHIFT
Definition: ad9361.h:2730
enum ad9361_clocks parent_source
Definition: ad9361.h:3420
#define ONE_SHOT_MODE
Definition: ad9361.h:1053
#define RHB1_EN
Definition: ad9361.h:608
int32_t ad9361_set_dcxo_tune(struct ad9361_rf_phy *phy, uint32_t coarse, uint32_t fine)
Definition: ad9361.c:3523
uint32_t lmt_gain
Definition: ad9361.h:3220
@ FIR_RX1
Definition: ad9361.h:2890
int32_t ad9361_set_gain_ctrl_mode(struct ad9361_rf_phy *phy, struct rf_gain_ctrl *gain_ctrl)
Definition: ad9361.c:2378
uint8_t tx1_mon_lo_cm
Definition: ad9361.h:3127
@ DAC_FREQ
Definition: ad9361.h:3143
#define REG_GPO0_TX_DELAY
Definition: ad9361.h:88
#define REG_DCXO_COARSE_TUNE
Definition: ad9361.h:534
int32_t ad9361_rfpll_round_rate(struct refclk_scale *clk_priv, uint32_t rate)
Definition: ad9361.c:7052
int32_t ad9361_clk_mux_set_parent(struct refclk_scale *clk_priv, uint8_t index)
Definition: ad9361.c:7151
@ RX_RFPLL_DUMMY
Definition: ad9361.h:3277
#define LOOP_FILTER_R3(x)
Definition: ad9361.h:2508
#define ENABLE_GAIN_CORR
Definition: ad9361.h:1760
#define TX_QUAD_CAL
Definition: ad9361.h:743
uint8_t save_profile
Definition: ad9361.h:3302
struct no_os_clk * clk_refin
Definition: ad9361.h:3345
#define REG_TX_MON_2_CONFIG
Definition: ad9361.h:146
uint8_t mgc_inc_gain_step
Definition: ad9361.h:2937
#define REG_CLOCK_CTRL
Definition: ad9361.h:109
int32_t ad9361_1rx1tx_channel_map(struct ad9361_rf_phy *phy, bool tx, int32_t channel)
Definition: ad9361.c:1018
#define REG_PEAK_WAIT_TIME
Definition: ad9361.h:224
#define NO_OS_ARRAY_SIZE(x)
Definition: no_os_util.h:49
#define TX_EXT_VCO_BUFFER_POWER_DOWN
Definition: ad9361.h:981
#define REG_GAIN_TABLE_WRITE_DATA3
Definition: ad9361.h:266
#define REG_MEASURE_DURATION_01
Definition: ad9361.h:289
uint32_t filt_tx_path_clks[NUM_TX_CLOCKS]
Definition: ad9361.h:3385
#define REG_RSSI_WEIGHT_0
Definition: ad9361.h:291
uint32_t ad9361_rfpll_recalc_rate(struct refclk_scale *clk_priv)
Definition: ad9361.c:7010
#define BIST_MASK_CHANNEL_1_Q_DATA
Definition: ad9361.h:2783
#define MIN_TX_CARRIER_FREQ_HZ
Definition: ad9361.h:2854
#define CLK_IGNORE_UNUSED
Definition: ad9361_util.h:50
#define K_EXP_AMPLITUDE(x)
Definition: ad9361.h:1779
#define ENSM_STATE_TX
Definition: ad9361.h:757
struct ad9361_rf_phy * phy
Definition: ad9361.h:3416
#define REG_FAST_INCREMENT_TIME
Definition: ad9361.h:251
#define POWER_MEAS_IN_STATE_5(x)
Definition: ad9361.h:1430
#define REG_AUXDAC1_TX_DELAY
Definition: ad9361.h:93
#define TEMP_SENSE_PERIODIC_ENABLE
Definition: ad9361.h:665
uint8_t VCO_Varactor_Reference
Definition: ad9361.h:3244
#define RX_NCO_PHASE_OFFSET(x)
Definition: ad9361.h:1127
#define RX1_TUNE_RESAMPLE
Definition: ad9361.h:2093
bool f_agc_allow_agc_gain_increase
Definition: ad9361.h:2977
const char * ad9361_ensm_states[]
Definition: ad9361.c:681
#define DC_OFFSET_UPDATE(x)
Definition: ad9361.h:1868
@ T1_FREQ
Definition: ad9361.h:3145
const char * name
Definition: no_os_clk.h:67
uint32_t current_rx_path_clks[NUM_RX_CLOCKS]
Definition: ad9361.h:3372
#define REG_TX_SYMBOL_ATTEN_CONFIG
Definition: ad9361.h:157
#define REG_AUXDAC2_TX_DELAY
Definition: ad9361.h:95
#define REG_TX_FILTER_COEF_WRITE_DATA_2
Definition: ad9361.h:132
#define RSSI_RESOLUTION
Definition: ad9361.h:2809
uint8_t adc_large_overload_exceed_counter
Definition: ad9361.h:2954
#define REG_TX_FILTER_COEF_WRITE_DATA_1
Definition: ad9361.h:131
@ BIST_DISABLE
Definition: ad9361.h:3317
uint8_t Charge_Pump_Current
Definition: ad9361.h:3245
#define REG_GPO2_RX_DELAY
Definition: ad9361.h:86
int32_t ad9361_rfpll_dummy_set_rate(struct refclk_scale *clk_priv, uint32_t rate)
Definition: ad9361.c:6995
int32_t ad9361_set_trx_clock_chain(struct ad9361_rf_phy *phy, uint32_t *rx_path_clks, uint32_t *tx_path_clks)
Definition: ad9361.c:4640
uint8_t tx_clk_data_delay
Definition: ad9361.h:3063
#define REG_BB_DC_OFFSET_SHIFT
Definition: ad9361.h:342
uint16_t tx_mon_delay
Definition: ad9361.h:3123
#define REG_ADC_LARGE_OVERLOAD_THRESH
Definition: ad9361.h:230
int32_t tx_quad_lpf_tia_match
Definition: ad9361.h:3359
#define REG_RX_MIX_LO_CM
Definition: ad9361.h:387
#define AD_WRITE
Definition: ad9361.h:2799
uint8_t adc_large_overload_thresh
Definition: ad9361.h:2922
uint8_t ad9361_ensm_get_state(struct ad9361_rf_phy *phy)
Definition: ad9361.c:1976
#define REG_RX_FRACT_BYTE_1
Definition: ad9361.h:464
int32_t max_gain_db
Definition: ad9361.h:3054
int32_t ad9361_rfpll_round_rate(struct refclk_scale *clk_priv, uint32_t rate)
Definition: ad9361.c:7052
#define REG_TX_LO_GEN_POWER_MODE
Definition: ad9361.h:548
ad9361_pdata_tx_freq
Definition: ad9361.h:3141
#define RF_DC_OFFSET_ATTEN(x)
Definition: ad9361.h:1850
@ DO_IDELAY
Definition: ad9361.h:3310
uint16_t auxdac1_value
Definition: ad9361.h:3397
#define MCS_DIGITAL_CLK_ENABLE
Definition: ad9361.h:588
#define REG_STATE
Definition: ad9361.h:67
#define RX_REF_DOUBLER_FB_DELAY(x)
Definition: ad9361.h:2704
#define WRITE_MIXER_ERROR_TABLE
Definition: ad9361.h:1681
int32_t ad9361_hdl_loopback(struct ad9361_rf_phy *phy, bool enable)
Definition: ad9361_conv.c:107
#define ENSM_STATE_FDD
Definition: ad9361.h:761
#define TX_REF_DOUBLER_FB_DELAY(x)
Definition: ad9361.h:2706
#define RHB2_EN
Definition: ad9361.h:607
#define REG_GAIN_TABLE_READ_DATA2
Definition: ad9361.h:268
@ RX_SAMPL_CLK
Definition: ad9361.h:3269
int32_t ad9361_set_rx_gain(struct ad9361_rf_phy *phy, uint32_t rx_id, struct rf_rx_gain *rx_gain)
Definition: ad9361.c:2225
@ ADC_CLK_DIV_8
Definition: ad9361.h:3157
@ BIST_INJ_RX
Definition: ad9361.h:3319
#define THB2_EN
Definition: ad9361.h:594
enum ad9361_bist_mode bist_prbs_mode
Definition: ad9361.h:3406
uint32_t ad9361_gt(struct ad9361_rf_phy *phy)
Definition: ad9361.c:1376
#define INIT_BB_FO_CAL
Definition: ad9361.h:884
uint8_t agc_outer_thresh_high
Definition: ad9361.h:2944
uint64_t current_tx_lo_freq
Definition: ad9361.h:3368
uint8_t f_agc_lmt_final_settling_steps
Definition: ad9361.h:2987
#define TX1_LO_CONV
Definition: ad9361.h:1160
#define MAX_TX_HB1
Definition: ad9361.h:2838
bool mgc_rx1_ctrl_inp_en
Definition: ad9361.h:2934
Definition: ad9361.h:3117
#define PD_TUNE
Definition: ad9361.h:1273
#define REG_WAIT_COUNT
Definition: ad9361.h:334
#define REG_AUXDAC1_RX_DELAY
Definition: ad9361.h:92
#define RSSI_MODE_SELECT(x)
Definition: ad9361.h:1728
@ CLKRF_FREQ
Definition: ad9361.h:3136
#define RX2_GAIN_CTRL_SHIFT
Definition: ad9361.h:1347
#define RX_SYNTH_READY_MASK
Definition: ad9361.h:734
uint8_t curr_ensm_state
Definition: ad9361.h:3355
#define SYNTH_FRACT_WORD(x)
Definition: ad9361.h:2438
int32_t ad9361_spi_write(struct no_os_spi_desc *spi, uint32_t reg, uint32_t val)
Definition: ad9361.c:811
int32_t ad9361_find_opt(uint8_t *field, uint32_t size, uint32_t *ret_start)
Definition: ad9361.c:982
#define AGC_OUTER_LOW_THRESH(x)
Definition: ad9361.h:1563
#define IMMEDIATELY_UPDATE_TPC_ATTEN
Definition: ad9361.h:1092
#define MANUAL_CTRL_IN_DECR_GAIN_STP_SIZE(x)
Definition: ad9361.h:1380
uint8_t split_table
Definition: ad9361.h:2881
#define dev_warn(dev, format,...)
Definition: ad9361_util.h:64
#define REG_GPO3_RX_DELAY
Definition: ad9361.h:87
#define ENERGY_DETECT_COUNT(x)
Definition: ad9361.h:1509
enum f_agc_target_gain_index_type f_agc_gain_index_type_after_exit_rx_mode
Definition: ad9361.h:2993
bool f_agc_rst_gla_stronger_sig_thresh_exceeded_en
Definition: ad9361.h:2997
@ TX_RFPLL
Definition: ad9361.h:3280
uint64_t no_os_do_div(uint64_t *n, uint64_t base)
int32_t ad9361_rssi_gain_step_calib(struct ad9361_rf_phy *phy)
Definition: ad9361.c:7423
#define VCO_VARACTOR(x)
Definition: ad9361.h:2458
#define REG_TX_ATTEN_THRESH
Definition: ad9361.h:152
#define MAX_MIXER_CALIBRATION_GAIN_INDEX(x)
Definition: ad9361.h:1695
#define ENERGY_LOST_THRESH(x)
Definition: ad9361.h:1480
bool f_agc_rst_gla_engergy_lost_sig_thresh_exceeded_en
Definition: ad9361.h:2999
#define TUNE_CTRL(x)
Definition: ad9361.h:1276
bool dig_gain_en
Definition: ad9361.h:2930
void no_os_mdelay(uint32_t msecs)
Wait until msecs milliseconds passed.
Definition: aducm3029_delay.c:126
uint8_t ad9361_ensm_get_state(struct ad9361_rf_phy *phy)
Definition: ad9361.c:1976
#define REG_GAIN_RX1
Definition: ad9361.h:553
@ R1_FREQ
Definition: ad9361.h:3135
#define DIGITAL_GAIN_RX(x)
Definition: ad9361.h:2721
int32_t ad9361_set_trx_clock_chain_freq(struct ad9361_rf_phy *phy, uint32_t freq)
Definition: ad9361.c:4888
#define AGC_OUTER_HIGH_THRESH_EXED_STP_SIZE(x)
Definition: ad9361.h:1568
#define REG_FAST_ENERGY_DETECT_COUNT
Definition: ad9361.h:247
void * out_value
Definition: ad9361.h:3288
bool gpo0_slave_tx_en
Definition: ad9361.h:3100
#define START_GAIN_TABLE_CLOCK
Definition: ad9361.h:1625
int32_t ad9361_post_setup(struct ad9361_rf_phy *phy)
Definition: ad9361_conv.c:599
#define ENABLE_LMT_GAIN_INC_FOR_LOCK_LEVEL
Definition: ad9361.h:1472
#define no_os_min(x, y)
Definition: no_os_util.h:59
int32_t ad9361_do_calib_run(struct ad9361_rf_phy *phy, uint32_t cal, int32_t arg)
Definition: ad9361.c:5677
#define REG_REFERENCE_CLOCK_CYCLES
Definition: ad9361.h:99
int32_t ad9361_set_ensm_mode(struct ad9361_rf_phy *phy, bool fdd, bool pinctrl)
Definition: ad9361.c:4908
void ad9361_ensm_restore_state(struct ad9361_rf_phy *phy, uint8_t ensm_state)
Definition: ad9361.c:2069
#define GPO_MANUAL_CTRL(x)
Definition: ad9361.h:836
int32_t ad9361_set_rx_gain(struct ad9361_rf_phy *phy, uint32_t rx_id, struct rf_rx_gain *rx_gain)
Definition: ad9361.c:2225
@ NUM_TX_CLOCKS
Definition: ad9361.h:3148
uint16_t dac1_default_value
Definition: ad9361.h:3015
#define RX1_GAIN_CTRL_SETUP(x)
Definition: ad9361.h:1345
#define USE_HB1_OUT_FOR_DEC_PWR_MEAS
Definition: ad9361.h:1740
@ RESTORE_DEFAULT
Definition: ad9361.h:3313
#define AGCLL_MAX_INCREASE(x)
Definition: ad9361.h:1514
#define REG_CLOCK_ENABLE
Definition: ad9361.h:53
uint32_t ad9361_gt(struct ad9361_rf_phy *phy)
Definition: ad9361.c:1376
int32_t ad9361_reg_read(struct ad9361_rf_phy *phy, uint32_t reg, uint32_t *val)
Definition: ad9361.c:754
int32_t ad9361_tracking_control(struct ad9361_rf_phy *phy, bool bbdc_track, bool rfdc_track, bool rxquad_track)
Definition: ad9361.c:3317
#define REG_QUAD_CAL_CTRL
Definition: ad9361.h:176
#define RSSI_LSB_MASK2
Definition: ad9361.h:1948
#define REG_RX_VCO_VARACTOR_CTRL_0
Definition: ad9361.h:491
int32_t ad9361_rfpll_set_rate(struct refclk_scale *clk_priv, uint32_t rate)
Definition: ad9361.c:7094
#define GPO_INIT_STATE(x)
Definition: ad9361.h:837
Header file of AD9361 Driver.
#define REG_GAIN_STP_2
Definition: ad9361.h:260
#define REG_RX_CP_LEVEL_DETECT
Definition: ad9361.h:486
#define VCO_BIAS_TCF(x)
Definition: ad9361.h:2520
#define NO_OS_DIV_ROUND_UP(x, y)
Definition: no_os_util.h:52
#define MCS_BBPLL_ENABLE
Definition: ad9361.h:587
#define REG_INPUT_SELECT
Definition: ad9361.h:49
@ DBGFS_RXGAIN_1
Definition: ad9361.h:3430
#define SETTLING_DELAY(x)
Definition: ad9361.h:1474
#define REG_CAPACITOR
Definition: ad9361.h:209
uint8_t prev_ensm_state
Definition: ad9361.h:3354
@ ID_AD9363A
Definition: ad9361.h:3331
#define REG_SMALL_LMT_OVERLOAD_THRESH
Definition: ad9361.h:232
@ FIR_RX2
Definition: ad9361.h:2891
#define REG_TX_FILTER_COEF_ADDR
Definition: ad9361.h:130
#define REG_GAIN_DIFF_WORDERROR_WRITE
Definition: ad9361.h:280
@ RX_REFCLK
Definition: ad9361.h:3262
#define VCO_VARACTOR_REFERENCE(x)
Definition: ad9361.h:2625
#define AUXDAC_AUTO_RX_BAR(x)
Definition: ad9361.h:821
@ SOFT_RESET
Definition: ad738x.h:136
#define RX_FAST_LOCK_PROFILE_PIN_SELECT
Definition: ad9361.h:2396
#define MAX_RX_HB1
Definition: ad9361.h:2834
#define REG_RX_FILTER_COEF_ADDR
Definition: ad9361.h:213
#define REG_RX_INTEGER_BYTE_1
Definition: ad9361.h:462
int32_t ad9361_get_auxadc(struct ad9361_rf_phy *phy)
Definition: ad9361.c:4230
uint32_t filt_rx_path_clks[NUM_RX_CLOCKS]
Definition: ad9361.h:3384
int32_t ad9361_calculate_rf_clock_chain(struct ad9361_rf_phy *phy, uint32_t tx_sample_rate, uint32_t rate_gov, uint32_t *rx_path_clks, uint32_t *tx_path_clks)
Definition: ad9361.c:4766
#define TX_MON_1_GAIN(x)
Definition: ad9361.h:1060
rf_gain_ctrl_mode
Definition: ad9361.h:2901
#define REG_TX_FRACT_BYTE_2
Definition: ad9361.h:505
void ad9361_get_bist_loopback(struct ad9361_rf_phy *phy, int32_t *mode)
Definition: ad9361.c:1173
#define CALIB_TABLE_SELECT(x)
Definition: ad9361.h:1685
Definition: ad9361_util.h:77
#define REG_AGC_ATTACK_DELAY
Definition: ad9361.h:78
@ ADC_CLK_DIV_3
Definition: ad9361.h:3155
#define TXNRX_SPI_CTRL
Definition: ad9361.h:731
@ IGNORE
Definition: ad9361.h:3142
#define REG_DEC_POWER_MEASURE_DURATION_0
Definition: ad9361.h:301
@ SKIP_STORE_RESULT
Definition: ad9361.h:3312
bool gpo1_slave_rx_en
Definition: ad9361.h:3101
#define DEC_STP_SIZE_FOR_LARGE_LMT_OVERLOAD(x)
Definition: ad9361.h:1399
#define REG_RF_DC_OFFSET_CONFIG_1
Definition: ad9361.h:336
#define REG_REF_DIVIDE_CONFIG_1
Definition: ad9361.h:551
@ BUFFERED_XTALN_DCXO
Definition: ad9361.h:3153
#define TX_MON_LOW_GAIN(x)
Definition: ad9361.h:1029
#define REG_LVDS_INVERT_CTRL1
Definition: ad9361.h:102
#define REG_GAIN_TABLE_WRITE_DATA2
Definition: ad9361.h:265
#define REG_TX_FILTER_COEF_READ_DATA_2
Definition: ad9361.h:134
int32_t ad9361_set_tx_atten(struct ad9361_rf_phy *phy, uint32_t atten_mdb, bool tx1, bool tx2, bool immed)
Definition: ad9361.c:1642
@ GAIN_CHANGE_OCCURS
Definition: ad9361.h:3038
struct no_os_gpio_desc * gpio_desc_cal_sw1
Definition: ad9361.h:3339
@ TX_REFCLK
Definition: ad9361.h:3263
int32_t ad9361_set_ensm_mode(struct ad9361_rf_phy *phy, bool fdd, bool pinctrl)
Definition: ad9361.c:4908
uint32_t f_agc_state_wait_time_ns
Definition: ad9361.h:2975
#define DCXO_TUNE_FINE_LOW(x)
Definition: ad9361.h:2635
#define REG_OUTER_POWER_THRESHS
Definition: ad9361.h:259
bool bypass_rx_fir
Definition: ad9361.h:3380
const bool have_tdd_tables
Definition: ad9361.c:57
int32_t ad9361_clk_factor_set_rate(struct refclk_scale *clk_priv, uint32_t rate, uint32_t parent_rate)
Definition: ad9361.c:6541
#define REG_RX_VCO_BIAS_1
Definition: ad9361.h:478
void ad9361_ensm_restore_prev_state(struct ad9361_rf_phy *phy)
Definition: ad9361.c:2124
@ RF_GAIN_MGC
Definition: ad9361.h:2902
bool f_agc_lock_level_lmt_gain_increase_en
Definition: ad9361.h:2983
@ ENTERS_RX_MODE
Definition: ad9361.h:3037
#define VCO_CAL_OFFSET(x)
Definition: ad9361.h:2452
#define ENSM_STATE_RX
Definition: ad9361.h:759
#define REG_ANALOG_POWER_DOWN_OVERRIDE
Definition: ad9361.h:126
#define RX_BB_TUNE_CAL
Definition: ad9361.h:740
#define ENABLE_DEC_PWR_MEAS
Definition: ad9361.h:1741
#define BIST_CTRL_POINT(x)
Definition: ad9361.h:2767
#define REG_RX_LO_GEN_POWER_MODE
Definition: ad9361.h:499
#define MAX_BBPLL_FREQ
Definition: ad9361.h:2818
int ad9361_synth_lo_powerdown(struct ad9361_rf_phy *phy, enum synth_pd_ctrl rx, enum synth_pd_ctrl tx)
Definition: ad9361.c:3468
int32_t ad9361_tx_mute(struct ad9361_rf_phy *phy, uint32_t state)
Definition: ad9361.c:1706
#define DEFAULT_RSSI_MEAS_MODE
Definition: ad9361.h:1726
uint8_t dig_saturation_exceed_counter
Definition: ad9361.h:2963
uint32_t ad9361_validate_rf_bw(struct ad9361_rf_phy *phy, uint32_t bw)
Definition: ad9361.c:940
#define REG_GPO3_TX_DELAY
Definition: ad9361.h:91
#define SETTLE_MAIN_ENABLE
Definition: ad9361.h:1133
int32_t ad9361_update_rf_bandwidth(struct ad9361_rf_phy *phy, uint32_t rf_rx_bw, uint32_t rf_tx_bw)
Definition: ad9361.c:5718
uint32_t bist_tone_level_dB
Definition: ad9361.h:3409
#define REG_GAIN_STP_CONFIG_2
Definition: ad9361.h:231
int32_t ad9361_bist_prbs(struct ad9361_rf_phy *phy, enum ad9361_bist_mode mode)
Definition: ad9361.c:1184
#define READ_SELECT
Definition: ad9361.h:1680
uint32_t ad9361_clk_factor_recalc_rate(struct refclk_scale *clk_priv, uint32_t parent_rate)
Definition: ad9361.c:6489
int32_t ad9361_rfpll_dummy_set_rate(struct refclk_scale *clk_priv, uint32_t rate)
Definition: ad9361.c:6995
#define ENABLE_TRACKING_MODE_CH1
Definition: ad9361.h:1766
#define FORCE_TX_ON
Definition: ad9361.h:718
uint8_t agc_outer_thresh_low
Definition: ad9361.h:2950
#define VCO_CAL_REF_TCF(x)
Definition: ad9144.h:941
enum ad9361_clocks source
Definition: ad9361.h:3419
int32_t ad9361_setup(struct ad9361_rf_phy *phy)
Definition: ad9361.c:5363
#define REG_RX_FORCE_ALC
Definition: ad9361.h:466
#define FORCE_PD_RESET_RX1
Definition: ad9361.h:1412
#define REG_RX1_MANUAL_LMT_FULL_GAIN
Definition: ad9361.h:234
uint16_t lmt_overload_low_thresh
Definition: ad9361.h:2925
#define FORCE_ALERT_STATE
Definition: ad9361.h:721
#define TX_LO_POWER_DOWN
Definition: ad9361.h:947
struct no_os_spi_desc * spi
Definition: ad9361.h:3415
#define CORRECTION_WORD_DECIMATION_M(x)
Definition: ad9361.h:1789
#define TX_MON_DURATION(x)
Definition: ad9361.h:1054
#define RX_REF_DIVIDER_MSB
Definition: ad9361.h:2697
#define REG_RSSI_WEIGHT_1
Definition: ad9361.h:292
uint8_t rx_fir_dec
Definition: ad9361.h:3390
void ad9361_get_bist_prbs(struct ad9361_rf_phy *phy, enum ad9361_bist_mode *mode)
Definition: ad9361.c:1215
struct ad9361_fastlock_entry entry[2][8]
Definition: ad9361.h:3304
#define TX_NCO_FREQ(x)
Definition: ad9361.h:1153
uint32_t ad9361_rfpll_int_recalc_rate(struct refclk_scale *clk_priv, uint32_t parent_rate)
Definition: ad9361.c:6778
void ad9361_get_bist_tone(struct ad9361_rf_phy *phy, enum ad9361_bist_mode *mode, uint32_t *freq_Hz, uint32_t *level_dB, uint32_t *mask)
Definition: ad9361.c:1288
#define REG_MAX_LMT_FULL_GAIN
Definition: ad9361.h:223
int32_t ad9361_fastlock_recall(struct ad9361_rf_phy *phy, bool tx, uint32_t profile)
Definition: ad9361.c:5173
uint8_t VCO_Varactor
Definition: ad9361.h:3240
struct no_os_gpio_desc * gpio_desc_resetb
Definition: ad9361.h:3337
#define REG_GAIN_TABLE_CONFIG
Definition: ad9361.h:270
bool auto_cal_en
Definition: ad9361.h:3364
ad9361_clkout
Definition: ad9361.h:3151
uint32_t mixer_index
Definition: ad9361.h:3226
#define REG_BB_DC_OFFSET_ATTEN
Definition: ad9361.h:346
@ T2_CLK
Definition: ad9361.h:3271
#define TX_BB_TUNE_CAL
Definition: ad9361.h:741
int32_t ad9361_bist_loopback(struct ad9361_rf_phy *phy, int32_t mode)
Definition: ad9361.c:1125
int32_t ad9361_load_fir_filter_coef(struct ad9361_rf_phy *phy, enum fir_dest dest, int32_t gain_dB, uint32_t ntaps, int16_t *coef)
Definition: ad9361.c:5829
uint16_t tx_mon_duration
Definition: ad9361.h:3124
#define ENSM_STATE_ALERT
Definition: ad9361.h:756
#define RX_FIR_ENABLE_DECIMATION(x)
Definition: ad9361.h:611
uint8_t agc_attack_delay_extra_margin_us
Definition: ad9361.h:2942
#define REG_RX_BBF_TUNE_CONFIG
Definition: ad9361.h:418
uint32_t digital_gain
Definition: ad9361.h:3222
uint8_t mgc_split_table_ctrl_inp_gain_mode
Definition: ad9361.h:2939
int32_t no_os_clk_set_rate(struct no_os_clk_desc *desc, uint64_t rate)
#define THB1_EN
Definition: ad9361.h:595
#define REG_SETTLE_TIME
Definition: ad9361.h:286
#define RX2_TUNE_RESAMPLE
Definition: ad9361.h:2100
#define REG_AUXDAC2_RX_DELAY
Definition: ad9361.h:94
#define AD_CNT(x)
Definition: ad9361.h:2800
#define SINGLE_DATA_RATE
Definition: ad9361.h:701
#define REG_PARALLEL_PORT_CONF_2
Definition: ad9361.h:61
#define RX_VCO_DIVIDER(x)
Definition: ad9361.h:627
@ FIR_TX1_TX2
Definition: ad9361.h:2889
#define REG_QUAD_SETTLE_COUNT
Definition: ad9361.h:179
int32_t ad9361_rssi_gain_step_calib(struct ad9361_rf_phy *phy)
Definition: ad9361.c:7423
uint32_t mult
Definition: ad9361.h:3417
struct axi_adc * rx_adc
Definition: ad9361.h:3342
#define REG_TX_SYNTH_POWER_DOWN_OVERRIDE
Definition: ad9361.h:120
#define MASTER_BIAS_TRIM(x)
Definition: ad9361.h:2682
bool tx_mon_track_en
Definition: ad9361.h:3118
int32_t ad9361_set_gain_ctrl_mode(struct ad9361_rf_phy *phy, struct rf_gain_ctrl *gain_ctrl)
Definition: ad9361.c:2378
#define REG_RSSI_DELAY
Definition: ad9361.h:295
uint32_t clk_get_rate(struct ad9361_rf_phy *phy, struct refclk_scale *clk_priv)
clk_get_rate
Definition: ad9361_util.c:61
int32_t starting_gain_db
Definition: ad9361.h:3053
#define DCXO_TUNE_FINE_HIGH(x)
Definition: ad9361.h:2640
int32_t ad9361_set_trx_clock_chain_freq(struct ad9361_rf_phy *phy, uint32_t freq)
Definition: ad9361.c:4888
#define REG_RX_VCO_OUTPUT
Definition: ad9361.h:470
enum dev_id dev_sel
Definition: ad9361.h:3335
#define REG_CALIBRATION_CONFIG_3
Definition: ad9361.h:310
@ RXGAIN_FULL_TBL
Definition: ad9361.h:2866
#define RX_GAIN_CTL_AGC_SLOW_ATK
Definition: ad9361.h:1351
int32_t ad9361_1rx1tx_channel_map(struct ad9361_rf_phy *phy, bool tx, int32_t channel)
Definition: ad9361.c:1018
#define REG_CP_BLEED_CURRENT
Definition: ad9361.h:111
#define EXTERNAL_LNA2_CTRL
Definition: ad9361.h:828
#define BIST_MASK_CHANNEL_2_I_DATA
Definition: ad9361.h:2782
#define ad9361_spi_readf(spi, reg, mask)
Definition: ad9361.c:801
#define RX1_GAIN_CTRL_SHIFT
Definition: ad9361.h:1348
struct ad9361_fastlock fastlock
Definition: ad9361.h:3401
uint8_t flags
Definition: ad9361.h:3296
#define REG_RX_FAST_LOCK_SETUP
Definition: ad9361.h:493
#define REG_RX_FAST_LOCK_PROGRAM_DATA
Definition: ad9361.h:496
#define REG_VCO_PROGRAM_1
Definition: ad9361.h:116
uint8_t f_agc_lpf_final_settling_steps
Definition: ad9361.h:2986
#define ENABLE_SYNC_FOR_GAIN_COUNTER
Definition: ad9361.h:1556
uint32_t ad9361_rfpll_recalc_rate(struct refclk_scale *clk_priv)
Definition: ad9361.c:7010
uint32_t filt_rx_bw_Hz
Definition: ad9361.h:3386
#define TX_VCO_DIVIDER(x)
Definition: ad9361.h:626
#define EXTERNAL_LNA1_CTRL
Definition: ad9361.h:829
uint8_t agc_inner_thresh_high
Definition: ad9361.h:2946
#define DEC_PWR_FOR_LOW_PWR
Definition: ad9361.h:1340
#define AGC_INNER_LOW_THRESH_EXED_STP_SIZE(x)
Definition: ad9361.h:1550
#define VCO_BIAS_REF(x)
Definition: ad9144.h:935
@ CLKOUT_DISABLE
Definition: ad5758.h:287
#define REG_RX2_MANUAL_LPF_GAIN
Definition: ad9361.h:238
#define EXT_LNA_HIGH_GAIN(x)
Definition: ad9361.h:1574
int32_t ad9361_ensm_set_state(struct ad9361_rf_phy *phy, uint8_t ensm_state, bool pinctrl)
Definition: ad9361.c:4434
enum ad9361_bist_mode bist_tone_mode
Definition: ad9361.h:3407
#define RX_MIX_LO_CM(x)
Definition: ad9361.h:2033
@ LO_OFF
Definition: ad9361.h:3324
#define REG_RX_INTEGER_BYTE_0
Definition: ad9361.h:461
#define OPTIMIZE_GAIN_OFFSET(x)
Definition: ad9361.h:1503
@ R2_CLK
Definition: ad9361.h:3266
#define ENABLE_PHASE_CORR
Definition: ad9361.h:1759
#define AUXADC_POWER_DOWN
Definition: ad9361.h:796
int32_t ad9361_bbpll_set_rate(struct refclk_scale *clk_priv, uint32_t rate, uint32_t parent_rate)
Definition: ad9361.c:6639
#define ENABLE_RX_DATA_PORT_FOR_CAL
Definition: ad9361.h:716
uint8_t agc_inner_thresh_high_dec_steps
Definition: ad9361.h:2947
#define REG_SDM_CTRL_1
Definition: ad9361.h:104
int32_t ad9361_fastlock_store(struct ad9361_rf_phy *phy, bool tx, uint32_t profile)
Definition: ad9361.c:5041
#define REG_RX_MIX_GM_CONFIG
Definition: ad9361.h:371
#define GAIN_ENABLE
Definition: ad9361.h:1135
#define REG_RX_ALC_VARACTOR
Definition: ad9361.h:469
@ LUT_FTDD_80
Definition: ad9361.h:3256
#define REG_RSSI_WAIT_TIME
Definition: ad9361.h:296
uint64_t last_tx_quad_cal_freq
Definition: ad9361.h:3366
int32_t gain_db
Definition: ad9361.h:3218
@ LO_ON
Definition: ad9361.h:3325
#define RX_SYNTH_VCO_POWER_DOWN
Definition: ad9361.h:941
#define REG_OBSERVE_CONFIG
Definition: ad9361.h:565
uint32_t tx1_atten_cached
Definition: ad9361.h:3399
Structure holding SPI descriptor.
Definition: no_os_spi.h:192
#define IMMED_GAIN_CHANGE_IF_LG_LMT_OVERLOAD
Definition: ad9361.h:1547
#define REG_RX1_MANUAL_LPF_GAIN
Definition: ad9361.h:235
uint8_t size
Definition: ad9361.h:3290
#define RX_LPF_IDX_MASK
Definition: ad9361.h:1432
uint8_t dac2_rx_delay_us
Definition: ad9361.h:3030
rssi_restart_mode
Definition: ad9361.h:3034
#define REG_LVDS_BIAS_CTRL
Definition: ad9361.h:101
uint16_t lmt_overload_high_thresh
Definition: ad9361.h:2924
#define RX_FAST_LOCK_MODE_ENABLE
Definition: ad9361.h:2397
#define CLOCK_ENABLE_DFLT
Definition: ad9361.h:646
int32_t(* ad9361_rfpll_ext_round_rate)(struct refclk_scale *clk_priv, uint32_t rate)
Definition: ad9361.h:3349
#define no_os_clamp(val, min_val, max_val)
Definition: no_os_util.h:69
#define REG_LNA_GAIN
Definition: ad9361.h:302
void ad9361_clear_state(struct ad9361_rf_phy *phy)
Definition: ad9361.c:5304
@ RXGAIN_SPLIT_TBL
Definition: ad9361.h:2867
@ T2_FREQ
Definition: ad9361.h:3144
#define REG_MEASURE_DURATION
Definition: ad9361.h:287
int32_t ad9361_ensm_set_state(struct ad9361_rf_phy *phy, uint8_t ensm_state, bool pinctrl)
Definition: ad9361.c:4434
uint8_t f_agc_lock_level_gain_increase_upper_limit
Definition: ad9361.h:2984
#define TX_MON_1_LO_CM(x)
Definition: ad9361.h:1059
AXI DAC Device Descriptor.
Definition: axi_dac_core.h:53
uint32_t temp_sensor_decimation
Definition: ad9361.h:3086
bool dac1_in_alert_en
Definition: ad9361.h:3022
#define MIN_RX_CARRIER_FREQ_HZ
Definition: ad9361.h:2853
#define DIGITAL_POWER_UP
Definition: ad9361.h:645
#define AGC_USE_FULL_GAIN_TABLE
Definition: ad9361.h:1359
#define MAX_DAC_CLK
Definition: ad9361.h:2831
int32_t ad9361_spi_write(struct no_os_spi_desc *spi, uint32_t reg, uint32_t val)
Definition: ad9361.c:811
#define DONT_UNLOCK_GAIN_IF_STRONGER_SIGNAL
Definition: ad9361.h:1497
#define REG_FRACT_BB_FREQ_WORD_2
Definition: ad9361.h:106
bool f_agc_rst_gla_large_adc_overload_en
Definition: ad9361.h:3003
uint32_t ad9361_clk_factor_recalc_rate(struct refclk_scale *clk_priv, uint32_t parent_rate)
Definition: ad9361.c:6489
#define REG_ENSM_CONFIG_2
Definition: ad9361.h:65
#define MAX_BBPLL_DIV
Definition: ad9361.h:2819
ad9361_clocks
Definition: ad9361.h:3260
Definition: ad9361.h:3334
uint8_t f_agc_lp_thresh_increment_time
Definition: ad9361.h:2978
#define RX_GAIN_CTL_MASK
Definition: ad9361.h:1346
@ FIR_IS_RX
Definition: ad9361.h:2893
bool gpo2_slave_tx_en
Definition: ad9361.h:3104
int32_t ad9361_setup(struct ad9361_rf_phy *phy)
Definition: ad9361.c:5363
#define HAVE_SPLIT_GAIN_TABLE
Definition: app_config.h:36
#define REG_CP_CURRENT
Definition: ad9361.h:110
bool dac2_in_alert_en
Definition: ad9361.h:3026
int32_t ad9361_get_temp(struct ad9361_rf_phy *phy)
Definition: ad9361.c:4214
#define PREVENT_POS_LOOP_GAIN
Definition: ad9361.h:1778
Definition: ad9361.h:2896
debugfs_cmd
Definition: ad9361.h:3423
#define INCREMENT_GAIN_STP_LPFLMT(x)
Definition: ad9361.h:1508
uint8_t LF_C1
Definition: ad9361.h:3247
uint8_t f_agc_energy_lost_stronger_sig_gain_lock_exit_cnt
Definition: ad9361.h:3002
#define REG_RX_VCO_VARACTOR_CTRL_1
Definition: ad9361.h:492
uint8_t f_agc_power_measurement_duration_in_state5
Definition: ad9361.h:3010
#define REG_RX_FORCE_VCO_TUNE_0
Definition: ad9361.h:467
#define WRITE_GM_SUB_TABLE
Definition: ad9361.h:1664
#define TX_CHANNEL_ENABLE(x)
Definition: ad9361.h:596
int32_t ad9361_spi_read(struct no_os_spi_desc *spi, uint32_t reg)
Definition: ad9361.c:735
#define DONT_UNLOCK_GAIN_IF_ADC_OVRG
Definition: ad9361.h:1491
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:96
uint16_t auxdac2_value
Definition: ad9361.h:3398
#define FAST_ATK_GAIN_LOCKED
Definition: ad9361.h:2736
#define MCS_RF_ENABLE
Definition: ad9361.h:586
#define CLK_GET_RATE_NOCACHE
Definition: ad9361_util.h:51
int32_t ad9361_unregister_clocks(struct ad9361_rf_phy *phy)
Definition: ad9361.c:7403
uint8_t cached_synth_pd[2]
Definition: ad9361.h:3358
#define REG_LMT_OVERLOAD_COUNTERS
Definition: ad9361.h:253
#define AD9363A_MIN_CARRIER_FREQ_HZ
Definition: ad9361.h:2857
#define REG_CONFIG0
Definition: ad9361.h:207
uint8_t VCO_Bias_Ref
Definition: ad9361.h:3241
uint32_t(* ad9361_rfpll_ext_recalc_rate)(struct refclk_scale *clk_priv)
Definition: ad9361.h:3348
#define REG_ADC_SMALL_OVERLOAD_THRESH
Definition: ad9361.h:229
const bool has_split_gt
Definition: ad9361.c:56
#define BB_DC_M_SHIFT(x)
Definition: ad9361.h:1885
#define REG_VCO_CTRL
Definition: ad9361.h:115
#define REG_GAIN_TABLE_ADDRESS
Definition: ad9361.h:263
Definition: ad9361.h:3083
uint32_t current_rx_bw_Hz
Definition: ad9361.h:3376
int32_t ad9361_validate_enable_fir(struct ad9361_rf_phy *phy)
Definition: ad9361.c:6085
int32_t ad9361_bist_loopback(struct ad9361_rf_phy *phy, int32_t mode)
Definition: ad9361.c:1125
uint16_t gain_mdB
Definition: ad9361.h:3075
#define REG_AUTO_GPO
Definition: ad9361.h:76
uint8_t max_index
Definition: ad9361.h:2880
uint32_t val
Definition: ad9361.h:3289
#define REG_BANDGAP_CONFIG0
Definition: ad9361.h:549
uint32_t auxadc_clock_rate
Definition: ad9361.h:3088
#define AUXDAC_MANUAL_BAR(x)
Definition: ad9361.h:819
uint32_t lpf_gain
Definition: ad9361.h:3221
bool quad_track_en
Definition: ad9361.h:3395
int32_t ad9361_parse_fir(struct ad9361_rf_phy *phy, char *data, uint32_t size)
Definition: ad9361.c:5914
bool bbpll_initialized
Definition: ad9361.h:3411
uint8_t tx_fir_int
Definition: ad9361.h:3388
#define AUXDAC_MANUAL_SELECT
Definition: ad9361.h:827
Definition: ad9361.h:2877
uint32_t temp_time_inteval_ms
Definition: ad9361.h:3085
#define MAX_MBYTE_SPI
Definition: ad9361.h:2844
uint8_t mgc_dec_gain_step
Definition: ad9361.h:2938
int32_t ad9361_read_rssi(struct ad9361_rf_phy *phy, struct rf_rssi *rssi)
Definition: ad9361.c:2453
uint16_t VCO_MHz
Definition: ad9361.h:3238
#define MEASUREMENT_DURATION_0(x)
Definition: ad9361.h:1713
#define REG_DCXO_FINE_TUNE_HIGH
Definition: ad9361.h:535
#define REG_KEXP_2
Definition: ad9361.h:178
@ CLKTF_CLK
Definition: ad9361.h:3273
#define KEXP_TX(x)
Definition: ad9361.h:1143
uint32_t low_high_gain_threshold_mdB
Definition: ad9361.h:3120
#define REG_RX_FORCE_VCO_TUNE_1
Definition: ad9361.h:468
uint32_t last_tx_quad_cal_phase
Definition: ad9361.h:3367
@ CLKTF_FREQ
Definition: ad9361.h:3146
#define MAX_TX_HB2
Definition: ad9361.h:2839
struct refclk_scale * ref_clk_scale[NUM_AD9361_CLKS]
Definition: ad9361.h:3347
uint32_t ad9361_to_clk(uint64_t freq)
Definition: ad9361.c:1392
int32_t ad9361_validate_rfpll(struct ad9361_rf_phy *phy, bool is_tx, uint64_t freq)
Definition: ad9361.c:957
@ CLKOUT_DISABLE
Definition: ad9361.h:3152
#define CP_OFFSET_OFF
Definition: ad9361.h:2484
int32_t ad9361_set_tx_atten(struct ad9361_rf_phy *phy, uint32_t atten_mdb, bool tx1, bool tx2, bool immed)
Definition: ad9361.c:1642
#define WRITE_GAIN_TABLE
Definition: ad9361.h:1624
#define IMMED_GAIN_CHANGE_IF_LG_ADC_OVERLOAD
Definition: ad9361.h:1548
#define REG_GPO2_TX_DELAY
Definition: ad9361.h:90
#define REG_TX_ENABLE_FILTER_CTRL
Definition: ad9361.h:47
#define REG_TX_BBF_TUNE_DIVIDER
Definition: ad9361.h:211
#define BB_DC_OFFSET_ATTEN(x)
Definition: ad9361.h:1898
@ RX_RFPLL
Definition: ad9361.h:3279
int32_t ad9361_clk_factor_set_rate(struct refclk_scale *clk_priv, uint32_t rate, uint32_t parent_rate)
Definition: ad9361.c:6541
#define REG_TX1_ATTEN_1
Definition: ad9361.h:148
void * no_os_malloc(size_t size)
Allocate memory and return a pointer to it.
Definition: chibios_alloc.c:43
#define TUNER_RESAMPLE
Definition: ad9361.h:1274
#define REG_GAIN_RX2
Definition: ad9361.h:558
#define no_os_clamp_t(type, val, min_val, max_val)
Definition: no_os_util.h:71
@ DAC_CLK
Definition: ad9361.h:3270
uint8_t max_dig_gain
Definition: ad9361.h:2931
int32_t idx_step_offset
Definition: ad9361.h:3057
#define RX_EXT_VCO_BUFFER_POWER_DOWN
Definition: ad9361.h:980
bool f_agc_rst_gla_en_agc_pulled_high_en
Definition: ad9361.h:3005
uint8_t tx2_mon_lo_cm
Definition: ad9361.h:3128
#define BBPLL_ENABLE
Definition: ad9361.h:647
#define BYPASS_LD_SYNTH
Definition: ad9361.h:2425
uint8_t LF_C2
Definition: ad9361.h:3246
#define AD9364_DEVICE
Definition: app_config.h:40
#define EXT_LNA_CTRL
Definition: ad9361.h:1589
int32_t ad9361_rfpll_int_set_rate(struct refclk_scale *clk_priv, uint32_t rate, uint32_t parent_rate)
Definition: ad9361.c:6863
int ad9361_synth_lo_powerdown(struct ad9361_rf_phy *phy, enum synth_pd_ctrl rx, enum synth_pd_ctrl tx)
Definition: ad9361.c:3468
#define SETTLE_TIME(x)
Definition: ad9361.h:1702
uint8_t alc_written
Definition: ad9361.h:3298
uint8_t en_mask
Definition: ad9361.h:3071
int32_t ad9361_bist_prbs(struct ad9361_rf_phy *phy, enum ad9361_bist_mode mode)
Definition: ad9361.c:1184
uint8_t mode
Definition: ad9361.h:2898
int32_t ad9361_get_trx_clock_chain(struct ad9361_rf_phy *phy, uint32_t *rx_path_clks, uint32_t *tx_path_clks)
Definition: ad9361.c:4728
#define DIG_SATURATION_EXED_COUNTER(x)
Definition: ad9361.h:1557
bool auxdac_manual_mode_en
Definition: ad9361.h:3018
#define REG_MAG_FTEST_THRESH_2
Definition: ad9361.h:181
int32_t ad9361_bbpll_set_rate(struct refclk_scale *clk_priv, uint32_t rate, uint32_t parent_rate)
Definition: ad9361.c:6639
bool dac2_in_tx_en
Definition: ad9361.h:3025
int32_t ad9361_mcs(struct ad9361_rf_phy *phy, int32_t step)
Definition: ad9361.c:5249
#define FULL_TABLE_GAIN_INDEX(x)
Definition: ad9361.h:2711
Definition: ad9361.h:3237
dig_tune_flags
Definition: ad9361.h:3307
#define RX_2
Definition: ad9361.h:613
#define RX_GAIN_CTL_AGC_SLOW_ATK_HYBD
Definition: ad9361.h:1352
#define REG_AUXADC_CLOCK_DIVIDER
Definition: ad9361.h:72
int32_t ad9361_set_dcxo_tune(struct ad9361_rf_phy *phy, uint32_t coarse, uint32_t fine)
Definition: ad9361.c:3523
bool dac1_in_rx_en
Definition: ad9361.h:3020
#define FDD_RX_RATE_2TX_RATE
Definition: ad9361.h:699
uint8_t gpo1_rx_delay_us
Definition: ad9361.h:3109
#define REG_GM_SUB_TABLE_ADDRESS
Definition: ad9361.h:271
@ TX_RFPLL_INT
Definition: ad9361.h:3276
uint32_t bist_tone_mask
Definition: ad9361.h:3410
#define no_os_max_t(type, x, y)
Definition: no_os_util.h:66
uint32_t flags
Definition: ad9361.h:3374
int32_t ad9361_fastlock_save(struct ad9361_rf_phy *phy, bool tx, uint32_t profile, uint8_t *values)
Definition: ad9361.c:5229
const char * propname
Definition: ad9361.h:3287
bool rx_eq_2tx
Definition: ad9361.h:3382
#define FIR_NUM_TAPS(x)
Definition: ad9361.h:1023
#define REG_GM_SUB_TABLE_GAIN_WRITE
Definition: ad9361.h:272
#define MAXIMUM_DIGITAL_GAIN(x)
Definition: ad9361.h:1387
#define LARGE_LMT_OVERLOAD_EXED_COUNTER(x)
Definition: ad9361.h:1535
#define REG_DIGITAL_GAIN
Definition: ad9361.h:225
#define REG_RX_VCO_PD_OVERRIDES
Definition: ad9361.h:481
uint8_t f_agc_lock_level
Definition: ad9361.h:2982
#define FIR_SELECT(x)
Definition: ad9361.h:1022
#define REG_BB_DC_OFFSET_COUNT
Definition: ad9361.h:345
#define RX_FULL_TBL_IDX_MASK
Definition: ad9361.h:1425
#define DC_OFFSET_ENABLE
Definition: ad9361.h:1134
#define M_DECIM(x)
Definition: ad9361.h:1138
#define TX_MON_HIGH_GAIN(x)
Definition: ad9361.h:1034
#define REG_GPO0_RX_DELAY
Definition: ad9361.h:84
#define REG_AUXDAC_ENABLE_CTRL
Definition: ad9361.h:79
#define NO_OS_BIT(x)
Definition: no_os_util.h:45
#define AUXDAC_2_WORD_LSB(x)
Definition: ad9361.h:786
@ FIR_TX2
Definition: ad9361.h:2888
@ OPTIMIZED_GAIN
Definition: ad9361.h:2911
@ RX_SAMPL_FREQ
Definition: ad9361.h:3137
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
#define DECREMENT_STP_SIZE_FOR_SMALL_LPF_GAIN_CHANGE(x)
Definition: ad9361.h:1405
#define HALF_DUPLEX_MODE
Definition: ad9361.h:703
uint64_t current_rx_lo_freq
Definition: ad9361.h:3369
#define REG_TX_BBF_TUNE_MODE
Definition: ad9361.h:212
#define REG_CTRL_OUTPUT_POINTER
Definition: ad9361.h:96
uint32_t rxbbf_div
Definition: ad9361.h:3378
uint32_t rate_governor
Definition: ad9361.h:3379
#define REG_PARALLEL_PORT_CONF_3
Definition: ad9361.h:62
#define FREE_RUN_MODE
Definition: ad9361.h:1763
@ DBGFS_LOOPBACK
Definition: ad9361.h:3426
#define RF_DC_CALIBRATION_COUNT(x)
Definition: ad9361.h:1844
int32_t ad9361_load_fir_filter_coef(struct ad9361_rf_phy *phy, enum fir_dest dest, int32_t gain_dB, uint32_t ntaps, short *coef)
int32_t ad9361_register_clocks(struct ad9361_rf_phy *phy)
Definition: ad9361.c:7288
#define SLOW_ATTACK_HYBRID_MODE
Definition: ad9361.h:1343
#define AUXDAC_1_VREF(x)
Definition: ad9361.h:777
#define CP_CAL_ENABLE
Definition: ad9361.h:2486
#define VCO_VARACTOR_REFERENCE_TCF(x)
Definition: ad9361.h:2619
int32_t ad9361_mcs(struct ad9361_rf_phy *phy, int32_t step)
Definition: ad9361.c:5249
uint8_t gpo3_rx_delay_us
Definition: ad9361.h:3113
int32_t ad9361_en_dis_tx(struct ad9361_rf_phy *phy, uint32_t tx_if, uint32_t enable)
Definition: ad9361.c:1073
@ DO_ODELAY
Definition: ad9361.h:3311
bool gpo1_slave_tx_en
Definition: ad9361.h:3102
bool gpo1_inactive_state_high_en
Definition: ad9361.h:3096
#define RX_DIGITAL_IDX_MASK
Definition: ad9361.h:1439
#define REG_RX_LOOP_FILTER_1
Definition: ad9361.h:474
#define REG_MAX_MIXER_CALIBRATION_GAIN_INDEX
Definition: ad9361.h:284
#define RFPLL_MODULUS
Definition: ad9361.h:2846
uint8_t alc_orig
Definition: ad9361.h:3297
#define GT_RX2
Definition: ad9361.h:1628
#define TX_FIR_GAIN_6DB
Definition: ad9361.h:1019
#define CTRL_ENABLE
Definition: ad9361.h:2758
@ TX_RFPLL_DUMMY
Definition: ad9361.h:3278
uint8_t lvds_invert[2]
Definition: ad9361.h:3066
uint64_t ad9361_from_clk(uint32_t freq)
Definition: ad9361.c:1403
#define BANDGAP_TEMP_TRIM(x)
Definition: ad9361.h:2690
#define TX1_MON_ENABLE
Definition: ad9361.h:1052
bool gpo2_slave_rx_en
Definition: ad9361.h:3103
void no_os_udelay(uint32_t usecs)
Wait until usecs microseconds passed.
Definition: aducm3029_delay.c:114
#define REG_TIA1_C_LSB
Definition: ad9361.h:391
#define REG_AGC_CONFIG_3
Definition: ad9361.h:222
#define REG_TX_CP_OVERRANGE_VCO_LOCK
Definition: ad9361.h:523
#define REG_QUAD_CAL_STATUS_TX2
Definition: ad9361.h:183
#define REG_RX_CP_CURRENT
Definition: ad9361.h:471
#define USE_WAIT_COUNTER_FOR_RF_DC_INIT_CAL
Definition: ad9361.h:1863
uint8_t f_agc_large_overload_inc_steps
Definition: ad9361.h:3011
int32_t ad9361_init_gain_tables(struct ad9361_rf_phy *phy)
#define REG_REF_DIVIDE_CONFIG_2
Definition: ad9361.h:552
#define NULL
Definition: wrapper.h:64
#define MAX_RX_HB2
Definition: ad9361.h:2835
bool gpo2_inactive_state_high_en
Definition: ad9361.h:3097
int32_t ad9361_dig_interface_timing_analysis(struct ad9361_rf_phy *phy, char *buf, int32_t buflen)
Definition: ad9361_conv.c:282
#define REG_SPI_CONF
Definition: ad9361.h:45
@ ADC_CLK_DIV_2
Definition: ad9361.h:3154
#define TX2_SSB_CONV
Definition: ad9361.h:1168
int32_t(* ad9361_rfpll_ext_set_rate)(struct refclk_scale *clk_priv, uint32_t rate)
Definition: ad9361.h:3351
#define REG_RX_FILTER_GAIN
Definition: ad9361.h:219
uint32_t auxadc_decimation
Definition: ad9361.h:3089
#define SIZE_SPLIT_TABLE
Definition: ad9361.c:520
int32_t ad9361_spi_readm(struct no_os_spi_desc *spi, uint32_t reg, uint8_t *rbuf, uint32_t num)
Definition: ad9361.c:694
uint8_t f_agc_rst_gla_stronger_sig_thresh_above_ll
Definition: ad9361.h:2998
#define REG_AUXDAC_1_WORD
Definition: ad9361.h:68
#define REG_PARALLEL_PORT_CONF_1
Definition: ad9361.h:60
#define NO_GAIN_TABLE
Definition: ad9361.c:53
#define diff_abs(x, y)
Definition: ad9361.c:51
#define REG_GPO1_TX_DELAY
Definition: ad9361.h:89
uint8_t dac2_tx_delay_us
Definition: ad9361.h:3031
struct axi_dac * tx_dac
Definition: ad9361.h:3343
#define INVERT_RX2
Definition: ad9361.h:690
#define REG_GAIN_TABLE_WRITE_DATA1
Definition: ad9361.h:264
bool mgc_rx2_ctrl_inp_en
Definition: ad9361.h:2935
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
#define INCDEC_LMT_GAIN
Definition: ad9361.h:1367
@ ADC_FREQ
Definition: ad9361.h:3133
#define QUAD_CAL_SOFT_RESET
Definition: ad9361.h:1137
#define GAIN_LOCK_EXIT_COUNT(x)
Definition: ad9361.h:1519
#define WRITE_LNA_GAIN_DIFF
Definition: ad9361.h:1683
int32_t ad9361_read_rssi(struct ad9361_rf_phy *phy, struct rf_rssi *rssi)
Definition: ad9361.c:2453
#define VCO_CAL_EN
Definition: ad9361.h:2573
#define TX_2
Definition: ad9361.h:600
int32_t ad9361_en_dis_tx(struct ad9361_rf_phy *phy, uint32_t tx_if, uint32_t enable)
Definition: ad9361.c:1073
#define RX_GAIN_CTL_MGC
Definition: ad9361.h:1349
Definition: ad9361.h:3069
#define REG_RESISTOR
Definition: ad9361.h:208
@ ADC_CLK_DIV_16
Definition: ad9361.h:3158
uint8_t low_gain_dB
Definition: ad9361.h:3121
@ DBGFS_RXGAIN_2
Definition: ad9361.h:3431
#define TO_LNA_GAIN(x)
Definition: ad9361.h:1608
#define WRITE_LNA_ERROR_TABLE
Definition: ad9361.h:1682
@ R1_CLK
Definition: ad9361.h:3267
uint8_t digital_io_ctrl
Definition: ad9361.h:3064
uint8_t adc_small_overload_thresh
Definition: ad9361.h:2921
#define RX_REF_RESET_BAR
Definition: ad9361.h:2696
uint32_t ad9361_to_clk(uint64_t freq)
Definition: ad9361.c:1392
int32_t ad9361_do_calib_run(struct ad9361_rf_phy *phy, uint32_t cal, int32_t arg)
Definition: ad9361.c:5677
uint32_t tia_index
Definition: ad9361.h:3225
#define MAX_BBPLL_FREF
Definition: ad9361.h:2816
#define REG_CONFIG
Definition: ad9361.h:282
uint8_t agc_outer_thresh_low_inc_steps
Definition: ad9361.h:2951
#define REG_START_TEMP_READING
Definition: ad9361.h:56
@ BIST_INJ_TX
Definition: ad9361.h:3318
#define MAX_BASEBAND_RATE
Definition: ad9361.h:2842
uint32_t ant
Definition: ad9361.h:2897
#define GPO_ENABLE_AUTO_TX(x)
Definition: ad9361.h:808
#define REG_RSSI_WEIGHT_3
Definition: ad9361.h:294
bool ensm_pin_ctl_en
Definition: ad9361.h:3362
#define RSSI_MAX_WEIGHT
Definition: ad9361.h:2810
#define MCS_REFCLK_SCALE_EN
Definition: ad9361.h:900
uint32_t filt_tx_bw_Hz
Definition: ad9361.h:3387
#define dev_dbg(dev, format,...)
Definition: ad9361_util.h:65
#define DAC_FS(x)
Definition: ad9361.h:1843
#define REG_AGC_CONFIG_1
Definition: ad9361.h:220
#define BBPLL_RESET_BAR
Definition: ad9361.h:885
uint32_t current_table
Definition: ad9361.h:3360
#define TIA_GAIN
Definition: ad9361.h:1596
#define VCO_VARACTOR_OFFSET(x)
Definition: ad9361.h:2620
#define SMALL_LMT_OVERLOAD_EXED_COUNTER(x)
Definition: ad9361.h:1536
#define RX1_PD_TUNE
Definition: ad9361.h:2094
#define REG_TX_FAST_LOCK_SETUP
Definition: ad9361.h:542
int32_t max_idx
Definition: ad9361.h:3056
#define USE_AGC_FOR_LMTLPF_GAIN
Definition: ad9361.h:1368
#define K_EXP_PHASE(x)
Definition: ad9361.h:1773
#define TX_FIR_ENABLE_INTERPOLATION(x)
Definition: ad9361.h:598
int32_t ad9361_rfpll_set_rate(struct refclk_scale *clk_priv, uint32_t rate)
Definition: ad9361.c:7094
bool txmon_tdd_en
Definition: ad9361.h:3396
#define REG_RX_BBBW_KHZ
Definition: ad9361.h:421
uint8_t f_agc_lp_thresh_increment_steps
Definition: ad9361.h:2979
int32_t ad9361_auxdac_get(struct ad9361_rf_phy *phy, int32_t dac)
Definition: ad9361.c:4120
#define RX1_FAST_ATK_SHIFT
Definition: ad9361.h:2729
uint8_t LF_C3
Definition: ad9361.h:3249
uint32_t settling_delay_ns
Definition: ad9361.h:3077
#define AGC_OUTER_HIGH_THRESH(x)
Definition: ad9361.h:1562
uint32_t f_agc_dec_pow_measuremnt_duration
Definition: ad9361.h:2974
#define REG_FAST_STRONG_SIGNAL_FREEZE
Definition: ad9361.h:245
#define REG_RX2_MANUAL_DIGITALFORCED_GAIN
Definition: ad9361.h:239
#define REG_FAST_ENERGY_LOST_THRESH
Definition: ad9361.h:242
@ EN_AGC_PIN_IS_PULLED_HIGH
Definition: ad9361.h:3036
#define RX_LO_GEN_POWER_MODE(x)
Definition: ad9361.h:2418
#define REG_FAST_CONFIG_2_SETTLING_DELAY
Definition: ad9361.h:241
#define REG_ENSM_CONFIG_1
Definition: ad9361.h:64
#define MASK_CLR_ATTEN_UPDATE
Definition: ad9361.h:1081
#define REG_LOOP_FILTER_3
Definition: ad9361.h:114
bool f_agc_use_last_lock_level_for_set_gain_en
Definition: ad9361.h:2995
#define REG_RX2_MANUAL_LMT_FULL_GAIN
Definition: ad9361.h:237
uint32_t current_tx_bw_Hz
Definition: ad9361.h:3377
#define VCO_OUTPUT_LEVEL(x)
Definition: ad9361.h:2464
uint8_t gpo1_tx_delay_us
Definition: ad9361.h:3110
#define REG_RX_LOOP_FILTER_2
Definition: ad9361.h:475
@ ADC_CLK
Definition: ad9361.h:3265
#define GAIN_CAL_MEAS_DURATION(x)
Definition: ad9361.h:1707
#define REG_FAST_STRONGER_SIGNAL_THRESH
Definition: ad9361.h:243
@ RX_RFPLL_INT
Definition: ad9361.h:3275
#define REG_RX_CLOCK_DATA_DELAY
Definition: ad9361.h:51
#define REG_RF_DC_OFFSET_ATTEN
Definition: ad9361.h:337
int32_t ad9361_unregister_clocks(struct ad9361_rf_phy *phy)
Definition: ad9361.c:7403
uint8_t f_agc_final_overrange_count
Definition: ad9361.h:2988
#define ENSM_STATE(x)
Definition: ad9361.h:754
#define AGC_LOCK_LEVEL_FAST_AGC_INNER_HIGH_THRESH_SLOW(x)
Definition: ad9361.h:1393
#define LOOP_FILTER_C3(x)
Definition: ad9361.h:2499
uint8_t gpo0_rx_delay_us
Definition: ad9361.h:3107
int32_t ad9361_get_rx_gain(struct ad9361_rf_phy *phy, uint32_t rx_id, struct rf_rx_gain *rx_gain)
Definition: ad9361.c:1910
uint8_t cached_tx_rfpll_div
Definition: ad9361.h:3357
#define AUXDAC_AUTO_TX_BAR(x)
Definition: ad9361.h:820
#define GOTO_SET_GAIN_IF_EXIT_RX_STATE
Definition: ad9361.h:1462
void ad9361_ensm_restore_prev_state(struct ad9361_rf_phy *phy)
Definition: ad9361.c:2124
uint8_t lmt_overload_large_exceed_counter
Definition: ad9361.h:2959
@ BBPLL_FREQ
Definition: ad9361.h:3132
#define REG_GM_SUB_TABLE_BIAS_WRITE
Definition: ad9361.h:273
Header file of GPIO Interface.
@ TBL_200_1300_MHZ
Definition: ad9361.h:2871
int32_t ad9361_bbpll_round_rate(struct refclk_scale *clk_priv, uint32_t rate, uint32_t *prate)
Definition: ad9361.c:6599
uint32_t ad9361_bbpll_recalc_rate(struct refclk_scale *clk_priv, uint32_t parent_rate)
Definition: ad9361.c:6572
struct no_os_gpio_desc * gpio_desc_sync
Definition: ad9361.h:3338
bool f_agc_gain_increase_after_gain_lock_en
Definition: ad9361.h:2990
rx_gain_table_name
Definition: ad9361.h:2870
int32_t bist_config
Definition: ad9361.h:3405
#define REG_EXT_LNA_LOW_GAIN
Definition: ad9361.h:262
#define POST_LOCK_LEVEL_STP_SIZE_FOR_LPF_TABLE_FULL_TABLE(x)
Definition: ad9361.h:1479
ad9361_pdata_rx_freq
Definition: ad9361.h:3131
#define REG_RX_FAST_LOCK_SETUP_INIT_DELAY
Definition: ad9361.h:494
#define REG_RX_FRACT_BYTE_2
Definition: ad9361.h:465
#define DEC_PWR_FOR_GAIN_LOCK_EXIT
Definition: ad9361.h:1342
uint32_t ad9361_validate_rf_bw(struct ad9361_rf_phy *phy, uint32_t bw)
Definition: ad9361.c:940
@ RF_GAIN_SLOWATTACK_AGC
Definition: ad9361.h:2904
#define AUXADC_WORD_LSB(x)
Definition: ad9361.h:802
int32_t ad9361_update_rf_bandwidth(struct ad9361_rf_phy *phy, uint32_t rf_rx_bw, uint32_t rf_tx_bw)
Definition: ad9361.c:5718
int32_t ad9361_clk_factor_round_rate(struct refclk_scale *clk_priv, uint32_t rate, uint32_t *prate)
Definition: ad9361.c:6507
enum f_agc_target_gain_index_type f_agc_rst_gla_if_en_agc_pulled_high_mode
Definition: ad9361.h:3008
#define REG_TX_PFD_CONFIG
Definition: ad9361.h:500
@ FIR_RX1_RX2
Definition: ad9361.h:2892
#define ENABLE_GAIN_INC_AFTER_GAIN_LOCK
Definition: ad9361.h:1459
#define DATA_PORT_LOOP_TEST_ENABLE
Definition: ad9361.h:2775
uint8_t tx2_mon_front_end_gain
Definition: ad9361.h:3126
@ RXGAIN_TBLS_END
Definition: ad9361.h:2874
int32_t ad9361_rfpll_int_round_rate(struct refclk_scale *clk_priv, uint32_t rate, uint32_t *prate)
Definition: ad9361.c:6834
#define BIST_ENABLE
Definition: ad9361.h:2764
#define REG_RX_PFD_CONFIG
Definition: ad9361.h:460
bool use_rx_fir_out_for_dec_pwr_meas
Definition: ad9361.h:2928
#define LARGE_ADC_OVERLOAD_EXED_COUNTER(x)
Definition: ad9361.h:1541
uint32_t ad9361_rfpll_dummy_recalc_rate(struct refclk_scale *clk_priv)
Definition: ad9361.c:6982
int32_t clk_prepare_enable(struct no_os_clk *clk)
clk_prepare_enable
Definition: ad9361_util.c:49
ad9361_bist_mode
Definition: ad9361.h:3316
#define REG_RX_FAST_LOCK_PROGRAM_READ
Definition: ad9361.h:497
Definition: ad9361.h:3074
#define RSSI_LSB_SHIFT
Definition: ad9361.h:1946
uint32_t current_tx_path_clks[NUM_TX_CLOCKS]
Definition: ad9361.h:3373
int32_t ad9361_clk_mux_set_parent(struct refclk_scale *clk_priv, uint8_t index)
Definition: ad9361.c:7151
@ BBPLL_CLK
Definition: ad9361.h:3264
uint64_t ad9361_from_clk(uint32_t freq)
Definition: ad9361.c:1403
#define REG_BANDGAP_CONFIG1
Definition: ad9361.h:550
#define SMALL_ADC_OVERLOAD_EXED_COUNTER(x)
Definition: ad9361.h:1542
struct gain_table_info * gt_info
Definition: ad9361.h:3361
@ FIR_TX1
Definition: ad9361.h:2887
#define REG_TX_QUAD_LPF_GAIN
Definition: ad9361.h:189
#define VCO_CAL_COUNT(x)
Definition: ad9361.h:2575
#define REG_TX2_DIG_ATTEN
Definition: ad9361.h:154
Definition: ad9361.h:3014
@ DBGFS_INIT
Definition: ad9361.h:3425
#define SYNTH_LUT_SIZE
Definition: ad9361.c:59
#define TX2_LO_CONV
Definition: ad9361.h:1167
#define EXT_LNA_LOW_GAIN(x)
Definition: ad9361.h:1579
bool filt_valid
Definition: ad9361.h:3383
Definition: ad9361.h:3060
#define REG_TX_LEVEL_THRESH
Definition: ad9361.h:139
uint8_t(* tab)[3]
Definition: ad9361.h:2883
void ad9361_get_bist_tone(struct ad9361_rf_phy *phy, enum ad9361_bist_mode *mode, uint32_t *freq_Hz, uint32_t *level_dB, uint32_t *mask)
Definition: ad9361.c:1288
#define REG_TX_FILTER_CONF
Definition: ad9361.h:135
#define BBDC_CAL
Definition: ad9361.h:747
uint8_t tx1_mon_front_end_gain
Definition: ad9361.h:3125
#define REG_RX_FAST_LOCK_PROGRAM_ADDR
Definition: ad9361.h:495
#define REG_SDM_CTRL
Definition: ad9361.h:118
struct no_os_spi_desc * spi
Definition: main.c:72
#define REG_FAST_CONFIG_1
Definition: ad9361.h:240
uint32_t ad9361_bbpll_recalc_rate(struct refclk_scale *clk_priv, uint32_t parent_rate)
Definition: ad9361.c:6572
#define REG_INVERT_BITS
Definition: ad9361.h:338
#define REG_RX1_TUNE_CTRL
Definition: ad9361.h:397
uint8_t dig_gain_step_size
Definition: ad9361.h:2964
Header file of utility functions.
#define REG_TX_MON_DELAY
Definition: ad9361.h:138
#define REG_GAIN_TABLE_READ_DATA1
Definition: ad9361.h:267
int32_t ad9361_get_trx_clock_chain(struct ad9361_rf_phy *phy, uint32_t *rx_path_clks, uint32_t *tx_path_clks)
Definition: ad9361.c:4728
#define TX_1
Definition: ad9361.h:599
uint32_t cal_threshold_freq
Definition: ad9361.h:3375
#define TX1_SSB_CONV
Definition: ad9361.h:1161
struct ad9361_phy_platform_data * pdata
Definition: ad9361.h:3353
#define KEXP_DC_I(x)
Definition: ad9361.h:1145
#define REG_BIST_CONFIG
Definition: ad9361.h:564
uint16_t bypass_loss_mdB
Definition: ad9361.h:3076
@ CLKRF_CLK
Definition: ad9361.h:3268
#define REG_RX_QUAD_GAIN2
Definition: ad9361.h:314
#define BIST_MASK_CHANNEL_2_Q_DATA
Definition: ad9361.h:2781
@ R2_FREQ
Definition: ad9361.h:3134
#define AGC_OUTER_LOW_THRESH_EXED_STP_SIZE(x)
Definition: ad9361.h:1569
@ GAIN_CHANGE_OCCURS_OR_EN_AGC_PIN_PULLED_HIGH
Definition: ad9361.h:3040
#define THB3_ENABLE_INTERP(x)
Definition: ad9361.h:597
uint32_t ad9361_rfpll_dummy_recalc_rate(struct refclk_scale *clk_priv)
Definition: ad9361.c:6982
#define FASTLOOK_INIT
Definition: ad9361.h:3295
#define MIN_BBPLL_FREQ
Definition: ad9361.h:2817
#define RX_CHANNEL_ENABLE(x)
Definition: ad9361.h:609
#define ADC_OVERRANGE_SAMPLE_SIZE(x)
Definition: ad9361.h:1370
uint8_t dac1_tx_delay_us
Definition: ad9361.h:3029
#define RX_FAST_LOCK_CONFIG_WORD_NUM
Definition: ad9361.h:2413
#define REG_EXTERNAL_LNA_CTRL
Definition: ad9361.h:82
#define REG_TX2_ATTEN_1
Definition: ad9361.h:150
#define TX_MON_2_LO_CM(x)
Definition: ad9361.h:1065
#define REG_RX_CP_CONFIG
Definition: ad9361.h:473
#define BBPLL_MODULUS
Definition: ad9361.h:2847
@ SET_GAIN
Definition: ad9361.h:2910
#define SINGLE_PORT_MODE
Definition: ad9361.h:704
#define AUXDAC_1_WORD_LSB(x)
Definition: ad9361.h:778
Header file of Common Driver.
#define LOOP_FILTER_C1(x)
Definition: ad9361.h:2493
bool immed_gain_change_if_large_adc_overload
Definition: ad9361.h:2968
enum rf_gain_ctrl_mode rx1_mode
Definition: ad9361.h:2916
int32_t bist_loopback_mode
Definition: ad9361.h:3404
@ LUT_FTDD_60
Definition: ad9361.h:3255
#define REG_INTEGER_BB_FREQ_WORD
Definition: ad9361.h:108
uint8_t high_gain_dB
Definition: ad9361.h:3122
enum no_os_spi_mode mode
Definition: no_os_spi.h:202
#define DEC_POWER_MEASUREMENT_DURATION(x)
Definition: ad9361.h:1743
#define RSSI_LSB_MASK1
Definition: ad9361.h:1947
uint8_t gpo2_tx_delay_us
Definition: ad9361.h:3112
#define START_RSSI_MEAS
Definition: ad9361.h:1724
uint8_t agc_outer_thresh_high_dec_steps
Definition: ad9361.h:2945
#define USE_LAST_LOCK_LEVEL_FOR_SET_GAIN
Definition: ad9361.h:1471
#define LPF_GAIN_RX(x)
Definition: ad9361.h:2716
@ BE_MOREVERBOSE
Definition: ad9361.h:3309
int32_t ad9361_reg_write(struct ad9361_rf_phy *phy, uint32_t reg, uint32_t val)
Definition: ad9361.c:843
dev_id
Definition: ad9361.h:3328
uint16_t dec_pow_measuremnt_duration
Definition: ad9361.h:2926
#define RX_SYNTH_VCO_ALC_POWER_DOWN
Definition: ad9361.h:939
uint32_t rate
Definition: common.h:53
uint32_t tx2_atten_cached
Definition: ad9361.h:3400
#define REG_RX_VCO_CAL
Definition: ad9361.h:484
int32_t ad9361_bist_tone(struct ad9361_rf_phy *phy, enum ad9361_bist_mode mode, uint32_t freq_Hz, uint32_t level_dB, uint32_t mask)
Definition: ad9361.c:1230
#define RFDC_CAL
Definition: ad9361.h:746
int32_t ad9361_find_opt(uint8_t *field, uint32_t size, uint32_t *ret_start)
Definition: ad9361.c:982
bool gpo0_slave_rx_en
Definition: ad9361.h:3099
#define REG_CH_1_OVERFLOW
Definition: ad9361.h:128
#define POWER_DOWN_TX_SYNTH
Definition: ad9361.h:730
#define DATA_PORT_SP_HD_LOOP_TEST_OE
Definition: ad9361.h:2772
uint32_t int_sqrt(uint32_t x)
int_sqrt
Definition: ad9361_util.c:224
#define REG_RSSI_WEIGHT_2
Definition: ad9361.h:293
#define REG_ENSM_MODE
Definition: ad9361.h:63
#define REG_ADC_OVERLOAD_COUNTERS
Definition: ad9361.h:254
void ad9361_ensm_force_state(struct ad9361_rf_phy *phy, uint8_t ensm_state)
Definition: ad9361.c:1989
#define START_CALIB_TABLE_CLOCK
Definition: ad9361.h:1684
#define LARGE_LPF_GAIN_STEP(x)
Definition: ad9361.h:1406
@ NUM_AD9361_CLKS
Definition: ad9361.h:3281
uint32_t bist_tone_freq_Hz
Definition: ad9361.h:3408
#define MCS_BB_ENABLE
Definition: ad9361.h:589
#define REG_AGC_CONFIG_2
Definition: ad9361.h:221
#define PEAK_OVERLOAD_WAIT_TIME(x)
Definition: ad9361.h:1381
int32_t ad9361_fastlock_store(struct ad9361_rf_phy *phy, bool tx, uint32_t profile)
Definition: ad9361.c:5041
#define FULL_PORT
Definition: ad9361.h:705
#define STRONGER_SIGNAL_THRESH(x)
Definition: ad9361.h:1486
int32_t ad9361_get_tx_atten(struct ad9361_rf_phy *phy, uint32_t tx_num)
Definition: ad9361.c:1681
#define GOTO_SET_GAIN_IF_EN_AGC_HIGH
Definition: ad9361.h:1461
#define REG_RX_DSM_SETUP_1
Definition: ad9361.h:488
#define REG_TEMP_SENSOR_CONFIG
Definition: ad9361.h:59
#define TX_SYNTH_VCO_POWER_DOWN
Definition: ad9361.h:950
#define MIN_SYNTH_FREF
Definition: ad9361.h:2850
#define MAX_TX_ATTENUATION_DB
Definition: ad9361.h:2859
enum rf_gain_ctrl_mode rx2_mode
Definition: ad9361.h:2917
#define KEXP_TX_COMP(x)
Definition: ad9361.h:1144
uint8_t adc_small_overload_exceed_counter
Definition: ad9361.h:2953
#define REG_KEXP_1
Definition: ad9361.h:177
bool current_rx_use_tdd_table
Definition: ad9361.h:3371
#define TONE_PRBS
Definition: ad9361.h:2763
#define REG_LVDS_INVERT_CTRL2
Definition: ad9361.h:103
#define INVERT_RX2_RF_DC_CGOUT_WORD
Definition: ad9361.h:1857
f_agc_target_gain_index_type
Definition: ad9361.h:2908
#define RX_FAST_LOCK_PROGRAM_WRITE
Definition: ad9361.h:2410
int32_t ad9361_bbpll_round_rate(struct refclk_scale *clk_priv, uint32_t rate, uint32_t *prate)
Definition: ad9361.c:6599
int32_t ad9361_tracking_control(struct ad9361_rf_phy *phy, bool bbdc_track, bool rfdc_track, bool rxquad_track)
Definition: ad9361.c:3317
bool dac1_in_tx_en
Definition: ad9361.h:3021
@ RF_GAIN_FASTATTACK_AGC
Definition: ad9361.h:2903
#define RX_GAIN_STEP_CAL
Definition: ad9361.h:744
uint32_t gain_update_interval_us
Definition: ad9361.h:2967
#define NO_OS_DIV_ROUND_CLOSEST(x, y)
Definition: no_os_util.h:54
int32_t ad9361_bist_tone(struct ad9361_rf_phy *phy, enum ad9361_bist_mode mode, uint32_t freq_Hz, uint32_t level_dB, uint32_t mask)
Definition: ad9361.c:1230
#define REG_WORD_ADDRESS
Definition: ad9361.h:279
@ ID_AD9361
Definition: ad9361.h:3329
#define REG_FAST_GAIN_LOCK_EXIT_COUNT
Definition: ad9361.h:249
#define REG_DC_OFFSET_CONFIG2
Definition: ad9361.h:339
#define REG_TX_MON_1_CONFIG
Definition: ad9361.h:145
bool one_shot_mode_en
Definition: ad9361.h:3119
Definition: ad9361.h:3092
bool sync_for_gain_counter_en
Definition: ad9361.h:2965
#define RECEIVER_SELECT(x)
Definition: ad9361.h:1626
#define GOTO_OPT_GAIN_IF_ENERGY_LOST_OR_EN_AGC_HIGH
Definition: ad9361.h:1460
#define INVERT_RX1_RF_DC_CGOUT_WORD
Definition: ad9361.h:1858
struct axiadc_converter * adc_conv
Definition: ad9361.h:3402
bool periodic_temp_measuremnt
Definition: ad9361.h:3087
uint32_t lna_index
Definition: ad9361.h:3224
int32_t ad9361_calculate_rf_clock_chain(struct ad9361_rf_phy *phy, uint32_t tx_sample_rate, uint32_t rate_gov, uint32_t *rx_path_clks, uint32_t *tx_path_clks)
Definition: ad9361.c:4766
@ DBGFS_BIST_TONE
Definition: ad9361.h:3428
bool bypass_tx_fir
Definition: ad9361.h:3381
uint8_t tx_fir_ntaps
Definition: ad9361.h:3389
uint8_t low_power_thresh
Definition: ad9361.h:2927
#define RX2_PD_TUNE
Definition: ad9361.h:2101
synth_pd_ctrl
Definition: ad9361.h:3322
#define MIN_ADC_CLK
Definition: ad9361.h:2828
#define LOOP_FILTER_C2(x)
Definition: ad9361.h:2492
@ TX_SAMPL_CLK
Definition: ad9361.h:3274