miiregs.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 1997-2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Definitions for MII registers from 802.3u and vendor documentation
*/
#ifndef _MIIREGS_H
#define _MIIREGS_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/* Register addresses: Section 22.2.4 */
#define MII_CONTROL 0
#define MII_STATUS 1
#define MII_PHYIDH 2
#define MII_PHYIDL 3
/* Control register: 22.2.4.1 */
#define MII_CONTROL_RESERVED 0x7f
/* Status register: 22.2.4.2 */
#define MII_STATUS_EXTENDED (1<<0)
/* Advertisement/Partner ability registers: 28.2.4.1.3/4 */
#define MII_AN_ADVERT_SELECTOR (0x1f)
/* Technology field bits (above). From Annex 28B */
/* Expansion register 28.2.4.1.5 */
/*
* Truncated OUIs as found in the PHY Identifier ( 22.2.4.3.1 ),
* and known models (and their registers) from those manufacturers
*/
#define OUI_NATIONAL_SEMICONDUCTOR 0x80017
#define NS_DP83840 0x00
#define MII_83840_ADDR 25
#define NS83840_ADDR_ADDR (0x1f<<0)
#define OUI_INTEL 0x0aa00
#define MII_82553_EX0 16
#define I82553_EX0_FDUPLEX (1<<0)
#define MII_82553_EX1
#define INTEL_82555 0x15
#define INTEL_82562_EH 0x33
#define INTEL_82562_ET 0x32
#define OUI_ICS 0x57d
#define ICS_1890 2
#define ICS_1889 1
#define ICS_EXCTRL 16
#define ICS_EXCTRL_SCDISABLE (1<<0)
#define ICS_QUICKPOLL 17
#define ICS_QUICKPOLL_LINKSTAT (1<<0)
#define ICS_10BASET 18
#define ICS_10BASET_NOSQUELCH (1<<0)
#define ICS_EXCTRL2 19
#define ICS_EXCTRL2_AUTOPWRDN (1<<0)
#define OUI_DAVICOM 0x0606e
#define DM_SCR 16
#define DM_SCR_RLOUT (1<<0)
#define DM_SCSR 17
#define DM_SCSR_ANMB (0x0f)
#define DM_10BT 18
#ifdef __cplusplus
}
#endif
#endif /* _MIIREGS_H */