172132Ssemenu/*-
272132Ssemenu * Copyright (c) 2001 Semen Ustimenko (semenu@FreeBSD.org)
372132Ssemenu * All rights reserved.
472132Ssemenu *
572132Ssemenu * Redistribution and use in source and binary forms, with or without
672132Ssemenu * modification, are permitted provided that the following conditions
772132Ssemenu * are met:
872132Ssemenu * 1. Redistributions of source code must retain the above copyright
972132Ssemenu *    notice, this list of conditions and the following disclaimer.
1072132Ssemenu * 2. Redistributions in binary form must reproduce the above copyright
1172132Ssemenu *    notice, this list of conditions and the following disclaimer in the
1272132Ssemenu *    documentation and/or other materials provided with the distribution.
1372132Ssemenu *
1472132Ssemenu * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1572132Ssemenu * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1672132Ssemenu * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1772132Ssemenu * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
1872132Ssemenu * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1972132Ssemenu * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2072132Ssemenu * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2172132Ssemenu * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2272132Ssemenu * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2372132Ssemenu * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2472132Ssemenu * SUCH DAMAGE.
2572132Ssemenu *
2672132Ssemenu * $FreeBSD$
2772132Ssemenu */
2872132Ssemenu
2972132Ssemenu#ifndef _DEV_MII_ACPHYREG_H_
3072132Ssemenu#define	_DEV_MII_ACPHYREG_H_
3172132Ssemenu
3272132Ssemenu/*
3372132Ssemenu * Register definitions for the Altima Communications AC101
3472132Ssemenu */
3572132Ssemenu
3672132Ssemenu#define	MII_ACPHY_POL		0x10	/* Polarity int level */
3772132Ssemenu
3872132Ssemenu/* High byte is interrupt mask register */
3972132Ssemenu#define	MII_ACPHY_INT		0x11	/* Interrupt control/status */
4072132Ssemenu#define	AC_INT_ACOMP		0x0001	/* Autoneg complete */
4172132Ssemenu#define	AC_INT_REM_FLT		0x0002	/* Remote fault */
4272132Ssemenu#define	AC_INT_LINK_DOWN	0x0004	/* Link not OK */
4372132Ssemenu#define	AC_INT_LP_ACK		0x0008	/* FLP ack recved */
4472132Ssemenu#define	AC_INT_PD_FLT		0x0010	/* Parallel detect fault */
4572132Ssemenu#define	AC_INT_PAGE_RECV	0x0020	/* New page recved */
4672132Ssemenu#define	AC_INT_RX_ER		0x0040	/* RX_ER transitions high */
4772132Ssemenu#define	AC_INT_JAB		0x0080	/* Jabber detected */
4872132Ssemenu
4972132Ssemenu#define	MII_ACPHY_DIAG		0x12	/* Diagnostic */
5072132Ssemenu#define	AC_DIAG_RX_LOCK		0x0100
5172132Ssemenu#define	AC_DIAG_RX_PASS		0x0200
5272132Ssemenu#define	AC_DIAG_SPEED		0x0400	/* Aneg speed result */
5372132Ssemenu#define	AC_DIAG_DUPLEX		0x0800	/* Aneg duplex result */
5472132Ssemenu
5572132Ssemenu#define	MII_ACPHY_PWRLOOP	0x13	/* Power/Loopback */
5672132Ssemenu#define	MII_ACPHY_CBLMEAS	0x14	/* Cable meas. */
5772132Ssemenu
5872132Ssemenu#define	MII_ACPHY_MCTL		0x15	/* Mode control */
5972132Ssemenu#define	AC_MCTL_FX_SEL		0x0001	/* FX mode */
60165986Smarius#define	AC_MCTL_BYP_PCS		0x0002	/* Bypass PCS */
61165986Smarius#define	AC_MCTL_SCRMBL		0x0004	/* Data scrambling */
62165986Smarius#define	AC_MCTL_REM_LOOP	0x0008	/* Remote loopback */
63165986Smarius#define	AC_MCTL_DIS_WDT		0x0010	/* Disable watchdog timer */
64165986Smarius#define	AC_MCTL_DIS_REC		0x0020	/* Disable recv error counter */
65165986Smarius#define	AC_MCTL_REC_FULL	0x0040	/* Recv error counter full */
66165986Smarius#define	AC_MCTL_FRC_FEF		0x0080	/* Force Far End Fault Insert. */
67165986Smarius#define	AC_MCTL_DIS_FEF		0x0100	/* Disable FEF Insertion */
68165986Smarius#define	AC_MCTL_LED_SEL		0x0200	/* Compat LED config */
69165986Smarius#define	AC_MCTL_ALED_SEL	0x0400	/* ActLED RX&TX - RX only */
70165986Smarius#define	AC_MCTL_10BT_SEL	0x0800	/* Enable 7-wire interface */
71165986Smarius#define	AC_MCTL_DIS_JAB		0x1000	/* Disable jabber */
72165986Smarius#define	AC_MCTL_FRC_LINK	0x2000	/* Force TX link up */
73165986Smarius#define	AC_MCTL_DIS_NLP		0x4000	/* Disable NLP check */
7472132Ssemenu
7572132Ssemenu#define	MII_ACPHY_REC		0x18	/* Recv error counter */
7672132Ssemenu
7772132Ssemenu#endif /* _DEV_MII_ACPHYREG_H_ */
78