1179896Sdelphij/*-
2179896Sdelphij * Copyright (c) 2007 The DragonFly Project.  All rights reserved.
3179896Sdelphij *
4179896Sdelphij * This code is derived from software contributed to The DragonFly Project
5179896Sdelphij * by Sepherosa Ziehau <sepherosa@gmail.com>
6179896Sdelphij *
7179896Sdelphij * Redistribution and use in source and binary forms, with or without
8179896Sdelphij * modification, are permitted provided that the following conditions
9179896Sdelphij * are met:
10179896Sdelphij *
11179896Sdelphij * 1. Redistributions of source code must retain the above copyright
12179896Sdelphij *    notice, this list of conditions and the following disclaimer.
13179896Sdelphij * 2. Redistributions in binary form must reproduce the above copyright
14179896Sdelphij *    notice, this list of conditions and the following disclaimer in
15179896Sdelphij *    the documentation and/or other materials provided with the
16179896Sdelphij *    distribution.
17179896Sdelphij * 3. Neither the name of The DragonFly Project nor the names of its
18179896Sdelphij *    contributors may be used to endorse or promote products derived
19179896Sdelphij *    from this software without specific, prior written permission.
20179896Sdelphij *
21179896Sdelphij * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22179896Sdelphij * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23179896Sdelphij * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24179896Sdelphij * FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE
25179896Sdelphij * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26179896Sdelphij * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
27179896Sdelphij * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28179896Sdelphij * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
29179896Sdelphij * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
30179896Sdelphij * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
31179896Sdelphij * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32179896Sdelphij * SUCH DAMAGE.
33179896Sdelphij *
34179896Sdelphij * $DragonFly: src/sys/dev/netif/mii_layer/truephyreg.h,v 1.2 2007/10/23 14:28:42 sephe Exp $
35179896Sdelphij * $FreeBSD$
36179896Sdelphij */
37179896Sdelphij
38179896Sdelphij#ifndef _MII_TRUEPHYREG_H
39179896Sdelphij#define _MII_TRUEPHYREG_H
40179896Sdelphij
41179896Sdelphij#define TRUEPHY_INDEX		0x10	/* XXX reserved in DS */
42179896Sdelphij#define TRUEPHY_INDEX_MAGIC	0x402
43179896Sdelphij#define TRUEPHY_DATA		0x11	/* XXX reserved in DS */
44179896Sdelphij
45179896Sdelphij#define TRUEPHY_CTRL		0x12
46179896Sdelphij#define TRUEPHY_CTRL_DIAG	0x0004
47179896Sdelphij#define TRUEPHY_CTRL_RSV1	0x0002	/* XXX reserved */
48179896Sdelphij#define TRUEPHY_CTRL_RSV0	0x0001	/* XXX reserved */
49179896Sdelphij
50179896Sdelphij#define TRUEPHY_CONF		0x16
51179896Sdelphij#define TRUEPHY_CONF_TXFIFO_MASK 0x3000
52179896Sdelphij#define TRUEPHY_CONF_TXFIFO_8	0x0000
53179896Sdelphij#define TRUEPHY_CONF_TXFIFO_16	0x1000
54179896Sdelphij#define TRUEPHY_CONF_TXFIFO_24	0x2000
55179896Sdelphij#define TRUEPHY_CONF_TXFIFO_32	0x3000
56179896Sdelphij
57179896Sdelphij#define TRUEPHY_SR		0x1a
58179896Sdelphij#define TRUEPHY_SR_SPD_MASK	0x0300
59179896Sdelphij#define TRUEPHY_SR_SPD_1000T	0x0200
60179896Sdelphij#define TRUEPHY_SR_SPD_100TX	0x0100
61179896Sdelphij#define TRUEPHY_SR_SPD_10T	0x0000
62179896Sdelphij#define TRUEPHY_SR_FDX		0x0080
63179896Sdelphij
64179896Sdelphij#endif	/* !_MII_TRUEPHYREG_H */
65