vphy
Xilinx SDK Drivers API Documentation
Data Structures | Typedefs | Enumerations | Functions
xvphy.h File Reference

Overview

This driver supports the Xilinx Video PHY IP core. Version 1.0 supports:

Note
None.
MODIFICATION HISTORY:
Ver   Who  Date     Changes
----- ---- -------- -----------------------------------------------
1.0   als  10/19/15 Initial release.

Data Structures

struct  XVphy_PllParam
 
struct  XVphy_Channel
 
struct  XVphy_Mmcm
 
struct  XVphy_Quad
 
struct  XVphy_Log
 
struct  XVphy_Config
 
struct  XVphy
 

Typedefs

typedef void(* XVphy_IntrHandler) (void *InstancePtr)
 
typedef void(* XVphy_TimerHandler) (void *InstancePtr, u32 MicroSeconds)
 
typedef void(* XVphy_Callback) (void *CallbackRef)
 

Enumerations

enum  XVphy_IntrHandlerType
 
enum  XVphy_HdmiHandlerType { XVPHY_HDMI_HANDLER_TXINIT = 1, XVPHY_HDMI_HANDLER_TXREADY, XVPHY_HDMI_HANDLER_RXINIT, XVPHY_HDMI_HANDLER_RXREADY }
 

Functions

void XVphy_CfgInitialize (XVphy *InstancePtr, XVphy_Config *ConfigPtr, u32 EffectiveAddr)
 
u32 XVphy_PllInitialize (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, XVphy_PllRefClkSelType QpllRefClkSel, XVphy_PllRefClkSelType CpllxRefClkSel, XVphy_PllType TxPllSelect, XVphy_PllType RxPllSelect)
 
u32 XVphy_ClkInitialize (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, XVphy_DirectionType Dir)
 
void XVphy_WaitUs (XVphy *InstancePtr, u32 MicroSeconds)
 
void XVphy_SetRxLpm (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, XVphy_DirectionType Dir, u8 Enable)
 
void XVphy_SetTxVoltageSwing (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, u8 Vs)
 
void XVphy_SetTxPreEmphasis (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, u8 Pe)
 
u32 XVphy_WriteCfgRefClkSelReg (XVphy *InstancePtr, u8 QuadId)
 
u32 XVphy_CfgLineRate (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, u64 LineRateHz)
 
u32 XVphy_CfgQuadRefClkFreq (XVphy *InstancePtr, u8 QuadId, XVphy_PllRefClkSelType RefClkType, u32 FreqHz)
 
void XVphy_CfgPllRefClkSel (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, XVphy_PllRefClkSelType RefClkSel)
 
void XVphy_CfgSysClkDataSel (XVphy *InstancePtr, u8 QuadId, XVphy_DirectionType Dir, XVphy_SysClkDataSelType SysClkDataSel)
 
void XVphy_CfgSysClkOutSel (XVphy *InstancePtr, u8 QuadId, XVphy_DirectionType Dir, XVphy_SysClkOutSelType SysClkOutSel)
 
u32 XVphy_ClkCalcParams (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, XVphy_DirectionType Dir, u32 PllClkInFreqHz)
 
u32 XVphy_OutDivReconfig (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, XVphy_DirectionType Dir)
 
u32 XVphy_DirReconfig (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, XVphy_DirectionType Dir)
 
u32 XVphy_ClkReconfig (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId)
 
XVphy_PllType XVphy_GetPllType (XVphy *InstancePtr, u8 QuadId, XVphy_DirectionType Dir, XVphy_ChannelId ChId)
 
u32 XVphy_GetQuadRefClkFreq (XVphy *InstancePtr, u8 QuadId, XVphy_PllRefClkSelType RefClkType)
 
XVphy_PllRefClkSelType XVphy_GetPllRefClkSel (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId)
 
XVphy_SysClkDataSelType XVphy_GetSysClkDataSel (XVphy *InstancePtr, u8 QuadId, XVphy_DirectionType Dir, XVphy_ChannelId ChId)
 
XVphy_SysClkOutSelType XVphy_GetSysClkOutSel (XVphy *InstancePtr, u8 QuadId, XVphy_DirectionType Dir, XVphy_ChannelId ChId)
 
u32 XVphy_WaitForPmaResetDone (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, XVphy_DirectionType Dir)
 
u32 XVphy_WaitForResetDone (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, XVphy_DirectionType Dir)
 
u32 XVphy_WaitForPllLock (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId)
 
u32 XVphy_IsPllLocked (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId)
 
u32 XVphy_ResetGtPll (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, XVphy_DirectionType Dir, u8 Hold)
 
u32 XVphy_ResetGtTxRx (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, XVphy_DirectionType Dir, u8 Hold)
 
u32 XVphy_GtUserRdyEnable (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, XVphy_DirectionType Dir, u8 Hold)
 
u32 XVphy_ResetGt (XVphy *InstancePtr, u8 QuadId, XVphy_DirectionType Dir)
 
u32 XVphy_DrpWrite (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, u16 Addr, u16 Val)
 
u16 XVphy_DrpRead (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, u16 Addr)
 
void XVphy_MmcmReset (XVphy *InstancePtr, u8 QuadId, XVphy_DirectionType Dir, u8 Hold)
 
void XVphy_MmcmPowerDown (XVphy *InstancePtr, u8 QuadId, XVphy_DirectionType Dir, u8 Hold)
 
void XVphy_MmcmStart (XVphy *InstancePtr, u8 QuadId, XVphy_DirectionType Dir)
 
void XVphy_MmcmLockedMaskEnable (XVphy *InstancePtr, u8 QuadId, XVphy_DirectionType Dir, u8 Enable)
 
void XVphy_BufgGtReset (XVphy *InstancePtr, XVphy_DirectionType Dir, u8 Reset)
 
void XVphy_SetBufgGtDiv (XVphy *InstancePtr, XVphy_DirectionType Dir, u8 Div)
 
void XVphy_IBufDsEnable (XVphy *InstancePtr, u8 QuadId, XVphy_DirectionType Dir, u8 Enable)
 
void XVphy_Clkout1OBufTdsEnable (XVphy *InstancePtr, XVphy_DirectionType Dir, u8 Enable)
 
u32 XVphy_GetVersion (XVphy *InstancePtr)
 
void XVphy_Set8b10b (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, XVphy_DirectionType Dir, u8 Enable)
 
u32 XVphy_PowerDownGtPll (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, u8 Hold)
 
u32 XVphy_IsBonded (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId)
 
void XVphy_LogReset (XVphy *InstancePtr)
 
void XVphy_LogWrite (XVphy *InstancePtr, XVphy_LogEvent Evt, u8 Data)
 
u16 XVphy_LogRead (XVphy *InstancePtr)
 
void XVphy_LogDisplay (XVphy *InstancePtr)
 
void XVphy_SetIntrHandler (XVphy *InstancePtr, XVphy_IntrHandlerType HandlerType, XVphy_IntrHandler CallbackFunc, void *CallbackRef)
 
void XVphy_InterruptHandler (XVphy *InstancePtr)
 
void XVphy_IntrEnable (XVphy *InstancePtr, XVphy_IntrHandlerType Intr)
 
void XVphy_IntrDisable (XVphy *InstancePtr, XVphy_IntrHandlerType Intr)
 
u32 XVphy_SelfTest (XVphy *InstancePtr)
 
XVphy_ConfigXVphy_LookupConfig (u16 DeviceId)
 
u32 XVphy_DpInitialize (XVphy *InstancePtr, XVphy_Config *CfgPtr, u8 QuadId, XVphy_PllRefClkSelType CpllRefClkSel, XVphy_PllRefClkSelType QpllRefClkSel, XVphy_PllType TxPllSelect, XVphy_PllType RxPllSelect, u8 LinkRate)
 
