vphy
Vitis Drivers API Documentation
xvphy.c File Reference

Overview

Contains a minimal set of functions for the XVphy driver that allow access to all of the Video PHY core's functionality.

See xvphy.h for a detailed description of the driver.

Note
None.
MODIFICATION HISTORY:
Ver   Who  Date     Changes


1.0 als, 10/19/15 Initial release. gm 1.1 gm 02/01/16 Added GTPE2 and GTHE4 support Added more events to XVphy_LogEvent definitions. Added TxBufferBypass in XVphy_Config structure. Added XVphy_SetDefaultPpc and XVphy_SetPpc functions. als Added XVphy_GetLineRateHz function. gm 20/04/16 Added XVphy_GetRcfgChId function 1.2 gm Added HdmiFastSwitch in XVphy_Config Fixed bug in XVphy_IsPllLocked function Changed EffectiveAddr datatype in XVphy_CfgInitialize to UINTPTR Used usleep API instead of MB_Sleep API Fixed Null pointer dereference in XVphy_IBufDsEnable Suppressed warning messages due to unused arguments 1.4 gm 29/11/16 Moved internally used APIs to xvphy_i.c/h Added preprocessor directives for sw footprint reduction Fixed c++ compiler warnings 1.6 gm 12/06/17 Changed FAILURE return value of XVphy_DrpRead to 0xDEAD Added XVphy_DrpRd, XVphy_SetErrorCallback, XVphy_SetPllLayoutErrorCallback and XVphy_RegisterDebug APIs Added filter in XVphy_MmcmStart to prevent MMCM from starting when divider values are invalid 1.7 gm 13/09/17 Added GTYE4 support Updated XVphy_MmcmStart to be able to support a system with active HDMI and DP Added xvphy_mmcme2/3/4.c drivers to move MMCM configuration from RTL to SW Moved XVphy_MmcmWriteParameters to xvphy_mmcme2/3/4.c Added XVphy_SetPolarity, XVphy_SetPrbsSel and XVphy_TxPrbsForceError APIs 1.8 gm 05/14/18 Removed XVphy_DrpWrite and XVphy_DrpRead APIs 23/07/18 Added APIs XVphy_SetTxVoltageSwing and XVphy_SetTxPreEmphasis from xvphy_i.c/h Added XVphy_SetTxPostCursor API 1.9 gm 14/05/18 Added XVphy_SetRxLpm from xvphy_i.c/.h 1.10 ssh 16/08/22 Added support for multi gt (GTHE4 and GTYE4)

See xvphy.h for a detailed description of the driver.

Note
None.
MODIFICATION HISTORY:
Ver   Who  Date     Changes


1.0 als 10/19/15 Initial release. 1.1 gm 02/01/16 Additional events for event log printout 1.2 gm Added log events for debugging 1.4 gm 11/24/16 Made debug log optional (can be disabled via makefile) Added XVPHY_LOG_EVT_TX_ALIGN_TMOUT log event 1.6 gm 06/08/17 Added XVPHY_LOG_EVT_HDMI20_ERR log event Added Red & Yellow printing for errors and warnings Added XVPHY_LOG_EVT_NO_QPLL_ERR log event Changed xil_printf new lines to
Added XVPHY_LOG_EVT_DRU_CLK_ERR log event 1.7 gm 13/09/17 Added XVPHY_LOG_EVT_USRCLK_ERR event

Functions

void XVphy_CfgInitialize (XVphy *InstancePtr, XVphy_Config *ConfigPtr, UINTPTR EffectiveAddr)
 This function retrieves the configuration for this Video PHY instance and fills in the InstancePtr->Config structure. More...
 
u32 XVphy_PllInitialize (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, XVphy_PllRefClkSelType QpllRefClkSel, XVphy_PllRefClkSelType CpllRefClkSel, XVphy_PllType TxPllSelect, XVphy_PllType RxPllSelect)
 This function will initialize the PLL selection for a given channel. More...
 
void XVphy_WaitUs (XVphy *InstancePtr, u32 MicroSeconds)
 This function is the delay/sleep function for the XVphy driver. More...
 
u32 XVphy_GetVersion (XVphy *InstancePtr)
 This function will obtian the IP version. More...
 
u32 XVphy_CfgLineRate (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, u64 LineRateHz)
 Configure the channel's line rate. More...
 
XVphy_PllType XVphy_GetPllType (XVphy *InstancePtr, u8 QuadId, XVphy_DirectionType Dir, XVphy_ChannelId ChId)
 Obtain the channel's PLL reference clock selection. More...
 
u64 XVphy_GetLineRateHz (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId)
 This function will return the line rate in Hz for a given channel / quad. More...
 
u32 XVphy_ResetGtPll (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, XVphy_DirectionType Dir, u8 Hold)
 This function will reset the GT's PLL logic. More...
 
u32 XVphy_ResetGtTxRx (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, XVphy_DirectionType Dir, u8 Hold)
 This function will reset the GT's TX/RX logic. More...
 
u32 XVphy_SetPolarity (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, XVphy_DirectionType Dir, u8 Polarity)
 This function will set/clear the TX/RX polarity bit. More...
 
u32 XVphy_SetPrbsSel (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, XVphy_DirectionType Dir, XVphy_PrbsPattern Pattern)
 This function will set the TX/RXPRBSEL of the GT. More...
 
u32 XVphy_TxPrbsForceError (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, u8 ForceErr)
 This function will set the TX/RXPRBSEL of the GT. More...
 
void XVphy_SetTxVoltageSwing (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, u8 Vs)
 This function will set the TX voltage swing value for a given channel. More...
 
void XVphy_SetTxPreEmphasis (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, u8 Pe)
 This function will set the TX pre-emphasis value for a given channel. More...
 
void XVphy_SetTxPostCursor (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, u8 Pc)
 This function will set the TX post-curosr value for a given channel. More...
 
void XVphy_SetRxLpm (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, XVphy_DirectionType Dir, u8 Enable)
 This function will enable or disable the LPM logic in the Video PHY core. More...
 
u32 XVphy_DrpWr (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, u16 Addr, u16 Val)
 This function will initiate a write DRP transaction. More...
 
u16 XVphy_DrpRd (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, u16 Addr, u16 *RetVal)
 This function will initiate a read DRP transaction. More...
 
void XVphy_MmcmPowerDown (XVphy *InstancePtr, u8 QuadId, XVphy_DirectionType Dir, u8 Hold)
 This function will power down the mixed-mode clock manager (MMCM) core. More...
 
void XVphy_MmcmStart (XVphy *InstancePtr, u8 QuadId, XVphy_DirectionType Dir)
 This function will start the mixed-mode clock manager (MMCM) core. More...
 
void XVphy_IBufDsEnable (XVphy *InstancePtr, u8 QuadId, XVphy_DirectionType Dir, u8 Enable)
 This function enables the TX or RX IBUFDS peripheral. More...
 
void XVphy_Clkout1OBufTdsEnable (XVphy *InstancePtr, XVphy_DirectionType Dir, u8 Enable)
 This function enables the TX or RX CLKOUT1 OBUFTDS peripheral. More...
 
u32 XVphy_IsBonded (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId)
 This function returns true when the RX and TX are bonded and are running from the same (RX) reference clock. More...
 
void XVphy_SetErrorCallback (XVphy *InstancePtr, void *CallbackFunc, void *CallbackRef)
 This function installs a callback function for the VPHY error conditions. More...
 
void XVphy_RegisterDebug (XVphy *InstancePtr)
 This function prints out Video PHY register and GT Channel and Common DRP register contents. More...