xref: /freebsd/sys/dev/mii/icsphyreg.h (revision 95ee2897e98f5d444f26ed2334cc7c439f9c16c6)
178679427SPyun YongHyeon /*	$NetBSD: icsphyreg.h,v 1.2 2003/07/01 22:46:08 msaitoh Exp $	*/
278679427SPyun YongHyeon 
378679427SPyun YongHyeon /*-
4*b61a5730SWarner Losh  * SPDX-License-Identifier: BSD-2-Clause
5718cf2ccSPedro F. Giffuni  *
678679427SPyun YongHyeon  * Copyright (c) 1998 The NetBSD Foundation, Inc.
778679427SPyun YongHyeon  * All rights reserved.
878679427SPyun YongHyeon  *
978679427SPyun YongHyeon  * This code is derived from software contributed to The NetBSD Foundation
1078679427SPyun YongHyeon  * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,
1178679427SPyun YongHyeon  * NASA Ames Research Center.
1278679427SPyun YongHyeon  *
1378679427SPyun YongHyeon  * Redistribution and use in source and binary forms, with or without
1478679427SPyun YongHyeon  * modification, are permitted provided that the following conditions
1578679427SPyun YongHyeon  * are met:
1678679427SPyun YongHyeon  * 1. Redistributions of source code must retain the above copyright
1778679427SPyun YongHyeon  *    notice, this list of conditions and the following disclaimer.
1878679427SPyun YongHyeon  * 2. Redistributions in binary form must reproduce the above copyright
1978679427SPyun YongHyeon  *    notice, this list of conditions and the following disclaimer in the
2078679427SPyun YongHyeon  *    documentation and/or other materials provided with the distribution.
2178679427SPyun YongHyeon  *
2278679427SPyun YongHyeon  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
2378679427SPyun YongHyeon  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
2478679427SPyun YongHyeon  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
2578679427SPyun YongHyeon  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
2678679427SPyun YongHyeon  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
2778679427SPyun YongHyeon  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
2878679427SPyun YongHyeon  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
2978679427SPyun YongHyeon  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
3078679427SPyun YongHyeon  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
3178679427SPyun YongHyeon  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
3278679427SPyun YongHyeon  * POSSIBILITY OF SUCH DAMAGE.
3378679427SPyun YongHyeon  */
3478679427SPyun YongHyeon 
3578679427SPyun YongHyeon #ifndef _DEV_MII_ICSPHYREG_H_
3678679427SPyun YongHyeon #define	_DEV_MII_ICSPHYREG_H_
3778679427SPyun YongHyeon 
3878679427SPyun YongHyeon /*
3978679427SPyun YongHyeon  * ICS1890 registers.
4078679427SPyun YongHyeon  *	http://www.icst.com/pdf/18??.pdf
4178679427SPyun YongHyeon  */
4278679427SPyun YongHyeon 
4378679427SPyun YongHyeon /* HEX				1889	1890	1892	1893
4478679427SPyun YongHyeon  *--------------------------------------------------------------
4578679427SPyun YongHyeon  *  0 Control			*	*	*	*
4678679427SPyun YongHyeon  *  1 Status			*	*	*	*
4778679427SPyun YongHyeon  *  2 PHY Identifier		*	*	*	*
4878679427SPyun YongHyeon  *  3 PHY Identifier		*	*	*	*
4978679427SPyun YongHyeon  *  4 Auto-Neg. Advertisement		*	*	*
5078679427SPyun YongHyeon  *  5 Auto-Neg. Link Parent Adv		*	*	*
5178679427SPyun YongHyeon  *  6 Auto-Neg. Expansion		*	*	*
5278679427SPyun YongHyeon  *  7 Auto-Neg. Next Page Tx			*	*
5378679427SPyun YongHyeon  *  8 ANg Nxt Page Lnk Parnt Abl		*	*
5478679427SPyun YongHyeon  * 10 Extended Control		*	*	*	*
5578679427SPyun YongHyeon  * 11 Quick Poll Status		*	*	*	*
5678679427SPyun YongHyeon  * 12 10Base-T Operation		*	*	*
5778679427SPyun YongHyeon  * 13 Extended Control2			*	*	*
5878679427SPyun YongHyeon  */
5978679427SPyun YongHyeon 
6078679427SPyun YongHyeon #define	MII_ICSPHY_ECR		0x10	/* Extended Control Register */
6178679427SPyun YongHyeon #define	ECR_OVR			0x8000	/* disable command reg overwrites */
6278679427SPyun YongHyeon #define	ECR_PHYADDR_MASK	0x07c0	/* PHY address mask */
6378679427SPyun YongHyeon #define	ECR_CTEST		0x0020	/* Stream Cipher Test Mode */
6478679427SPyun YongHyeon #define	ECR_IECT		0x0004	/* Invalid Error Code Test */
6578679427SPyun YongHyeon #define	ECR_SSD			0x0001	/* Stream Cipher Disable */
6678679427SPyun YongHyeon 
6778679427SPyun YongHyeon #define	MII_ICSPHY_QPR		0x11	/* Quick Poll Register */
6878679427SPyun YongHyeon #define	QPR_SPEED		0x8000	/* 100Mbps */
6978679427SPyun YongHyeon #define	QPR_FDX			0x4000	/* Full dupled */
7078679427SPyun YongHyeon #define	QPR_ANB2		0x2000	/* Autoneg monitor bit 2 */
7178679427SPyun YongHyeon #define	QPR_ANB1		0x1000	/* Autoneg monitor bit 1 */
7278679427SPyun YongHyeon #define	QPR_ANB0		0x0800	/* Autoneg monitor bit 0 */
7378679427SPyun YongHyeon #define	QPR_RXERR		0x0400	/* Receive signal lost */
7478679427SPyun YongHyeon #define	QPR_PLLERR		0x0200	/* PLL error */
7578679427SPyun YongHyeon #define	QPR_FCARR		0x0100	/* False carrier detected */
7678679427SPyun YongHyeon #define	QPR_INVALSYM		0x0080	/* Invalid Symbol Detected */
7778679427SPyun YongHyeon #define	QPR_HALT		0x0040	/* Halt Symbol Detected */
7878679427SPyun YongHyeon #define	QPR_PREEM		0x0020	/* Two Idle Symbols together */
7978679427SPyun YongHyeon #define	QPR_ACOMP		0x0010	/* Autonegotiation complete */
8078679427SPyun YongHyeon #define	QPR_SDETECT		0x0008	/* signal detect */
8178679427SPyun YongHyeon #define	QPR_JABBER		0x0004	/* Jabber detected */
8278679427SPyun YongHyeon #define	QPR_RFAULT		0x0002	/* Remote Fault */
8378679427SPyun YongHyeon #define	QPR_LINK		0x0001	/* Link */
8478679427SPyun YongHyeon 
8578679427SPyun YongHyeon #define	MII_ICSPHY_TTR		0x12	/* 10baseT Operations Register */
8678679427SPyun YongHyeon #define	TTR_RJABBER		0x8000	/* Remote Jabber */
8778679427SPyun YongHyeon #define	TTR_POLARITY		0x4000	/* Polarity Reversed */
8878679427SPyun YongHyeon #define	TTR_NOJABBER		0x0020	/* Disable Jabber Check */
8978679427SPyun YongHyeon #define	TTR_LOOP		0x0010	/* Loopback mode */
9078679427SPyun YongHyeon #define	TTR_NOAPOLARITY		0x0008	/* Disable auto polarity correction */
9178679427SPyun YongHyeon #define	TTR_NOSQE		0x0004	/* Disable SQE check */
9278679427SPyun YongHyeon #define	TTR_NOLINK		0x0002	/* Disable Link check */
9378679427SPyun YongHyeon #define	TTR_NOSQUELCH		0x0001	/* Disable squelch */
9478679427SPyun YongHyeon 
9578679427SPyun YongHyeon /*
9678679427SPyun YongHyeon  * Extended Control Register 2
9778679427SPyun YongHyeon  *
9878679427SPyun YongHyeon  * HEX					1889	1890	1892	1893
9978679427SPyun YongHyeon  *-------------------------------------------------------------------
10078679427SPyun YongHyeon  * 8000	Node/Repeater Mode			*	*	*
10178679427SPyun YongHyeon  * 4000 Hardware/Software Mode			*	*	*
10278679427SPyun YongHyeon  * 2000 Link Partner Support Remote Flt		*
10378679427SPyun YongHyeon  * 2000 Remote Fault					*	*
10478679427SPyun YongHyeon  * 1000
10578679427SPyun YongHyeon  * 0800
10678679427SPyun YongHyeon  * 0400 Xmitted Remote Fault status		*
10778679427SPyun YongHyeon  * 0200
10878679427SPyun YongHyeon  * 0100
10978679427SPyun YongHyeon  * 0080 Tri-state Enable					*
11078679427SPyun YongHyeon  * 0040
11178679427SPyun YongHyeon  * 0020
11278679427SPyun YongHyeon  * 0010 A-N Powerup Remote Flt			*
11378679427SPyun YongHyeon  * 0008
11478679427SPyun YongHyeon  * 0004
11578679427SPyun YongHyeon  * 0002 Automatic 10Base-T Power Down			*
11678679427SPyun YongHyeon  * 0001 Automatic 100Base-TX Power Down		*	*	*
11778679427SPyun YongHyeon  */
11878679427SPyun YongHyeon 
11978679427SPyun YongHyeon #define	MII_ICSPHY_ECR2		0x13	/* Extended Control Register 2 */
12078679427SPyun YongHyeon #define	ECR2_REPEATER		0x8000	/* Repeater Mode */
12178679427SPyun YongHyeon #define	ECR2_HWSW		0x4000	/* hw/sw config priority */
12278679427SPyun YongHyeon #define	ECR2_LPRF		0x2000	/* link partner supports rem fault */
12378679427SPyun YongHyeon #define	ECR2_FORCERF		0x0400	/* Force transmit of rem fault */
12478679427SPyun YongHyeon #define	ECR2_RFPUP		0x0010	/* A-N Powerup Remote fault */
12578679427SPyun YongHyeon #define	ECR2_10AUTOPWRDN	0x0002	/* Automatic 10baseT power down */
12678679427SPyun YongHyeon #define	ECR2_100AUTOPWRDN	0x0001	/* Automatic 100baseTX power down */
12778679427SPyun YongHyeon 
12878679427SPyun YongHyeon #endif /* _DEV_MII_ICSPHYREG_H_ */
129