xref: /illumos-gate/usr/src/uts/common/sys/nxge/nxge_sr_hw.h (revision 2d6eb4a5e0a47d30189497241345dc5466bb68ab)
1*6f45ec7bSml29623 /*
2*6f45ec7bSml29623  * CDDL HEADER START
3*6f45ec7bSml29623  *
4*6f45ec7bSml29623  * The contents of this file are subject to the terms of the
5*6f45ec7bSml29623  * Common Development and Distribution License (the "License").
6*6f45ec7bSml29623  * You may not use this file except in compliance with the License.
7*6f45ec7bSml29623  *
8*6f45ec7bSml29623  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*6f45ec7bSml29623  * or http://www.opensolaris.org/os/licensing.
10*6f45ec7bSml29623  * See the License for the specific language governing permissions
11*6f45ec7bSml29623  * and limitations under the License.
12*6f45ec7bSml29623  *
13*6f45ec7bSml29623  * When distributing Covered Code, include this CDDL HEADER in each
14*6f45ec7bSml29623  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*6f45ec7bSml29623  * If applicable, add the following below this CDDL HEADER, with the
16*6f45ec7bSml29623  * fields enclosed by brackets "[]" replaced with your own identifying
17*6f45ec7bSml29623  * information: Portions Copyright [yyyy] [name of copyright owner]
18*6f45ec7bSml29623  *
19*6f45ec7bSml29623  * CDDL HEADER END
20*6f45ec7bSml29623  */
21*6f45ec7bSml29623 /*
22*6f45ec7bSml29623  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
23*6f45ec7bSml29623  * Use is subject to license terms.
24*6f45ec7bSml29623  */
25*6f45ec7bSml29623 
26*6f45ec7bSml29623 #ifndef	_SYS_NXGE_NXGE_SR_HW_H
27*6f45ec7bSml29623 #define	_SYS_NXGE_NXGE_SR_HW_H
28*6f45ec7bSml29623 
29*6f45ec7bSml29623 #ifdef	__cplusplus
30*6f45ec7bSml29623 extern "C" {
31*6f45ec7bSml29623 #endif
32*6f45ec7bSml29623 
33*6f45ec7bSml29623 #define	ESR_NEPTUNE_DEV_ADDR	0x1E
34*6f45ec7bSml29623 #define	ESR_NEPTUNE_BASE	0
35*6f45ec7bSml29623 #define	ESR_PORT_ADDR_BASE	0
36*6f45ec7bSml29623 #define	PCISR_DEV_ADDR		0x1E
37*6f45ec7bSml29623 #define	PCISR_BASE		0
38*6f45ec7bSml29623 #define	PCISR_PORT_ADDR_BASE	2
39*6f45ec7bSml29623 
40*6f45ec7bSml29623 #define	PB	0
41*6f45ec7bSml29623 
42*6f45ec7bSml29623 #define	SR_RX_TX_COMMON_CONTROL	PB + 0x000
43*6f45ec7bSml29623 #define	SR_RX_TX_RESET_CONTROL	PB + 0x004
44*6f45ec7bSml29623 #define	SR_RX_POWER_CONTROL	PB + 0x008
45*6f45ec7bSml29623 #define	SR_TX_POWER_CONTROL	PB + 0x00C
46*6f45ec7bSml29623 #define	SR_MISC_POWER_CONTROL	PB + 0x010
47*6f45ec7bSml29623 #define	SR_RX_TX_CONTROL_A	PB + 0x100
48*6f45ec7bSml29623 #define	SR_RX_TX_TUNING_A	PB + 0x104
49*6f45ec7bSml29623 #define	SR_RX_SYNCCHAR_A	PB + 0x108
50*6f45ec7bSml29623 #define	SR_RX_TX_TEST_A		PB + 0x10C
51*6f45ec7bSml29623 #define	SR_GLUE_CONTROL0_A	PB + 0x110
52*6f45ec7bSml29623 #define	SR_GLUE_CONTROL1_A	PB + 0x114
53*6f45ec7bSml29623 #define	SR_RX_TX_CONTROL_B	PB + 0x120
54*6f45ec7bSml29623 #define	SR_RX_TX_TUNING_B	PB + 0x124
55*6f45ec7bSml29623 #define	SR_RX_SYNCCHAR_B	PB + 0x128
56*6f45ec7bSml29623 #define	SR_RX_TX_TEST_B		PB + 0x12C
57*6f45ec7bSml29623 #define	SR_GLUE_CONTROL0_B	PB + 0x130
58*6f45ec7bSml29623 #define	SR_GLUE_CONTROL1_B	PB + 0x134
59*6f45ec7bSml29623 #define	SR_RX_TX_CONTROL_C	PB + 0x140
60*6f45ec7bSml29623 #define	SR_RX_TX_TUNING_C	PB + 0x144
61*6f45ec7bSml29623 #define	SR_RX_SYNCCHAR_C	PB + 0x148
62*6f45ec7bSml29623 #define	SR_RX_TX_TEST_C		PB + 0x14C
63*6f45ec7bSml29623 #define	SR_GLUE_CONTROL0_C	PB + 0x150
64*6f45ec7bSml29623 #define	SR_GLUE_CONTROL1_C	PB + 0x154
65*6f45ec7bSml29623 #define	SR_RX_TX_CONTROL_D	PB + 0x160
66*6f45ec7bSml29623 #define	SR_RX_TX_TUNING_D	PB + 0x164
67*6f45ec7bSml29623 #define	SR_RX_SYNCCHAR_D	PB + 0x168
68*6f45ec7bSml29623 #define	SR_RX_TX_TEST_D		PB + 0x16C
69*6f45ec7bSml29623 #define	SR_GLUE_CONTROL0_D	PB + 0x170
70*6f45ec7bSml29623 #define	SR_GLUE_CONTROL1_D	PB + 0x174
71*6f45ec7bSml29623 #define	SR_RX_TX_TUNING_1_A	PB + 0x184
72*6f45ec7bSml29623 #define	SR_RX_TX_TUNING_1_B	PB + 0x1A4
73*6f45ec7bSml29623 #define	SR_RX_TX_TUNING_1_C	PB + 0x1C4
74*6f45ec7bSml29623 #define	SR_RX_TX_TUNING_1_D	PB + 0x1E4
75*6f45ec7bSml29623 #define	SR_RX_TX_TUNING_2_A	PB + 0x204
76*6f45ec7bSml29623 #define	SR_RX_TX_TUNING_2_B	PB + 0x224
77*6f45ec7bSml29623 #define	SR_RX_TX_TUNING_2_C	PB + 0x244
78*6f45ec7bSml29623 #define	SR_RX_TX_TUNING_2_D	PB + 0x264
79*6f45ec7bSml29623 #define	SR_RX_TX_TUNING_3_A	PB + 0x284
80*6f45ec7bSml29623 #define	SR_RX_TX_TUNING_3_B	PB + 0x2A4
81*6f45ec7bSml29623 #define	SR_RX_TX_TUNING_3_C	PB + 0x2C4
82*6f45ec7bSml29623 #define	SR_RX_TX_TUNING_3_D	PB + 0x2E4
83*6f45ec7bSml29623 
84*6f45ec7bSml29623 /*
85*6f45ec7bSml29623  * Shift right by 1 because the PRM requires that all the serdes register
86*6f45ec7bSml29623  * address be divided by 2
87*6f45ec7bSml29623  */
88*6f45ec7bSml29623 #define	ESR_NEP_RX_TX_COMMON_CONTROL_L_ADDR()	(ESR_NEPTUNE_BASE +\
89*6f45ec7bSml29623 						(SR_RX_TX_COMMON_CONTROL >> 1))
90*6f45ec7bSml29623 #define	ESR_NEP_RX_TX_COMMON_CONTROL_H_ADDR()	(ESR_NEPTUNE_BASE +\
91*6f45ec7bSml29623 						(SR_RX_TX_COMMON_CONTROL >> 1)\
92*6f45ec7bSml29623 						+ 1)
93*6f45ec7bSml29623 #define	ESR_NEP_RX_TX_RESET_CONTROL_L_ADDR()	(ESR_NEPTUNE_BASE +\
94*6f45ec7bSml29623 						(SR_RX_TX_RESET_CONTROL >> 1))
95*6f45ec7bSml29623 #define	ESR_NEP_RX_TX_RESET_CONTROL_H_ADDR()	(ESR_NEPTUNE_BASE +\
96*6f45ec7bSml29623 						(SR_RX_TX_RESET_CONTROL >> 1)\
97*6f45ec7bSml29623 						+ 1)
98*6f45ec7bSml29623 #define	ESR_NEP_RX_POWER_CONTROL_L_ADDR()	(ESR_NEPTUNE_BASE +\
99*6f45ec7bSml29623 						(SR_RX_POWER_CONTROL >> 1))
100*6f45ec7bSml29623 #define	ESR_NEP_RX_POWER_CONTROL_H_ADDR()	(ESR_NEPTUNE_BASE +\
101*6f45ec7bSml29623 						(SR_RX_POWER_CONTROL >> 1) + 1)
102*6f45ec7bSml29623 #define	ESR_NEP_TX_POWER_CONTROL_L_ADDR()	(ESR_NEPTUNE_BASE +\
103*6f45ec7bSml29623 						(SR_TX_POWER_CONTROL >> 1))
104*6f45ec7bSml29623 #define	ESR_NEP_TX_POWER_CONTROL_H_ADDR()	(ESR_NEPTUNE_BASE +\
105*6f45ec7bSml29623 						(SR_TX_POWER_CONTROL >> 1) + 1)
106*6f45ec7bSml29623 #define	ESR_NEP_MISC_POWER_CONTROL_L_ADDR()	(ESR_NEPTUNE_BASE +\
107*6f45ec7bSml29623 						(SR_MISC_POWER_CONTROL >> 1))
108*6f45ec7bSml29623 #define	ESR_NEP_MISC_POWER_CONTROL_H_ADDR()	(ESR_NEPTUNE_BASE +\
109*6f45ec7bSml29623 						(SR_MISC_POWER_CONTROL >> 1)\
110*6f45ec7bSml29623 						+ 1)
111*6f45ec7bSml29623 #define	ESR_NEP_RX_TX_CONTROL_L_ADDR(chan)	((ESR_NEPTUNE_BASE +\
112*6f45ec7bSml29623 						SR_RX_TX_CONTROL_A +\
113*6f45ec7bSml29623 						(chan * 0x20)) >> 1)
114*6f45ec7bSml29623 #define	ESR_NEP_RX_TX_CONTROL_H_ADDR(chan)	((ESR_NEPTUNE_BASE +\
115*6f45ec7bSml29623 						SR_RX_TX_CONTROL_A +\
116*6f45ec7bSml29623 						(chan * 0x20)) >> 1) + 1
117*6f45ec7bSml29623 #define	ESR_NEP_RX_TX_TUNING_L_ADDR(chan)	((ESR_NEPTUNE_BASE +\
118*6f45ec7bSml29623 						SR_RX_TX_TUNING_A +\
119*6f45ec7bSml29623 						(chan * 0x20)) >> 1)
120*6f45ec7bSml29623 #define	ESR_NEP_RX_TX_TUNING_H_ADDR(chan)	((ESR_NEPTUNE_BASE +\
121*6f45ec7bSml29623 						SR_RX_TX_TUNING_A +\
122*6f45ec7bSml29623 						(chan * 0x20)) >> 1) + 1
123*6f45ec7bSml29623 #define	ESR_NEP_RX_TX_SYNCCHAR_L_ADDR(chan)	((ESR_NEPTUNE_BASE +\
124*6f45ec7bSml29623 						SR_RX_SYNCCHAR_A +\
125*6f45ec7bSml29623 						(chan * 0x20)) >> 1)
126*6f45ec7bSml29623 #define	ESR_NEP_RX_TX_SYNCCHAR_H_ADDR(chan)	((ESR_NEPTUNE_BASE +\
127*6f45ec7bSml29623 						SR_RX_SYNCCHAR_A +\
128*6f45ec7bSml29623 						(chan * 0x20)) >> 1) + 1
129*6f45ec7bSml29623 #define	ESR_NEP_RX_TX_TEST_L_ADDR(chan)		((ESR_NEPTUNE_BASE +\
130*6f45ec7bSml29623 						SR_RX_TX_TEST_A +\
131*6f45ec7bSml29623 						(chan * 0x20)) >> 1)
132*6f45ec7bSml29623 #define	ESR_NEP_RX_TX_TEST_H_ADDR(chan)		((ESR_NEPTUNE_BASE +\
133*6f45ec7bSml29623 						SR_RX_TX_TEST_A +\
134*6f45ec7bSml29623 						(chan * 0x20)) >> 1) + 1
135*6f45ec7bSml29623 #define	ESR_NEP_GLUE_CONTROL0_L_ADDR(chan)	((ESR_NEPTUNE_BASE +\
136*6f45ec7bSml29623 						SR_GLUE_CONTROL0_A +\
137*6f45ec7bSml29623 						(chan * 0x20)) >> 1)
138*6f45ec7bSml29623 #define	ESR_NEP_GLUE_CONTROL0_H_ADDR(chan)	((ESR_NEPTUNE_BASE +\
139*6f45ec7bSml29623 						SR_GLUE_CONTROL0_A +\
140*6f45ec7bSml29623 						(chan * 0x20)) >> 1) + 1
141*6f45ec7bSml29623 #define	ESR_NEP_GLUE_CONTROL1_L_ADDR(chan)	((ESR_NEPTUNE_BASE +\
142*6f45ec7bSml29623 						SR_GLUE_CONTROL1_A +\
143*6f45ec7bSml29623 						(chan * 0x20)) >> 1)
144*6f45ec7bSml29623 #define	ESR_NEP_GLUE_CONTROL1_H_ADDR(chan)	((ESR_NEPTUNE_BASE +\
145*6f45ec7bSml29623 						SR_GLUE_CONTROL1_A +\
146*6f45ec7bSml29623 						(chan * 0x20)) >> 1) + 1
147*6f45ec7bSml29623 #define	ESR_NEP_RX_TX_TUNING_1_L_ADDR(chan)	((ESR_NEPTUNE_BASE +\
148*6f45ec7bSml29623 						SR_RX_TX_TUNING_1_A +\
149*6f45ec7bSml29623 						(chan * 0x20)) >> 1)
150*6f45ec7bSml29623 #define	ESR_NEP_RX_TX_TUNING_1_H_ADDR(chan)	((ESR_NEPTUNE_BASE +\
151*6f45ec7bSml29623 						SR_RX_TX_TUNING_1_A +\
152*6f45ec7bSml29623 						(chan * 0x20)) >> 1) + 1
153*6f45ec7bSml29623 #define	ESR_NEP_RX_TX_TUNING_2_L_ADDR(chan)	((ESR_NEPTUNE_BASE +\
154*6f45ec7bSml29623 						SR_RX_TX_TUNING_2_A +\
155*6f45ec7bSml29623 						(chan * 0x20)) >> 1)
156*6f45ec7bSml29623 #define	ESR_NEP_RX_TX_TUNING_2_H_ADDR(chan)	((ESR_NEPTUNE_BASE +\
157*6f45ec7bSml29623 						SR_RX_TX_TUNING_2_A +\
158*6f45ec7bSml29623 						(chan * 0x20)) >> 1) + 1
159*6f45ec7bSml29623 #define	ESR_NEP_RX_TX_TUNING_3_L_ADDR(chan)	((ESR_NEPTUNE_BASE +\
160*6f45ec7bSml29623 						SR_RX_TX_TUNING_3_A +\
161*6f45ec7bSml29623 						(chan * 0x20)) >> 1)
162*6f45ec7bSml29623 #define	ESR_NEP_RX_TX_TUNING_3_H_ADDR(chan)	((ESR_NEPTUNE_BASE +\
163*6f45ec7bSml29623 						SR_RX_TX_TUNING_3_A +\
164*6f45ec7bSml29623 						(chan * 0x20)) >> 1) + 1
165*6f45ec7bSml29623 
166*6f45ec7bSml29623 typedef	union _sr_rx_tx_common_ctrl_l {
167*6f45ec7bSml29623 	uint16_t value;
168*6f45ec7bSml29623 	struct {
169*6f45ec7bSml29623 #if defined(_BIT_FIELDS_HTOL)
170*6f45ec7bSml29623 		uint16_t res3		: 3;
171*6f45ec7bSml29623 		uint16_t refclkr_freq	: 5;
172*6f45ec7bSml29623 		uint16_t res4		: 8;
173*6f45ec7bSml29623 #elif defined(_BIT_FIELDS_LTOH)
174*6f45ec7bSml29623 		uint16_t res4		: 8;
175*6f45ec7bSml29623 		uint16_t refclkr_freq	: 5;
176*6f45ec7bSml29623 		uint16_t res3		: 3;
177*6f45ec7bSml29623 #else
178*6f45ec7bSml29623 #error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
179*6f45ec7bSml29623 #endif
180*6f45ec7bSml29623 	} bits;
181*6f45ec7bSml29623 } sr_rx_tx_common_ctrl_l;
182*6f45ec7bSml29623 
183*6f45ec7bSml29623 typedef	union _sr_rx_tx_common_ctrl_h {
184*6f45ec7bSml29623 	uint16_t value;
185*6f45ec7bSml29623 	struct {
186*6f45ec7bSml29623 #if defined(_BIT_FIELDS_HTOL)
187*6f45ec7bSml29623 		uint16_t res1		: 5;
188*6f45ec7bSml29623 		uint16_t tdmaster	: 3;
189*6f45ec7bSml29623 		uint16_t tp		: 2;
190*6f45ec7bSml29623 		uint16_t tz		: 2;
191*6f45ec7bSml29623 		uint16_t res2		: 2;
192*6f45ec7bSml29623 		uint16_t revlbrefsel	: 2;
193*6f45ec7bSml29623 #elif defined(_BIT_FIELDS_LTOH)
194*6f45ec7bSml29623 		uint16_t revlbrefsel	: 2;
195*6f45ec7bSml29623 		uint16_t res2		: 2;
196*6f45ec7bSml29623 		uint16_t tz		: 2;
197*6f45ec7bSml29623 		uint16_t tp		: 2;
198*6f45ec7bSml29623 		uint16_t tdmaster	: 3;
199*6f45ec7bSml29623 		uint16_t res1		: 5;
200*6f45ec7bSml29623 #else
201*6f45ec7bSml29623 #error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
202*6f45ec7bSml29623 #endif
203*6f45ec7bSml29623 	} bits;
204*6f45ec7bSml29623 } sr_rx_tx_common_ctrl_h;
205*6f45ec7bSml29623 
206*6f45ec7bSml29623 
207*6f45ec7bSml29623 /* RX TX Common Control Register field values */
208*6f45ec7bSml29623 
209*6f45ec7bSml29623 #define	TDMASTER_LANE_A		0
210*6f45ec7bSml29623 #define	TDMASTER_LANE_B		1
211*6f45ec7bSml29623 #define	TDMASTER_LANE_C		2
212*6f45ec7bSml29623 #define	TDMASTER_LANE_D		3
213*6f45ec7bSml29623 
214*6f45ec7bSml29623 #define	REVLBREFSEL_GBT_RBC_A_O		0
215*6f45ec7bSml29623 #define	REVLBREFSEL_GBT_RBC_B_O		1
216*6f45ec7bSml29623 #define	REVLBREFSEL_GBT_RBC_C_O		2
217*6f45ec7bSml29623 #define	REVLBREFSEL_GBT_RBC_D_O		3
218*6f45ec7bSml29623 
219*6f45ec7bSml29623 #define	REFCLKR_FREQ_SIM		0
220*6f45ec7bSml29623 #define	REFCLKR_FREQ_53_125		0x1
221*6f45ec7bSml29623 #define	REFCLKR_FREQ_62_5		0x3
222*6f45ec7bSml29623 #define	REFCLKR_FREQ_70_83		0x4
223*6f45ec7bSml29623 #define	REFCLKR_FREQ_75			0x5
224*6f45ec7bSml29623 #define	REFCLKR_FREQ_78_125		0x6
225*6f45ec7bSml29623 #define	REFCLKR_FREQ_79_6875		0x7
226*6f45ec7bSml29623 #define	REFCLKR_FREQ_83_33		0x8
227*6f45ec7bSml29623 #define	REFCLKR_FREQ_85			0x9
228*6f45ec7bSml29623 #define	REFCLKR_FREQ_100		0xA
229*6f45ec7bSml29623 #define	REFCLKR_FREQ_104_17		0xB
230*6f45ec7bSml29623 #define	REFCLKR_FREQ_106_25		0xC
231*6f45ec7bSml29623 #define	REFCLKR_FREQ_120		0xF
232*6f45ec7bSml29623 #define	REFCLKR_FREQ_125		0x10
233*6f45ec7bSml29623 #define	REFCLKR_FREQ_127_5		0x11
234*6f45ec7bSml29623 #define	REFCLKR_FREQ_141_67		0x13
235*6f45ec7bSml29623 #define	REFCLKR_FREQ_150		0x15
236*6f45ec7bSml29623 #define	REFCLKR_FREQ_156_25		0x16
237*6f45ec7bSml29623 #define	REFCLKR_FREQ_159_375		0x17
238*6f45ec7bSml29623 #define	REFCLKR_FREQ_170		0x19
239*6f45ec7bSml29623 #define	REFCLKR_FREQ_212_5		0x1E
240*6f45ec7bSml29623 
241*6f45ec7bSml29623 typedef	union _sr_rx_tx_reset_ctrl_l {
242*6f45ec7bSml29623 	uint16_t value;
243*6f45ec7bSml29623 	struct {
244*6f45ec7bSml29623 #if defined(_BIT_FIELDS_HTOL)
245*6f45ec7bSml29623 		uint16_t rxreset_0a	: 1;
246*6f45ec7bSml29623 		uint16_t rxreset_0b	: 1;
247*6f45ec7bSml29623 		uint16_t rxreset_0c	: 1;
248*6f45ec7bSml29623 		uint16_t rxreset_0d	: 1;
249*6f45ec7bSml29623 		uint16_t rxreset_1a	: 1;
250*6f45ec7bSml29623 		uint16_t rxreset_1b	: 1;
251*6f45ec7bSml29623 		uint16_t rxreset_1c	: 1;
252*6f45ec7bSml29623 		uint16_t rxreset_1d	: 1;
253*6f45ec7bSml29623 		uint16_t rxreset_2a	: 1;
254*6f45ec7bSml29623 		uint16_t rxreset_2b	: 1;
255*6f45ec7bSml29623 		uint16_t rxreset_2c	: 1;
256*6f45ec7bSml29623 		uint16_t rxreset_2d	: 1;
257*6f45ec7bSml29623 		uint16_t rxreset_3a	: 1;
258*6f45ec7bSml29623 		uint16_t rxreset_3b	: 1;
259*6f45ec7bSml29623 		uint16_t rxreset_3c	: 1;
260*6f45ec7bSml29623 		uint16_t rxreset_3d	: 1;
261*6f45ec7bSml29623 #elif defined(_BIT_FIELDS_LTOH)
262*6f45ec7bSml29623 		uint16_t rxreset_3d	: 1;
263*6f45ec7bSml29623 		uint16_t rxreset_3c	: 1;
264*6f45ec7bSml29623 		uint16_t rxreset_3b	: 1;
265*6f45ec7bSml29623 		uint16_t rxreset_3a	: 1;
266*6f45ec7bSml29623 		uint16_t rxreset_2d	: 1;
267*6f45ec7bSml29623 		uint16_t rxreset_2c	: 1;
268*6f45ec7bSml29623 		uint16_t rxreset_2b	: 1;
269*6f45ec7bSml29623 		uint16_t rxreset_2a	: 1;
270*6f45ec7bSml29623 		uint16_t rxreset_1d	: 1;
271*6f45ec7bSml29623 		uint16_t rxreset_1c	: 1;
272*6f45ec7bSml29623 		uint16_t rxreset_1b	: 1;
273*6f45ec7bSml29623 		uint16_t rxreset_1a	: 1;
274*6f45ec7bSml29623 		uint16_t rxreset_0d	: 1;
275*6f45ec7bSml29623 		uint16_t rxreset_0c	: 1;
276*6f45ec7bSml29623 		uint16_t rxreset_0b	: 1;
277*6f45ec7bSml29623 		uint16_t rxreset_0a	: 1;
278*6f45ec7bSml29623 #else
279*6f45ec7bSml29623 #error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
280*6f45ec7bSml29623 #endif
281*6f45ec7bSml29623 	} bits;
282*6f45ec7bSml29623 } sr_rx_tx_reset_ctrl_l;
283*6f45ec7bSml29623 
284*6f45ec7bSml29623 
285*6f45ec7bSml29623 typedef	union _sr_rx_tx_reset_ctrl_h {
286*6f45ec7bSml29623 	uint16_t value;
287*6f45ec7bSml29623 	struct {
288*6f45ec7bSml29623 #if defined(_BIT_FIELDS_HTOL)
289*6f45ec7bSml29623 		uint16_t txreset_0a	: 1;
290*6f45ec7bSml29623 		uint16_t txreset_0b	: 1;
291*6f45ec7bSml29623 		uint16_t txreset_0c	: 1;
292*6f45ec7bSml29623 		uint16_t txreset_0d	: 1;
293*6f45ec7bSml29623 		uint16_t txreset_1a	: 1;
294*6f45ec7bSml29623 		uint16_t txreset_1b	: 1;
295*6f45ec7bSml29623 		uint16_t txreset_1c	: 1;
296*6f45ec7bSml29623 		uint16_t txreset_1d	: 1;
297*6f45ec7bSml29623 		uint16_t txreset_2a	: 1;
298*6f45ec7bSml29623 		uint16_t txreset_2b	: 1;
299*6f45ec7bSml29623 		uint16_t txreset_2c	: 1;
300*6f45ec7bSml29623 		uint16_t txreset_2d	: 1;
301*6f45ec7bSml29623 		uint16_t txreset_3a	: 1;
302*6f45ec7bSml29623 		uint16_t txreset_3b	: 1;
303*6f45ec7bSml29623 		uint16_t txreset_3c	: 1;
304*6f45ec7bSml29623 		uint16_t txreset_3d	: 1;
305*6f45ec7bSml29623 #elif defined(_BIT_FIELDS_LTOH)
306*6f45ec7bSml29623 		uint16_t txreset_3d	: 1;
307*6f45ec7bSml29623 		uint16_t txreset_3c	: 1;
308*6f45ec7bSml29623 		uint16_t txreset_3b	: 1;
309*6f45ec7bSml29623 		uint16_t txreset_3a	: 1;
310*6f45ec7bSml29623 		uint16_t txreset_2d	: 1;
311*6f45ec7bSml29623 		uint16_t txreset_2c	: 1;
312*6f45ec7bSml29623 		uint16_t txreset_2b	: 1;
313*6f45ec7bSml29623 		uint16_t txreset_2a	: 1;
314*6f45ec7bSml29623 		uint16_t txreset_1d	: 1;
315*6f45ec7bSml29623 		uint16_t txreset_1c	: 1;
316*6f45ec7bSml29623 		uint16_t txreset_1b	: 1;
317*6f45ec7bSml29623 		uint16_t txreset_1a	: 1;
318*6f45ec7bSml29623 		uint16_t txreset_0d	: 1;
319*6f45ec7bSml29623 		uint16_t txreset_0c	: 1;
320*6f45ec7bSml29623 		uint16_t txreset_0b	: 1;
321*6f45ec7bSml29623 		uint16_t txreset_0a	: 1;
322*6f45ec7bSml29623 #else
323*6f45ec7bSml29623 #error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
324*6f45ec7bSml29623 #endif
325*6f45ec7bSml29623 	} bits;
326*6f45ec7bSml29623 } sr_rx_tx_reset_ctrl_h;
327*6f45ec7bSml29623 
328*6f45ec7bSml29623 typedef	union _sr_rx_power_ctrl_l {
329*6f45ec7bSml29623 	uint16_t value;
330*6f45ec7bSml29623 	struct {
331*6f45ec7bSml29623 #if defined(_BIT_FIELDS_HTOL)
332*6f45ec7bSml29623 		uint16_t pdrxlos_0a	: 1;
333*6f45ec7bSml29623 		uint16_t pdrxlos_0b	: 1;
334*6f45ec7bSml29623 		uint16_t pdrxlos_0c	: 1;
335*6f45ec7bSml29623 		uint16_t pdrxlos_0d	: 1;
336*6f45ec7bSml29623 		uint16_t pdrxlos_1a	: 1;
337*6f45ec7bSml29623 		uint16_t pdrxlos_1b	: 1;
338*6f45ec7bSml29623 		uint16_t pdrxlos_1c	: 1;
339*6f45ec7bSml29623 		uint16_t pdrxlos_1d	: 1;
340*6f45ec7bSml29623 		uint16_t pdrxlos_2a	: 1;
341*6f45ec7bSml29623 		uint16_t pdrxlos_2b	: 1;
342*6f45ec7bSml29623 		uint16_t pdrxlos_2c	: 1;
343*6f45ec7bSml29623 		uint16_t pdrxlos_2d	: 1;
344*6f45ec7bSml29623 		uint16_t pdrxlos_3a	: 1;
345*6f45ec7bSml29623 		uint16_t pdrxlos_3b	: 1;
346*6f45ec7bSml29623 		uint16_t pdrxlos_3c	: 1;
347*6f45ec7bSml29623 		uint16_t pdrxlos_3d	: 1;
348*6f45ec7bSml29623 #elif defined(_BIT_FIELDS_LTOH)
349*6f45ec7bSml29623 		uint16_t pdrxlos_3d	: 1;
350*6f45ec7bSml29623 		uint16_t pdrxlos_3c	: 1;
351*6f45ec7bSml29623 		uint16_t pdrxlos_3b	: 1;
352*6f45ec7bSml29623 		uint16_t pdrxlos_3a	: 1;
353*6f45ec7bSml29623 		uint16_t pdrxlos_2d	: 1;
354*6f45ec7bSml29623 		uint16_t pdrxlos_2c	: 1;
355*6f45ec7bSml29623 		uint16_t pdrxlos_2b	: 1;
356*6f45ec7bSml29623 		uint16_t pdrxlos_2a	: 1;
357*6f45ec7bSml29623 		uint16_t pdrxlos_1d	: 1;
358*6f45ec7bSml29623 		uint16_t pdrxlos_1c	: 1;
359*6f45ec7bSml29623 		uint16_t pdrxlos_1b	: 1;
360*6f45ec7bSml29623 		uint16_t pdrxlos_1a	: 1;
361*6f45ec7bSml29623 		uint16_t pdrxlos_0d	: 1;
362*6f45ec7bSml29623 		uint16_t pdrxlos_0c	: 1;
363*6f45ec7bSml29623 		uint16_t pdrxlos_0b	: 1;
364*6f45ec7bSml29623 		uint16_t pdrxlos_0a	: 1;
365*6f45ec7bSml29623 #else
366*6f45ec7bSml29623 #error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
367*6f45ec7bSml29623 #endif
368*6f45ec7bSml29623 	} bits;
369*6f45ec7bSml29623 } sr_rx_power_ctrl_l_t;
370*6f45ec7bSml29623 
371*6f45ec7bSml29623 
372*6f45ec7bSml29623 typedef	union _sr_rx_power_ctrl_h {
373*6f45ec7bSml29623 	uint16_t value;
374*6f45ec7bSml29623 	struct {
375*6f45ec7bSml29623 #if defined(_BIT_FIELDS_HTOL)
376*6f45ec7bSml29623 		uint16_t pdownr_0a	: 1;
377*6f45ec7bSml29623 		uint16_t pdownr_0b	: 1;
378*6f45ec7bSml29623 		uint16_t pdownr_0c	: 1;
379*6f45ec7bSml29623 		uint16_t pdownr_0d	: 1;
380*6f45ec7bSml29623 		uint16_t pdownr_1a	: 1;
381*6f45ec7bSml29623 		uint16_t pdownr_1b	: 1;
382*6f45ec7bSml29623 		uint16_t pdownr_1c	: 1;
383*6f45ec7bSml29623 		uint16_t pdownr_1d	: 1;
384*6f45ec7bSml29623 		uint16_t pdownr_2a	: 1;
385*6f45ec7bSml29623 		uint16_t pdownr_2b	: 1;
386*6f45ec7bSml29623 		uint16_t pdownr_2c	: 1;
387*6f45ec7bSml29623 		uint16_t pdownr_2d	: 1;
388*6f45ec7bSml29623 		uint16_t pdownr_3a	: 1;
389*6f45ec7bSml29623 		uint16_t pdownr_3b	: 1;
390*6f45ec7bSml29623 		uint16_t pdownr_3c	: 1;
391*6f45ec7bSml29623 		uint16_t pdownr_3d	: 1;
392*6f45ec7bSml29623 #elif defined(_BIT_FIELDS_LTOH)
393*6f45ec7bSml29623 		uint16_t pdownr_3d	: 1;
394*6f45ec7bSml29623 		uint16_t pdownr_3c	: 1;
395*6f45ec7bSml29623 		uint16_t pdownr_3b	: 1;
396*6f45ec7bSml29623 		uint16_t pdownr_3a	: 1;
397*6f45ec7bSml29623 		uint16_t pdownr_2d	: 1;
398*6f45ec7bSml29623 		uint16_t pdownr_2c	: 1;
399*6f45ec7bSml29623 		uint16_t pdownr_2b	: 1;
400*6f45ec7bSml29623 		uint16_t pdownr_2a	: 1;
401*6f45ec7bSml29623 		uint16_t pdownr_1d	: 1;
402*6f45ec7bSml29623 		uint16_t pdownr_1c	: 1;
403*6f45ec7bSml29623 		uint16_t pdownr_1b	: 1;
404*6f45ec7bSml29623 		uint16_t pdownr_1a	: 1;
405*6f45ec7bSml29623 		uint16_t pdownr_0d	: 1;
406*6f45ec7bSml29623 		uint16_t pdownr_0c	: 1;
407*6f45ec7bSml29623 		uint16_t pdownr_0b	: 1;
408*6f45ec7bSml29623 		uint16_t pdownr_0a	: 1;
409*6f45ec7bSml29623 #else
410*6f45ec7bSml29623 #error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
411*6f45ec7bSml29623 #endif
412*6f45ec7bSml29623 	} bits;
413*6f45ec7bSml29623 } sr_rx_power_ctrl_h_t;
414*6f45ec7bSml29623 
415*6f45ec7bSml29623 typedef	union _sr_tx_power_ctrl_l {
416*6f45ec7bSml29623 	uint16_t value;
417*6f45ec7bSml29623 	struct {
418*6f45ec7bSml29623 #if defined(_BIT_FIELDS_HTOL)
419*6f45ec7bSml29623 		uint16_t res1		: 8;
420*6f45ec7bSml29623 		uint16_t pdownppll0	: 1;
421*6f45ec7bSml29623 		uint16_t pdownppll1	: 1;
422*6f45ec7bSml29623 		uint16_t pdownppll2	: 1;
423*6f45ec7bSml29623 		uint16_t pdownppll3	: 1;
424*6f45ec7bSml29623 		uint16_t res2		: 4;
425*6f45ec7bSml29623 #elif defined(_BIT_FIELDS_LTOH)
426*6f45ec7bSml29623 		uint16_t res2		: 4;
427*6f45ec7bSml29623 		uint16_t pdownppll3	: 1;
428*6f45ec7bSml29623 		uint16_t pdownppll2	: 1;
429*6f45ec7bSml29623 		uint16_t pdownppll1	: 1;
430*6f45ec7bSml29623 		uint16_t pdownppll0	: 1;
431*6f45ec7bSml29623 		uint16_t res1		: 8;
432*6f45ec7bSml29623 #else
433*6f45ec7bSml29623 #error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
434*6f45ec7bSml29623 #endif
435*6f45ec7bSml29623 	} bits;
436*6f45ec7bSml29623 } sr_tx_power_ctrl_l_t;
437*6f45ec7bSml29623 
438*6f45ec7bSml29623 typedef	union _sr_tx_power_ctrl_h {
439*6f45ec7bSml29623 	uint16_t value;
440*6f45ec7bSml29623 	struct {
441*6f45ec7bSml29623 #if defined(_BIT_FIELDS_HTOL)
442*6f45ec7bSml29623 		uint16_t pdownt_0a	: 1;
443*6f45ec7bSml29623 		uint16_t pdownt_0b	: 1;
444*6f45ec7bSml29623 		uint16_t pdownt_0c	: 1;
445*6f45ec7bSml29623 		uint16_t pdownt_0d	: 1;
446*6f45ec7bSml29623 		uint16_t pdownt_1a	: 1;
447*6f45ec7bSml29623 		uint16_t pdownt_1b	: 1;
448*6f45ec7bSml29623 		uint16_t pdownt_1c	: 1;
449*6f45ec7bSml29623 		uint16_t pdownt_1d	: 1;
450*6f45ec7bSml29623 		uint16_t pdownt_2a	: 1;
451*6f45ec7bSml29623 		uint16_t pdownt_2b	: 1;
452*6f45ec7bSml29623 		uint16_t pdownt_2c	: 1;
453*6f45ec7bSml29623 		uint16_t pdownt_2d	: 1;
454*6f45ec7bSml29623 		uint16_t pdownt_3a	: 1;
455*6f45ec7bSml29623 		uint16_t pdownt_3b	: 1;
456*6f45ec7bSml29623 		uint16_t pdownt_3c	: 1;
457*6f45ec7bSml29623 		uint16_t pdownt_3d	: 1;
458*6f45ec7bSml29623 #elif defined(_BIT_FIELDS_LTOH)
459*6f45ec7bSml29623 		uint16_t pdownt_3d	: 1;
460*6f45ec7bSml29623 		uint16_t pdownt_3c	: 1;
461*6f45ec7bSml29623 		uint16_t pdownt_3b	: 1;
462*6f45ec7bSml29623 		uint16_t pdownt_3a	: 1;
463*6f45ec7bSml29623 		uint16_t pdownt_2d	: 1;
464*6f45ec7bSml29623 		uint16_t pdownt_2c	: 1;
465*6f45ec7bSml29623 		uint16_t pdownt_2b	: 1;
466*6f45ec7bSml29623 		uint16_t pdownt_2a	: 1;
467*6f45ec7bSml29623 		uint16_t pdownt_1d	: 1;
468*6f45ec7bSml29623 		uint16_t pdownt_1c	: 1;
469*6f45ec7bSml29623 		uint16_t pdownt_1b	: 1;
470*6f45ec7bSml29623 		uint16_t pdownt_1a	: 1;
471*6f45ec7bSml29623 		uint16_t pdownt_0d	: 1;
472*6f45ec7bSml29623 		uint16_t pdownt_0c	: 1;
473*6f45ec7bSml29623 		uint16_t pdownt_0b	: 1;
474*6f45ec7bSml29623 		uint16_t pdownt_0a	: 1;
475*6f45ec7bSml29623 #else
476*6f45ec7bSml29623 #error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
477*6f45ec7bSml29623 #endif
478*6f45ec7bSml29623 	} bits;
479*6f45ec7bSml29623 } sr_tx_power_ctrl_h_t;
480*6f45ec7bSml29623 
481*6f45ec7bSml29623 typedef	union _sr_misc_power_ctrl_l {
482*6f45ec7bSml29623 	uint16_t value;
483*6f45ec7bSml29623 	struct {
484*6f45ec7bSml29623 #if defined(_BIT_FIELDS_HTOL)
485*6f45ec7bSml29623 		uint16_t res1		: 3;
486*6f45ec7bSml29623 		uint16_t pdrtrim	: 1;
487*6f45ec7bSml29623 		uint16_t pdownpecl0	: 1;
488*6f45ec7bSml29623 		uint16_t pdownpecl1	: 1;
489*6f45ec7bSml29623 		uint16_t pdownpecl2	: 1;
490*6f45ec7bSml29623 		uint16_t pdownpecl3	: 1;
491*6f45ec7bSml29623 		uint16_t pdownppll0	: 1;
492*6f45ec7bSml29623 		uint16_t pdownppll1	: 1;
493*6f45ec7bSml29623 		uint16_t pdownppll2	: 1;
494*6f45ec7bSml29623 		uint16_t pdownppll3	: 1;
495*6f45ec7bSml29623 		uint16_t res2		: 4;
496*6f45ec7bSml29623 #elif defined(_BIT_FIELDS_LTOH)
497*6f45ec7bSml29623 		uint16_t res2		: 4;
498*6f45ec7bSml29623 		uint16_t pdownppll3	: 1;
499*6f45ec7bSml29623 		uint16_t pdownppll2	: 1;
500*6f45ec7bSml29623 		uint16_t pdownppll1	: 1;
501*6f45ec7bSml29623 		uint16_t pdownppll0	: 1;
502*6f45ec7bSml29623 		uint16_t pdownpecl3	: 1;
503*6f45ec7bSml29623 		uint16_t pdownpecl2	: 1;
504*6f45ec7bSml29623 		uint16_t pdownpecl1	: 1;
505*6f45ec7bSml29623 		uint16_t pdownpecl0	: 1;
506*6f45ec7bSml29623 		uint16_t pdrtrim	: 1;
507*6f45ec7bSml29623 		uint16_t res1		: 3;
508*6f45ec7bSml29623 #else
509*6f45ec7bSml29623 #error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
510*6f45ec7bSml29623 #endif
511*6f45ec7bSml29623 	} bits;
512*6f45ec7bSml29623 } sr_misc_power_ctrl_l_t;
513*6f45ec7bSml29623 
514*6f45ec7bSml29623 typedef	union _misc_power_ctrl_h {
515*6f45ec7bSml29623 	uint16_t value;
516*6f45ec7bSml29623 	struct {
517*6f45ec7bSml29623 #if defined(_BIT_FIELDS_HTOL)
518*6f45ec7bSml29623 		uint16_t pdclkout0	: 1;
519*6f45ec7bSml29623 		uint16_t pdclkout1	: 1;
520*6f45ec7bSml29623 		uint16_t pdclkout2	: 1;
521*6f45ec7bSml29623 		uint16_t pdclkout3	: 1;
522*6f45ec7bSml29623 		uint16_t res1		: 12;
523*6f45ec7bSml29623 #elif defined(_BIT_FIELDS_LTOH)
524*6f45ec7bSml29623 		uint16_t res1		: 12;
525*6f45ec7bSml29623 		uint16_t pdclkout3	: 1;
526*6f45ec7bSml29623 		uint16_t pdclkout2	: 1;
527*6f45ec7bSml29623 		uint16_t pdclkout1	: 1;
528*6f45ec7bSml29623 		uint16_t pdclkout0	: 1;
529*6f45ec7bSml29623 #else
530*6f45ec7bSml29623 #error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
531*6f45ec7bSml29623 #endif
532*6f45ec7bSml29623 	} bits;
533*6f45ec7bSml29623 } misc_power_ctrl_h_t;
534*6f45ec7bSml29623 
535*6f45ec7bSml29623 typedef	union _sr_rx_tx_ctrl_l {
536*6f45ec7bSml29623 	uint16_t value;
537*6f45ec7bSml29623 	struct {
538*6f45ec7bSml29623 #if defined(_BIT_FIELDS_HTOL)
539*6f45ec7bSml29623 		uint16_t res1		: 2;
540*6f45ec7bSml29623 		uint16_t rxpreswin	: 2;
541*6f45ec7bSml29623 		uint16_t res2		: 1;
542*6f45ec7bSml29623 		uint16_t risefall	: 3;
543*6f45ec7bSml29623 		uint16_t res3		: 7;
544*6f45ec7bSml29623 		uint16_t enstretch	: 1;
545*6f45ec7bSml29623 #elif defined(_BIT_FIELDS_LTOH)
546*6f45ec7bSml29623 		uint16_t enstretch	: 1;
547*6f45ec7bSml29623 		uint16_t res3		: 7;
548*6f45ec7bSml29623 		uint16_t risefall	: 3;
549*6f45ec7bSml29623 		uint16_t res2		: 1;
550*6f45ec7bSml29623 		uint16_t rxpreswin	: 2;
551*6f45ec7bSml29623 		uint16_t res1		: 2;
552*6f45ec7bSml29623 #else
553*6f45ec7bSml29623 #error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
554*6f45ec7bSml29623 #endif
555*6f45ec7bSml29623 	} bits;
556*6f45ec7bSml29623 } sr_rx_tx_ctrl_l_t;
557*6f45ec7bSml29623 
558*6f45ec7bSml29623 typedef	union _sr_rx_tx_ctrl_h {
559*6f45ec7bSml29623 	uint16_t value;
560*6f45ec7bSml29623 	struct {
561*6f45ec7bSml29623 #if defined(_BIT_FIELDS_HTOL)
562*6f45ec7bSml29623 		uint16_t biascntl	: 1;
563*6f45ec7bSml29623 		uint16_t res1		: 5;
564*6f45ec7bSml29623 		uint16_t tdenfifo	: 1;
565*6f45ec7bSml29623 		uint16_t tdws20		: 1;
566*6f45ec7bSml29623 		uint16_t vmuxlo		: 2;
567*6f45ec7bSml29623 		uint16_t vpulselo	: 2;
568*6f45ec7bSml29623 		uint16_t res2		: 4;
569*6f45ec7bSml29623 #elif defined(_BIT_FIELDS_LTOH)
570*6f45ec7bSml29623 		uint16_t res2		: 4;
571*6f45ec7bSml29623 		uint16_t vpulselo	: 2;
572*6f45ec7bSml29623 		uint16_t vmuxlo		: 2;
573*6f45ec7bSml29623 		uint16_t tdws20		: 1;
574*6f45ec7bSml29623 		uint16_t tdenfifo	: 1;
575*6f45ec7bSml29623 		uint16_t res1		: 5;
576*6f45ec7bSml29623 		uint16_t biascntl	: 1;
577*6f45ec7bSml29623 #else
578*6f45ec7bSml29623 #error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
579*6f45ec7bSml29623 #endif
580*6f45ec7bSml29623 	} bits;
581*6f45ec7bSml29623 } sr_rx_tx_ctrl_h_t;
582*6f45ec7bSml29623 
583*6f45ec7bSml29623 #define	RXPRESWIN_52US_300BITTIMES	0
584*6f45ec7bSml29623 #define	RXPRESWIN_53US_300BITTIMES	1
585*6f45ec7bSml29623 #define	RXPRESWIN_54US_300BITTIMES	2
586*6f45ec7bSml29623 #define	RXPRESWIN_55US_300BITTIMES	3
587*6f45ec7bSml29623 
588*6f45ec7bSml29623 typedef	union _sr_rx_tx_tuning_l {
589*6f45ec7bSml29623 	uint16_t value;
590*6f45ec7bSml29623 	struct {
591*6f45ec7bSml29623 #if defined(_BIT_FIELDS_HTOL)
592*6f45ec7bSml29623 		uint16_t rxeq		: 4;
593*6f45ec7bSml29623 		uint16_t res1		: 12;
594*6f45ec7bSml29623 #elif defined(_BIT_FIELDS_LTOH)
595*6f45ec7bSml29623 		uint16_t res1		: 12;
596*6f45ec7bSml29623 		uint16_t rxeq		: 4;
597*6f45ec7bSml29623 #else
598*6f45ec7bSml29623 #error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
599*6f45ec7bSml29623 #endif
600*6f45ec7bSml29623 	} bits;
601*6f45ec7bSml29623 } sr_rx_tx_tuning_l_t;
602*6f45ec7bSml29623 
603*6f45ec7bSml29623 typedef	union _sr_rx_tx_tuning_h {
604*6f45ec7bSml29623 	uint16_t value;
605*6f45ec7bSml29623 	struct {
606*6f45ec7bSml29623 #if defined(_BIT_FIELDS_HTOL)
607*6f45ec7bSml29623 		uint16_t res1		: 8;
608*6f45ec7bSml29623 		uint16_t rp		: 2;
609*6f45ec7bSml29623 		uint16_t rz		: 2;
610*6f45ec7bSml29623 		uint16_t vtxlo		: 4;
611*6f45ec7bSml29623 #elif defined(_BIT_FIELDS_LTOH)
612*6f45ec7bSml29623 		uint16_t vtxlo		: 4;
613*6f45ec7bSml29623 		uint16_t rz		: 2;
614*6f45ec7bSml29623 		uint16_t rp		: 2;
615*6f45ec7bSml29623 		uint16_t res1		: 8;
616*6f45ec7bSml29623 #else
617*6f45ec7bSml29623 #error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
618*6f45ec7bSml29623 #endif
619*6f45ec7bSml29623 	} bits;
620*6f45ec7bSml29623 } sr_rx_tx_tuning_h_t;
621*6f45ec7bSml29623 
622*6f45ec7bSml29623 typedef	union _sr_rx_syncchar_l {
623*6f45ec7bSml29623 	uint16_t value;
624*6f45ec7bSml29623 	struct {
625*6f45ec7bSml29623 #if defined(_BIT_FIELDS_HTOL)
626*6f45ec7bSml29623 		uint16_t syncchar_0_3	: 4;
627*6f45ec7bSml29623 		uint16_t res1		: 2;
628*6f45ec7bSml29623 		uint16_t syncmask	: 10;
629*6f45ec7bSml29623 #elif defined(_BIT_FIELDS_LTOH)
630*6f45ec7bSml29623 		uint16_t syncmask	: 10;
631*6f45ec7bSml29623 		uint16_t res1		: 2;
632*6f45ec7bSml29623 		uint16_t syncchar_0_3	: 4;
633*6f45ec7bSml29623 #else
634*6f45ec7bSml29623 #error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
635*6f45ec7bSml29623 #endif
636*6f45ec7bSml29623 	} bits;
637*6f45ec7bSml29623 } sr_rx_syncchar_l_t;
638*6f45ec7bSml29623 
639*6f45ec7bSml29623 typedef	union _sr_rx_syncchar_h {
640*6f45ec7bSml29623 	uint16_t value;
641*6f45ec7bSml29623 	struct {
642*6f45ec7bSml29623 #if defined(_BIT_FIELDS_HTOL)
643*6f45ec7bSml29623 		uint16_t res1		: 1;
644*6f45ec7bSml29623 		uint16_t syncpol	: 1;
645*6f45ec7bSml29623 		uint16_t res2		: 8;
646*6f45ec7bSml29623 		uint16_t syncchar_4_10	: 6;
647*6f45ec7bSml29623 #elif defined(_BIT_FIELDS_LTOH)
648*6f45ec7bSml29623 		uint16_t syncchar_4_10	: 6;
649*6f45ec7bSml29623 		uint16_t res2		: 8;
650*6f45ec7bSml29623 		uint16_t syncpol	: 1;
651*6f45ec7bSml29623 		uint16_t res1		: 1;
652*6f45ec7bSml29623 #else
653*6f45ec7bSml29623 #error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
654*6f45ec7bSml29623 #endif
655*6f45ec7bSml29623 	} bits;
656*6f45ec7bSml29623 } sr_rx_syncchar_h_t;
657*6f45ec7bSml29623 
658*6f45ec7bSml29623 typedef	union _sr_rx_tx_test_l {
659*6f45ec7bSml29623 	uint16_t value;
660*6f45ec7bSml29623 	struct {
661*6f45ec7bSml29623 #if defined(_BIT_FIELDS_HTOL)
662*6f45ec7bSml29623 		uint16_t res1		: 15;
663*6f45ec7bSml29623 		uint16_t ref50		: 1;
664*6f45ec7bSml29623 #elif defined(_BIT_FIELDS_LTOH)
665*6f45ec7bSml29623 		uint16_t ref50		: 1;
666*6f45ec7bSml29623 		uint16_t res1		: 15;
667*6f45ec7bSml29623 #else
668*6f45ec7bSml29623 #error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
669*6f45ec7bSml29623 #endif
670*6f45ec7bSml29623 	} bits;
671*6f45ec7bSml29623 } sr_rx_tx_test_l_t;
672*6f45ec7bSml29623 
673*6f45ec7bSml29623 typedef	union _sr_rx_tx_test_h {
674*6f45ec7bSml29623 	uint16_t value;
675*6f45ec7bSml29623 	struct {
676*6f45ec7bSml29623 #if defined(_BIT_FIELDS_HTOL)
677*6f45ec7bSml29623 		uint16_t res1		: 5;
678*6f45ec7bSml29623 		uint16_t selftest	: 3;
679*6f45ec7bSml29623 		uint16_t res2		: 8;
680*6f45ec7bSml29623 #elif defined(_BIT_FIELDS_LTOH)
681*6f45ec7bSml29623 		uint16_t res2		: 8;
682*6f45ec7bSml29623 		uint16_t selftest	: 3;
683*6f45ec7bSml29623 		uint16_t res1		: 5;
684*6f45ec7bSml29623 #else
685*6f45ec7bSml29623 #error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
686*6f45ec7bSml29623 #endif
687*6f45ec7bSml29623 	} bits;
688*6f45ec7bSml29623 } sr_rx_tx_test_h_t;
689*6f45ec7bSml29623 
690*6f45ec7bSml29623 typedef	union _sr_glue_ctrl0_l {
691*6f45ec7bSml29623 	uint16_t value;
692*6f45ec7bSml29623 	struct {
693*6f45ec7bSml29623 #if defined(_BIT_FIELDS_HTOL)
694*6f45ec7bSml29623 		uint16_t rxlos_test	: 1;
695*6f45ec7bSml29623 		uint16_t res1		: 1;
696*6f45ec7bSml29623 		uint16_t rxlosenable	: 1;
697*6f45ec7bSml29623 		uint16_t fastresync	: 1;
698*6f45ec7bSml29623 		uint16_t samplerate	: 4;
699*6f45ec7bSml29623 		uint16_t thresholdcount	: 8;
700*6f45ec7bSml29623 #elif defined(_BIT_FIELDS_LTOH)
701*6f45ec7bSml29623 		uint16_t thresholdcount	: 8;
702*6f45ec7bSml29623 		uint16_t samplerate	: 4;
703*6f45ec7bSml29623 		uint16_t fastresync	: 1;
704*6f45ec7bSml29623 		uint16_t rxlosenable	: 1;
705*6f45ec7bSml29623 		uint16_t res1		: 1;
706*6f45ec7bSml29623 		uint16_t rxlos_test	: 1;
707*6f45ec7bSml29623 #else
708*6f45ec7bSml29623 #error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
709*6f45ec7bSml29623 #endif
710*6f45ec7bSml29623 	} bits;
711*6f45ec7bSml29623 } sr_glue_ctrl0_l_t;
712*6f45ec7bSml29623 
713*6f45ec7bSml29623 typedef	union _sr_glue_ctrl0_h {
714*6f45ec7bSml29623 	uint16_t value;
715*6f45ec7bSml29623 	struct {
716*6f45ec7bSml29623 #if defined(_BIT_FIELDS_HTOL)
717*6f45ec7bSml29623 		uint16_t res1		: 5;
718*6f45ec7bSml29623 		uint16_t bitlocktime	: 3;
719*6f45ec7bSml29623 		uint16_t res2		: 8;
720*6f45ec7bSml29623 #elif defined(_BIT_FIELDS_LTOH)
721*6f45ec7bSml29623 		uint16_t res2		: 8;
722*6f45ec7bSml29623 		uint16_t bitlocktime	: 3;
723*6f45ec7bSml29623 		uint16_t res1		: 5;
724*6f45ec7bSml29623 #else
725*6f45ec7bSml29623 #error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
726*6f45ec7bSml29623 #endif
727*6f45ec7bSml29623 	} bits;
728*6f45ec7bSml29623 } sr_glue_ctrl0_h_t;
729*6f45ec7bSml29623 
730*6f45ec7bSml29623 #define	BITLOCKTIME_64_CYCLES		0
731*6f45ec7bSml29623 #define	BITLOCKTIME_128_CYCLES		1
732*6f45ec7bSml29623 #define	BITLOCKTIME_256_CYCLES		2
733*6f45ec7bSml29623 #define	BITLOCKTIME_300_CYCLES		3
734*6f45ec7bSml29623 #define	BITLOCKTIME_384_CYCLES		4
735*6f45ec7bSml29623 #define	BITLOCKTIME_512_CYCLES		5
736*6f45ec7bSml29623 #define	BITLOCKTIME_1024_CYCLES		6
737*6f45ec7bSml29623 #define	BITLOCKTIME_2048_CYCLES		7
738*6f45ec7bSml29623 
739*6f45ec7bSml29623 typedef	union _sr_glue_ctrl1_l {
740*6f45ec7bSml29623 	uint16_t value;
741*6f45ec7bSml29623 	struct {
742*6f45ec7bSml29623 #if defined(_BIT_FIELDS_HTOL)
743*6f45ec7bSml29623 		uint16_t res1		: 14;
744*6f45ec7bSml29623 		uint16_t inittime	: 2;
745*6f45ec7bSml29623 #elif defined(_BIT_FIELDS_LTOH)
746*6f45ec7bSml29623 		uint16_t inittime	: 2;
747*6f45ec7bSml29623 		uint16_t res1		: 14;
748*6f45ec7bSml29623 #else
749*6f45ec7bSml29623 #error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
750*6f45ec7bSml29623 #endif
751*6f45ec7bSml29623 	} bits;
752*6f45ec7bSml29623 } sr_glue_ctrl1_l_t;
753*6f45ec7bSml29623 
754*6f45ec7bSml29623 typedef	union glue_ctrl1_h {
755*6f45ec7bSml29623 	uint16_t value;
756*6f45ec7bSml29623 	struct {
757*6f45ec7bSml29623 #if defined(_BIT_FIELDS_HTOL)
758*6f45ec7bSml29623 		uint16_t termr_cfg	: 2;
759*6f45ec7bSml29623 		uint16_t termt_cfg	: 2;
760*6f45ec7bSml29623 		uint16_t rtrimen	: 2;
761*6f45ec7bSml29623 		uint16_t res1		: 10;
762*6f45ec7bSml29623 #elif defined(_BIT_FIELDS_LTOH)
763*6f45ec7bSml29623 		uint16_t res1		: 10;
764*6f45ec7bSml29623 		uint16_t rtrimen	: 2;
765*6f45ec7bSml29623 		uint16_t termt_cfg	: 2;
766*6f45ec7bSml29623 		uint16_t termr_cfg	: 2;
767*6f45ec7bSml29623 #else
768*6f45ec7bSml29623 #error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
769*6f45ec7bSml29623 #endif
770*6f45ec7bSml29623 	} bits;
771*6f45ec7bSml29623 } glue_ctrl1_h_t;
772*6f45ec7bSml29623 
773*6f45ec7bSml29623 #define	TERM_CFG_67OHM		0
774*6f45ec7bSml29623 #define	TERM_CFG_72OHM		1
775*6f45ec7bSml29623 #define	TERM_CFG_80OHM		2
776*6f45ec7bSml29623 #define	TERM_CFG_87OHM		3
777*6f45ec7bSml29623 #define	TERM_CFG_46OHM		4
778*6f45ec7bSml29623 #define	TERM_CFG_48OHM		5
779*6f45ec7bSml29623 #define	TERM_CFG_52OHM		6
780*6f45ec7bSml29623 #define	TERM_CFG_55OHM		7
781*6f45ec7bSml29623 
782*6f45ec7bSml29623 #define	INITTIME_60US		0
783*6f45ec7bSml29623 #define	INITTIME_120US		1
784*6f45ec7bSml29623 #define	INITTIME_240US		2
785*6f45ec7bSml29623 #define	INITTIME_480US		3
786*6f45ec7bSml29623 
787*6f45ec7bSml29623 #ifdef	__cplusplus
788*6f45ec7bSml29623 }
789*6f45ec7bSml29623 #endif
790*6f45ec7bSml29623 
791*6f45ec7bSml29623 #endif	/* _SYS_NXGE_NXGE_SR_HW_H */
792