xref: /freebsd/sys/dev/rtwn/rtl8192c/usb/r92cu_reg.h (revision 1f474190)
1 /*-
2  * Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr>
3  * Copyright (c) 2016 Andriy Voskoboinyk <avos@FreeBSD.org>
4  *
5  * Permission to use, copy, modify, and distribute this software for any
6  * purpose with or without fee is hereby granted, provided that the above
7  * copyright notice and this permission notice appear in all copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16  *
17  * $OpenBSD: if_urtwnreg.h,v 1.3 2010/11/16 18:02:59 damien Exp $
18  * $FreeBSD$
19  */
20 
21 #ifndef R92CU_REG_H
22 #define R92CU_REG_H
23 
24 #include <dev/rtwn/rtl8192c/r92c_reg.h>
25 
26 /*
27  * MAC registers.
28  */
29 /* System Configuration. */
30 #define R92C_USB_SIE_INTF		0x0e0
31 
32 /*
33  * USB registers.
34  */
35 #define R92C_USB_SUSPEND		0xfe10
36 #define R92C_USB_INFO			0xfe17
37 #define R92C_USB_SPECIAL_OPTION		0xfe55
38 #define R92C_USB_HCPWM			0xfe57
39 #define R92C_USB_HRPWM			0xfe58
40 #define R92C_USB_DMA_AGG_TO		0xfe5b
41 #define R92C_USB_AGG_TO			0xfe5c
42 #define R92C_USB_AGG_TH			0xfe5d
43 #define R92C_USB_VID			0xfe60
44 #define R92C_USB_PID			0xfe62
45 #define R92C_USB_OPTIONAL		0xfe64
46 #define R92C_USB_EP			0xfe65
47 #define R92C_USB_PHY			0xfe68
48 #define R92C_USB_MAC_ADDR		0xfe70
49 #define R92C_USB_STRING			0xfe80
50 
51 /* Bits for R92C_USB_SPECIAL_OPTION. */
52 #define R92C_USB_SPECIAL_OPTION_AGG_EN		0x08
53 #define R92C_USB_SPECIAL_OPTION_INT_BULK_SEL	0x10
54 
55 /* Bits for R92C_USB_EP. */
56 #define R92C_USB_EP_HQ_M	0x000f
57 #define R92C_USB_EP_HQ_S	0
58 #define R92C_USB_EP_NQ_M	0x00f0
59 #define R92C_USB_EP_NQ_S	4
60 #define R92C_USB_EP_LQ_M	0x0f00
61 #define R92C_USB_EP_LQ_S	8
62 
63 #endif	/* R92CU_REG_H */
64