u32 XVphy_HdmiInitialize (XVphy *InstancePtr, u8 QuadId, XVphy_Config *CfgPtr, u32 SystemFrequency)
 
u32 XVphy_SetHdmiTxParam (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, XVidC_PixelsPerClock Ppc, XVidC_ColorDepth Bpc, XVidC_ColorFormat ColorFormat)
 
u32 XVphy_SetHdmiRxParam (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId)
 
u32 XVphy_HdmiCfgCalcMmcmParam (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, XVphy_DirectionType Dir, XVidC_PixelsPerClock Ppc, XVidC_ColorDepth Bpc)
 
void XVphy_HdmiUpdateClockSelection (XVphy *InstancePtr, u8 QuadId, XVphy_SysClkDataSelType TxSysPllClkSel, XVphy_SysClkDataSelType RxSysPllClkSel)
 
void XVphy_ClkDetFreqReset (XVphy *InstancePtr, u8 QuadId, XVphy_DirectionType Dir)
 
u32 XVphy_ClkDetGetRefClkFreqHz (XVphy *InstancePtr, XVphy_DirectionType Dir)
 
u32 XVphy_DruGetRefClkFreqHz (XVphy *InstancePtr)
 
void XVphy_HdmiDebugInfo (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId)
 
void XVphy_DpDebugInfo (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId)
 
void XVphy_SetHdmiCallback (XVphy *InstancePtr, XVphy_HdmiHandlerType HandlerType, void *CallbackFunc, void *CallbackRef)
 

Typedef Documentation

typedef void(* XVphy_Callback) (void *CallbackRef)

Generic callback type.

Parameters
CallbackRefis a pointer to the callback reference.
Note
None.
typedef void(* XVphy_IntrHandler) (void *InstancePtr)

Callback type which represents the handler for interrupts.

Parameters
InstancePtris a pointer to the XVphy instance.
Note
None.
typedef void(* XVphy_TimerHandler) (void *InstancePtr, u32 MicroSeconds)

Callback type which represents a custom timer wait handler.

This is only used for Microblaze since it doesn't have a native sleep function. To avoid dependency on a hardware timer, the default wait functionality is implemented using loop iterations; this isn't too accurate. If a custom timer handler is used, the user may implement their own wait implementation using a hardware timer (see example/) for better accuracy.

Parameters
InstancePtris a pointer to the XVphy instance.
MicroSecondsis the number of microseconds to be passed to the timer function.
Note
None.

Enumeration Type Documentation

This typedef enumerates the available channels.

Enumerator
XVPHY_GT_STATE_IDLE 

Idle state.

XVPHY_GT_STATE_LOCK 

Lock state.

XVPHY_GT_STATE_RESET 

Reset state.

XVPHY_GT_STATE_ALIGN 

Align state.

XVPHY_GT_STATE_READY 

Ready state.

This typedef enumerates the list of available hdmi handler types.

The values are used as parameters to the XVphy_SetHdmiCallback function.

Enumerator
XVPHY_HDMI_HANDLER_TXINIT 

TX init handler.

XVPHY_HDMI_HANDLER_TXREADY 

TX ready handler.

XVPHY_HDMI_HANDLER_RXINIT 

RX init handler.

XVPHY_HDMI_HANDLER_RXREADY 

RX ready handler.

This typedef enumerates the list of available interrupt handler types.

The values are used as parameters to the XVphy_SetIntrHandler function.

Enumerator
XVPHY_LOG_EVT_NONE 

Log event none.

XVPHY_LOG_EVT_QPLL_EN 

Log event QPLL enable.

XVPHY_LOG_EVT_QPLL_RST 

Log event QPLL reset.

XVPHY_LOG_EVT_QPLL_LOCK 

Log event QPLL lock.

XVPHY_LOG_EVT_QPLL_RECONFIG 

Log event QPLL reconfig.

XVPHY_LOG_EVT_QPLL0_EN 

Log event QPLL0 enable.

XVPHY_LOG_EVT_QPLL0_RST 

Log event QPLL0 reset.

XVPHY_LOG_EVT_QPLL0_LOCK 

Log event QPLL0 lock.

XVPHY_LOG_EVT_QPLL0_RECONFIG 

Log event QPLL0 reconfig.

XVPHY_LOG_EVT_QPLL1_EN 

Log event QPLL1 enable.

XVPHY_LOG_EVT_QPLL1_RST 

Log event QPLL1 reset.

XVPHY_LOG_EVT_QPLL1_LOCK 

Log event QPLL1 lock.

XVPHY_LOG_EVT_QPLL1_RECONFIG 

Log event QPLL1 reconfig.

XVPHY_LOG_EVT_PLL0_EN 

Log event PLL0 reset.

XVPHY_LOG_EVT_PLL0_RST 

Log event PLL0 reset.

XVPHY_LOG_EVT_PLL0_LOCK 

Log event PLL0 lock.

XVPHY_LOG_EVT_PLL0_RECONFIG 

Log event PLL0 reconfig.

XVPHY_LOG_EVT_PLL1_EN 

Log event PLL1 reset.

XVPHY_LOG_EVT_PLL1_RST 

Log event PLL1 reset.

XVPHY_LOG_EVT_PLL1_LOCK 

Log event PLL1 lock.

XVPHY_LOG_EVT_PLL1_RECONFIG 

Log event PLL1 reconfig.

XVPHY_LOG_EVT_CPLL_EN 

Log event CPLL reset.

XVPHY_LOG_EVT_CPLL_RST 

Log event CPLL reset.

XVPHY_LOG_EVT_CPLL_LOCK 

Log event CPLL lock.

XVPHY_LOG_EVT_CPLL_RECONFIG 

Log event CPLL reconfig.

XVPHY_LOG_EVT_TXPLL_EN 

Log event TXPLL enable.

XVPHY_LOG_EVT_TXPLL_RST 

Log event TXPLL reset.

XVPHY_LOG_EVT_RXPLL_EN 

Log event RXPLL enable.

XVPHY_LOG_EVT_RXPLL_RST 

Log event RXPLL reset.

XVPHY_LOG_EVT_GTRX_RST 

Log event GT RX reset.

XVPHY_LOG_EVT_GTTX_RST 

Log event GT TX reset.

XVPHY_LOG_EVT_VID_TX_RST 

Log event Vid TX reset.

XVPHY_LOG_EVT_VID_RX_RST 

Log event Vid RX reset.

XVPHY_LOG_EVT_TX_ALIGN 

Log event TX align.

XVPHY_LOG_EVT_TX_TMR 

Log event TX timer.

XVPHY_LOG_EVT_RX_TMR 

Log event RX timer.

XVPHY_LOG_EVT_GT_RECONFIG 

Log event GT reconfig.

XVPHY_LOG_EVT_INIT 

Log event init.

XVPHY_LOG_EVT_TXPLL_RECONFIG 

Log event TXPLL reconfig.

XVPHY_LOG_EVT_RXPLL_RECONFIG 

Log event RXPLL reconfig.

XVPHY_LOG_EVT_RXPLL_LOCK 

Log event RXPLL lock.

XVPHY_LOG_EVT_TXPLL_LOCK 

Log event TXPLL lock.

XVPHY_LOG_EVT_TX_RST_DONE 

Log event TX reset done.

XVPHY_LOG_EVT_RX_RST_DONE 

Log event RX reset done.

XVPHY_LOG_EVT_TX_FREQ 

Log event TX frequency.

XVPHY_LOG_EVT_RX_FREQ 

Log event RX frequency.

