AM263x MCU+ SDK  10.00.00
ethphy.h File Reference

Go to the source code of this file.

Data Structures

struct  ETHPHY_Params
 Parameters passed during ETHPHY_open() More...
 
struct  ETHPHY_Fxns
 ETHPHY Driver implementation callbacks. More...
 
struct  ETHPHY_Attrs
 ETHPHY device attributes. These are filled by SysCfg based on the PHY device that is selected. More...
 
struct  ETHPHY_Config
 ETHPHY driver configuration. These are filled by SysCfg based on the PHY device that is selected. More...
 
struct  ETHPHY_SpeedDuplexConfig
 Data structure to be passed/returned when calling ETHPHY_command with ETHPHY_CMD_GET_SPEED_AND_DUPLEX_CONFIG or ETHPHY_CMD_SET_SPEED_AND_DUPLEX_CONFIG. More...
 

Macros

ETHPHY Commands

Various commands for the Eternet PHY

#define ETHPHY_CMD_ENABLE_MII   (0U)
 Command to configure the PHY in MII mode. More...
 
#define ETHPHY_CMD_SOFT_RESTART   (1U)
 Command for Soft Restart. It restarts the PHY without affecting registers. More...
 
#define ETHPHY_CMD_ENABLE_AUTO_MDIX   (2U)
 Command to enable Auto MDI-X (Automatic Crossover) More...
 
#define ETHPHY_CMD_VERIFY_IDENTIFIER_REGISTER   (3U)
 Command to verify the PHY Identifier Register. It checks if the PHYIDR1 register has the expected value. More...
 
#define ETHPHY_CMD_DISABLE_1000M_ADVERTISEMENT   (4U)
 Command to disable 1000M ability advertisement
More...
 
#define ETHPHY_CMD_ENABLE_FAST_LINK_DOWN_DETECTION   (5U)
 Command to enable Fast Link Down Detection. "data" argument should be passed while making ETHPHY_command API call with this command. Refer to the PHY-specific .h file in "source/board/ethphy" for the data structure needed to be passed. More...
 
#define ETHPHY_CMD_CONFIGURE_LED_SOURCE   (6U)
 Command to configure the source of PHY LEDs. "data" argument should be passed while making ETHPHY_command API call with this command. Refer to the PHY-specific .h file in "source/board/ethphy" for the data structure needed to be passed. More...
 
#define ETHPHY_CMD_CONFIGURE_LED_BLINK_RATE   (7U)
 Command to configure the blink rate of PHY LEDs. "data" argument should be passed while making ETHPHY_command API call with this command. Refer to the PHY-specific .h file in "source/board/ethphy" for the data structure needed to be passed. More...
 
#define ETHPHY_CMD_ENABLE_EXTENDED_FD_ABILITY   (8U)
 Command to enable the extended full duplex ability. More...
 
#define ETHPHY_CMD_ENABLE_ODD_NIBBLE_DETECTION   (9U)
 Command to enable odd nibble detection. More...
 
#define ETHPHY_CMD_ENABLE_ENHANCED_IPG_DETECTION   (10U)
 Command to enable enhanced IPG detection. More...
 
#define ETHPHY_CMD_GET_LINK_STATUS   (11U)
 Command to get Link Status for the PHY. More...
 
#define ETHPHY_CMD_GET_SPEED_AND_DUPLEX_CONFIG   (12U)
 Command to get Speed and Duplex configuration for the PHY. "data" argument should be passed while making ETHPHY_command API call with this command. "data" should be of type ETHPHY_SpeedDuplexConfig. More...
 
#define ETHPHY_CMD_SET_SPEED_AND_DUPLEX_CONFIG   (13U)
 Command to set Speed and Duplex configuration for the PHY. "data" argument should be passed while making ETHPHY_command API call with this command. "data" should be of type ETHPHY_SpeedDuplexConfig. More...
 
#define ETHPHY_CMD_ENABLE_LOW_LATENCY_10M_100M_RGMII   (14U)
 Command to enable low latency for 10M/100M operation in RGMII mode. More...
 
