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 21c47faa36SNick Kossifidis /** 22c47faa36SNick Kossifidis * DOC: RF Buffer registers 23c47faa36SNick Kossifidis * 24203c4805SLuis R. Rodriguez * There are some special registers on the RF chip 25203c4805SLuis R. Rodriguez * that control various operation settings related mostly to 26203c4805SLuis R. Rodriguez * the analog parts (channel, gain adjustment etc). 27203c4805SLuis R. Rodriguez * 28203c4805SLuis R. Rodriguez * We don't write on those registers directly but 29203c4805SLuis R. Rodriguez * we send a data packet on the chip, using a special register, 30203c4805SLuis R. Rodriguez * that holds all the settings we need. After we've sent the 31203c4805SLuis R. Rodriguez * data packet, we write on another special register to notify hw 32203c4805SLuis R. Rodriguez * to apply the settings. This is done so that control registers 33a180a130SBob Copeland * can be dynamically programmed during operation and the settings 34203c4805SLuis R. Rodriguez * are applied faster on the hw. 35203c4805SLuis R. Rodriguez * 36203c4805SLuis R. Rodriguez * We call each data packet an "RF Bank" and all the data we write 37203c4805SLuis R. Rodriguez * (all RF Banks) "RF Buffer". This file holds initial RF Buffer 38203c4805SLuis R. Rodriguez * data for the different RF chips, and various info to match RF 39203c4805SLuis R. Rodriguez * Buffer offsets with specific RF registers so that we can access 40203c4805SLuis R. Rodriguez * them. We tweak these settings on rfregs_init function. 41203c4805SLuis R. Rodriguez * 42203c4805SLuis R. Rodriguez * Also check out reg.h and U.S. Patent 6677779 B1 (about buffer 43203c4805SLuis R. Rodriguez * registers and control registers): 44203c4805SLuis R. Rodriguez * 45*5b525ce8SAlexander A. Klimov * https://www.google.com/patents?id=qNURAAAAEBAJ 46203c4805SLuis R. Rodriguez */ 47203c4805SLuis R. Rodriguez 48203c4805SLuis R. Rodriguez 49c47faa36SNick Kossifidis /** 50c47faa36SNick Kossifidis * struct ath5k_ini_rfbuffer - Initial RF Buffer settings 51c47faa36SNick Kossifidis * @rfb_bank: RF Bank number 52c47faa36SNick Kossifidis * @rfb_ctrl_register: RF Buffer control register 53c47faa36SNick Kossifidis * @rfb_mode_data: RF Buffer data for each mode 54c47faa36SNick Kossifidis * 55203c4805SLuis R. Rodriguez * Struct to hold default mode specific RF 56c47faa36SNick Kossifidis * register values (RF Banks) for each chip. 57203c4805SLuis R. Rodriguez */ 58203c4805SLuis R. Rodriguez struct ath5k_ini_rfbuffer { 59c47faa36SNick Kossifidis u8 rfb_bank; 60c47faa36SNick Kossifidis u16 rfb_ctrl_register; 61c47faa36SNick Kossifidis u32 rfb_mode_data[3]; 62203c4805SLuis R. Rodriguez }; 63203c4805SLuis R. Rodriguez 64c47faa36SNick Kossifidis /** 65c47faa36SNick Kossifidis * struct ath5k_rfb_field - An RF Buffer field (register/value) 66c47faa36SNick Kossifidis * @len: Field length 67c47faa36SNick Kossifidis * @pos: Offset on the raw packet 68c47faa36SNick Kossifidis * @col: Used for shifting 69c47faa36SNick Kossifidis * 70203c4805SLuis R. Rodriguez * Struct to hold RF Buffer field 71203c4805SLuis R. Rodriguez * infos used to access certain RF 72203c4805SLuis R. Rodriguez * analog registers 73203c4805SLuis R. Rodriguez */ 74203c4805SLuis R. Rodriguez struct ath5k_rfb_field { 75c47faa36SNick Kossifidis u8 len; 76c47faa36SNick Kossifidis u16 pos; 77c47faa36SNick Kossifidis u8 col; 78203c4805SLuis R. Rodriguez }; 79203c4805SLuis R. Rodriguez 80c47faa36SNick Kossifidis /** 81c47faa36SNick Kossifidis * struct ath5k_rf_reg - RF analog register definition 82c47faa36SNick Kossifidis * @bank: RF Buffer Bank number 83c47faa36SNick Kossifidis * @index: Register's index on ath5k_rf_regx_idx 84c47faa36SNick Kossifidis * @field: The &struct ath5k_rfb_field 85c47faa36SNick Kossifidis * 86c47faa36SNick Kossifidis * We use this struct to define the set of RF registers 87c47faa36SNick Kossifidis * on each chip that we want to tweak. Some RF registers 88c47faa36SNick Kossifidis * are common between different chip versions so this saves 89c47faa36SNick Kossifidis * us space and complexity because we can refer to an rf 90c47faa36SNick Kossifidis * register by it's index no matter what chip we work with 91c47faa36SNick Kossifidis * as long as it has that register. 92203c4805SLuis R. Rodriguez */ 93203c4805SLuis R. Rodriguez struct ath5k_rf_reg { 94c47faa36SNick Kossifidis u8 bank; 95c47faa36SNick Kossifidis u8 index; 96c47faa36SNick Kossifidis struct ath5k_rfb_field field; 97203c4805SLuis R. Rodriguez }; 98203c4805SLuis R. Rodriguez 99c47faa36SNick Kossifidis /** 100c47faa36SNick Kossifidis * enum ath5k_rf_regs_idx - Map RF registers to indexes 101c47faa36SNick Kossifidis * 102203c4805SLuis R. Rodriguez * We do this to handle common bits and make our 103203c4805SLuis R. Rodriguez * life easier by using an index for each register 104c47faa36SNick Kossifidis * instead of a full rfb_field 105c47faa36SNick Kossifidis */ 106203c4805SLuis R. Rodriguez enum ath5k_rf_regs_idx { 1074352fab5SNick Kossifidis /* BANK 2 */ 1084352fab5SNick Kossifidis AR5K_RF_TURBO = 0, 109203c4805SLuis R. Rodriguez /* BANK 6 */ 1104352fab5SNick Kossifidis AR5K_RF_OB_2GHZ, 111203c4805SLuis R. Rodriguez AR5K_RF_OB_5GHZ, 112203c4805SLuis R. Rodriguez AR5K_RF_DB_2GHZ, 113203c4805SLuis R. Rodriguez AR5K_RF_DB_5GHZ, 114203c4805SLuis R. Rodriguez AR5K_RF_FIXED_BIAS_A, 115203c4805SLuis R. Rodriguez AR5K_RF_FIXED_BIAS_B, 116203c4805SLuis R. Rodriguez AR5K_RF_PWD_XPD, 117203c4805SLuis R. Rodriguez AR5K_RF_XPD_SEL, 118203c4805SLuis R. Rodriguez AR5K_RF_XPD_GAIN, 119203c4805SLuis R. Rodriguez AR5K_RF_PD_GAIN_LO, 120203c4805SLuis R. Rodriguez AR5K_RF_PD_GAIN_HI, 121203c4805SLuis R. Rodriguez AR5K_RF_HIGH_VC_CP, 122203c4805SLuis R. Rodriguez AR5K_RF_MID_VC_CP, 123203c4805SLuis R. Rodriguez AR5K_RF_LOW_VC_CP, 124203c4805SLuis R. Rodriguez AR5K_RF_PUSH_UP, 125203c4805SLuis R. Rodriguez AR5K_RF_PAD2GND, 126203c4805SLuis R. Rodriguez AR5K_RF_XB2_LVL, 127203c4805SLuis R. Rodriguez AR5K_RF_XB5_LVL, 128203c4805SLuis R. Rodriguez AR5K_RF_PWD_ICLOBUF_2G, 129203c4805SLuis R. Rodriguez AR5K_RF_PWD_84, 130203c4805SLuis R. Rodriguez AR5K_RF_PWD_90, 131203c4805SLuis R. Rodriguez AR5K_RF_PWD_130, 132203c4805SLuis R. Rodriguez AR5K_RF_PWD_131, 133203c4805SLuis R. Rodriguez AR5K_RF_PWD_132, 134203c4805SLuis R. Rodriguez AR5K_RF_PWD_136, 135203c4805SLuis R. Rodriguez AR5K_RF_PWD_137, 136203c4805SLuis R. Rodriguez AR5K_RF_PWD_138, 137203c4805SLuis R. Rodriguez AR5K_RF_PWD_166, 138203c4805SLuis R. Rodriguez AR5K_RF_PWD_167, 139203c4805SLuis R. Rodriguez AR5K_RF_DERBY_CHAN_SEL_MODE, 140203c4805SLuis R. Rodriguez /* BANK 7 */ 141203c4805SLuis R. Rodriguez AR5K_RF_GAIN_I, 142203c4805SLuis R. Rodriguez AR5K_RF_PLO_SEL, 143203c4805SLuis R. Rodriguez AR5K_RF_RFGAIN_SEL, 144203c4805SLuis R. Rodriguez AR5K_RF_RFGAIN_STEP, 145203c4805SLuis R. Rodriguez AR5K_RF_WAIT_S, 146203c4805SLuis R. Rodriguez AR5K_RF_WAIT_I, 147203c4805SLuis R. Rodriguez AR5K_RF_MAX_TIME, 148203c4805SLuis R. Rodriguez AR5K_RF_MIXVGA_OVR, 149203c4805SLuis R. Rodriguez AR5K_RF_MIXGAIN_OVR, 150203c4805SLuis R. Rodriguez AR5K_RF_MIXGAIN_STEP, 151203c4805SLuis R. Rodriguez AR5K_RF_PD_DELAY_A, 152203c4805SLuis R. Rodriguez AR5K_RF_PD_DELAY_B, 153203c4805SLuis R. Rodriguez AR5K_RF_PD_DELAY_XR, 154203c4805SLuis R. Rodriguez AR5K_RF_PD_PERIOD_A, 155203c4805SLuis R. Rodriguez AR5K_RF_PD_PERIOD_B, 156203c4805SLuis R. Rodriguez AR5K_RF_PD_PERIOD_XR, 157203c4805SLuis R. Rodriguez }; 158203c4805SLuis R. Rodriguez 159203c4805SLuis R. Rodriguez 160203c4805SLuis R. Rodriguez /*******************\ 161203c4805SLuis R. Rodriguez * RF5111 (Sombrero) * 162203c4805SLuis R. Rodriguez \*******************/ 163203c4805SLuis R. Rodriguez 1644352fab5SNick Kossifidis /* BANK 2 len pos col */ 1654352fab5SNick Kossifidis #define AR5K_RF5111_RF_TURBO { 1, 3, 0 } 1664352fab5SNick Kossifidis 167203c4805SLuis R. Rodriguez /* BANK 6 len pos col */ 168203c4805SLuis R. Rodriguez #define AR5K_RF5111_OB_2GHZ { 3, 119, 0 } 169203c4805SLuis R. Rodriguez #define AR5K_RF5111_DB_2GHZ { 3, 122, 0 } 170203c4805SLuis R. Rodriguez 171203c4805SLuis R. Rodriguez #define AR5K_RF5111_OB_5GHZ { 3, 104, 0 } 172203c4805SLuis R. Rodriguez #define AR5K_RF5111_DB_5GHZ { 3, 107, 0 } 173203c4805SLuis R. Rodriguez 174203c4805SLuis R. Rodriguez #define AR5K_RF5111_PWD_XPD { 1, 95, 0 } 175203c4805SLuis R. Rodriguez #define AR5K_RF5111_XPD_GAIN { 4, 96, 0 } 176203c4805SLuis R. Rodriguez 177203c4805SLuis R. Rodriguez /* Access to PWD registers */ 178203c4805SLuis R. Rodriguez #define AR5K_RF5111_PWD(_n) { 1, (135 - _n), 3 } 179203c4805SLuis R. Rodriguez 180203c4805SLuis R. Rodriguez /* BANK 7 len pos col */ 181203c4805SLuis R. Rodriguez #define AR5K_RF5111_GAIN_I { 6, 29, 0 } 182203c4805SLuis R. Rodriguez #define AR5K_RF5111_PLO_SEL { 1, 4, 0 } 183203c4805SLuis R. Rodriguez #define AR5K_RF5111_RFGAIN_SEL { 1, 36, 0 } 184203c4805SLuis R. Rodriguez #define AR5K_RF5111_RFGAIN_STEP { 6, 37, 0 } 185203c4805SLuis R. Rodriguez /* Only on AR5212 BaseBand and up */ 186203c4805SLuis R. Rodriguez #define AR5K_RF5111_WAIT_S { 5, 19, 0 } 187203c4805SLuis R. Rodriguez #define AR5K_RF5111_WAIT_I { 5, 24, 0 } 188203c4805SLuis R. Rodriguez #define AR5K_RF5111_MAX_TIME { 2, 49, 0 } 189203c4805SLuis R. Rodriguez 190203c4805SLuis R. Rodriguez static const struct ath5k_rf_reg rf_regs_5111[] = { 1914352fab5SNick Kossifidis {2, AR5K_RF_TURBO, AR5K_RF5111_RF_TURBO}, 192203c4805SLuis R. Rodriguez {6, AR5K_RF_OB_2GHZ, AR5K_RF5111_OB_2GHZ}, 193203c4805SLuis R. Rodriguez {6, AR5K_RF_DB_2GHZ, AR5K_RF5111_DB_2GHZ}, 194203c4805SLuis R. Rodriguez {6, AR5K_RF_OB_5GHZ, AR5K_RF5111_OB_5GHZ}, 195203c4805SLuis R. Rodriguez {6, AR5K_RF_DB_5GHZ, AR5K_RF5111_DB_5GHZ}, 196203c4805SLuis R. Rodriguez {6, AR5K_RF_PWD_XPD, AR5K_RF5111_PWD_XPD}, 197203c4805SLuis R. Rodriguez {6, AR5K_RF_XPD_GAIN, AR5K_RF5111_XPD_GAIN}, 198203c4805SLuis R. Rodriguez {6, AR5K_RF_PWD_84, AR5K_RF5111_PWD(84)}, 199203c4805SLuis R. Rodriguez {6, AR5K_RF_PWD_90, AR5K_RF5111_PWD(90)}, 200203c4805SLuis R. Rodriguez {7, AR5K_RF_GAIN_I, AR5K_RF5111_GAIN_I}, 201203c4805SLuis R. Rodriguez {7, AR5K_RF_PLO_SEL, AR5K_RF5111_PLO_SEL}, 202203c4805SLuis R. Rodriguez {7, AR5K_RF_RFGAIN_SEL, AR5K_RF5111_RFGAIN_SEL}, 203203c4805SLuis R. Rodriguez {7, AR5K_RF_RFGAIN_STEP, AR5K_RF5111_RFGAIN_STEP}, 204203c4805SLuis R. Rodriguez {7, AR5K_RF_WAIT_S, AR5K_RF5111_WAIT_S}, 205203c4805SLuis R. Rodriguez {7, AR5K_RF_WAIT_I, AR5K_RF5111_WAIT_I}, 206203c4805SLuis R. Rodriguez {7, AR5K_RF_MAX_TIME, AR5K_RF5111_MAX_TIME} 207203c4805SLuis R. Rodriguez }; 208203c4805SLuis R. Rodriguez 209203c4805SLuis R. Rodriguez /* Default mode specific settings */ 210203c4805SLuis R. Rodriguez static const struct ath5k_ini_rfbuffer rfb_5111[] = { 2118c2b418aSNick Kossifidis /* BANK / C.R. A/XR B G */ 2128c2b418aSNick Kossifidis { 0, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 2138c2b418aSNick Kossifidis { 0, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 2148c2b418aSNick Kossifidis { 0, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 2158c2b418aSNick Kossifidis { 0, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 2168c2b418aSNick Kossifidis { 0, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 2178c2b418aSNick Kossifidis { 0, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 2188c2b418aSNick Kossifidis { 0, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 2198c2b418aSNick Kossifidis { 0, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 2208c2b418aSNick Kossifidis { 0, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 2218c2b418aSNick Kossifidis { 0, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 2228c2b418aSNick Kossifidis { 0, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 2238c2b418aSNick Kossifidis { 0, 0x989c, { 0x00380000, 0x00380000, 0x00380000 } }, 2248c2b418aSNick Kossifidis { 0, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 2258c2b418aSNick Kossifidis { 0, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 2268c2b418aSNick Kossifidis { 0, 0x989c, { 0x00000000, 0x000000c0, 0x00000080 } }, 2278c2b418aSNick Kossifidis { 0, 0x989c, { 0x000400f9, 0x000400ff, 0x000400fd } }, 2288c2b418aSNick Kossifidis { 0, 0x98d4, { 0x00000000, 0x00000004, 0x00000004 } }, 2298c2b418aSNick Kossifidis { 1, 0x98d4, { 0x00000020, 0x00000020, 0x00000020 } }, 2308c2b418aSNick Kossifidis { 2, 0x98d4, { 0x00000010, 0x00000010, 0x00000010 } }, 2318c2b418aSNick Kossifidis { 3, 0x98d8, { 0x00601068, 0x00601068, 0x00601068 } }, 2328c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 2338c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 2348c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 2358c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 2368c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 2378c2b418aSNick Kossifidis { 6, 0x989c, { 0x10000000, 0x10000000, 0x10000000 } }, 2388c2b418aSNick Kossifidis { 6, 0x989c, { 0x04000000, 0x04000000, 0x04000000 } }, 2398c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 2408c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 2418c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 2428c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x0a000000, 0x00000000 } }, 2438c2b418aSNick Kossifidis { 6, 0x989c, { 0x003800c0, 0x023800c0, 0x003800c0 } }, 2448c2b418aSNick Kossifidis { 6, 0x989c, { 0x00020006, 0x00000006, 0x00020006 } }, 2458c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000089, 0x00000089, 0x00000089 } }, 2468c2b418aSNick Kossifidis { 6, 0x989c, { 0x000000a0, 0x000000a0, 0x000000a0 } }, 2478c2b418aSNick Kossifidis { 6, 0x989c, { 0x00040007, 0x00040007, 0x00040007 } }, 2488c2b418aSNick Kossifidis { 6, 0x98d4, { 0x0000001a, 0x0000001a, 0x0000001a } }, 2498c2b418aSNick Kossifidis { 7, 0x989c, { 0x00000040, 0x00000040, 0x00000040 } }, 2508c2b418aSNick Kossifidis { 7, 0x989c, { 0x00000010, 0x00000010, 0x00000010 } }, 2518c2b418aSNick Kossifidis { 7, 0x989c, { 0x00000008, 0x00000008, 0x00000008 } }, 2528c2b418aSNick Kossifidis { 7, 0x989c, { 0x0000004f, 0x0000004f, 0x0000004f } }, 2538c2b418aSNick Kossifidis { 7, 0x989c, { 0x000000f1, 0x00000061, 0x000000f1 } }, 2548c2b418aSNick Kossifidis { 7, 0x989c, { 0x0000904f, 0x0000904c, 0x0000904f } }, 2558c2b418aSNick Kossifidis { 7, 0x989c, { 0x0000125a, 0x0000129a, 0x0000125a } }, 2568c2b418aSNick Kossifidis { 7, 0x98cc, { 0x0000000e, 0x0000000f, 0x0000000e } }, 257203c4805SLuis R. Rodriguez }; 258203c4805SLuis R. Rodriguez 259203c4805SLuis R. Rodriguez 260203c4805SLuis R. Rodriguez 261203c4805SLuis R. Rodriguez /***********************\ 262203c4805SLuis R. Rodriguez * RF5112/RF2112 (Derby) * 263203c4805SLuis R. Rodriguez \***********************/ 264203c4805SLuis R. Rodriguez 2654352fab5SNick Kossifidis /* BANK 2 (Common) len pos col */ 2664352fab5SNick Kossifidis #define AR5K_RF5112X_RF_TURBO { 1, 1, 2 } 2674352fab5SNick Kossifidis 268203c4805SLuis R. Rodriguez /* BANK 7 (Common) len pos col */ 269203c4805SLuis R. Rodriguez #define AR5K_RF5112X_GAIN_I { 6, 14, 0 } 270203c4805SLuis R. Rodriguez #define AR5K_RF5112X_MIXVGA_OVR { 1, 36, 0 } 271203c4805SLuis R. Rodriguez #define AR5K_RF5112X_MIXGAIN_OVR { 2, 37, 0 } 272203c4805SLuis R. Rodriguez #define AR5K_RF5112X_MIXGAIN_STEP { 4, 32, 0 } 273203c4805SLuis R. Rodriguez #define AR5K_RF5112X_PD_DELAY_A { 4, 58, 0 } 274203c4805SLuis R. Rodriguez #define AR5K_RF5112X_PD_DELAY_B { 4, 62, 0 } 275203c4805SLuis R. Rodriguez #define AR5K_RF5112X_PD_DELAY_XR { 4, 66, 0 } 276203c4805SLuis R. Rodriguez #define AR5K_RF5112X_PD_PERIOD_A { 4, 70, 0 } 277203c4805SLuis R. Rodriguez #define AR5K_RF5112X_PD_PERIOD_B { 4, 74, 0 } 278203c4805SLuis R. Rodriguez #define AR5K_RF5112X_PD_PERIOD_XR { 4, 78, 0 } 279203c4805SLuis R. Rodriguez 280203c4805SLuis R. Rodriguez /* RFX112 (Derby 1) */ 281203c4805SLuis R. Rodriguez 282203c4805SLuis R. Rodriguez /* BANK 6 len pos col */ 283203c4805SLuis R. Rodriguez #define AR5K_RF5112_OB_2GHZ { 3, 269, 0 } 284203c4805SLuis R. Rodriguez #define AR5K_RF5112_DB_2GHZ { 3, 272, 0 } 285203c4805SLuis R. Rodriguez 286203c4805SLuis R. Rodriguez #define AR5K_RF5112_OB_5GHZ { 3, 261, 0 } 287203c4805SLuis R. Rodriguez #define AR5K_RF5112_DB_5GHZ { 3, 264, 0 } 288203c4805SLuis R. Rodriguez 289203c4805SLuis R. Rodriguez #define AR5K_RF5112_FIXED_BIAS_A { 1, 260, 0 } 290203c4805SLuis R. Rodriguez #define AR5K_RF5112_FIXED_BIAS_B { 1, 259, 0 } 291203c4805SLuis R. Rodriguez 292203c4805SLuis R. Rodriguez #define AR5K_RF5112_XPD_SEL { 1, 284, 0 } 293203c4805SLuis R. Rodriguez #define AR5K_RF5112_XPD_GAIN { 2, 252, 0 } 294203c4805SLuis R. Rodriguez 295203c4805SLuis R. Rodriguez /* Access to PWD registers */ 296203c4805SLuis R. Rodriguez #define AR5K_RF5112_PWD(_n) { 1, (302 - _n), 3 } 297203c4805SLuis R. Rodriguez 298203c4805SLuis R. Rodriguez static const struct ath5k_rf_reg rf_regs_5112[] = { 2994352fab5SNick Kossifidis {2, AR5K_RF_TURBO, AR5K_RF5112X_RF_TURBO}, 300203c4805SLuis R. Rodriguez {6, AR5K_RF_OB_2GHZ, AR5K_RF5112_OB_2GHZ}, 301203c4805SLuis R. Rodriguez {6, AR5K_RF_DB_2GHZ, AR5K_RF5112_DB_2GHZ}, 302203c4805SLuis R. Rodriguez {6, AR5K_RF_OB_5GHZ, AR5K_RF5112_OB_5GHZ}, 303203c4805SLuis R. Rodriguez {6, AR5K_RF_DB_5GHZ, AR5K_RF5112_DB_5GHZ}, 304203c4805SLuis R. Rodriguez {6, AR5K_RF_FIXED_BIAS_A, AR5K_RF5112_FIXED_BIAS_A}, 305203c4805SLuis R. Rodriguez {6, AR5K_RF_FIXED_BIAS_B, AR5K_RF5112_FIXED_BIAS_B}, 306203c4805SLuis R. Rodriguez {6, AR5K_RF_XPD_SEL, AR5K_RF5112_XPD_SEL}, 307203c4805SLuis R. Rodriguez {6, AR5K_RF_XPD_GAIN, AR5K_RF5112_XPD_GAIN}, 308203c4805SLuis R. Rodriguez {6, AR5K_RF_PWD_130, AR5K_RF5112_PWD(130)}, 309203c4805SLuis R. Rodriguez {6, AR5K_RF_PWD_131, AR5K_RF5112_PWD(131)}, 310203c4805SLuis R. Rodriguez {6, AR5K_RF_PWD_132, AR5K_RF5112_PWD(132)}, 311203c4805SLuis R. Rodriguez {6, AR5K_RF_PWD_136, AR5K_RF5112_PWD(136)}, 312203c4805SLuis R. Rodriguez {6, AR5K_RF_PWD_137, AR5K_RF5112_PWD(137)}, 313203c4805SLuis R. Rodriguez {6, AR5K_RF_PWD_138, AR5K_RF5112_PWD(138)}, 314203c4805SLuis R. Rodriguez {7, AR5K_RF_GAIN_I, AR5K_RF5112X_GAIN_I}, 315203c4805SLuis R. Rodriguez {7, AR5K_RF_MIXVGA_OVR, AR5K_RF5112X_MIXVGA_OVR}, 316203c4805SLuis R. Rodriguez {7, AR5K_RF_MIXGAIN_OVR, AR5K_RF5112X_MIXGAIN_OVR}, 317203c4805SLuis R. Rodriguez {7, AR5K_RF_MIXGAIN_STEP, AR5K_RF5112X_MIXGAIN_STEP}, 318203c4805SLuis R. Rodriguez {7, AR5K_RF_PD_DELAY_A, AR5K_RF5112X_PD_DELAY_A}, 319203c4805SLuis R. Rodriguez {7, AR5K_RF_PD_DELAY_B, AR5K_RF5112X_PD_DELAY_B}, 320203c4805SLuis R. Rodriguez {7, AR5K_RF_PD_DELAY_XR, AR5K_RF5112X_PD_DELAY_XR}, 321203c4805SLuis R. Rodriguez {7, AR5K_RF_PD_PERIOD_A, AR5K_RF5112X_PD_PERIOD_A}, 322203c4805SLuis R. Rodriguez {7, AR5K_RF_PD_PERIOD_B, AR5K_RF5112X_PD_PERIOD_B}, 323203c4805SLuis R. Rodriguez {7, AR5K_RF_PD_PERIOD_XR, AR5K_RF5112X_PD_PERIOD_XR}, 324203c4805SLuis R. Rodriguez }; 325203c4805SLuis R. Rodriguez 326203c4805SLuis R. Rodriguez /* Default mode specific settings */ 327203c4805SLuis R. Rodriguez static const struct ath5k_ini_rfbuffer rfb_5112[] = { 3288c2b418aSNick Kossifidis /* BANK / C.R. A/XR B G */ 3298c2b418aSNick Kossifidis { 1, 0x98d4, { 0x00000020, 0x00000020, 0x00000020 } }, 3308c2b418aSNick Kossifidis { 2, 0x98d0, { 0x03060408, 0x03060408, 0x03060408 } }, 3318c2b418aSNick Kossifidis { 3, 0x98dc, { 0x00a0c0c0, 0x00e0c0c0, 0x00e0c0c0 } }, 3328c2b418aSNick Kossifidis { 6, 0x989c, { 0x00a00000, 0x00a00000, 0x00a00000 } }, 3338c2b418aSNick Kossifidis { 6, 0x989c, { 0x000a0000, 0x000a0000, 0x000a0000 } }, 3348c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 3358c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 3368c2b418aSNick Kossifidis { 6, 0x989c, { 0x00660000, 0x00660000, 0x00660000 } }, 3378c2b418aSNick Kossifidis { 6, 0x989c, { 0x00db0000, 0x00db0000, 0x00db0000 } }, 3388c2b418aSNick Kossifidis { 6, 0x989c, { 0x00f10000, 0x00f10000, 0x00f10000 } }, 3398c2b418aSNick Kossifidis { 6, 0x989c, { 0x00120000, 0x00120000, 0x00120000 } }, 3408c2b418aSNick Kossifidis { 6, 0x989c, { 0x00120000, 0x00120000, 0x00120000 } }, 3418c2b418aSNick Kossifidis { 6, 0x989c, { 0x00730000, 0x00730000, 0x00730000 } }, 3428c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 3438c2b418aSNick Kossifidis { 6, 0x989c, { 0x000c0000, 0x000c0000, 0x000c0000 } }, 3448c2b418aSNick Kossifidis { 6, 0x989c, { 0x00ff0000, 0x00ff0000, 0x00ff0000 } }, 3458c2b418aSNick Kossifidis { 6, 0x989c, { 0x00ff0000, 0x00ff0000, 0x00ff0000 } }, 3468c2b418aSNick Kossifidis { 6, 0x989c, { 0x008b0000, 0x008b0000, 0x008b0000 } }, 3478c2b418aSNick Kossifidis { 6, 0x989c, { 0x00600000, 0x00600000, 0x00600000 } }, 3488c2b418aSNick Kossifidis { 6, 0x989c, { 0x000c0000, 0x000c0000, 0x000c0000 } }, 3498c2b418aSNick Kossifidis { 6, 0x989c, { 0x00840000, 0x00840000, 0x00840000 } }, 3508c2b418aSNick Kossifidis { 6, 0x989c, { 0x00640000, 0x00640000, 0x00640000 } }, 3518c2b418aSNick Kossifidis { 6, 0x989c, { 0x00200000, 0x00200000, 0x00200000 } }, 3528c2b418aSNick Kossifidis { 6, 0x989c, { 0x00240000, 0x00240000, 0x00240000 } }, 3538c2b418aSNick Kossifidis { 6, 0x989c, { 0x00250000, 0x00250000, 0x00250000 } }, 3548c2b418aSNick Kossifidis { 6, 0x989c, { 0x00110000, 0x00110000, 0x00110000 } }, 3558c2b418aSNick Kossifidis { 6, 0x989c, { 0x00110000, 0x00110000, 0x00110000 } }, 3568c2b418aSNick Kossifidis { 6, 0x989c, { 0x00510000, 0x00510000, 0x00510000 } }, 3578c2b418aSNick Kossifidis { 6, 0x989c, { 0x1c040000, 0x1c040000, 0x1c040000 } }, 3588c2b418aSNick Kossifidis { 6, 0x989c, { 0x000a0000, 0x000a0000, 0x000a0000 } }, 3598c2b418aSNick Kossifidis { 6, 0x989c, { 0x00a10000, 0x00a10000, 0x00a10000 } }, 3608c2b418aSNick Kossifidis { 6, 0x989c, { 0x00400000, 0x00400000, 0x00400000 } }, 3618c2b418aSNick Kossifidis { 6, 0x989c, { 0x03090000, 0x03090000, 0x03090000 } }, 3628c2b418aSNick Kossifidis { 6, 0x989c, { 0x06000000, 0x06000000, 0x06000000 } }, 3638c2b418aSNick Kossifidis { 6, 0x989c, { 0x000000b0, 0x000000a8, 0x000000a8 } }, 3648c2b418aSNick Kossifidis { 6, 0x989c, { 0x0000002e, 0x0000002e, 0x0000002e } }, 3658c2b418aSNick Kossifidis { 6, 0x989c, { 0x006c4a41, 0x006c4af1, 0x006c4a61 } }, 3668c2b418aSNick Kossifidis { 6, 0x989c, { 0x0050892a, 0x0050892b, 0x0050892b } }, 3678c2b418aSNick Kossifidis { 6, 0x989c, { 0x00842400, 0x00842400, 0x00842400 } }, 3688c2b418aSNick Kossifidis { 6, 0x989c, { 0x00c69200, 0x00c69200, 0x00c69200 } }, 3698c2b418aSNick Kossifidis { 6, 0x98d0, { 0x0002000c, 0x0002000c, 0x0002000c } }, 3708c2b418aSNick Kossifidis { 7, 0x989c, { 0x00000094, 0x00000094, 0x00000094 } }, 3718c2b418aSNick Kossifidis { 7, 0x989c, { 0x00000091, 0x00000091, 0x00000091 } }, 3728c2b418aSNick Kossifidis { 7, 0x989c, { 0x0000000a, 0x00000012, 0x00000012 } }, 3738c2b418aSNick Kossifidis { 7, 0x989c, { 0x00000080, 0x00000080, 0x00000080 } }, 3748c2b418aSNick Kossifidis { 7, 0x989c, { 0x000000c1, 0x000000c1, 0x000000c1 } }, 3758c2b418aSNick Kossifidis { 7, 0x989c, { 0x00000060, 0x00000060, 0x00000060 } }, 3768c2b418aSNick Kossifidis { 7, 0x989c, { 0x000000f0, 0x000000f0, 0x000000f0 } }, 3778c2b418aSNick Kossifidis { 7, 0x989c, { 0x00000022, 0x00000022, 0x00000022 } }, 3788c2b418aSNick Kossifidis { 7, 0x989c, { 0x00000092, 0x00000092, 0x00000092 } }, 3798c2b418aSNick Kossifidis { 7, 0x989c, { 0x000000d4, 0x000000d4, 0x000000d4 } }, 3808c2b418aSNick Kossifidis { 7, 0x989c, { 0x000014cc, 0x000014cc, 0x000014cc } }, 3818c2b418aSNick Kossifidis { 7, 0x989c, { 0x0000048c, 0x0000048c, 0x0000048c } }, 3828c2b418aSNick Kossifidis { 7, 0x98c4, { 0x00000003, 0x00000003, 0x00000003 } }, 383203c4805SLuis R. Rodriguez }; 384203c4805SLuis R. Rodriguez 385203c4805SLuis R. Rodriguez /* RFX112A (Derby 2) */ 386203c4805SLuis R. Rodriguez 387203c4805SLuis R. Rodriguez /* BANK 6 len pos col */ 388203c4805SLuis R. Rodriguez #define AR5K_RF5112A_OB_2GHZ { 3, 287, 0 } 389203c4805SLuis R. Rodriguez #define AR5K_RF5112A_DB_2GHZ { 3, 290, 0 } 390203c4805SLuis R. Rodriguez 391203c4805SLuis R. Rodriguez #define AR5K_RF5112A_OB_5GHZ { 3, 279, 0 } 392203c4805SLuis R. Rodriguez #define AR5K_RF5112A_DB_5GHZ { 3, 282, 0 } 393203c4805SLuis R. Rodriguez 394203c4805SLuis R. Rodriguez #define AR5K_RF5112A_FIXED_BIAS_A { 1, 278, 0 } 395203c4805SLuis R. Rodriguez #define AR5K_RF5112A_FIXED_BIAS_B { 1, 277, 0 } 396203c4805SLuis R. Rodriguez 397203c4805SLuis R. Rodriguez #define AR5K_RF5112A_XPD_SEL { 1, 302, 0 } 398203c4805SLuis R. Rodriguez #define AR5K_RF5112A_PDGAINLO { 2, 270, 0 } 399203c4805SLuis R. Rodriguez #define AR5K_RF5112A_PDGAINHI { 2, 257, 0 } 400203c4805SLuis R. Rodriguez 401203c4805SLuis R. Rodriguez /* Access to PWD registers */ 402203c4805SLuis R. Rodriguez #define AR5K_RF5112A_PWD(_n) { 1, (306 - _n), 3 } 403203c4805SLuis R. Rodriguez 404203c4805SLuis R. Rodriguez /* Voltage regulators */ 405203c4805SLuis R. Rodriguez #define AR5K_RF5112A_HIGH_VC_CP { 2, 90, 2 } 406203c4805SLuis R. Rodriguez #define AR5K_RF5112A_MID_VC_CP { 2, 92, 2 } 407203c4805SLuis R. Rodriguez #define AR5K_RF5112A_LOW_VC_CP { 2, 94, 2 } 408203c4805SLuis R. Rodriguez #define AR5K_RF5112A_PUSH_UP { 1, 254, 2 } 409203c4805SLuis R. Rodriguez 410203c4805SLuis R. Rodriguez /* Power consumption */ 411203c4805SLuis R. Rodriguez #define AR5K_RF5112A_PAD2GND { 1, 281, 1 } 412203c4805SLuis R. Rodriguez #define AR5K_RF5112A_XB2_LVL { 2, 1, 3 } 413203c4805SLuis R. Rodriguez #define AR5K_RF5112A_XB5_LVL { 2, 3, 3 } 414203c4805SLuis R. Rodriguez 415203c4805SLuis R. Rodriguez static const struct ath5k_rf_reg rf_regs_5112a[] = { 4164352fab5SNick Kossifidis {2, AR5K_RF_TURBO, AR5K_RF5112X_RF_TURBO}, 417203c4805SLuis R. Rodriguez {6, AR5K_RF_OB_2GHZ, AR5K_RF5112A_OB_2GHZ}, 418203c4805SLuis R. Rodriguez {6, AR5K_RF_DB_2GHZ, AR5K_RF5112A_DB_2GHZ}, 419203c4805SLuis R. Rodriguez {6, AR5K_RF_OB_5GHZ, AR5K_RF5112A_OB_5GHZ}, 420203c4805SLuis R. Rodriguez {6, AR5K_RF_DB_5GHZ, AR5K_RF5112A_DB_5GHZ}, 421203c4805SLuis R. Rodriguez {6, AR5K_RF_FIXED_BIAS_A, AR5K_RF5112A_FIXED_BIAS_A}, 422203c4805SLuis R. Rodriguez {6, AR5K_RF_FIXED_BIAS_B, AR5K_RF5112A_FIXED_BIAS_B}, 423203c4805SLuis R. Rodriguez {6, AR5K_RF_XPD_SEL, AR5K_RF5112A_XPD_SEL}, 424203c4805SLuis R. Rodriguez {6, AR5K_RF_PD_GAIN_LO, AR5K_RF5112A_PDGAINLO}, 425203c4805SLuis R. Rodriguez {6, AR5K_RF_PD_GAIN_HI, AR5K_RF5112A_PDGAINHI}, 426203c4805SLuis R. Rodriguez {6, AR5K_RF_PWD_130, AR5K_RF5112A_PWD(130)}, 427203c4805SLuis R. Rodriguez {6, AR5K_RF_PWD_131, AR5K_RF5112A_PWD(131)}, 428203c4805SLuis R. Rodriguez {6, AR5K_RF_PWD_132, AR5K_RF5112A_PWD(132)}, 429203c4805SLuis R. Rodriguez {6, AR5K_RF_PWD_136, AR5K_RF5112A_PWD(136)}, 430203c4805SLuis R. Rodriguez {6, AR5K_RF_PWD_137, AR5K_RF5112A_PWD(137)}, 431203c4805SLuis R. Rodriguez {6, AR5K_RF_PWD_138, AR5K_RF5112A_PWD(138)}, 432203c4805SLuis R. Rodriguez {6, AR5K_RF_PWD_166, AR5K_RF5112A_PWD(166)}, 433203c4805SLuis R. Rodriguez {6, AR5K_RF_PWD_167, AR5K_RF5112A_PWD(167)}, 434203c4805SLuis R. Rodriguez {6, AR5K_RF_HIGH_VC_CP, AR5K_RF5112A_HIGH_VC_CP}, 435203c4805SLuis R. Rodriguez {6, AR5K_RF_MID_VC_CP, AR5K_RF5112A_MID_VC_CP}, 436203c4805SLuis R. Rodriguez {6, AR5K_RF_LOW_VC_CP, AR5K_RF5112A_LOW_VC_CP}, 437203c4805SLuis R. Rodriguez {6, AR5K_RF_PUSH_UP, AR5K_RF5112A_PUSH_UP}, 438203c4805SLuis R. Rodriguez {6, AR5K_RF_PAD2GND, AR5K_RF5112A_PAD2GND}, 439203c4805SLuis R. Rodriguez {6, AR5K_RF_XB2_LVL, AR5K_RF5112A_XB2_LVL}, 440203c4805SLuis R. Rodriguez {6, AR5K_RF_XB5_LVL, AR5K_RF5112A_XB5_LVL}, 441203c4805SLuis R. Rodriguez {7, AR5K_RF_GAIN_I, AR5K_RF5112X_GAIN_I}, 442203c4805SLuis R. Rodriguez {7, AR5K_RF_MIXVGA_OVR, AR5K_RF5112X_MIXVGA_OVR}, 443203c4805SLuis R. Rodriguez {7, AR5K_RF_MIXGAIN_OVR, AR5K_RF5112X_MIXGAIN_OVR}, 444203c4805SLuis R. Rodriguez {7, AR5K_RF_MIXGAIN_STEP, AR5K_RF5112X_MIXGAIN_STEP}, 445203c4805SLuis R. Rodriguez {7, AR5K_RF_PD_DELAY_A, AR5K_RF5112X_PD_DELAY_A}, 446203c4805SLuis R. Rodriguez {7, AR5K_RF_PD_DELAY_B, AR5K_RF5112X_PD_DELAY_B}, 447203c4805SLuis R. Rodriguez {7, AR5K_RF_PD_DELAY_XR, AR5K_RF5112X_PD_DELAY_XR}, 448203c4805SLuis R. Rodriguez {7, AR5K_RF_PD_PERIOD_A, AR5K_RF5112X_PD_PERIOD_A}, 449203c4805SLuis R. Rodriguez {7, AR5K_RF_PD_PERIOD_B, AR5K_RF5112X_PD_PERIOD_B}, 450203c4805SLuis R. Rodriguez {7, AR5K_RF_PD_PERIOD_XR, AR5K_RF5112X_PD_PERIOD_XR}, 451203c4805SLuis R. Rodriguez }; 452203c4805SLuis R. Rodriguez 453203c4805SLuis R. Rodriguez /* Default mode specific settings */ 454203c4805SLuis R. Rodriguez static const struct ath5k_ini_rfbuffer rfb_5112a[] = { 4558c2b418aSNick Kossifidis /* BANK / C.R. A/XR B G */ 4568c2b418aSNick Kossifidis { 1, 0x98d4, { 0x00000020, 0x00000020, 0x00000020 } }, 4578c2b418aSNick Kossifidis { 2, 0x98d0, { 0x03060408, 0x03060408, 0x03060408 } }, 4588c2b418aSNick Kossifidis { 3, 0x98dc, { 0x00a020c0, 0x00e020c0, 0x00e020c0 } }, 4598c2b418aSNick Kossifidis { 6, 0x989c, { 0x0f000000, 0x0f000000, 0x0f000000 } }, 4608c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 4618c2b418aSNick Kossifidis { 6, 0x989c, { 0x00800000, 0x00800000, 0x00800000 } }, 4628c2b418aSNick Kossifidis { 6, 0x989c, { 0x002a0000, 0x002a0000, 0x002a0000 } }, 4638c2b418aSNick Kossifidis { 6, 0x989c, { 0x00010000, 0x00010000, 0x00010000 } }, 4648c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 4658c2b418aSNick Kossifidis { 6, 0x989c, { 0x00180000, 0x00180000, 0x00180000 } }, 4668c2b418aSNick Kossifidis { 6, 0x989c, { 0x00600000, 0x006e0000, 0x006e0000 } }, 4678c2b418aSNick Kossifidis { 6, 0x989c, { 0x00c70000, 0x00c70000, 0x00c70000 } }, 4688c2b418aSNick Kossifidis { 6, 0x989c, { 0x004b0000, 0x004b0000, 0x004b0000 } }, 4698c2b418aSNick Kossifidis { 6, 0x989c, { 0x04480000, 0x04480000, 0x04480000 } }, 4708c2b418aSNick Kossifidis { 6, 0x989c, { 0x004c0000, 0x004c0000, 0x004c0000 } }, 4718c2b418aSNick Kossifidis { 6, 0x989c, { 0x00e40000, 0x00e40000, 0x00e40000 } }, 4728c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 4738c2b418aSNick Kossifidis { 6, 0x989c, { 0x00fc0000, 0x00fc0000, 0x00fc0000 } }, 4748c2b418aSNick Kossifidis { 6, 0x989c, { 0x00ff0000, 0x00ff0000, 0x00ff0000 } }, 4758c2b418aSNick Kossifidis { 6, 0x989c, { 0x043f0000, 0x043f0000, 0x043f0000 } }, 4768c2b418aSNick Kossifidis { 6, 0x989c, { 0x000c0000, 0x000c0000, 0x000c0000 } }, 4778c2b418aSNick Kossifidis { 6, 0x989c, { 0x02190000, 0x02190000, 0x02190000 } }, 4788c2b418aSNick Kossifidis { 6, 0x989c, { 0x00240000, 0x00240000, 0x00240000 } }, 4798c2b418aSNick Kossifidis { 6, 0x989c, { 0x00b40000, 0x00b40000, 0x00b40000 } }, 4808c2b418aSNick Kossifidis { 6, 0x989c, { 0x00990000, 0x00990000, 0x00990000 } }, 4818c2b418aSNick Kossifidis { 6, 0x989c, { 0x00500000, 0x00500000, 0x00500000 } }, 4828c2b418aSNick Kossifidis { 6, 0x989c, { 0x002a0000, 0x002a0000, 0x002a0000 } }, 4838c2b418aSNick Kossifidis { 6, 0x989c, { 0x00120000, 0x00120000, 0x00120000 } }, 4848c2b418aSNick Kossifidis { 6, 0x989c, { 0xc0320000, 0xc0320000, 0xc0320000 } }, 4858c2b418aSNick Kossifidis { 6, 0x989c, { 0x01740000, 0x01740000, 0x01740000 } }, 4868c2b418aSNick Kossifidis { 6, 0x989c, { 0x00110000, 0x00110000, 0x00110000 } }, 4878c2b418aSNick Kossifidis { 6, 0x989c, { 0x86280000, 0x86280000, 0x86280000 } }, 4888c2b418aSNick Kossifidis { 6, 0x989c, { 0x31840000, 0x31840000, 0x31840000 } }, 4898c2b418aSNick Kossifidis { 6, 0x989c, { 0x00f20080, 0x00f20080, 0x00f20080 } }, 4908c2b418aSNick Kossifidis { 6, 0x989c, { 0x00270019, 0x00270019, 0x00270019 } }, 4918c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000003, 0x00000003, 0x00000003 } }, 4928c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 4938c2b418aSNick Kossifidis { 6, 0x989c, { 0x000000b2, 0x000000b2, 0x000000b2 } }, 4948c2b418aSNick Kossifidis { 6, 0x989c, { 0x00b02084, 0x00b02084, 0x00b02084 } }, 4958c2b418aSNick Kossifidis { 6, 0x989c, { 0x004125a4, 0x004125a4, 0x004125a4 } }, 4968c2b418aSNick Kossifidis { 6, 0x989c, { 0x00119220, 0x00119220, 0x00119220 } }, 4978c2b418aSNick Kossifidis { 6, 0x989c, { 0x001a4800, 0x001a4800, 0x001a4800 } }, 4988c2b418aSNick Kossifidis { 6, 0x98d8, { 0x000b0230, 0x000b0230, 0x000b0230 } }, 4998c2b418aSNick Kossifidis { 7, 0x989c, { 0x00000094, 0x00000094, 0x00000094 } }, 5008c2b418aSNick Kossifidis { 7, 0x989c, { 0x00000091, 0x00000091, 0x00000091 } }, 5018c2b418aSNick Kossifidis { 7, 0x989c, { 0x00000012, 0x00000012, 0x00000012 } }, 5028c2b418aSNick Kossifidis { 7, 0x989c, { 0x00000080, 0x00000080, 0x00000080 } }, 5038c2b418aSNick Kossifidis { 7, 0x989c, { 0x000000d9, 0x000000d9, 0x000000d9 } }, 5048c2b418aSNick Kossifidis { 7, 0x989c, { 0x00000060, 0x00000060, 0x00000060 } }, 5058c2b418aSNick Kossifidis { 7, 0x989c, { 0x000000f0, 0x000000f0, 0x000000f0 } }, 5068c2b418aSNick Kossifidis { 7, 0x989c, { 0x000000a2, 0x000000a2, 0x000000a2 } }, 5078c2b418aSNick Kossifidis { 7, 0x989c, { 0x00000052, 0x00000052, 0x00000052 } }, 5088c2b418aSNick Kossifidis { 7, 0x989c, { 0x000000d4, 0x000000d4, 0x000000d4 } }, 5098c2b418aSNick Kossifidis { 7, 0x989c, { 0x000014cc, 0x000014cc, 0x000014cc } }, 5108c2b418aSNick Kossifidis { 7, 0x989c, { 0x0000048c, 0x0000048c, 0x0000048c } }, 5118c2b418aSNick Kossifidis { 7, 0x98c4, { 0x00000003, 0x00000003, 0x00000003 } }, 512203c4805SLuis R. Rodriguez }; 513203c4805SLuis R. Rodriguez 514203c4805SLuis R. Rodriguez 515203c4805SLuis R. Rodriguez 516203c4805SLuis R. Rodriguez /******************\ 517203c4805SLuis R. Rodriguez * RF2413 (Griffin) * 518203c4805SLuis R. Rodriguez \******************/ 519203c4805SLuis R. Rodriguez 5204352fab5SNick Kossifidis /* BANK 2 len pos col */ 5214352fab5SNick Kossifidis #define AR5K_RF2413_RF_TURBO { 1, 1, 2 } 5224352fab5SNick Kossifidis 523203c4805SLuis R. Rodriguez /* BANK 6 len pos col */ 524203c4805SLuis R. Rodriguez #define AR5K_RF2413_OB_2GHZ { 3, 168, 0 } 525203c4805SLuis R. Rodriguez #define AR5K_RF2413_DB_2GHZ { 3, 165, 0 } 526203c4805SLuis R. Rodriguez 527203c4805SLuis R. Rodriguez static const struct ath5k_rf_reg rf_regs_2413[] = { 5284352fab5SNick Kossifidis {2, AR5K_RF_TURBO, AR5K_RF2413_RF_TURBO}, 529203c4805SLuis R. Rodriguez {6, AR5K_RF_OB_2GHZ, AR5K_RF2413_OB_2GHZ}, 530203c4805SLuis R. Rodriguez {6, AR5K_RF_DB_2GHZ, AR5K_RF2413_DB_2GHZ}, 531203c4805SLuis R. Rodriguez }; 532203c4805SLuis R. Rodriguez 533203c4805SLuis R. Rodriguez /* Default mode specific settings 534203c4805SLuis R. Rodriguez * XXX: a/aTurbo ??? 535203c4805SLuis R. Rodriguez */ 536203c4805SLuis R. Rodriguez static const struct ath5k_ini_rfbuffer rfb_2413[] = { 5378c2b418aSNick Kossifidis /* BANK / C.R. A/XR B G */ 5388c2b418aSNick Kossifidis { 1, 0x98d4, { 0x00000020, 0x00000020, 0x00000020 } }, 5398c2b418aSNick Kossifidis { 2, 0x98d0, { 0x02001408, 0x02001408, 0x02001408 } }, 5408c2b418aSNick Kossifidis { 3, 0x98dc, { 0x00a020c0, 0x00e020c0, 0x00e020c0 } }, 5418c2b418aSNick Kossifidis { 6, 0x989c, { 0xf0000000, 0xf0000000, 0xf0000000 } }, 5428c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 5438c2b418aSNick Kossifidis { 6, 0x989c, { 0x03000000, 0x03000000, 0x03000000 } }, 5448c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 5458c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 5468c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 5478c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 5488c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 5498c2b418aSNick Kossifidis { 6, 0x989c, { 0x40400000, 0x40400000, 0x40400000 } }, 5508c2b418aSNick Kossifidis { 6, 0x989c, { 0x65050000, 0x65050000, 0x65050000 } }, 5518c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 5528c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 5538c2b418aSNick Kossifidis { 6, 0x989c, { 0x00420000, 0x00420000, 0x00420000 } }, 5548c2b418aSNick Kossifidis { 6, 0x989c, { 0x00b50000, 0x00b50000, 0x00b50000 } }, 5558c2b418aSNick Kossifidis { 6, 0x989c, { 0x00030000, 0x00030000, 0x00030000 } }, 5568c2b418aSNick Kossifidis { 6, 0x989c, { 0x00f70000, 0x00f70000, 0x00f70000 } }, 5578c2b418aSNick Kossifidis { 6, 0x989c, { 0x009d0000, 0x009d0000, 0x009d0000 } }, 5588c2b418aSNick Kossifidis { 6, 0x989c, { 0x00220000, 0x00220000, 0x00220000 } }, 5598c2b418aSNick Kossifidis { 6, 0x989c, { 0x04220000, 0x04220000, 0x04220000 } }, 5608c2b418aSNick Kossifidis { 6, 0x989c, { 0x00230018, 0x00230018, 0x00230018 } }, 5618c2b418aSNick Kossifidis { 6, 0x989c, { 0x00280000, 0x00280060, 0x00280060 } }, 5628c2b418aSNick Kossifidis { 6, 0x989c, { 0x005000c0, 0x005000c3, 0x005000c3 } }, 5638c2b418aSNick Kossifidis { 6, 0x989c, { 0x0004007f, 0x0004007f, 0x0004007f } }, 5648c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000458, 0x00000458, 0x00000458 } }, 5658c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 5668c2b418aSNick Kossifidis { 6, 0x989c, { 0x0000c000, 0x0000c000, 0x0000c000 } }, 5678c2b418aSNick Kossifidis { 6, 0x98d8, { 0x00400230, 0x00400230, 0x00400230 } }, 5688c2b418aSNick Kossifidis { 7, 0x989c, { 0x00006400, 0x00006400, 0x00006400 } }, 5698c2b418aSNick Kossifidis { 7, 0x989c, { 0x00000800, 0x00000800, 0x00000800 } }, 5708c2b418aSNick Kossifidis { 7, 0x98cc, { 0x0000000e, 0x0000000e, 0x0000000e } }, 571203c4805SLuis R. Rodriguez }; 572203c4805SLuis R. Rodriguez 573203c4805SLuis R. Rodriguez 574203c4805SLuis R. Rodriguez 575203c4805SLuis R. Rodriguez /***************************\ 576203c4805SLuis R. Rodriguez * RF2315/RF2316 (Cobra SoC) * 577203c4805SLuis R. Rodriguez \***************************/ 578203c4805SLuis R. Rodriguez 5794352fab5SNick Kossifidis /* BANK 2 len pos col */ 5804352fab5SNick Kossifidis #define AR5K_RF2316_RF_TURBO { 1, 1, 2 } 5814352fab5SNick Kossifidis 582203c4805SLuis R. Rodriguez /* BANK 6 len pos col */ 583203c4805SLuis R. Rodriguez #define AR5K_RF2316_OB_2GHZ { 3, 178, 0 } 584203c4805SLuis R. Rodriguez #define AR5K_RF2316_DB_2GHZ { 3, 175, 0 } 585203c4805SLuis R. Rodriguez 586203c4805SLuis R. Rodriguez static const struct ath5k_rf_reg rf_regs_2316[] = { 5874352fab5SNick Kossifidis {2, AR5K_RF_TURBO, AR5K_RF2316_RF_TURBO}, 588203c4805SLuis R. Rodriguez {6, AR5K_RF_OB_2GHZ, AR5K_RF2316_OB_2GHZ}, 589203c4805SLuis R. Rodriguez {6, AR5K_RF_DB_2GHZ, AR5K_RF2316_DB_2GHZ}, 590203c4805SLuis R. Rodriguez }; 591203c4805SLuis R. Rodriguez 592203c4805SLuis R. Rodriguez /* Default mode specific settings */ 593203c4805SLuis R. Rodriguez static const struct ath5k_ini_rfbuffer rfb_2316[] = { 5948c2b418aSNick Kossifidis /* BANK / C.R. A/XR B G */ 5958c2b418aSNick Kossifidis { 1, 0x98d4, { 0x00000020, 0x00000020, 0x00000020 } }, 5968c2b418aSNick Kossifidis { 2, 0x98d0, { 0x02001408, 0x02001408, 0x02001408 } }, 5978c2b418aSNick Kossifidis { 3, 0x98dc, { 0x00a020c0, 0x00e020c0, 0x00e020c0 } }, 5988c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 5998c2b418aSNick Kossifidis { 6, 0x989c, { 0xc0000000, 0xc0000000, 0xc0000000 } }, 6008c2b418aSNick Kossifidis { 6, 0x989c, { 0x0f000000, 0x0f000000, 0x0f000000 } }, 6018c2b418aSNick Kossifidis { 6, 0x989c, { 0x02000000, 0x02000000, 0x02000000 } }, 6028c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 6038c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 6048c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 6058c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 6068c2b418aSNick Kossifidis { 6, 0x989c, { 0xf8000000, 0xf8000000, 0xf8000000 } }, 6078c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 6088c2b418aSNick Kossifidis { 6, 0x989c, { 0x95150000, 0x95150000, 0x95150000 } }, 6098c2b418aSNick Kossifidis { 6, 0x989c, { 0xc1000000, 0xc1000000, 0xc1000000 } }, 6108c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 6118c2b418aSNick Kossifidis { 6, 0x989c, { 0x00080000, 0x00080000, 0x00080000 } }, 6128c2b418aSNick Kossifidis { 6, 0x989c, { 0x00d50000, 0x00d50000, 0x00d50000 } }, 6138c2b418aSNick Kossifidis { 6, 0x989c, { 0x000e0000, 0x000e0000, 0x000e0000 } }, 6148c2b418aSNick Kossifidis { 6, 0x989c, { 0x00dc0000, 0x00dc0000, 0x00dc0000 } }, 6158c2b418aSNick Kossifidis { 6, 0x989c, { 0x00770000, 0x00770000, 0x00770000 } }, 6168c2b418aSNick Kossifidis { 6, 0x989c, { 0x008a0000, 0x008a0000, 0x008a0000 } }, 6178c2b418aSNick Kossifidis { 6, 0x989c, { 0x10880000, 0x10880000, 0x10880000 } }, 6188c2b418aSNick Kossifidis { 6, 0x989c, { 0x008c0060, 0x008c0060, 0x008c0060 } }, 6198c2b418aSNick Kossifidis { 6, 0x989c, { 0x00a00000, 0x00a00080, 0x00a00080 } }, 6208c2b418aSNick Kossifidis { 6, 0x989c, { 0x00400000, 0x0040000d, 0x0040000d } }, 6218c2b418aSNick Kossifidis { 6, 0x989c, { 0x00110400, 0x00110400, 0x00110400 } }, 6228c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000060, 0x00000060, 0x00000060 } }, 6238c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000001, 0x00000001, 0x00000001 } }, 6248c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000b00, 0x00000b00, 0x00000b00 } }, 6258c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000be8, 0x00000be8, 0x00000be8 } }, 6268c2b418aSNick Kossifidis { 6, 0x98c0, { 0x00010000, 0x00010000, 0x00010000 } }, 6278c2b418aSNick Kossifidis { 7, 0x989c, { 0x00006400, 0x00006400, 0x00006400 } }, 6288c2b418aSNick Kossifidis { 7, 0x989c, { 0x00000800, 0x00000800, 0x00000800 } }, 6298c2b418aSNick Kossifidis { 7, 0x98cc, { 0x0000000e, 0x0000000e, 0x0000000e } }, 630203c4805SLuis R. Rodriguez }; 631203c4805SLuis R. Rodriguez 632203c4805SLuis R. Rodriguez 633203c4805SLuis R. Rodriguez 634203c4805SLuis R. Rodriguez /******************************\ 635203c4805SLuis R. Rodriguez * RF5413/RF5424 (Eagle/Condor) * 636203c4805SLuis R. Rodriguez \******************************/ 637203c4805SLuis R. Rodriguez 638203c4805SLuis R. Rodriguez /* BANK 6 len pos col */ 639203c4805SLuis R. Rodriguez #define AR5K_RF5413_OB_2GHZ { 3, 241, 0 } 640203c4805SLuis R. Rodriguez #define AR5K_RF5413_DB_2GHZ { 3, 238, 0 } 641203c4805SLuis R. Rodriguez 642203c4805SLuis R. Rodriguez #define AR5K_RF5413_OB_5GHZ { 3, 247, 0 } 643203c4805SLuis R. Rodriguez #define AR5K_RF5413_DB_5GHZ { 3, 244, 0 } 644203c4805SLuis R. Rodriguez 645203c4805SLuis R. Rodriguez #define AR5K_RF5413_PWD_ICLOBUF2G { 3, 131, 3 } 646203c4805SLuis R. Rodriguez #define AR5K_RF5413_DERBY_CHAN_SEL_MODE { 1, 291, 2 } 647203c4805SLuis R. Rodriguez 648203c4805SLuis R. Rodriguez static const struct ath5k_rf_reg rf_regs_5413[] = { 649203c4805SLuis R. Rodriguez {6, AR5K_RF_OB_2GHZ, AR5K_RF5413_OB_2GHZ}, 650203c4805SLuis R. Rodriguez {6, AR5K_RF_DB_2GHZ, AR5K_RF5413_DB_2GHZ}, 651203c4805SLuis R. Rodriguez {6, AR5K_RF_OB_5GHZ, AR5K_RF5413_OB_5GHZ}, 652203c4805SLuis R. Rodriguez {6, AR5K_RF_DB_5GHZ, AR5K_RF5413_DB_5GHZ}, 653203c4805SLuis R. Rodriguez {6, AR5K_RF_PWD_ICLOBUF_2G, AR5K_RF5413_PWD_ICLOBUF2G}, 654203c4805SLuis R. Rodriguez {6, AR5K_RF_DERBY_CHAN_SEL_MODE, AR5K_RF5413_DERBY_CHAN_SEL_MODE}, 655203c4805SLuis R. Rodriguez }; 656203c4805SLuis R. Rodriguez 657203c4805SLuis R. Rodriguez /* Default mode specific settings */ 658203c4805SLuis R. Rodriguez static const struct ath5k_ini_rfbuffer rfb_5413[] = { 6598c2b418aSNick Kossifidis /* BANK / C.R. A/XR B G */ 6608c2b418aSNick Kossifidis { 1, 0x98d4, { 0x00000020, 0x00000020, 0x00000020 } }, 6618c2b418aSNick Kossifidis { 2, 0x98d0, { 0x00000008, 0x00000008, 0x00000008 } }, 6628c2b418aSNick Kossifidis { 3, 0x98dc, { 0x00a000c0, 0x00e000c0, 0x00e000c0 } }, 6638c2b418aSNick Kossifidis { 6, 0x989c, { 0x33000000, 0x33000000, 0x33000000 } }, 6648c2b418aSNick Kossifidis { 6, 0x989c, { 0x01000000, 0x01000000, 0x01000000 } }, 6658c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 6668c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 6678c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 6688c2b418aSNick Kossifidis { 6, 0x989c, { 0x1f000000, 0x1f000000, 0x1f000000 } }, 6698c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 6708c2b418aSNick Kossifidis { 6, 0x989c, { 0x00b80000, 0x00b80000, 0x00b80000 } }, 6718c2b418aSNick Kossifidis { 6, 0x989c, { 0x00b70000, 0x00b70000, 0x00b70000 } }, 6728c2b418aSNick Kossifidis { 6, 0x989c, { 0x00840000, 0x00840000, 0x00840000 } }, 6738c2b418aSNick Kossifidis { 6, 0x989c, { 0x00980000, 0x00980000, 0x00980000 } }, 6748c2b418aSNick Kossifidis { 6, 0x989c, { 0x00c00000, 0x00c00000, 0x00c00000 } }, 6758c2b418aSNick Kossifidis { 6, 0x989c, { 0x00ff0000, 0x00ff0000, 0x00ff0000 } }, 6768c2b418aSNick Kossifidis { 6, 0x989c, { 0x00ff0000, 0x00ff0000, 0x00ff0000 } }, 6778c2b418aSNick Kossifidis { 6, 0x989c, { 0x00ff0000, 0x00ff0000, 0x00ff0000 } }, 6788c2b418aSNick Kossifidis { 6, 0x989c, { 0x00ff0000, 0x00ff0000, 0x00ff0000 } }, 6798c2b418aSNick Kossifidis { 6, 0x989c, { 0x00d70000, 0x00d70000, 0x00d70000 } }, 6808c2b418aSNick Kossifidis { 6, 0x989c, { 0x00610000, 0x00610000, 0x00610000 } }, 6818c2b418aSNick Kossifidis { 6, 0x989c, { 0x00fe0000, 0x00fe0000, 0x00fe0000 } }, 6828c2b418aSNick Kossifidis { 6, 0x989c, { 0x00de0000, 0x00de0000, 0x00de0000 } }, 6838c2b418aSNick Kossifidis { 6, 0x989c, { 0x007f0000, 0x007f0000, 0x007f0000 } }, 6848c2b418aSNick Kossifidis { 6, 0x989c, { 0x043d0000, 0x043d0000, 0x043d0000 } }, 6858c2b418aSNick Kossifidis { 6, 0x989c, { 0x00770000, 0x00770000, 0x00770000 } }, 6868c2b418aSNick Kossifidis { 6, 0x989c, { 0x00440000, 0x00440000, 0x00440000 } }, 6878c2b418aSNick Kossifidis { 6, 0x989c, { 0x00980000, 0x00980000, 0x00980000 } }, 6888c2b418aSNick Kossifidis { 6, 0x989c, { 0x00100080, 0x00100080, 0x00100080 } }, 6898c2b418aSNick Kossifidis { 6, 0x989c, { 0x0005c034, 0x0005c034, 0x0005c034 } }, 6908c2b418aSNick Kossifidis { 6, 0x989c, { 0x003100f0, 0x003100f0, 0x003100f0 } }, 6918c2b418aSNick Kossifidis { 6, 0x989c, { 0x000c011f, 0x000c011f, 0x000c011f } }, 6928c2b418aSNick Kossifidis { 6, 0x989c, { 0x00510040, 0x00510040, 0x00510040 } }, 6938c2b418aSNick Kossifidis { 6, 0x989c, { 0x005000da, 0x005000da, 0x005000da } }, 6948c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 6958c2b418aSNick Kossifidis { 6, 0x989c, { 0x00004044, 0x00004044, 0x00004044 } }, 6968c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 6978c2b418aSNick Kossifidis { 6, 0x989c, { 0x000060c0, 0x000060c0, 0x000060c0 } }, 6988c2b418aSNick Kossifidis { 6, 0x989c, { 0x00002c00, 0x00003600, 0x00003600 } }, 6998c2b418aSNick Kossifidis { 6, 0x98c8, { 0x00000403, 0x00040403, 0x00040403 } }, 7008c2b418aSNick Kossifidis { 7, 0x989c, { 0x00006400, 0x00006400, 0x00006400 } }, 7018c2b418aSNick Kossifidis { 7, 0x989c, { 0x00000800, 0x00000800, 0x00000800 } }, 7028c2b418aSNick Kossifidis { 7, 0x98cc, { 0x0000000e, 0x0000000e, 0x0000000e } }, 703203c4805SLuis R. Rodriguez }; 704203c4805SLuis R. Rodriguez 705203c4805SLuis R. Rodriguez 706203c4805SLuis R. Rodriguez 707203c4805SLuis R. Rodriguez /***************************\ 708203c4805SLuis R. Rodriguez * RF2425/RF2417 (Swan/Nala) * 709203c4805SLuis R. Rodriguez * AR2317 (Spider SoC) * 710203c4805SLuis R. Rodriguez \***************************/ 711203c4805SLuis R. Rodriguez 7124352fab5SNick Kossifidis /* BANK 2 len pos col */ 7134352fab5SNick Kossifidis #define AR5K_RF2425_RF_TURBO { 1, 1, 2 } 7144352fab5SNick Kossifidis 715203c4805SLuis R. Rodriguez /* BANK 6 len pos col */ 716203c4805SLuis R. Rodriguez #define AR5K_RF2425_OB_2GHZ { 3, 193, 0 } 717203c4805SLuis R. Rodriguez #define AR5K_RF2425_DB_2GHZ { 3, 190, 0 } 718203c4805SLuis R. Rodriguez 719203c4805SLuis R. Rodriguez static const struct ath5k_rf_reg rf_regs_2425[] = { 7204352fab5SNick Kossifidis {2, AR5K_RF_TURBO, AR5K_RF2425_RF_TURBO}, 721203c4805SLuis R. Rodriguez {6, AR5K_RF_OB_2GHZ, AR5K_RF2425_OB_2GHZ}, 722203c4805SLuis R. Rodriguez {6, AR5K_RF_DB_2GHZ, AR5K_RF2425_DB_2GHZ}, 723203c4805SLuis R. Rodriguez }; 724203c4805SLuis R. Rodriguez 725203c4805SLuis R. Rodriguez /* Default mode specific settings 726203c4805SLuis R. Rodriguez */ 727203c4805SLuis R. Rodriguez static const struct ath5k_ini_rfbuffer rfb_2425[] = { 7288c2b418aSNick Kossifidis /* BANK / C.R. A/XR B G */ 7298c2b418aSNick Kossifidis { 1, 0x98d4, { 0x00000020, 0x00000020, 0x00000020 } }, 7308c2b418aSNick Kossifidis { 2, 0x98d0, { 0x02001408, 0x02001408, 0x02001408 } }, 7318c2b418aSNick Kossifidis { 3, 0x98dc, { 0x00a020c0, 0x00e020c0, 0x00e020c0 } }, 7328c2b418aSNick Kossifidis { 6, 0x989c, { 0x10000000, 0x10000000, 0x10000000 } }, 7338c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 7348c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 7358c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 7368c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 7378c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 7388c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 7398c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 7408c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 7418c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 7428c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 7438c2b418aSNick Kossifidis { 6, 0x989c, { 0x002a0000, 0x002a0000, 0x002a0000 } }, 7448c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 7458c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 7468c2b418aSNick Kossifidis { 6, 0x989c, { 0x00100000, 0x00100000, 0x00100000 } }, 7478c2b418aSNick Kossifidis { 6, 0x989c, { 0x00020000, 0x00020000, 0x00020000 } }, 7488c2b418aSNick Kossifidis { 6, 0x989c, { 0x00730000, 0x00730000, 0x00730000 } }, 7498c2b418aSNick Kossifidis { 6, 0x989c, { 0x00f80000, 0x00f80000, 0x00f80000 } }, 7508c2b418aSNick Kossifidis { 6, 0x989c, { 0x00e70000, 0x00e70000, 0x00e70000 } }, 7518c2b418aSNick Kossifidis { 6, 0x989c, { 0x00140000, 0x00140000, 0x00140000 } }, 7528c2b418aSNick Kossifidis { 6, 0x989c, { 0x00910040, 0x00910040, 0x00910040 } }, 7538c2b418aSNick Kossifidis { 6, 0x989c, { 0x0007001a, 0x0007001a, 0x0007001a } }, 7548c2b418aSNick Kossifidis { 6, 0x989c, { 0x00410000, 0x00410000, 0x00410000 } }, 7558c2b418aSNick Kossifidis { 6, 0x989c, { 0x00810000, 0x00810060, 0x00810060 } }, 7568c2b418aSNick Kossifidis { 6, 0x989c, { 0x00020800, 0x00020803, 0x00020803 } }, 7578c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 7588c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 7598c2b418aSNick Kossifidis { 6, 0x989c, { 0x00001660, 0x00001660, 0x00001660 } }, 7608c2b418aSNick Kossifidis { 6, 0x989c, { 0x00001688, 0x00001688, 0x00001688 } }, 7618c2b418aSNick Kossifidis { 6, 0x98c4, { 0x00000001, 0x00000001, 0x00000001 } }, 7628c2b418aSNick Kossifidis { 7, 0x989c, { 0x00006400, 0x00006400, 0x00006400 } }, 7638c2b418aSNick Kossifidis { 7, 0x989c, { 0x00000800, 0x00000800, 0x00000800 } }, 7648c2b418aSNick Kossifidis { 7, 0x98cc, { 0x0000000e, 0x0000000e, 0x0000000e } }, 765203c4805SLuis R. Rodriguez }; 766203c4805SLuis R. Rodriguez 767203c4805SLuis R. Rodriguez /* 768203c4805SLuis R. Rodriguez * TODO: Handle the few differences with swan during 769203c4805SLuis R. Rodriguez * bank modification and get rid of this 770203c4805SLuis R. Rodriguez */ 771203c4805SLuis R. Rodriguez static const struct ath5k_ini_rfbuffer rfb_2317[] = { 7728c2b418aSNick Kossifidis /* BANK / C.R. A/XR B G */ 7738c2b418aSNick Kossifidis { 1, 0x98d4, { 0x00000020, 0x00000020, 0x00000020 } }, 7748c2b418aSNick Kossifidis { 2, 0x98d0, { 0x02001408, 0x02001408, 0x02001408 } }, 7758c2b418aSNick Kossifidis { 3, 0x98dc, { 0x00a020c0, 0x00e020c0, 0x00e020c0 } }, 7768c2b418aSNick Kossifidis { 6, 0x989c, { 0x10000000, 0x10000000, 0x10000000 } }, 7778c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 7788c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 7798c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 7808c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 7818c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 7828c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 7838c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 7848c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 7858c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 7868c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 7878c2b418aSNick Kossifidis { 6, 0x989c, { 0x002a0000, 0x002a0000, 0x002a0000 } }, 7888c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 7898c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 7908c2b418aSNick Kossifidis { 6, 0x989c, { 0x00100000, 0x00100000, 0x00100000 } }, 7918c2b418aSNick Kossifidis { 6, 0x989c, { 0x00020000, 0x00020000, 0x00020000 } }, 7928c2b418aSNick Kossifidis { 6, 0x989c, { 0x00730000, 0x00730000, 0x00730000 } }, 7938c2b418aSNick Kossifidis { 6, 0x989c, { 0x00f80000, 0x00f80000, 0x00f80000 } }, 7948c2b418aSNick Kossifidis { 6, 0x989c, { 0x00e70000, 0x00e70000, 0x00e70000 } }, 7958c2b418aSNick Kossifidis { 6, 0x989c, { 0x00140100, 0x00140100, 0x00140100 } }, 7968c2b418aSNick Kossifidis { 6, 0x989c, { 0x00910040, 0x00910040, 0x00910040 } }, 7978c2b418aSNick Kossifidis { 6, 0x989c, { 0x0007001a, 0x0007001a, 0x0007001a } }, 7988c2b418aSNick Kossifidis { 6, 0x989c, { 0x00410000, 0x00410000, 0x00410000 } }, 7998c2b418aSNick Kossifidis { 6, 0x989c, { 0x00810000, 0x00810060, 0x00810060 } }, 8008c2b418aSNick Kossifidis { 6, 0x989c, { 0x00020800, 0x00020803, 0x00020803 } }, 8018c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 8028c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 8038c2b418aSNick Kossifidis { 6, 0x989c, { 0x00001660, 0x00001660, 0x00001660 } }, 8048c2b418aSNick Kossifidis { 6, 0x989c, { 0x00009688, 0x00009688, 0x00009688 } }, 8058c2b418aSNick Kossifidis { 6, 0x98c4, { 0x00000001, 0x00000001, 0x00000001 } }, 8068c2b418aSNick Kossifidis { 7, 0x989c, { 0x00006400, 0x00006400, 0x00006400 } }, 8078c2b418aSNick Kossifidis { 7, 0x989c, { 0x00000800, 0x00000800, 0x00000800 } }, 8088c2b418aSNick Kossifidis { 7, 0x98cc, { 0x0000000e, 0x0000000e, 0x0000000e } }, 809203c4805SLuis R. Rodriguez }; 810203c4805SLuis R. Rodriguez 811203c4805SLuis R. Rodriguez /* 812203c4805SLuis R. Rodriguez * TODO: Handle the few differences with swan during 813203c4805SLuis R. Rodriguez * bank modification and get rid of this 814203c4805SLuis R. Rodriguez */ 815203c4805SLuis R. Rodriguez static const struct ath5k_ini_rfbuffer rfb_2417[] = { 8168c2b418aSNick Kossifidis /* BANK / C.R. A/XR B G */ 8178c2b418aSNick Kossifidis { 1, 0x98d4, { 0x00000020, 0x00000020, 0x00000020 } }, 8188c2b418aSNick Kossifidis { 2, 0x98d0, { 0x02001408, 0x02001408, 0x02001408 } }, 8198c2b418aSNick Kossifidis { 3, 0x98dc, { 0x00a020c0, 0x00e020c0, 0x00e020c0 } }, 8208c2b418aSNick Kossifidis { 6, 0x989c, { 0x10000000, 0x10000000, 0x10000000 } }, 8218c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 8228c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 8238c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 8248c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 8258c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 8268c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 8278c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 8288c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 8298c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 8308c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 8318c2b418aSNick Kossifidis { 6, 0x989c, { 0x002a0000, 0x002a0000, 0x002a0000 } }, 8328c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 8338c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 8348c2b418aSNick Kossifidis { 6, 0x989c, { 0x00100000, 0x00100000, 0x00100000 } }, 8358c2b418aSNick Kossifidis { 6, 0x989c, { 0x00020000, 0x00020000, 0x00020000 } }, 8368c2b418aSNick Kossifidis { 6, 0x989c, { 0x00730000, 0x00730000, 0x00730000 } }, 8378c2b418aSNick Kossifidis { 6, 0x989c, { 0x00f80000, 0x00f80000, 0x00f80000 } }, 8388c2b418aSNick Kossifidis { 6, 0x989c, { 0x00e70000, 0x80e70000, 0x80e70000 } }, 8398c2b418aSNick Kossifidis { 6, 0x989c, { 0x00140000, 0x00140000, 0x00140000 } }, 8408c2b418aSNick Kossifidis { 6, 0x989c, { 0x00910040, 0x00910040, 0x00910040 } }, 8418c2b418aSNick Kossifidis { 6, 0x989c, { 0x0007001a, 0x0207001a, 0x0207001a } }, 8428c2b418aSNick Kossifidis { 6, 0x989c, { 0x00410000, 0x00410000, 0x00410000 } }, 8438c2b418aSNick Kossifidis { 6, 0x989c, { 0x00810000, 0x00810060, 0x00810060 } }, 8448c2b418aSNick Kossifidis { 6, 0x989c, { 0x00020800, 0x00020803, 0x00020803 } }, 8458c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 8468c2b418aSNick Kossifidis { 6, 0x989c, { 0x00000000, 0x00000000, 0x00000000 } }, 8478c2b418aSNick Kossifidis { 6, 0x989c, { 0x00001660, 0x00001660, 0x00001660 } }, 8488c2b418aSNick Kossifidis { 6, 0x989c, { 0x00001688, 0x00001688, 0x00001688 } }, 8498c2b418aSNick Kossifidis { 6, 0x98c4, { 0x00000001, 0x00000001, 0x00000001 } }, 8508c2b418aSNick Kossifidis { 7, 0x989c, { 0x00006400, 0x00006400, 0x00006400 } }, 8518c2b418aSNick Kossifidis { 7, 0x989c, { 0x00000800, 0x00000800, 0x00000800 } }, 8528c2b418aSNick Kossifidis { 7, 0x98cc, { 0x0000000e, 0x0000000e, 0x0000000e } }, 853203c4805SLuis R. Rodriguez }; 854