This typedef enumerates the available clocks that are used as multiplexer input selections for the RX/TX output clock.

This typedef enumerates the available reference clocks for the PLL clock selection multiplexer.

This typedef enumerates the different PLL types for a given GT channel.

This typedef enumerates the various protocols handled by the Video PHY controller (VPHY).

This typedef enumerates the available reference clocks used to drive the RX/TX datapaths.

This typedef enumerates the available reference clocks used to drive the RX/TX output clocks.

Function Documentation

void XVphy_BufgGtReset ( XVphy InstancePtr,
XVphy_DirectionType  Dir,
u8  Reset 
)

This function resets the BUFG_GT peripheral.

Parameters
InstancePtris a pointer to the XVphy core instance.
Diris an indicator for TX or RX
Resetspecifies TRUE/FALSE value to either assert or deassert reset on the BUFG_GT, respectively.
Returns
None.

References XVphy_Config::BaseAddr, XVphy::Config, XVphy_ReadReg, and XVphy_WriteReg.

void XVphy_CfgInitialize ( XVphy InstancePtr,
XVphy_Config ConfigPtr,
u32  EffectiveAddr 
)

This function retrieves the configuration for this Video PHY instance and fills in the InstancePtr->Config structure.

Parameters
InstancePtris a pointer to the XVphy instance.
ConfigPtris a pointer to the configuration structure that will be used to copy the settings from.
EffectiveAddris the device base address in the virtual memory space. If the address translation is not used, then the physical address is passed.
Returns
None.
Note
Unexpected errors may occur if the address mapping is changed after this function is invoked.

References XVphy_Config::BaseAddr, XVphy::Config, XVphy_Config::DruRefClkSel, XVphy::IsReady, XVphy_Config::RxRefClkSel, XVphy_Config::RxSysPllClkSel, XVphy_Config::TxRefClkSel, XVphy_Config::TxSysPllClkSel, and XVphy_Config::XcvrType.

Referenced by XVphy_DpInitialize(), and XVphy_HdmiInitialize().

u32 XVphy_CfgLineRate ( XVphy InstancePtr,
u8  QuadId,
XVphy_ChannelId  ChId,
u64  LineRateHz 
)

Configure the channel's line rate.

This is a software only configuration and this value is used in the PLL calculator.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
ChIdis the channel ID to operate on.
LineRateis the line rate to configure software.
Returns
  • XST_SUCCESS if the reference clock type is valid.
  • XST_FAILURE otherwise.
Note
None.

References XVphy_Channel::LineRateHz, XVphy::Quads, and XVphy_Ch2Ids().

Referenced by XVphy_HdmiCpllParam(), and XVphy_HdmiQpllParam().

void XVphy_CfgPllRefClkSel ( XVphy InstancePtr,
u8  QuadId,
XVphy_ChannelId  ChId,
XVphy_PllRefClkSelType  RefClkSel 
)

Configure the PLL reference clock selection for the specified channel(s).

This is applied to both direction to the software configuration only.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
ChIdis the channel ID to operate on.
SysClkDataSelis the reference clock selection to configure.
Returns
None.
Note
None.

References XVphy::Quads, and XVphy_Ch2Ids().

Referenced by XVphy_HdmiRxTimerTimeoutHandler(), and XVphy_PllInitialize().

u32 XVphy_CfgQuadRefClkFreq ( XVphy InstancePtr,
u8  QuadId,
XVphy_PllRefClkSelType  RefClkType,
u32  FreqHz 
)

Configure the quad's reference clock frequency.

This is a software only configuration and this value is used in the PLL calculator.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
RefClkTypeis the reference clock type to operate on.
FreqHzis the reference clock frequency to configure software.
Returns
  • XST_SUCCESS if the reference clock type is valid.
  • XST_FAILURE otherwise.
Note
None.

References XVphy::Quads.

Referenced by XVphy_DpInitialize().

void XVphy_CfgSysClkDataSel ( XVphy InstancePtr,
u8  QuadId,
XVphy_DirectionType  Dir,
XVphy_SysClkDataSelType  SysClkDataSel 
)

Configure the SYSCLKDATA reference clock selection for the direction.

Same configuration applies to all channels in the quad. This is applied to the software configuration only.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
Diris an indicator for TX or RX.
SysClkDataSelis the reference clock selection to configure.
Returns
None.
Note
None.

References XVphy::Quads, and XVphy_Ch2Ids().

Referenced by XVphy_HdmiQpllParam(), and XVphy_PllInitialize().

void XVphy_CfgSysClkOutSel ( XVphy InstancePtr,
u8  QuadId,
XVphy_DirectionType  Dir,
XVphy_SysClkOutSelType  SysClkOutSel 
)

Configure the SYSCLKOUT reference clock selection for the direction.

Same configuration applies to all channels in the quad. This is applied to the software configuration only.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
Diris an indicator for TX or RX.
SysClkOutSelis the reference clock selection to configure.
Returns
None.
Note
None.

References XVphy::Quads, and XVphy_Ch2Ids().

Referenced by XVphy_HdmiQpllParam(), and XVphy_PllInitialize().

u32 XVphy_ClkCalcParams ( XVphy InstancePtr,
u8  QuadId,
XVphy_ChannelId  ChId,
XVphy_DirectionType  Dir,
u32  PllClkInFreqHz 
)

This function will try to find the necessary PLL divisor values to produce the configured line rate given the specified PLL input frequency.

This will be done for all channels specified by ChId. This function is a wrapper for XVphy_PllCalculator.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to calculate the PLL values for.
ChIdis the channel ID to calculate the PLL values for.
Diris an indicator for TX or RX.
PllClkInFreqHzis the PLL input frequency on which to base the calculations on. A value of 0 indicates to use the currently configured quad PLL reference clock. A non-zero value indicates to ignore what is currently configured in SW, and use a custom frequency instead.
Returns
  • XST_SUCCESS if valid PLL values were found to satisfy the constraints.
  • XST_FAILURE otherwise.
Note
If successful, the channel's PllParams structure will be modified with the valid PLL parameters.

References XVphy_Ch2Ids().

Referenced by XVphy_ClkInitialize(), XVphy_HdmiCpllParam(), and XVphy_HdmiQpllParam().

void XVphy_ClkDetFreqReset ( XVphy InstancePtr,
u8  QuadId,
XVphy_DirectionType  Dir 
)

This function resets clock detector TX/RX frequency.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
Diris an indicator for RX or TX.
Returns
None.
Note
None.

References XVphy_Config::BaseAddr, XVphy::Config, XVphy_ReadReg, and XVphy_WriteReg.

u32 XVphy_ClkDetGetRefClkFreqHz ( XVphy InstancePtr,
XVphy_DirectionType  Dir 
)

This function returns the frequency of the RX/TX reference clock as measured by the clock detector peripheral.

Parameters
InstancePtris a pointer to the XVphy core instance.
Diris an indicator for RX or TX.
Returns
The measured frequency of the RX/TX reference clock.
Note
None.

References XVphy_Config::BaseAddr, XVphy::Config, and XVphy_ReadReg.

Referenced by XVphy_DruCalcCenterFreqHz(), XVphy_HdmiRxClkDetFreqChangeHandler(), and XVphy_HdmiTxClkDetFreqChangeHandler().

u32 XVphy_ClkInitialize ( XVphy InstancePtr,
u8  QuadId,
XVphy_ChannelId  ChId,
XVphy_DirectionType  Dir 
)

This function will initialize the clocking for a given channel.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
ChIdis the channel ID to operate on.
Diris an indicator for TX or RX.
Returns
  • XST_SUCCESS if the configuration was successful.
  • XST_FAILURE otherwise.
Note
None.

