PDK API Guide for J721E
|
Data Structures | |
struct | CpswPhy_GenericInArgs |
Generic input args. More... | |
struct | CpswPhy_GetModeOutArgs |
Output args for CPSW_PHY_IOCTL_PHY_GET_MODE command. More... | |
struct | CpswPhy_SetModeInArgs |
Input args for CPSW_PHY_IOCTL_PHY_SET_MODE command. More... | |
struct | CpswPhy_ComplianceTestInArgs |
Input args for CPSW_PHY_IOCTL_RUN_COMPLIANCE_TEST command. More... | |
struct | CpswPhy_ReadRegInArgs |
Input args for CPSW_PHY_IOCTL_READ_REG_EXT command. More... | |
struct | CpswPhy_WriteRegInArgs |
Input args for CPSW_PHY_IOCTL_WRITE_REG_EXT command. More... | |
struct | CpswPhy_Clause45ReadRegInArgs |
Input args for CPSW_PHY_IOCTL_READ_CLAUSE45_REG command. More... | |
struct | CpswPhy_Clause45WriteRegInArgs |
Input args for CPSW_PHY_IOCTL_WRITE_CLAUSE45_REG command. More... | |
struct | CpswPhy_Version |
PHY version (ID) More... | |
struct | CpswPhy_FsmTimeoutConfig |
PHY State-Machine time-out values. More... | |
struct | CpswPhy_Config |
PHY configuration parameters. More... | |
Typedefs | |
typedef struct CpswPhy_Obj_s * | CpswPhy_Handle |
PHY driver object handle. More... | |
Enumerations | |
enum | CpswPhy_Ioctl_e { CPSW_PHY_IOCTL_PHY_TICK = CPSW_PHY_PUBLIC_IOCTL(0U), CPSW_PHY_IOCTL_PHY_GET_ID = CPSW_PHY_PUBLIC_IOCTL(1U), CPSW_PHY_IOCTL_PHY_GET_SUPPORTED_MODES = CPSW_PHY_PUBLIC_IOCTL(2U), CPSW_PHY_IOCTL_PHY_GET_LOOPBACK_STATE = CPSW_PHY_PUBLIC_IOCTL(3U), CPSW_PHY_IOCTL_PHY_GET_LINK_STATE = CPSW_PHY_PUBLIC_IOCTL(4U), CPSW_PHY_IOCTL_PHY_GET_LINK_MODE = CPSW_PHY_PUBLIC_IOCTL(5U), CPSW_PHY_IOCTL_PHY_SET_MODE = CPSW_PHY_PUBLIC_IOCTL(6U), CPSW_PHY_IOCTL_PHY_RESET = CPSW_PHY_PUBLIC_IOCTL(7U), CPSW_PHY_IOCTL_RUN_COMPLIANCE_TEST = CPSW_PHY_PUBLIC_IOCTL(8U), CPSW_PHY_IOCTL_PHY_IS_ALIVE = CPSW_PHY_PUBLIC_IOCTL(9U), CPSW_PHY_IOCTL_PHY_IS_LINKED = CPSW_PHY_PUBLIC_IOCTL(10U), CPSW_PHY_IOCTL_READ_REG = CPSW_PHY_PUBLIC_IOCTL(11U), CPSW_PHY_IOCTL_WRITE_REG = CPSW_PHY_PUBLIC_IOCTL(12U), CPSW_PHY_IOCTL_READ_REG_EXT = CPSW_PHY_PUBLIC_IOCTL(13U), CPSW_PHY_IOCTL_WRITE_REG_EXT = CPSW_PHY_PUBLIC_IOCTL(14U), CPSW_PHY_IOCTL_READ_CLAUSE45_REG = CPSW_PHY_PUBLIC_IOCTL(15U), CPSW_PHY_IOCTL_WRITE_CLAUSE45_REG = CPSW_PHY_PUBLIC_IOCTL(16U), CPSW_PHY_IOCTL_PRINT_REGS = CPSW_PHY_PUBLIC_IOCTL(17U) } |
PHY IOCTL commands. More... | |
Macros | |
#define | CPSW_PHY_EXTENDED_CFG_SIZE_MAX (128U) |
Max extended configuration size, arbitrarily chosen. More... | |
#define | CPSW_PHY_FSM_TICK_PERIOD_MS (100U) |
CPSW Phy State Machine tick period. More... | |
#define | CPSW_PHY_INVALID_PHYADDR (~0U) |
Invalid PHY address indicator. More... | |
#define | CPSW_PHY_DEVID_AUTODETECT (~0U) |
Device ID is detected at runtime from PHYIDR1 and PHYIDR2. More... | |
#define | CPSW_PHY_USE_DEFAULT (~0U) |
Indicates the driver that default value is to be used. More... | |
#define | CPSW_PHY_NWAY_AUTOMDIX_ENABLE (1U << 15) |
Auto MDIX enable. More... | |
#define | CPSW_PHY_MIIMDIO_MDIXFLIP (1U << 28) |
Auto MDIX enable. More... | |
#define | CPSW_PHY_EVENT_NOCHANGE (0U) |
No change from previous status. More... | |
#define | CPSW_PHY_EVENT_LINKDOWN (1U) |
Link down event. More... | |
#define | CPSW_PHY_EVENT_LINKUP (2U) |
NLink (or re-link) event. More... | |
#define | CPSW_PHY_EVENT_PHYERROR (3U) |
No PHY connected. More... | |
#define | CPSW_PHY_EVENT_LPBK (4U) |
PHY LPBK. More... | |
#define | CPSW_PHY_IS_ADDR_VALID(addr) ((addr) <= 31U) |
Check if PHY address is valid (0 - 31) More... | |
#define | CPSW_PHY_PUBLIC_IOCTL(x) (CPSW_IOCTL_PHY_BASE | CPSW_IOCTL_MIN(x)) |
Helper macro to create IOCTL commands for host port submodule. More... | |
#define CPSW_PHY_EXTENDED_CFG_SIZE_MAX (128U) |
Max extended configuration size, arbitrarily chosen.
#define CPSW_PHY_FSM_TICK_PERIOD_MS (100U) |
CPSW Phy State Machine tick period.
#define CPSW_PHY_INVALID_PHYADDR (~0U) |
Invalid PHY address indicator.
For ports without PHY application but set PHYADDR as CPSW_PHY_INVALID_PHYADDR to indicate NO PHY mode
#define CPSW_PHY_DEVID_AUTODETECT (~0U) |
Device ID is detected at runtime from PHYIDR1 and PHYIDR2.
#define CPSW_PHY_USE_DEFAULT (~0U) |
Indicates the driver that default value is to be used.
#define CPSW_PHY_NWAY_AUTOMDIX_ENABLE (1U << 15) |
Auto MDIX enable.
#define CPSW_PHY_MIIMDIO_MDIXFLIP (1U << 28) |
Auto MDIX enable.
#define CPSW_PHY_EVENT_NOCHANGE (0U) |
No change from previous status.
#define CPSW_PHY_EVENT_LINKDOWN (1U) |
Link down event.
#define CPSW_PHY_EVENT_LINKUP (2U) |
NLink (or re-link) event.
#define CPSW_PHY_EVENT_PHYERROR (3U) |
No PHY connected.
#define CPSW_PHY_EVENT_LPBK (4U) |
PHY LPBK.
#define CPSW_PHY_PUBLIC_IOCTL | ( | x | ) | (CPSW_IOCTL_PHY_BASE | CPSW_IOCTL_MIN(x)) |
Helper macro to create IOCTL commands for host port submodule.
typedef struct CpswPhy_Obj_s* CpswPhy_Handle |
PHY driver object handle.
PHY driver opaque handle used to call any PHY related APIs.
enum CpswPhy_Ioctl_e |
PHY IOCTL commands.
Enumerator | |
---|---|
CPSW_PHY_IOCTL_PHY_TICK |
Get PHY identification. IOCTL parameters:
|
CPSW_PHY_IOCTL_PHY_GET_ID |
Get PHY identification. IOCTL parameters:
|
CPSW_PHY_IOCTL_PHY_GET_SUPPORTED_MODES |
Get PHY supported modes by local PHY device. IOCTL parameters:
|
CPSW_PHY_IOCTL_PHY_GET_LOOPBACK_STATE |
Check state-machine link state, that is, whether the state machine has reached the LINKED state. IOCTL parameters:
|
CPSW_PHY_IOCTL_PHY_GET_LINK_STATE |
Check state-machine link state, that is, whether the state machine has reached the LINKED state. IOCTL parameters:
|
CPSW_PHY_IOCTL_PHY_GET_LINK_MODE |
Get the link speed and duplexity state after the state machine has reached the LINKED state. IOCTL parameters:
|
CPSW_PHY_IOCTL_PHY_SET_MODE |
Set PHY mode. IOCTL parameters:
|
CPSW_PHY_IOCTL_PHY_RESET |
Reset PHY. IOCTL parameters:
|
CPSW_PHY_IOCTL_RUN_COMPLIANCE_TEST |
Run compliance test. IOCTL parameters:
|
CPSW_PHY_IOCTL_PHY_IS_ALIVE |
Check PHY alive status. IOCTL parameters:
|
CPSW_PHY_IOCTL_PHY_IS_LINKED |
Check PHY link status from PHY register. IOCTL parameters:
|
CPSW_PHY_IOCTL_READ_REG |
Read PHY register. IOCTL parameters:
|
CPSW_PHY_IOCTL_WRITE_REG |
Write PHY register. IOCTL parameters:
|
CPSW_PHY_IOCTL_READ_REG_EXT |
Read PHY extended register. IOCTL parameters:
|
CPSW_PHY_IOCTL_WRITE_REG_EXT |
Write PHY extended register. IOCTL parameters:
|
CPSW_PHY_IOCTL_READ_CLAUSE45_REG |
Read PHY register using Clause-45 frame. IOCTL parameters:
|
CPSW_PHY_IOCTL_WRITE_CLAUSE45_REG |
Write PHY register using Clause-45 frame. IOCTL parameters:
|
CPSW_PHY_IOCTL_PRINT_REGS |
Print PHY registers. IOCTL parameters:
|