Go to the documentation of this file.
33 #ifndef AXI_JESD204_TX_H_
34 #define AXI_JESD204_TX_H_
uint8_t subclass_version
Definition: axi_jesd204_tx.h:59
#define JESD204_LINK_STATUS_DATA
Definition: axi_jesd204_tx.c:78
#define JESD204_TX_REG_LINK_CONF4
Definition: axi_jesd204_tx.c:75
JESD204 link configuration settings.
Definition: jesd204.h:105
uint8_t converters_per_device
Definition: axi_jesd204_tx.h:54
#define JESD204_TX_REG_MAGIC
Definition: axi_jesd204_tx.c:53
#define ADI_AXI_PCORE_VER(major, minor, patch)
Definition: axi_jesd204_tx.c:90
uint8_t device_id
Definition: axi_jesd204_tx.h:48
const char * name
Definition: axi_jesd204_tx.h:72
#define JESD204_TX_REG_LINK_STATE
Definition: axi_jesd204_tx.c:63
#define NO_OS_GENMASK(h, l)
Definition: no_os_util.h:82
struct jesd204_state_op state_ops[__JESD204_MAX_OPS]
Definition: jesd204.h:232
@ JESD204_STATE_OP_REASON_INIT
Definition: jesd204.h:148
#define JESD204_TX_REG_LINK_STATUS
Definition: axi_jesd204_tx.c:77
uint8_t bits_per_sample
Definition: axi_jesd204_tx.h:113
#define JESD204_TX_REG_SYSREF_CONF_SYSREF_DISABLE
Definition: axi_jesd204_tx.c:67
uint8_t control_bits_per_sample
Definition: axi_jesd204_tx.h:60
uint8_t bits_per_sample
Definition: axi_jesd204_tx.h:56
#define JESD204_TX_ENCODER_GET(x)
Definition: axi_jesd204_tx.c:60
uint8_t octets_per_frame
Definition: axi_jesd204_tx.h:52
uint32_t device_clk_khz
Definition: axi_jesd204_tx.h:84
#define pr_err(fmt, args...)
Definition: no_os_print_log.h:88
bool high_density
Definition: axi_jesd204_tx.h:63
Header file of Delay functions.
@ JESD204_ENCODER_8B10B
Definition: jesd204.h:30
#define JESD204_TX_REG_VERSION
Definition: axi_jesd204_tx.c:52
jesd204_state_op_reason
Definition: jesd204.h:147
uint8_t subclass
Definition: axi_jesd204_tx.h:119
int32_t no_os_clk_enable(struct no_os_clk_desc *desc)
uint8_t control_bits_per_sample
Definition: axi_jesd204_tx.h:117
#define NO_OS_DIV_ROUND_CLOSEST_ULL(x, y)
Definition: no_os_util.h:56
uint32_t num_lanes
Definition: axi_jesd204_tx.h:76
#define JESD204_TX_REG_SYSREF_CONF
Definition: axi_jesd204_tx.c:66
int32_t axi_jesd204_tx_apply_config_legacy(struct axi_jesd204_tx *jesd, struct jesd204_tx_config *config)
Apply the JESD204 TX configuration.
Definition: axi_jesd204_tx.c:471
#define JESD204_TX_REG_ILAS(x, y)
Definition: axi_jesd204_tx.c:80
#define JESD204_TX_REG_LINK_CLK_RATIO
Definition: axi_jesd204_tx.c:64
#define JESD204_TX_REG_CONF_DATA_PATH_WIDTH
Definition: axi_jesd204_tx.c:56
Definition: axi_jesd204_tx.h:47
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 JESD204_TX_REG_SYNTH_REG_1
Definition: axi_jesd204_tx.c:58
@ JESD204_STATE_OP_REASON_UNINIT
Definition: jesd204.h:149
#define JESD204_TX_REG_SYSREF_LMFC_OFFSET
Definition: axi_jesd204_tx.c:69
int32_t axi_jesd204_tx_apply_config(struct axi_jesd204_tx *jesd, struct jesd204_link *config)
Apply the JESD204 TX configuration.
Definition: axi_jesd204_tx.c:407
#define JESD204_LMFC_OFFSET_UNINITIALIZED
Definition: jesd204.h:51
uint32_t device_clk_khz
Definition: axi_jesd204_tx.h:121
int32_t axi_jesd204_tx_lane_clk_enable(struct axi_jesd204_tx *jesd)
JESD204 TX Lane Clock Enable.
Definition: axi_jesd204_tx.c:147
uint8_t resolution
Definition: axi_jesd204_tx.h:55
void * jesd204_dev_priv(struct jesd204_dev *jdev)
Header file of Clock Driver.
void axi_jesd204_tx_set_lane_ilas_legacy(struct axi_jesd204_tx *jesd, struct jesd204_tx_config *config, uint32_t lane)
Set the JESD204 TX lane ILAS.
Definition: axi_jesd204_tx.c:361
void no_os_mdelay(uint32_t msecs)
Wait until msecs milliseconds passed.
Definition: aducm3029_delay.c:126
int jesd204_link_get_device_clock(struct jesd204_link *lnk, unsigned long *device_clock)
int32_t axi_jesd204_tx_lane_clk_enable(struct axi_jesd204_tx *jesd)
JESD204 TX Lane Clock Enable.
Definition: axi_jesd204_tx.c:147
@ JESD204_OP_CLOCKS_ENABLE
Definition: jesd204.h:210
struct no_os_clk_desc * lane_clk
Definition: axi_jesd204_tx.h:90
int32_t axi_jesd204_tx_remove(struct axi_jesd204_tx *jesd)
Free resoulces allocated for JESD204 TX peripheral.
Definition: axi_jesd204_tx.c:912
#define pr_debug(fmt, args...)
Definition: no_os_print_log.h:129
bool enable_scrambling
Definition: axi_jesd204_tx.h:62
Definition: axi_jesd204_tx.c:104
uint8_t lanes_per_device
Definition: axi_jesd204_tx.h:51
uint32_t base
Definition: axi_jesd204_tx.h:74
@ JESD204_ENCODER_MAX
Definition: jesd204.h:34
int32_t axi_jesd204_tx_init_legacy(struct axi_jesd204_tx **jesd204, const struct jesd204_tx_init *init)
Device initialization.
Definition: axi_jesd204_tx.c:729
int32_t no_os_clk_set_rate(struct no_os_clk_desc *desc, uint64_t rate)
struct axi_jesd204_tx * jesd
Definition: axi_jesd204_tx.c:105
#define JESD204_TX_MAGIC
Definition: axi_jesd204_tx.c:83
bool high_density
Definition: axi_jesd204_tx.h:115
uint8_t octets_per_frame
Definition: axi_jesd204_tx.h:105
uint32_t tpl_data_path_width
Definition: axi_jesd204_tx.h:80
uint32_t base
Definition: axi_jesd204_tx.h:103
Structure holding CLK descriptor.
Definition: no_os_clk.h:75
uint32_t axi_jesd204_tx_status_read(struct axi_jesd204_tx *jesd)
Read status of the JESD204 Transmit Peripherial.
Definition: axi_jesd204_tx.c:170
int32_t axi_jesd204_tx_remove(struct axi_jesd204_tx *jesd)
Free resoulces allocated for JESD204 TX peripheral.
Definition: axi_jesd204_tx.c:912
#define PCORE_VERSION_MAJOR(x)
Definition: axi_jesd204_tx.c:93
@ JESD204_OP_LINK_ENABLE
Definition: jesd204.h:211
int32_t axi_jesd204_tx_write(struct axi_jesd204_tx *jesd, uint32_t reg_addr, uint32_t reg_val)
JESD204 TX AXI Data Write.
Definition: axi_jesd204_tx.c:119
#define JESD204_TX_REG_LINK_DISABLE
Definition: axi_jesd204_tx.c:62
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
#define JESD204_TX_REG_SYSREF_STATUS
Definition: axi_jesd204_tx.c:71
uint8_t lane_id
Definition: axi_jesd204_tx.h:50
int32_t axi_jesd204_tx_lane_clk_disable(struct axi_jesd204_tx *jesd)
JESD204 TX Lane Clock Disable.
Definition: axi_jesd204_tx.c:160
uint32_t version
Definition: axi_jesd204_tx.h:61
@ JESD204_ENCODER_64B66B
Definition: jesd204.h:31
#define JESD204_SYNTH_DATA_PATH_WIDTH_GET(x)
Definition: axi_jesd204_tx.c:87
#define PCORE_VERSION_PATCH(x)
Definition: axi_jesd204_tx.c:95
@ JESD204_STATE_CHANGE_ERROR
Definition: jesd204.h:44
@ JESD204_OP_LINK_PRE_SETUP
Definition: jesd204.h:200
uint32_t link_id
Definition: jesd204.h:106
uint8_t converter_resolution
Definition: axi_jesd204_tx.h:111
@ JESD204_SUBCLASS_0
Definition: jesd204.h:16
uint32_t axi_jesd204_tx_calc_ilas_chksum_legacy(const struct jesd204_tx_config *config)
Compute the JESD204 TX ILAS checksum.
Definition: axi_jesd204_tx.c:286
void * no_os_malloc(size_t size)
Allocate memory and return a pointer to it.
Definition: chibios_alloc.c:43
int32_t axi_jesd204_tx_read(struct axi_jesd204_tx *jesd, uint32_t reg_addr, uint32_t *reg_val)
JESD204 TX AXI Data Read.
Definition: axi_jesd204_tx.c:134
uint8_t num_lanes
Definition: jesd204.h:114
Definition: axi_jesd204_tx.h:70
struct jesd204_dev * jdev
Definition: axi_jesd204_tx.h:92
int32_t axi_jesd204_tx_init(struct axi_jesd204_tx **jesd204, const struct jesd204_tx_init *init)
Device initialization.
Definition: axi_jesd204_tx.c:819
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 JESD204_TX_REG_CONF_NUM_LANES
Definition: axi_jesd204_tx.c:55
int32_t axi_jesd204_tx_init_legacy(struct axi_jesd204_tx **jesd204, const struct jesd204_tx_init *init)
Device initialization.
Definition: axi_jesd204_tx.c:729
int jesd204_dev_register(struct jesd204_dev **jdev, const struct jesd204_dev_data *dev_data)
#define JESD204_TX_REG_CONF0
Definition: axi_jesd204_tx.c:73
#define JESD204_TPL_DATA_PATH_WIDTH_GET(x)
Definition: axi_jesd204_tx.c:89
void no_os_udelay(uint32_t usecs)
Wait until usecs microseconds passed.
Definition: aducm3029_delay.c:114
int32_t axi_jesd204_tx_init(struct axi_jesd204_tx **jesd204, const struct jesd204_tx_init *init)
Device initialization.
Definition: axi_jesd204_tx.c:819
uint32_t data_path_width
Definition: axi_jesd204_tx.h:78
uint32_t axi_jesd204_tx_status_read(struct axi_jesd204_tx *jesd)
Read status of the JESD204 Transmit Peripherial.
Definition: axi_jesd204_tx.c:170
jesd204_encoder
Definition: jesd204.h:28
struct jesd204_tx_config config
Definition: axi_jesd204_tx.h:82
uint8_t converters_per_device
Definition: axi_jesd204_tx.h:109
int jesd204_link_get_rate_khz(struct jesd204_link *lnk, unsigned long *lane_rate_khz)
@ JESD204_STATE_CHANGE_DONE
Definition: jesd204.h:46
int32_t axi_jesd204_tx_lane_clk_disable(struct axi_jesd204_tx *jesd)
JESD204 TX Lane Clock Disable.
Definition: axi_jesd204_tx.c:160
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
uint16_t frames_per_multiframe
Definition: axi_jesd204_tx.h:107
uint8_t bank_id
Definition: axi_jesd204_tx.h:49
const char * name
Definition: axi_jesd204_tx.h:101
@ JESD204_ENCODER_UNKNOWN
Definition: jesd204.h:29
jesd204_link_cb per_link
Definition: jesd204.h:192
Header file of utility functions.
uint32_t lane_clk_khz
Definition: axi_jesd204_tx.h:86
#define PCORE_VERSION_MINOR(x)
Definition: axi_jesd204_tx.c:94
uint8_t samples_per_frame
Definition: axi_jesd204_tx.h:57
@ JESD204_OP_LINK_RUNNING
Definition: jesd204.h:212
uint8_t jesd_version
Definition: axi_jesd204_tx.h:58
JESD204B/C Transmit Peripheral Initialization Structure.
Definition: axi_jesd204_tx.h:99
JESD204 device initialization data.
Definition: jesd204.h:227
const char * axi_jesd204_tx_link_status_label[]
Definition: axi_jesd204_tx.c:97
enum jesd204_encoder encoder
Definition: axi_jesd204_tx.h:88
uint32_t lane_clk_khz
Definition: axi_jesd204_tx.h:123
struct no_os_clk_desc * lane_clk
Definition: axi_jesd204_tx.h:125
#define NO_OS_DIV_ROUND_CLOSEST(x, y)
Definition: no_os_util.h:54
@ JESD204_OP_LINK_SETUP
Definition: jesd204.h:204
Driver for the Analog Devices AXI-JESD204-TX peripheral.
uint16_t frames_per_multiframe
Definition: axi_jesd204_tx.h:53
uint64_t no_os_div_u64(uint64_t dividend, uint32_t divisor)