References XVphy_ClkCalcParams(), XVphy_ClkReconfig(), XVphy_DirReconfig(), and XVphy_OutDivReconfig().

void XVphy_Clkout1OBufTdsEnable ( XVphy InstancePtr,
XVphy_DirectionType  Dir,
u8  Enable 
)

This function enables the TX or RX CLKOUT1 OBUFTDS peripheral.

Parameters
InstancePtris a pointer to the XVphy core instance.
Diris an indicator for TX or RX.
Enablespecifies TRUE/FALSE value to either enable or disable the OBUFTDS, respectively.
Returns
None.

References XVphy_Config::BaseAddr, XVphy::Config, XVphy_ReadReg, and XVphy_WriteReg.

u32 XVphy_ClkReconfig ( XVphy InstancePtr,
u8  QuadId,
XVphy_ChannelId  ChId 
)

This function will set the current clocking settings for each channel to hardware based on the configuration stored in the driver's instance.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
ChIdis the channel ID for which to write the settings for.
Returns
  • XST_SUCCESS if the configuration was successful.
  • XST_FAILURE otherwise.
Note
None.

References XVphy_Ch2Ids().

Referenced by XVphy_ClkInitialize(), XVphy_HdmiRxTimerTimeoutHandler(), and XVphy_HdmiTxTimerTimeoutHandler().

u32 XVphy_DirReconfig ( XVphy InstancePtr,
u8  QuadId,
XVphy_ChannelId  ChId,
XVphy_DirectionType  Dir 
)

This function will set the current RX/TX configuration over DRP.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
ChIdis the channel ID for which to write the settings for.
Diris an indicator for RX or TX.
Returns
  • XST_SUCCESS if the configuration was successful.
  • XST_FAILURE otherwise.
Note
None.

References XVphy::Config, XVphy_Config::XcvrType, XVphy_Ch2Ids(), XVPHY_LOG_EVT_GT_RECONFIG, and XVphy_LogWrite().

Referenced by XVphy_ClkInitialize(), XVphy_HdmiRxTimerTimeoutHandler(), and XVphy_HdmiTxTimerTimeoutHandler().

void XVphy_DpDebugInfo ( XVphy InstancePtr,
u8  QuadId,
XVphy_ChannelId  ChId 
)

This function prints Vphy debug information on STDIO/Uart console.

Parameters
InstancePtris a pointer to the Vphy core instance.
QuadIdis the GT quad ID to operate on.
ChIdis the channel ID to operate on.
Returns
None.
Note
None.

References XVphy::Quads, XVphy_Channel::RxDataRefClkSel, XVphy_Channel::RxOutDiv, XVphy_Channel::TxDataRefClkSel, XVphy_Channel::TxOutDiv, XVPHY_GT_STATE_ALIGN, XVPHY_GT_STATE_IDLE, XVPHY_GT_STATE_LOCK, XVPHY_GT_STATE_READY, and XVPHY_GT_STATE_RESET.

u32 XVphy_DpInitialize ( XVphy InstancePtr,
XVphy_Config CfgPtr,
u8  QuadId,
XVphy_PllRefClkSelType  CpllRefClkSel,
XVphy_PllRefClkSelType  QpllRefClkSel,
XVphy_PllType  TxPllSelect,
XVphy_PllType  RxPllSelect,
u8  LinkRate 
)

This function initializes the Video PHY for DisplayPort.

Parameters
InstancePtris a pointer to the XVphy instance.
CfgPtris a pointer to the configuration structure that will be used to copy the settings from.
QuadIdis the GT quad ID to operate on.
CpllRefClkSelis the CPLL reference clock selection for the quad.
QpllRefClkSelis the QPLL reference clock selection for the quad.
TxPllSelectis the reference clock selection for the quad's TX PLL dividers.
RxPllSelectis the reference clock selection for the quad's RX PLL dividers.
LinkRateis the line rate to set for the quad's channels.
Returns
  • XST_SUCCESS.
Note
None.

References XVphy_Config::BaseAddr, XVphy::Config, XVphy::IsReady, XVphy::Quads, XVphy_Channel::RxState, XVphy_Channel::TxState, XVphy_Config::XcvrType, XVphy_CfgInitialize(), XVphy_CfgQuadRefClkFreq(), XVPHY_GT_STATE_IDLE, XVphy_IntrDisable(), XVPHY_LOG_EVT_INIT, XVphy_LogReset(), XVphy_LogWrite(), XVphy_PllInitialize(), XVphy_Set8b10b(), XVphy_SetRxLpm(), XVphy_SetTxPreEmphasis(), and XVphy_SetTxVoltageSwing().

u16 XVphy_DrpRead ( XVphy InstancePtr,
u8  QuadId,
XVphy_ChannelId  ChId,
u16  Addr 
)

This function will initiate a read DRP transaction.

It is a wrapper around XVphy_DrpAccess.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
ChIdis the channel ID on which to direct the DRP access.
Diris an indicator for write (TX) or read (RX).
Addris the DRP address to issue the DRP access to.
Returns
  • XST_SUCCESS if the DRP access was successful.
  • XST_FAILURE otherwise, if the busy bit did not go low, or if the ready bit did not go high.
Note
None.

Referenced by XVphy_Gthe2ClkChReconfig(), XVphy_Gthe2ClkCmnReconfig(), XVphy_Gthe2OutDivChReconfig(), XVphy_Gthe3ClkChReconfig(), XVphy_Gthe3ClkCmnReconfig(), XVphy_Gthe3OutDivChReconfig(), XVphy_Gthe3RxChReconfig(), XVphy_Gthe3TxPllRefClkDiv1Reconfig(), XVphy_Gtxe2ClkChReconfig(), XVphy_Gtxe2ClkCmnReconfig(), XVphy_Gtxe2OutDivChReconfig(), XVphy_Gtxe2RxChReconfig(), and XVphy_Gtxe2TxPllRefClkDiv1Reconfig().

u32 XVphy_DrpWrite ( XVphy InstancePtr,
u8  QuadId,
XVphy_ChannelId  ChId,
u16  Addr,
u16  Val 
)

This function will initiate a write DRP transaction.

It is a wrapper around XVphy_DrpAccess.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
ChIdis the channel ID on which to direct the DRP access.
Diris an indicator for write (TX) or read (RX).
Addris the DRP address to issue the DRP access to.
Valis the value to write to the DRP address.
Returns
  • XST_SUCCESS if the DRP access was successful.
  • XST_FAILURE otherwise, if the busy bit did not go low, or if the ready bit did not go high.
Note
None.

Referenced by XVphy_Gthe2ClkChReconfig(), XVphy_Gthe2ClkCmnReconfig(), XVphy_Gthe2OutDivChReconfig(), XVphy_Gthe2RxChReconfig(), XVphy_Gthe3ClkChReconfig(), XVphy_Gthe3ClkCmnReconfig(), XVphy_Gthe3OutDivChReconfig(), XVphy_Gthe3RxChReconfig(), XVphy_Gthe3TxPllRefClkDiv1Reconfig(), XVphy_Gtxe2ClkChReconfig(), XVphy_Gtxe2ClkCmnReconfig(), XVphy_Gtxe2OutDivChReconfig(), XVphy_Gtxe2RxChReconfig(), and XVphy_Gtxe2TxPllRefClkDiv1Reconfig().

u32 XVphy_DruGetRefClkFreqHz ( XVphy InstancePtr)

This function returns the frequency of the DRU reference clock as measured by the clock detector peripheral.

Parameters
InstancePtris a pointer to the XVphy core instance.
Returns
The measured frequency of the DRU reference clock.
Note
The design must have a DRU for this function to return a valid value.