#define ETHPHY_CMD_SET_RX_HALF_FULL_THRESHOLD_RGMII   (15U)
 Command to set RX half full threshold in RGMII mode. "data" argument should be passed while making ETHPHY_command API call with this command. "data" should be a pointer to "uint8_t" and value should be present in the lowest 3 bits. More...
 
#define ETHPHY_CMD_SET_TX_HALF_FULL_THRESHOLD_RGMII   (16U)
 Command to set TX half full threshold in RGMII mode. "data" argument should be passed while making ETHPHY_command API call with this command. "data" should be a pointer to "uint8_t" and value should be present in the lowest 3 bits. More...
 
#define ETHPHY_CMD_GET_AUTONEG_COMPLETE_STATUS   (17U)
 Command to get auto-negotiation completion status. "data" argument should be passed while making ETHPHY_command API call with this command. "data" should be a pointer to "uint8_t" and value returned will be 0 if auto-negotiation is not complete, and 1 if it is complete. More...
 
#define ETHPHY_CMD_GET_LINK_PARTNER_AUTONEG_ABILITY   (18U)
 Command to get link partner's auto-negotiation ability. "data" argument should be passed while making ETHPHY_command API call with this command. "data" should be a pointer to "uint8_t" and value returned will be 0 if partner is not auto-negotiation able, and 1 if it is in auto-neogtiation able. More...
 
#define ETHPHY_CMD_ENABLE_IEEE_POWER_DOWN   (19U)
 Command to enable the IEEE Power Down mode. More...
 
#define ETHPHY_CMD_DISABLE_IEEE_POWER_DOWN   (20U)
 Command to disable the IEEE Power Down mode. More...
 
ETHPHY SPEED AND DUPLEX CONFIGURATIONS

Different modes for speed and duplex configuration in ETHPHY

#define ETHPHY_SPEED_DUPLEX_CONFIG_AUTONEG   (0U)
 
#define ETHPHY_SPEED_DUPLEX_CONFIG_10FD   (1U)
 
#define ETHPHY_SPEED_DUPLEX_CONFIG_100FD   (2U)
 
#define ETHPHY_SPEED_DUPLEX_CONFIG_1000FD   (3U)
 
#define ETHPHY_SPEED_DUPLEX_CONFIG_10HD   (4U)
 
#define ETHPHY_SPEED_DUPLEX_CONFIG_100HD   (5U)
 
#define ETHPHY_SPEED_DUPLEX_CONFIG_1000HD   (6U)
 
#define ETHPHY_SPEED_DUPLEX_CONFIG_INVALID   (7U)
 

Typedefs

typedef void * ETHPHY_Handle
 Handle to the ETHPHY driver returned by ETHPHY_open() More...
 
typedef struct ETHPHY_Config_s ETHPHY_Config
 Forward declaration of ETHPHY_Config. More...
 
typedef struct ETHPHY_Params_s ETHPHY_Params
 Forward declaration of ETHPHY_Params. More...
 
ETHPHY driver implementation callbacks
typedef int32_t(* ETHPHY_OpenFxn) (ETHPHY_Config *config, const ETHPHY_Params *params)
 Driver implementation to open a specific ETHPHY driver. More...
 
typedef void(* ETHPHY_CloseFxn) (ETHPHY_Config *config)
 Driver implementation to close a specific ETHPHY driver. More...
 
typedef int32_t(* ETHPHY_CommandFxn) (ETHPHY_Config *config, uint32_t command, void *data, uint32_t dataSize)
 Driver implementation to send command to the ETHPHY using specific ETHPHY driver. More...
 

Functions

void ETHPHY_Params_init (ETHPHY_Params *params)
 Set default parameters in the ETHPHY_Params structure. More...
 
ETHPHY_Handle ETHPHY_open (uint32_t instanceId, const ETHPHY_Params *params)
 Open ETHPHY driver. More...
 
void ETHPHY_close (ETHPHY_Handle handle)
 Close ETHPHY driver. More...
 
int32_t ETHPHY_command (ETHPHY_Handle handle, uint32_t command, void *data, uint32_t dataSize)
 Send a command to the ETHPHY. More...
 
const ETHPHY_AttrsETHPHY_getAttrs (uint32_t instanceId)
 Return ETHPHY attributes. More...