3 * \brief Definitions for Ethernet Physical Layer Interface
\r
4 * \version $Revision: 1.3 $
\r
5 * \author Michael Norman
\r
11 /*******************************************************************/
\r
14 eth_phy_autoneg(int phy_addr, MII_SPEED speed, MII_DUPLEX duplex);
\r
17 eth_phy_manual(int phy_addr, MII_SPEED speed, MII_DUPLEX duplex, int loop);
\r
20 eth_phy_get_speed(int, int*);
\r
23 eth_phy_get_duplex(int, int*);
\r
26 eth_phy_reg_dump(int);
\r
28 /*******************************************************************/
\r
30 /* MII Register Addresses */
\r
31 #define PHY_BMCR (0x00)
\r
32 #define PHY_BMSR (0x01)
\r
33 #define PHY_PHYIDR1 (0x02)
\r
34 #define PHY_PHYIDR2 (0x03)
\r
35 #define PHY_ANAR (0x04)
\r
36 #define PHY_ANLPAR (0x05)
\r
38 /* Bit definitions and macros for PHY_CTRL */
\r
39 #define PHY_BMCR_RESET (0x8000)
\r
40 #define PHY_BMCR_LOOP (0x4000)
\r
41 #define PHY_BMCR_SPEED (0x2000)
\r
42 #define PHY_BMCR_AN_ENABLE (0x1000)
\r
43 #define PHY_BMCR_POWERDOWN (0x0800)
\r
44 #define PHY_BMCR_ISOLATE (0x0400)
\r
45 #define PHY_BMCR_AN_RESTART (0x0200)
\r
46 #define PHY_BMCR_FDX (0x0100)
\r
47 #define PHY_BMCR_COL_TEST (0x0080)
\r
49 /* Bit definitions and macros for PHY_STAT */
\r
50 #define PHY_BMSR_100BT4 (0x8000)
\r
51 #define PHY_BMSR_100BTX_FDX (0x4000)
\r
52 #define PHY_BMSR_100BTX (0x2000)
\r
53 #define PHY_BMSR_10BT_FDX (0x1000)
\r
54 #define PHY_BMSR_10BT (0x0800)
\r
55 #define PHY_BMSR_NO_PREAMBLE (0x0040)
\r
56 #define PHY_BMSR_AN_COMPLETE (0x0020)
\r
57 #define PHY_BMSR_REMOTE_FAULT (0x0010)
\r
58 #define PHY_BMSR_AN_ABILITY (0x0008)
\r
59 #define PHY_BMSR_LINK (0x0004)
\r
60 #define PHY_BMSR_JABBER (0x0002)
\r
61 #define PHY_BMSR_EXTENDED (0x0001)
\r
63 /* Bit definitions and macros for PHY_AN_ADV */
\r
64 #define PHY_ANAR_NEXT_PAGE (0x8001)
\r
65 #define PHY_ANAR_REM_FAULT (0x2001)
\r
66 #define PHY_ANAR_PAUSE (0x0401)
\r
67 #define PHY_ANAR_100BT4 (0x0201)
\r
68 #define PHY_ANAR_100BTX_FDX (0x0101)
\r
69 #define PHY_ANAR_100BTX (0x0081)
\r
70 #define PHY_ANAR_10BT_FDX (0x0041)
\r
71 #define PHY_ANAR_10BT (0x0021)
\r
72 #define PHY_ANAR_802_3 (0x0001)
\r
74 /* Bit definitions and macros for PHY_AN_LINK_PAR */
\r
75 #define PHY_ANLPAR_NEXT_PAGE (0x8000)
\r
76 #define PHY_ANLPAR_ACK (0x4000)
\r
77 #define PHY_ANLPAR_REM_FAULT (0x2000)
\r
78 #define PHY_ANLPAR_PAUSE (0x0400)
\r
79 #define PHY_ANLPAR_100BT4 (0x0200)
\r
80 #define PHY_ANLPAR_100BTX_FDX (0x0100)
\r
81 #define PHY_ANLPAR_100BTX (0x0080)
\r
82 #define PHY_ANLPAR_10BTX_FDX (0x0040)
\r
83 #define PHY_ANLPAR_10BT (0x0020)
\r
85 /*******************************************************************/
\r
87 #endif /* _ETH_PHY_H */
\r