mii.h

Go to the documentation of this file.
00001 /*
00002 ibm/mii.h
00003 
00004 Created:        Nov 2004 by Philip Homburg <philip@f-mnx.phicoh.com>
00005 
00006 Definitions for the Media Independent (Ethernet) Interface
00007 */
00008 
00009 /* Registers in the Machine Independent Interface (MII) to the PHY.
00010  * IEEE 802.3 (2000 Edition) Clause 22.
00011  */
00012 #define MII_CTRL        0x0     /* Control Register (basic) */
00013 #define         MII_CTRL_RST    0x8000  /* Reset PHY */
00014 #define         MII_CTRL_LB     0x4000  /* Enable Loopback Mode */
00015 #define         MII_CTRL_SP_LSB 0x2000  /* Speed Selection (LSB) */
00016 #define         MII_CTRL_ANE    0x1000  /* Auto Negotiation Enable */
00017 #define         MII_CTRL_PD     0x0800  /* Power Down */
00018 #define         MII_CTRL_ISO    0x0400  /* Isolate */
00019 #define         MII_CTRL_RAN    0x0200  /* Restart Auto-Negotiation Process */
00020 #define         MII_CTRL_DM     0x0100  /* Full Duplex */
00021 #define         MII_CTRL_CT     0x0080  /* Enable COL Signal Test */
00022 #define         MII_CTRL_SP_MSB 0x0040  /* Speed Selection (MSB) */
00023 #define                 MII_CTRL_SP_10          0x0000  /* 10 Mb/s */
00024 #define                 MII_CTRL_SP_100         0x2000  /* 100 Mb/s */
00025 #define                 MII_CTRL_SP_1000        0x0040  /* 1000 Mb/s */
00026 #define                 MII_CTRL_SP_RES         0x2040  /* Reserved */
00027 #define         MII_CTRL_RES    0x003F  /* Reserved */
00028 #define MII_STATUS      0x1     /* Status Register (basic) */
00029 #define         MII_STATUS_100T4        0x8000  /* 100Base-T4 support */
00030 #define         MII_STATUS_100XFD       0x4000  /* 100Base-X FD support */
00031 #define         MII_STATUS_100XHD       0x2000  /* 100Base-X HD support */
00032 #define         MII_STATUS_10FD         0x1000  /* 10 Mb/s FD support */
00033 #define         MII_STATUS_10HD         0x0800  /* 10 Mb/s HD support */
00034 #define         MII_STATUS_100T2FD      0x0400  /* 100Base-T2 FD support */
00035 #define         MII_STATUS_100T2HD      0x0200  /* 100Base-T2 HD support */
00036 #define         MII_STATUS_EXT_STAT     0x0100  /* Supports MII_EXT_STATUS */
00037 #define         MII_STATUS_RES          0x0080  /* Reserved */
00038 #define         MII_STATUS_MFPS         0x0040  /* MF Preamble Suppression */
00039 #define         MII_STATUS_ANC          0x0020  /* Auto-Negotiation Completed */
00040 #define         MII_STATUS_RF           0x0010  /* Remote Fault Detected */
00041 #define         MII_STATUS_ANA          0x0008  /* Auto-Negotiation Ability */
00042 #define         MII_STATUS_LS           0x0004  /* Link Up */
00043 #define         MII_STATUS_JD           0x0002  /* Jabber Condition Detected */
00044 #define         MII_STATUS_EC           0x0001  /* Ext Register Capabilities */
00045 #define MII_PHYID_H     0x2     /* PHY ID (high) */
00046 #define         MII_PH_OUI_H_MASK       0xFFFF  /* High part of OUI */
00047 #define                 MII_PH_OUI_H_C_SHIFT    6       /* Shift up in OUI */
00048 #define MII_PHYID_L     0x3     /* PHY ID (low) */
00049 #define         MII_PL_OUI_L_MASK       0xFC00  /* Low part of OUI */
00050 #define                 MII_PL_OUI_L_SHIFT      10
00051 #define         MII_PL_MODEL_MASK       0x03F0  /* Model */
00052 #define                 MII_PL_MODEL_SHIFT      4
00053 #define         MII_PL_REV_MASK         0x000F  /* Revision */
00054 #define MII_ANA         0x4     /* Auto-Negotiation Advertisement */
00055 #define         MII_ANA_NP      0x8000  /* Next PAge */
00056 #define         MII_ANA_RES     0x4000  /* Reserved */
00057 #define         MII_ANA_RF      0x2000  /* Remote Fault */
00058 #define         MII_ANA_TAF_M   0x1FE0   /* Technology Ability Field */
00059 #define         MII_ANA_TAF_S   5        /* Shift */
00060 #define                 MII_ANA_TAF_RES         0x1000  /* Reserved */
00061 #define                 MII_ANA_PAUSE_ASYM      0x0800  /* Asym. Pause */
00062 #define                 MII_ANA_PAUSE_SYM       0x0400  /* Sym. Pause */
00063 #define                 MII_ANA_100T4           0x0200  /* 100Base-T4 */
00064 #define                 MII_ANA_100TXFD         0x0100  /* 100Base-TX FD */
00065 #define                 MII_ANA_100TXHD         0x0080  /* 100Base-TX HD */
00066 #define                 MII_ANA_10TFD           0x0040  /* 10Base-T FD */
00067 #define                 MII_ANA_10THD           0x0020  /* 10Base-T HD */
00068 #define         MII_ANA_SEL_M   0x001F   /* Selector Field */
00069 #define                 MII_ANA_SEL_802_3 0x0001 /* 802.3 */
00070 #define MII_ANLPA       0x5     /* Auto-Neg Link Partner Ability Register */
00071 #define         MII_ANLPA_NP    0x8000  /* Next Page */
00072 #define         MII_ANLPA_ACK   0x4000  /* Acknowledge */
00073 #define         MII_ANLPA_RF    0x2000  /* Remote Fault */
00074 #define         MII_ANLPA_TAF_M 0x1FC0   /* Technology Ability Field */
00075 #define         MII_ANLPA_SEL_M 0x001F   /* Selector Field */
00076 #define MII_ANE         0x6     /* Auto-Negotiation Expansion */
00077 #define         MII_ANE_RES     0xFFE0  /* Reserved */
00078 #define         MII_ANE_PDF     0x0010  /* Parallel Detection Fault */
00079 #define         MII_ANE_LPNPA   0x0008  /* Link Partner is Next Page Able */
00080 #define         MII_ANE_NPA     0x0002  /* Local Device is Next Page Able */
00081 #define         MII_ANE_PR      0x0002  /* New Page has been received */
00082 #define         MII_ANE_LPANA   0x0001  /* Link Partner is Auto-Neg.able */
00083 #define MII_ANNPT       0x7     /* Auto-Negotiation Next Page Transmit */
00084 #define MII_ANLPRNP     0x8     /* Auto-Neg Link Partner Received Next Page */
00085 #define MII_MS_CTRL     0x9     /* MASTER-SLAVE Control Register */
00086 #define         MII_MSC_TEST_MODE       0xE000  /* Test mode */
00087 #define         MII_MSC_MS_MANUAL       0x1000  /* Master/slave manual config */
00088 #define         MII_MSC_MS_VAL          0x0800  /* Master/slave value */
00089 #define         MII_MSC_MULTIPORT       0x0400  /* Multi-port device */
00090 #define         MII_MSC_1000T_FD        0x0200  /* 1000Base-T Full Duplex */
00091 #define         MII_MSC_1000T_HD        0x0100  /* 1000Base-T Half Duplex */
00092 #define         MII_MSC_RES             0x00FF  /* Reserved */
00093 #define MII_MS_STATUS   0xA     /* MASTER-SLAVE Status Register */
00094 #define         MII_MSS_FAULT           0x8000  /* Master/slave config fault */
00095 #define         MII_MSS_MASTER          0x4000  /* Master */
00096 #define         MII_MSS_LOCREC          0x2000  /* Local Receiver OK */
00097 #define         MII_MSS_REMREC          0x1000  /* Remote Receiver OK */
00098 #define         MII_MSS_LP1000T_FD      0x0800  /* Link Partner 1000-T FD */
00099 #define         MII_MSS_LP1000T_HD      0x0400  /* Link Partner 1000-T HD */
00100 #define         MII_MSS_RES             0x0300  /* Reserved */
00101 #define         MII_MSS_IDLE_ERR        0x00FF  /* Idle Error Counter */
00102 /* 0xB ... 0xE */               /* Reserved */
00103 #define MII_EXT_STATUS  0xF     /* Extended Status */
00104 #define         MII_ESTAT_1000XFD       0x8000  /* 1000Base-X Full Duplex */
00105 #define         MII_ESTAT_1000XHD       0x4000  /* 1000Base-X Half Duplex */
00106 #define         MII_ESTAT_1000TFD       0x2000  /* 1000Base-T Full Duplex */
00107 #define         MII_ESTAT_1000THD       0x1000  /* 1000Base-T Half Duplex */
00108 #define         MII_ESTAT_RES           0x0FFF  /* Reserved */
00109 /* 0x10 ... 0x1F */             /* Vendor Specific */
00110 
00111 _PROTOTYPE( void mii_print_stat_speed, (U16_t stat, U16_t extstat)      );
00112 _PROTOTYPE( void mii_print_techab, (U16_t techab)                       );
00113 
00114 /*
00115  * $PchId: mii.h,v 1.1 2004/12/27 13:33:30 philip Exp $
00116  */

Generated on Fri Apr 14 22:57:16 2006 for minix by  doxygen 1.4.6