xref: /openbmc/linux/drivers/net/wireless/ath/ath5k/rfbuffer.h (revision 4352fab5c2a1a602447d711c84d149bf2f0bc7ba)
1203c4805SLuis R. Rodriguez /*
2203c4805SLuis R. Rodriguez  * RF Buffer handling functions
3203c4805SLuis R. Rodriguez  *
4203c4805SLuis R. Rodriguez  * Copyright (c) 2009 Nick Kossifidis <mickflemm@gmail.com>
5203c4805SLuis R. Rodriguez  *
6203c4805SLuis R. Rodriguez  * Permission to use, copy, modify, and distribute this software for any
7203c4805SLuis R. Rodriguez  * purpose with or without fee is hereby granted, provided that the above
8203c4805SLuis R. Rodriguez  * copyright notice and this permission notice appear in all copies.
9203c4805SLuis R. Rodriguez  *
10203c4805SLuis R. Rodriguez  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11203c4805SLuis R. Rodriguez  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12203c4805SLuis R. Rodriguez  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13203c4805SLuis R. Rodriguez  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14203c4805SLuis R. Rodriguez  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15203c4805SLuis R. Rodriguez  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16203c4805SLuis R. Rodriguez  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17203c4805SLuis R. Rodriguez  *
18203c4805SLuis R. Rodriguez  */
19203c4805SLuis R. Rodriguez 
20203c4805SLuis R. Rodriguez 
21203c4805SLuis R. Rodriguez /*
22203c4805SLuis R. Rodriguez  * There are some special registers on the RF chip
23203c4805SLuis R. Rodriguez  * that control various operation settings related mostly to
24203c4805SLuis R. Rodriguez  * the analog parts (channel, gain adjustment etc).
25203c4805SLuis R. Rodriguez  *
26203c4805SLuis R. Rodriguez  * We don't write on those registers directly but
27203c4805SLuis R. Rodriguez  * we send a data packet on the chip, using a special register,
28203c4805SLuis R. Rodriguez  * that holds all the settings we need. After we've sent the
29203c4805SLuis R. Rodriguez  * data packet, we write on another special register to notify hw
30203c4805SLuis R. Rodriguez  * to apply the settings. This is done so that control registers
31a180a130SBob Copeland  * can be dynamically programmed during operation and the settings
32203c4805SLuis R. Rodriguez  * are applied faster on the hw.
33203c4805SLuis R. Rodriguez  *
34203c4805SLuis R. Rodriguez  * We call each data packet an "RF Bank" and all the data we write
35203c4805SLuis R. Rodriguez  * (all RF Banks) "RF Buffer". This file holds initial RF Buffer
36203c4805SLuis R. Rodriguez  * data for the different RF chips, and various info to match RF
37203c4805SLuis R. Rodriguez  * Buffer offsets with specific RF registers so that we can access
38203c4805SLuis R. Rodriguez  * them. We tweak these settings on rfregs_init function.
39203c4805SLuis R. Rodriguez  *
40203c4805SLuis R. Rodriguez  * Also check out reg.h and U.S. Patent 6677779 B1 (about buffer
41203c4805SLuis R. Rodriguez  * registers and control registers):
42203c4805SLuis R. Rodriguez  *
43203c4805SLuis R. Rodriguez  * http://www.google.com/patents?id=qNURAAAAEBAJ
44203c4805SLuis R. Rodriguez  */
45203c4805SLuis R. Rodriguez 
46203c4805SLuis R. Rodriguez 
47203c4805SLuis R. Rodriguez /*
48203c4805SLuis R. Rodriguez  * Struct to hold default mode specific RF
49203c4805SLuis R. Rodriguez  * register values (RF Banks)
50203c4805SLuis R. Rodriguez  */
51203c4805SLuis R. Rodriguez struct ath5k_ini_rfbuffer {
52203c4805SLuis R. Rodriguez 	u8	rfb_bank;		/* RF Bank number */
53203c4805SLuis R. Rodriguez 	u16	rfb_ctrl_register;	/* RF Buffer control register */
548c2b418aSNick Kossifidis 	u32	rfb_mode_data[3];	/* RF Buffer data for each mode */
55203c4805SLuis R. Rodriguez };
56203c4805SLuis R. Rodriguez 
57203c4805SLuis R. Rodriguez /*
58203c4805SLuis R. Rodriguez  * Struct to hold RF Buffer field
59203c4805SLuis R. Rodriguez  * infos used to access certain RF
60203c4805SLuis R. Rodriguez  * analog registers
61203c4805SLuis R. Rodriguez  */
62203c4805SLuis R. Rodriguez struct ath5k_rfb_field {
63203c4805SLuis R. Rodriguez 	u8	len;	/* Field length */
64203c4805SLuis R. Rodriguez 	u16	pos;	/* Offset on the raw packet */
65203c4805SLuis R. Rodriguez 	u8	col;	/* Column -used for shifting */
66203c4805SLuis R. Rodriguez };
67203c4805SLuis R. Rodriguez 
68203c4805SLuis R. Rodriguez /*
69203c4805SLuis R. Rodriguez  * RF analog register definition
70203c4805SLuis R. Rodriguez  */
71203c4805SLuis R. Rodriguez struct ath5k_rf_reg {
72203c4805SLuis R. Rodriguez 	u8			bank;	/* RF Buffer Bank number */
73203c4805SLuis R. Rodriguez 	u8			index;	/* Register's index on rf_regs_idx */
74203c4805SLuis R. Rodriguez 	struct ath5k_rfb_field	field;	/* RF Buffer field for this register */
75203c4805SLuis R. Rodriguez };
76203c4805SLuis R. Rodriguez 
77203c4805SLuis R. Rodriguez /* Map RF registers to indexes
78203c4805SLuis R. Rodriguez  * We do this to handle common bits and make our
79203c4805SLuis R. Rodriguez  * life easier by using an index for each register
80203c4805SLuis R. Rodriguez  * instead of a full rfb_field */
81203c4805SLuis R. Rodriguez enum ath5k_rf_regs_idx {
82*4352fab5SNick Kossifidis 	/* BANK 2 */
83*4352fab5SNick Kossifidis 	AR5K_RF_TURBO = 0,
84203c4805SLuis R. Rodriguez 	/* BANK 6 */
85*4352fab5SNick Kossifidis 	AR5K_RF_OB_2GHZ,
86203c4805SLuis R. Rodriguez 	AR5K_RF_OB_5GHZ,
87203c4805SLuis R. Rodriguez 	AR5K_RF_DB_2GHZ,
88203c4805SLuis R. Rodriguez 	AR5K_RF_DB_5GHZ,
89203c4805SLuis R. Rodriguez 	AR5K_RF_FIXED_BIAS_A,
90203c4805SLuis R. Rodriguez 	AR5K_RF_FIXED_BIAS_B,
91203c4805SLuis R. Rodriguez 	AR5K_RF_PWD_XPD,
92203c4805SLuis R. Rodriguez 	AR5K_RF_XPD_SEL,
93203c4805SLuis R. Rodriguez 	AR5K_RF_XPD_GAIN,
94203c4805SLuis R. Rodriguez 	AR5K_RF_PD_GAIN_LO,
95203c4805SLuis R. Rodriguez 	AR5K_RF_PD_GAIN_HI,
96203c4805SLuis R. Rodriguez 	AR5K_RF_HIGH_VC_CP,
97203c4805SLuis R. Rodriguez 	AR5K_RF_MID_VC_CP,
98203c4805SLuis R. Rodriguez 	AR5K_RF_LOW_VC_CP,
99203c4805SLuis R. Rodriguez 	AR5K_RF_PUSH_UP,
100203c4805SLuis R. Rodriguez 	AR5K_RF_PAD2GND,
101203c4805SLuis R. Rodriguez 	AR5K_RF_XB2_LVL,
102203c4805SLuis R. Rodriguez 	AR5K_RF_XB5_LVL,
103203c4805SLuis R. Rodriguez 	AR5K_RF_PWD_ICLOBUF_2G,
104203c4805SLuis R. Rodriguez 	AR5K_RF_PWD_84,
105203c4805SLuis R. Rodriguez 	AR5K_RF_PWD_90,
106203c4805SLuis R. Rodriguez 	AR5K_RF_PWD_130,
107203c4805SLuis R. Rodriguez 	AR5K_RF_PWD_131,
108203c4805SLuis R. Rodriguez 	AR5K_RF_PWD_132,
109203c4805SLuis R. Rodriguez 	AR5K_RF_PWD_136,
110203c4805SLuis R. Rodriguez 	AR5K_RF_PWD_137,
111203c4805SLuis R. Rodriguez 	AR5K_RF_PWD_138,
112203c4805SLuis R. Rodriguez 	AR5K_RF_PWD_166,
113203c4805SLuis R. Rodriguez 	AR5K_RF_PWD_167,
114203c4805SLuis R. Rodriguez 	AR5K_RF_DERBY_CHAN_SEL_MODE,
115203c4805SLuis R. Rodriguez 	/* BANK 7 */
116203c4805SLuis R. Rodriguez 	AR5K_RF_GAIN_I,
117203c4805SLuis R. Rodriguez 	AR5K_RF_PLO_SEL,
118203c4805SLuis R. Rodriguez 	AR5K_RF_RFGAIN_SEL,
119203c4805SLuis R. Rodriguez 	AR5K_RF_RFGAIN_STEP,
120203c4805SLuis R. Rodriguez 	AR5K_RF_WAIT_S,
121203c4805SLuis R. Rodriguez 	AR5K_RF_WAIT_I,
122203c4805SLuis R. Rodriguez 	AR5K_RF_MAX_TIME,
123203c4805SLuis R. Rodriguez 	AR5K_RF_MIXVGA_OVR,
124203c4805SLuis R. Rodriguez 	AR5K_RF_MIXGAIN_OVR,
125203c4805SLuis R. Rodriguez 	AR5K_RF_MIXGAIN_STEP,
126203c4805SLuis R. Rodriguez 	AR5K_RF_PD_DELAY_A,
127203c4805SLuis R. Rodriguez 	AR5K_RF_PD_DELAY_B,
128203c4805SLuis R. Rodriguez 	AR5K_RF_PD_DELAY_XR,
129203c4805SLuis R. Rodriguez 	AR5K_RF_PD_PERIOD_A,
130203c4805SLuis R. Rodriguez 	AR5K_RF_PD_PERIOD_B,
131203c4805SLuis R. Rodriguez 	AR5K_RF_PD_PERIOD_XR,
132203c4805SLuis R. Rodriguez };
133203c4805SLuis R. Rodriguez 
134203c4805SLuis R. Rodriguez 
135203c4805SLuis R. Rodriguez /*******************\
136203c4805SLuis R. Rodriguez * RF5111 (Sombrero) *
137203c4805SLuis R. Rodriguez \*******************/
138203c4805SLuis R. Rodriguez 
139*4352fab5SNick Kossifidis /* BANK 2				len  pos col */
140*4352fab5SNick Kossifidis #define	AR5K_RF5111_RF_TURBO		{ 1, 3,   0 }
141*4352fab5SNick Kossifidis 
142203c4805SLuis R. Rodriguez /* BANK 6				len  pos col */
143203c4805SLuis R. Rodriguez #define	AR5K_RF5111_OB_2GHZ		{ 3, 119, 0 }
144203c4805SLuis R. Rodriguez #define	AR5K_RF5111_DB_2GHZ		{ 3, 122, 0 }
145203c4805SLuis R. Rodriguez 
146203c4805SLuis R. Rodriguez #define	AR5K_RF5111_OB_5GHZ		{ 3, 104, 0 }
147203c4805SLuis R. Rodriguez #define	AR5K_RF5111_DB_5GHZ		{ 3, 107, 0 }
148203c4805SLuis R. Rodriguez 
149203c4805SLuis R. Rodriguez #define	AR5K_RF5111_PWD_XPD		{ 1, 95,  0 }
150203c4805SLuis R. Rodriguez #define	AR5K_RF5111_XPD_GAIN		{ 4, 96,  0 }
151203c4805SLuis R. Rodriguez 
152203c4805SLuis R. Rodriguez /* Access to PWD registers */
153203c4805SLuis R. Rodriguez #define AR5K_RF5111_PWD(_n)		{ 1, (135 - _n), 3 }
154203c4805SLuis R. Rodriguez 
155203c4805SLuis R. Rodriguez /* BANK 7				len  pos col */
156203c4805SLuis R. Rodriguez #define	AR5K_RF5111_GAIN_I		{ 6, 29,  0 }
157203c4805SLuis R. Rodriguez #define	AR5K_RF5111_PLO_SEL		{ 1, 4,   0 }
158203c4805SLuis R. Rodriguez #define	AR5K_RF5111_RFGAIN_SEL		{ 1, 36,  0 }
159203c4805SLuis R. Rodriguez #define AR5K_RF5111_RFGAIN_STEP		{ 6, 37,  0 }
160203c4805SLuis R. Rodriguez /* Only on AR5212 BaseBand and up */
161203c4805SLuis R. Rodriguez #define	AR5K_RF5111_WAIT_S		{ 5, 19,  0 }
162203c4805SLuis R. Rodriguez #define	AR5K_RF5111_WAIT_I		{ 5, 24,  0 }
163203c4805SLuis R. Rodriguez #define	AR5K_RF5111_MAX_TIME		{ 2, 49,  0 }
164203c4805SLuis R. Rodriguez 
165203c4805SLuis R. Rodriguez static const struct ath5k_rf_reg rf_regs_5111[] = {
166*4352fab5SNick Kossifidis 	{2, AR5K_RF_TURBO,		AR5K_RF5111_RF_TURBO},
167203c4805SLuis R. Rodriguez 	{6, AR5K_RF_OB_2GHZ,		AR5K_RF5111_OB_2GHZ},
168203c4805SLuis R. Rodriguez 	{6, AR5K_RF_DB_2GHZ,		AR5K_RF5111_DB_2GHZ},
169203c4805SLuis R. Rodriguez 	{6, AR5K_RF_OB_5GHZ,		AR5K_RF5111_OB_5GHZ},
170203c4805SLuis R. Rodriguez 	{6, AR5K_RF_DB_5GHZ,		AR5K_RF5111_DB_5GHZ},
171203c4805SLuis R. Rodriguez 	{6, AR5K_RF_PWD_XPD,		AR5K_RF5111_PWD_XPD},
172203c4805SLuis R. Rodriguez 	{6, AR5K_RF_XPD_GAIN,		AR5K_RF5111_XPD_GAIN},
173203c4805SLuis R. Rodriguez 	{6, AR5K_RF_PWD_84,		AR5K_RF5111_PWD(84)},
174203c4805SLuis R. Rodriguez 	{6, AR5K_RF_PWD_90,		AR5K_RF5111_PWD(90)},
175203c4805SLuis R. Rodriguez 	{7, AR5K_RF_GAIN_I,		AR5K_RF5111_GAIN_I},
176203c4805SLuis R. Rodriguez 	{7, AR5K_RF_PLO_SEL,		AR5K_RF5111_PLO_SEL},
177203c4805SLuis R. Rodriguez 	{7, AR5K_RF_RFGAIN_SEL,		AR5K_RF5111_RFGAIN_SEL},
178203c4805SLuis R. Rodriguez 	{7, AR5K_RF_RFGAIN_STEP,	AR5K_RF5111_RFGAIN_STEP},
179203c4805SLuis R. Rodriguez 	{7, AR5K_RF_WAIT_S,		AR5K_RF5111_WAIT_S},
180203c4805SLuis R. Rodriguez 	{7, AR5K_RF_WAIT_I,		AR5K_RF5111_WAIT_I},
181203c4805SLuis R. Rodriguez 	{7, AR5K_RF_MAX_TIME,		AR5K_RF5111_MAX_TIME}
182203c4805SLuis R. Rodriguez };
183203c4805SLuis R. Rodriguez 
184203c4805SLuis R. Rodriguez /* Default mode specific settings */
185203c4805SLuis R. Rodriguez static const struct ath5k_ini_rfbuffer rfb_5111[] = {
1868c2b418aSNick Kossifidis 	/* BANK / C.R.     A/XR         B           G      */
1878c2b418aSNick Kossifidis 	{ 0, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
1888c2b418aSNick Kossifidis 	{ 0, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
1898c2b418aSNick Kossifidis 	{ 0, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
1908c2b418aSNick Kossifidis 	{ 0, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
1918c2b418aSNick Kossifidis 	{ 0, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
1928c2b418aSNick Kossifidis 	{ 0, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
1938c2b418aSNick Kossifidis 	{ 0, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
1948c2b418aSNick Kossifidis 	{ 0, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
1958c2b418aSNick Kossifidis 	{ 0, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
1968c2b418aSNick Kossifidis 	{ 0, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
1978c2b418aSNick Kossifidis 	{ 0, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
1988c2b418aSNick Kossifidis 	{ 0, 0x989c, { 0x00380000, 0x00380000, 0x00380000 } },
1998c2b418aSNick Kossifidis 	{ 0, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
2008c2b418aSNick Kossifidis 	{ 0, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
2018c2b418aSNick Kossifidis 	{ 0, 0x989c, { 0x00000000, 0x000000c0, 0x00000080 } },
2028c2b418aSNick Kossifidis 	{ 0, 0x989c, { 0x000400f9, 0x000400ff, 0x000400fd } },
2038c2b418aSNick Kossifidis 	{ 0, 0x98d4, { 0x00000000, 0x00000004, 0x00000004 } },
2048c2b418aSNick Kossifidis 	{ 1, 0x98d4, { 0x00000020, 0x00000020, 0x00000020 } },
2058c2b418aSNick Kossifidis 	{ 2, 0x98d4, { 0x00000010, 0x00000010, 0x00000010 } },
2068c2b418aSNick Kossifidis 	{ 3, 0x98d8, { 0x00601068, 0x00601068, 0x00601068 } },
2078c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
2088c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
2098c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
2108c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
2118c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
2128c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x10000000, 0x10000000, 0x10000000 } },
2138c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x04000000, 0x04000000, 0x04000000 } },
2148c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
2158c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
2168c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
2178c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x0a000000, 0x00000000 } },
2188c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x003800c0, 0x023800c0, 0x003800c0 } },
2198c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00020006, 0x00000006, 0x00020006 } },
2208c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000089, 0x00000089, 0x00000089 } },
2218c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x000000a0, 0x000000a0, 0x000000a0 } },
2228c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00040007, 0x00040007, 0x00040007 } },
2238c2b418aSNick Kossifidis 	{ 6, 0x98d4, { 0x0000001a, 0x0000001a, 0x0000001a } },
2248c2b418aSNick Kossifidis 	{ 7, 0x989c, { 0x00000040, 0x00000040, 0x00000040 } },
2258c2b418aSNick Kossifidis 	{ 7, 0x989c, { 0x00000010, 0x00000010, 0x00000010 } },
2268c2b418aSNick Kossifidis 	{ 7, 0x989c, { 0x00000008, 0x00000008, 0x00000008 } },
2278c2b418aSNick Kossifidis 	{ 7, 0x989c, { 0x0000004f, 0x0000004f, 0x0000004f } },
2288c2b418aSNick Kossifidis 	{ 7, 0x989c, { 0x000000f1, 0x00000061, 0x000000f1 } },
2298c2b418aSNick Kossifidis 	{ 7, 0x989c, { 0x0000904f, 0x0000904c, 0x0000904f } },
2308c2b418aSNick Kossifidis 	{ 7, 0x989c, { 0x0000125a, 0x0000129a, 0x0000125a } },
2318c2b418aSNick Kossifidis 	{ 7, 0x98cc, { 0x0000000e, 0x0000000f, 0x0000000e } },
232203c4805SLuis R. Rodriguez };
233203c4805SLuis R. Rodriguez 
234203c4805SLuis R. Rodriguez 
235203c4805SLuis R. Rodriguez 
236203c4805SLuis R. Rodriguez /***********************\
237203c4805SLuis R. Rodriguez * RF5112/RF2112 (Derby) *
238203c4805SLuis R. Rodriguez \***********************/
239203c4805SLuis R. Rodriguez 
240*4352fab5SNick Kossifidis /* BANK 2 (Common)			len  pos col */
241*4352fab5SNick Kossifidis #define	AR5K_RF5112X_RF_TURBO		{ 1, 1,   2 }
242*4352fab5SNick Kossifidis 
243203c4805SLuis R. Rodriguez /* BANK 7 (Common)			len  pos col */
244203c4805SLuis R. Rodriguez #define	AR5K_RF5112X_GAIN_I		{ 6, 14,  0 }
245203c4805SLuis R. Rodriguez #define	AR5K_RF5112X_MIXVGA_OVR		{ 1, 36,  0 }
246203c4805SLuis R. Rodriguez #define	AR5K_RF5112X_MIXGAIN_OVR	{ 2, 37,  0 }
247203c4805SLuis R. Rodriguez #define AR5K_RF5112X_MIXGAIN_STEP	{ 4, 32,  0 }
248203c4805SLuis R. Rodriguez #define	AR5K_RF5112X_PD_DELAY_A		{ 4, 58,  0 }
249203c4805SLuis R. Rodriguez #define	AR5K_RF5112X_PD_DELAY_B		{ 4, 62,  0 }
250203c4805SLuis R. Rodriguez #define	AR5K_RF5112X_PD_DELAY_XR	{ 4, 66,  0 }
251203c4805SLuis R. Rodriguez #define	AR5K_RF5112X_PD_PERIOD_A	{ 4, 70,  0 }
252203c4805SLuis R. Rodriguez #define	AR5K_RF5112X_PD_PERIOD_B	{ 4, 74,  0 }
253203c4805SLuis R. Rodriguez #define	AR5K_RF5112X_PD_PERIOD_XR	{ 4, 78,  0 }
254203c4805SLuis R. Rodriguez 
255203c4805SLuis R. Rodriguez /* RFX112 (Derby 1) */
256203c4805SLuis R. Rodriguez 
257203c4805SLuis R. Rodriguez /* BANK 6 				len  pos col */
258203c4805SLuis R. Rodriguez #define	AR5K_RF5112_OB_2GHZ		{ 3, 269, 0 }
259203c4805SLuis R. Rodriguez #define	AR5K_RF5112_DB_2GHZ		{ 3, 272, 0 }
260203c4805SLuis R. Rodriguez 
261203c4805SLuis R. Rodriguez #define	AR5K_RF5112_OB_5GHZ		{ 3, 261, 0 }
262203c4805SLuis R. Rodriguez #define	AR5K_RF5112_DB_5GHZ		{ 3, 264, 0 }
263203c4805SLuis R. Rodriguez 
264203c4805SLuis R. Rodriguez #define	AR5K_RF5112_FIXED_BIAS_A	{ 1, 260, 0 }
265203c4805SLuis R. Rodriguez #define	AR5K_RF5112_FIXED_BIAS_B	{ 1, 259, 0 }
266203c4805SLuis R. Rodriguez 
267203c4805SLuis R. Rodriguez #define	AR5K_RF5112_XPD_SEL		{ 1, 284, 0 }
268203c4805SLuis R. Rodriguez #define	AR5K_RF5112_XPD_GAIN		{ 2, 252, 0 }
269203c4805SLuis R. Rodriguez 
270203c4805SLuis R. Rodriguez /* Access to PWD registers */
271203c4805SLuis R. Rodriguez #define AR5K_RF5112_PWD(_n)		{ 1, (302 - _n), 3 }
272203c4805SLuis R. Rodriguez 
273203c4805SLuis R. Rodriguez static const struct ath5k_rf_reg rf_regs_5112[] = {
274*4352fab5SNick Kossifidis 	{2, AR5K_RF_TURBO,		AR5K_RF5112X_RF_TURBO},
275203c4805SLuis R. Rodriguez 	{6, AR5K_RF_OB_2GHZ,		AR5K_RF5112_OB_2GHZ},
276203c4805SLuis R. Rodriguez 	{6, AR5K_RF_DB_2GHZ,		AR5K_RF5112_DB_2GHZ},
277203c4805SLuis R. Rodriguez 	{6, AR5K_RF_OB_5GHZ,		AR5K_RF5112_OB_5GHZ},
278203c4805SLuis R. Rodriguez 	{6, AR5K_RF_DB_5GHZ,		AR5K_RF5112_DB_5GHZ},
279203c4805SLuis R. Rodriguez 	{6, AR5K_RF_FIXED_BIAS_A,	AR5K_RF5112_FIXED_BIAS_A},
280203c4805SLuis R. Rodriguez 	{6, AR5K_RF_FIXED_BIAS_B,	AR5K_RF5112_FIXED_BIAS_B},
281203c4805SLuis R. Rodriguez 	{6, AR5K_RF_XPD_SEL,		AR5K_RF5112_XPD_SEL},
282203c4805SLuis R. Rodriguez 	{6, AR5K_RF_XPD_GAIN,		AR5K_RF5112_XPD_GAIN},
283203c4805SLuis R. Rodriguez 	{6, AR5K_RF_PWD_130,		AR5K_RF5112_PWD(130)},
284203c4805SLuis R. Rodriguez 	{6, AR5K_RF_PWD_131,		AR5K_RF5112_PWD(131)},
285203c4805SLuis R. Rodriguez 	{6, AR5K_RF_PWD_132,		AR5K_RF5112_PWD(132)},
286203c4805SLuis R. Rodriguez 	{6, AR5K_RF_PWD_136,		AR5K_RF5112_PWD(136)},
287203c4805SLuis R. Rodriguez 	{6, AR5K_RF_PWD_137,		AR5K_RF5112_PWD(137)},
288203c4805SLuis R. Rodriguez 	{6, AR5K_RF_PWD_138,		AR5K_RF5112_PWD(138)},
289203c4805SLuis R. Rodriguez 	{7, AR5K_RF_GAIN_I,		AR5K_RF5112X_GAIN_I},
290203c4805SLuis R. Rodriguez 	{7, AR5K_RF_MIXVGA_OVR,		AR5K_RF5112X_MIXVGA_OVR},
291203c4805SLuis R. Rodriguez 	{7, AR5K_RF_MIXGAIN_OVR,	AR5K_RF5112X_MIXGAIN_OVR},
292203c4805SLuis R. Rodriguez 	{7, AR5K_RF_MIXGAIN_STEP,	AR5K_RF5112X_MIXGAIN_STEP},
293203c4805SLuis R. Rodriguez 	{7, AR5K_RF_PD_DELAY_A,		AR5K_RF5112X_PD_DELAY_A},
294203c4805SLuis R. Rodriguez 	{7, AR5K_RF_PD_DELAY_B,		AR5K_RF5112X_PD_DELAY_B},
295203c4805SLuis R. Rodriguez 	{7, AR5K_RF_PD_DELAY_XR,	AR5K_RF5112X_PD_DELAY_XR},
296203c4805SLuis R. Rodriguez 	{7, AR5K_RF_PD_PERIOD_A,	AR5K_RF5112X_PD_PERIOD_A},
297203c4805SLuis R. Rodriguez 	{7, AR5K_RF_PD_PERIOD_B,	AR5K_RF5112X_PD_PERIOD_B},
298203c4805SLuis R. Rodriguez 	{7, AR5K_RF_PD_PERIOD_XR,	AR5K_RF5112X_PD_PERIOD_XR},
299203c4805SLuis R. Rodriguez };
300203c4805SLuis R. Rodriguez 
301203c4805SLuis R. Rodriguez /* Default mode specific settings */
302203c4805SLuis R. Rodriguez static const struct ath5k_ini_rfbuffer rfb_5112[] = {
3038c2b418aSNick Kossifidis 	/* BANK / C.R.     A/XR         B           G      */
3048c2b418aSNick Kossifidis 	{ 1, 0x98d4, { 0x00000020, 0x00000020, 0x00000020 } },
3058c2b418aSNick Kossifidis 	{ 2, 0x98d0, { 0x03060408, 0x03060408, 0x03060408 } },
3068c2b418aSNick Kossifidis 	{ 3, 0x98dc, { 0x00a0c0c0, 0x00e0c0c0, 0x00e0c0c0 } },
3078c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00a00000, 0x00a00000, 0x00a00000 } },
3088c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x000a0000, 0x000a0000, 0x000a0000 } },
3098c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
3108c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
3118c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00660000, 0x00660000, 0x00660000 } },
3128c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00db0000, 0x00db0000, 0x00db0000 } },
3138c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00f10000, 0x00f10000, 0x00f10000 } },
3148c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00120000, 0x00120000, 0x00120000 } },
3158c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00120000, 0x00120000, 0x00120000 } },
3168c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00730000, 0x00730000, 0x00730000 } },
3178c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
3188c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x000c0000, 0x000c0000, 0x000c0000 } },
3198c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00ff0000, 0x00ff0000, 0x00ff0000 } },
3208c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00ff0000, 0x00ff0000, 0x00ff0000 } },
3218c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x008b0000, 0x008b0000, 0x008b0000 } },
3228c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00600000, 0x00600000, 0x00600000 } },
3238c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x000c0000, 0x000c0000, 0x000c0000 } },
3248c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00840000, 0x00840000, 0x00840000 } },
3258c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00640000, 0x00640000, 0x00640000 } },
3268c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00200000, 0x00200000, 0x00200000 } },
3278c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00240000, 0x00240000, 0x00240000 } },
3288c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00250000, 0x00250000, 0x00250000 } },
3298c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00110000, 0x00110000, 0x00110000 } },
3308c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00110000, 0x00110000, 0x00110000 } },
3318c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00510000, 0x00510000, 0x00510000 } },
3328c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x1c040000, 0x1c040000, 0x1c040000 } },
3338c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x000a0000, 0x000a0000, 0x000a0000 } },
3348c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00a10000, 0x00a10000, 0x00a10000 } },
3358c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00400000, 0x00400000, 0x00400000 } },
3368c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x03090000, 0x03090000, 0x03090000 } },
3378c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x06000000, 0x06000000, 0x06000000 } },
3388c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x000000b0, 0x000000a8, 0x000000a8 } },
3398c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x0000002e, 0x0000002e, 0x0000002e } },
3408c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x006c4a41, 0x006c4af1, 0x006c4a61 } },
3418c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x0050892a, 0x0050892b, 0x0050892b } },
3428c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00842400, 0x00842400, 0x00842400 } },
3438c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00c69200, 0x00c69200, 0x00c69200 } },
3448c2b418aSNick Kossifidis 	{ 6, 0x98d0, { 0x0002000c, 0x0002000c, 0x0002000c } },
3458c2b418aSNick Kossifidis 	{ 7, 0x989c, { 0x00000094, 0x00000094, 0x00000094 } },
3468c2b418aSNick Kossifidis 	{ 7, 0x989c, { 0x00000091, 0x00000091, 0x00000091 } },
3478c2b418aSNick Kossifidis 	{ 7, 0x989c, { 0x0000000a, 0x00000012, 0x00000012 } },
3488c2b418aSNick Kossifidis 	{ 7, 0x989c, { 0x00000080, 0x00000080, 0x00000080 } },
3498c2b418aSNick Kossifidis 	{ 7, 0x989c, { 0x000000c1, 0x000000c1, 0x000000c1 } },
3508c2b418aSNick Kossifidis 	{ 7, 0x989c, { 0x00000060, 0x00000060, 0x00000060 } },
3518c2b418aSNick Kossifidis 	{ 7, 0x989c, { 0x000000f0, 0x000000f0, 0x000000f0 } },
3528c2b418aSNick Kossifidis 	{ 7, 0x989c, { 0x00000022, 0x00000022, 0x00000022 } },
3538c2b418aSNick Kossifidis 	{ 7, 0x989c, { 0x00000092, 0x00000092, 0x00000092 } },
3548c2b418aSNick Kossifidis 	{ 7, 0x989c, { 0x000000d4, 0x000000d4, 0x000000d4 } },
3558c2b418aSNick Kossifidis 	{ 7, 0x989c, { 0x000014cc, 0x000014cc, 0x000014cc } },
3568c2b418aSNick Kossifidis 	{ 7, 0x989c, { 0x0000048c, 0x0000048c, 0x0000048c } },
3578c2b418aSNick Kossifidis 	{ 7, 0x98c4, { 0x00000003, 0x00000003, 0x00000003 } },
358203c4805SLuis R. Rodriguez };
359203c4805SLuis R. Rodriguez 
360203c4805SLuis R. Rodriguez /* RFX112A (Derby 2) */
361203c4805SLuis R. Rodriguez 
362203c4805SLuis R. Rodriguez /* BANK 6				len  pos col */
363203c4805SLuis R. Rodriguez #define	AR5K_RF5112A_OB_2GHZ		{ 3, 287, 0 }
364203c4805SLuis R. Rodriguez #define	AR5K_RF5112A_DB_2GHZ		{ 3, 290, 0 }
365203c4805SLuis R. Rodriguez 
366203c4805SLuis R. Rodriguez #define	AR5K_RF5112A_OB_5GHZ		{ 3, 279, 0 }
367203c4805SLuis R. Rodriguez #define	AR5K_RF5112A_DB_5GHZ		{ 3, 282, 0 }
368203c4805SLuis R. Rodriguez 
369203c4805SLuis R. Rodriguez #define	AR5K_RF5112A_FIXED_BIAS_A	{ 1, 278, 0 }
370203c4805SLuis R. Rodriguez #define	AR5K_RF5112A_FIXED_BIAS_B	{ 1, 277, 0 }
371203c4805SLuis R. Rodriguez 
372203c4805SLuis R. Rodriguez #define	AR5K_RF5112A_XPD_SEL		{ 1, 302, 0 }
373203c4805SLuis R. Rodriguez #define	AR5K_RF5112A_PDGAINLO		{ 2, 270, 0 }
374203c4805SLuis R. Rodriguez #define	AR5K_RF5112A_PDGAINHI		{ 2, 257, 0 }
375203c4805SLuis R. Rodriguez 
376203c4805SLuis R. Rodriguez /* Access to PWD registers */
377203c4805SLuis R. Rodriguez #define AR5K_RF5112A_PWD(_n)		{ 1, (306 - _n), 3 }
378203c4805SLuis R. Rodriguez 
379203c4805SLuis R. Rodriguez /* Voltage regulators */
380203c4805SLuis R. Rodriguez #define	AR5K_RF5112A_HIGH_VC_CP		{ 2, 90,  2 }
381203c4805SLuis R. Rodriguez #define	AR5K_RF5112A_MID_VC_CP		{ 2, 92,  2 }
382203c4805SLuis R. Rodriguez #define	AR5K_RF5112A_LOW_VC_CP		{ 2, 94,  2 }
383203c4805SLuis R. Rodriguez #define	AR5K_RF5112A_PUSH_UP		{ 1, 254,  2 }
384203c4805SLuis R. Rodriguez 
385203c4805SLuis R. Rodriguez /* Power consumption */
386203c4805SLuis R. Rodriguez #define	AR5K_RF5112A_PAD2GND		{ 1, 281, 1 }
387203c4805SLuis R. Rodriguez #define	AR5K_RF5112A_XB2_LVL		{ 2, 1,	  3 }
388203c4805SLuis R. Rodriguez #define	AR5K_RF5112A_XB5_LVL		{ 2, 3,	  3 }
389203c4805SLuis R. Rodriguez 
390203c4805SLuis R. Rodriguez static const struct ath5k_rf_reg rf_regs_5112a[] = {
391*4352fab5SNick Kossifidis 	{2, AR5K_RF_TURBO,		AR5K_RF5112X_RF_TURBO},
392203c4805SLuis R. Rodriguez 	{6, AR5K_RF_OB_2GHZ,		AR5K_RF5112A_OB_2GHZ},
393203c4805SLuis R. Rodriguez 	{6, AR5K_RF_DB_2GHZ,		AR5K_RF5112A_DB_2GHZ},
394203c4805SLuis R. Rodriguez 	{6, AR5K_RF_OB_5GHZ,		AR5K_RF5112A_OB_5GHZ},
395203c4805SLuis R. Rodriguez 	{6, AR5K_RF_DB_5GHZ,		AR5K_RF5112A_DB_5GHZ},
396203c4805SLuis R. Rodriguez 	{6, AR5K_RF_FIXED_BIAS_A,	AR5K_RF5112A_FIXED_BIAS_A},
397203c4805SLuis R. Rodriguez 	{6, AR5K_RF_FIXED_BIAS_B,	AR5K_RF5112A_FIXED_BIAS_B},
398203c4805SLuis R. Rodriguez 	{6, AR5K_RF_XPD_SEL,		AR5K_RF5112A_XPD_SEL},
399203c4805SLuis R. Rodriguez 	{6, AR5K_RF_PD_GAIN_LO,		AR5K_RF5112A_PDGAINLO},
400203c4805SLuis R. Rodriguez 	{6, AR5K_RF_PD_GAIN_HI,		AR5K_RF5112A_PDGAINHI},
401203c4805SLuis R. Rodriguez 	{6, AR5K_RF_PWD_130,		AR5K_RF5112A_PWD(130)},
402203c4805SLuis R. Rodriguez 	{6, AR5K_RF_PWD_131,		AR5K_RF5112A_PWD(131)},
403203c4805SLuis R. Rodriguez 	{6, AR5K_RF_PWD_132,		AR5K_RF5112A_PWD(132)},
404203c4805SLuis R. Rodriguez 	{6, AR5K_RF_PWD_136,		AR5K_RF5112A_PWD(136)},
405203c4805SLuis R. Rodriguez 	{6, AR5K_RF_PWD_137,		AR5K_RF5112A_PWD(137)},
406203c4805SLuis R. Rodriguez 	{6, AR5K_RF_PWD_138,		AR5K_RF5112A_PWD(138)},
407203c4805SLuis R. Rodriguez 	{6, AR5K_RF_PWD_166,		AR5K_RF5112A_PWD(166)},
408203c4805SLuis R. Rodriguez 	{6, AR5K_RF_PWD_167,		AR5K_RF5112A_PWD(167)},
409203c4805SLuis R. Rodriguez 	{6, AR5K_RF_HIGH_VC_CP,		AR5K_RF5112A_HIGH_VC_CP},
410203c4805SLuis R. Rodriguez 	{6, AR5K_RF_MID_VC_CP,		AR5K_RF5112A_MID_VC_CP},
411203c4805SLuis R. Rodriguez 	{6, AR5K_RF_LOW_VC_CP,		AR5K_RF5112A_LOW_VC_CP},
412203c4805SLuis R. Rodriguez 	{6, AR5K_RF_PUSH_UP,		AR5K_RF5112A_PUSH_UP},
413203c4805SLuis R. Rodriguez 	{6, AR5K_RF_PAD2GND,		AR5K_RF5112A_PAD2GND},
414203c4805SLuis R. Rodriguez 	{6, AR5K_RF_XB2_LVL,		AR5K_RF5112A_XB2_LVL},
415203c4805SLuis R. Rodriguez 	{6, AR5K_RF_XB5_LVL,		AR5K_RF5112A_XB5_LVL},
416203c4805SLuis R. Rodriguez 	{7, AR5K_RF_GAIN_I,		AR5K_RF5112X_GAIN_I},
417203c4805SLuis R. Rodriguez 	{7, AR5K_RF_MIXVGA_OVR,		AR5K_RF5112X_MIXVGA_OVR},
418203c4805SLuis R. Rodriguez 	{7, AR5K_RF_MIXGAIN_OVR,	AR5K_RF5112X_MIXGAIN_OVR},
419203c4805SLuis R. Rodriguez 	{7, AR5K_RF_MIXGAIN_STEP,	AR5K_RF5112X_MIXGAIN_STEP},
420203c4805SLuis R. Rodriguez 	{7, AR5K_RF_PD_DELAY_A,		AR5K_RF5112X_PD_DELAY_A},
421203c4805SLuis R. Rodriguez 	{7, AR5K_RF_PD_DELAY_B,		AR5K_RF5112X_PD_DELAY_B},
422203c4805SLuis R. Rodriguez 	{7, AR5K_RF_PD_DELAY_XR,	AR5K_RF5112X_PD_DELAY_XR},
423203c4805SLuis R. Rodriguez 	{7, AR5K_RF_PD_PERIOD_A,	AR5K_RF5112X_PD_PERIOD_A},
424203c4805SLuis R. Rodriguez 	{7, AR5K_RF_PD_PERIOD_B,	AR5K_RF5112X_PD_PERIOD_B},
425203c4805SLuis R. Rodriguez 	{7, AR5K_RF_PD_PERIOD_XR,	AR5K_RF5112X_PD_PERIOD_XR},
426203c4805SLuis R. Rodriguez };
427203c4805SLuis R. Rodriguez 
428203c4805SLuis R. Rodriguez /* Default mode specific settings */
429203c4805SLuis R. Rodriguez static const struct ath5k_ini_rfbuffer rfb_5112a[] = {
4308c2b418aSNick Kossifidis 	/* BANK / C.R.     A/XR         B           G      */
4318c2b418aSNick Kossifidis 	{ 1, 0x98d4, { 0x00000020, 0x00000020, 0x00000020 } },
4328c2b418aSNick Kossifidis 	{ 2, 0x98d0, { 0x03060408, 0x03060408, 0x03060408 } },
4338c2b418aSNick Kossifidis 	{ 3, 0x98dc, { 0x00a020c0, 0x00e020c0, 0x00e020c0 } },
4348c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x0f000000, 0x0f000000, 0x0f000000 } },
4358c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
4368c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00800000, 0x00800000, 0x00800000 } },
4378c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x002a0000, 0x002a0000, 0x002a0000 } },
4388c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00010000, 0x00010000, 0x00010000 } },
4398c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
4408c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00180000, 0x00180000, 0x00180000 } },
4418c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00600000, 0x006e0000, 0x006e0000 } },
4428c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00c70000, 0x00c70000, 0x00c70000 } },
4438c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x004b0000, 0x004b0000, 0x004b0000 } },
4448c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x04480000, 0x04480000, 0x04480000 } },
4458c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x004c0000, 0x004c0000, 0x004c0000 } },
4468c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00e40000, 0x00e40000, 0x00e40000 } },
4478c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
4488c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00fc0000, 0x00fc0000, 0x00fc0000 } },
4498c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00ff0000, 0x00ff0000, 0x00ff0000 } },
4508c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x043f0000, 0x043f0000, 0x043f0000 } },
4518c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x000c0000, 0x000c0000, 0x000c0000 } },
4528c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x02190000, 0x02190000, 0x02190000 } },
4538c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00240000, 0x00240000, 0x00240000 } },
4548c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00b40000, 0x00b40000, 0x00b40000 } },
4558c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00990000, 0x00990000, 0x00990000 } },
4568c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00500000, 0x00500000, 0x00500000 } },
4578c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x002a0000, 0x002a0000, 0x002a0000 } },
4588c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00120000, 0x00120000, 0x00120000 } },
4598c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0xc0320000, 0xc0320000, 0xc0320000 } },
4608c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x01740000, 0x01740000, 0x01740000 } },
4618c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00110000, 0x00110000, 0x00110000 } },
4628c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x86280000, 0x86280000, 0x86280000 } },
4638c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x31840000, 0x31840000, 0x31840000 } },
4648c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00f20080, 0x00f20080, 0x00f20080 } },
4658c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00270019, 0x00270019, 0x00270019 } },
4668c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000003, 0x00000003, 0x00000003 } },
4678c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
4688c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x000000b2, 0x000000b2, 0x000000b2 } },
4698c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00b02084, 0x00b02084, 0x00b02084 } },
4708c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x004125a4, 0x004125a4, 0x004125a4 } },
4718c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00119220, 0x00119220, 0x00119220 } },
4728c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x001a4800, 0x001a4800, 0x001a4800 } },
4738c2b418aSNick Kossifidis 	{ 6, 0x98d8, { 0x000b0230, 0x000b0230, 0x000b0230 } },
4748c2b418aSNick Kossifidis 	{ 7, 0x989c, { 0x00000094, 0x00000094, 0x00000094 } },
4758c2b418aSNick Kossifidis 	{ 7, 0x989c, { 0x00000091, 0x00000091, 0x00000091 } },
4768c2b418aSNick Kossifidis 	{ 7, 0x989c, { 0x00000012, 0x00000012, 0x00000012 } },
4778c2b418aSNick Kossifidis 	{ 7, 0x989c, { 0x00000080, 0x00000080, 0x00000080 } },
4788c2b418aSNick Kossifidis 	{ 7, 0x989c, { 0x000000d9, 0x000000d9, 0x000000d9 } },
4798c2b418aSNick Kossifidis 	{ 7, 0x989c, { 0x00000060, 0x00000060, 0x00000060 } },
4808c2b418aSNick Kossifidis 	{ 7, 0x989c, { 0x000000f0, 0x000000f0, 0x000000f0 } },
4818c2b418aSNick Kossifidis 	{ 7, 0x989c, { 0x000000a2, 0x000000a2, 0x000000a2 } },
4828c2b418aSNick Kossifidis 	{ 7, 0x989c, { 0x00000052, 0x00000052, 0x00000052 } },
4838c2b418aSNick Kossifidis 	{ 7, 0x989c, { 0x000000d4, 0x000000d4, 0x000000d4 } },
4848c2b418aSNick Kossifidis 	{ 7, 0x989c, { 0x000014cc, 0x000014cc, 0x000014cc } },
4858c2b418aSNick Kossifidis 	{ 7, 0x989c, { 0x0000048c, 0x0000048c, 0x0000048c } },
4868c2b418aSNick Kossifidis 	{ 7, 0x98c4, { 0x00000003, 0x00000003, 0x00000003 } },
487203c4805SLuis R. Rodriguez };
488203c4805SLuis R. Rodriguez 
489203c4805SLuis R. Rodriguez 
490203c4805SLuis R. Rodriguez 
491203c4805SLuis R. Rodriguez /******************\
492203c4805SLuis R. Rodriguez * RF2413 (Griffin) *
493203c4805SLuis R. Rodriguez \******************/
494203c4805SLuis R. Rodriguez 
495*4352fab5SNick Kossifidis /* BANK 2				len  pos col */
496*4352fab5SNick Kossifidis #define AR5K_RF2413_RF_TURBO		{ 1, 1,   2 }
497*4352fab5SNick Kossifidis 
498203c4805SLuis R. Rodriguez /* BANK 6 				len  pos col */
499203c4805SLuis R. Rodriguez #define	AR5K_RF2413_OB_2GHZ		{ 3, 168, 0 }
500203c4805SLuis R. Rodriguez #define	AR5K_RF2413_DB_2GHZ		{ 3, 165, 0 }
501203c4805SLuis R. Rodriguez 
502203c4805SLuis R. Rodriguez static const struct ath5k_rf_reg rf_regs_2413[] = {
503*4352fab5SNick Kossifidis 	{2, AR5K_RF_TURBO,		AR5K_RF2413_RF_TURBO},
504203c4805SLuis R. Rodriguez 	{6, AR5K_RF_OB_2GHZ,		AR5K_RF2413_OB_2GHZ},
505203c4805SLuis R. Rodriguez 	{6, AR5K_RF_DB_2GHZ,		AR5K_RF2413_DB_2GHZ},
506203c4805SLuis R. Rodriguez };
507203c4805SLuis R. Rodriguez 
508203c4805SLuis R. Rodriguez /* Default mode specific settings
509203c4805SLuis R. Rodriguez  * XXX: a/aTurbo ???
510203c4805SLuis R. Rodriguez  */
511203c4805SLuis R. Rodriguez static const struct ath5k_ini_rfbuffer rfb_2413[] = {
5128c2b418aSNick Kossifidis 	/* BANK / C.R.     A/XR         B           G      */
5138c2b418aSNick Kossifidis 	{ 1, 0x98d4, { 0x00000020, 0x00000020, 0x00000020 } },
5148c2b418aSNick Kossifidis 	{ 2, 0x98d0, { 0x02001408, 0x02001408, 0x02001408 } },
5158c2b418aSNick Kossifidis 	{ 3, 0x98dc, { 0x00a020c0, 0x00e020c0, 0x00e020c0 } },
5168c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0xf0000000, 0xf0000000, 0xf0000000 } },
5178c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
5188c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x03000000, 0x03000000, 0x03000000 } },
5198c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
5208c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
5218c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
5228c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
5238c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
5248c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x40400000, 0x40400000, 0x40400000 } },
5258c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x65050000, 0x65050000, 0x65050000 } },
5268c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
5278c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
5288c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00420000, 0x00420000, 0x00420000 } },
5298c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00b50000, 0x00b50000, 0x00b50000 } },
5308c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00030000, 0x00030000, 0x00030000 } },
5318c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00f70000, 0x00f70000, 0x00f70000 } },
5328c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x009d0000, 0x009d0000, 0x009d0000 } },
5338c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00220000, 0x00220000, 0x00220000 } },
5348c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x04220000, 0x04220000, 0x04220000 } },
5358c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00230018, 0x00230018, 0x00230018 } },
5368c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00280000, 0x00280060, 0x00280060 } },
5378c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x005000c0, 0x005000c3, 0x005000c3 } },
5388c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x0004007f, 0x0004007f, 0x0004007f } },
5398c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000458, 0x00000458, 0x00000458 } },
5408c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
5418c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x0000c000, 0x0000c000, 0x0000c000 } },
5428c2b418aSNick Kossifidis 	{ 6, 0x98d8, { 0x00400230, 0x00400230, 0x00400230 } },
5438c2b418aSNick Kossifidis 	{ 7, 0x989c, { 0x00006400, 0x00006400, 0x00006400 } },
5448c2b418aSNick Kossifidis 	{ 7, 0x989c, { 0x00000800, 0x00000800, 0x00000800 } },
5458c2b418aSNick Kossifidis 	{ 7, 0x98cc, { 0x0000000e, 0x0000000e, 0x0000000e } },
546203c4805SLuis R. Rodriguez };
547203c4805SLuis R. Rodriguez 
548203c4805SLuis R. Rodriguez 
549203c4805SLuis R. Rodriguez 
550203c4805SLuis R. Rodriguez /***************************\
551203c4805SLuis R. Rodriguez * RF2315/RF2316 (Cobra SoC) *
552203c4805SLuis R. Rodriguez \***************************/
553203c4805SLuis R. Rodriguez 
554*4352fab5SNick Kossifidis /* BANK 2				len  pos col */
555*4352fab5SNick Kossifidis #define	AR5K_RF2316_RF_TURBO		{ 1, 1,   2 }
556*4352fab5SNick Kossifidis 
557203c4805SLuis R. Rodriguez /* BANK 6				len  pos col */
558203c4805SLuis R. Rodriguez #define	AR5K_RF2316_OB_2GHZ		{ 3, 178, 0 }
559203c4805SLuis R. Rodriguez #define	AR5K_RF2316_DB_2GHZ		{ 3, 175, 0 }
560203c4805SLuis R. Rodriguez 
561203c4805SLuis R. Rodriguez static const struct ath5k_rf_reg rf_regs_2316[] = {
562*4352fab5SNick Kossifidis 	{2, AR5K_RF_TURBO,		AR5K_RF2316_RF_TURBO},
563203c4805SLuis R. Rodriguez 	{6, AR5K_RF_OB_2GHZ,		AR5K_RF2316_OB_2GHZ},
564203c4805SLuis R. Rodriguez 	{6, AR5K_RF_DB_2GHZ,		AR5K_RF2316_DB_2GHZ},
565203c4805SLuis R. Rodriguez };
566203c4805SLuis R. Rodriguez 
567203c4805SLuis R. Rodriguez /* Default mode specific settings */
568203c4805SLuis R. Rodriguez static const struct ath5k_ini_rfbuffer rfb_2316[] = {
5698c2b418aSNick Kossifidis 	/* BANK / C.R.     A/XR         B           G      */
5708c2b418aSNick Kossifidis 	{ 1, 0x98d4, { 0x00000020, 0x00000020, 0x00000020 } },
5718c2b418aSNick Kossifidis 	{ 2, 0x98d0, { 0x02001408, 0x02001408, 0x02001408 } },
5728c2b418aSNick Kossifidis 	{ 3, 0x98dc, { 0x00a020c0, 0x00e020c0, 0x00e020c0 } },
5738c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
5748c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0xc0000000, 0xc0000000, 0xc0000000 } },
5758c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x0f000000, 0x0f000000, 0x0f000000 } },
5768c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x02000000, 0x02000000, 0x02000000 } },
5778c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
5788c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
5798c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
5808c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
5818c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0xf8000000, 0xf8000000, 0xf8000000 } },
5828c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
5838c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x95150000, 0x95150000, 0x95150000 } },
5848c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0xc1000000, 0xc1000000, 0xc1000000 } },
5858c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
5868c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00080000, 0x00080000, 0x00080000 } },
5878c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00d50000, 0x00d50000, 0x00d50000 } },
5888c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x000e0000, 0x000e0000, 0x000e0000 } },
5898c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00dc0000, 0x00dc0000, 0x00dc0000 } },
5908c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00770000, 0x00770000, 0x00770000 } },
5918c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x008a0000, 0x008a0000, 0x008a0000 } },
5928c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x10880000, 0x10880000, 0x10880000 } },
5938c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x008c0060, 0x008c0060, 0x008c0060 } },
5948c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00a00000, 0x00a00080, 0x00a00080 } },
5958c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00400000, 0x0040000d, 0x0040000d } },
5968c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00110400, 0x00110400, 0x00110400 } },
5978c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000060, 0x00000060, 0x00000060 } },
5988c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000001, 0x00000001, 0x00000001 } },
5998c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000b00, 0x00000b00, 0x00000b00 } },
6008c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000be8, 0x00000be8, 0x00000be8 } },
6018c2b418aSNick Kossifidis 	{ 6, 0x98c0, { 0x00010000, 0x00010000, 0x00010000 } },
6028c2b418aSNick Kossifidis 	{ 7, 0x989c, { 0x00006400, 0x00006400, 0x00006400 } },
6038c2b418aSNick Kossifidis 	{ 7, 0x989c, { 0x00000800, 0x00000800, 0x00000800 } },
6048c2b418aSNick Kossifidis 	{ 7, 0x98cc, { 0x0000000e, 0x0000000e, 0x0000000e } },
605203c4805SLuis R. Rodriguez };
606203c4805SLuis R. Rodriguez 
607203c4805SLuis R. Rodriguez 
608203c4805SLuis R. Rodriguez 
609203c4805SLuis R. Rodriguez /******************************\
610203c4805SLuis R. Rodriguez * RF5413/RF5424 (Eagle/Condor) *
611203c4805SLuis R. Rodriguez \******************************/
612203c4805SLuis R. Rodriguez 
613203c4805SLuis R. Rodriguez /* BANK 6				len  pos col */
614203c4805SLuis R. Rodriguez #define	AR5K_RF5413_OB_2GHZ		{ 3, 241, 0 }
615203c4805SLuis R. Rodriguez #define	AR5K_RF5413_DB_2GHZ		{ 3, 238, 0 }
616203c4805SLuis R. Rodriguez 
617203c4805SLuis R. Rodriguez #define	AR5K_RF5413_OB_5GHZ		{ 3, 247, 0 }
618203c4805SLuis R. Rodriguez #define	AR5K_RF5413_DB_5GHZ		{ 3, 244, 0 }
619203c4805SLuis R. Rodriguez 
620203c4805SLuis R. Rodriguez #define	AR5K_RF5413_PWD_ICLOBUF2G	{ 3, 131, 3 }
621203c4805SLuis R. Rodriguez #define	AR5K_RF5413_DERBY_CHAN_SEL_MODE	{ 1, 291, 2 }
622203c4805SLuis R. Rodriguez 
623203c4805SLuis R. Rodriguez static const struct ath5k_rf_reg rf_regs_5413[] = {
624203c4805SLuis R. Rodriguez 	{6, AR5K_RF_OB_2GHZ,		 AR5K_RF5413_OB_2GHZ},
625203c4805SLuis R. Rodriguez 	{6, AR5K_RF_DB_2GHZ,		 AR5K_RF5413_DB_2GHZ},
626203c4805SLuis R. Rodriguez 	{6, AR5K_RF_OB_5GHZ,		 AR5K_RF5413_OB_5GHZ},
627203c4805SLuis R. Rodriguez 	{6, AR5K_RF_DB_5GHZ,		 AR5K_RF5413_DB_5GHZ},
628203c4805SLuis R. Rodriguez 	{6, AR5K_RF_PWD_ICLOBUF_2G,	 AR5K_RF5413_PWD_ICLOBUF2G},
629203c4805SLuis R. Rodriguez 	{6, AR5K_RF_DERBY_CHAN_SEL_MODE, AR5K_RF5413_DERBY_CHAN_SEL_MODE},
630203c4805SLuis R. Rodriguez };
631203c4805SLuis R. Rodriguez 
632203c4805SLuis R. Rodriguez /* Default mode specific settings */
633203c4805SLuis R. Rodriguez static const struct ath5k_ini_rfbuffer rfb_5413[] = {
6348c2b418aSNick Kossifidis 	/* BANK / C.R.     A/XR         B           G      */
6358c2b418aSNick Kossifidis 	{ 1, 0x98d4, { 0x00000020, 0x00000020, 0x00000020 } },
6368c2b418aSNick Kossifidis 	{ 2, 0x98d0, { 0x00000008, 0x00000008, 0x00000008 } },
6378c2b418aSNick Kossifidis 	{ 3, 0x98dc, { 0x00a000c0, 0x00e000c0, 0x00e000c0 } },
6388c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x33000000, 0x33000000, 0x33000000 } },
6398c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x01000000, 0x01000000, 0x01000000 } },
6408c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
6418c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
6428c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
6438c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x1f000000, 0x1f000000, 0x1f000000 } },
6448c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
6458c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00b80000, 0x00b80000, 0x00b80000 } },
6468c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00b70000, 0x00b70000, 0x00b70000 } },
6478c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00840000, 0x00840000, 0x00840000 } },
6488c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00980000, 0x00980000, 0x00980000 } },
6498c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00c00000, 0x00c00000, 0x00c00000 } },
6508c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00ff0000, 0x00ff0000, 0x00ff0000 } },
6518c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00ff0000, 0x00ff0000, 0x00ff0000 } },
6528c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00ff0000, 0x00ff0000, 0x00ff0000 } },
6538c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00ff0000, 0x00ff0000, 0x00ff0000 } },
6548c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00d70000, 0x00d70000, 0x00d70000 } },
6558c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00610000, 0x00610000, 0x00610000 } },
6568c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00fe0000, 0x00fe0000, 0x00fe0000 } },
6578c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00de0000, 0x00de0000, 0x00de0000 } },
6588c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x007f0000, 0x007f0000, 0x007f0000 } },
6598c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x043d0000, 0x043d0000, 0x043d0000 } },
6608c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00770000, 0x00770000, 0x00770000 } },
6618c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00440000, 0x00440000, 0x00440000 } },
6628c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00980000, 0x00980000, 0x00980000 } },
6638c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00100080, 0x00100080, 0x00100080 } },
6648c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x0005c034, 0x0005c034, 0x0005c034 } },
6658c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x003100f0, 0x003100f0, 0x003100f0 } },
6668c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x000c011f, 0x000c011f, 0x000c011f } },
6678c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00510040, 0x00510040, 0x00510040 } },
6688c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x005000da, 0x005000da, 0x005000da } },
6698c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
6708c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00004044, 0x00004044, 0x00004044 } },
6718c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
6728c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x000060c0, 0x000060c0, 0x000060c0 } },
6738c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00002c00, 0x00003600, 0x00003600 } },
6748c2b418aSNick Kossifidis 	{ 6, 0x98c8, { 0x00000403, 0x00040403, 0x00040403 } },
6758c2b418aSNick Kossifidis 	{ 7, 0x989c, { 0x00006400, 0x00006400, 0x00006400 } },
6768c2b418aSNick Kossifidis 	{ 7, 0x989c, { 0x00000800, 0x00000800, 0x00000800 } },
6778c2b418aSNick Kossifidis 	{ 7, 0x98cc, { 0x0000000e, 0x0000000e, 0x0000000e } },
678203c4805SLuis R. Rodriguez };
679203c4805SLuis R. Rodriguez 
680203c4805SLuis R. Rodriguez 
681203c4805SLuis R. Rodriguez 
682203c4805SLuis R. Rodriguez /***************************\
683203c4805SLuis R. Rodriguez * RF2425/RF2417 (Swan/Nala) *
684203c4805SLuis R. Rodriguez * AR2317 (Spider SoC)       *
685203c4805SLuis R. Rodriguez \***************************/
686203c4805SLuis R. Rodriguez 
687*4352fab5SNick Kossifidis /* BANK 2				len  pos col */
688*4352fab5SNick Kossifidis #define AR5K_RF2425_RF_TURBO		{ 1, 1,   2 }
689*4352fab5SNick Kossifidis 
690203c4805SLuis R. Rodriguez /* BANK 6				len  pos col */
691203c4805SLuis R. Rodriguez #define	AR5K_RF2425_OB_2GHZ		{ 3, 193, 0 }
692203c4805SLuis R. Rodriguez #define	AR5K_RF2425_DB_2GHZ		{ 3, 190, 0 }
693203c4805SLuis R. Rodriguez 
694203c4805SLuis R. Rodriguez static const struct ath5k_rf_reg rf_regs_2425[] = {
695*4352fab5SNick Kossifidis 	{2, AR5K_RF_TURBO,		AR5K_RF2425_RF_TURBO},
696203c4805SLuis R. Rodriguez 	{6, AR5K_RF_OB_2GHZ,		AR5K_RF2425_OB_2GHZ},
697203c4805SLuis R. Rodriguez 	{6, AR5K_RF_DB_2GHZ,		AR5K_RF2425_DB_2GHZ},
698203c4805SLuis R. Rodriguez };
699203c4805SLuis R. Rodriguez 
700203c4805SLuis R. Rodriguez /* Default mode specific settings
701203c4805SLuis R. Rodriguez  */
702203c4805SLuis R. Rodriguez static const struct ath5k_ini_rfbuffer rfb_2425[] = {
7038c2b418aSNick Kossifidis 	/* BANK / C.R.     A/XR         B           G      */
7048c2b418aSNick Kossifidis 	{ 1, 0x98d4, { 0x00000020, 0x00000020, 0x00000020 } },
7058c2b418aSNick Kossifidis 	{ 2, 0x98d0, { 0x02001408, 0x02001408, 0x02001408 } },
7068c2b418aSNick Kossifidis 	{ 3, 0x98dc, { 0x00a020c0, 0x00e020c0, 0x00e020c0 } },
7078c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x10000000, 0x10000000, 0x10000000 } },
7088c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
7098c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
7108c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
7118c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
7128c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
7138c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
7148c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
7158c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
7168c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
7178c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
7188c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x002a0000, 0x002a0000, 0x002a0000 } },
7198c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
7208c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
7218c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00100000, 0x00100000, 0x00100000 } },
7228c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00020000, 0x00020000, 0x00020000 } },
7238c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00730000, 0x00730000, 0x00730000 } },
7248c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00f80000, 0x00f80000, 0x00f80000 } },
7258c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00e70000, 0x00e70000, 0x00e70000 } },
7268c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00140000, 0x00140000, 0x00140000 } },
7278c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00910040, 0x00910040, 0x00910040 } },
7288c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x0007001a, 0x0007001a, 0x0007001a } },
7298c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00410000, 0x00410000, 0x00410000 } },
7308c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00810000, 0x00810060, 0x00810060 } },
7318c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00020800, 0x00020803, 0x00020803 } },
7328c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
7338c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
7348c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00001660, 0x00001660, 0x00001660 } },
7358c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00001688, 0x00001688, 0x00001688 } },
7368c2b418aSNick Kossifidis 	{ 6, 0x98c4, { 0x00000001, 0x00000001, 0x00000001 } },
7378c2b418aSNick Kossifidis 	{ 7, 0x989c, { 0x00006400, 0x00006400, 0x00006400 } },
7388c2b418aSNick Kossifidis 	{ 7, 0x989c, { 0x00000800, 0x00000800, 0x00000800 } },
7398c2b418aSNick Kossifidis 	{ 7, 0x98cc, { 0x0000000e, 0x0000000e, 0x0000000e } },
740203c4805SLuis R. Rodriguez };
741203c4805SLuis R. Rodriguez 
742203c4805SLuis R. Rodriguez /*
743203c4805SLuis R. Rodriguez  * TODO: Handle the few differences with swan during
744203c4805SLuis R. Rodriguez  * bank modification and get rid of this
745203c4805SLuis R. Rodriguez  */
746203c4805SLuis R. Rodriguez static const struct ath5k_ini_rfbuffer rfb_2317[] = {
7478c2b418aSNick Kossifidis 	/* BANK / C.R.     A/XR         B           G      */
7488c2b418aSNick Kossifidis 	{ 1, 0x98d4, { 0x00000020, 0x00000020, 0x00000020 } },
7498c2b418aSNick Kossifidis 	{ 2, 0x98d0, { 0x02001408, 0x02001408, 0x02001408 } },
7508c2b418aSNick Kossifidis 	{ 3, 0x98dc, { 0x00a020c0, 0x00e020c0, 0x00e020c0 } },
7518c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x10000000, 0x10000000, 0x10000000 } },
7528c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
7538c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
7548c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
7558c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
7568c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
7578c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
7588c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
7598c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
7608c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
7618c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
7628c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x002a0000, 0x002a0000, 0x002a0000 } },
7638c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
7648c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
7658c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00100000, 0x00100000, 0x00100000 } },
7668c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00020000, 0x00020000, 0x00020000 } },
7678c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00730000, 0x00730000, 0x00730000 } },
7688c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00f80000, 0x00f80000, 0x00f80000 } },
7698c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00e70000, 0x00e70000, 0x00e70000 } },
7708c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00140100, 0x00140100, 0x00140100 } },
7718c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00910040, 0x00910040, 0x00910040 } },
7728c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x0007001a, 0x0007001a, 0x0007001a } },
7738c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00410000, 0x00410000, 0x00410000 } },
7748c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00810000, 0x00810060, 0x00810060 } },
7758c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00020800, 0x00020803, 0x00020803 } },
7768c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
7778c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
7788c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00001660, 0x00001660, 0x00001660 } },
7798c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00009688, 0x00009688, 0x00009688 } },
7808c2b418aSNick Kossifidis 	{ 6, 0x98c4, { 0x00000001, 0x00000001, 0x00000001 } },
7818c2b418aSNick Kossifidis 	{ 7, 0x989c, { 0x00006400, 0x00006400, 0x00006400 } },
7828c2b418aSNick Kossifidis 	{ 7, 0x989c, { 0x00000800, 0x00000800, 0x00000800 } },
7838c2b418aSNick Kossifidis 	{ 7, 0x98cc, { 0x0000000e, 0x0000000e, 0x0000000e } },
784203c4805SLuis R. Rodriguez };
785203c4805SLuis R. Rodriguez 
786203c4805SLuis R. Rodriguez /*
787203c4805SLuis R. Rodriguez  * TODO: Handle the few differences with swan during
788203c4805SLuis R. Rodriguez  * bank modification and get rid of this
789203c4805SLuis R. Rodriguez  */
790203c4805SLuis R. Rodriguez static const struct ath5k_ini_rfbuffer rfb_2417[] = {
7918c2b418aSNick Kossifidis 	/* BANK / C.R.     A/XR         B           G      */
7928c2b418aSNick Kossifidis 	{ 1, 0x98d4, { 0x00000020, 0x00000020, 0x00000020 } },
7938c2b418aSNick Kossifidis 	{ 2, 0x98d0, { 0x02001408, 0x02001408, 0x02001408 } },
7948c2b418aSNick Kossifidis 	{ 3, 0x98dc, { 0x00a020c0, 0x00e020c0, 0x00e020c0 } },
7958c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x10000000, 0x10000000, 0x10000000 } },
7968c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
7978c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
7988c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
7998c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
8008c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
8018c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
8028c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
8038c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
8048c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
8058c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
8068c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x002a0000, 0x002a0000, 0x002a0000 } },
8078c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
8088c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
8098c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00100000, 0x00100000, 0x00100000 } },
8108c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00020000, 0x00020000, 0x00020000 } },
8118c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00730000, 0x00730000, 0x00730000 } },
8128c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00f80000, 0x00f80000, 0x00f80000 } },
8138c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00e70000, 0x80e70000, 0x80e70000 } },
8148c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00140000, 0x00140000, 0x00140000 } },
8158c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00910040, 0x00910040, 0x00910040 } },
8168c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x0007001a, 0x0207001a, 0x0207001a } },
8178c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00410000, 0x00410000, 0x00410000 } },
8188c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00810000, 0x00810060, 0x00810060 } },
8198c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00020800, 0x00020803, 0x00020803 } },
8208c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
8218c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } },
8228c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00001660, 0x00001660, 0x00001660 } },
8238c2b418aSNick Kossifidis 	{ 6, 0x989c, { 0x00001688, 0x00001688, 0x00001688 } },
8248c2b418aSNick Kossifidis 	{ 6, 0x98c4, { 0x00000001, 0x00000001, 0x00000001 } },
8258c2b418aSNick Kossifidis 	{ 7, 0x989c, { 0x00006400, 0x00006400, 0x00006400 } },
8268c2b418aSNick Kossifidis 	{ 7, 0x989c, { 0x00000800, 0x00000800, 0x00000800 } },
8278c2b418aSNick Kossifidis 	{ 7, 0x98cc, { 0x0000000e, 0x0000000e, 0x0000000e } },
828203c4805SLuis R. Rodriguez };
829