no-OS
xilinx_transceiver.h
Go to the documentation of this file.
1 /***************************************************************************/
34 #ifndef XILINX_TRANSCEIVER_H_
35 #define XILINX_TRANSCEIVER_H_
36 
37 /******************************************************************************/
38 /***************************** Include Files **********************************/
39 /******************************************************************************/
40 #include <stdint.h>
41 #include <stdbool.h>
42 
43 /******************************************************************************/
44 /************************ Macros and Types Declarations ***********************/
45 /******************************************************************************/
46 #define AXI_PCORE_VER(major, minor, letter) ((major << 16) | (minor << 8) | letter)
47 #define AXI_PCORE_VER_MAJOR(version) (((version) >> 16) & 0xff)
48 #define AXI_PCORE_VER_MINOR(version) ((version >> 8) & 0xff)
49 #define AXI_PCORE_VER_LETTER(version) (version & 0xff)
50 
51 #define AXI_REG_VERSION 0x0000
52 #define AXI_VERSION(x) (((x) & 0xffffffff) << 0)
53 #define AXI_VERSION_IS(x, y, z) ((x) << 16 | (y) << 8 | (z))
54 #define AXI_VERSION_MAJOR(x) ((x) >> 16)
55 
56 #define AXI_REG_FPGA_INFO 0x001C
57 #define AXI_REG_FPGA_VOLTAGE 0x0140
58 
59 #define AXI_INFO_FPGA_TECH(info) ((info) >> 24)
60 #define AXI_INFO_FPGA_FAMILY(info) (((info) >> 16) & 0xff)
61 #define AXI_INFO_FPGA_SPEED_GRADE(info) (((info) >> 8) & 0xff)
62 #define AXI_INFO_FPGA_DEV_PACKAGE(info) ((info) & 0xff)
63 #define AXI_INFO_FPGA_VOLTAGE(val) ((val) & 0xffff)
64 
74 };
75 
85 };
86 
95 };
96 
106 };
107 
118 };
119 
135 };
136 
160 };
161 
166 struct xilinx_xcvr {
169  uint32_t encoding;
170  struct adxcvr *ad_xcvr;
171  uint32_t version;
176  uint32_t voltage;
177 
178  // CPLL / QPLL nominal operating ranges
179  uint32_t vco0_min; // kHz
180  uint32_t vco0_max; // kHz
181  uint32_t vco1_min; // kHz
182  uint32_t vco1_max; // kHz
183 };
184 
186  int (*write)(struct adxcvr *xcvr, unsigned int drp_port,
187  unsigned int reg, unsigned int val);
188  int (*read)(struct adxcvr *xcvr, unsigned int drp_port,
189  unsigned int reg, unsigned int *val);
190 };
191 
232 struct clk_ops {
233  int (*enable)(struct adxcvr *xcvr);
234  int (*disable)(struct adxcvr *xcvr);
235  unsigned long (*recalc_rate)(struct adxcvr *xcvr,
236  unsigned long parent_rate);
237  long (*round_rate)(struct adxcvr *xcvr,
238  unsigned long rate,
239  unsigned long parent_rate);
240  int (*set_rate)(struct adxcvr *xcvr,
241  unsigned long rate,
242  unsigned long parent_rate);
243 };
244 
250  uint32_t refclk_div;
251  uint32_t fb_div_N1;
252  uint32_t fb_div_N2;
253 };
254 
260  uint32_t refclk_div;
261  uint32_t fb_div;
262  uint32_t band;
263  uint32_t qty4_full_rate;
264 };
265 
266 /* Encoding */
267 #define ENC_8B10B 810
268 #define ENC_66B64B 6664
269 
270 /******************************************************************************/
271 /************************ Functions Declarations ******************************/
272 /******************************************************************************/
273 
275 int xilinx_xcvr_configure_cdr(struct xilinx_xcvr *xcvr,
276  uint32_t drp_port, uint32_t lane_rate, uint32_t out_div,
277  bool lpm_enable);
280  uint32_t drp_port, bool lpm);
281 
282 
285  uint32_t refclk_khz, uint32_t lane_rate_khz,
286  struct xilinx_xcvr_cpll_config *conf, uint32_t *out_div);
289  uint32_t drp_port, struct xilinx_xcvr_cpll_config *conf);
292  uint32_t drp_port, const struct xilinx_xcvr_cpll_config *conf);
295  uint32_t refclk_hz, const struct xilinx_xcvr_cpll_config *conf,
296  uint32_t out_div);
297 
299 int xilinx_xcvr_calc_qpll_config(struct xilinx_xcvr *xcvr, uint32_t sys_clk_sel,
300  uint32_t refclk_khz, uint32_t lane_rate_khz,
301  struct xilinx_xcvr_qpll_config *conf, uint32_t *out_div);
304  uint32_t drp_port, uint32_t sys_clk_sel, struct xilinx_xcvr_qpll_config *conf);
307  uint32_t sys_clk_sel, uint32_t drp_port,
308  const struct xilinx_xcvr_qpll_config *conf);
311  uint32_t refclk_hz, const struct xilinx_xcvr_qpll_config *conf,
312  uint32_t out_div);
313 
315 int xilinx_xcvr_read_out_div(struct xilinx_xcvr *xcvr, uint32_t drp_port,
316  uint32_t *rx_out_div, uint32_t *tx_out_div);
318 int xilinx_xcvr_write_out_div(struct xilinx_xcvr *xcvr, uint32_t drp_port,
319  int32_t rx_out_div, int32_t tx_out_div);
320 
323  uint32_t drp_port, uint32_t div);
326  uint32_t drp_port, uint32_t div);
327 
329 int xilinx_xcvr_prbsel_enc_get(struct xilinx_xcvr *xcvr,
330  uint32_t prbs, bool reverse_lu);
331 
334  uint32_t drp_port, uint32_t *cnt);
335 
338  uint32_t drp_port, int32_t rx_rate, int32_t tx_rate);
339 
341 int xilinx_xcvr_write_prog_div(struct xilinx_xcvr *xcvr,
342  uint32_t drp_port, int32_t rx_prog_div, int32_t tx_prog_div);
343 
346  uint32_t drp_port, bool en);
347 
348 #endif
QPLL_CFG0_LOWBAND_MASK
#define QPLL_CFG0_LOWBAND_MASK
Definition: xilinx_transceiver.c:73
AXI_FPGA_DEV_CL
@ AXI_FPGA_DEV_CL
Definition: xilinx_transceiver.h:156
xilinx_xcvr::speed_grade
enum axi_fpga_speed_grade speed_grade
Definition: xilinx_transceiver.h:174
xilinx_xcvr_write_async_gearbox_en
int xilinx_xcvr_write_async_gearbox_en(struct xilinx_xcvr *xcvr, uint32_t drp_port, bool en)
Definition: xilinx_transceiver.c:1985
xilinx_xcvr::vco1_max
uint32_t vco1_max
Definition: xilinx_transceiver.h:182
GTY4_QPLL_CLKOUT_RATE
#define GTY4_QPLL_CLKOUT_RATE(xcvr, x)
Definition: xilinx_transceiver.c:114
CPLL_REFCLK_DIV_M_ADDR
#define CPLL_REFCLK_DIV_M_ADDR
Definition: xilinx_transceiver.c:92
AXI_FPGA_SPEED_2L
@ AXI_FPGA_SPEED_2L
Definition: xilinx_transceiver.h:132
xilinx_xcvr_gtx2_cpll_read_config
int xilinx_xcvr_gtx2_cpll_read_config(struct xilinx_xcvr *xcvr, uint32_t drp_port, struct xilinx_xcvr_cpll_config *conf)
Definition: xilinx_transceiver.c:864
QPLL_REFCLK_DIV_M
#define QPLL_REFCLK_DIV_M(x)
Definition: xilinx_transceiver.c:78
AXI_PCORE_VER_MAJOR
#define AXI_PCORE_VER_MAJOR(version)
Definition: axi_sysid.h:59
xilinx_transceiver.h
Driver for the Xilinx High-speed transceiver dynamic reconfiguration.
AXI_FPGA_DEV_FH
@ AXI_FPGA_DEV_FH
Definition: xilinx_transceiver.h:148
xilinx_xcvr_calc_qpll_config
int xilinx_xcvr_calc_qpll_config(struct xilinx_xcvr *xcvr, uint32_t sys_clk_sel, uint32_t refclk_khz, uint32_t lane_rate_khz, struct xilinx_xcvr_qpll_config *conf, uint32_t *out_div)
Definition: xilinx_transceiver.c:668
AXI_FPGA_DEV_FT
@ AXI_FPGA_DEV_FT
Definition: xilinx_transceiver.h:151
clk_ops::round_rate
long(* round_rate)(struct adxcvr *xcvr, unsigned long rate, unsigned long parent_rate)
Definition: xilinx_transceiver.h:237
AXI_FPGA_DEV_HC
@ AXI_FPGA_DEV_HC
Definition: xilinx_transceiver.h:147
GTH4_RX_PRBS_ERR_CNT
#define GTH4_RX_PRBS_ERR_CNT
Definition: xilinx_transceiver.c:108
AXI_FPGA_SPEED_3
@ AXI_FPGA_SPEED_3
Definition: xilinx_transceiver.h:134
xilinx_xcvr_drp_ops::write
int(* write)(struct adxcvr *xcvr, unsigned int drp_port, unsigned int reg, unsigned int val)
Definition: xilinx_transceiver.h:186
xilinx_xcvr_cpll_config::fb_div_N1
uint32_t fb_div_N1
Definition: xilinx_transceiver.h:251
xilinx_xcvr::family
enum axi_fpga_family family
Definition: xilinx_transceiver.h:173
TX_CLK25_DIV
#define TX_CLK25_DIV
Definition: xilinx_transceiver.c:101
adxcvr
ADI JESD204B/C AXI_ADXCVR Highspeed Transceiver Device structure.
Definition: altera_adxcvr.h:89
xilinx_xcvr_cpll_config::refclk_div
uint32_t refclk_div
Definition: xilinx_transceiver.h:250
QPLL_CFG0_ADDR
#define QPLL_CFG0_ADDR
Definition: xilinx_transceiver.c:72
PM_1250
@ PM_1250
Definition: xilinx_transceiver.h:94
AXI_FPGA_FAMILY_KINTEX
@ AXI_FPGA_FAMILY_KINTEX
Definition: clk_axi_clkgen.c:135
pr_err
#define pr_err(fmt, args...)
Definition: no_os_print_log.h:88
AXI_FPGA_DEV_BA
@ AXI_FPGA_DEV_BA
Definition: xilinx_transceiver.h:158
RXCDR_CFG1_ADDR
#define RXCDR_CFG1_ADDR
Definition: xilinx_transceiver.c:57
GTH34_QPLL_REFCLK_DIV
#define GTH34_QPLL_REFCLK_DIV(xcvr, x)
Definition: xilinx_transceiver.c:112
XILINX_XCVR_LEGACY_TYPE_S7_GTX2
@ XILINX_XCVR_LEGACY_TYPE_S7_GTX2
Definition: xilinx_transceiver.h:81
xilinx_xcvr_read_out_div
int xilinx_xcvr_read_out_div(struct xilinx_xcvr *xcvr, uint32_t drp_port, uint32_t *rx_out_div, uint32_t *tx_out_div)
Definition: xilinx_transceiver.c:1560
NO_OS_DIV_ROUND_CLOSEST_ULL
#define NO_OS_DIV_ROUND_CLOSEST_ULL(x, y)
Definition: no_os_util.h:56
xilinx_xcvr::type
enum xilinx_xcvr_type type
Definition: xilinx_transceiver.h:167
xilinx_xcvr_configure_cdr
int xilinx_xcvr_configure_cdr(struct xilinx_xcvr *xcvr, uint32_t drp_port, uint32_t lane_rate, uint32_t out_div, bool lpm_enable)
Definition: xilinx_transceiver.c:357
axi_fgpa_technology
axi_fgpa_technology
Enum for technology/generation of the FPGA device.
Definition: clk_axi_clkgen.c:125
xilinx_xcvr::ad_xcvr
struct adxcvr * ad_xcvr
Definition: xilinx_transceiver.h:170
CPLL_REFCLK_DIV_M_MASK
#define CPLL_REFCLK_DIV_M_MASK
Definition: xilinx_transceiver.c:93
AXI_FPGA_DEV_CP
@ AXI_FPGA_DEV_CP
Definition: xilinx_transceiver.h:150
AXI_FPGA_SPEED_1
@ AXI_FPGA_SPEED_1
Definition: xilinx_transceiver.h:126
xilinx_xcvr_qpll_config::qty4_full_rate
uint32_t qty4_full_rate
Definition: xilinx_transceiver.h:263
XILINX_XCVR_TYPE_US_GTY4
@ XILINX_XCVR_TYPE_US_GTY4
Definition: xilinx_transceiver.h:73
no_os_print_log.h
Print messages helpers.
xilinx_xcvr_calc_cpll_config
int xilinx_xcvr_calc_cpll_config(struct xilinx_xcvr *xcvr, uint32_t refclk_khz, uint32_t lane_rate_khz, struct xilinx_xcvr_cpll_config *conf, uint32_t *out_div)
Definition: xilinx_transceiver.c:539
xilinx_xcvr_qpll_read_config
int xilinx_xcvr_qpll_read_config(struct xilinx_xcvr *xcvr, uint32_t drp_port, uint32_t sys_clk_sel, struct xilinx_xcvr_qpll_config *conf)
Definition: xilinx_transceiver.c:1260
PM_200
@ PM_200
Definition: xilinx_transceiver.h:92
QPLL_FBDIV_RATIO_ADDR
#define QPLL_FBDIV_RATIO_ADDR
Definition: xilinx_transceiver.c:83
OUT_DIV_TX_OFFSET
#define OUT_DIV_TX_OFFSET
Definition: xilinx_transceiver.c:51
xilinx_xcvr::version
uint32_t version
Definition: xilinx_transceiver.h:171
xilinx_xcvr::vco1_min
uint32_t vco1_min
Definition: xilinx_transceiver.h:181
RXCDR_CFG4_ADDR
#define RXCDR_CFG4_ADDR
Definition: xilinx_transceiver.c:66
xilinx_xcvr_configure_cdr
int xilinx_xcvr_configure_cdr(struct xilinx_xcvr *xcvr, uint32_t drp_port, uint32_t lane_rate, uint32_t out_div, bool lpm_enable)
Definition: xilinx_transceiver.c:357
xilinx_xcvr_type
xilinx_xcvr_type
Enum for GT type.
Definition: xilinx_transceiver.h:69
RXCDR_CFG4_MASK
#define RXCDR_CFG4_MASK
Definition: xilinx_transceiver.c:67
NO_OS_ARRAY_SIZE
#define NO_OS_ARRAY_SIZE(x)
Definition: no_os_util.h:49
xilinx_xcvr_write_prog_div
int xilinx_xcvr_write_prog_div(struct xilinx_xcvr *xcvr, uint32_t drp_port, int32_t rx_prog_div, int32_t tx_prog_div)
Definition: xilinx_transceiver.c:1863
axi_fpga_dev_pack
axi_fpga_dev_pack
Enum for device package.
Definition: xilinx_transceiver.h:141
RX_CLK25_DIV_MASK
#define RX_CLK25_DIV_MASK
Definition: xilinx_transceiver.c:99
QPLL_CFG1_ADDR
#define QPLL_CFG1_ADDR
Definition: xilinx_transceiver.c:75
AXI_FPGA_SPEED_1LV
@ AXI_FPGA_SPEED_1LV
Definition: xilinx_transceiver.h:130
xilinx_xcvr_qpll_calc_lane_rate
int xilinx_xcvr_qpll_calc_lane_rate(struct xilinx_xcvr *xcvr, uint32_t refclk_hz, const struct xilinx_xcvr_qpll_config *conf, uint32_t out_div)
Definition: xilinx_transceiver.c:1470
xilinx_xcvr_drp_ops
Definition: xilinx_transceiver.h:185
clk_ops::enable
int(* enable)(struct adxcvr *xcvr)
Definition: xilinx_transceiver.h:233
AXI_FPGA_DEV_UNKNOWN
@ AXI_FPGA_DEV_UNKNOWN
Definition: xilinx_transceiver.h:142
xilinx_xcvr_legacy_type
xilinx_xcvr_legacy_type
Enum for legacy GT type.
Definition: xilinx_transceiver.h:80
QPLL_FBDIV_RATIO_MASK
#define QPLL_FBDIV_RATIO_MASK
Definition: xilinx_transceiver.c:84
xilinx_xcvr::refclk_ppm
enum xilinx_xcvr_refclk_ppm refclk_ppm
Definition: xilinx_transceiver.h:168
RX_CLK25_DIV_OFFSET
#define RX_CLK25_DIV_OFFSET
Definition: xilinx_transceiver.c:98
xilinx_xcvr_prbsel_enc_get
int xilinx_xcvr_prbsel_enc_get(struct xilinx_xcvr *xcvr, uint32_t prbs, bool reverse_lu)
Definition: xilinx_transceiver.c:2094
xilinx_xcvr::tech
enum axi_fgpa_technology tech
Definition: xilinx_transceiver.h:172
OUT_DIV_RX_OFFSET
#define OUT_DIV_RX_OFFSET
Definition: xilinx_transceiver.c:52
axi_adxcvr.h
Driver for the ADI AXI-ADXCVR Module.
xilinx_xcvr_qpll_calc_lane_rate
int xilinx_xcvr_qpll_calc_lane_rate(struct xilinx_xcvr *xcvr, uint32_t refclk_hz, const struct xilinx_xcvr_qpll_config *conf, uint32_t out_div)
Definition: xilinx_transceiver.c:1470
PM_700
@ PM_700
Definition: xilinx_transceiver.h:93
AXI_FPGA_DEV_CS
@ AXI_FPGA_DEV_CS
Definition: xilinx_transceiver.h:149
xilinx_xcvr_cpll_write_config
int xilinx_xcvr_cpll_write_config(struct xilinx_xcvr *xcvr, uint32_t drp_port, const struct xilinx_xcvr_cpll_config *conf)
Definition: xilinx_transceiver.c:1070
no_os_error.h
Error codes definition.
pr_debug
#define pr_debug(fmt, args...)
Definition: no_os_print_log.h:129
AXI_FPGA_SPEED_2LV
@ AXI_FPGA_SPEED_2LV
Definition: xilinx_transceiver.h:133
QPLL_REFCLK_DIV_M_OFFSET
#define QPLL_REFCLK_DIV_M_OFFSET
Definition: xilinx_transceiver.c:77
RXCDR_CFG0_ADDR
#define RXCDR_CFG0_ADDR
Definition: xilinx_transceiver.c:54
xilinx_xcvr::vco0_max
uint32_t vco0_max
Definition: xilinx_transceiver.h:180
xilinx_xcvr_read_out_div
int xilinx_xcvr_read_out_div(struct xilinx_xcvr *xcvr, uint32_t drp_port, uint32_t *rx_out_div, uint32_t *tx_out_div)
Definition: xilinx_transceiver.c:1560
XILINX_XCVR_LEGACY_TYPE_US_GTH3
@ XILINX_XCVR_LEGACY_TYPE_US_GTH3
Definition: xilinx_transceiver.h:82
GTH3_RX_PRBS_ERR_CNT
#define GTH3_RX_PRBS_ERR_CNT
Definition: xilinx_transceiver.c:107
xilinx_xcvr_write_rx_clk25_div
int xilinx_xcvr_write_rx_clk25_div(struct xilinx_xcvr *xcvr, uint32_t drp_port, uint32_t div)
Definition: xilinx_transceiver.c:2013
N
#define N(x)
Definition: ad9144.h:1269
xilinx_xcvr_drp_update
int xilinx_xcvr_drp_update(struct xilinx_xcvr *xcvr, uint32_t drp_port, uint32_t reg, uint32_t mask, uint32_t val)
Definition: xilinx_transceiver.c:198
xilinx_xcvr_prbs_err_cnt_get
int xilinx_xcvr_prbs_err_cnt_get(struct xilinx_xcvr *xcvr, uint32_t drp_port, uint32_t *cnt)
Definition: xilinx_transceiver.c:2138
xilinx_xcvr_calc_qpll_config
int xilinx_xcvr_calc_qpll_config(struct xilinx_xcvr *xcvr, uint32_t sys_clk_sel, uint32_t refclk_khz, uint32_t lane_rate_khz, struct xilinx_xcvr_qpll_config *conf, uint32_t *out_div)
Definition: xilinx_transceiver.c:668
xilinx_xcvr_calc_cpll_config
int xilinx_xcvr_calc_cpll_config(struct xilinx_xcvr *xcvr, uint32_t refclk_khz, uint32_t lane_rate_khz, struct xilinx_xcvr_cpll_config *conf, uint32_t *out_div)
Definition: xilinx_transceiver.c:539
TX_CLK25_DIV_MASK
#define TX_CLK25_DIV_MASK
Definition: xilinx_transceiver.c:102
GTX_RX_PRBS_ERR_CNT
#define GTX_RX_PRBS_ERR_CNT
Definition: xilinx_transceiver.c:106
AXI_FPGA_SPEED_1H
@ AXI_FPGA_SPEED_1H
Definition: xilinx_transceiver.h:128
xilinx_xcvr_qpll_write_config
int xilinx_xcvr_qpll_write_config(struct xilinx_xcvr *xcvr, uint32_t sys_clk_sel, uint32_t drp_port, const struct xilinx_xcvr_qpll_config *conf)
Definition: xilinx_transceiver.c:1442
AXI_FPGA_FAMILY_ARTIX
@ AXI_FPGA_FAMILY_ARTIX
Definition: xilinx_transceiver.h:114
xilinx_xcvr_prbs_err_cnt_get
int xilinx_xcvr_prbs_err_cnt_get(struct xilinx_xcvr *xcvr, uint32_t drp_port, uint32_t *cnt)
Definition: xilinx_transceiver.c:2138
xilinx_xcvr_write_prog_div
int xilinx_xcvr_write_prog_div(struct xilinx_xcvr *xcvr, uint32_t drp_port, int32_t rx_prog_div, int32_t tx_prog_div)
Definition: xilinx_transceiver.c:1863
AXI_FPGA_DEV_SF
@ AXI_FPGA_DEV_SF
Definition: xilinx_transceiver.h:157
xilinx_xcvr::dev_package
enum axi_fpga_dev_pack dev_package
Definition: xilinx_transceiver.h:175
AXI_FPGA_FAMILY_KINTEX
@ AXI_FPGA_FAMILY_KINTEX
Definition: xilinx_transceiver.h:115
xilinx_xcvr_qpll_write_config
int xilinx_xcvr_qpll_write_config(struct xilinx_xcvr *xcvr, uint32_t sys_clk_sel, uint32_t drp_port, const struct xilinx_xcvr_qpll_config *conf)
Definition: xilinx_transceiver.c:1442
AXI_FPGA_TECH_ULTRASCALE_PLUS
@ AXI_FPGA_TECH_ULTRASCALE_PLUS
Definition: xilinx_transceiver.h:105
RXCDR_CFG3_ADDR
#define RXCDR_CFG3_ADDR
Definition: xilinx_transceiver.c:63
AXI_FPGA_DEV_FF
@ AXI_FPGA_DEV_FF
Definition: xilinx_transceiver.h:145
AXI_FPGA_DEV_SB
@ AXI_FPGA_DEV_SB
Definition: xilinx_transceiver.h:153
AXI_FPGA_DEV_FB
@ AXI_FPGA_DEV_FB
Definition: xilinx_transceiver.h:146
CPLL_FBDIV_N2_MASK
#define CPLL_FBDIV_N2_MASK
Definition: xilinx_transceiver.c:95
xilinx_xcvr_write_prog_div_rate
int xilinx_xcvr_write_prog_div_rate(struct xilinx_xcvr *xcvr, uint32_t drp_port, int32_t rx_rate, int32_t tx_rate)
Definition: xilinx_transceiver.c:1942
AXI_FPGA_DEV_RF
@ AXI_FPGA_DEV_RF
Definition: xilinx_transceiver.h:143
xilinx_xcvr::encoding
uint32_t encoding
Definition: xilinx_transceiver.h:169
xilinx_xcvr_drp_ops::read
int(* read)(struct adxcvr *xcvr, unsigned int drp_port, unsigned int reg, unsigned int *val)
Definition: xilinx_transceiver.h:188
xilinx_xcvr_refclk_ppm
xilinx_xcvr_refclk_ppm
Enum for reference clock ppm.
Definition: xilinx_transceiver.h:91
XILINX_XCVR_TYPE_US_GTH3
@ XILINX_XCVR_TYPE_US_GTH3
Definition: xilinx_transceiver.h:71
xilinx_xcvr_qpll_read_config
int xilinx_xcvr_qpll_read_config(struct xilinx_xcvr *xcvr, uint32_t drp_port, uint32_t sys_clk_sel, struct xilinx_xcvr_qpll_config *conf)
Definition: xilinx_transceiver.c:1260
xilinx_xcvr_cpll_config
Structure holding CPLL configuration.
Definition: xilinx_transceiver.h:249
GTH34_SYSCLK_QPLL1
#define GTH34_SYSCLK_QPLL1
Definition: xilinx_transceiver.c:104
xilinx_xcvr_write_rx_clk25_div
int xilinx_xcvr_write_rx_clk25_div(struct xilinx_xcvr *xcvr, uint32_t drp_port, uint32_t div)
Definition: xilinx_transceiver.c:2013
AXI_FPGA_DEV_FG
@ AXI_FPGA_DEV_FG
Definition: xilinx_transceiver.h:152
AXI_FPGA_TECH_SERIES7
@ AXI_FPGA_TECH_SERIES7
Definition: xilinx_transceiver.h:103
xilinx_xcvr_write_out_div
int xilinx_xcvr_write_out_div(struct xilinx_xcvr *xcvr, uint32_t drp_port, int32_t rx_out_div, int32_t tx_out_div)
Definition: xilinx_transceiver.c:1673
NO_OS_BIT
#define NO_OS_BIT(x)
Definition: no_os_util.h:45
xilinx_xcvr_write_tx_clk25_div
int xilinx_xcvr_write_tx_clk25_div(struct xilinx_xcvr *xcvr, uint32_t drp_port, uint32_t div)
Definition: xilinx_transceiver.c:2055
AXI_FPGA_DEV_RB
@ AXI_FPGA_DEV_RB
Definition: xilinx_transceiver.h:154
AXI_FPGA_DEV_FL
@ AXI_FPGA_DEV_FL
Definition: xilinx_transceiver.h:144
xilinx_xcvr::voltage
uint32_t voltage
Definition: xilinx_transceiver.h:176
AXI_FPGA_SPEED_2
@ AXI_FPGA_SPEED_2
Definition: xilinx_transceiver.h:131
xilinx_xcvr_cpll_config::fb_div_N2
uint32_t fb_div_N2
Definition: xilinx_transceiver.h:252
xilinx_xcvr_cpll_calc_lane_rate
int xilinx_xcvr_cpll_calc_lane_rate(struct xilinx_xcvr *xcvr, uint32_t refclk_hz, const struct xilinx_xcvr_cpll_config *conf, uint32_t out_div)
Definition: xilinx_transceiver.c:1096
xilinx_xcvr_write_out_div
int xilinx_xcvr_write_out_div(struct xilinx_xcvr *xcvr, uint32_t drp_port, int32_t rx_out_div, int32_t tx_out_div)
Definition: xilinx_transceiver.c:1673
xilinx_xcvr_write_prog_div_rate
int xilinx_xcvr_write_prog_div_rate(struct xilinx_xcvr *xcvr, uint32_t drp_port, int32_t rx_rate, int32_t tx_rate)
Definition: xilinx_transceiver.c:1942
adxcvr_drp_read
int adxcvr_drp_read(struct adxcvr *xcvr, unsigned int drp_port, unsigned int reg, unsigned int *val)
AXI ADXCVR DPR Port Read.
Definition: axi_adxcvr.c:164
AXI_FPGA_FAMILY_ZYNQ
@ AXI_FPGA_FAMILY_ZYNQ
Definition: xilinx_transceiver.h:117
xilinx_xcvr_cpll_calc_lane_rate
int xilinx_xcvr_cpll_calc_lane_rate(struct xilinx_xcvr *xcvr, uint32_t refclk_hz, const struct xilinx_xcvr_cpll_config *conf, uint32_t out_div)
Definition: xilinx_transceiver.c:1096
xilinx_xcvr_prbsel_enc_get
int xilinx_xcvr_prbsel_enc_get(struct xilinx_xcvr *xcvr, uint32_t prbs, bool reverse_lu)
Definition: xilinx_transceiver.c:2094
xilinx_xcvr
xilinx_xcvr parameters structure.
Definition: xilinx_transceiver.h:166
clk_ops::disable
int(* disable)(struct adxcvr *xcvr)
Definition: xilinx_transceiver.h:234
QPLL_REFCLK_DIV_M_MASK
#define QPLL_REFCLK_DIV_M_MASK
Definition: xilinx_transceiver.c:76
xilinx_xcvr_configure_lpm_dfe_mode
int xilinx_xcvr_configure_lpm_dfe_mode(struct xilinx_xcvr *xcvr, uint32_t drp_port, bool lpm)
Definition: xilinx_transceiver.c:384
xilinx_xcvr::vco0_min
uint32_t vco0_min
Definition: xilinx_transceiver.h:179
QPLL_FBDIV_N_ADDR
#define QPLL_FBDIV_N_ADDR
Definition: xilinx_transceiver.c:80
CPLL_FB_DIV_45_N1_MASK
#define CPLL_FB_DIV_45_N1_MASK
Definition: xilinx_transceiver.c:94
xilinx_xcvr_qpll_config
Structure holding QPLL configuration.
Definition: xilinx_transceiver.h:259
axi_fpga_speed_grade
axi_fpga_speed_grade
Enum for FPGA's speed-grade.
Definition: clk_axi_clkgen.c:140
xilinx_xcvr_qpll_config::fb_div
uint32_t fb_div
Definition: xilinx_transceiver.h:261
clk_ops::recalc_rate
unsigned long(* recalc_rate)(struct adxcvr *xcvr, unsigned long parent_rate)
Definition: xilinx_transceiver.h:235
AXI_FPGA_DEV_RS
@ AXI_FPGA_DEV_RS
Definition: xilinx_transceiver.h:155
clk_ops
Definition: xilinx_transceiver.h:232
xilinx_xcvr_qpll_config::refclk_div
uint32_t refclk_div
Definition: xilinx_transceiver.h:260
RX_CLK25_DIV
#define RX_CLK25_DIV
Definition: xilinx_transceiver.c:97
QPLL_FBDIV_N_MASK
#define QPLL_FBDIV_N_MASK
Definition: xilinx_transceiver.c:81
AXI_FPGA_SPEED_1HV
@ AXI_FPGA_SPEED_1HV
Definition: xilinx_transceiver.h:129
no_os_util.h
Header file of utility functions.
XILINX_XCVR_LEGACY_TYPE_US_GTY4
@ XILINX_XCVR_LEGACY_TYPE_US_GTY4
Definition: xilinx_transceiver.h:84
clk_ops::set_rate
int(* set_rate)(struct adxcvr *xcvr, unsigned long rate, unsigned long parent_rate)
Definition: xilinx_transceiver.h:240
RXCDR_CFG2_ADDR
#define RXCDR_CFG2_ADDR
Definition: xilinx_transceiver.c:60
XILINX_XCVR_TYPE_US_GTH4
@ XILINX_XCVR_TYPE_US_GTH4
Definition: xilinx_transceiver.h:72
XILINX_XCVR_LEGACY_TYPE_US_GTH4
@ XILINX_XCVR_LEGACY_TYPE_US_GTH4
Definition: xilinx_transceiver.h:83
AXI_FPGA_TECH_ULTRASCALE
@ AXI_FPGA_TECH_ULTRASCALE
Definition: xilinx_transceiver.h:104
xilinx_xcvr_write_tx_clk25_div
int xilinx_xcvr_write_tx_clk25_div(struct xilinx_xcvr *xcvr, uint32_t drp_port, uint32_t div)
Definition: xilinx_transceiver.c:2055
axi_fpga_family
axi_fpga_family
Enum for family variant of the FPGA device.
Definition: clk_axi_clkgen.c:132
adxcvr_drp_write
int adxcvr_drp_write(struct adxcvr *xcvr, unsigned int drp_port, unsigned int reg, unsigned int val)
AXI ADXCVR DPR Port Write.
Definition: axi_adxcvr.c:199
ENC_8B10B
#define ENC_8B10B
Definition: xilinx_transceiver.h:267
xilinx_xcvr_cpll_read_config
int xilinx_xcvr_cpll_read_config(struct xilinx_xcvr *xcvr, uint32_t drp_port, struct xilinx_xcvr_cpll_config *conf)
Definition: xilinx_transceiver.c:915
xilinx_xcvr_configure_lpm_dfe_mode
int xilinx_xcvr_configure_lpm_dfe_mode(struct xilinx_xcvr *xcvr, uint32_t drp_port, bool lpm)
Definition: xilinx_transceiver.c:384
AXI_FPGA_SPEED_UNKNOWN
@ AXI_FPGA_SPEED_UNKNOWN
Definition: xilinx_transceiver.h:125
AXI_FPGA_SPEED_1L
@ AXI_FPGA_SPEED_1L
Definition: xilinx_transceiver.h:127
xilinx_xcvr_cpll_write_config
int xilinx_xcvr_cpll_write_config(struct xilinx_xcvr *xcvr, uint32_t drp_port, const struct xilinx_xcvr_cpll_config *conf)
Definition: xilinx_transceiver.c:1070
xilinx_xcvr_write_async_gearbox_en
int xilinx_xcvr_write_async_gearbox_en(struct xilinx_xcvr *xcvr, uint32_t drp_port, bool en)
Definition: xilinx_transceiver.c:1985
GTH34_QPLL_FBDIV
#define GTH34_QPLL_FBDIV(xcvr, x)
Definition: xilinx_transceiver.c:110
xilinx_xcvr_qpll_config::band
uint32_t band
Definition: xilinx_transceiver.h:262
OUT_DIV_ADDR
#define OUT_DIV_ADDR
Definition: xilinx_transceiver.c:50
xilinx_xcvr_cpll_read_config
int xilinx_xcvr_cpll_read_config(struct xilinx_xcvr *xcvr, uint32_t drp_port, struct xilinx_xcvr_cpll_config *conf)
Definition: xilinx_transceiver.c:915
AXI_FPGA_FAMILY_UNKNOWN
@ AXI_FPGA_FAMILY_UNKNOWN
Definition: xilinx_transceiver.h:113
AXI_FPGA_TECH_UNKNOWN
@ AXI_FPGA_TECH_UNKNOWN
Definition: xilinx_transceiver.h:102
AXI_FPGA_DEV_FA
@ AXI_FPGA_DEV_FA
Definition: xilinx_transceiver.h:159
AXI_FPGA_FAMILY_VIRTEX
@ AXI_FPGA_FAMILY_VIRTEX
Definition: xilinx_transceiver.h:116
XILINX_XCVR_TYPE_S7_GTX2
@ XILINX_XCVR_TYPE_S7_GTX2
Definition: xilinx_transceiver.h:70