Go to the documentation of this file.
144 #define HMC7044_PULSE_GEN_LEVEL_SENSITIVE 0
145 #define HMC7044_PULSE_GEN_1_PULSE 1
146 #define HMC7044_PULSE_GEN_2_PULSE 2
147 #define HMC7044_PULSE_GEN_4_PULSE 3
148 #define HMC7044_PULSE_GEN_8_PULSE 4
149 #define HMC7044_PULSE_GEN_16_PULSE 5
150 #define HMC7044_PULSE_GEN_CONT_PULSE 7
156 #define HMC7044_SYNC_PIN_DISABLED 0
157 #define HMC7044_SYNC_PIN_SYNC 1
158 #define HMC7044_SYNC_PIN_PULSE_GEN_REQ 2
159 #define HMC7044_SYNC_PIN_SYNC_THEN_PULSE_GEN 3
173 uint64_t *rounded_rate);
bool is_sysref
Definition: hmc7044.h:55
#define HMC7044_REG_PLL2_R_LSB
Definition: hmc7044.c:143
#define HMC7044_N2_LSB(x)
Definition: hmc7044.c:150
#define HMC7044_N1_MAX
Definition: hmc7044.c:251
#define HMC7044_SYNC_PIN_PULSE_GEN_REQ
Definition: hmc7044.h:158
bool rf_reseeder_disable
Definition: hmc7044.h:121
#define HMC7044_DRIVER_Z_MODE(x)
Definition: hmc7044.c:228
JESD204 link configuration settings.
Definition: jesd204.h:105
uint32_t num_channels
Definition: hmc7044.h:132
uint32_t pll1_pfd
Definition: hmc7044.h:110
#define HMC7044_AUTO_MODE_SWITCH
Definition: hmc7044.c:137
#define HMC7044_REG_PULSE_GEN
Definition: hmc7044.c:169
int32_t hmc7044_read(struct hmc7044_dev *dev, uint16_t reg, uint8_t *val)
Definition: hmc7044.c:310
#define HMC7044_REG_PLL2_FREQ_DOUBLER
Definition: hmc7044.c:140
#define HMC7044_LOW_FREQ_INPUT_MODE
Definition: hmc7044.c:184
bool force_mute_enable
Definition: hmc7044.h:54
#define HMC7044_RECOMM_PFD1
Definition: hmc7044.c:241
uint32_t jdev_lmfc_lemc_rate
Definition: hmc7044.h:92
#define HMC7044_REG_CLKIN3_BUF_CTRL
Definition: hmc7044.c:99
#define HMC7044_REG_PLL1_REF_PRIO_CTRL
Definition: hmc7044.c:102
int32_t hmc7044_read(struct hmc7044_dev *dev, uint16_t reg, uint8_t *val)
Definition: hmc7044.c:310
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 HMC7044_R1_MAX
Definition: hmc7044.c:250
bool jdev_skip_sysref_freq_calc
Definition: hmc7044.h:126
#define HMC7044_CLK_INPUT_CTRL
Definition: hmc7044.c:183
@ JESD204_STATE_OP_REASON_INIT
Definition: jesd204.h:148
#define HMC7044_CP_CURRENT_STEP
Definition: hmc7044.c:245
const struct no_os_clk_platform_ops * platform_ops
Definition: no_os_clk.h:50
#define HMC7044_NUM_CHAN
Definition: hmc7044.c:232
#define HMC7044_FORCE_MUTE_EN
Definition: hmc7044.c:230
struct jesd204_dev * jdev
Definition: hmc7044.h:91
#define HMC7044_REG_CH_OUT_CRTL_2(ch)
Definition: hmc7044.c:217
#define HMC7044_PLL2_FREQ_DOUBLER_DIS
Definition: hmc7044.c:141
Header file of SPI Interface.
struct no_os_clk_desc ** clk_desc
Definition: hmc7044.h:67
Definition: hmc7044.c:272
#define HMC7044_REG_CH_OUT_CRTL_4(ch)
Definition: hmc7044.c:221
#define HMC7044_REG_CLK_OUT_DRV_HIGH_PW
Definition: hmc7044.c:202
uint32_t vcxo_freq
Definition: hmc7044.h:71
#define HMC7044_REG_VTUNE_PRESET
Definition: hmc7044.c:205
#define HMC7044_LOW_VCO_MAX
Definition: hmc7044.c:235
bool clkin1_vcoin_en
Definition: hmc7044.h:119
#define HMC7044_PULSE_GEN_CONT_PULSE
Definition: hmc7044.h:150
uint32_t pulse_gen_mode
Definition: hmc7044.h:128
uint32_t sysref_timer_div
Definition: hmc7044.h:77
int32_t hmc7044_init(struct hmc7044_dev **device, const struct hmc7044_init_param *init_param)
Definition: hmc7044.c:1466
Header file of HMC7044, HMC7043 Driver.
#define HMC7044_REG_SYSREF_TIMER_LSB
Definition: hmc7044.c:177
#define pr_err(fmt, args...)
Definition: no_os_print_log.h:88
#define HMC7044_REG_EN_CTRL_0
Definition: hmc7044.c:74
#define HMC7044_REG_PLL1_STATUS
Definition: hmc7044.c:189
bool clkin1_vcoin_en
Definition: hmc7044.h:81
uint32_t jdev_lmfc_lemc_gcd
Definition: hmc7044.h:93
#define HMC7044_REG_GPO_CTRL(x)
Definition: hmc7044.c:163
bool jesd204_sysref_provider
Definition: hmc7044.h:123
#define HMC7044_REG_SOFT_RESET
Definition: hmc7044.c:57
uint32_t jesd204_desired_sysref_frequency_hz
Definition: hmc7044.h:125
#define HMC7044_REG_PLL2_R_MSB
Definition: hmc7044.c:146
@ JESD204_STATE_OP_MODE_PER_DEVICE
Definition: jesd204.h:176
Header file of Delay functions.
uint32_t vcxo_freq
Definition: hmc7044.h:109
const char * name
Definition: no_os_clk.h:46
enum jesd204_sysref_mode mode
Definition: jesd204.h:61
jesd204_state_op_reason
Definition: jesd204.h:147
#define pr_info(fmt, args...)
Definition: no_os_print_log.h:115
int32_t hmc7044_init(struct hmc7044_dev **device, const struct hmc7044_init_param *init_param)
Definition: hmc7044.c:1466
#define HMC7044_REG_PLL1_REF_SWITCH
Definition: hmc7044.c:132
int32_t no_os_clk_init(struct no_os_clk_desc **desc, const struct no_os_clk_init_param *param)
struct hmc7044_chan_spec * channels
Definition: hmc7044.h:90
#define HMC7044_SYSREF_TIMER_EN
Definition: hmc7044.c:80
#define HMC7044_SYNC_PIN_MODE(x)
Definition: hmc7044.c:91
bool high_performance_mode_dis
Definition: hmc7044.h:50
Definition: ad9361_util.h:69
uint32_t pll2_freq
Definition: hmc7044.h:75
#define HMC7044_REG_SYNC
Definition: hmc7044.c:172
#define HMC7044_N2_MSB(x)
Definition: hmc7044.c:153
#define HMC7044_REG_CLKIN0_BUF_CTRL
Definition: hmc7044.c:96
#define HMC7044_START_UP_MODE_DYN_EN
Definition: hmc7044.c:212
#define HMC7044_REF_PATH_EN(x)
Definition: hmc7044.c:88
struct no_os_spi_desc * spi_desc
Definition: hmc7044.h:65
void * no_os_calloc(size_t nitems, size_t size)
Allocate memory and return a pointer to it, set memory to 0.
Definition: chibios_alloc.c:54
#define NO_OS_ARRAY_SIZE(x)
Definition: no_os_util.h:49
bool output_control0_rb4_enable
Definition: hmc7044.h:53
uint32_t jdev_max_sysref_freq
Definition: hmc7044.h:94
struct jesd204_sysref sysref
Definition: jesd204.h:139
#define HMC7044_REG_CH_OUT_CRTL_3(ch)
Definition: hmc7044.c:220
uint32_t in_buf_mode[5]
Definition: hmc7044.h:129
int32_t hmc7044_clk_round_rate(struct hmc7044_dev *dev, uint32_t rate, uint64_t *rounded_rate)
Definition: hmc7044.c:435
@ JESD204_OP_CLK_SYNC_STAGE1
Definition: jesd204.h:201
#define HMC7044_REG_CH_OUT_CRTL_0(ch)
Definition: hmc7044.c:208
#define HMC7044_REG_PLL1_N_LSB
Definition: hmc7044.c:122
#define HMC7044_PLL1_FSM_STATE(x)
Definition: hmc7044.c:191
uint32_t pll1_cp_current
Definition: hmc7044.h:74
#define HMC7044_REG_CH_OUT_CRTL_7(ch)
Definition: hmc7044.c:224
void * jesd204_dev_priv(struct jesd204_dev *jdev)
#define HMC7044_REG_PLL1_N_MSB
Definition: hmc7044.c:125
@ JESD204_OP_CLK_SYNC_STAGE2
Definition: jesd204.h:202
Header file of Clock Driver.
#define HMC7044_HIGH_PERF_DISTRIB_PATH
Definition: hmc7044.c:62
void no_os_mdelay(uint32_t msecs)
Wait until msecs milliseconds passed.
Definition: aducm3029_delay.c:126
uint32_t clkin_freq[4]
Definition: hmc7044.h:69
#define no_os_min(x, y)
Definition: no_os_util.h:59
#define HMC7044_N2_MIN
Definition: hmc7044.c:255
#define HMC7044_SYSREF_TIMER_LSB(x)
Definition: hmc7044.c:178
#define HMC7044_REG_OSCIN_PRESCALER
Definition: hmc7044.c:114
int32_t hmc7044_clk_set_rate(struct hmc7044_dev *dev, uint32_t chan_num, uint64_t rate)
Definition: hmc7044.c:452
#define NO_OS_DIV_ROUND_UP(x, y)
Definition: no_os_util.h:52
#define HMC7044_VCO_HIGH
Definition: hmc7044.c:78
#define pr_debug(fmt, args...)
Definition: no_os_print_log.h:129
#define HMC7044_R2_MSB(x)
Definition: hmc7044.c:147
int32_t hmc7044_remove(struct hmc7044_dev *device)
Definition: hmc7044.c:1632
#define HMC7044_RESEED_REQ
Definition: hmc7044.c:61
#define HMC7044_OUT_DIV_MIN
Definition: hmc7044.c:258
#define HMC7044_RESTART_DIV_FSM
Definition: hmc7044.c:67
#define HMC7044_REG_SYSREF_TIMER_MSB
Definition: hmc7044.c:180
#define HMC7044_CP_CURRENT_DEF
Definition: hmc7044.c:248
#define HMC7044_OUT_DIV_MAX
Definition: hmc7044.c:259
uint32_t gpi_ctrl[4]
Definition: hmc7044.h:87
#define HMC7044_SOFT_RESET
Definition: hmc7044.c:58
bool disable
Definition: hmc7044.h:49
bool read_write_confirmed
Definition: hmc7044.h:99
#define HMC7044_REG_PLL1_R_MSB
Definition: hmc7044.c:119
#define HMC7044_REG_REQ_MODE_0
Definition: hmc7044.c:60
bool pll1_ref_autorevert_en
Definition: hmc7044.h:79
#define HMC7044_VCO_LOW
Definition: hmc7044.c:79
int jesd204_link_get_lmfc_lemc_rate(struct jesd204_link *lnk, unsigned long *rate_hz)
#define HMC7044_REG_CLKIN1_BUF_CTRL
Definition: hmc7044.c:97
unsigned int sync_pin_mode
Definition: hmc7044.h:84
uint32_t jesd204_max_sysref_frequency_hz
Definition: hmc7044.h:124
bool start_up_mode_dynamic_enable
Definition: hmc7044.h:51
uint32_t gpo_ctrl[4]
Definition: hmc7044.h:131
uint8_t hw_ch_num
Definition: no_os_clk.h:79
unsigned int driver_impedance
Definition: hmc7044.h:58
Definition: hmc7044.h:102
unsigned int num
Definition: hmc7044.h:48
struct no_os_spi_init_param * spi_init
Definition: hmc7044.h:103
uint32_t jdev_desired_sysref_freq
Definition: hmc7044.h:95
Structure holding CLK descriptor.
Definition: no_os_clk.h:75
#define HMC7044_PLL2_LOCK_DETECT(x)
Definition: hmc7044.c:194
bool dynamic_driver_enable
Definition: hmc7044.h:52
bool export_no_os_clk
Definition: hmc7044.h:105
#define HMC7044_MAX_PFD1
Definition: hmc7044.c:243
uint32_t clkin_freq[4]
Definition: hmc7044.h:107
#define HMC7044_PULSE_GEN_REQ
Definition: hmc7044.c:66
#define HMC7044_DRIVER_MODE(x)
Definition: hmc7044.c:227
uint32_t pll1_pfd
Definition: hmc7044.h:72
bool hmc_two_level_tree_sync_en
Definition: hmc7044.h:98
unsigned int driver_mode
Definition: hmc7044.h:57
#define HMC7044_PLL2_EN
Definition: hmc7044.c:81
uint32_t gpi_ctrl[4]
Definition: hmc7044.h:130
#define HMC7044_REG_OSCIN_BUF_CTRL
Definition: hmc7044.c:100
#define HMC7044_REG_CH_OUT_CRTL_8(ch)
Definition: hmc7044.c:226
Structure holding SPI descriptor.
Definition: no_os_spi.h:192
uint32_t pfd1_limit
Definition: hmc7044.h:111
#define HMC7044_LOCK_DETECT_TIMER(x)
Definition: hmc7044.c:130
bool is_hmc7043
Definition: hmc7044.h:106
void * dev_desc
Definition: no_os_clk.h:52
#define HMC7044_RFSYNC_EN
Definition: hmc7044.c:89
bool high_performance_mode_clock_dist_en
Definition: hmc7044.h:120
uint64_t no_os_div_u64_rem(uint64_t dividend, uint32_t divisor, uint32_t *remainder)
#define HMC7044_READ
Definition: hmc7044.c:52
uint32_t clkin_freq_ccf[4]
Definition: hmc7044.h:108
#define HMC7044_CLK_OUT_PH_STATUS(x)
Definition: hmc7044.c:196
uint32_t pll1_cp_current
Definition: hmc7044.h:112
uint32_t pll1_loop_bw
Definition: hmc7044.h:76
unsigned int pll1_ref_prio_ctrl
Definition: hmc7044.h:78
uint32_t pfd1_limit
Definition: hmc7044.h:73
#define HMC7044_PULSE_GEN_MODE(x)
Definition: hmc7044.c:170
uint32_t no_os_greatest_common_divisor(uint32_t a, uint32_t b)
#define HMC7044_VCO_SEL(x)
Definition: hmc7044.c:76
int32_t no_os_log_base_2(uint32_t x)
#define HMC7044_REG_CLK_OUT_DRV_LOW_PW
Definition: hmc7044.c:201
Definition: no_os_clk.h:44
#define HMC7044_PLL1_EN
Definition: hmc7044.c:82
void no_os_rational_best_approximation(uint32_t given_numerator, uint32_t given_denominator, uint32_t max_numerator, uint32_t max_denominator, uint32_t *best_numerator, uint32_t *best_denominator)
@ JESD204_OP_LINK_PRE_SETUP
Definition: jesd204.h:200
#define HMC7044_HIGH_VCO_MAX
Definition: hmc7044.c:237
uint32_t link_id
Definition: jesd204.h:106
#define HMC7044_REG_CH_OUT_CRTL_1(ch)
Definition: hmc7044.c:214
uint32_t pll2_freq
Definition: hmc7044.h:113
const struct no_os_clk_platform_ops hmc7044_clk_ops
hmc7044 clock ops
Definition: hmc7044.c:1691
#define HMC7044_REG_ALARM_READBACK
Definition: hmc7044.c:188
#define HMC7044_REG_PLL1_CP_CTRL
Definition: hmc7044.c:110
void * no_os_malloc(size_t size)
Allocate memory and return a pointer to it.
Definition: chibios_alloc.c:43
uint32_t clkin_freq_ccf[4]
Definition: hmc7044.h:70
#define no_os_clamp_t(type, val, min_val, max_val)
Definition: no_os_util.h:71
#define HMC7044_REG_PLL2_N_MSB
Definition: hmc7044.c:152
unsigned int coarse_delay
Definition: hmc7044.h:59
#define HMC7044_REG_GLOB_MODE
Definition: hmc7044.c:87
#define HMC7044_REG_PLL1_HOLDOVER
Definition: hmc7044.c:204
bool clkin0_rfsync_en
Definition: hmc7044.h:80
int32_t hmc7044_clk_recalc_rate(struct hmc7044_dev *dev, uint32_t chan_num, uint64_t *rate)
Definition: hmc7044.c:407
#define HMC7044_DYN_DRIVER_EN
Definition: hmc7044.c:229
unsigned int pll1_ref_prio_ctrl
Definition: hmc7044.h:116
const struct no_os_clk_platform_ops hmc7044_clk_ops
hmc7044 specific CLK platform ops structure
Definition: hmc7044.c:1691
#define NO_OS_BIT(x)
Definition: no_os_util.h:45
bool pll1_ref_autorevert_en
Definition: hmc7044.h:117
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 HMC7044_CP_CURRENT_MIN
Definition: hmc7044.c:246
int jesd204_dev_register(struct jesd204_dev **jdev, const struct jesd204_dev_data *dev_data)
uint32_t pll1_loop_bw
Definition: hmc7044.h:114
int32_t hmc7044_clk_recalc_rate(struct hmc7044_dev *dev, uint32_t chan_num, uint64_t *rate)
Definition: hmc7044.c:407
uint32_t sysref_timer_div
Definition: hmc7044.h:115
unsigned int divider
Definition: hmc7044.h:56
#define HMC7044_CP_CURRENT_MAX
Definition: hmc7044.c:247
@ JESD204_OP_CLK_SYNC_STAGE3
Definition: jesd204.h:203
unsigned int sync_pin_mode
Definition: hmc7044.h:127
void no_os_udelay(uint32_t usecs)
Wait until usecs microseconds passed.
Definition: aducm3029_delay.c:114
#define NULL
Definition: wrapper.h:64
uint32_t gpo_ctrl[4]
Definition: hmc7044.h:88
#define HMC7044_PLL1_CP_CURRENT(x)
Definition: hmc7044.c:111
#define HMC7044_REG_SCRATCHPAD
Definition: hmc7044.c:93
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
#define HMC7044_REG_PLL1_DELAY
Definition: hmc7044.c:203
struct hmc7044_chan_spec * channels
Definition: hmc7044.h:133
#define HMC7044_DIV_LSB(x)
Definition: hmc7044.c:215
#define HMC7044_REG_CLKIN2_BUF_CTRL
Definition: hmc7044.c:98
bool is_sysref_provider
Definition: hmc7044.h:97
#define HMC7044_REG_PLL1_LOCK_DETECT
Definition: hmc7044.c:128
#define HMC7044_SYNC_RETIME
Definition: hmc7044.c:173
int32_t hmc7044_set_rate(struct no_os_clk_desc *desc, uint64_t rate)
Set the clock rate.
Definition: hmc7044.c:1681
bool rf_reseeder_en
Definition: hmc7044.h:83
@ JESD204_STATE_CHANGE_DONE
Definition: jesd204.h:46
void * dev_desc
Definition: no_os_clk.h:83
bool hmc_two_level_tree_sync_en
Definition: hmc7044.h:122
uint8_t hw_ch_num
Definition: no_os_clk.h:48
int32_t hmc7044_clk_round_rate(struct hmc7044_dev *dev, uint32_t rate, uint64_t *rounded_rate)
Definition: hmc7044.c:435
@ JESD204_SYSREF_CONTINUOUS
Definition: jesd204.h:39
#define HMC7044_MIN_PFD1
Definition: hmc7044.c:242
#define HMC7044_SYNC_PIN_DISABLED
Definition: hmc7044.h:156
#define HMC7044_LOW_VCO_MIN
Definition: hmc7044.c:234
#define HMC7044_HIGH_VCO_MIN
Definition: hmc7044.c:236
#define HMC7044_RECOMM_LCM_MAX
Definition: hmc7044.c:240
int32_t no_os_spi_remove(struct no_os_spi_desc *desc)
Free the resources allocated by no_os_spi_init().
Definition: no_os_spi.c:116
#define HMC7044_SYNC_PIN_SYNC
Definition: hmc7044.h:157
#define HMC7044_REG_PLL2_N_LSB
Definition: hmc7044.c:149
bool high_performance_mode_clock_dist_en
Definition: hmc7044.h:82
@ JESD204_OP_LINK_SUPPORTED
Definition: jesd204.h:199
uint32_t pulse_gen_mode
Definition: hmc7044.h:85
bool jdev_skip_sysref_freq_calc
Definition: hmc7044.h:96
int32_t no_os_spi_init(struct no_os_spi_desc **desc, const struct no_os_spi_init_param *param)
Initialize the SPI communication peripheral.
Definition: no_os_spi.c:52
#define HMC7044_CH_EN
Definition: hmc7044.c:211
uint32_t hmc7044_calc_out_div(uint32_t rate, uint32_t parent_rate)
Definition: hmc7044.c:381
#define HMC7044_HI_PERF_MODE
Definition: hmc7044.c:209
unsigned int out_mux_mode
Definition: hmc7044.h:61
#define HMC7044_HOLDOVER_DAC
Definition: hmc7044.c:135
bool is_hmc7043
Definition: hmc7044.h:68
int32_t hmc7044_clk_set_rate(struct hmc7044_dev *dev, uint32_t chan_num, uint64_t rate)
Definition: hmc7044.c:452
Header file of utility functions.
#define HMC7044_R2_MAX
Definition: hmc7044.c:254
#define HMC7044_VCOIN_MODE_EN
Definition: hmc7044.c:90
int32_t hmc7044_remove(struct hmc7044_dev *device)
Definition: hmc7044.c:1632
#define HMC7044_SYSREF_TIMER_MSB(x)
Definition: hmc7044.c:181
#define HMC7044_DIV_MSB(x)
Definition: hmc7044.c:218
#define HMC7044_SYNC_EN
Definition: hmc7044.c:210
#define HMC7044_N2_MAX
Definition: hmc7044.c:256
uint32_t num_channels
Definition: hmc7044.h:89
#define HMC7044_AUTO_REVERT_SWITCH
Definition: hmc7044.c:136
#define pr_warning(fmt, args...)
Definition: no_os_print_log.h:97
#define HMC7044_ADDR(x)
Definition: hmc7044.c:54
#define HMC7044_R2_LSB(x)
Definition: hmc7044.c:144
#define HMC7044_REG_CLKIN_PRESCALER(x)
Definition: hmc7044.c:113
jesd204_sysref_cb sysref_cb
Definition: jesd204.h:228
#define HMC7044_CNT(x)
Definition: hmc7044.c:53
JESD204 device initialization data.
Definition: jesd204.h:227
#define HMC7044_RF_RESEEDER_EN
Definition: hmc7044.c:75
#define HMC7044_REG_GPI_CTRL(x)
Definition: hmc7044.c:160
struct hmc7044_dev * hmc
Definition: hmc7044.c:273
uint32_t in_buf_mode[5]
Definition: hmc7044.h:86
unsigned int fine_delay
Definition: hmc7044.h:60
bool clkin0_rfsync_en
Definition: hmc7044.h:118
#define HMC7044_REG_PLL1_R_LSB
Definition: hmc7044.c:116
#define NO_OS_DIV_ROUND_CLOSEST(x, y)
Definition: no_os_util.h:54
#define HMC7044_PLL1_ACTIVE_CLKIN(x)
Definition: hmc7044.c:192
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:140
#define HMC7044_PULSE_GEN_LEVEL_SENSITIVE
Definition: hmc7044.h:144
#define HMC7044_WRITE
Definition: hmc7044.c:51