 |
AM62D FreeRTOS SDK
11.02.00
|
|
Go to the documentation of this file.
49 #ifndef GENERIC_PHY_H_
50 #define GENERIC_PHY_H_
72 #define PHY_BMCR (0x00U)
75 #define PHY_BMSR (0x01U)
78 #define PHY_PHYIDR1 (0x02U)
81 #define PHY_PHYIDR2 (0x03U)
84 #define PHY_ANAR (0x04U)
87 #define PHY_ANLPAR (0x05U)
90 #define PHY_ANER (0x06U)
93 #define PHY_ANNPTR (0x07U)
96 #define PHY_ANNPRR (0x08U)
99 #define PHY_GIGCR (0x09U)
102 #define PHY_GIGSR (0x0AU)
105 #define PHY_MMD_CR (0x0DU)
108 #define PHY_MMD_DR (0x0EU)
111 #define PHY_GIGESR (0x0FU)
114 #define BMCR_RESET PHY_BIT(15)
115 #define BMCR_LOOPBACK PHY_BIT(14)
116 #define BMCR_SPEED100 PHY_BIT(13)
117 #define BMCR_ANEN PHY_BIT(12)
118 #define BMCR_PWRDOWN PHY_BIT(11)
119 #define BMCR_ISOLATE PHY_BIT(10)
120 #define BMCR_ANRESTART PHY_BIT(9)
121 #define BMCR_FD PHY_BIT(8)
122 #define BMCR_SPEED1000 PHY_BIT(6)
125 #define BMSR_100FD PHY_BIT(14)
126 #define BMSR_100HD PHY_BIT(13)
127 #define BMSR_10FD PHY_BIT(12)
128 #define BMSR_10HD PHY_BIT(11)
129 #define BMSR_GIGEXTSTS PHY_BIT(8)
130 #define BMSR_ANCOMPLETE PHY_BIT(5)
131 #define BMSR_ANCAPABLE PHY_BIT(3)
132 #define BMSR_LINKSTS PHY_BIT(2)
133 #define BMSR_EXTCAP PHY_BIT(0)
136 #define PHYIDR1_OUI_OFFSET (6U)
139 #define PHYIDR2_OUI_MASK (0xFC00U)
140 #define PHYIDR2_VMDL_MASK (0x03F0U)
141 #define PHYIDR2_VREV_MASK (0x000FU)
142 #define PHYIDR2_OUI_OFFSET (10U)
143 #define PHYIDR2_VMDL_OFFSET (4U)
144 #define PHYIDR2_VREV_OFFSET (0U)
147 #define ANAR_100FD PHY_BIT(8)
148 #define ANAR_100HD PHY_BIT(7)
149 #define ANAR_10FD PHY_BIT(6)
150 #define ANAR_10HD PHY_BIT(5)
151 #define ANAR_802P3 PHY_BIT(0)
152 #define ANAR_100 (ANAR_100FD | ANAR_100HD)
153 #define ANAR_10 (ANAR_10FD | ANAR_10HD)
156 #define ANLPAR_100FD PHY_BIT(8)
157 #define ANLPAR_100HD PHY_BIT(7)
158 #define ANLPAR_10FD PHY_BIT(6)
159 #define ANLPAR_10HD PHY_BIT(5)
160 #define ANLPAR_100 (ANLPAR_100FD | ANLPAR_100HD)
161 #define ANLPAR_10 (ANLPAR_10FD | ANLPAR_10HD)
164 #define ANER_LPISANABLE PHY_BIT(0)
167 #define GIGCR_MASTERCFG PHY_BIT(12)
168 #define GIGCR_MASTEREN PHY_BIT(11)
169 #define GIGCR_1000FD PHY_BIT(9)
170 #define GIGCR_1000HD PHY_BIT(8)
171 #define GIGCR_1000 (GIGCR_1000FD | GIGCR_1000HD)
174 #define GIGSR_MASTERRES PHY_BIT(14)
175 #define GIGSR_LOCALSTS PHY_BIT(13)
176 #define GIGSR_LPARSTS PHY_BIT(12)
177 #define GIGSR_1000FD PHY_BIT(11)
178 #define GIGSR_1000HD PHY_BIT(10)
179 #define GIGSR_1000 (GIGSR_1000FD | GIGSR_1000HD)
182 #define MMD_CR_ADDR (0x0000U)
183 #define MMD_CR_DATA_NOPOSTINC (0x4000U)
184 #define MMD_CR_DATA_POSTINC_RW (0x8000U)
185 #define MMD_CR_DATA_POSTINC_W (0xC000U)
186 #define MMD_CR_DEVADDR (0x001FU)
189 #define GIGESR_1000FD PHY_BIT(13)
190 #define GIGESR_1000HD PHY_BIT(12)
191 #define GIGESR_1000 (GIGESR_1000FD | GIGESR_1000HD)
236 uint32_t advertisement);
239 uint32_t advertisement);
struct tisci_boardcfg_control control
Definition: tisci_boardcfg.h:1
int32_t GenericPhy_ctrlPowerDown(EthPhyDrv_Handle hPhy, bool control)
int32_t GenericPhy_disableAdvertisement(EthPhyDrv_Handle hPhy, uint32_t advertisement)
int32_t GenericPhy_ctrlAutoNegotiation(EthPhyDrv_Handle hPhy, uint32_t control)
uint8_t EthPhyDrv_Handle[ETHPHYDRV_MAX_OBJ_SIZE]
Definition: phy_common.h:302
void GenericPhy_printRegs(EthPhyDrv_Handle hPhy)
bool GenericPhy_isResetComplete(EthPhyDrv_Handle hPhy)
int32_t GenericPhy_isAutoNegotiationComplete(EthPhyDrv_Handle hPhy, bool *pCompleted)
void GenericPhy_reset(EthPhyDrv_Handle hPhy)
int32_t GenericPhy_writeExtReg(EthPhyDrv_Handle hPhy, uint32_t reg, uint16_t val)
int32_t GenericPhy_isLinkUp(EthPhyDrv_Handle hPhy, bool *pLinkUp)
int32_t GenericPhy_writeReg(EthPhyDrv_Handle hPhy, uint32_t reg, uint16_t val)
int32_t GenericPhy_getId(EthPhyDrv_Handle hPhy, uint32_t *pId)
int32_t GenericPhy_readReg(EthPhyDrv_Handle hPhy, uint32_t reg, uint16_t *pVal)
int32_t GenericPhy_isAutoNegotiationRestartComplete(EthPhyDrv_Handle hPhy, bool *pCompleted)
int32_t GenericPhy_readExtReg(EthPhyDrv_Handle hPhy, uint32_t reg, uint16_t *val)
int32_t GenericPhy_isAutoNegotiationEnabled(EthPhyDrv_Handle hPhy, bool *pEnabled)
int32_t GenericPhy_enableAdvertisement(EthPhyDrv_Handle hPhy, uint32_t advertisement)
int32_t GenericPhy_isPowerDownActive(EthPhyDrv_Handle hPhy, bool *pActive)
int32_t GenericPhy_isLinkPartnerAutoNegotiationAble(EthPhyDrv_Handle hPhy, bool *pAble)
int32_t GenericPhy_setSpeedDuplex(EthPhyDrv_Handle hPhy, uint32_t settings)