1139749Simp/*-
276479Swpaul * Copyright (c) 2001 Wind River Systems
376479Swpaul * Copyright (c) 2001
476479Swpaul *	Bill Paul <wpaul@bsdi.com>.  All rights reserved.
576479Swpaul *
676479Swpaul * Redistribution and use in source and binary forms, with or without
776479Swpaul * modification, are permitted provided that the following conditions
876479Swpaul * are met:
976479Swpaul * 1. Redistributions of source code must retain the above copyright
1076479Swpaul *    notice, this list of conditions and the following disclaimer.
1176479Swpaul * 2. Redistributions in binary form must reproduce the above copyright
1276479Swpaul *    notice, this list of conditions and the following disclaimer in the
1376479Swpaul *    documentation and/or other materials provided with the distribution.
1476479Swpaul * 3. All advertising materials mentioning features or use of this software
1576479Swpaul *    must display the following acknowledgement:
1676479Swpaul *	This product includes software developed by Bill Paul.
1776479Swpaul * 4. Neither the name of the author nor the names of any co-contributors
1876479Swpaul *    may be used to endorse or promote products derived from this software
1976479Swpaul *    without specific prior written permission.
2076479Swpaul *
2176479Swpaul * THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
2276479Swpaul * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2376479Swpaul * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2476479Swpaul * ARE DISCLAIMED.  IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
2576479Swpaul * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
2676479Swpaul * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
2776479Swpaul * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
2876479Swpaul * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
2976479Swpaul * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
3076479Swpaul * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
3176479Swpaul * THE POSSIBILITY OF SUCH DAMAGE.
3276479Swpaul *
3376479Swpaul * $FreeBSD: releng/10.3/sys/dev/mii/nsgphyreg.h 139749 2005-01-06 01:43:34Z imp $
3476479Swpaul */
3576479Swpaul
3676479Swpaul#ifndef _DEV_MII_NSGPHYREG_H_
3776479Swpaul#define	_DEV_MII_NSGPHYREG_H_
3876479Swpaul
3976479Swpaul/*
4076479Swpaul * NatSemi DP83891 registers
4176479Swpaul */
4276479Swpaul
4376479Swpaul#define NSGPHY_MII_STRAPOPT	0x10	/* Strap options */
4476479Swpaul#define NSGPHY_STRAPOPT_PHYADDR	0xF800	/* PHY address */
4576479Swpaul#define NSGPHY_STRAPOPT_COMPAT	0x0400	/* Broadcom compat mode */
4676479Swpaul#define NSGPHY_STRAPOPT_MMSE	0x0200	/* Manual master/slave enable */
4776479Swpaul#define NSGPHY_STRAPOPT_ANEG	0x0100	/* Autoneg enable */
4876479Swpaul#define NSGPHY_STRAPOPT_MMSV	0x0080	/* Manual master/slave setting */
4976479Swpaul#define NSGPHY_STRAPOPT_1000HDX	0x0010	/* Advertise 1000 half-duplex */
5076479Swpaul#define NSGPHY_STRAPOPT_1000FDX	0x0008	/* Advertise 1000 full-duplex */
5176479Swpaul#define NSGPHY_STRAPOPT_100_ADV	0x0004	/* Advertise 100 full/half-duplex */
5295664Sphk#define NSGPHY_STRAPOPT_SPEED1	0x0002	/* speed selection */
5395664Sphk#define NSGPHY_STRAPOPT_SPEED0	0x0001	/* speed selection */
5495664Sphk#define NSGPHY_STRAPOPT_SPDSEL  (NSGPHY_STRAPOPT_SPEED1|NSGPHY_STRAPOPT_SPEED0)
5576479Swpaul
5676479Swpaul#define NSGPHY_MII_PHYSUP	0x11	/* PHY support/current status */
5795718Sphk#define PHY_SUP_SPEED1		0x0010  /* speed bit 1 */
5895718Sphk#define PHY_SUP_SPEED0		0x0008  /* speed bit 1 */
5995664Sphk#define NSGPHY_PHYSUP_SPEED1	0x0010	/* speed status */
6095664Sphk#define NSGPHY_PHYSUP_SPEED0	0x0008	/* speed status */
6195664Sphk#define NSGPHY_PHYSUP_SPDSTS	(NSGPHY_PHYSUP_SPEED1|NSGPHY_PHYSUP_SPEED0)
6276479Swpaul#define NSGPHY_PHYSUP_LNKSTS	0x0004	/* link status */
6395718Sphk#define PHY_SUP_LINK		0x0004	/* link status */
6495718Sphk#define PHY_SUP_DUPLEX		0x0002	/* 1 == full-duplex */
6576479Swpaul#define NSGPHY_PHYSUP_DUPSTS	0x0002	/* duplex status 1 == full */
6676479Swpaul#define NSGPHY_PHYSUP_10BT	0x0001	/* 10baseT resolved */
6776479Swpaul
6876479Swpaul#define NSGPHY_SPDSTS_1000	0x0010
6976479Swpaul#define NSGPHY_SPDSTS_100	0x0008
7076479Swpaul#define NSGPHY_SPDSTS_10	0x0000
7176479Swpaul
7276479Swpaul#endif /* _DEV_NSGPHY_MIIREG_H_ */
73