xmphyreg.h revision 89234
159477Swpaul/* 259477Swpaul * Copyright (c) 2000 359477Swpaul * Bill Paul <wpaul@ee.columbia.edu>. All rights reserved. 459477Swpaul * 559477Swpaul * Redistribution and use in source and binary forms, with or without 659477Swpaul * modification, are permitted provided that the following conditions 759477Swpaul * are met: 859477Swpaul * 1. Redistributions of source code must retain the above copyright 959477Swpaul * notice, this list of conditions and the following disclaimer. 1059477Swpaul * 2. Redistributions in binary form must reproduce the above copyright 1159477Swpaul * notice, this list of conditions and the following disclaimer in the 1259477Swpaul * documentation and/or other materials provided with the distribution. 1359477Swpaul * 3. All advertising materials mentioning features or use of this software 1459477Swpaul * must display the following acknowledgement: 1559477Swpaul * This product includes software developed by Bill Paul. 1659477Swpaul * 4. Neither the name of the author nor the names of any co-contributors 1759477Swpaul * may be used to endorse or promote products derived from this software 1859477Swpaul * without specific prior written permission. 1959477Swpaul * 2059477Swpaul * THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND 2159477Swpaul * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2259477Swpaul * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2359477Swpaul * ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD 2459477Swpaul * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 2559477Swpaul * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 2659477Swpaul * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 2759477Swpaul * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 2859477Swpaul * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 2959477Swpaul * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 3059477Swpaul * THE POSSIBILITY OF SUCH DAMAGE. 3159477Swpaul * 3259477Swpaul * $FreeBSD: head/sys/dev/mii/xmphyreg.h 89234 2002-01-10 18:06:41Z archie $ 3359477Swpaul */ 3459477Swpaul 3559477Swpaul#ifndef _DEV_MII_XMPHYREG_H_ 3659477Swpaul#define _DEV_MII_XMPHYREG_H_ 3759477Swpaul 3859477Swpaul/* 3959477Swpaul * XaQti XMAC II PHY registers 4059477Swpaul */ 4159477Swpaul 4259477Swpaul#define XMPHY_MII_BMCR 0x00 4359477Swpaul#define XMPHY_BMCR_RESET 0x8000 4459477Swpaul#define XMPHY_BMCR_LOOP 0x4000 4559477Swpaul#define XMPHY_BMCR_AUTOEN 0x1000 /* Autoneg enabled */ 4659477Swpaul#define XMPHY_BMCR_PDOWN 0x0800 /* Power down */ 4777078Swpaul#define XMPHY_BMCR_ISO 0x0400 /* Isolate */ 4859477Swpaul#define XMPHY_BMCR_STARTNEG 0x0200 /* Restart autoneg */ 4959477Swpaul#define XMPHY_BMCR_FDX 0x0100 /* Duplex mode */ 5059477Swpaul 5159477Swpaul#define XMPHY_MII_BMSR 0x01 5259477Swpaul#define XMPHY_BMSR_EXTSTS 0x0100 /* Extended status present */ 5359477Swpaul#define XMPHY_BMSR_ACOMP 0x0020 /* Autoneg complete */ 5459477Swpaul#define XMPHY_BMSR_RFAULT 0x0010 /* Remote fault condition occured */ 5559477Swpaul#define XMPHY_BMSR_ANEG 0x0008 /* Autoneg capable */ 5659477Swpaul#define XMPHY_BMSR_LINK 0x0004 /* Link status */ 5759477Swpaul#define XMPHY_BMSR_EXT 0x0001 /* Extended capability */ 5859477Swpaul 5959477Swpaul#define XMPHY_MII_ANAR 0x04 6059477Swpaul#define XMPHY_ANAR_NP 0x8000 /* Next page */ 6159477Swpaul#define XMPHY_ANAR_ACK 0x4000 /* Next page or base received */ 6259477Swpaul#define XMPHY_ANAR_RFBITS 0x3000 /* Remote fault bits */ 6359477Swpaul#define XMPHY_ANAR_PAUSEBITS 0x0180 /* Pause bits */ 6489234Sarchie#define XMPHY_ANAR_HDX 0x0040 /* Select half duplex */ 6589234Sarchie#define XMPHY_ANAR_FDX 0x0020 /* Select full duplex */ 6659477Swpaul 6759477Swpaul#define XMPHY_MII_ANLPAR 0x05 6859477Swpaul#define XMPHY_ANLPAR_NP 0x8000 /* Next page */ 6959477Swpaul#define XMPHY_ANLPAR_ACK 0x4000 /* Next page or base received */ 7059477Swpaul#define XMPHY_ANLPAR_RFBITS 0x3000 /* Remote fault bits */ 7159477Swpaul#define XMPHY_ANLPAR_PAUSEBITS 0x0180 /* Pause bits */ 7289234Sarchie#define XMPHY_ANLPAR_HDX 0x0040 /* Select half duplex */ 7389234Sarchie#define XMPHY_ANLPAR_FDX 0x0020 /* Select full duplex */ 7459477Swpaul 7559477Swpaul#define XMPHY_RF_OK 0x0000 /* No error -- link is good */ 7659477Swpaul#define XMPHY_RF_LINKFAIL 0x1000 /* Link failure */ 7759477Swpaul#define XMPHY_RF_OFFLINE 0x2000 /* Offline */ 7859477Swpaul#define XMPHY_RF_ANEGFAIL 0x3000 /* Autonegotiation error */ 7959477Swpaul 8059477Swpaul#define XMPHY_PAUSE_NOPAUSE 0x0000 /* No pause possible */ 8159477Swpaul#define XMPHY_PAUSE_ASYMETRIC 0x0080 /* Asymetric pause toward LP */ 8259477Swpaul#define XMPHY_PAUSE_SYMETRIC 0x0100 /* Symetric pause */ 8359477Swpaul#define XMPHY_PAUSE_BOTH 0x0180 /* Both sym and asym pause */ 8459477Swpaul 8559477Swpaul#define XMPHY_MII_ANER 0x06 8659477Swpaul#define XMPHY_ANER_LPNP 0x0008 /* Link partner can next page */ 8759477Swpaul#define XMPHY_ANER_NP 0x0004 /* Local PHY can next page */ 8859477Swpaul#define XMPHY_ANER_RX 0x0002 /* Next page received */ 8959477Swpaul 9059477Swpaul#define XMPHY_MII_NEXTP 0x07 /* Next page */ 9159477Swpaul#define XMPHY_NEXTP_MORE 0x8000 /* More next pages to follow */ 9259477Swpaul#define XMPHY_NEXTP_ACK1 0x4000 /* Ack bit received OK */ 9359477Swpaul#define XMPHY_NEXTP_MP 0x2000 /* Page is message page */ 9459477Swpaul#define XMPHY_NEXTP_ACK2 0x1000 /* can comply with message (r/o) */ 9559477Swpaul#define XMPHY_NEXTP_TOGGLE 0x0800 /* sync with LP */ 9659477Swpaul#define XMPHY_NEXTP_MESSAGE 0x07FF /* message */ 9759477Swpaul 9859477Swpaul#define XMPHY_MII_NEXTPLP 0x08 /* Next page of link partner */ 9959477Swpaul#define XMPHY_NEXTPLP_MORE 0x8000 /* More next pages to follow */ 10059477Swpaul#define XMPHY_NEXTPLP_ACK1 0x4000 /* Ack bit received OK */ 10159477Swpaul#define XMPHY_NEXTPLP_MP 0x2000 /* Page is message page */ 10259477Swpaul#define XMPHY_NEXTPLP_ACK2 0x1000 /* can comply with message (r/o) */ 10359477Swpaul#define XMPHY_NEXTPLP_TOGGLE 0x0800 /* sync with LP */ 10459477Swpaul#define XMPHY_NEXTPLP_MESSAGE 0x07FF /* message */ 10559477Swpaul 10659477Swpaul#define XMPHY_MII_EXTSTS 0x0F /* Extended status */ 10759477Swpaul#define XMPHY_EXTSTS_FDX 0x8000 /* 1000base-X FD capable */ 10859477Swpaul#define XMPHY_EXTSTS_HDX 0x4000 /* 1000base-X HD capable */ 10959477Swpaul 11059477Swpaul#define XMPHY_MII_RESAB 0x10 /* Resolved ability */ 11159477Swpaul#define XMPHY_RESAB_PAUSEBITS 0x0180 /* Pause bits */ 11259477Swpaul#define XMPHY_RESAB_HDX 0x0040 /* Half duplex selected */ 11359477Swpaul#define XMPHY_RESAB_FDX 0x0020 /* Full duplex selected */ 11459477Swpaul#define XMPHY_RESAB_ABLMIS 0x0010 /* Ability mismatch */ 11559477Swpaul#define XMPHY_RESAB_PAUSEMIS 0x0008 /* Pause mismatch */ 11659477Swpaul 11759477Swpaul#endif /* _DEV_MII_XMPHYREG_H_ */ 118