![]() |
vphy
Vitis Drivers API Documentation
|
Contains a minimal set of functions for the XVphy driver that allow access to all of the Video PHY core's functionality.
See xvphy.h for a detailed description of the driver.
MODIFICATION HISTORY:
Ver Who Date Changes
1.0 als, 10/19/15 Initial release. gm 1.1 gm 02/01/16 Added GTPE2 and GTHE4 support Added more events to XVphy_LogEvent definitions. Added TxBufferBypass in XVphy_Config structure. Added XVphy_SetDefaultPpc and XVphy_SetPpc functions. als Added XVphy_GetLineRateHz function. gm 20/04/16 Added XVphy_GetRcfgChId function 1.2 gm Added HdmiFastSwitch in XVphy_Config Fixed bug in XVphy_IsPllLocked function Changed EffectiveAddr datatype in XVphy_CfgInitialize to UINTPTR Used usleep API instead of MB_Sleep API Fixed Null pointer dereference in XVphy_IBufDsEnable Suppressed warning messages due to unused arguments 1.4 gm 29/11/16 Moved internally used APIs to xvphy_i.c/h Added preprocessor directives for sw footprint reduction Fixed c++ compiler warnings 1.6 gm 12/06/17 Changed FAILURE return value of XVphy_DrpRead to 0xDEAD Added XVphy_DrpRd, XVphy_SetErrorCallback, XVphy_SetPllLayoutErrorCallback and XVphy_RegisterDebug APIs Added filter in XVphy_MmcmStart to prevent MMCM from starting when divider values are invalid 1.7 gm 13/09/17 Added GTYE4 support Updated XVphy_MmcmStart to be able to support a system with active HDMI and DP Added xvphy_mmcme2/3/4.c drivers to move MMCM configuration from RTL to SW Moved XVphy_MmcmWriteParameters to xvphy_mmcme2/3/4.c Added XVphy_SetPolarity, XVphy_SetPrbsSel and XVphy_TxPrbsForceError APIs 1.8 gm 05/14/18 Removed XVphy_DrpWrite and XVphy_DrpRead APIs 23/07/18 Added APIs XVphy_SetTxVoltageSwing and XVphy_SetTxPreEmphasis from xvphy_i.c/h Added XVphy_SetTxPostCursor API 1.9 gm 14/05/18 Added XVphy_SetRxLpm from xvphy_i.c/.h 1.10 ssh 16/08/22 Added support for multi gt (GTHE4 and GTYE4) 1.11 ssh 04/02/24 Added support for DP2.1 1.12 ssh 30/01/26 Updated QPLL0 and QPLL1 DRP values for DP2.1
See xvphy.h for a detailed description of the driver.
MODIFICATION HISTORY:
Ver Who Date Changes
1.0 als 10/19/15 Initial release. 1.1 gm 02/01/16 Additional events for event log printout 1.2 gm Added log events for debugging 1.4 gm 11/24/16 Made debug log optional (can be disabled via makefile) Added XVPHY_LOG_EVT_TX_ALIGN_TMOUT log event 1.6 gm 06/08/17 Added XVPHY_LOG_EVT_HDMI20_ERR log event Added Red & Yellow printing for errors and warnings Added XVPHY_LOG_EVT_NO_QPLL_ERR log event Changed xil_printf new lines to carriage return Added XVPHY_LOG_EVT_DRU_CLK_ERR log event 1.7 gm 13/09/17 Added XVPHY_LOG_EVT_USRCLK_ERR event
#include "xparameters.h"#include "xstatus.h"#include "xvphy.h"#include "xvphy_i.h"#include "xvphy_hdmi.h"#include "sleep.h"#include "xvphy_gt.h"Functions | |
| void | XVphy_CfgInitialize (XVphy *InstancePtr, XVphy_Config *ConfigPtr, UINTPTR EffectiveAddr) |
| This function retrieves the configuration for this Video PHY instance and fills in the InstancePtr->Config structure. More... | |
| u32 | XVphy_PllInitialize (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, XVphy_PllRefClkSelType QpllRefClkSel, XVphy_PllRefClkSelType CpllRefClkSel, XVphy_PllType TxPllSelect, XVphy_PllType RxPllSelect) |
| This function will initialize the PLL selection for a given channel. More... | |
| void | XVphy_WaitUs (XVphy *InstancePtr, u32 MicroSeconds) |
| This function is the delay/sleep function for the XVphy driver. More... | |
| u32 | XVphy_GetVersion (XVphy *InstancePtr) |
| This function will obtian the IP version. More... | |
| u32 | XVphy_CfgLineRate (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, u64 LineRateHz) |
| Configure the channel's line rate. More... | |
| XVphy_PllType | XVphy_GetPllType (XVphy *InstancePtr, u8 QuadId, XVphy_DirectionType Dir, XVphy_ChannelId ChId) |
| Obtain the channel's PLL reference clock selection. More... | |
| u64 | XVphy_GetLineRateHz (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId) |
| This function will return the line rate in Hz for a given channel / quad. More... | |
| u32 | XVphy_ResetGtPll (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, XVphy_DirectionType Dir, u8 Hold) |
| This function will reset the GT's PLL logic. More... | |
| u32 | XVphy_ResetGtTxRx (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, XVphy_DirectionType Dir, u8 Hold) |
| This function will reset the GT's TX/RX logic. More... | |
| u32 | XVphy_SetPolarity (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, XVphy_DirectionType Dir, u8 Polarity) |
| This function will set/clear the TX/RX polarity bit. More... | |
| u32 | XVphy_SetPrbsSel (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, XVphy_DirectionType Dir, XVphy_PrbsPattern Pattern) |
| This function will set the TX/RXPRBSEL of the GT. More... | |
| u32 | XVphy_TxPrbsForceError (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, u8 ForceErr) |
| This function will set the TX/RXPRBSEL of the GT. More... | |
| void | XVphy_SetTxVoltageSwing (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, u8 Vs) |
| This function will set the TX voltage swing value for a given channel. More... | |
| void | XVphy_SetTxPreEmphasis (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, u8 Pe) |
| This function will set the TX pre-emphasis value for a given channel. More... | |
| void | XVphy_SetTxPostCursor (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, u8 Pc) |
| This function will set the TX post-cursor value for a given channel. More... | |
| void | XVphy_SetRxLpm (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, XVphy_DirectionType Dir, u8 Enable) |
| This function will enable or disable the LPM logic in the Video PHY core. More... | |
| u32 | XVphy_DrpWr (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, u16 Addr, u16 Val) |
| This function will initiate a write DRP transaction. More... | |
| u16 | XVphy_DrpRd (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId, u16 Addr, u16 *RetVal) |
| This function will initiate a read DRP transaction. More... | |
| void | XVphy_MmcmPowerDown (XVphy *InstancePtr, u8 QuadId, XVphy_DirectionType Dir, u8 Hold) |
| This function will power down the mixed-mode clock manager (MMCM) core. More... | |
| void | XVphy_MmcmStart (XVphy *InstancePtr, u8 QuadId, XVphy_DirectionType Dir) |
| This function will start the mixed-mode clock manager (MMCM) core. More... | |
| void | XVphy_IBufDsEnable (XVphy *InstancePtr, u8 QuadId, XVphy_DirectionType Dir, u8 Enable) |
| This function enables the TX or RX IBUFDS peripheral. More... | |
| void | XVphy_Clkout1OBufTdsEnable (XVphy *InstancePtr, XVphy_DirectionType Dir, u8 Enable) |
| This function enables the TX or RX CLKOUT1 OBUFTDS peripheral. More... | |
| u32 | XVphy_IsBonded (XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId) |
| This function returns true when the RX and TX are bonded and are running from the same (RX) reference clock. More... | |
| void | XVphy_SetErrorCallback (XVphy *InstancePtr, void *CallbackFunc, void *CallbackRef) |
| This function installs a callback function for the VPHY error conditions. More... | |
| void | XVphy_RegisterDebug (XVphy *InstancePtr) |
| This function prints out Video PHY register and GT Channel and Common DRP register contents. More... | |
| void XVphy_CfgInitialize | ( | XVphy * | InstancePtr, |
| XVphy_Config * | ConfigPtr, | ||
| UINTPTR | EffectiveAddr | ||
| ) |
This function retrieves the configuration for this Video PHY instance and fills in the InstancePtr->Config structure.
| 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.
| 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. |
| LineRateHz | is the line rate in Hz to configure software. |
References XVphy_Channel::LineRateHz, XVphy::Quads, and XVphy_Ch2Ids().
| 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_MISC_RXUSRCLK_REG, XVPHY_MISC_TXUSRCLK_REG, XVphy_ReadReg, and XVphy_WriteReg.
| u16 XVphy_DrpRd | ( | XVphy * | InstancePtr, |
| u8 | QuadId, | ||
| XVphy_ChannelId | ChId, | ||
| u16 | Addr, | ||
| u16 * | RetVal | ||
| ) |
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. |
| Addr | is the DRP address to issue the DRP access to. |
| RetVal | is the DRP read_value returned implicitly. |
Referenced by XVphy_RegisterDebug().
| u32 XVphy_DrpWr | ( | 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. |
| Addr | is the DRP address to issue the DRP access to. |
| Val | is the value to write to the DRP address. |
Referenced by XVphy_MmcmWriteParameters().
| u64 XVphy_GetLineRateHz | ( | XVphy * | InstancePtr, |
| u8 | QuadId, | ||
| XVphy_ChannelId | ChId | ||
| ) |
This function will return the line rate in Hz for a given channel / quad.
| InstancePtr | is a pointer to the XVphy core instance. |
| QuadId | is the GT quad ID to check. |
| ChId | is the channel ID for which to retrieve the line rate. |
References XVphy_Channel::LineRateHz, and XVphy::Quads.
Referenced by XVphy_PllCalculator().
| 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::Config, XVphy_Config::XcvrType, XVphy_GetSysClkDataSel(), and XVphy_GetSysClkOutSel().
Referenced by XVphy_IsPllLocked().
| 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, XVphy_ReadReg, and XVPHY_VERSION_REG.
| 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. |
| QuadId | is the GT quad ID to operate on. |
| 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::DruIsPresent, XVphy_Config::DruRefClkSel, XVphy_Config::RxRefClkSel, XVphy_Config::TxRefClkSel, XVPHY_IBUFDS_GTXX_CTRL_GTREFCLK0_CEB_MASK, XVPHY_IBUFDS_GTXX_CTRL_GTREFCLK1_CEB_MASK, XVPHY_IBUFDS_GTXX_CTRL_REG, XVPHY_MISC_RXUSRCLK_REG, XVPHY_MISC_TXUSRCLK_REG, XVphy_ReadReg, and XVphy_WriteReg.
| 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. |
| QuadId | is the GT quad ID to operate on. |
| ChId | is the channel ID to check. |
References XVphy_GetSysClkDataSel(), and XVphy_GetSysClkOutSel().
| 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_MMCM_RXUSRCLK_CTRL_REG, XVPHY_MMCM_TXUSRCLK_CTRL_REG, XVphy_ReadReg, and XVphy_WriteReg.
Referenced by 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::Quads, XVphy_Quad::RxMmcm, XVphy_Config::RxProtocol, XVphy_Quad::TxMmcm, XVphy_Config::TxProtocol, XVphy_IsHDMI(), XVPHY_LOG_EVT_RXPLL_RECONFIG, XVPHY_LOG_EVT_TXPLL_RECONFIG, XVphy_MmcmLockedMaskEnable(), XVphy_MmcmPowerDown(), XVphy_MmcmReset(), XVphy_MmcmWriteParameters(), and XVphy_WaitUs().
| 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::Config, Pll2SysClkData(), Pll2SysClkOut(), XVphy_Config::XcvrType, XVphy_CfgPllRefClkSel(), XVphy_CfgSysClkDataSel(), XVphy_CfgSysClkOutSel(), and XVphy_WriteCfgRefClkSelReg().
| void XVphy_RegisterDebug | ( | XVphy * | InstancePtr | ) |
This function prints out Video PHY register and GT Channel and Common DRP register contents.
| InstancePtr | is a pointer to the Vphy core instance. |
References XVphy_Config::BaseAddr, XVphy::Config, XVphy::HdmiIsQpllPresent, XVphy_Config::RxChannels, XVphy_Config::RxProtocol, XVphy_Config::TxChannels, XVphy_Config::TxProtocol, XVphy_Config::XcvrType, XVphy_DrpRd(), and XVphy_ReadReg.
| 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, XVPHY_RX_INIT_REG, XVPHY_TX_INIT_REG, XVPHY_TXRX_INIT_PLLGTRESET_ALL_MASK, XVPHY_TXRX_INIT_PLLGTRESET_MASK, and XVphy_WriteReg.
| 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, XVPHY_RX_INIT_REG, XVPHY_TX_INIT_REG, XVPHY_TXRX_INIT_GTRESET_ALL_MASK, XVPHY_TXRX_INIT_GTRESET_MASK, and XVphy_WriteReg.
| void XVphy_SetErrorCallback | ( | XVphy * | InstancePtr, |
| void * | CallbackFunc, | ||
| void * | CallbackRef | ||
| ) |
This function installs a callback function for the VPHY error conditions.
| InstancePtr | is a pointer to the XVPhy instance. |
| 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. |
Sample Function Call: CallbackFunc(CallbackRef, XVphy_ErrType);
References XVphy::ErrorCallback, and XVphy::ErrorRef.
| u32 XVphy_SetPolarity | ( | XVphy * | InstancePtr, |
| u8 | QuadId, | ||
| XVphy_ChannelId | ChId, | ||
| XVphy_DirectionType | Dir, | ||
| u8 | Polarity | ||
| ) |
This function will set/clear the TX/RX polarity bit.
| 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. |
| Polarity | 0-Not inverted 1-Inverted |
References XVphy_Config::BaseAddr, XVphy::Config, XVphy_ReadReg, XVPHY_RX_CONTROL_REG, XVPHY_TX_CONTROL_REG, and XVphy_WriteReg.
| u32 XVphy_SetPrbsSel | ( | XVphy * | InstancePtr, |
| u8 | QuadId, | ||
| XVphy_ChannelId | ChId, | ||
| XVphy_DirectionType | Dir, | ||
| XVphy_PrbsPattern | Pattern | ||
| ) |
This function will set the TX/RXPRBSEL of the GT.
| 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. |
| Pattern | is the pattern XVphy_PrbsPattern |
References XVphy_Config::BaseAddr, XVphy::Config, XVphy_Ch2Ids(), XVphy_ReadReg, XVPHY_RX_CONTROL_REG, XVPHY_TX_CONTROL_REG, and XVphy_WriteReg.
| 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, XVPHY_RX_EQ_CDR_REG, and XVphy_WriteReg.
| void XVphy_SetTxPostCursor | ( | XVphy * | InstancePtr, |
| u8 | QuadId, | ||
| XVphy_ChannelId | ChId, | ||
| u8 | Pc | ||
| ) |
This function will set the TX post-cursor 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. |
| Pc | is the post-cursor value to write. |
References XVphy_Config::BaseAddr, XVphy::Config, XVphy_ReadReg, XVPHY_TX_DRIVER_CH12_REG, XVPHY_TX_DRIVER_CH34_REG, and XVphy_WriteReg.
| 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, XVPHY_TX_DRIVER_CH12_REG, XVPHY_TX_DRIVER_CH34_REG, and XVphy_WriteReg.
| 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, XVPHY_TX_DRIVER_CH12_REG, XVPHY_TX_DRIVER_CH34_REG, and XVphy_WriteReg.
| u32 XVphy_TxPrbsForceError | ( | XVphy * | InstancePtr, |
| u8 | QuadId, | ||
| XVphy_ChannelId | ChId, | ||
| u8 | ForceErr | ||
| ) |
This function will set the TX/RXPRBSEL of the GT.
| 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. |
| ForceErr | 0-No Error 1-Force Error |
References XVphy_Config::BaseAddr, XVphy::Config, XVphy_ReadReg, XVPHY_TX_CONTROL_REG, and XVphy_WriteReg.
| 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().