vphy: xvphy.h File Reference

| vphy Xilinx SDK Drivers API Documentation

- Overview
- Data Structures
- APIs
- File List

Data Structures | Typedefs | Enumerations | Functions
xvphy.h File Reference

## Data Structures
struct | XVphy_PllParam
| This typedef contains configuration information for CPLL/QPLL programming. More...
struct | XVphy_Channel
| This typedef contains configuration information for PLL type and its reference clock. More...
struct | XVphy_Mmcm
| This typedef contains configuration information for MMCM programming. More...
struct | XVphy_Quad
| This typedef represents a GT quad. More...
struct | XVphy_Log
| This typedef contains the logging mechanism for debug. More...
struct | XVphy_Config
| This typedef contains configuration information for the Video PHY core. More...
struct | XVphy
| The XVphy driver instance data. More...

## Typedefs
typedef void(* | XVphy_IntrHandler )(void *InstancePtr)
| Callback type which represents the handler for interrupts. More...
typedef void(* | XVphy_TimerHandler )(void *InstancePtr, u32 MicroSeconds)
| Callback type which represents a custom timer wait handler. More...
typedef void(* | XVphy_Callback )(void *CallbackRef)
| Generic callback type. More...
typedef void(* | XVphy_ErrorCallback )(void *CallbackRef)
| Error callback type. More...

## Enumerations
enum | XVphy_ProtocolType
| This typedef enumerates the various protocols handled by the Video PHY controller (VPHY). More...
enum | XVphy_IntrHandlerType
| This typedef enumerates the list of available interrupt handler types. More...
enum | XVphy_HdmiHandlerType { XVPHY_HDMI_HANDLER_TXINIT = 1, XVPHY_HDMI_HANDLER_TXREADY, XVPHY_HDMI_HANDLER_RXINIT, XVPHY_HDMI_HANDLER_RXREADY }
| This typedef enumerates the list of available hdmi handler types. More...
enum | XVphy_PllType
| This typedef enumerates the different PLL types for a given GT channel. More...
enum | XVphy_ChannelId
| This typedef enumerates the available channels. More...
enum | XVphy_PllRefClkSelType
| This typedef enumerates the available reference clocks for the PLL clock selection multiplexer. More...
enum | XVphy_SysClkDataSelType
| This typedef enumerates the available reference clocks used to drive the RX/TX datapaths. More...
enum | XVphy_SysClkOutSelType
| This typedef enumerates the available reference clocks used to drive the RX/TX output clocks. More...
enum | XVphy_OutClkSelType
| This typedef enumerates the available clocks that are used as multiplexer input selections for the RX/TX output clock. More...
enum | XVphy_GtState { XVPHY_GT_STATE_IDLE, XVPHY_GT_STATE_LOCK, XVPHY_GT_STATE_RESET, XVPHY_GT_STATE_ALIGN, XVPHY_GT_STATE_READY }
enum | XVphy_LogEvent { XVPHY_LOG_EVT_NONE = 1, XVPHY_LOG_EVT_QPLL_EN, XVPHY_LOG_EVT_QPLL_RST, XVPHY_LOG_EVT_QPLL_LOCK, XVPHY_LOG_EVT_QPLL_RECONFIG, XVPHY_LOG_EVT_QPLL0_EN, XVPHY_LOG_EVT_QPLL0_RST, XVPHY_LOG_EVT_QPLL0_LOCK, XVPHY_LOG_EVT_QPLL0_RECONFIG, XVPHY_LOG_EVT_QPLL1_EN, XVPHY_LOG_EVT_QPLL1_RST, XVPHY_LOG_EVT_QPLL1_LOCK, XVPHY_LOG_EVT_QPLL1_RECONFIG, XVPHY_LOG_EVT_PLL0_EN, XVPHY_LOG_EVT_PLL0_RST, XVPHY_LOG_EVT_PLL0_LOCK, XVPHY_LOG_EVT_PLL0_RECONFIG, XVPHY_LOG_EVT_PLL1_EN, XVPHY_LOG_EVT_PLL1_RST, XVPHY_LOG_EVT_PLL1_LOCK, XVPHY_LOG_EVT_PLL1_RECONFIG, XVPHY_LOG_EVT_CPLL_EN, XVPHY_LOG_EVT_CPLL_RST, XVPHY_LOG_EVT_CPLL_LOCK, XVPHY_LOG_EVT_CPLL_RECONFIG, XVPHY_LOG_EVT_TXPLL_EN, XVPHY_LOG_EVT_TXPLL_RST, XVPHY_LOG_EVT_RXPLL_EN, XVPHY_LOG_EVT_RXPLL_RST, XVPHY_LOG_EVT_GTRX_RST, XVPHY_LOG_EVT_GTTX_RST, XVPHY_LOG_EVT_VID_TX_RST, XVPHY_LOG_EVT_VID_RX_RST, XVPHY_LOG_EVT_TX_ALIGN, XVPHY_LOG_EVT_TX_ALIGN_TMOUT, XVPHY_LOG_EVT_TX_TMR, XVPHY_LOG_EVT_RX_TMR, XVPHY_LOG_EVT_GT_RECONFIG, XVPHY_LOG_EVT_GT_TX_RECONFIG, XVPHY_LOG_EVT_GT_RX_RECONFIG, XVPHY_LOG_EVT_INIT, XVPHY_LOG_EVT_TXPLL_RECONFIG, XVPHY_LOG_EVT_RXPLL_RECONFIG, XVPHY_LOG_EVT_RXPLL_LOCK, XVPHY_LOG_EVT_TXPLL_LOCK, XVPHY_LOG_EVT_TX_RST_DONE, XVPHY_LOG_EVT_RX_RST_DONE, XVPHY_LOG_EVT_TX_FREQ, XVPHY_LOG_EVT_RX_FREQ, XVPHY_LOG_EVT_DRU_EN, XVPHY_LOG_EVT_GT_PLL_LAYOUT, XVPHY_LOG_EVT_GT_UNBONDED, XVPHY_LOG_EVT_1PPC_ERR, XVPHY_LOG_EVT_PPC_MSMTCH_ERR, XVPHY_LOG_EVT_VDCLK_HIGH_ERR, XVPHY_LOG_EVT_NO_DRU, XVPHY_LOG_EVT_GT_QPLL_CFG_ERR, XVPHY_LOG_EVT_GT_CPLL_CFG_ERR, XVPHY_LOG_EVT_VD_NOT_SPRTD_ERR, XVPHY_LOG_EVT_MMCM_ERR, XVPHY_LOG_EVT_HDMI20_ERR, XVPHY_LOG_EVT_NO_QPLL_ERR, XVPHY_LOG_EVT_DRU_CLK_ERR, XVPHY_LOG_EVT_USRCLK_ERR, XVPHY_LOG_EVT_DUMMY }
enum | XVphy_ErrType { XVPHY_ERR_QPLL_CFG = 0x1, XVPHY_ERR_CPLL_CFG = 0x2, XVPHY_ERR_NO_DRU = 0x4, XVPHY_ERR_VD_NOT_SPRTD = 0x8, XVPHY_ERR_MMCM_CFG = 0x10, XVPHY_ERR_PLL_LAYOUT = 0x20, XVPHY_ERR_BONDED_DRU = 0x40, XVPHY_ERR_NO_QPLL = 0x80, XVPHY_ERR_DRU_CLK = 0x100, XVPHY_ERR_USRCLK = 0x200 }
enum | XVphy_HdmiTx_Patgen { XVPHY_Patgen_Ratio_10 = 0x1, XVPHY_Patgen_Ratio_20 = 0x2, XVPHY_Patgen_Ratio_30 = 0x3, XVPHY_Patgen_Ratio_40 = 0x4, XVPHY_Patgen_Ratio_50 = 0x5 }
enum | XVphy_PrbsPattern { XVPHY_PRBSSEL_STD_MODE = 0x0, XVPHY_PRBSSEL_PRBS7 = 0x1, XVPHY_PRBSSEL_PRBS15 = 0x2, XVPHY_PRBSSEL_PRBS23 = 0x3, XVPHY_PRBSSEL_PRBS31 = 0x4 }
| This typedef enumerates the available PRBS patterns available from the. More...