References XVphy_Config::BaseAddr, XVphy::Config, and XVphy_ReadReg.

Referenced by XVphy_DruCalcCenterFreqHz(), XVphy_HdmiCpllParam(), and XVphy_HdmiQpllParam().

XVphy_PllRefClkSelType XVphy_GetPllRefClkSel ( XVphy InstancePtr,
u8  QuadId,
XVphy_ChannelId  ChId 
)

Obtain the current PLL reference clock selection.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
ChIdis the channel ID which to operate on.
Returns
The current PLL reference clock selection.
Note
None.

References XVphy_Config::BaseAddr, XVphy::Config, XVphy::Quads, and XVphy_ReadReg.

XVphy_PllType XVphy_GetPllType ( XVphy InstancePtr,
u8  QuadId,
XVphy_DirectionType  Dir,
XVphy_ChannelId  ChId 
)

Obtain the channel's PLL reference clock selection.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
Diris an indicator for TX or RX.
ChIdis the channel ID which to operate on.
Returns
The PLL type being used by the channel.
Note
None.

References XVphy_GetSysClkDataSel(), and XVphy_GetSysClkOutSel().

Referenced by XVphy_HdmiCpllLockHandler(), XVphy_HdmiQpllLockHandler(), XVphy_HdmiRxClkDetFreqChangeHandler(), XVphy_HdmiRxTimerTimeoutHandler(), XVphy_HdmiTxClkDetFreqChangeHandler(), and XVphy_HdmiTxTimerTimeoutHandler().

u32 XVphy_GetQuadRefClkFreq ( XVphy InstancePtr,
u8  QuadId,
XVphy_PllRefClkSelType  RefClkType 
)

Obtain the current reference clock frequency for the quad based on the reference clock type.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
RefClkTypeis the type to obtain the clock selection for.
Returns
The current reference clock frequency for the quad for the specified type selection.
Note
None.

References XVphy::Quads.

Referenced by XVphy_Gthe2CfgSetCdr(), and XVphy_Gthe3CfgSetCdr().

XVphy_SysClkDataSelType XVphy_GetSysClkDataSel ( XVphy InstancePtr,
u8  QuadId,
XVphy_DirectionType  Dir,
XVphy_ChannelId  ChId 
)

Obtain the current [RT]XSYSCLKSEL[0] configuration.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
Diris an indicator for TX or RX.
ChIdis the channel ID which to operate on.
Returns
The current [RT]XSYSCLKSEL[0] selection.
Note
None.

References XVphy_Config::BaseAddr, XVphy::Config, XVphy::Quads, XVphy_Config::XcvrType, and XVphy_ReadReg.

Referenced by XVphy_GetPllType(), XVphy_IsBonded(), and XVphy_ResetGt().

XVphy_SysClkOutSelType XVphy_GetSysClkOutSel ( XVphy InstancePtr,
u8  QuadId,
XVphy_DirectionType  Dir,
XVphy_ChannelId  ChId 
)

Obtain the current [RT]XSYSCLKSEL[1] configuration.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
Diris an indicator for TX or RX.
ChIdis the channel ID which to operate on.
Returns
The current [RT]XSYSCLKSEL[1] selection.
Note
None.

References XVphy_Config::BaseAddr, XVphy::Config, XVphy::Quads, XVphy_Config::XcvrType, and XVphy_ReadReg.

Referenced by XVphy_GetPllType(), XVphy_IsBonded(), and XVphy_ResetGt().

u32 XVphy_GetVersion ( XVphy InstancePtr)

This function will obtian the IP version.

Parameters
InstancePtris a pointer to the XVphy core instance.
Returns
The IP version of the Video PHY core.
Note
None.

References XVphy_Config::BaseAddr, XVphy::Config, and XVphy_ReadReg.

u32 XVphy_GtUserRdyEnable ( XVphy InstancePtr,
u8  QuadId,
XVphy_ChannelId  ChId,
XVphy_DirectionType  Dir,
u8  Hold 
)

This function will reset and enable the Video PHY's user core logic.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
ChIdis the channel ID which to operate on.
Diris an indicator for TX or RX.
Holdis an indicator whether to "hold" the reset if set to 1. If set to 0: reset, then enable.
Returns
  • XST_SUCCESS.
Note
None.

References XVphy_Config::BaseAddr, XVphy::Config, XVphy_ReadReg, and XVphy_WriteReg.

Referenced by XVphy_HdmiTxClkDetFreqChangeHandler().

u32 XVphy_HdmiCfgCalcMmcmParam ( XVphy InstancePtr,
u8  QuadId,
XVphy_ChannelId  ChId,
XVphy_DirectionType  Dir,
XVidC_PixelsPerClock  Ppc,
XVidC_ColorDepth  Bpc 
)

This function calculates the HDMI MMCM parameters.

Parameters
InstancePtris a pointer to the Vphy core instance.
QuadIdis the GT quad ID to operate on.
ChIdis the channel ID to operate on.
Diris an indicator for RX or TX.
Ppcspecifies the total number of pixels per clock.
  • 1 = XVIDC_PPC_1
  • 2 = XVIDC_PPC_2
  • 4 = XVIDC_PPC_4
Bpcspecifies the color depth/bits per color component.
  • 6 = XVIDC_BPC_6
  • 8 = XVIDC_BPC_8
  • 10 = XVIDC_BPC_10
  • 12 = XVIDC_BPC_12
  • 16 = XVIDC_BPC_16
Returns
  • XST_SUCCESS if calculated PLL parameters updated successfully.
  • XST_FAILURE if parameters not updated.
Note
None.

References XVphy::HdmiRxRefClkHz, XVphy::HdmiRxTmdsClockRatio, XVphy::HdmiTxRefClkHz, XVphy::HdmiTxSampleRate, XVphy_Channel::LineRateHz, XVphy::Quads, XVphy_Quad::RxMmcm, and XVphy_Quad::TxMmcm.

Referenced by XVphy_SetHdmiTxParam().

void XVphy_HdmiDebugInfo ( XVphy InstancePtr,
u8  QuadId,
XVphy_ChannelId  ChId 
)

This function prints Video PHY debug information related to HDMI.

Parameters
InstancePtris a pointer to the Vphy core instance.
QuadIdis the GT quad ID to operate on.
ChIdis the channel ID to operate on.
Returns
None.
Note
None.

References XVphy_Config::BaseAddr, XVphy::Config, XVphy_Config::DruIsPresent, XVphy::HdmiRxDruIsEnabled, XVphy::Quads, XVphy_Channel::RxDataRefClkSel, XVphy_Quad::RxMmcm, XVphy_Channel::RxOutDiv, XVphy_Channel::TxDataRefClkSel, XVphy_Quad::TxMmcm, XVphy_Channel::TxOutDiv, XVphy_DruGetVersion(), XVPHY_GT_STATE_ALIGN, XVPHY_GT_STATE_IDLE, XVPHY_GT_STATE_LOCK, XVPHY_GT_STATE_READY, XVPHY_GT_STATE_RESET, and XVphy_ReadReg.

u32 XVphy_HdmiInitialize ( XVphy InstancePtr,
u8  QuadId,
XVphy_Config CfgPtr,
u32  SystemFrequency 
)
void XVphy_HdmiUpdateClockSelection ( XVphy InstancePtr,
u8  QuadId,
XVphy_SysClkDataSelType  TxSysPllClkSel,
XVphy_SysClkDataSelType  RxSysPllClkSel 
)

This function Updates the VPHY clocking.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
TxSysPllClkSelis the SYSCLKDATA selection for TX.
RxSysPllClkSelis the SYSCLKDATA selection for RX.
Returns
None.
Note
None.

