![]() |
vphy
Xilinx SDK Drivers API Documentation
|
This driver supports the Xilinx Video PHY IP core. Version 1.0 supports:
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_Config * | XVphy_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 void(* XVphy_Callback) (void *CallbackRef) |
Generic callback type.
CallbackRef | is a pointer to the callback reference. |
typedef void(* XVphy_IntrHandler) (void *InstancePtr) |
Callback type which represents the handler for interrupts.
InstancePtr | is a pointer to the XVphy instance. |
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.
InstancePtr | is a pointer to the XVphy instance. |
MicroSeconds | is the number of microseconds to be passed to the timer function. |
enum XVphy_ChannelId |
This typedef enumerates the available channels.
enum XVphy_GtState |
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.
enum XVphy_LogEvent |
enum XVphy_OutClkSelType |
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.
enum XVphy_PllType |
This typedef enumerates the different PLL types for a given GT channel.
enum XVphy_ProtocolType |
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.
void XVphy_BufgGtReset | ( | XVphy * | InstancePtr, |
XVphy_DirectionType | Dir, | ||
u8 | Reset | ||
) |
This function resets the BUFG_GT peripheral.
InstancePtr | is a pointer to the XVphy core instance. |
Dir | is an indicator for TX or RX |
Reset | specifies TRUE/FALSE value to either assert or deassert reset on the BUFG_GT, respectively. |
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.
InstancePtr | is a pointer to the XVphy 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 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.
InstancePtr | is a pointer to the XVphy core instance. |
QuadId | is the GT quad ID to operate on. |
ChId | is the channel ID to operate on. |
LineRate | is the line rate to configure software. |
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.
InstancePtr | is a pointer to the XVphy core instance. |
QuadId | is the GT quad ID to operate on. |
ChId | is the channel ID to operate on. |
SysClkDataSel | is the reference clock selection to configure. |
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.
InstancePtr | is a pointer to the XVphy core instance. |
QuadId | is the GT quad ID to operate on. |
RefClkType | is the reference clock type to operate on. |
FreqHz | is the reference clock frequency to configure software. |
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.
InstancePtr | is a pointer to the XVphy core instance. |
QuadId | is the GT quad ID to operate on. |
Dir | is an indicator for TX or RX. |
SysClkDataSel | is the reference clock selection to configure. |
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.
InstancePtr | is a pointer to the XVphy core instance. |
QuadId | is the GT quad ID to operate on. |
Dir | is an indicator for TX or RX. |
SysClkOutSel | is the reference clock selection to configure. |
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.
InstancePtr | is a pointer to the XVphy core instance. |
QuadId | is the GT quad ID to calculate the PLL values for. |
ChId | is the channel ID to calculate the PLL values for. |
Dir | is an indicator for TX or RX. |
PllClkInFreqHz | is 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. |
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.
InstancePtr | is a pointer to the XVphy core instance. |
QuadId | is the GT quad ID to operate on. |
Dir | is an indicator for RX or TX. |
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.
InstancePtr | is a pointer to the XVphy core instance. |
Dir | is an indicator for RX or TX. |
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.
InstancePtr | is a pointer to the XVphy core instance. |
QuadId | is the GT quad ID to operate on. |
ChId | is the channel ID to operate on. |
Dir | is an indicator for TX or RX. |
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.
InstancePtr | is a pointer to the XVphy core instance. |
Dir | is an indicator for TX or RX. |
Enable | specifies TRUE/FALSE value to either enable or disable the OBUFTDS, respectively. |
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.
InstancePtr | is a pointer to the XVphy core instance. |
QuadId | is the GT quad ID to operate on. |
ChId | is the channel ID for which to write the settings for. |
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.
InstancePtr | is a pointer to the XVphy core instance. |
QuadId | is the GT quad ID to operate on. |
ChId | is the channel ID for which to write the settings for. |
Dir | is an indicator for RX or TX. |
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.
InstancePtr | is a pointer to the Vphy core instance. |
QuadId | is the GT quad ID to operate on. |
ChId | is the channel ID to operate on. |
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.
InstancePtr | is a pointer to the XVphy instance. |
CfgPtr | is a pointer to the configuration structure that will be used to copy the settings from. |
QuadId | is the GT quad ID to operate on. |
CpllRefClkSel | is the CPLL reference clock selection for the quad. |
QpllRefClkSel | is the QPLL reference clock selection for the quad. |
TxPllSelect | is the reference clock selection for the quad's TX PLL dividers. |
RxPllSelect | is the reference clock selection for the quad's RX PLL dividers. |
LinkRate | is the line rate to set for the quad's channels. |
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.
InstancePtr | is a pointer to the XVphy core instance. |
QuadId | is the GT quad ID to operate on. |
ChId | is the channel ID on which to direct the DRP access. |
Dir | is an indicator for write (TX) or read (RX). |
Addr | is the DRP address to issue the DRP access to. |
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.
InstancePtr | is a pointer to the XVphy core instance. |
QuadId | is the GT quad ID to operate on. |
ChId | is the channel ID on which to direct the DRP access. |
Dir | is an indicator for write (TX) or read (RX). |
Addr | is the DRP address to issue the DRP access to. |
Val | is the value to write to the DRP address. |
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.
InstancePtr | is a pointer to the XVphy core instance. |
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.
InstancePtr | is a pointer to the XVphy core instance. |
QuadId | is the GT quad ID to operate on. |
ChId | is the channel ID which to operate on. |
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.
InstancePtr | is a pointer to the XVphy core instance. |
QuadId | is the GT quad ID to operate on. |
Dir | is an indicator for TX or RX. |
ChId | is the channel ID which to operate on. |
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.
InstancePtr | is a pointer to the XVphy core instance. |
QuadId | is the GT quad ID to operate on. |
RefClkType | is the type to obtain the clock selection for. |
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.
InstancePtr | is a pointer to the XVphy core instance. |
QuadId | is the GT quad ID to operate on. |
Dir | is an indicator for TX or RX. |
ChId | is the channel ID which to operate on. |
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.
InstancePtr | is a pointer to the XVphy core instance. |
QuadId | is the GT quad ID to operate on. |
Dir | is an indicator for TX or RX. |
ChId | is the channel ID which to operate on. |
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.
InstancePtr | is a pointer to the XVphy core instance. |
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.
InstancePtr | is a pointer to the XVphy core instance. |
QuadId | is the GT quad ID to operate on. |
ChId | is the channel ID which to operate on. |
Dir | is an indicator for TX or RX. |
Hold | is an indicator whether to "hold" the reset if set to 1. If set to 0: reset, then enable. |
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.
InstancePtr | is a pointer to the Vphy core instance. |
QuadId | is the GT quad ID to operate on. |
ChId | is the channel ID to operate on. |
Dir | is an indicator for RX or TX. |
Ppc | specifies the total number of pixels per clock.
|
Bpc | specifies the color depth/bits per color component.
|
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.
InstancePtr | is a pointer to the Vphy core instance. |
QuadId | is the GT quad ID to operate on. |
ChId | is the channel ID to operate on. |
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 | ||
) |
This function initializes the Video PHY for HDMI.
InstancePtr | is a pointer to the XVphy instance. |
CfgPtr | is a pointer to the configuration structure that will be used to copy the settings from. |
SystemFrequency | is the system frequency for the HDMI logic to be based on. |
References XVphy_Config::BaseAddr, XVphy::Config, XVphy_Config::DruIsPresent, XVphy::IsReady, XVphy::Quads, XVphy_Channel::RxState, XVphy_Channel::TxState, XVphy_Config::XcvrType, XVphy_CfgInitialize(), XVphy_Ch2Ids(), XVphy_ClkDetEnable(), XVphy_ClkDetSetFreqLockThreshold(), XVphy_ClkDetSetFreqTimeout(), XVphy_DruEnable(), XVphy_DruReset(), XVphy_DruSetGain(), XVPHY_GT_STATE_IDLE, XVphy_HdmiIntrHandlerCallbackInit(), XVphy_IBufDsEnable(), XVphy_IntrDisable(), XVphy_IntrEnable(), XVPHY_LOG_EVT_INIT, XVphy_LogReset(), XVphy_LogWrite(), XVphy_MmcmLockedMaskEnable(), XVphy_MmcmPowerDown(), XVphy_MmcmReset(), XVphy_PowerDownGtPll(), XVphy_ResetGtPll(), XVphy_ResetGtTxRx(), XVphy_SetBufgGtDiv(), XVphy_SetRxLpm(), XVphy_SetTxPreEmphasis(), XVphy_SetTxVoltageSwing(), and XVphy_WriteReg.
void XVphy_HdmiUpdateClockSelection | ( | XVphy * | InstancePtr, |
u8 | QuadId, | ||
XVphy_SysClkDataSelType | TxSysPllClkSel, | ||
XVphy_SysClkDataSelType | RxSysPllClkSel | ||
) |
This function Updates the VPHY clocking.
InstancePtr | is a pointer to the XVphy core instance. |
QuadId | is the GT quad ID to operate on. |
TxSysPllClkSel | is the SYSCLKDATA selection for TX. |
RxSysPllClkSel | is the SYSCLKDATA selection for RX. |
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.
InstancePtr | is a pointer to the XVphy core instance. |
Dir | is an indicator for TX or RX. |
Enable | specifies TRUE/FALSE value to either enable or disable the IBUFDS, respectively. |
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 | ) |
This function is the interrupt handler for the XVphy driver.
It will detect what kind of interrupt has happened, and will invoke the appropriate callback function.
InstancePtr | is a pointer to the XVphy instance. |
References XVphy_Config::BaseAddr, XVphy::Config, 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, XVphy::IntrTxTmrTimeoutHandler, XVphy::IsReady, and XVphy_ReadReg.
void XVphy_IntrDisable | ( | XVphy * | InstancePtr, |
XVphy_IntrHandlerType | Intr | ||
) |
This function disabled interrupts associated with the specified interrupt type.
InstancePtr | is a pointer to the XVphy instance. |
Intr | is the interrupt type/mask to disable. |
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.
InstancePtr | is a pointer to the XVphy instance. |
Intr | is the interrupt type/mask to enable. |
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.
InstancePtr | is a pointer to the XVphy core instance. |
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.
InstancePtr | is a pointer to the XVphy core instance. |
QuadId | is the GT quad ID to operate on. |
ChId | is the channel ID which to operate on. |
References XVphy_Config::BaseAddr, XVphy::Config, and XVphy_ReadReg.
Referenced by XVphy_HdmiCpllLockHandler(), XVphy_HdmiQpllLockHandler(), and XVphy_WaitForPllLock().
void XVphy_LogDisplay | ( | XVphy * | InstancePtr | ) |
This function will print the entire log.
InstancePtr | is a pointer to the XVphy core instance. |
References XVPHY_LOG_EVT_CPLL_EN, XVPHY_LOG_EVT_CPLL_LOCK, XVPHY_LOG_EVT_CPLL_RECONFIG, XVPHY_LOG_EVT_CPLL_RST, XVPHY_LOG_EVT_GT_RECONFIG, XVPHY_LOG_EVT_GTRX_RST, XVPHY_LOG_EVT_GTTX_RST, XVPHY_LOG_EVT_INIT, XVPHY_LOG_EVT_NONE, XVPHY_LOG_EVT_QPLL_EN, XVPHY_LOG_EVT_QPLL_LOCK, XVPHY_LOG_EVT_QPLL_RECONFIG, XVPHY_LOG_EVT_QPLL_RST, XVPHY_LOG_EVT_RX_FREQ, XVPHY_LOG_EVT_RX_RST_DONE, XVPHY_LOG_EVT_RX_TMR, XVPHY_LOG_EVT_RXPLL_EN, XVPHY_LOG_EVT_RXPLL_LOCK, XVPHY_LOG_EVT_RXPLL_RECONFIG, XVPHY_LOG_EVT_RXPLL_RST, XVPHY_LOG_EVT_TX_ALIGN, XVPHY_LOG_EVT_TX_FREQ, XVPHY_LOG_EVT_TX_RST_DONE, XVPHY_LOG_EVT_TX_TMR, XVPHY_LOG_EVT_TXPLL_EN, XVPHY_LOG_EVT_TXPLL_LOCK, XVPHY_LOG_EVT_TXPLL_RECONFIG, XVPHY_LOG_EVT_TXPLL_RST, XVPHY_LOG_EVT_VID_RX_RST, XVPHY_LOG_EVT_VID_TX_RST, and XVphy_LogRead().
u16 XVphy_LogRead | ( | XVphy * | InstancePtr | ) |
This function will read the last event from the log.
InstancePtr | is a pointer to the XVphy core instance. |
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.
InstancePtr | is a pointer to the XVphy core instance. |
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 | ||
) |
This function will insert an event in the driver's logginc mechanism.
InstancePtr | is a pointer to the XVphy core instance. |
Evt | is the event type to log. |
Data | is the associated data for the event. |
References XVphy_Log::DataBuffer, XVphy_Log::HeadIndex, XVphy::Log, XVphy_Log::TailIndex, and XVPHY_LOG_EVT_RX_FREQ.
Referenced by XVphy_DirReconfig(), XVphy_DpInitialize(), XVphy_HdmiCpllLockHandler(), XVphy_HdmiGtRxResetDoneLockHandler(), XVphy_HdmiGtTxAlignDoneLockHandler(), XVphy_HdmiGtTxResetDoneLockHandler(), XVphy_HdmiInitialize(), XVphy_HdmiQpllLockHandler(), XVphy_HdmiRxClkDetFreqChangeHandler(), XVphy_HdmiRxTimerTimeoutHandler(), XVphy_HdmiTxClkDetFreqChangeHandler(), XVphy_HdmiTxTimerTimeoutHandler(), and XVphy_OutDivReconfig().
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.
DeviceId | is the unique device ID of the device being looked up. |
void XVphy_MmcmLockedMaskEnable | ( | XVphy * | InstancePtr, |
u8 | QuadId, | ||
XVphy_DirectionType | Dir, | ||
u8 | Enable | ||
) |
This function will reset the mixed-mode clock manager (MMCM) core.
InstancePtr | is a pointer to the XVphy core instance. |
QuadId | is the GT quad ID to operate on. |
Dir | is an indicator for TX or RX. |
Enable | is an indicator whether to "Enable" the locked mask if set to 1. If set to 0: reset, then disable. |
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.
InstancePtr | is a pointer to the XVphy core instance. |
QuadId | is the GT quad ID to operate on. |
Dir | is an indicator for TX or RX. |
Hold | is an indicator whether to "hold" the power down if set to 1. If set to 0: power down, then power back up. |
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.
InstancePtr | is a pointer to the XVphy core instance. |
QuadId | is the GT quad ID to operate on. |
Dir | is an indicator for TX or RX. |
Hold | is an indicator whether to "hold" the reset if set to 1. If set to 0: reset, then enable. |
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.
InstancePtr | is a pointer to the XVphy core instance. |
QuadId | is the GT quad ID to operate on. |
Dir | is an indicator for TX or RX. |
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.
InstancePtr | is a pointer to the XVphy core instance. |
QuadId | is the GT quad ID to operate on. |
ChId | is the channel ID for which to write the settings for. |
Dir | is an indicator for RX or TX. |
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.
InstancePtr | is a pointer to the XVphy core instance. |
QuadId | is the GT quad ID to operate on. |
ChId | is the channel ID to operate on. |
QpllRefClkSel | is the QPLL reference clock selection for the quad. |
CpllRefClkSel | is the CPLL reference clock selection for the quad. |
TxPllSelect | is the reference clock selection for the quad's TX PLL dividers. |
RxPllSelect | is the reference clock selection for the quad's RX PLL dividers. |
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.
InstancePtr | is a pointer to the XVphy core instance. |
QuadId | is the GT quad ID to operate on. |
ChId | is the channel ID to power down the PLL for. |
Dir | is an indicator for TX or RX. |
Hold | is an indicator whether to "hold" the power down if set to 1. If set to 0: power down, then power back up. |
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.
InstancePtr | is a pointer to the XVphy core instance. |
QuadId | is the GT quad ID to operate on. |
Dir | is an indicator for TX or RX. |
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.
InstancePtr | is a pointer to the XVphy core instance. |
QuadId | is the GT quad ID to operate on. |
ChId | is the channel ID which to operate on. |
Dir | is an indicator for TX or RX. |
Hold | is an indicator whether to "hold" the reset if set to 1. If set to 0: reset, then enable. |
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.
InstancePtr | is a pointer to the XVphy core instance. |
QuadId | is the GT quad ID to operate on. |
ChId | is the channel ID which to operate on. |
Dir | is an indicator for TX or RX. |
Hold | is an indicator whether to "hold" the reset if set to 1. If set to 0: reset, then enable. |
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.
InstancePtr | is a pointer to the XVphy instance. |
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.
InstancePtr | is a pointer to the XVphy core instance. |
QuadId | is the GT quad ID to operate on. |
ChId | is the channel ID to operate on. |
Dir | is an indicator for TX or RX. |
Enable | is an indicator to enable/disable 8b10b encoding. |
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.
InstancePtr | is a pointer to the XVphy core instance. |
Dir | is an indicator for TX or RX |
Div | 3-bit divider value |
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.
InstancePtr | is a pointer to the XVPhy instance. |
HandlerType | is the interrupt handler type which specifies which interrupt event to attach the callback for. |
CallbackFunc | is the address to the callback function. |
CallbackRef | is the user data item that will be passed to the callback function when it is invoked. |
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.
InstancePtr | is a pointer to the Vphy core instance. |
QuadId | is the GT quad ID to operate on. |
ChId | is the channel ID to operate on. |
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.
InstancePtr | is a pointer to the Vphy core instance. |
QuadId | is the GT quad ID to operate on. |
ChId | is the channel ID to operate on. |
Ppc | is the pixels per clock to set. |
Bpc | is the bits per color to set. |
ColorFormat | is the color format to set. |
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.
InstancePtr | is a pointer to the XVPhy instance. |
HandlerType | is the interrupt handler type which specifies which interrupt event to attach the callback for. |
CallbackFunc | is the address to the callback function. |
CallbackRef | is the user data item that will be passed to the callback function when it is invoked. |
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.
InstancePtr | is a pointer to the XVphy core instance. |
QuadId | is the GT quad ID to operate on. |
ChId | is the channel ID to operate on. |
Dir | is an indicator for TX or RX. |
Enable | will enable (if 1) or disable (if 0) the LPM logic. |
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.
InstancePtr | is a pointer to the XVphy core instance. |
QuadId | is the GT quad ID to operate on. |
ChId | is the channel ID to operate on. |
Pe | is the pre-emphasis value to write. |
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.
InstancePtr | is a pointer to the XVphy core instance. |
QuadId | is the GT quad ID to operate on. |
ChId | is the channel ID to operate on. |
Vs | is the voltage swing value to write. |
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.
InstancePtr | is a pointer to the XVphy core instance. |
QuadId | is the GT quad ID to operate on. |
ChId | is the channel ID which to operate on. |
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.
InstancePtr | is a pointer to the XVphy core instance. |
QuadId | is the GT quad ID to operate on. |
ChId | is the channel ID which to operate on. |
Dir | is an indicator for TX or RX. |
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.
InstancePtr | is a pointer to the XVphy core instance. |
QuadId | is the GT quad ID to operate on. |
ChId | is the channel ID which to operate on. |
Dir | is an indicator for TX or RX. |
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.
InstancePtr | is a pointer to the XVphy instance. |
MicroSeconds | is the number of microseconds to delay/sleep for. |
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.
InstancePtr | is a pointer to the XVphy core instance. |
QuadId | is the GT quad ID to operate on. |
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().