xref: /freebsd/sys/dev/rtwn/rtl8192c/usb/r92cu_reg.h (revision 389e4940069316fe667ffa263fa7d6390d0a960f)
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 /*
28  * MAC registers.
29  */
30 /* System Configuration. */
31 #define R92C_USB_SIE_INTF		0x0e0
32 
33 
34 /*
35  * USB registers.
36  */
37 #define R92C_USB_SUSPEND		0xfe10
38 #define R92C_USB_INFO			0xfe17
39 #define R92C_USB_SPECIAL_OPTION		0xfe55
40 #define R92C_USB_HCPWM			0xfe57
41 #define R92C_USB_HRPWM			0xfe58
42 #define R92C_USB_DMA_AGG_TO		0xfe5b
43 #define R92C_USB_AGG_TO			0xfe5c
44 #define R92C_USB_AGG_TH			0xfe5d
45 #define R92C_USB_VID			0xfe60
46 #define R92C_USB_PID			0xfe62
47 #define R92C_USB_OPTIONAL		0xfe64
48 #define R92C_USB_EP			0xfe65
49 #define R92C_USB_PHY			0xfe68
50 #define R92C_USB_MAC_ADDR		0xfe70
51 #define R92C_USB_STRING			0xfe80
52 
53 /* Bits for R92C_USB_SPECIAL_OPTION. */
54 #define R92C_USB_SPECIAL_OPTION_AGG_EN		0x08
55 #define R92C_USB_SPECIAL_OPTION_INT_BULK_SEL	0x10
56 
57 /* Bits for R92C_USB_EP. */
58 #define R92C_USB_EP_HQ_M	0x000f
59 #define R92C_USB_EP_HQ_S	0
60 #define R92C_USB_EP_NQ_M	0x00f0
61 #define R92C_USB_EP_NQ_S	4
62 #define R92C_USB_EP_LQ_M	0x0f00
63 #define R92C_USB_EP_LQ_S	8
64 
65 #endif	/* R92CU_REG_H */
66