References XVphy::Config, XVphy::Quads, XVphy_Channel::RxState, XVphy_Config::RxSysPllClkSel, XVphy_Channel::TxState, XVphy_Config::TxSysPllClkSel, XVphy_Ch2Ids(), XVPHY_GT_STATE_IDLE, and XVphy_ResetGtPll().

void XVphy_IBufDsEnable ( XVphy InstancePtr,
u8  QuadId,
XVphy_DirectionType  Dir,
u8  Enable 
)

This function enables the TX or RX IBUFDS peripheral.

Parameters
InstancePtris a pointer to the XVphy core instance.
Diris an indicator for TX or RX.
Enablespecifies TRUE/FALSE value to either enable or disable the IBUFDS, respectively.
Returns
None.

References XVphy_Config::BaseAddr, XVphy::Config, XVphy_Config::RxRefClkSel, XVphy_Config::TxRefClkSel, XVphy_ReadReg, and XVphy_WriteReg.

Referenced by XVphy_HdmiInitialize().

void XVphy_InterruptHandler ( XVphy InstancePtr)
void XVphy_IntrDisable ( XVphy InstancePtr,
XVphy_IntrHandlerType  Intr 
)

This function disabled interrupts associated with the specified interrupt type.

Parameters
InstancePtris a pointer to the XVphy instance.
Intris the interrupt type/mask to disable.
Returns
None.
Note
None.

References XVphy_Config::BaseAddr, XVphy::Config, XVphy_ReadReg, and XVphy_WriteReg.

Referenced by XVphy_DpInitialize(), and XVphy_HdmiInitialize().

void XVphy_IntrEnable ( XVphy InstancePtr,
XVphy_IntrHandlerType  Intr 
)

This function enables interrupts associated with the specified interrupt type.

Parameters
InstancePtris a pointer to the XVphy instance.
Intris the interrupt type/mask to enable.
Returns
None.
Note
None.

References XVphy_Config::BaseAddr, XVphy::Config, XVphy_ReadReg, and XVphy_WriteReg.

Referenced by XVphy_HdmiInitialize().

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.

Parameters
InstancePtris a pointer to the XVphy core instance.
Returns
TRUE if the RX and TX are using the same PLL, FALSE otherwise.
Note
None.

References XVphy_GetSysClkDataSel(), and XVphy_GetSysClkOutSel().

Referenced by XVphy_HdmiCpllLockHandler(), XVphy_HdmiCpllParam(), XVphy_HdmiGtRxResetDoneLockHandler(), XVphy_HdmiQpllLockHandler(), XVphy_HdmiRxClkDetFreqChangeHandler(), XVphy_HdmiRxTimerTimeoutHandler(), XVphy_SetHdmiRxParam(), and XVphy_SetHdmiTxParam().

u32 XVphy_IsPllLocked ( XVphy InstancePtr,
u8  QuadId,
XVphy_ChannelId  ChId 
)

This function will check the status of a PLL lock on the specified channel.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
ChIdis the channel ID which to operate on.
Returns
  • XST_SUCCESS if the specified PLL is locked.
  • XST_FAILURE otherwise.
Note
None.

References XVphy_Config::BaseAddr, XVphy::Config, and XVphy_ReadReg.

Referenced by XVphy_HdmiCpllLockHandler(), XVphy_HdmiQpllLockHandler(), and XVphy_WaitForPllLock().

void XVphy_LogDisplay ( XVphy InstancePtr)
u16 XVphy_LogRead ( XVphy InstancePtr)

This function will read the last event from the log.

Parameters
InstancePtris a pointer to the XVphy core instance.
Returns
The log data.
Note
None.

References XVphy_Log::DataBuffer, XVphy_Log::HeadIndex, XVphy::Log, and XVphy_Log::TailIndex.

Referenced by XVphy_LogDisplay().

void XVphy_LogReset ( XVphy InstancePtr)

This function will reset the driver's logginc mechanism.

Parameters
InstancePtris a pointer to the XVphy core instance.
Returns
None.
Note
None.

References XVphy_Log::HeadIndex, XVphy::Log, and XVphy_Log::TailIndex.

Referenced by XVphy_DpInitialize(), and XVphy_HdmiInitialize().

void XVphy_LogWrite ( XVphy InstancePtr,
XVphy_LogEvent  Evt,
u8  Data 
)
XVphy_Config* XVphy_LookupConfig ( u16  DeviceId)

This function looks for the device configuration based on the unique device ID.

The table XVphy_ConfigTable[] contains the configuration information for each device in the system.

Parameters
DeviceIdis the unique device ID of the device being looked up.
Returns
A pointer to the configuration table entry corresponding to the given device ID, or NULL if no match is found.
Note
None.
void XVphy_MmcmLockedMaskEnable ( XVphy InstancePtr,
u8  QuadId,
XVphy_DirectionType  Dir,
u8  Enable 
)

This function will reset the mixed-mode clock manager (MMCM) core.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
Diris an indicator for TX or RX.
Enableis an indicator whether to "Enable" the locked mask if set to 1. If set to 0: reset, then disable.
Returns
None.
Note
None.

References XVphy_Config::BaseAddr, XVphy::Config, XVphy_ReadReg, and XVphy_WriteReg.

Referenced by XVphy_HdmiInitialize(), and XVphy_MmcmStart().

void XVphy_MmcmPowerDown ( XVphy InstancePtr,
u8  QuadId,
XVphy_DirectionType  Dir,
u8  Hold 
)

This function will power down the mixed-mode clock manager (MMCM) core.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
Diris an indicator for TX or RX.
Holdis an indicator whether to "hold" the power down if set to 1. If set to 0: power down, then power back up.
Returns
  • XST_SUCCESS.
Note
None.

References XVphy_Config::BaseAddr, XVphy::Config, XVphy_ReadReg, and XVphy_WriteReg.

Referenced by XVphy_HdmiInitialize(), XVphy_HdmiRxClkDetFreqChangeHandler(), XVphy_HdmiTxClkDetFreqChangeHandler(), and XVphy_MmcmStart().

void XVphy_MmcmReset ( XVphy InstancePtr,
u8  QuadId,
XVphy_DirectionType  Dir,
u8  Hold 
)

This function will reset the mixed-mode clock manager (MMCM) core.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
Diris an indicator for TX or RX.
Holdis an indicator whether to "hold" the reset if set to 1. If set to 0: reset, then enable.
Returns
  • XST_SUCCESS.
Note
None.

References XVphy_Config::BaseAddr, XVphy::Config, XVphy_ReadReg, and XVphy_WriteReg.

Referenced by XVphy_HdmiInitialize(), and XVphy_MmcmStart().

void XVphy_MmcmStart ( XVphy InstancePtr,
u8  QuadId,
XVphy_DirectionType  Dir 
)

This function will start the mixed-mode clock manager (MMCM) core.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
Diris an indicator for TX or RX.
Returns
None.
Note
None.

References XVphy::Config, XVphy_Config::RxProtocol, XVphy_Config::TxProtocol, XVphy_MmcmLockedMaskEnable(), XVphy_MmcmPowerDown(), XVphy_MmcmReset(), and XVphy_WaitUs().

Referenced by XVphy_HdmiTxTimerTimeoutHandler().

u32 XVphy_OutDivReconfig ( XVphy InstancePtr,
u8  QuadId,
XVphy_ChannelId  ChId,
XVphy_DirectionType  Dir 
)

This function will set the current output divider configuration over DRP.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
ChIdis the channel ID for which to write the settings for.
Diris an indicator for RX or TX.
Returns
  • XST_SUCCESS if the configuration was successful.
  • XST_FAILURE otherwise.
Note
None.

