xref: /titanic_50/usr/src/uts/common/io/hme/hme_phy.h (revision 0219346b07c8d846112a335f1543309c21e3d8da)
1*0219346bSGarrett D'Amore /*
2*0219346bSGarrett D'Amore  * CDDL HEADER START
3*0219346bSGarrett D'Amore  *
4*0219346bSGarrett D'Amore  * The contents of this file are subject to the terms of the
5*0219346bSGarrett D'Amore  * Common Development and Distribution License (the "License").
6*0219346bSGarrett D'Amore  * You may not use this file except in compliance with the License.
7*0219346bSGarrett D'Amore  *
8*0219346bSGarrett D'Amore  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*0219346bSGarrett D'Amore  * or http://www.opensolaris.org/os/licensing.
10*0219346bSGarrett D'Amore  * See the License for the specific language governing permissions
11*0219346bSGarrett D'Amore  * and limitations under the License.
12*0219346bSGarrett D'Amore  *
13*0219346bSGarrett D'Amore  * When distributing Covered Code, include this CDDL HEADER in each
14*0219346bSGarrett D'Amore  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*0219346bSGarrett D'Amore  * If applicable, add the following below this CDDL HEADER, with the
16*0219346bSGarrett D'Amore  * fields enclosed by brackets "[]" replaced with your own identifying
17*0219346bSGarrett D'Amore  * information: Portions Copyright [yyyy] [name of copyright owner]
18*0219346bSGarrett D'Amore  *
19*0219346bSGarrett D'Amore  * CDDL HEADER END
20*0219346bSGarrett D'Amore  */
21*0219346bSGarrett D'Amore /*
22*0219346bSGarrett D'Amore  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23*0219346bSGarrett D'Amore  * Use is subject to license terms.
24*0219346bSGarrett D'Amore  */
25*0219346bSGarrett D'Amore 
26*0219346bSGarrett D'Amore #ifndef	HME_PHY_H
27*0219346bSGarrett D'Amore #define	HME_PHY_H
28*0219346bSGarrett D'Amore 
29*0219346bSGarrett D'Amore /* DP83840 - 10/100 Mbps Physical layer from National semiconductor */
30*0219346bSGarrett D'Amore 
31*0219346bSGarrett D'Amore /*
32*0219346bSGarrett D'Amore  * MII supports a 16-bit register stack of upto 32, addressable through the
33*0219346bSGarrett D'Amore  * MDIO and MDC serial port.
34*0219346bSGarrett D'Amore  */
35*0219346bSGarrett D'Amore #define	HME_PHY_BMCR	00	/* Basic Mode Control Register */
36*0219346bSGarrett D'Amore #define	HME_PHY_BMSR	01	/* Basic Mode Status Register */
37*0219346bSGarrett D'Amore #define	HME_PHY_IDR1	02	/* PHY Identifier Register 1 */
38*0219346bSGarrett D'Amore #define	HME_PHY_IDR2	03	/* PHY Identifier Register 2 */
39*0219346bSGarrett D'Amore #define	HME_PHY_ANAR	04	/* Auto-Negotiation Advertisement Register */
40*0219346bSGarrett D'Amore #define	HME_PHY_ANLPAR	05	/* Auto-Negotiation Link Partner Ability Reg */
41*0219346bSGarrett D'Amore #define	HME_PHY_ANER	06	/* Auto-Negotiation Expansion Register */
42*0219346bSGarrett D'Amore 
43*0219346bSGarrett D'Amore /* Registers 7-15 are reserved for future assignments by MII working group */
44*0219346bSGarrett D'Amore /* Do not write to these registers */
45*0219346bSGarrett D'Amore 
46*0219346bSGarrett D'Amore /* Registers 16-17 are reserved for future assignment by Vendor */
47*0219346bSGarrett D'Amore /* Do not write to these registers */
48*0219346bSGarrett D'Amore 
49*0219346bSGarrett D'Amore #define	HME_PHY_DIS	18	/* Disconnect Counter */
50*0219346bSGarrett D'Amore #define	HME_PHY_FCSC	19	/* False Carrier Sense Counter */
51*0219346bSGarrett D'Amore #define	HME_PHY_NWAYTR	20	/* NWay Test Register */
52*0219346bSGarrett D'Amore #define	HME_PHY_REC	21	/* RX_ER Counter */
53*0219346bSGarrett D'Amore #define	HME_PHY_SRR	22	/* Silicon Revision Register */
54*0219346bSGarrett D'Amore #define	HME_PHY_CSC	23	/* CS Configuration Register */
55*0219346bSGarrett D'Amore #define	HME_PHY_LBREMR	24	/* Loopback, Bypass, Receiver Error Mask Reg */
56*0219346bSGarrett D'Amore #define	HME_PHY_AR	25	/* PHY Address Register */
57*0219346bSGarrett D'Amore #define	HME_PHY_VRES1	26	/* Reserverd for future assignement by vendor */
58*0219346bSGarrett D'Amore #define	HME_PHY_TPISR	27	/* 10 Mbps TPI Status Register */
59*0219346bSGarrett D'Amore #define	HME_PHY_NICR	28	/* 10 Mbps Network I/F Configuration Register */
60*0219346bSGarrett D'Amore 
61*0219346bSGarrett D'Amore /* Registers 29-31 are reserved for future assignment by Vendor */
62*0219346bSGarrett D'Amore /* Do not write to these registers */
63*0219346bSGarrett D'Amore 
64*0219346bSGarrett D'Amore /*
65*0219346bSGarrett D'Amore  * QSI 6612 Physical layer device specific registers.
66*0219346bSGarrett D'Amore  * Addition Interface Technologies Group (NPG) 8/28/1997.
67*0219346bSGarrett D'Amore  */
68*0219346bSGarrett D'Amore #define	HME_PHY_BTXPC	31	/* BASE-TX Phy control Register */
69*0219346bSGarrett D'Amore 
70*0219346bSGarrett D'Amore /* ************************************************************************ */
71*0219346bSGarrett D'Amore /*  Register 00	 Basic Mode Control Register */
72*0219346bSGarrett D'Amore 
73*0219346bSGarrett D'Amore #define	PHY_BMCR_RESET	(1 << 15)	/* Reset */
74*0219346bSGarrett D'Amore #define	PHY_BMCR_LPBK	(1 << 14)	/* Loopback of TXD<3:0> */
75*0219346bSGarrett D'Amore #define	PHY_BMCR_100M	(1 << 13)	/* Speed selection, 1=100Mbps */
76*0219346bSGarrett D'Amore #define	PHY_BMCR_ANE	(1 << 12)	/* Auto Negotiation Enable */
77*0219346bSGarrett D'Amore #define	PHY_BMCR_PWRDN	(1 << 11)	/* Power down */
78*0219346bSGarrett D'Amore #define	PHY_BMCR_ISOLATE (1 << 10)	/* Isolate PHY from MII */
79*0219346bSGarrett D'Amore #define	PHY_BMCR_RAN	(1 << 9)	/* Restart Auto Negotiation */
80*0219346bSGarrett D'Amore #define	PHY_BMCR_FDX	(1 << 8)	/* Full Duplex */
81*0219346bSGarrett D'Amore #define	PHY_BMCR_COLTST	(1 << 7)	/* Collision Test */
82*0219346bSGarrett D'Amore #define	PHY_BMCR_RES1	(0x7f << 0)	/* 0-6 Reserved */
83*0219346bSGarrett D'Amore 
84*0219346bSGarrett D'Amore /* ************************************************************************ */
85*0219346bSGarrett D'Amore /* Register 01	 Basic Mode Status Register */
86*0219346bSGarrett D'Amore 
87*0219346bSGarrett D'Amore #define	PHY_BMSR_100T4	(1 << 15)	/* PHY able to perform 100Base-T4 */
88*0219346bSGarrett D'Amore #define	PHY_BMSR_100FDX	(1 << 14)	/* PHY able to perform 100Base-TX FDX */
89*0219346bSGarrett D'Amore #define	PHY_BMSR_100HDX	(1 << 13)	/* PHY able to perform 100Base-TX HDX */
90*0219346bSGarrett D'Amore #define	PHY_BMSR_10FDX	(1 << 12)	/* PHY able to perform 10Base-T FDX */
91*0219346bSGarrett D'Amore #define	PHY_BMSR_10HDX	(1 << 11)	/* PHY able to perform 10Base-T HDX */
92*0219346bSGarrett D'Amore #define	PHY_BMSR_RES1	(0x1f << 6)	/* 6-10 reserved */
93*0219346bSGarrett D'Amore #define	PHY_BMSR_ANC	(1 << 5)	/* Auto Negotiation Completed */
94*0219346bSGarrett D'Amore #define	PHY_BMSR_REMFLT	(1 << 4)	/* Remote Fault detected */
95*0219346bSGarrett D'Amore #define	PHY_BMSR_ACFG	(1 << 3)	/* Able to do Auto Link Negotiation */
96*0219346bSGarrett D'Amore #define	PHY_BMSR_LNKSTS	(1 << 2)	/* Link Status */
97*0219346bSGarrett D'Amore #define	PHY_BMSR_JABDET	(1 << 1)	/* Jabber Condition Detected */
98*0219346bSGarrett D'Amore #define	PHY_BMSR_EXTCAP	(1 << 0)	/* Extended Register Capability */
99*0219346bSGarrett D'Amore 
100*0219346bSGarrett D'Amore #define	PHY_CAPABILITY_MASK (PHY_BMSR_100FDX | PHY_BMSR_100HDX \
101*0219346bSGarrett D'Amore 				| PHY_BMSR_10FDX | PHY_BMSR_10HDX)
102*0219346bSGarrett D'Amore 
103*0219346bSGarrett D'Amore /* ************************************************************************ */
104*0219346bSGarrett D'Amore /*
105*0219346bSGarrett D'Amore  * Registers 2 and 3 provide a 32 bit value which is a unique identifier
106*0219346bSGarrett D'Amore  * for a particular type of PHY. A 24-bit Organizationally Unique Identifier
107*0219346bSGarrett D'Amore  * (OUI) is defined with bit 1 as the MSB and bit 24 as the LSB. Bits 3-18 of
108*0219346bSGarrett D'Amore  * the OUI are found in PHY Identifier Register 1 and bits 19-24 are found in
109*0219346bSGarrett D'Amore  * PHY Identifier Register 2.
110*0219346bSGarrett D'Amore  *
111*0219346bSGarrett D'Amore  * The hexadecimal OUI code for NSC is 0x080017 .
112*0219346bSGarrett D'Amore  */
113*0219346bSGarrett D'Amore /* Register 02	 PHY Identifier Register 1 */
114*0219346bSGarrett D'Amore 
115*0219346bSGarrett D'Amore /* Register 03	 PHY Identifier Register 2 */
116*0219346bSGarrett D'Amore 
117*0219346bSGarrett D'Amore #define	PHY_IDR2_OUILSB (0x3f << 10)	/* Bits 19-24 of OUI */
118*0219346bSGarrett D'Amore #define	PHY_IDR2_VNDMDL (0x3f << 4)	/* vendor Model no. */
119*0219346bSGarrett D'Amore #define	PHY_IDR2_MDLREV (0xf << 0)	/* Model revision no. */
120*0219346bSGarrett D'Amore 
121*0219346bSGarrett D'Amore /* ************************************************************************ */
122*0219346bSGarrett D'Amore /*
123*0219346bSGarrett D'Amore  * Register 04	Auto-Negotiation Advertisement Register (nway1Reg)
124*0219346bSGarrett D'Amore  * This register will hold the different modes of operation to be advertised to
125*0219346bSGarrett D'Amore  * the far-end PHY.
126*0219346bSGarrett D'Amore  */
127*0219346bSGarrett D'Amore 
128*0219346bSGarrett D'Amore #define	PHY_ANAR_NP	(1 << 15)	/* Next Page bit */
129*0219346bSGarrett D'Amore #define	PHY_ANAR_ACK	(1 << 14)	/* Acks reception of Link Partner */
130*0219346bSGarrett D'Amore 					/* Capability word  */
131*0219346bSGarrett D'Amore #define	PHY_ANAR_RF	(1 << 13)	/* Advertise Remote Fault det. cap. */
132*0219346bSGarrett D'Amore #define	PHY_ANAR_RES1	(0x7 << 10)	/* 10-12 reserved */
133*0219346bSGarrett D'Amore #define	PHY_ANAR_T4	(1 << 9)	/* Advertise 100Base-T4 Capability */
134*0219346bSGarrett D'Amore #define	PHY_ANAR_TXFDX	(1 << 8)	/* Advertise 100Base-TX FDX Cap. */
135*0219346bSGarrett D'Amore #define	PHY_ANAR_TX	(1 << 7)	/* Advertise 100Base-TX Cap. */
136*0219346bSGarrett D'Amore #define	PHY_ANAR_10FDX	(1 << 6)	/* Advertise 10Base-T FDX Cap. */
137*0219346bSGarrett D'Amore #define	PHY_ANAR_10	(1 << 5)	/* Advertise 10Base-T Cap. */
138*0219346bSGarrett D'Amore #define	PHY_ANAR_SELECT	(0x1f << 0)	/* Binary Encoded selector supported */
139*0219346bSGarrett D'Amore 					/* this node. Currently only CSMA/CD */
140*0219346bSGarrett D'Amore 					/* <00001> is specified  */
141*0219346bSGarrett D'Amore 
142*0219346bSGarrett D'Amore #define	PHY_SELECTOR	1	/* Default selector for CSMA/CD */
143*0219346bSGarrett D'Amore /*
144*0219346bSGarrett D'Amore  * Priority scheme (from highest to lowest) for Auto Link Negotiation:
145*0219346bSGarrett D'Amore  *	1 - 100Base-TX Full Duplex
146*0219346bSGarrett D'Amore  *	2 - 100Base-T4
147*0219346bSGarrett D'Amore  *	3 - 100Base-TX
148*0219346bSGarrett D'Amore  *	4 - 10Base-T Full Duplex
149*0219346bSGarrett D'Amore  *	5 - 10Base-T
150*0219346bSGarrett D'Amore  */
151*0219346bSGarrett D'Amore 
152*0219346bSGarrett D'Amore /* ************************************************************************ */
153*0219346bSGarrett D'Amore /*
154*0219346bSGarrett D'Amore  * Register 05	 Auto-Negotiation Link Partner Ability Reg
155*0219346bSGarrett D'Amore  * This register contains the Link Partners capabilities after NWay
156*0219346bSGarrett D'Amore  * Auto-Negotiation is complete.
157*0219346bSGarrett D'Amore  */
158*0219346bSGarrett D'Amore 
159*0219346bSGarrett D'Amore #define	PHY_ANLPAR_NP	(1 << 15)	/* Next page Bit */
160*0219346bSGarrett D'Amore #define	PHY_ANLPAR_ACK	(1 << 14)	/* Link Partner acks reception of our */
161*0219346bSGarrett D'Amore 					/* capability data word  */
162*0219346bSGarrett D'Amore #define	PHY_ANLPAR_RF	(1 << 13)	/* LP indicates Remote fault */
163*0219346bSGarrett D'Amore #define	PHY_ANLPAR_RES1	(0x7 << 10)	/* 10-12 reserved */
164*0219346bSGarrett D'Amore #define	PHY_ANLPAR_T4 	(1 << 9)	/* 100Base-T4 supported by LP */
165*0219346bSGarrett D'Amore #define	PHY_ANLPAR_TXFDX (1 << 8)	/* 100Base-TX FDX supp. by LP */
166*0219346bSGarrett D'Amore #define	PHY_ANLPAR_TX	(1 << 7)	/* 100Base-TX supp. by LP */
167*0219346bSGarrett D'Amore #define	PHY_ANLPAR_10FDX (1 << 6)	/* 10Base-T FDX supp. by LP */
168*0219346bSGarrett D'Amore #define	PHY_ANLPAR_10	(1 << 5)	/* 10Base-T supp. by LP */
169*0219346bSGarrett D'Amore #define	PHY_ANLPAR_SELECT (0x1f << 0)	/* LP's binary encoded node selector */
170*0219346bSGarrett D'Amore 					/* Currently only CSMA/CD is <00001> */
171*0219346bSGarrett D'Amore 					/* is specified  */
172*0219346bSGarrett D'Amore 
173*0219346bSGarrett D'Amore /* ************************************************************************ */
174*0219346bSGarrett D'Amore /*
175*0219346bSGarrett D'Amore  * Register 06	 Auto-Negotiation Expansion Register
176*0219346bSGarrett D'Amore  * This register contains additional status for NWay Auto-Negotiation
177*0219346bSGarrett D'Amore  */
178*0219346bSGarrett D'Amore 
179*0219346bSGarrett D'Amore #define	PHY_ANER_RES1	(0x7ff << 5)	/* 5-15 reserved */
180*0219346bSGarrett D'Amore #define	PHY_ANER_MLF	(1 << 4)	/* Multiple Link faults occured */
181*0219346bSGarrett D'Amore #define	PHY_ANER_LPNP	(1 << 3)	/* LP supports Next Page negotiation */
182*0219346bSGarrett D'Amore #define	PHY_ANER_NPABLE	(1 << 2)	/* This node can send additional */
183*0219346bSGarrett D'Amore 				/* Next Pages. Should be 0 for DP83840  */
184*0219346bSGarrett D'Amore #define	PHY_ANER_PAGERX	(1 << 1)	/* new LINK Code Word Page recvd. */
185*0219346bSGarrett D'Amore #define	PHY_ANER_LPNW	(1 << 0)	/* LP supports NWay Auto-negotiation */
186*0219346bSGarrett D'Amore 
187*0219346bSGarrett D'Amore 
188*0219346bSGarrett D'Amore /* ************************************************************************ */
189*0219346bSGarrett D'Amore 
190*0219346bSGarrett D'Amore /* Registers 7-15 are reserved for future assignments by MII working group */
191*0219346bSGarrett D'Amore /* Do not write to these registers */
192*0219346bSGarrett D'Amore 
193*0219346bSGarrett D'Amore /* Registers 16-17 are reserved for future assignment by Vendor */
194*0219346bSGarrett D'Amore /* Do not write to these registers */
195*0219346bSGarrett D'Amore 
196*0219346bSGarrett D'Amore /* ************************************************************************ */
197*0219346bSGarrett D'Amore 
198*0219346bSGarrett D'Amore /*
199*0219346bSGarrett D'Amore  * Register 18	 Disconnect Counter
200*0219346bSGarrett D'Amore  * This 16-bit counter is incremented for every disconnect event. It rolls over
201*0219346bSGarrett D'Amore  * when full.
202*0219346bSGarrett D'Amore  */
203*0219346bSGarrett D'Amore 
204*0219346bSGarrett D'Amore /* ************************************************************************ */
205*0219346bSGarrett D'Amore /*
206*0219346bSGarrett D'Amore  * Register 19	 False Carrier Sense Counter
207*0219346bSGarrett D'Amore  * This 16-bit counter is incremented for each false carrier event (i.e. carrier
208*0219346bSGarrett D'Amore  * assertion without JK detect). It freezes when full.
209*0219346bSGarrett D'Amore  */
210*0219346bSGarrett D'Amore 
211*0219346bSGarrett D'Amore /* ************************************************************************ */
212*0219346bSGarrett D'Amore /*
213*0219346bSGarrett D'Amore  * Register 20	 NWay Test Register
214*0219346bSGarrett D'Amore  */
215*0219346bSGarrett D'Amore #define	PHY_NWAYTR_RES1	(0xff << 8)	/* 8-15 reserved */
216*0219346bSGarrett D'Amore #define	PHY_NWAYTR_LPBK	(1 << 7)	/* Puts NWay into Loopback mode */
217*0219346bSGarrett D'Amore #define	PHY_NWAYTR_RES2	(0x7f << 0)	/* 0-6 reserved */
218*0219346bSGarrett D'Amore 
219*0219346bSGarrett D'Amore /* ************************************************************************ */
220*0219346bSGarrett D'Amore /*
221*0219346bSGarrett D'Amore  * Register 21	 RX_ER Counter
222*0219346bSGarrett D'Amore  * This 16-bit counter is incremented once per valid packet (i.e. no collision
223*0219346bSGarrett D'Amore  * occured during packet reception), if there is one or more receive error
224*0219346bSGarrett D'Amore  * condition during the packet reception. The counter is incremented at the end
225*0219346bSGarrett D'Amore  * of the packet reception.
226*0219346bSGarrett D'Amore  */
227*0219346bSGarrett D'Amore 
228*0219346bSGarrett D'Amore /* ************************************************************************ */
229*0219346bSGarrett D'Amore /*
230*0219346bSGarrett D'Amore  * Register 22	 Silicon Revision Register
231*0219346bSGarrett D'Amore  * Contains information on silicon revision
232*0219346bSGarrett D'Amore  * This register will be incremented for any change made to the device.
233*0219346bSGarrett D'Amore  */
234*0219346bSGarrett D'Amore /* ************************************************************************ */
235*0219346bSGarrett D'Amore /*
236*0219346bSGarrett D'Amore  * Register 23	 CS Configuration Register
237*0219346bSGarrett D'Amore  */
238*0219346bSGarrett D'Amore 
239*0219346bSGarrett D'Amore #define	PHY_CSCR_NRZIDIS (1 << 15)	/* NRZI disabled (for FDDI) */
240*0219346bSGarrett D'Amore #define	PHY_CSCR_RES1	(1 << 14)	/* reserved */
241*0219346bSGarrett D'Amore #define	PHY_CSCR_TOCDIS	(1 << 13)	/* disable Timeout counter */
242*0219346bSGarrett D'Amore 					/* in descrambler  */
243*0219346bSGarrett D'Amore #define	PHY_CSCR_REPTR	(1 << 12)	/* Mode1: Node = 0, repeater = 1 */
244*0219346bSGarrett D'Amore #define	PHY_CSCR_ENCSEL	(1 << 11)	/* encoder: 0 = MLT-3, 1 = binary */
245*0219346bSGarrett D'Amore #define	PHY_CSCR_RES2	(0x7 << 8)	/* 8-10 reserved */
246*0219346bSGarrett D'Amore #define	PHY_CSCR_CLK25M	(1 << 7)	/* Tristates CLK25M */
247*0219346bSGarrett D'Amore #define	PHY_CSCR_FLN100	(1 << 6)	/* 0 = force good link in 100Mbps */
248*0219346bSGarrett D'Amore #define	PHY_CSCR_FCONN	(1 << 5)	/* 1 = bypass disconnect function */
249*0219346bSGarrett D'Amore #define	PHY_CSCR_TXOFF	(1 << 4)	/* 1 = Pulls TD from phaser ckt low */
250*0219346bSGarrett D'Amore #define	PHY_CSCR_RES3	(1 << 3)	/* reserved */
251*0219346bSGarrett D'Amore #define	PHY_CSCR_CSTSEN	(1 << 2)	/* LED1 pin for connection status */
252*0219346bSGarrett D'Amore #define	PHY_CSCR_10FDXE	(1 << 1)	/* LED4 pin for 10Base-T FDX */
253*0219346bSGarrett D'Amore #define	PHY_CSCR_RES4	(1 << 0)	/* reserved */
254*0219346bSGarrett D'Amore 
255*0219346bSGarrett D'Amore /* ************************************************************************ */
256*0219346bSGarrett D'Amore /*
257*0219346bSGarrett D'Amore  * Register 24	 Loopback, Bypass, Receiver Error Mask Reg
258*0219346bSGarrett D'Amore  * The high byte of this register configures the DP83840 whilst its low byte
259*0219346bSGarrett D'Amore  * programs the receive error types to be reported in real time as a HEX code
260*0219346bSGarrett D'Amore  * across the MII RXD<3:0> interface.
261*0219346bSGarrett D'Amore  */
262*0219346bSGarrett D'Amore 
263*0219346bSGarrett D'Amore #define	PHY_LBREMR_BPEB	(1 << 15)	/* Bypass Elasticity buffer */
264*0219346bSGarrett D'Amore #define	PHY_LBREMR_BP4B5B (1 << 14)	/* Bypass 4B5B and 5B4B encoder */
265*0219346bSGarrett D'Amore #define	PHY_LBREMR_BPSCR (1 << 13)	/* Bypass scrambler/descrambler */
266*0219346bSGarrett D'Amore #define	PHY_LBREMR_BPALIGN (1 << 12)	/* Bypass symbol alignment ckt */
267*0219346bSGarrett D'Amore #define	PHY_LBREMR_EWRAP (1 << 11)	/* 10Base-T ENDEC Loopback */
268*0219346bSGarrett D'Amore #define	PHY_LBREMR_XWRAP (1 << 10)	/* 10Base-T Transceiver loopback */
269*0219346bSGarrett D'Amore #define	PHY_LBREMR_LB	(0x3 << 8)	/* Twister and remote loopback */
270*0219346bSGarrett D'Amore #define	PHY_LBREMR_RES1	(0x7 << 5)	/* Reserved */
271*0219346bSGarrett D'Amore #define	PHY_LBREMR_CODE	(1 << 4)	/* Report det. of Code Error */
272*0219346bSGarrett D'Amore #define	PHY_LBREMR_PME	(1 << 3)	/* Report det. of Pre-mature End err */
273*0219346bSGarrett D'Amore #define	PHY_LBREMR_LINK	(1 << 2)	/* Report det. of Link Error */
274*0219346bSGarrett D'Amore #define	PHY_LBREMR_PKT	(1 << 1)	/* Report det. of Packet error */
275*0219346bSGarrett D'Amore #define	PHY_LBREMR_EB	(1 << 0)	/* Report det. of Elasticty buf err */
276*0219346bSGarrett D'Amore 
277*0219346bSGarrett D'Amore /* ************************************************************************ */
278*0219346bSGarrett D'Amore /*
279*0219346bSGarrett D'Amore  * Register 25	 PHY Address Register
280*0219346bSGarrett D'Amore  */
281*0219346bSGarrett D'Amore 
282*0219346bSGarrett D'Amore #define	PHY_AR_RES1	(0x1ff << 7)	/* reserved */
283*0219346bSGarrett D'Amore #define	PHY_AR_SPEED10	(1 << 6)	/* speed : 1 = 10 Mbps, 0 - 100 Mbps */
284*0219346bSGarrett D'Amore #define	PHY_AR_CONSTS	(1 << 5)	/* status of the disconnect function */
285*0219346bSGarrett D'Amore #define	PHY_AR_ADDR	(0x1f << 0)	/* PHY Address */
286*0219346bSGarrett D'Amore 
287*0219346bSGarrett D'Amore /*
288*0219346bSGarrett D'Amore  * The PHYAD<4:0> allow 32 unique PHY addresses. The PHYAD<4:0> share the RX_ER,
289*0219346bSGarrett D'Amore  * PHYAD3, CRS, ENCSEL ald LBEN pins of the PHY. By patching the PHYAD address
290*0219346bSGarrett D'Amore  * pins with a light pull-up or pull-down resistor, the PMD address can be
291*0219346bSGarrett D'Amore  * strobed and stored in these register location during Reset or Power-on reset
292*0219346bSGarrett D'Amore  * time.
293*0219346bSGarrett D'Amore  *
294*0219346bSGarrett D'Amore  * The first PHY address bit transmitted or received is the MSB of the address.
295*0219346bSGarrett D'Amore  * A PHY connected to a station management entity via an interface connector
296*0219346bSGarrett D'Amore  * shall always respond to PHY address < 00000 > . A station management entity
297*0219346bSGarrett D'Amore  * connected to multiple PHY entities must know the appropriate PHY address of
298*0219346bSGarrett D'Amore  * each PHY entity. PHY address should be set to < 00001 > for a single
299*0219346bSGarrett D'Amore  * PHY entity. A PHY address of < 00000 > will cause the Isolate bit 0: < 10 >
300*0219346bSGarrett D'Amore  * to be set to one.
301*0219346bSGarrett D'Amore  */
302*0219346bSGarrett D'Amore 
303*0219346bSGarrett D'Amore /* ************************************************************************ */
304*0219346bSGarrett D'Amore /*
305*0219346bSGarrett D'Amore  * Register 26	 Reserverd for future assignement by vendor
306*0219346bSGarrett D'Amore  */
307*0219346bSGarrett D'Amore 
308*0219346bSGarrett D'Amore /* ************************************************************************ */
309*0219346bSGarrett D'Amore /*
310*0219346bSGarrett D'Amore  * Register 27	 10 Mbps TPI Status Register
311*0219346bSGarrett D'Amore  */
312*0219346bSGarrett D'Amore 
313*0219346bSGarrett D'Amore #define	PHY_TPISR_RES1	(0x3f << 10)	/* reserved */
314*0219346bSGarrett D'Amore #define	PHY_TPISR_10BTSER (1 << 9)	/* 10BASE-T Serial mode */
315*0219346bSGarrett D'Amore #define	PHY_TPISR_RES2	(0x1ff << 0)	/* reserved */
316*0219346bSGarrett D'Amore 
317*0219346bSGarrett D'Amore /* ************************************************************************ */
318*0219346bSGarrett D'Amore /*
319*0219346bSGarrett D'Amore  * Register 28	 10 Mbps Network I/F Configuration Register
320*0219346bSGarrett D'Amore  */
321*0219346bSGarrett D'Amore 
322*0219346bSGarrett D'Amore #define	PHY_NICR_RES1	(0x3ff << 6)	/* reserved */
323*0219346bSGarrett D'Amore #define	PHY_NICR_LD	(1 << 5)	/* Link disable */
324*0219346bSGarrett D'Amore #define	PHY_NICR_HBE	(1 << 4)	/* Enable Heart beat function */
325*0219346bSGarrett D'Amore #define	PHY_NICR_UTP	(1 << 3)	/* 1 = UTP, 0 = STP */
326*0219346bSGarrett D'Amore #define	PHY_NICR_LSS	(1 << 2)	/* Low Squelch select */
327*0219346bSGarrett D'Amore #define	PHY_NICR_RES2	(1 << 1)	/* reserved */
328*0219346bSGarrett D'Amore #define	PHY_NICR_JBEN	(1 << 0)	/* Enables Jabber function  in FDX */
329*0219346bSGarrett D'Amore 					/* or xwrap mode  */
330*0219346bSGarrett D'Amore 
331*0219346bSGarrett D'Amore /* ************************************************************************ */
332*0219346bSGarrett D'Amore 
333*0219346bSGarrett D'Amore /* Registers 29-31 are reserved for future assignment by Vendor */
334*0219346bSGarrett D'Amore /* Do not write to these registers */
335*0219346bSGarrett D'Amore 
336*0219346bSGarrett D'Amore /*
337*0219346bSGarrett D'Amore  * QSI 6612 Physical layer device specific register bits.
338*0219346bSGarrett D'Amore  * Addition Interface Technologies Group (NPG) 8/28/1997.
339*0219346bSGarrett D'Amore  */
340*0219346bSGarrett D'Amore #define	PHY_BTXPC_DSCRAM	0x01	/* Disable data scrambling */
341*0219346bSGarrett D'Amore 
342*0219346bSGarrett D'Amore /* ************************************************************************ */
343*0219346bSGarrett D'Amore 
344*0219346bSGarrett D'Amore #endif	/* HME_PHY_H */
345