dppsu
Vitis Drivers API Documentation
|
Contains a minimal set of functions for the XDpPsu driver that allow access to all of the DisplayPort TX core's functionality.
See xdppsu.h for a detailed description of the driver.
MODIFICATION HISTORY:
Ver Who Date Changes
1.0 aad 01/27/17 Initial release.
Enumerations | |
enum | XDpPsu_TrainingState |
This typedef enumerates the list of training states used in the state machine during the link training process. More... | |
Functions | |
u32 | XDpPsu_InitializeTx (XDpPsu *InstancePtr) |
This function prepares the DisplayPort TX core for use. More... | |
void | XDpPsu_CfgInitialize (XDpPsu *InstancePtr, XDpPsu_Config *ConfigPtr, u32 EffectiveAddr) |
This function retrieves the configuration for this DisplayPort TX instance and fills in the InstancePtr->Config structure. More... | |
u32 | XDpPsu_GetRxCapabilities (XDpPsu *InstancePtr) |
This function retrieves the RX device's capabilities from the RX device's DisplayPort Configuration Data (DPCD). More... | |
u32 | XDpPsu_CfgMainLinkMax (XDpPsu *InstancePtr) |
This function determines the common capabilities between the DisplayPort TX core and the RX device. More... | |
u32 | XDpPsu_EstablishLink (XDpPsu *InstancePtr) |
This function checks if the link needs training and runs the training sequence if training is required. More... | |
u32 | XDpPsu_CheckLinkStatus (XDpPsu *InstancePtr, u8 LaneCount) |
This function checks if the reciever's DisplayPort Configuration Data (DPCD) indicates the reciever has achieved and maintained clock recovery, channel equalization, symbol lock, and interlane alignment for all lanes currently in use. More... | |
u32 | XDpPsu_IsConnected (XDpPsu *InstancePtr) |
This function checks if there is a connected RX device. More... | |
u32 | XDpPsu_AuxRead (XDpPsu *InstancePtr, u32 DpcdAddress, u32 BytesToRead, void *ReadData) |
This function issues a read request over the AUX channel that will read from the RX device's DisplayPort Configuration Data (DPCD) address space. More... | |
u32 | XDpPsu_AuxWrite (XDpPsu *InstancePtr, u32 DpcdAddress, u32 BytesToWrite, void *WriteData) |
This function issues a write request over the AUX channel that will write to the RX device's DisplayPort Configuration Data (DPCD) address space. More... | |
u32 | XDpPsu_IicRead (XDpPsu *InstancePtr, u8 IicAddress, u16 Offset, u16 BytesToRead, void *ReadData) |
This function performs an I2C read over the AUX channel. More... | |
u32 | XDpPsu_IicWrite (XDpPsu *InstancePtr, u8 IicAddress, u8 BytesToWrite, void *WriteData) |
This function performs an I2C write over the AUX channel. More... | |
u32 | XDpPsu_SetDownspread (XDpPsu *InstancePtr, u8 Enable) |
This function enables or disables 0.5% spreading of the clock for both the DisplayPort and the RX device. More... | |
u32 | XDpPsu_SetEnhancedFrameMode (XDpPsu *InstancePtr, u8 Enable) |
This function enables or disables the enhanced framing symbol sequence for both the DisplayPort TX core and the RX device. More... | |
u32 | XDpPsu_SetLaneCount (XDpPsu *InstancePtr, u8 LaneCount) |
This function sets the number of lanes to be used by the main link for both the DisplayPort TX core and the RX device. More... | |
u32 | XDpPsu_SetLinkRate (XDpPsu *InstancePtr, u8 LinkRate) |
This function sets the data rate to be used by the main link for both the DisplayPort TX core and the RX device. More... | |
u32 | XDpPsu_SetScrambler (XDpPsu *InstancePtr, u8 Enable) |
This function enables or disables scrambling of symbols for both the DisplayPort and the RX device. More... | |
void | XDpPsu_EnableMainLink (XDpPsu *InstancePtr, u8 Enable) |
This function enables the main link. More... | |
void | XDpPsu_ResetPhy (XDpPsu *InstancePtr, u32 Reset) |
This function does a PHY reset. More... | |
enum XDpPsu_TrainingState |
This typedef enumerates the list of training states used in the state machine during the link training process.
u32 XDpPsu_AuxRead | ( | XDpPsu * | InstancePtr, |
u32 | DpcdAddress, | ||
u32 | BytesToRead, | ||
void * | ReadData | ||
) |
This function issues a read request over the AUX channel that will read from the RX device's DisplayPort Configuration Data (DPCD) address space.
The read message will be divided into multiple transactions which read a maximum of 16 bytes each.
InstancePtr | is a pointer to the XDpPsu instance. |
DpcdAddress | is the starting address to read from the RX device. |
BytesToRead | is the number of bytes to read from the RX device. |
ReadData | is a pointer to the data buffer that will be filled with read data. |
References XDpPsu::IsReady, and XDPPSU_AUX_CMD_READ.
Referenced by XDpPsu_GetRxCapabilities(), XDpPsu_SetDownspread(), XDpPsu_SetEnhancedFrameMode(), XDpPsu_SetLaneCount(), and XDpPsu_SetScrambler().
u32 XDpPsu_AuxWrite | ( | XDpPsu * | InstancePtr, |
u32 | DpcdAddress, | ||
u32 | BytesToWrite, | ||
void * | WriteData | ||
) |
This function issues a write request over the AUX channel that will write to the RX device's DisplayPort Configuration Data (DPCD) address space.
The write message will be divided into multiple transactions which write a maximum of 16 bytes each.
InstancePtr | is a pointer to the XDpPsu instance. |
DpcdAddress | is the starting address to write to the RX device. |
BytesToWrite | is the number of bytes to write to the RX device. |
WriteData | is a pointer to the data buffer that contains the data to be written to the RX device. |
References XDpPsu::IsReady, and XDPPSU_AUX_CMD_WRITE.
Referenced by XDpPsu_SetDownspread(), XDpPsu_SetEnhancedFrameMode(), XDpPsu_SetLaneCount(), XDpPsu_SetLinkRate(), and XDpPsu_SetScrambler().
void XDpPsu_CfgInitialize | ( | XDpPsu * | InstancePtr, |
XDpPsu_Config * | ConfigPtr, | ||
u32 | EffectiveAddr | ||
) |
This function retrieves the configuration for this DisplayPort TX instance and fills in the InstancePtr->Config structure.
InstancePtr | is a pointer to the XDpPsu instance. |
ConfigPtr | is a pointer to the configuration structure that will be used to copy the settings from. |
EffectiveAddr | is the device base address in the virtual memory space. If the address translation is not used, then the physical address is passed. |
References XDpPsu_Config::BaseAddr, XDpPsu::Config, XDpPsu_Config::DeviceId, XDpPsu::IsReady, and XDpPsu::SAxiClkHz.
Referenced by DpPsu_SelfTestExample(), and DpPsu_SetupExample().
u32 XDpPsu_CfgMainLinkMax | ( | XDpPsu * | InstancePtr | ) |
This function determines the common capabilities between the DisplayPort TX core and the RX device.
InstancePtr | is a pointer to the XDpPsu instance. |
References XDpPsu::IsReady, XDpPsu::LinkConfig, XDpPsu_LinkConfig::MaxLaneCount, XDpPsu_LinkConfig::MaxLinkRate, XDpPsu_SetLaneCount(), and XDpPsu_SetLinkRate().
Referenced by DpPsu_StartLink().
u32 XDpPsu_CheckLinkStatus | ( | XDpPsu * | InstancePtr, |
u8 | LaneCount | ||
) |
This function checks if the reciever's DisplayPort Configuration Data (DPCD) indicates the reciever has achieved and maintained clock recovery, channel equalization, symbol lock, and interlane alignment for all lanes currently in use.
InstancePtr | is a pointer to the XDpPsu instance. |
LaneCount | is the number of lanes to check. |
References XDpPsu::IsReady, XDPPSU_LANE_COUNT_SET_1, and XDPPSU_LANE_COUNT_SET_2.
Referenced by DpPsu_StartLink(), and XDpPsu_EstablishLink().
void XDpPsu_EnableMainLink | ( | XDpPsu * | InstancePtr, |
u8 | Enable | ||
) |
This function enables the main link.
InstancePtr | is a pointer to the XDpPsu instance. |
Enable | is a control flag to enable or disable main link |
References XDpPsu_Config::BaseAddr, XDpPsu::Config, XDpPsu::IsReady, XDPPSU_ENABLE_MAIN_STREAM, XDPPSU_FORCE_SCRAMBLER_RESET, and XDpPsu_WriteReg.
Referenced by XDpPsu_EstablishLink().
u32 XDpPsu_EstablishLink | ( | XDpPsu * | InstancePtr | ) |
This function checks if the link needs training and runs the training sequence if training is required.
InstancePtr | is a pointer to the XDpPsu instance. |
References XDpPsu_Config::BaseAddr, XDpPsu::Config, XDpPsu::IsReady, XDpPsu_LinkConfig::LaneCount, XDpPsu::LinkConfig, XDpPsu_LinkConfig::LinkRate, XDpPsu_CheckLinkStatus(), XDPPSU_ENABLE_MAIN_STREAM, XDpPsu_EnableMainLink(), XDPPSU_LANE_COUNT_SET_1, XDPPSU_LANE_COUNT_SET_2, XDPPSU_LINK_BW_SET_162GBPS, XDPPSU_LINK_BW_SET_270GBPS, XDPPSU_LINK_BW_SET_540GBPS, XDPPSU_PHY_CONFIG_PHY_RESET_MASK, XDPPSU_PHY_CONFIG_TX_PHY_8B10BEN_MASK, XDpPsu_ReadReg, XDpPsu_ResetPhy(), and XDPPSU_TRAINING_PATTERN_SET_OFF.
Referenced by DpPsu_StartLink().
u32 XDpPsu_GetRxCapabilities | ( | XDpPsu * | InstancePtr | ) |
This function retrieves the RX device's capabilities from the RX device's DisplayPort Configuration Data (DPCD).
InstancePtr | is a pointer to the XDpPsu instance. |
References XDpPsu::Config, XDpPsu_SinkConfig::DpcdRxCapsField, XDpPsu::IsReady, XDpPsu::LinkConfig, XDpPsu_LinkConfig::MaxLaneCount, XDpPsu_LinkConfig::MaxLinkRate, XDpPsu::RxConfig, XDpPsu_LinkConfig::SupportDownspreadControl, XDpPsu_LinkConfig::SupportEnhancedFramingMode, and XDpPsu_AuxRead().
Referenced by DpPsu_StartLink().
u32 XDpPsu_IicRead | ( | XDpPsu * | InstancePtr, |
u8 | IicAddress, | ||
u16 | Offset, | ||
u16 | BytesToRead, | ||
void * | ReadData | ||
) |
This function performs an I2C read over the AUX channel.
The read message will be divided into multiple transactions if the requested data spans multiple segments. The segment pointer is automatically incremented and the offset is calibrated as needed. E.g. For an overall offset of:
InstancePtr | is a pointer to the XDpPsu instance. |
IicAddress | is the address on the I2C bus of the target device. |
Offset | is the offset at the specified address of the targeted I2C device that the read will start from. |
BytesToRead | is the number of bytes to read. |
ReadData | is a pointer to a buffer that will be filled with the I2C read data. |
References XDpPsu_Config::BaseAddr, XDpPsu::Config, XDpPsu::IsReady, XDPPSU_AUX_CMD_I2C_READ, XDPPSU_AUX_CMD_I2C_WRITE_MOT, XDpPsu_IicWrite(), XDPPSU_INTR_HPD_EVENT_MASK, XDPPSU_INTR_STATUS, and XDpPsu_ReadReg.
Referenced by XDpPsu_GetEdidBlock().
u32 XDpPsu_IicWrite | ( | XDpPsu * | InstancePtr, |
u8 | IicAddress, | ||
u8 | BytesToWrite, | ||
void * | WriteData | ||
) |
This function performs an I2C write over the AUX channel.
InstancePtr | is a pointer to the XDpPsu instance. |
IicAddress | is the address on the I2C bus of the target device. |
BytesToWrite | is the number of bytes to write. |
WriteData | is a pointer to a buffer which will be used as the data source for the write. |
References XDpPsu::IsReady, and XDPPSU_AUX_CMD_I2C_WRITE.
Referenced by XDpPsu_IicRead().
u32 XDpPsu_InitializeTx | ( | XDpPsu * | InstancePtr | ) |
This function prepares the DisplayPort TX core for use.
InstancePtr | is a pointer to the XDpPsu instance. |
References XDpPsu_Config::BaseAddr, XDpPsu::Config, XDpPsu::IsReady, XDpPsu::SAxiClkHz, XDPPSU_AUX_CLK_DIVIDER, XDPPSU_AUX_CLK_DIVIDER_VAL_MASK, XDPPSU_DP_DISABLE, XDPPSU_DP_ENABLE, XDPPSU_ENABLE, XDPPSU_INTR_HPD_EVENT_MASK, XDPPSU_INTR_HPD_IRQ_MASK, XDPPSU_INTR_HPD_PULSE_DETECTED_MASK, XDPPSU_INTR_MASK, XDPPSU_PHY_CLOCK_SELECT, XDPPSU_PHY_CLOCK_SELECT_540GBPS, XDPPSU_PHY_CONFIG, XDPPSU_PHY_CONFIG_GT_ALL_RESET_MASK, XDpPsu_ReadReg, XDPPSU_SOFT_RESET, XDPPSU_SOFT_RESET_EN, and XDpPsu_WriteReg.
Referenced by DpPsu_SetupExample().
u32 XDpPsu_IsConnected | ( | XDpPsu * | InstancePtr | ) |
This function checks if there is a connected RX device.
InstancePtr | is a pointer to the XDpPsu instance. |
References XDpPsu_Config::BaseAddr, XDpPsu::Config, XDPPSU_INTERRUPT_SIG_STATE, XDPPSU_INTERRUPT_SIG_STATE_HPD_STATE_MASK, and XDpPsu_ReadReg.
Referenced by XDpPsu_HpdInterruptHandler().
void XDpPsu_ResetPhy | ( | XDpPsu * | InstancePtr, |
u32 | Reset | ||
) |
This function does a PHY reset.
InstancePtr | is a pointer to the XDpPsu instance. |
Reset | is the type of reset to assert. |
References XDpPsu_Config::BaseAddr, XDpPsu::Config, XDpPsu::IsReady, XDPPSU_ENABLE, XDPPSU_PHY_CONFIG, XDpPsu_ReadReg, and XDpPsu_WriteReg.
Referenced by XDpPsu_EstablishLink().
u32 XDpPsu_SetDownspread | ( | XDpPsu * | InstancePtr, |
u8 | Enable | ||
) |
This function enables or disables 0.5% spreading of the clock for both the DisplayPort and the RX device.
InstancePtr | is a pointer to the XDpPsu instance. |
Enable | will downspread the main link signal if set to 1 and disable downspreading if set to 0. |
References XDpPsu_Config::BaseAddr, XDpPsu::Config, XDpPsu_LinkConfig::DownspreadControl, XDpPsu::IsReady, XDpPsu::LinkConfig, XDpPsu_AuxRead(), XDpPsu_AuxWrite(), XDPPSU_DOWNSPREAD_CTRL, and XDpPsu_WriteReg.
Referenced by DpPsu_StartLink().
u32 XDpPsu_SetEnhancedFrameMode | ( | XDpPsu * | InstancePtr, |
u8 | Enable | ||
) |
This function enables or disables the enhanced framing symbol sequence for both the DisplayPort TX core and the RX device.
InstancePtr | is a pointer to the XDpPsu instance. |
Enable | will enable enhanced frame mode if set to 1 and disable it if set to 0. |
References XDpPsu_Config::BaseAddr, XDpPsu::Config, XDpPsu_LinkConfig::EnhancedFramingMode, XDpPsu::IsReady, XDpPsu::LinkConfig, XDpPsu_AuxRead(), XDpPsu_AuxWrite(), XDPPSU_ENHANCED_FRAME_EN, and XDpPsu_WriteReg.
Referenced by DpPsu_StartLink().
u32 XDpPsu_SetLaneCount | ( | XDpPsu * | InstancePtr, |
u8 | LaneCount | ||
) |
This function sets the number of lanes to be used by the main link for both the DisplayPort TX core and the RX device.
InstancePtr | is a pointer to the XDpPsu instance. |
LaneCount | is the number of lanes to be used over the main link. |
References XDpPsu_Config::BaseAddr, XDpPsu::Config, XDpPsu::IsReady, XDpPsu_LinkConfig::LaneCount, XDpPsu::LinkConfig, XDpPsu_AuxRead(), XDpPsu_AuxWrite(), XDPPSU_LANE_COUNT_SET, and XDpPsu_WriteReg.
Referenced by DpPsu_StartLink(), and XDpPsu_CfgMainLinkMax().
u32 XDpPsu_SetLinkRate | ( | XDpPsu * | InstancePtr, |
u8 | LinkRate | ||
) |
This function sets the data rate to be used by the main link for both the DisplayPort TX core and the RX device.
InstancePtr | is a pointer to the XDpPsu instance. |
LinkRate | is the link rate to be used over the main link based on one of the following selects:
|
References XDpPsu_Config::BaseAddr, XDpPsu::Config, XDpPsu::IsReady, XDpPsu::LinkConfig, XDpPsu_LinkConfig::LinkRate, XDpPsu_AuxWrite(), XDPPSU_LINK_BW_SET, XDPPSU_LINK_BW_SET_162GBPS, XDPPSU_LINK_BW_SET_270GBPS, XDPPSU_LINK_BW_SET_540GBPS, XDPPSU_PHY_CLOCK_SELECT_162GBPS, XDPPSU_PHY_CLOCK_SELECT_270GBPS, XDPPSU_PHY_CLOCK_SELECT_540GBPS, and XDpPsu_WriteReg.
Referenced by DpPsu_StartLink(), and XDpPsu_CfgMainLinkMax().
u32 XDpPsu_SetScrambler | ( | XDpPsu * | InstancePtr, |
u8 | Enable | ||
) |
This function enables or disables scrambling of symbols for both the DisplayPort and the RX device.
InstancePtr | is a pointer to the XDpPsu instance. |
Enable | will enable or disable scrambling. |
References XDpPsu_Config::BaseAddr, XDpPsu::Config, XDpPsu::IsReady, XDpPsu::LinkConfig, XDpPsu_LinkConfig::ScramblerEn, XDpPsu_AuxRead(), XDpPsu_AuxWrite(), XDPPSU_SCRAMBLING_DISABLE, and XDpPsu_WriteReg.