## 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 CpllxRefClkSel, XVphy_PllType TxPllSelect, XVphy_PllType RxPllSelect)
| This function will initialize the PLL selection for a given channel. More...
u32 | XVphy_GetVersion (XVphy *InstancePtr)
| This function will obtian the IP version. More...
void | XVphy_WaitUs (XVphy *InstancePtr, u32 MicroSeconds)
| This function is the delay/sleep function for the XVphy driver. 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_LogDisplay (XVphy *InstancePtr)
| This function will print the entire log. More...
void | XVphy_LogReset (XVphy *InstancePtr)
| This function will reset the driver's logginc mechanism. More...
u16 | XVphy_LogRead (XVphy *InstancePtr)
| This function will read the last event from the log. More...
void | XVphy_LogWrite (XVphy *InstancePtr, XVphy_LogEvent Evt, u8 Data)
| This function will insert an event in the driver's logginc mechanism. More...
void | XVphy_InterruptHandler (XVphy *InstancePtr)
| This function is the interrupt handler for the XVphy driver. More...
u32 | XVphy_SelfTest (XVphy *InstancePtr)
| This function runs a self-test on the XVphy driver/device. More...
XVphy_Config * | XVphy_LookupConfig (u16 DeviceId)
| This function looks for the device configuration based on the unique device ID. More...
void | XVphy_RegisterDebug (XVphy *InstancePtr)
| This function prints out Video PHY register and GT Channel and Common DRP register contents. More...