References XVphy_Ch2Ids(), XVPHY_LOG_EVT_GT_RECONFIG, and XVphy_LogWrite().

Referenced by XVphy_ClkInitialize(), XVphy_HdmiRxTimerTimeoutHandler(), and XVphy_HdmiTxTimerTimeoutHandler().

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.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
ChIdis the channel ID to operate on.
QpllRefClkSelis the QPLL reference clock selection for the quad.
CpllRefClkSelis the CPLL reference clock selection for the quad.
TxPllSelectis the reference clock selection for the quad's TX PLL dividers.
RxPllSelectis the reference clock selection for the quad's RX PLL dividers.
Returns
  • XST_SUCCESS.
Note
None.

References XVphy_CfgPllRefClkSel(), XVphy_CfgSysClkDataSel(), XVphy_CfgSysClkOutSel(), and XVphy_WriteCfgRefClkSelReg().

Referenced by XVphy_DpInitialize().

u32 XVphy_PowerDownGtPll ( XVphy InstancePtr,
u8  QuadId,
XVphy_ChannelId  ChId,
u8  Hold 
)

This function will power down the specified GT PLL.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
ChIdis the channel ID to power down the PLL for.
Diris an indicator for TX or RX.
Holdis an indicator whether to "hold" the power down if set to 1. If set to 0: power down, then power back up.
Returns
  • XST_SUCCESS.
Note
None.

References XVphy_Config::BaseAddr, XVphy::Config, XVphy_Ch2Ids(), XVphy_ReadReg, and XVphy_WriteReg.

Referenced by XVphy_HdmiInitialize(), XVphy_HdmiRxClkDetFreqChangeHandler(), XVphy_HdmiRxTimerTimeoutHandler(), XVphy_HdmiTxClkDetFreqChangeHandler(), and XVphy_HdmiTxTimerTimeoutHandler().

u32 XVphy_ResetGt ( XVphy InstancePtr,
u8  QuadId,
XVphy_DirectionType  Dir 
)

This function will reset the specified GT quad.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
Diris an indicator for TX or RX.
Returns
  • XST_SUCCESS if a valid PLL was specified.
  • XST_FAILURE otherwise.
Note
None.

References XVphy_GetSysClkDataSel(), XVphy_GetSysClkOutSel(), and XVphy_ResetGtPll().

u32 XVphy_ResetGtPll ( XVphy InstancePtr,
u8  QuadId,
XVphy_ChannelId  ChId,
XVphy_DirectionType  Dir,
u8  Hold 
)

This function will reset the GT's PLL logic.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
ChIdis the channel ID which to operate on.
Diris an indicator for TX or RX.
Holdis an indicator whether to "hold" the reset if set to 1. If set to 0: reset, then enable.
Returns
  • XST_SUCCESS.
Note
None.

References XVphy_Config::BaseAddr, XVphy::Config, XVphy_ReadReg, and XVphy_WriteReg.

Referenced by XVphy_HdmiInitialize(), XVphy_HdmiRxClkDetFreqChangeHandler(), XVphy_HdmiRxTimerTimeoutHandler(), XVphy_HdmiTxClkDetFreqChangeHandler(), XVphy_HdmiTxTimerTimeoutHandler(), XVphy_HdmiUpdateClockSelection(), and XVphy_ResetGt().

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.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
ChIdis the channel ID which to operate on.
Diris an indicator for TX or RX.
Holdis an indicator whether to "hold" the reset if set to 1. If set to 0: reset, then enable.
Returns
  • XST_SUCCESS.
Note
None.

References XVphy_Config::BaseAddr, XVphy::Config, XVphy_ReadReg, and XVphy_WriteReg.

Referenced by XVphy_HdmiCpllLockHandler(), XVphy_HdmiGtRxResetDoneLockHandler(), XVphy_HdmiInitialize(), XVphy_HdmiQpllLockHandler(), XVphy_HdmiRxClkDetFreqChangeHandler(), XVphy_HdmiRxTimerTimeoutHandler(), XVphy_HdmiTxClkDetFreqChangeHandler(), and XVphy_HdmiTxTimerTimeoutHandler().

u32 XVphy_SelfTest ( XVphy InstancePtr)

This function runs a self-test on the XVphy driver/device.

The sanity test checks whether or not all tested registers hold their default reset values.

Parameters
InstancePtris a pointer to the XVphy instance.
Returns
  • XST_SUCCESS if the self-test passed - all tested registers hold their default reset values.
  • XST_FAILURE otherwise.
Note
None.

References XVphy_Config::BaseAddr, XVphy::Config, and XVphy_ReadReg.

void XVphy_Set8b10b ( XVphy InstancePtr,
u8  QuadId,
XVphy_ChannelId  ChId,
XVphy_DirectionType  Dir,
u8  Enable 
)

This function will set 8b10b encoding for the specified GT PLL.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
ChIdis the channel ID to operate on.
Diris an indicator for TX or RX.
Enableis an indicator to enable/disable 8b10b encoding.
Returns
  • XST_SUCCESS.
Note
None.

References XVphy_Config::BaseAddr, XVphy::Config, XVphy_ReadReg, and XVphy_WriteReg.

Referenced by XVphy_DpInitialize().

void XVphy_SetBufgGtDiv ( XVphy InstancePtr,
XVphy_DirectionType  Dir,
u8  Div 
)

This function obtains the divider value of the BUFG_GT peripheral.

Parameters
InstancePtris a pointer to the XVphy core instance.
Diris an indicator for TX or RX
Div3-bit divider value
Returns
None.

References XVphy_Config::BaseAddr, XVphy::Config, XVphy_ReadReg, and XVphy_WriteReg.

Referenced by XVphy_HdmiInitialize(), and XVphy_HdmiTxTimerTimeoutHandler().

void XVphy_SetHdmiCallback ( XVphy InstancePtr,
XVphy_HdmiHandlerType  HandlerType,
void *  CallbackFunc,
void *  CallbackRef 
)

This function installs an HDMI callback function for the specified handler type.

Parameters
InstancePtris a pointer to the XVPhy instance.
HandlerTypeis the interrupt handler type which specifies which interrupt event to attach the callback for.
CallbackFuncis the address to the callback function.
CallbackRefis the user data item that will be passed to the callback function when it is invoked.
Returns
None.
Note
None.

References XVphy::HdmiRxInitCallback, XVphy::HdmiRxInitRef, XVphy::HdmiRxReadyCallback, XVphy::HdmiRxReadyRef, XVphy::HdmiTxInitCallback, XVphy::HdmiTxInitRef, XVphy::HdmiTxReadyCallback, XVphy::HdmiTxReadyRef, XVPHY_HDMI_HANDLER_RXINIT, XVPHY_HDMI_HANDLER_RXREADY, XVPHY_HDMI_HANDLER_TXINIT, and XVPHY_HDMI_HANDLER_TXREADY.

u32 XVphy_SetHdmiRxParam ( XVphy InstancePtr,
u8  QuadId,
XVphy_ChannelId  ChId 
)

This function update/set the HDMI RX parameter.

Parameters
InstancePtris a pointer to the Vphy core instance.
QuadIdis the GT quad ID to operate on.
ChIdis the channel ID to operate on.
Returns
  • XST_SUCCESS if RX parameters set/updated.
  • XST_FAILURE if low resolution video not supported.
Note
None.

References XVphy::HdmiRxDruIsEnabled, XVphy::Quads, XVphy_Ch2Ids(), XVphy_DruCalcCenterFreqHz(), XVphy_DruSetCenterFreqHz(), XVphy_HdmiCpllParam(), XVphy_HdmiQpllParam(), XVphy_IsBonded(), and XVphy_WriteCfgRefClkSelReg().

