xref: /dflybsd-src/sys/bus/firewire/firewire_phy.h (revision 86d7f5d305c6adaa56ff4582ece9859d73106103)
1*86d7f5d3SJohn Marino /*
2*86d7f5d3SJohn Marino  * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa
3*86d7f5d3SJohn Marino  * All rights reserved.
4*86d7f5d3SJohn Marino  *
5*86d7f5d3SJohn Marino  * Redistribution and use in source and binary forms, with or without
6*86d7f5d3SJohn Marino  * modification, are permitted provided that the following conditions
7*86d7f5d3SJohn Marino  * are met:
8*86d7f5d3SJohn Marino  * 1. Redistributions of source code must retain the above copyright
9*86d7f5d3SJohn Marino  *    notice, this list of conditions and the following disclaimer.
10*86d7f5d3SJohn Marino  * 2. Redistributions in binary form must reproduce the above copyright
11*86d7f5d3SJohn Marino  *    notice, this list of conditions and the following disclaimer in the
12*86d7f5d3SJohn Marino  *    documentation and/or other materials provided with the distribution.
13*86d7f5d3SJohn Marino  * 3. All advertising materials mentioning features or use of this software
14*86d7f5d3SJohn Marino  *    must display the acknowledgement as bellow:
15*86d7f5d3SJohn Marino  *
16*86d7f5d3SJohn Marino  *    This product includes software developed by K. Kobayashi and H. Shimokawa
17*86d7f5d3SJohn Marino  *
18*86d7f5d3SJohn Marino  * 4. The name of the author may not be used to endorse or promote products
19*86d7f5d3SJohn Marino  *    derived from this software without specific prior written permission.
20*86d7f5d3SJohn Marino  *
21*86d7f5d3SJohn Marino  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
22*86d7f5d3SJohn Marino  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
23*86d7f5d3SJohn Marino  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24*86d7f5d3SJohn Marino  * DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
25*86d7f5d3SJohn Marino  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26*86d7f5d3SJohn Marino  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27*86d7f5d3SJohn Marino  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28*86d7f5d3SJohn Marino  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
29*86d7f5d3SJohn Marino  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
30*86d7f5d3SJohn Marino  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31*86d7f5d3SJohn Marino  * POSSIBILITY OF SUCH DAMAGE.
32*86d7f5d3SJohn Marino  *
33*86d7f5d3SJohn Marino  * $FreeBSD: src/sys/dev/firewire/firewire_phy.h,v 1.2 2003/04/17 03:38:02 simokawa Exp $
34*86d7f5d3SJohn Marino  * $DragonFly: src/sys/bus/firewire/firewire_phy.h,v 1.3 2004/02/05 13:32:07 joerg Exp $
35*86d7f5d3SJohn Marino  *
36*86d7f5d3SJohn Marino  */
37*86d7f5d3SJohn Marino 
38*86d7f5d3SJohn Marino #define	FW_PHY_PHYSID_REG		0x00
39*86d7f5d3SJohn Marino #define	FW_PHY_PHYSID			(63<<2)
40*86d7f5d3SJohn Marino #define	FW_PHY_ROOT_REG			0x00
41*86d7f5d3SJohn Marino #define	FW_PHY_ROOT			(1<<1)
42*86d7f5d3SJohn Marino #define	FW_PHY_CPS_REG			0x00
43*86d7f5d3SJohn Marino #define	FW_PHY_CPS			(1<<0)
44*86d7f5d3SJohn Marino 
45*86d7f5d3SJohn Marino #define	FW_PHY_RHB_REG			0x01
46*86d7f5d3SJohn Marino #define	FW_PHY_RHB			(1<<7)
47*86d7f5d3SJohn Marino #define	FW_PHY_IBR_REG			0x01
48*86d7f5d3SJohn Marino #define	FW_PHY_IBR			(1<<6)
49*86d7f5d3SJohn Marino #define	FW_PHY_ISBR_REG			0x05
50*86d7f5d3SJohn Marino #define	FW_PHY_ISBR			(1<<6)
51*86d7f5d3SJohn Marino #define	FW_PHY_GC_REG			0x01
52*86d7f5d3SJohn Marino 
53*86d7f5d3SJohn Marino #define	FW_PHY_SPD_REG			0x02
54*86d7f5d3SJohn Marino #define	FW_PHY_SPD			(3<<6)
55*86d7f5d3SJohn Marino #define	FW_PHY_REV_REG			0x02
56*86d7f5d3SJohn Marino #define	FW_PHY_REV			(3<<4)
57*86d7f5d3SJohn Marino #define	FW_PHY_NP_REG			0x02
58*86d7f5d3SJohn Marino #define	FW_PHY_NP			(15<<0)
59*86d7f5d3SJohn Marino 
60*86d7f5d3SJohn Marino #define	FW_PHY_P1_REG			0x03
61*86d7f5d3SJohn Marino #define	FW_PHY_P2_REG			0x04
62*86d7f5d3SJohn Marino #define	FW_PHY_P3_REG			0x05
63*86d7f5d3SJohn Marino 
64*86d7f5d3SJohn Marino #define	FW_PHY_P_ASTAT			(3<<6)
65*86d7f5d3SJohn Marino #define	FW_PHY_P_BSTAT			(3<<4)
66*86d7f5d3SJohn Marino #define	FW_PHY_P_CH			(1<<3)
67*86d7f5d3SJohn Marino #define	FW_PHY_P_CON			(1<<2)
68*86d7f5d3SJohn Marino 
69*86d7f5d3SJohn Marino #define FW_PHY_LOOPINT_REG		0x06
70*86d7f5d3SJohn Marino #define FW_PHY_LOOPINT			(1<<7)
71*86d7f5d3SJohn Marino #define FW_PHY_CPSINT_REG		0x06
72*86d7f5d3SJohn Marino #define FW_PHY_CPSNT			(1<<6)
73*86d7f5d3SJohn Marino /*
74*86d7f5d3SJohn Marino #define FW_PHY_CPS_REG			0x06
75*86d7f5d3SJohn Marino #define FW_PHY_CPS			(1<<5)
76*86d7f5d3SJohn Marino */
77*86d7f5d3SJohn Marino #define FW_PHY_IR_REG			0x06
78*86d7f5d3SJohn Marino #define FW_PHY_IR			(1<<4)
79*86d7f5d3SJohn Marino #define FW_PHY_C_REG			0x06
80*86d7f5d3SJohn Marino #define FW_PHY_C			(1<<0)
81*86d7f5d3SJohn Marino 
82*86d7f5d3SJohn Marino #define FW_PHY_ESPD_REG			0x03
83*86d7f5d3SJohn Marino #define	FW_PHY_ESPD			(7<<5)
84*86d7f5d3SJohn Marino 
85*86d7f5d3SJohn Marino #define FW_PHY_EDEL_REG			0x03
86*86d7f5d3SJohn Marino #define FW_PHY_EDEL			15<<0
87