source: trunk/minix/drivers/fxp/mii.h@ 10

Last change on this file since 10 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 5.6 KB
Line 
1/*
2ibm/mii.h
3
4Created: Nov 2004 by Philip Homburg <philip@f-mnx.phicoh.com>
5
6Definitions for the Media Independent (Ethernet) Interface
7*/
8
9/* Registers in the Machine Independent Interface (MII) to the PHY.
10 * IEEE 802.3 (2000 Edition) Clause 22.
11 */
12#define MII_CTRL 0x0 /* Control Register (basic) */
13#define MII_CTRL_RST 0x8000 /* Reset PHY */
14#define MII_CTRL_LB 0x4000 /* Enable Loopback Mode */
15#define MII_CTRL_SP_LSB 0x2000 /* Speed Selection (LSB) */
16#define MII_CTRL_ANE 0x1000 /* Auto Negotiation Enable */
17#define MII_CTRL_PD 0x0800 /* Power Down */
18#define MII_CTRL_ISO 0x0400 /* Isolate */
19#define MII_CTRL_RAN 0x0200 /* Restart Auto-Negotiation Process */
20#define MII_CTRL_DM 0x0100 /* Full Duplex */
21#define MII_CTRL_CT 0x0080 /* Enable COL Signal Test */
22#define MII_CTRL_SP_MSB 0x0040 /* Speed Selection (MSB) */
23#define MII_CTRL_SP_10 0x0000 /* 10 Mb/s */
24#define MII_CTRL_SP_100 0x2000 /* 100 Mb/s */
25#define MII_CTRL_SP_1000 0x0040 /* 1000 Mb/s */
26#define MII_CTRL_SP_RES 0x2040 /* Reserved */
27#define MII_CTRL_RES 0x003F /* Reserved */
28#define MII_STATUS 0x1 /* Status Register (basic) */
29#define MII_STATUS_100T4 0x8000 /* 100Base-T4 support */
30#define MII_STATUS_100XFD 0x4000 /* 100Base-X FD support */
31#define MII_STATUS_100XHD 0x2000 /* 100Base-X HD support */
32#define MII_STATUS_10FD 0x1000 /* 10 Mb/s FD support */
33#define MII_STATUS_10HD 0x0800 /* 10 Mb/s HD support */
34#define MII_STATUS_100T2FD 0x0400 /* 100Base-T2 FD support */
35#define MII_STATUS_100T2HD 0x0200 /* 100Base-T2 HD support */
36#define MII_STATUS_EXT_STAT 0x0100 /* Supports MII_EXT_STATUS */
37#define MII_STATUS_RES 0x0080 /* Reserved */
38#define MII_STATUS_MFPS 0x0040 /* MF Preamble Suppression */
39#define MII_STATUS_ANC 0x0020 /* Auto-Negotiation Completed */
40#define MII_STATUS_RF 0x0010 /* Remote Fault Detected */
41#define MII_STATUS_ANA 0x0008 /* Auto-Negotiation Ability */
42#define MII_STATUS_LS 0x0004 /* Link Up */
43#define MII_STATUS_JD 0x0002 /* Jabber Condition Detected */
44#define MII_STATUS_EC 0x0001 /* Ext Register Capabilities */
45#define MII_PHYID_H 0x2 /* PHY ID (high) */
46#define MII_PH_OUI_H_MASK 0xFFFF /* High part of OUI */
47#define MII_PH_OUI_H_C_SHIFT 6 /* Shift up in OUI */
48#define MII_PHYID_L 0x3 /* PHY ID (low) */
49#define MII_PL_OUI_L_MASK 0xFC00 /* Low part of OUI */
50#define MII_PL_OUI_L_SHIFT 10
51#define MII_PL_MODEL_MASK 0x03F0 /* Model */
52#define MII_PL_MODEL_SHIFT 4
53#define MII_PL_REV_MASK 0x000F /* Revision */
54#define MII_ANA 0x4 /* Auto-Negotiation Advertisement */
55#define MII_ANA_NP 0x8000 /* Next PAge */
56#define MII_ANA_RES 0x4000 /* Reserved */
57#define MII_ANA_RF 0x2000 /* Remote Fault */
58#define MII_ANA_TAF_M 0x1FE0 /* Technology Ability Field */
59#define MII_ANA_TAF_S 5 /* Shift */
60#define MII_ANA_TAF_RES 0x1000 /* Reserved */
61#define MII_ANA_PAUSE_ASYM 0x0800 /* Asym. Pause */
62#define MII_ANA_PAUSE_SYM 0x0400 /* Sym. Pause */
63#define MII_ANA_100T4 0x0200 /* 100Base-T4 */
64#define MII_ANA_100TXFD 0x0100 /* 100Base-TX FD */
65#define MII_ANA_100TXHD 0x0080 /* 100Base-TX HD */
66#define MII_ANA_10TFD 0x0040 /* 10Base-T FD */
67#define MII_ANA_10THD 0x0020 /* 10Base-T HD */
68#define MII_ANA_SEL_M 0x001F /* Selector Field */
69#define MII_ANA_SEL_802_3 0x0001 /* 802.3 */
70#define MII_ANLPA 0x5 /* Auto-Neg Link Partner Ability Register */
71#define MII_ANLPA_NP 0x8000 /* Next Page */
72#define MII_ANLPA_ACK 0x4000 /* Acknowledge */
73#define MII_ANLPA_RF 0x2000 /* Remote Fault */
74#define MII_ANLPA_TAF_M 0x1FC0 /* Technology Ability Field */
75#define MII_ANLPA_SEL_M 0x001F /* Selector Field */
76#define MII_ANE 0x6 /* Auto-Negotiation Expansion */
77#define MII_ANE_RES 0xFFE0 /* Reserved */
78#define MII_ANE_PDF 0x0010 /* Parallel Detection Fault */
79#define MII_ANE_LPNPA 0x0008 /* Link Partner is Next Page Able */
80#define MII_ANE_NPA 0x0002 /* Local Device is Next Page Able */
81#define MII_ANE_PR 0x0002 /* New Page has been received */
82#define MII_ANE_LPANA 0x0001 /* Link Partner is Auto-Neg.able */
83#define MII_ANNPT 0x7 /* Auto-Negotiation Next Page Transmit */
84#define MII_ANLPRNP 0x8 /* Auto-Neg Link Partner Received Next Page */
85#define MII_MS_CTRL 0x9 /* MASTER-SLAVE Control Register */
86#define MII_MSC_TEST_MODE 0xE000 /* Test mode */
87#define MII_MSC_MS_MANUAL 0x1000 /* Master/slave manual config */
88#define MII_MSC_MS_VAL 0x0800 /* Master/slave value */
89#define MII_MSC_MULTIPORT 0x0400 /* Multi-port device */
90#define MII_MSC_1000T_FD 0x0200 /* 1000Base-T Full Duplex */
91#define MII_MSC_1000T_HD 0x0100 /* 1000Base-T Half Duplex */
92#define MII_MSC_RES 0x00FF /* Reserved */
93#define MII_MS_STATUS 0xA /* MASTER-SLAVE Status Register */
94#define MII_MSS_FAULT 0x8000 /* Master/slave config fault */
95#define MII_MSS_MASTER 0x4000 /* Master */
96#define MII_MSS_LOCREC 0x2000 /* Local Receiver OK */
97#define MII_MSS_REMREC 0x1000 /* Remote Receiver OK */
98#define MII_MSS_LP1000T_FD 0x0800 /* Link Partner 1000-T FD */
99#define MII_MSS_LP1000T_HD 0x0400 /* Link Partner 1000-T HD */
100#define MII_MSS_RES 0x0300 /* Reserved */
101#define MII_MSS_IDLE_ERR 0x00FF /* Idle Error Counter */
102/* 0xB ... 0xE */ /* Reserved */
103#define MII_EXT_STATUS 0xF /* Extended Status */
104#define MII_ESTAT_1000XFD 0x8000 /* 1000Base-X Full Duplex */
105#define MII_ESTAT_1000XHD 0x4000 /* 1000Base-X Half Duplex */
106#define MII_ESTAT_1000TFD 0x2000 /* 1000Base-T Full Duplex */
107#define MII_ESTAT_1000THD 0x1000 /* 1000Base-T Half Duplex */
108#define MII_ESTAT_RES 0x0FFF /* Reserved */
109/* 0x10 ... 0x1F */ /* Vendor Specific */
110
111_PROTOTYPE( void mii_print_stat_speed, (U16_t stat, U16_t extstat) );
112_PROTOTYPE( void mii_print_techab, (U16_t techab) );
113
114/*
115 * $PchId: mii.h,v 1.1 2004/12/27 13:33:30 philip Exp $
116 */
Note: See TracBrowser for help on using the repository browser.