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