Data Fields | |
struct { | |
const char * name | |
Driver name. More... | |
bool(* isPhyDevSupported )(EthPhyDrv_Handle hPhy, const void *pVersion) | |
Check if driver supports a PHY model identified by its version. More... | |
bool(* isMacModeSupported )(EthPhyDrv_Handle hPhy, Phy_Mii mii) | |
Check if driver supports a MII interface type. More... | |
void(* bind )(EthPhyDrv_Handle *hPhy, uint8_t phyAddr, Phy_RegAccessCb_t *pRegAccessCb) | |
PHY bind. More... | |
int32_t(* config )(EthPhyDrv_Handle hPhy, const void *pExtCfg, const uint32_t extCfgSize, Phy_Mii mii, bool loopbackEn) | |
PHY specific configuration. More... | |
void(* reset )(EthPhyDrv_Handle hPhy) | |
PHY specific soft reset. More... | |
bool(* isResetComplete )(EthPhyDrv_Handle hPhy) | |
PHY specific soft reset status. More... | |
int32_t(* readExtReg )(EthPhyDrv_Handle hPhy, uint32_t reg, uint16_t *val) | |
Read PHY extended register. More... | |
int32_t(* writeExtReg )(EthPhyDrv_Handle hPhy, uint32_t reg, uint16_t val) | |
Write PHY register. More... | |
int32_t(* rmwExtReg )(EthPhyDrv_Handle hPhy, uint32_t reg, uint16_t mask, uint16_t *val) | |
Read-modify-write PHY extended register. More... | |
void(* printRegs )(EthPhyDrv_Handle hPhy) | |
int32_t(* adjPtpFreq )(EthPhyDrv_Handle hPhy, int64_t ppb) | |
Adjust PHY PTP clock frequency. More... | |
int32_t(* adjPtpPhase )(EthPhyDrv_Handle hPhy, int64_t offset) | |
Adjust PHY PTP clock phase. More... | |
int32_t(* getPtpTime )(EthPhyDrv_Handle hPhy, uint64_t *ts64) | |
Get current PHY PTP clock time. More... | |
int32_t(* setPtpTime )(EthPhyDrv_Handle hPhy, uint64_t ts64) | |
Set PHY PTP clock time. More... | |
int32_t(* getPtpTxTime )(EthPhyDrv_Handle hPhy, uint32_t domain, uint32_t msgType, uint32_t seqId, uint64_t *ts64) | |
Get PHY PTP TX packet timestamp. More... | |
int32_t(* getPtpRxTime )(EthPhyDrv_Handle hPhy, uint32_t domain, uint32_t msgType, uint32_t seqId, uint64_t *ts64) | |
Get PHY PTP RX packet timestamp. More... | |
int32_t(* waitPtpTxTime )(EthPhyDrv_Handle hPhy, uint32_t domain, uint32_t msgType, uint32_t seqId) | |
Add PHY PTP TX packet info to a waiting TX timestamp list. More... | |
int32_t(* procStatusFrame )(EthPhyDrv_Handle hPhy, uint8_t *frame, uint32_t size, uint32_t *types) | |
Process PHY status frame. More... | |
int32_t(* getStatusFrameEthHeader )(EthPhyDrv_Handle hPhy, uint8_t *ethhdr, uint32_t size) | |
Get PHY status frame header. More... | |
int32_t(* enablePtp )(EthPhyDrv_Handle hPhy, bool on, uint32_t srcMacStatusFrameType) | |
Enable or disable the PHY PTP module. More... | |
int32_t(* tickDriver )(EthPhyDrv_Handle hPhy) | |
Provide timer tick to the driver. More... | |
int32_t(* enableEventCapture )(EthPhyDrv_Handle hPhy, uint32_t eventIdx, bool falling, bool on) | |
Enable/Disable an event capture on a PHY GPIO pin. More... | |
int32_t(* enableTriggerOutput )(EthPhyDrv_Handle hPhy, uint32_t triggerIdx, uint64_t start, uint64_t period, bool repeat) | |
Enable/Disable trigger output on a GPIO pin. More... | |
int32_t(* getEventTs )(EthPhyDrv_Handle hPhy, uint32_t *eventIdx, uint32_t *seqId, uint64_t *ts64) | |
Get event timestamp. More... | |
} | fxn |
EthPhyDrv_Handle | hDrv |
const char* Phy_DrvObj_t::name |
Driver name.
Name of the PHY-specific driver.
bool(* Phy_DrvObj_t::isPhyDevSupported) (EthPhyDrv_Handle hPhy, const void *pVersion) |
Check if driver supports a PHY model identified by its version.
PHY-specific function that drivers must implement for upper check if the PHY driver supports a PHY model identified by its version from ID1 and ID2 registers.
Note that a given PHY driver can support multiple PHY models.
hPhy | PHY device handle |
version | PHY version from ID registers |
bool(* Phy_DrvObj_t::isMacModeSupported) (EthPhyDrv_Handle hPhy, Phy_Mii mii) |
Check if driver supports a MII interface type.
PHY-specific function that drivers must implement for upper layer to check whether a MAC mode is supported by the PHY driver or not.
hPhy | PHY device handle |
mii | MII interface |
void(* Phy_DrvObj_t::bind) (EthPhyDrv_Handle *hPhy, uint8_t phyAddr, Phy_RegAccessCb_t *pRegAccessCb) |
PHY bind.
PHY-specific function that binds the driver handle and register access functions to specific PHY device.
hPhy | PHY device handle |
phyAddr | PHY address |
pRegAccessCb | PHY register access function pointers |
int32_t(* Phy_DrvObj_t::config) (EthPhyDrv_Handle hPhy, const void *pExtCfg, const uint32_t extCfgSize, Phy_Mii mii, bool loopbackEn) |
PHY specific configuration.
PHY-specific function that drivers must implement to configure the PHY device. The configuration can be composed of generic and PHY-specific parameter (via extended config).
hPhy | PHY device handle |
cfg | PHY configuration parameter |
mii | MII interface |
void(* Phy_DrvObj_t::reset) (EthPhyDrv_Handle hPhy) |
PHY specific soft reset.
PHY-specific function that drivers must implement to start a soft-reset operation.
hPhy | PHY device handle |
bool(* Phy_DrvObj_t::isResetComplete) (EthPhyDrv_Handle hPhy) |
PHY specific soft reset status.
PHY-specific function that drivers must implement to check if soft-reset operation is complete.
hPhy | PHY device handle |
int32_t(* Phy_DrvObj_t::readExtReg) (EthPhyDrv_Handle hPhy, uint32_t reg, uint16_t *val) |
Read PHY extended register.
PHY-specific function that drivers must implement to read extended registers.
hPhy | PHY device handle |
reg | Register number |
val | Pointer to the read value |
int32_t(* Phy_DrvObj_t::writeExtReg) (EthPhyDrv_Handle hPhy, uint32_t reg, uint16_t val) |
Write PHY register.
PHY-specific function that drivers must implement to write extended registers.
hPhy | PHY device handle |
reg | Register number |
val | Value to be written |
int32_t(* Phy_DrvObj_t::rmwExtReg) (EthPhyDrv_Handle hPhy, uint32_t reg, uint16_t mask, uint16_t *val) |
Read-modify-write PHY extended register.
PHY-specific function that drivers must implement to read-write-modify extended registers.
group | User group (use 0 if single group is supported) |
phyAddr | PHY device address |
reg | Register address |
val | Value read from register |
void(* Phy_DrvObj_t::printRegs) (EthPhyDrv_Handle hPhy) |
Print PHY registers
int32_t(* Phy_DrvObj_t::adjPtpFreq) (EthPhyDrv_Handle hPhy, int64_t ppb) |
Adjust PHY PTP clock frequency.
Optional PHY function to adjust PTP clock frequency. This function can only be supported when the PHY has a built-in PTP clock.
hPhy | PHY device handle |
ppb | Part per billion |
int32_t(* Phy_DrvObj_t::adjPtpPhase) (EthPhyDrv_Handle hPhy, int64_t offset) |
Adjust PHY PTP clock phase.
Optional PHY function to adjust PTP clock phase. This function can only be supported when the PHY has a built-in PTP clock.
hPhy | PHY device handle |
offset | Offset to current clock time in nanosec unit. |
int32_t(* Phy_DrvObj_t::getPtpTime) (EthPhyDrv_Handle hPhy, uint64_t *ts64) |
Get current PHY PTP clock time.
Optional PHY function to get current PHY PTP clock time. This function can only be supported when the PHY has a built-in PTP clock.
hPhy | PHY device handle |
ts64 | Output current PTP clock time in nanosec unit. |
int32_t(* Phy_DrvObj_t::setPtpTime) (EthPhyDrv_Handle hPhy, uint64_t ts64) |
Set PHY PTP clock time.
Optional PHY function to set PHY PTP clock time. This function can only be supported when the PHY has a built-in PTP clock.
hPhy | PHY device handle |
ts64 | PTP time in nanosec unit will be set. |
int32_t(* Phy_DrvObj_t::getPtpTxTime) (EthPhyDrv_Handle hPhy, uint32_t domain, uint32_t msgType, uint32_t seqId, uint64_t *ts64) |
Get PHY PTP TX packet timestamp.
Optional PHY function to get PHY PTP TX packet timestamp. This function can only be supported when the PHY has a built-in PTP clock.
hPhy | PHY device handle |
domain | PTP domain (in the packet header) |
msgType | PTP message type (in the packet header) |
seqId | PTP packet sequence ID (in the packet header) |
ts64 | Output PTP TX packet timestamp in nanosec unit. |
int32_t(* Phy_DrvObj_t::getPtpRxTime) (EthPhyDrv_Handle hPhy, uint32_t domain, uint32_t msgType, uint32_t seqId, uint64_t *ts64) |
Get PHY PTP RX packet timestamp.
Optional PHY function to get PHY PTP RX packet timestamp. This function can only be supported when the PHY has a built-in PTP clock.
hPhy | PHY device handle |
domain | PTP domain (in the packet header) |
msgType | PTP message type (in the packet header) |
seqId | PTP packet sequence ID (in the packet header) |
ts64 | Output PTP RX packet timestamp in nanosec unit. |
int32_t(* Phy_DrvObj_t::waitPtpTxTime) (EthPhyDrv_Handle hPhy, uint32_t domain, uint32_t msgType, uint32_t seqId) |
Add PHY PTP TX packet info to a waiting TX timestamp list.
Optional PHY function to get PHY PTP TX packet timestamp. This function can only be supported when the PHY has a built-in PTP clock.
hPhy | PHY device handle |
domain | PTP domain (in the packet header) |
msgType | PTP message type (in the packet header) |
seqId | PTP packet sequence ID (in the packet header) |
int32_t(* Phy_DrvObj_t::procStatusFrame) (EthPhyDrv_Handle hPhy, uint8_t *frame, uint32_t size, uint32_t *types) |
Process PHY status frame.
Optional PHY function to process PHY status frame. This function can only be supported when the PHY has a built-in PTP clock.
hPhy | PHY device handle |
frame | Ethernet PHY status frame |
size | Frame size |
types | Types of processed frame |
int32_t(* Phy_DrvObj_t::getStatusFrameEthHeader) (EthPhyDrv_Handle hPhy, uint8_t *ethhdr, uint32_t size) |
Get PHY status frame header.
Optional PHY function to get the Ethernet header of the PHY status frame. This function can only be supported when the PHY has a built-in PTP clock.
hPhy | PHY device handle |
ethhdr | Buffer to get the ethernet header of the PHY status frame. |
size | Buffer size (at least 14 bytes) |
int32_t(* Phy_DrvObj_t::enablePtp) (EthPhyDrv_Handle hPhy, bool on, uint32_t srcMacStatusFrameType) |
Enable or disable the PHY PTP module.
Optional PHY function to enable or disable the PHY PTP module. This function can only be supported when the PHY has a built-in PTP clock.
hPhy | PHY device handle |
on | Flag indicate enable (on=true) or disable(on=false) PTP module |
srcMacStatusFrameType | The PHY-specific src MAC of the status frame. |
int32_t(* Phy_DrvObj_t::tickDriver) (EthPhyDrv_Handle hPhy) |
Provide timer tick to the driver.
Provide timer tick to the driver.
hPhy | PHY device handle |
int32_t(* Phy_DrvObj_t::enableEventCapture) (EthPhyDrv_Handle hPhy, uint32_t eventIdx, bool falling, bool on) |
Enable/Disable an event capture on a PHY GPIO pin.
Optional PHY function to enable/disable an event capture on a PHY GPIO pin. This function can only be supported when the PHY has a built-in PTP clock that support event capture.
hPhy | PHY device handle |
eventIdx | Event index |
falling | Capture event on falling edge or rising edge if falling is false. |
on | Enable when on is true, otherwise disable the event. |
int32_t(* Phy_DrvObj_t::enableTriggerOutput) (EthPhyDrv_Handle hPhy, uint32_t triggerIdx, uint64_t start, uint64_t period, bool repeat) |
Enable/Disable trigger output on a GPIO pin.
Optional PHY function to enable/disable trigger output on a GPIO pin. This function can only be supported when the PHY has a built-in PTP clock that support trigger output.
hPhy | PHY device handle |
triggerIdx | Trigger index |
start | Start trigger time in nanosec unit. |
period | Period of the pulse in nanosec unit. Disable the trigger if the period is equal to 0. |
repeat | Repeated pulse or one shot pulse if repeat is false. |
int32_t(* Phy_DrvObj_t::getEventTs) (EthPhyDrv_Handle hPhy, uint32_t *eventIdx, uint32_t *seqId, uint64_t *ts64) |
Get event timestamp.
Get event timestamp
hPhy | PHY device handle |
eventIdx | Output event index |
seqId | Output event sequence identifier |
ts64 | Output event timestamp |
struct { ... } Phy_DrvObj_t::fxn |
EthPhyDrv_Handle Phy_DrvObj_t::hDrv |