ath - Reimport fresh from FreeBSD 01-Jan-2014 for re-port
[dragonfly.git] / sys / dev / netif / ath / ath_hal / ar9002 / ar9285an.h
1 /*
2  * Copyright (c) 2008-2009 Sam Leffler, Errno Consulting
3  * Copyright (c) 2008 Atheros Communications, Inc.
4  *
5  * Permission to use, copy, modify, and/or 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  * $FreeBSD$
18  */
19
20 #ifndef __AR9285_AN_H__
21 #define __AR9285_AN_H__
22
23 /* AR9285 Analog register definitions */
24
25 #define AR9285_AN_RF2G1         0x7820
26
27 #define AR9285_AN_RF2G1_ENPACAL      0x00000800
28 #define AR9285_AN_RF2G1_ENPACAL_S    11
29 #define AR9285_AN_RF2G1_PDPADRV1     0x02000000
30 #define AR9285_AN_RF2G1_PDPADRV1_S   25
31 #define AR9285_AN_RF2G1_PDPADRV2     0x01000000
32 #define AR9285_AN_RF2G1_PDPADRV2_S   24
33 #define AR9285_AN_RF2G1_PDPAOUT      0x00800000
34 #define AR9285_AN_RF2G1_PDPAOUT_S    23
35
36 #define AR9285_AN_RF2G2         0x7824
37
38 #define AR9285_AN_RF2G2_OFFCAL       0x00001000
39 #define AR9285_AN_RF2G2_OFFCAL_S     12
40
41 #define AR9285_AN_RF2G3         0x7828
42
43 #define AR9285_AN_RF2G3_PDVCCOMP        0x02000000
44 #define AR9285_AN_RF2G3_PDVCCOMP_S      25
45 #define AR9285_AN_RF2G3_OB_0    0x00E00000
46 #define AR9285_AN_RF2G3_OB_0_S  21
47 #define AR9285_AN_RF2G3_OB_1    0x001C0000
48 #define AR9285_AN_RF2G3_OB_1_S  18
49 #define AR9285_AN_RF2G3_OB_2    0x00038000
50 #define AR9285_AN_RF2G3_OB_2_S  15
51 #define AR9285_AN_RF2G3_OB_3    0x00007000
52 #define AR9285_AN_RF2G3_OB_3_S  12
53 #define AR9285_AN_RF2G3_OB_4    0x00000E00
54 #define AR9285_AN_RF2G3_OB_4_S  9
55 #define AR9285_AN_RF2G3_DB1_0   0x000001C0
56 #define AR9285_AN_RF2G3_DB1_0_S 6
57 #define AR9285_AN_RF2G3_DB1_1   0x00000038
58 #define AR9285_AN_RF2G3_DB1_1_S 3
59 #define AR9285_AN_RF2G3_DB1_2   0x00000007
60 #define AR9285_AN_RF2G3_DB1_2_S 0
61
62 #define AR9285_AN_RF2G4         0x782C
63
64 #define AR9285_AN_RF2G4_DB1_3   0xE0000000
65 #define AR9285_AN_RF2G4_DB1_3_S 29
66 #define AR9285_AN_RF2G4_DB1_4   0x1C000000
67 #define AR9285_AN_RF2G4_DB1_4_S 26
68
69 #define AR9285_AN_RF2G4_DB2_0   0x03800000
70 #define AR9285_AN_RF2G4_DB2_0_S 23
71 #define AR9285_AN_RF2G4_DB2_1   0x00700000
72 #define AR9285_AN_RF2G4_DB2_1_S 20
73 #define AR9285_AN_RF2G4_DB2_2   0x000E0000
74 #define AR9285_AN_RF2G4_DB2_2_S 17
75 #define AR9285_AN_RF2G4_DB2_3   0x0001C000
76 #define AR9285_AN_RF2G4_DB2_3_S 14
77 #define AR9285_AN_RF2G4_DB2_4   0x00003800
78 #define AR9285_AN_RF2G4_DB2_4_S 11
79
80 #define AR9285_AN_RF2G6         0x7834
81
82 #define AR9285_AN_RF2G6_CCOMP   0x00007800
83 #define AR9285_AN_RF2G6_CCOMP_S 11
84 #define AR9285_AN_RF2G6_OFFS    0x03f00000
85 #define AR9285_AN_RF2G6_OFFS_S  20
86
87 #define AR9285_AN_RF2G7         0x7838
88
89 #define AR9285_AN_RF2G7_PWDDB   0x00000002
90 #define AR9285_AN_RF2G7_PWDDB_S 1
91 #define AR9285_AN_RF2G7_PADRVGN2TAB0    0xE0000000
92 #define AR9285_AN_RF2G7_PADRVGN2TAB0_S  29
93
94 #define AR9285_AN_RF2G8         0x783C
95
96 #define AR9285_AN_RF2G8_PADRVGN2TAB0    0x0001C000
97 #define AR9285_AN_RF2G8_PADRVGN2TAB0_S  14
98
99 #define AR9285_AN_RF2G9         0x7840
100
101 #define AR9285_AN_RXTXBB1       0x7854
102
103 #define AR9285_AN_RXTXBB1_PDRXTXBB1    0x00000020
104 #define AR9285_AN_RXTXBB1_PDRXTXBB1_S  5
105 #define AR9285_AN_RXTXBB1_PDV2I        0x00000080
106 #define AR9285_AN_RXTXBB1_PDV2I_S      7
107 #define AR9285_AN_RXTXBB1_PDDACIF      0x00000100
108 #define AR9285_AN_RXTXBB1_PDDACIF_S    8
109 #define AR9285_AN_RXTXBB1_SPARE9       0x00000001
110 #define AR9285_AN_RXTXBB1_SPARE9_S     0
111
112 #define AR9285_AN_TOP2          0x7868
113
114 #define AR9285_AN_TOP3          0x786c
115
116 #define AR9285_AN_TOP3_XPABIAS_LVL      0x0000000C
117 #define AR9285_AN_TOP3_XPABIAS_LVL_S    2
118 #define AR9285_AN_TOP3_PWDDAC           0x00800000
119 #define AR9285_AN_TOP3_PWDDAC_S         23
120
121 #define AR9285_AN_TOP4          0x7870
122 #define AR9285_AN_TOP4_DEFAULT  0x10142c00
123
124 #endif  /* __AR9285_AN_H__ */