Home | History | Annotate | Line # | Download | only in mii
inphyreg.h revision 1.1.8.1
      1  1.1.8.1  thorpej /*	$NetBSD: inphyreg.h,v 1.1.8.1 1999/07/01 23:32:50 thorpej Exp $	*/
      2      1.1  thorpej 
      3      1.1  thorpej /*-
      4      1.1  thorpej  * Copyright (c) 1998 The NetBSD Foundation, Inc.
      5      1.1  thorpej  * All rights reserved.
      6      1.1  thorpej  *
      7      1.1  thorpej  * This code is derived from software contributed to The NetBSD Foundation
      8      1.1  thorpej  * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,
      9      1.1  thorpej  * NASA Ames Research Center.
     10      1.1  thorpej  *
     11      1.1  thorpej  * Redistribution and use in source and binary forms, with or without
     12      1.1  thorpej  * modification, are permitted provided that the following conditions
     13      1.1  thorpej  * are met:
     14      1.1  thorpej  * 1. Redistributions of source code must retain the above copyright
     15      1.1  thorpej  *    notice, this list of conditions and the following disclaimer.
     16      1.1  thorpej  * 2. Redistributions in binary form must reproduce the above copyright
     17      1.1  thorpej  *    notice, this list of conditions and the following disclaimer in the
     18      1.1  thorpej  *    documentation and/or other materials provided with the distribution.
     19      1.1  thorpej  * 3. All advertising materials mentioning features or use of this software
     20      1.1  thorpej  *    must display the following acknowledgement:
     21      1.1  thorpej  *	This product includes software developed by the NetBSD
     22      1.1  thorpej  *	Foundation, Inc. and its contributors.
     23      1.1  thorpej  * 4. Neither the name of The NetBSD Foundation nor the names of its
     24      1.1  thorpej  *    contributors may be used to endorse or promote products derived
     25      1.1  thorpej  *    from this software without specific prior written permission.
     26      1.1  thorpej  *
     27      1.1  thorpej  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     28      1.1  thorpej  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     29      1.1  thorpej  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     30      1.1  thorpej  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     31      1.1  thorpej  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     32      1.1  thorpej  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     33      1.1  thorpej  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     34      1.1  thorpej  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     35      1.1  thorpej  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     36      1.1  thorpej  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     37      1.1  thorpej  * POSSIBILITY OF SUCH DAMAGE.
     38      1.1  thorpej  */
     39      1.1  thorpej 
     40      1.1  thorpej #ifndef _DEV_MII_INPHYREG_H_
     41      1.1  thorpej #define	_DEV_MII_INPHYREG_H_
     42      1.1  thorpej 
     43      1.1  thorpej /*
     44      1.1  thorpej  * Intel 82555 registers.
     45      1.1  thorpej  */
     46      1.1  thorpej 
     47      1.1  thorpej #define	MII_INPHY_SCR		0x10	/* Status and Control */
     48      1.1  thorpej #define	SCR_FLOWCTL		0x8000	/* PHY Base flow control enabled */
     49      1.1  thorpej #define	SCR_CSDC		0x2000	/* Carrier sense disconnect control */
     50      1.1  thorpej #define	SCR_TFCD		0x1000	/* Transmit flow control disable */
     51      1.1  thorpej #define	SCR_RDSI		0x0800	/* Receive deserializer in-sync */
     52      1.1  thorpej #define	SCR_100TXPD		0x0400	/* 100baseTX is powered down */
     53      1.1  thorpej #define	SCR_10TPD		0x0200	/* 10baseT is powered down */
     54      1.1  thorpej #define	SCR_POLARITY		0x0100	/* reverse 10baseT polarity */
     55      1.1  thorpej #define	SCR_T4			0x0004	/* autoneg resulted in 100baseT4 */
     56      1.1  thorpej #define	SCR_S100		0x0002	/* autoneg resulted in 100baseTX */
     57      1.1  thorpej #define	SCR_FDX			0x0001	/* autoneg resulted in full-duplex */
     58      1.1  thorpej 
     59      1.1  thorpej #define	MII_INPHY_SCTRL		0x11	/* Special Control Bit */
     60      1.1  thorpej #define	SCTRL_SCRBYPASS		0x8000	/* scrambler bypass */
     61      1.1  thorpej #define	SCTRL_4B5BNYPASS	0x4000	/* 4bit to 5bit bypass */
     62      1.1  thorpej #define	SCTRL_FTHP		0x2000	/* force transmit H-pattern */
     63      1.1  thorpej #define	SCTRL_F34TP		0x1000	/* force 34 transmit patter */
     64      1.1  thorpej #define	SCTRL_GOODLINK		0x0800	/* 100baseTX link good */
     65      1.1  thorpej #define	SCTRL_TCSD		0x0200	/* transmit carrier sense disable */
     66      1.1  thorpej #define	SCTRL_DDPD		0x0100	/* disable dynamic power-down */
     67      1.1  thorpej #define	SCTRL_ANEGLOOP		0x0080	/* autonegotiaion loopback */
     68      1.1  thorpej #define	SCTRL_MDITRISTATE	0x0040	/* MDI Tri-state */
     69      1.1  thorpej #define	SCTRL_FILTERBYPASS	0x0020	/* Filter bypass */
     70      1.1  thorpej #define	SCTRL_AUTOPOLDIS	0x0010	/* auto-polarity disable */
     71      1.1  thorpej #define	SCTRL_SQUELCHDIS	0x0008	/* squlch test disable */
     72      1.1  thorpej #define	SCTRL_EXTSQUELCH	0x0004	/* extended sequelch enable */
     73      1.1  thorpej #define	SCTRL_LINKINTDIS	0x0002	/* link integrity disable */
     74      1.1  thorpej #define	SCTRL_JABBERDIS		0x0001	/* jabber disabled */
     75      1.1  thorpej 
     76      1.1  thorpej #define	MII_INPHY_100TXRDC	0x14	/* 100baseTX Receive Disconnect Cntr */
     77      1.1  thorpej 
     78      1.1  thorpej #define	MII_INPHY_100TXREFC	0x15	/* 100baseTX Receive Error Frame Ctr */
     79      1.1  thorpej 
     80      1.1  thorpej #define	MII_INPHY_RSEC		0x16	/* Receive Symbol Error Counter */
     81      1.1  thorpej 
     82      1.1  thorpej #define	MII_INPHY_100TXRPEOFC	0x17	/* 100baseTX Rcv Premature EOF Ctr */
     83      1.1  thorpej 
     84      1.1  thorpej #define	MII_INPHY_10TREOFC	0x18	/* 10baseT Rcv EOF Ctr */
     85      1.1  thorpej 
     86      1.1  thorpej #define	MII_INPHY_10TTJDC	0x19	/* 10baseT Tx Jabber Detect Ctr */
     87      1.1  thorpej 
     88  1.1.8.1  thorpej #define	MII_INPHY_SCTRL2	0x1b	/* 82555 Special Control */
     89      1.1  thorpej #define	SCTRL2_LEDMASK		0x0007	/* mask of LEDs control: see below */
     90      1.1  thorpej 
     91      1.1  thorpej #define	LEDMASK_ACTLINK		0x0000	/* A = Activity, L = Link */
     92      1.1  thorpej #define	LEDMASK_SPDCOLL		0x0001	/* A = Speed, L = Collision */
     93      1.1  thorpej #define	LEDMASK_SPDLINK		0x0002	/* A = Speed, L = Link */
     94      1.1  thorpej #define	LEDMASK_ACTCOLL		0x0003	/* A = Activity, L = Collision */
     95      1.1  thorpej #define	LEDMASK_OFFOFF		0x0004	/* A = off, L = off */
     96      1.1  thorpej #define	LEDMASK_OFFON		0x0005	/* A = off, L = on */
     97      1.1  thorpej #define	LEDMASK_ONOFF		0x0006	/* A = on, L = off */
     98      1.1  thorpej #define	LESMASK_ONON		0x0007	/* A = on, L = on */
     99      1.1  thorpej 
    100      1.1  thorpej #endif /* _DEV_MII_INPHYREG_H_ */
    101