Referenced by XVphy_HdmiRxTimerTimeoutHandler().

u32 XVphy_SetHdmiTxParam ( XVphy InstancePtr,
u8  QuadId,
XVphy_ChannelId  ChId,
XVidC_PixelsPerClock  Ppc,
XVidC_ColorDepth  Bpc,
XVidC_ColorFormat  ColorFormat 
)

This function update/set the HDMI TX parameter.

Parameters
InstancePtris a pointer to the Vphy core instance.
QuadIdis the GT quad ID to operate on.
ChIdis the channel ID to operate on.
Ppcis the pixels per clock to set.
Bpcis the bits per color to set.
ColorFormatis the color format to set.
Returns
  • XST_SUCCESS if TX parameters set/updated.
  • XST_FAILURE if low resolution video not supported.
Note
None.

References XVphy::Config, XVphy::HdmiRxRefClkHz, XVphy::HdmiTxRefClkHz, XVphy::HdmiTxSampleRate, XVphy_Channel::LineRateHz, XVphy_Config::Ppc, XVphy::Quads, XVphy_HdmiCfgCalcMmcmParam(), XVphy_HdmiCpllParam(), XVphy_HdmiQpllParam(), XVphy_IsBonded(), and XVphy_WriteCfgRefClkSelReg().

void XVphy_SetIntrHandler ( XVphy InstancePtr,
XVphy_IntrHandlerType  HandlerType,
XVphy_IntrHandler  CallbackFunc,
void *  CallbackRef 
)

This function installs a callback function for the specified handler type.

Parameters
InstancePtris a pointer to the XVPhy instance.
HandlerTypeis the interrupt handler type which specifies which interrupt event to attach the callback for.
CallbackFuncis the address to the callback function.
CallbackRefis the user data item that will be passed to the callback function when it is invoked.
Returns
None.
Note
None.

References XVphy::IntrCpllLockCallbackRef, XVphy::IntrCpllLockHandler, XVphy::IntrQpll1LockCallbackRef, XVphy::IntrQpll1LockHandler, XVphy::IntrQpllLockCallbackRef, XVphy::IntrQpllLockHandler, XVphy::IntrRxClkDetFreqChangeCallbackRef, XVphy::IntrRxClkDetFreqChangeHandler, XVphy::IntrRxResetDoneCallbackRef, XVphy::IntrRxResetDoneHandler, XVphy::IntrRxTmrTimeoutCallbackRef, XVphy::IntrRxTmrTimeoutHandler, XVphy::IntrTxAlignDoneCallbackRef, XVphy::IntrTxAlignDoneHandler, XVphy::IntrTxClkDetFreqChangeCallbackRef, XVphy::IntrTxClkDetFreqChangeHandler, XVphy::IntrTxResetDoneCallbackRef, XVphy::IntrTxResetDoneHandler, XVphy::IntrTxTmrTimeoutCallbackRef, and XVphy::IntrTxTmrTimeoutHandler.

Referenced by XVphy_HdmiIntrHandlerCallbackInit().

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.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
ChIdis the channel ID to operate on.
Diris an indicator for TX or RX.
Enablewill enable (if 1) or disable (if 0) the LPM logic.
Returns
None.
Note
None.

References XVphy_Config::BaseAddr, XVphy::Config, XVphy_ReadReg, and XVphy_WriteReg.

Referenced by XVphy_DpInitialize(), and XVphy_HdmiInitialize().

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.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
ChIdis the channel ID to operate on.
Peis the pre-emphasis value to write.
Returns
None.
Note
None.

References XVphy_Config::BaseAddr, XVphy::Config, XVphy_ReadReg, and XVphy_WriteReg.

Referenced by XVphy_DpInitialize(), and XVphy_HdmiInitialize().

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.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
ChIdis the channel ID to operate on.
Vsis the voltage swing value to write.
Returns
None.
Note
None.

References XVphy_Config::BaseAddr, XVphy::Config, XVphy_ReadReg, and XVphy_WriteReg.

Referenced by XVphy_DpInitialize(), and XVphy_HdmiInitialize().

u32 XVphy_WaitForPllLock ( XVphy InstancePtr,
u8  QuadId,
XVphy_ChannelId  ChId 
)

This function will wait for a PLL lock on the specified channel(s) or time out.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
ChIdis the channel ID which to operate on.
Returns
  • XST_SUCCESS if the PLL(s) have locked.
  • XST_FAILURE otherwise; waiting for the lock timed out.
Note
None.

References XVphy_IsPllLocked(), and XVphy_WaitUs().

u32 XVphy_WaitForPmaResetDone ( XVphy InstancePtr,
u8  QuadId,
XVphy_ChannelId  ChId,
XVphy_DirectionType  Dir 
)

This function will wait for a PMA reset done on the specified channel(s) or time out.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
ChIdis the channel ID which to operate on.
Diris an indicator for TX or RX.
Returns
  • XST_SUCCESS if the PMA reset has finalized.
  • XST_FAILURE otherwise; waiting for the reset done timed out.
Note
None.

References XVphy_Config::BaseAddr, XVphy::Config, XVphy_ReadReg, and XVphy_WaitUs().

u32 XVphy_WaitForResetDone ( XVphy InstancePtr,
u8  QuadId,
XVphy_ChannelId  ChId,
XVphy_DirectionType  Dir 
)

This function will wait for a reset done on the specified channel(s) or time out.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
ChIdis the channel ID which to operate on.
Diris an indicator for TX or RX.
Returns
  • XST_SUCCESS if the reset has finalized.
  • XST_FAILURE otherwise; waiting for the reset done timed out.
Note
None.

References XVphy_Config::BaseAddr, XVphy::Config, XVphy_ReadReg, and XVphy_WaitUs().

void XVphy_WaitUs ( XVphy InstancePtr,
u32  MicroSeconds 
)

This function is the delay/sleep function for the XVphy driver.

For the Zynq family, there exists native sleep functionality. For MicroBlaze however, there does not exist such functionality. In the MicroBlaze case, the default method for delaying is to use a predetermined amount of loop iterations. This method is prone to inaccuracy and dependent on system configuration; for greater accuracy, the user may supply their own delay/sleep handler, pointed to by InstancePtr->UserTimerWaitUs, which may have better accuracy if a hardware timer is used.

Parameters
InstancePtris a pointer to the XVphy instance.
MicroSecondsis the number of microseconds to delay/sleep for.
Returns
None.
Note
None.

References XVphy::IsReady, and XVphy::UserTimerWaitUs.

Referenced by XVphy_MmcmStart(), XVphy_WaitForPllLock(), XVphy_WaitForPmaResetDone(), and XVphy_WaitForResetDone().

u32 XVphy_WriteCfgRefClkSelReg ( XVphy InstancePtr,
u8  QuadId 
)

This function writes the current software configuration for the reference clock selections to hardware for the specified quad on all channels.

Parameters
InstancePtris a pointer to the XVphy core instance.
QuadIdis the GT quad ID to operate on.
Returns
  • XST_SUCCESS.
Note
None.

References XVphy_Config::BaseAddr, XVphy::Config, XVphy_Channel::CpllRefClkSel, XVphy::Quads, XVphy_Channel::RxDataRefClkSel, XVphy_Channel::RxOutRefClkSel, XVphy_Channel::TxDataRefClkSel, XVphy_Channel::TxOutRefClkSel, XVphy_Config::XcvrType, and XVphy_WriteReg.

Referenced by XVphy_HdmiRxTimerTimeoutHandler(), XVphy_HdmiTxTimerTimeoutHandler(), XVphy_PllInitialize(), XVphy_SetHdmiRxParam(), and XVphy_SetHdmiTxParam().