This module contains APIs to program and use the Ethernet PHY present on the board. See ETHPHY for more details.
◆ ETHPHY_CMD_ENABLE_MII
#define ETHPHY_CMD_ENABLE_MII (0U) |
Command to configure the PHY in MII mode.
◆ ETHPHY_CMD_SOFT_RESTART
#define ETHPHY_CMD_SOFT_RESTART (1U) |
Command for Soft Restart. It restarts the PHY without affecting registers.
◆ ETHPHY_CMD_ENABLE_AUTO_MDIX
#define ETHPHY_CMD_ENABLE_AUTO_MDIX (2U) |
Command to enable Auto MDI-X (Automatic Crossover)
◆ ETHPHY_CMD_VERIFY_IDENTIFIER_REGISTER
#define ETHPHY_CMD_VERIFY_IDENTIFIER_REGISTER (3U) |
Command to verify the PHY Identifier Register. It checks if the PHYIDR1 register has the expected value.
◆ ETHPHY_CMD_DISABLE_1000M_ADVERTISEMENT
#define ETHPHY_CMD_DISABLE_1000M_ADVERTISEMENT (4U) |
Command to disable 1000M ability advertisement
◆ ETHPHY_CMD_ENABLE_FAST_LINK_DOWN_DETECTION
#define ETHPHY_CMD_ENABLE_FAST_LINK_DOWN_DETECTION (5U) |
Command to enable Fast Link Doen Detection.
◆ ETHPHY_CMD_CONFIGURE_LED_SOURCE
#define ETHPHY_CMD_CONFIGURE_LED_SOURCE (6U) |
Command to configure the source of PHY LEDs.
◆ ETHPHY_CMD_CONFIGURE_LED_BLINK_RATE
#define ETHPHY_CMD_CONFIGURE_LED_BLINK_RATE (7U) |
Command to configure the blink rate of PHY LEDs.
◆ ETHPHY_CMD_ENABLE_EXTENDED_FD_ABILITY
#define ETHPHY_CMD_ENABLE_EXTENDED_FD_ABILITY (8U) |
Command to enable the extended full duplex ability.
◆ ETHPHY_CMD_ENABLE_ODD_NIBBLE_DETECTION
#define ETHPHY_CMD_ENABLE_ODD_NIBBLE_DETECTION (9U) |
Command to enable odd nibble detection.
◆ ETHPHY_CMD_ENABLE_ENHANCED_IPG_DETECTION
#define ETHPHY_CMD_ENABLE_ENHANCED_IPG_DETECTION (10U) |
Command to enable enhanced IPG detection.
◆ ETHPHY_CMD_GET_LINK_STATUS
#define ETHPHY_CMD_GET_LINK_STATUS (11U) |
Command to get Link Status for the PHY.
◆ ETHPHY_CMD_GET_SPEED_AND_DUPLEXITY
#define ETHPHY_CMD_GET_SPEED_AND_DUPLEXITY (12U) |
Command to get Speed and Duplexity configuration for the PHY.
◆ ETHPHY_CMD_SET_SPEED_AND_DUPLEXITY
#define ETHPHY_CMD_SET_SPEED_AND_DUPLEXITY (13U) |
Command to set Speed and Duplexity configuration for the PHY.
◆ ETHPHY_SPEED_DUPLEXITY_CONFIG_AUTONEG
#define ETHPHY_SPEED_DUPLEXITY_CONFIG_AUTONEG (0U) |
◆ ETHPHY_SPEED_DUPLEXITY_CONFIG_10FD
#define ETHPHY_SPEED_DUPLEXITY_CONFIG_10FD (1U) |
◆ ETHPHY_SPEED_DUPLEXITY_CONFIG_100FD
#define ETHPHY_SPEED_DUPLEXITY_CONFIG_100FD (2U) |
◆ ETHPHY_SPEED_DUPLEXITY_CONFIG_1000FD
#define ETHPHY_SPEED_DUPLEXITY_CONFIG_1000FD (3U) |
◆ ETHPHY_SPEED_DUPLEXITY_CONFIG_10HD
#define ETHPHY_SPEED_DUPLEXITY_CONFIG_10HD (4U) |
◆ ETHPHY_SPEED_DUPLEXITY_CONFIG_100HD
#define ETHPHY_SPEED_DUPLEXITY_CONFIG_100HD (5U) |
◆ ETHPHY_SPEED_DUPLEXITY_CONFIG_1000HD
#define ETHPHY_SPEED_DUPLEXITY_CONFIG_1000HD (6U) |
◆ ETHPHY_SPEED_DUPLEXITY_CONFIG_INVALID
#define ETHPHY_SPEED_DUPLEXITY_CONFIG_INVALID (7U) |
◆ ETHPHY_Handle
◆ ETHPHY_Config
◆ ETHPHY_Params
◆ ETHPHY_OpenFxn
Driver implementation to open a specific ETHPHY driver.
Typically this callback is hidden from the end application and is implemented when a new type of ETHPHY device needs to be implemented.
- Parameters
-
config | [IN] ETHPHY configuration for the specific ETHPHY device |
params | [IN] User controllable parameters when opening the ETHPHY device |
- Returns
- SystemP_SUCCESS on success, else failure
◆ ETHPHY_CloseFxn
Driver implementation to close a specific ETHPHY driver.
Typically this callback is hidden from the end application and is implemented when a new type of ETHPHY device needs to be implemented.
- Parameters
-
config | [IN] ETHPHY configuration for the specific ETHPHY device |
- Returns
- SystemP_SUCCESS on success, else failure
◆ ETHPHY_CommandFxn
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.
Typically this callback is hidden from the end application and is implemented when a new type of ETHPHY device needs to be implemented.
- Parameters
-
config | [IN] ETHPHY configuration for the specific ETHPHY device |
command | [IN] Command from ETHPHY_Commands |
data | [IN] Pointer to structure which has the data to write/read |
dataSize | [IN] Size of the structure pointed by data |
- Returns
- SystemP_SUCCESS on success, else failure
◆ ETHPHY_Params_init()
Set default parameters in the ETHPHY_Params structure.
Call this API to set defaults and then override the fields as needed before calling ETHPHY_open.
- Parameters
-
params | [OUT] Initialized parameters |
◆ ETHPHY_open()
Open ETHPHY driver.
Global variables ETHPHY_Config gETHPHY_Config[]
and uint32_t gETHPHY_ConfigNum
is instantiated by SysCfg to describe the ETHPHY configuration based on user selection in SysCfg.
- Parameters
-
instanceId | [IN] Index within ETHPHY_Config gETHPHY_Config[] denoting the ETHPHY driver to open |
params | [IN] Open parameters |
- Returns
- Handle to ETHPHY driver which should be used in subsequent API call Else returns NULL in case of failure
◆ ETHPHY_close()
Close ETHPHY driver.
- Parameters
-
◆ ETHPHY_command()
int32_t ETHPHY_command |
( |
ETHPHY_Handle |
handle, |
|
|
uint32_t |
command, |
|
|
void * |
data, |
|
|
uint32_t |
dataSize |
|
) |
| |
Send a command to the ETHPHY.
- Parameters
-
handle | [in] ETHPHY driver handle from ETHPHY_open |
command | [in] Command from ETHPHY_Commands |
data | [IN] Pointer to structure which has the data to write/read |
dataSize | [IN] Size of the structure pointed by data |
- Returns
- SystemP_SUCCESS on success, else failure
◆ ETHPHY_getAttrs()
Return ETHPHY attributes.
- Parameters
-
instanceId | [IN] ETHPHY instance ID |
- Returns
- ETHPHY_Attrs, else NULL if instanceId is invalid