33#ifndef LIBOPENCM3_PHY_H
34#define LIBOPENCM3_PHY_H
44#define PHY_REG_BCR 0x00
45#define PHY_REG_BSR 0x01
46#define PHY_REG_ID1 0x02
47#define PHY_REG_ID2 0x03
48#define PHY_REG_ANTX 0x04
49#define PHY_REG_ANRX 0x05
50#define PHY_REG_ANEXP 0x06
51#define PHY_REG_ANNPTX 0x07
52#define PHY_REG_ANNPRX 0x08
58#define PHY_REG_BCR_COLTEST (1 << 7)
59#define PHY_REG_BCR_FD (1 << 8)
60#define PHY_REG_BCR_ANRST (1 << 9)
61#define PHY_REG_BCR_ISOLATE (1 << 10)
62#define PHY_REG_BCR_POWERDN (1 << 11)
63#define PHY_REG_BCR_AN (1 << 12)
64#define PHY_REG_BCR_100M (1 << 13)
65#define PHY_REG_BCR_LOOPBACK (1 << 14)
66#define PHY_REG_BCR_RESET (1 << 15)
68#define PHY_REG_BSR_JABBER (1 << 1)
69#define PHY_REG_BSR_UP (1 << 2)
70#define PHY_REG_BSR_FAULT (1 << 4)
71#define PHY_REG_BSR_ANDONE (1 << 5)
bool phy_link_isup(uint8_t phy)
Is the link up ?
void phy_autoneg_force(uint8_t phy, enum phy_status mode)
Force autonegotiation.
void phy_reset(uint8_t phy)
Reset the PHY.
void phy_autoneg_enable(uint8_t phy)
Enable the autonegotiation.
enum phy_status phy_link_status(uint8_t phy)
Get the current link status.