Go to the documentation of this file.
48 #define ADXCVR_SYS_CLK_CPLL 0x00
49 #define ADXCVR_SYS_CLK_QPLL1 0x02
50 #define ADXCVR_SYS_CLK_QPLL0 0x03
53 #define ADXCVR_OUTCLK_PCS 1
54 #define ADXCVR_OUTCLK_PMA 2
55 #define ADXCVR_REFCLK 3
56 #define ADXCVR_REFCLK_DIV2 4
57 #define ADXCVR_PROGDIV_CLK 5
134 unsigned int drp_port,
139 unsigned int drp_port,
156 unsigned long parent_rate);
int adxcvr_clk_enable(struct adxcvr *xcvr)
AXI ADXCVR Clock Enable.
Definition: axi_adxcvr.c:479
enum axi_fpga_speed_grade speed_grade
Definition: xilinx_transceiver.h:174
#define AXI_INFO_FPGA_DEV_PACKAGE(info)
Definition: clk_axi_clkgen.c:68
uint32_t timeout
Definition: ad413x.c:49
uint32_t lane_rate_khz
Definition: altera_adxcvr.h:97
bool export_no_os_clk
Definition: axi_adxcvr.h:121
#define AXI_PCORE_VER_MAJOR(version)
Definition: axi_sysid.h:59
Driver for the Xilinx High-speed transceiver dynamic reconfiguration.
int32_t adxcvr_remove(struct adxcvr *xcvr)
adxcvr_remove
Definition: altera_adxcvr.c:489
const char * name
Definition: altera_adxcvr.h:90
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
bool qpll_enable
Definition: axi_adxcvr.h:71
const struct no_os_clk_platform_ops adxcvr_clk_ops
adxcvr clock ops
Definition: axi_adxcvr.c:755
const struct no_os_clk_platform_ops * platform_ops
Definition: no_os_clk.h:50
int adxcvr_clk_set_rate(struct adxcvr *xcvr, unsigned long rate, unsigned long parent_rate)
AXI ADXCVR Clock Set Rate.
Definition: axi_adxcvr.c:309
int32_t adxcvr_status_error(struct adxcvr *xcvr)
AXI ADXCVR Status Read.
Definition: axi_adxcvr.c:433
enum axi_fpga_family family
Definition: xilinx_transceiver.h:173
#define ADXCVR_DRP_PORT_ADDR_COMMON
Definition: axi_adxcvr.c:84
ADI JESD204B/C AXI_ADXCVR Highspeed Transceiver Device structure.
Definition: altera_adxcvr.h:89
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
uint32_t ref_rate_khz
Definition: axi_adxcvr.h:81
#define ADXCVR_PROGDIV_CLK
Definition: axi_adxcvr.h:57
#define pr_err(fmt, args...)
Definition: no_os_print_log.h:88
Header file of Delay functions.
#define ADXCVR_REG_DRP_SEL(x)
Definition: axi_adxcvr.c:73
#define ADXCVR_BUFSTATUS_RST
Definition: axi_adxcvr.c:55
int32_t adxcvr_no_os_clk_set_rate(struct no_os_clk_desc *desc, uint64_t rate)
Definition: axi_adxcvr.c:742
@ XILINX_XCVR_LEGACY_TYPE_S7_GTX2
Definition: xilinx_transceiver.h:81
const char * name
Definition: no_os_clk.h:46
#define pr_info(fmt, args...)
Definition: no_os_print_log.h:115
uint32_t base
Definition: altera_adxcvr.h:91
int32_t no_os_clk_init(struct no_os_clk_desc **desc, const struct no_os_clk_init_param *param)
enum xilinx_xcvr_type type
Definition: xilinx_transceiver.h:167
int adxcvr_clk_disable(struct adxcvr *xcvr)
AXI ADXCVR Clock Disable.
Definition: axi_adxcvr.c:529
struct adxcvr * ad_xcvr
Definition: xilinx_transceiver.h:170
#define ADXCVR_BUFSTATUS_UNDERFLOW
Definition: axi_adxcvr.c:59
@ XILINX_XCVR_TYPE_US_GTY4
Definition: xilinx_transceiver.h:73
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
@ PM_200
Definition: xilinx_transceiver.h:92
uint32_t version
Definition: xilinx_transceiver.h:171
#define ADXCVR_204C
Definition: axi_adxcvr.c:71
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
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
bool lpm_enable
Definition: axi_adxcvr.h:115
#define ADXCVR_OUTCLK_SEL(x)
Definition: axi_adxcvr.c:66
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
Definition: xilinx_transceiver.h:185
int32_t adxcvr_init(struct adxcvr **ad_xcvr, const struct adxcvr_init *init)
AXI ADXCVR Device Initialization.
Definition: axi_adxcvr.c:562
Header file of Clock Driver.
int32_t adxcvr_status_error(struct adxcvr *xcvr)
AXI ADXCVR Status Read.
Definition: axi_adxcvr.c:433
void no_os_mdelay(uint32_t msecs)
Wait until msecs milliseconds passed.
Definition: aducm3029_delay.c:126
enum xilinx_xcvr_refclk_ppm refclk_ppm
Definition: xilinx_transceiver.h:168
enum axi_fgpa_technology tech
Definition: xilinx_transceiver.h:172
#define AXI_REG_FPGA_INFO
Definition: clk_axi_clkgen.c:62
Driver for the ADI AXI-ADXCVR Module.
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
#define ADXCVR_DRP_CTRL_ADDR(x)
Definition: axi_adxcvr.c:77
#define pr_debug(fmt, args...)
Definition: no_os_print_log.h:129
uint32_t sys_clk_sel
Definition: axi_adxcvr.h:85
uint32_t num_lanes
Definition: axi_adxcvr.h:77
#define ADXCVR_DRP_STATUS_BUSY
Definition: axi_adxcvr.c:81
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
Definition: xilinx_transceiver.h:82
int32_t adxcvr_write(struct adxcvr *xcvr, uint32_t reg_addr, uint32_t reg_val)
adxcvr_write
Definition: altera_adxcvr.c:82
int32_t adxcvr_no_os_clk_disable(struct no_os_clk_desc *desc)
Definition: axi_adxcvr.c:705
int32_t adxcvr_remove(struct adxcvr *xcvr)
Free resoulces allocated for AXI_ADXCVR.
Definition: axi_adxcvr.c:687
#define ADXCVR_REG_DRP_CTRL(x)
Definition: axi_adxcvr.c:75
Structure holding CLK descriptor.
Definition: no_os_clk.h:75
#define AXI_REG_VERSION
Definition: clk_axi_clkgen.c:57
enum axi_fpga_dev_pack dev_package
Definition: xilinx_transceiver.h:175
Definition: altera_adxcvr.h:102
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
#define ADXCVR_DRP_CTRL_WDATA(x)
Definition: axi_adxcvr.c:78
const char * name
Definition: altera_adxcvr.h:103
int32_t adxcvr_read(struct adxcvr *xcvr, uint32_t reg_addr, uint32_t *reg_val)
adxcvr_read
Definition: altera_adxcvr.c:94
int32_t no_os_axi_io_read(uint32_t base, uint32_t offset, uint32_t *data)
AXI IO Altera specific read function.
Definition: altera_axi_io.c:53
void * dev_desc
Definition: no_os_clk.h:52
uint32_t out_clk_sel
Definition: axi_adxcvr.h:113
#define ADXCVR_SYSCLK_SEL(x)
Definition: axi_adxcvr.c:65
int32_t adxcvr_init(struct adxcvr **ad_xcvr, const struct adxcvr_init *init)
adxcvr_init
Definition: altera_adxcvr.c:438
uint32_t base
Definition: altera_adxcvr.h:104
int adxcvr_clk_enable(struct adxcvr *xcvr)
AXI ADXCVR Clock Enable.
Definition: axi_adxcvr.c:479
Definition: no_os_clk.h:44
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
#define ADXCVR_DRP_PORT_ADDR_CHANNEL
Definition: axi_adxcvr.c:85
int32_t adxcvr_no_os_clk_enable(struct no_os_clk_desc *desc)
Definition: axi_adxcvr.c:695
uint32_t encoding
Definition: xilinx_transceiver.h:169
#define AXI_REG_FPGA_VOLTAGE
Definition: clk_axi_clkgen.c:63
#define ADXCVR_REG_CONTROL
Definition: axi_adxcvr.c:62
struct xilinx_xcvr xlx_xcvr
Definition: axi_adxcvr.h:91
#define ADXCVR_REG_SYNTH
Definition: axi_adxcvr.c:68
int(* read)(struct adxcvr *xcvr, unsigned int drp_port, unsigned int reg, unsigned int *val)
Definition: xilinx_transceiver.h:188
int adxcvr_clk_disable(struct adxcvr *xcvr)
AXI ADXCVR Clock Disable.
Definition: axi_adxcvr.c:529
#define ADXCVR_REG_RESETN
Definition: axi_adxcvr.c:53
#define ENC_66B64B
Definition: xilinx_transceiver.h:268
@ XILINX_XCVR_TYPE_US_GTH3
Definition: xilinx_transceiver.h:71
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
uint32_t ref_rate_khz
Definition: axi_adxcvr.h:119
Structure holding CPLL configuration.
Definition: xilinx_transceiver.h:249
int xilinx_xcvr_write_rx_clk25_div(struct xilinx_xcvr *xcvr, uint32_t drp_port, uint32_t div)
Definition: xilinx_transceiver.c:2013
uint32_t lane_rate_khz
Definition: altera_adxcvr.h:107
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
int32_t adxcvr_read(struct adxcvr *xcvr, uint32_t reg_addr, uint32_t *reg_val)
AXI ADXCVR Read.
Definition: axi_adxcvr.c:122
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 ADXCVR_SYS_CLK_CPLL
Definition: axi_adxcvr.h:48
int adxcvr_clk_set_rate(struct adxcvr *xcvr, unsigned long rate, unsigned long parent_rate)
AXI ADXCVR Clock Set Rate.
Definition: axi_adxcvr.c:309
uint32_t voltage
Definition: xilinx_transceiver.h:176
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
#define ADXCVR_STATUS
Definition: axi_adxcvr.c:58
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
void no_os_udelay(uint32_t usecs)
Wait until usecs microseconds passed.
Definition: aducm3029_delay.c:114
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
#define NULL
Definition: wrapper.h:64
#define ADXCVR_LINK_MODE(x)
Definition: axi_adxcvr.c:69
uint32_t out_clk_sel
Definition: axi_adxcvr.h:89
xilinx_xcvr parameters structure.
Definition: xilinx_transceiver.h:166
#define ADXCVR_REG_STATUS
Definition: axi_adxcvr.c:57
void * dev_desc
Definition: no_os_clk.h:83
int32_t adxcvr_no_os_clk_recalc_rate(struct no_os_clk_desc *desc, uint64_t *rate)
Definition: axi_adxcvr.c:715
#define ADXCVR_BUFSTATUS_OVERFLOW
Definition: axi_adxcvr.c:60
int xilinx_xcvr_configure_lpm_dfe_mode(struct xilinx_xcvr *xcvr, uint32_t drp_port, bool lpm)
Definition: xilinx_transceiver.c:384
#define ADXCVR_DRP_PORT_COMMON(x)
Definition: axi_adxcvr.c:87
int32_t no_os_axi_io_write(uint32_t base, uint32_t offset, uint32_t data)
AXI IO Altera specific write function.
Definition: altera_axi_io.c:67
Structure holding QPLL configuration.
Definition: xilinx_transceiver.h:259
#define ADXCVR_REG_DRP_STATUS(x)
Definition: axi_adxcvr.c:80
#define AXI_INFO_FPGA_TECH(info)
Definition: clk_axi_clkgen.c:65
uint32_t sys_clk_sel
Definition: axi_adxcvr.h:109
int32_t adxcvr_no_os_clk_round_rate(struct no_os_clk_desc *desc, uint64_t rate, uint64_t *rounded_rate)
Definition: axi_adxcvr.c:728
unsigned long(* recalc_rate)(struct adxcvr *xcvr, unsigned long parent_rate)
Definition: xilinx_transceiver.h:235
bool tx_enable
Definition: axi_adxcvr.h:73
struct no_os_clk_desc * clk_out
Definition: axi_adxcvr.h:93
Definition: xilinx_transceiver.h:232
int32_t adxcvr_write(struct adxcvr *xcvr, uint32_t reg_addr, uint32_t reg_val)
AXI ADXCVR Write.
Definition: axi_adxcvr.c:106
#define ADXCVR_DRP_STATUS_RDATA(x)
Definition: axi_adxcvr.c:82
Header file of utility functions.
@ XILINX_XCVR_LEGACY_TYPE_US_GTY4
Definition: xilinx_transceiver.h:84
int32_t adxcvr_drp_wait_idle(struct adxcvr *xcvr, uint32_t drp_addr)
Read AXI ADXCVR DRP status.
Definition: axi_adxcvr.c:137
#define ADI_AXI_PCORE_VER(major, minor, patch)
Definition: axi_adxcvr.c:92
#define ADXCVR_DRP_PORT_CHANNEL(x)
Definition: axi_adxcvr.c:88
@ XILINX_XCVR_TYPE_US_GTH4
Definition: xilinx_transceiver.h:72
bool cpll_enable
Definition: axi_adxcvr.h:69
@ XILINX_XCVR_LEGACY_TYPE_US_GTH4
Definition: xilinx_transceiver.h:83
int xilinx_xcvr_write_tx_clk25_div(struct xilinx_xcvr *xcvr, uint32_t drp_port, uint32_t div)
Definition: xilinx_transceiver.c:2055
#define ADXCVR_LPM_DFE_N
Definition: axi_adxcvr.c:63
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
#define ENC_8B10B
Definition: xilinx_transceiver.h:267
const struct no_os_clk_platform_ops adxcvr_clk_ops
adxcvr clock ops
Definition: axi_adxcvr.c:755
#define AXI_INFO_FPGA_FAMILY(info)
Definition: clk_axi_clkgen.c:66
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
#define NO_OS_DIV_ROUND_CLOSEST(x, y)
Definition: no_os_util.h:54
#define AXI_INFO_FPGA_VOLTAGE(val)
Definition: clk_axi_clkgen.c:69
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
#define AXI_INFO_FPGA_SPEED_GRADE(info)
Definition: clk_axi_clkgen.c:67
bool lpm_enable
Definition: axi_adxcvr.h:75
#define ADXCVR_RESETN
Definition: axi_adxcvr.c:54
@ XILINX_XCVR_TYPE_S7_GTX2
Definition: xilinx_transceiver.h:70
#define ADXCVR_DRP_CTRL_WR
Definition: axi_adxcvr.c:76