Home | History | Annotate | Line # | Download | only in mii
nsphyterreg.h revision 1.2.22.1
      1  1.2.22.1    skrll /*	$NetBSD: nsphyterreg.h,v 1.2.22.1 2005/03/04 16:44:57 skrll Exp $	*/
      2       1.1  thorpej 
      3       1.1  thorpej /*-
      4       1.2  thorpej  * Copyright (c) 1999, 2001 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_NSPHYTERREG_H_
     41       1.1  thorpej #define	_DEV_MII_NSPHYTERREG_H_
     42       1.1  thorpej 
     43       1.1  thorpej /*
     44       1.2  thorpej  * DP83843 registers.  We also have the MacPHYTER (DP83815) internal
     45       1.2  thorpej  * PHY register definitions here, since the two are, for our purposes,
     46       1.2  thorpej  * compatible.
     47       1.1  thorpej  */
     48       1.1  thorpej 
     49       1.1  thorpej #define	MII_NSPHYTER_PHYSTS	0x10	/* PHY status */
     50       1.1  thorpej #define	PHYSTS_REL		0x8000	/* receive error latch */
     51       1.1  thorpej #define	PHYSTS_CIML		0x4000	/* CIM latch */
     52       1.1  thorpej #define	PHYSTS_FCSL		0x2000	/* false carrier sense latch */
     53       1.1  thorpej #define	PHYSTS_DEVRDY		0x0800	/* device ready */
     54       1.1  thorpej #define	PHYSTS_PGRX		0x0400	/* page received */
     55       1.1  thorpej #define	PHYSTS_ANEGEN		0x0200	/* autoneg. enabled */
     56       1.1  thorpej #define	PHYSTS_MIIINTR		0x0100	/* MII interrupt */
     57       1.1  thorpej #define	PHYSTS_REMFAULT		0x0080	/* remote fault */
     58       1.1  thorpej #define	PHYSTS_JABBER		0x0040	/* jabber detect */
     59       1.1  thorpej #define	PHYSTS_NWAYCOMP		0x0020	/* NWAY complete */
     60       1.1  thorpej #define	PHYSTS_RESETSTAT	0x0010	/* reset status */
     61       1.1  thorpej #define	PHYSTS_LOOPBACK		0x0008	/* loopback status */
     62       1.1  thorpej #define	PHYSTS_DUPLEX		0x0004	/* full duplex */
     63       1.1  thorpej #define	PHYSTS_SPEED10		0x0002	/* speed == 10Mb/s */
     64       1.1  thorpej #define	PHYSTS_LINK		0x0001	/* link up */
     65       1.2  thorpej 	/* below are the MacPHYTER bits that are different */
     66       1.2  thorpej #define	PHYSTS_MP_REL		0x2000	/* receive error latch */
     67       1.2  thorpej #define	PHYSTS_MP_POLARITY	0x1000	/* polarity inverted */
     68       1.2  thorpej #define	PHYSTS_MP_FCSL		0x0800	/* false carrier sense latch */
     69       1.2  thorpej #define	PHYSTS_MP_SIGNAL	0x0400	/* signal detect */
     70       1.2  thorpej #define	PHYSTS_MP_DESCRLK	0x0200	/* de-scrambler lock */
     71       1.2  thorpej #define	PHYSTS_MP_PGRX		0x0100	/* page received */
     72       1.2  thorpej #define	PHYSTS_MP_MIIINTR	0x0080	/* MII interrupt */
     73       1.2  thorpej #define	PHYSTS_MP_REMFAULT	0x0040	/* remote fault */
     74       1.2  thorpej #define	PHYSTS_MP_JABBER	0x0020	/* jabber detect */
     75       1.2  thorpej #define	PHYSTS_MP_NWAYCOMP	0x0010	/* NWAY complete */
     76       1.1  thorpej 
     77       1.1  thorpej 
     78       1.1  thorpej #define	MII_NSPHYTER_MIPSCR	0x11	/* MII interrupt PHY specific
     79       1.1  thorpej 					   control */
     80       1.1  thorpej 
     81       1.1  thorpej #define	MIPSCR_INTEN		0x0002	/* interrupt enable */
     82       1.1  thorpej #define	MIPSCR_TINT		0x0001	/* test interrupt */
     83       1.1  thorpej 
     84       1.1  thorpej 
     85       1.1  thorpej #define	MII_NSPHYTER_MIPGSR	0x12	/* MII interrupt PHY generic
     86       1.1  thorpej 					   status */
     87       1.1  thorpej #define	MIPGSR_MINT		0x8000	/* MII interrupt pending */
     88       1.2  thorpej 	/* below are MacPHYTER only */
     89       1.2  thorpej #define	MIPGSR_MSK_LINK		0x4000	/* mask link status event */
     90       1.2  thorpej #define	MIPGSR_MSK_JAB		0x2000	/* mask jabber event */
     91  1.2.22.1    skrll #define	MIPGSR_MSK_RF		0x1000	/* mask remote fault event */
     92       1.2  thorpej #define	MIPGSR_MSK_ANC		0x0800	/* mask auto-neg complete event */
     93       1.2  thorpej #define	MIPGSR_MSK_FHF		0x0400	/* mask false carrier half full event */
     94       1.2  thorpej #define	MIPGSR_MSK_RHF		0x0200	/* mask rx error half full event */
     95       1.1  thorpej 
     96       1.1  thorpej #define	MII_NSPHYTER_DCR	0x13	/* Disconnect counter */
     97       1.1  thorpej 
     98       1.1  thorpej #define	MII_NSPHYTER_FCSCR	0x14	/* False carrier sense counter */
     99       1.1  thorpej 
    100       1.1  thorpej #define	MII_NSPHYTER_RECR	0x15	/* Receive error counter */
    101       1.1  thorpej 
    102       1.1  thorpej 
    103       1.1  thorpej #define	MII_NSPHYTER_PCSR	0x16	/* PCS configuration and status */
    104       1.1  thorpej #define	PCSR_SINGLE_SD		0x8000	/* single-ended SD mode */
    105       1.1  thorpej #define	PCSR_FEFI_EN		0x4000	/* far end fault indication mode */
    106       1.1  thorpej #define	PCSR_DESCR_TO_RST	0x2000	/* reset descrambler timeout counter */
    107       1.1  thorpej #define	PCSR_DESCR_TO_SEL	0x1000	/* descrambler timer mode */
    108       1.1  thorpej #define	PCSR_DESCR_TO_DIS	0x0800	/* descrambler timer disable */
    109       1.1  thorpej #define	PCSR_LD_SCR_SD		0x0400	/* load scrambler seed */
    110       1.1  thorpej #define	PCSR_TX_QUIET		0x0200	/* 100Mb/s transmit true quiet mode */
    111       1.1  thorpej #define	PCSR_TX_PATTERN		0x0180	/* 100Mb/s transmit test pattern */
    112       1.1  thorpej #define	PCSR_F_LINK_100		0x0040	/* force good link in 100Mb/s */
    113       1.1  thorpej #define	PCSR_CIM_DIS		0x0020	/* carrier integrity monitor disable */
    114       1.1  thorpej #define	PCSR_CIM_STATUS		0x0010	/* carrier integrity monitor status */
    115       1.1  thorpej #define	PCSR_CODE_ERR		0x0008	/* code errors */
    116       1.1  thorpej #define	PCSR_PME_ERR		0x0004	/* premature end errors */
    117       1.1  thorpej #define	PCSR_LINK_ERR		0x0002	/* link errors */
    118       1.1  thorpej #define	PCSR_PKT_ERR		0x0001	/* packet errors */
    119       1.2  thorpej 	/* below are the MacPHYTER bits that are different */
    120       1.2  thorpej #define	PCSR_MP_BYP_4B5B	0x1000	/* bypass encoder */
    121       1.2  thorpej #define	PCSR_MP_FREE_CLK	0x0800	/* free funning rx clock */
    122       1.2  thorpej #define	PCSR_MP_TQ_EN		0x0400	/* enable True Quiet mode */
    123       1.2  thorpej #define	PCSR_MP_SD_FORCE_B	0x0200	/* force signal detection */
    124       1.2  thorpej #define	PCSR_MP_SD_OPTION	0x0100	/* enhanced signal detection alg. */
    125       1.2  thorpej #define	PCSR_MP_NRZI_BYPASS	0x0004	/* NRZI bypass enabled */
    126       1.1  thorpej 
    127       1.1  thorpej 
    128       1.2  thorpej 	/* Not on MacPHYTER */
    129       1.1  thorpej #define	MII_NSPHYTER_LBR	0x17	/* loopback and bypass */
    130       1.1  thorpej #define	LBR_BP_STRETCH		0x4000	/* bypass LED stretching */
    131       1.1  thorpej #define	LBR_BP_4B5B		0x2000	/* bypass encoding/decoding */
    132       1.1  thorpej #define	LBR_BP_SCR		0x1000	/* bypass scrambler/descrambler */
    133       1.1  thorpej #define	LBR_BP_RX		0x0800	/* bypass receive function */
    134       1.1  thorpej #define	LBR_BP_TX		0x0400	/* bypass transmit function */
    135       1.1  thorpej #define	LBR_100_DP_CTL		0x0380	/* 100Mb/s data patch control */
    136       1.1  thorpej #define	LBR_TW_LBEN		0x0020	/* TWISTER loopback enable */
    137       1.1  thorpej #define	LBR_10_ENDEC_LB		0x0010	/* 10Mb/s ENDEC loopback */
    138       1.1  thorpej 
    139       1.1  thorpej 
    140       1.2  thorpej 	/* Not on MacPHYTER */
    141       1.1  thorpej #define	MII_NSPHYTER_10BTSCR	0x18	/* 10baseT status and control */
    142       1.1  thorpej #define	BTSCR_AUI_TPI		0x2000	/* TREX operating mode */
    143       1.1  thorpej #define	BTSCR_RX_SERIAL		0x1000	/* 10baseT RX serial mode */
    144       1.1  thorpej #define	BTSCR_TX_SERIAL		0x0800	/* 10baseT TX serial mode */
    145       1.1  thorpej #define	BTSCR_POL_DS		0x0400	/* polarity detection and correction
    146       1.1  thorpej 					   disable */
    147       1.1  thorpej #define	BTSCR_AUTOSW_EN		0x0200	/* AUI/TPI autoswitch */
    148       1.1  thorpej #define	BTSCR_LP_DS		0x0100	/* link pulse disable */
    149       1.1  thorpej #define	BTSCR_HB_DS		0x0080	/* heartbeat disabled */
    150       1.1  thorpej #define	BTSCR_LS_SEL		0x0040	/* low squelch select */
    151       1.1  thorpej #define	BTSCR_AUI_SEL		0x0020	/* AUI select */
    152       1.1  thorpej #define	BTSCR_JAB_DS		0x0010	/* jabber disable */
    153       1.1  thorpej #define	BTSCR_THIN_SEL		0x0008	/* thin ethernet select */
    154       1.1  thorpej #define	BTSCR_TX_FILT_DS	0x0004	/* TPI receive filter disable */
    155       1.1  thorpej 
    156       1.1  thorpej 
    157       1.1  thorpej #define	MII_NSPHYTER_PHYCTRL	0x19	/* PHY control */
    158       1.1  thorpej #define	PHYCTRL_TW_EQSEL	0x3000	/* TWISTER e.q. select */
    159       1.1  thorpej #define	PHYCTRL_BLW_DS		0x0800	/* TWISTER base line wander disable */
    160       1.1  thorpej #define	PHYCTRL_REPEATER	0x0200	/* repeater mode */
    161       1.1  thorpej #define	PHYCTRL_LED_TXRX_MODE	0x0180	/* LED TX/RX mode */
    162       1.1  thorpej #define	PHYCTRL_LED_DUP_MODE	0x0040	/* LED DUP mode */
    163       1.1  thorpej #define	PHYCTRL_FX_EN		0x0020	/* Fiber mode enable */
    164       1.1  thorpej #define	PHYCTRL_PHYADDR		0x001f	/* PHY address */
    165       1.2  thorpej 	/* below are the MacPHYTER bits that are different */
    166       1.2  thorpej #define	PHYCRTL_MP_PSR_15	0x0800	/* BIST sequence select */
    167       1.2  thorpej #define	PHYCTRL_MP_BIST_STAT	0x0400	/* BIST passed */
    168       1.2  thorpej #define	PHYCTRL_MP_BIST_START	0x0200	/* start BIST */
    169       1.2  thorpej #define	PHYCTRL_MP_BP_STRETCH	0x0100	/* bypass LED stretching */
    170       1.2  thorpej #define	PHYCTRL_MP_PAUSE_STS	0x0080	/* pause status */
    171       1.2  thorpej 
    172       1.2  thorpej 
    173       1.2  thorpej 	/* MacPHYTER only */
    174       1.2  thorpej #define	MII_MACPHYTER_TBTCTL	0x1a	/* 10baseT Control */
    175       1.2  thorpej #define	TBTCTL_LOOPBACK_10_DIS	0x0100	/* loopback 10Mb/s disable */
    176       1.2  thorpej #define	TBTCTL_LP_DIS		0x0080	/* link pulse disable */
    177       1.2  thorpej #define	TBTCTL_FORCE_LINK_10	0x0040	/* force 10Mb/s link good */
    178       1.2  thorpej #define	TBTCTL_FORCE_POL_COR	0x0020	/* force polarity correction */
    179       1.2  thorpej #define	TBTCTL_INV_POLARITY	0x0010	/* inverted polarity */
    180       1.2  thorpej #define	TBTCTL_AUTOPOL_DIS	0x0008	/* auto-polarity disable */
    181       1.2  thorpej #define	TBTCTL_HEARTBEAT_DIS	0x0002	/* heartbeat disable */
    182       1.2  thorpej #define	TBTCTL_JABBER_DIS	0x0001	/* jabber disable */
    183       1.1  thorpej 
    184       1.1  thorpej #endif /* _DEV_MII_NSPHYTERREG_H_ */
    185