Home | History | Annotate | Line # | Download | only in mii
      1  1.5   martin /*	$NetBSD: inphyreg.h,v 1.5 2008/04/28 20:23:53 martin 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  *
     20  1.1  thorpej  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     21  1.1  thorpej  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     22  1.1  thorpej  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     23  1.1  thorpej  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     24  1.1  thorpej  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     25  1.1  thorpej  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     26  1.1  thorpej  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     27  1.1  thorpej  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     28  1.1  thorpej  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     29  1.1  thorpej  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     30  1.1  thorpej  * POSSIBILITY OF SUCH DAMAGE.
     31  1.1  thorpej  */
     32  1.1  thorpej 
     33  1.1  thorpej #ifndef _DEV_MII_INPHYREG_H_
     34  1.1  thorpej #define	_DEV_MII_INPHYREG_H_
     35  1.1  thorpej 
     36  1.1  thorpej /*
     37  1.1  thorpej  * Intel 82555 registers.
     38  1.1  thorpej  */
     39  1.1  thorpej 
     40  1.1  thorpej #define	MII_INPHY_SCR		0x10	/* Status and Control */
     41  1.1  thorpej #define	SCR_FLOWCTL		0x8000	/* PHY Base flow control enabled */
     42  1.1  thorpej #define	SCR_CSDC		0x2000	/* Carrier sense disconnect control */
     43  1.1  thorpej #define	SCR_TFCD		0x1000	/* Transmit flow control disable */
     44  1.1  thorpej #define	SCR_RDSI		0x0800	/* Receive deserializer in-sync */
     45  1.1  thorpej #define	SCR_100TXPD		0x0400	/* 100baseTX is powered down */
     46  1.1  thorpej #define	SCR_10TPD		0x0200	/* 10baseT is powered down */
     47  1.1  thorpej #define	SCR_POLARITY		0x0100	/* reverse 10baseT polarity */
     48  1.1  thorpej #define	SCR_T4			0x0004	/* autoneg resulted in 100baseT4 */
     49  1.1  thorpej #define	SCR_S100		0x0002	/* autoneg resulted in 100baseTX */
     50  1.1  thorpej #define	SCR_FDX			0x0001	/* autoneg resulted in full-duplex */
     51  1.1  thorpej 
     52  1.1  thorpej #define	MII_INPHY_SCTRL		0x11	/* Special Control Bit */
     53  1.1  thorpej #define	SCTRL_SCRBYPASS		0x8000	/* scrambler bypass */
     54  1.1  thorpej #define	SCTRL_4B5BNYPASS	0x4000	/* 4bit to 5bit bypass */
     55  1.1  thorpej #define	SCTRL_FTHP		0x2000	/* force transmit H-pattern */
     56  1.1  thorpej #define	SCTRL_F34TP		0x1000	/* force 34 transmit patter */
     57  1.1  thorpej #define	SCTRL_GOODLINK		0x0800	/* 100baseTX link good */
     58  1.1  thorpej #define	SCTRL_TCSD		0x0200	/* transmit carrier sense disable */
     59  1.1  thorpej #define	SCTRL_DDPD		0x0100	/* disable dynamic power-down */
     60  1.3      wiz #define	SCTRL_ANEGLOOP		0x0080	/* autonegotiation loopback */
     61  1.1  thorpej #define	SCTRL_MDITRISTATE	0x0040	/* MDI Tri-state */
     62  1.1  thorpej #define	SCTRL_FILTERBYPASS	0x0020	/* Filter bypass */
     63  1.1  thorpej #define	SCTRL_AUTOPOLDIS	0x0010	/* auto-polarity disable */
     64  1.1  thorpej #define	SCTRL_SQUELCHDIS	0x0008	/* squlch test disable */
     65  1.1  thorpej #define	SCTRL_EXTSQUELCH	0x0004	/* extended sequelch enable */
     66  1.1  thorpej #define	SCTRL_LINKINTDIS	0x0002	/* link integrity disable */
     67  1.1  thorpej #define	SCTRL_JABBERDIS		0x0001	/* jabber disabled */
     68  1.1  thorpej 
     69  1.1  thorpej #define	MII_INPHY_100TXRDC	0x14	/* 100baseTX Receive Disconnect Cntr */
     70  1.1  thorpej 
     71  1.1  thorpej #define	MII_INPHY_100TXREFC	0x15	/* 100baseTX Receive Error Frame Ctr */
     72  1.1  thorpej 
     73  1.1  thorpej #define	MII_INPHY_RSEC		0x16	/* Receive Symbol Error Counter */
     74  1.1  thorpej 
     75  1.1  thorpej #define	MII_INPHY_100TXRPEOFC	0x17	/* 100baseTX Rcv Premature EOF Ctr */
     76  1.1  thorpej 
     77  1.1  thorpej #define	MII_INPHY_10TREOFC	0x18	/* 10baseT Rcv EOF Ctr */
     78  1.1  thorpej 
     79  1.1  thorpej #define	MII_INPHY_10TTJDC	0x19	/* 10baseT Tx Jabber Detect Ctr */
     80  1.1  thorpej 
     81  1.2  thorpej #define	MII_INPHY_SCTRL2	0x1b	/* 82555 Special Control */
     82  1.1  thorpej #define	SCTRL2_LEDMASK		0x0007	/* mask of LEDs control: see below */
     83  1.1  thorpej 
     84  1.1  thorpej #define	LEDMASK_ACTLINK		0x0000	/* A = Activity, L = Link */
     85  1.1  thorpej #define	LEDMASK_SPDCOLL		0x0001	/* A = Speed, L = Collision */
     86  1.1  thorpej #define	LEDMASK_SPDLINK		0x0002	/* A = Speed, L = Link */
     87  1.1  thorpej #define	LEDMASK_ACTCOLL		0x0003	/* A = Activity, L = Collision */
     88  1.1  thorpej #define	LEDMASK_OFFOFF		0x0004	/* A = off, L = off */
     89  1.1  thorpej #define	LEDMASK_OFFON		0x0005	/* A = off, L = on */
     90  1.1  thorpej #define	LEDMASK_ONOFF		0x0006	/* A = on, L = off */
     91  1.1  thorpej #define	LESMASK_ONON		0x0007	/* A = on, L = on */
     92  1.1  thorpej 
     93  1.1  thorpej #endif /* _DEV_MII_INPHYREG_H_ */
     94