162306a36Sopenharmony_ci/* 262306a36Sopenharmony_ci * Copyright (c) 2004-2008 Reyk Floeter <reyk@openbsd.org> 362306a36Sopenharmony_ci * Copyright (c) 2006-2008 Nick Kossifidis <mickflemm@gmail.com> 462306a36Sopenharmony_ci * 562306a36Sopenharmony_ci * Permission to use, copy, modify, and distribute this software for any 662306a36Sopenharmony_ci * purpose with or without fee is hereby granted, provided that the above 762306a36Sopenharmony_ci * copyright notice and this permission notice appear in all copies. 862306a36Sopenharmony_ci * 962306a36Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 1062306a36Sopenharmony_ci * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 1162306a36Sopenharmony_ci * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 1262306a36Sopenharmony_ci * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 1362306a36Sopenharmony_ci * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 1462306a36Sopenharmony_ci * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 1562306a36Sopenharmony_ci * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 1662306a36Sopenharmony_ci * 1762306a36Sopenharmony_ci */ 1862306a36Sopenharmony_ci 1962306a36Sopenharmony_ci/* 2062306a36Sopenharmony_ci * Common ar5xxx EEPROM data offsets (set these on AR5K_EEPROM_BASE) 2162306a36Sopenharmony_ci */ 2262306a36Sopenharmony_ci#define AR5K_EEPROM_PCIE_OFFSET 0x02 /* Contains offset to PCI-E infos */ 2362306a36Sopenharmony_ci#define AR5K_EEPROM_PCIE_SERDES_SECTION 0x40 /* PCIE_OFFSET points here when 2462306a36Sopenharmony_ci * SERDES infos are present */ 2562306a36Sopenharmony_ci#define AR5K_EEPROM_MAGIC 0x003d /* EEPROM Magic number */ 2662306a36Sopenharmony_ci#define AR5K_EEPROM_MAGIC_VALUE 0x5aa5 /* Default - found on EEPROM */ 2762306a36Sopenharmony_ci 2862306a36Sopenharmony_ci#define AR5K_EEPROM_IS_HB63 0x000b /* Talon detect */ 2962306a36Sopenharmony_ci 3062306a36Sopenharmony_ci#define AR5K_EEPROM_RFKILL 0x0f 3162306a36Sopenharmony_ci#define AR5K_EEPROM_RFKILL_GPIO_SEL 0x0000001c 3262306a36Sopenharmony_ci#define AR5K_EEPROM_RFKILL_GPIO_SEL_S 2 3362306a36Sopenharmony_ci#define AR5K_EEPROM_RFKILL_POLARITY 0x00000002 3462306a36Sopenharmony_ci#define AR5K_EEPROM_RFKILL_POLARITY_S 1 3562306a36Sopenharmony_ci 3662306a36Sopenharmony_ci#define AR5K_EEPROM_REG_DOMAIN 0x00bf /* EEPROM regdom */ 3762306a36Sopenharmony_ci 3862306a36Sopenharmony_ci/* FLASH(EEPROM) Defines for AR531X chips */ 3962306a36Sopenharmony_ci#define AR5K_EEPROM_SIZE_LOWER 0x1b /* size info -- lower */ 4062306a36Sopenharmony_ci#define AR5K_EEPROM_SIZE_UPPER 0x1c /* size info -- upper */ 4162306a36Sopenharmony_ci#define AR5K_EEPROM_SIZE_UPPER_MASK 0xfff0 4262306a36Sopenharmony_ci#define AR5K_EEPROM_SIZE_UPPER_SHIFT 4 4362306a36Sopenharmony_ci#define AR5K_EEPROM_SIZE_ENDLOC_SHIFT 12 4462306a36Sopenharmony_ci 4562306a36Sopenharmony_ci#define AR5K_EEPROM_CHECKSUM 0x00c0 /* EEPROM checksum */ 4662306a36Sopenharmony_ci#define AR5K_EEPROM_INFO_BASE 0x00c0 /* EEPROM header */ 4762306a36Sopenharmony_ci#define AR5K_EEPROM_INFO_MAX (0x400 - AR5K_EEPROM_INFO_BASE) 4862306a36Sopenharmony_ci#define AR5K_EEPROM_INFO_CKSUM 0xffff 4962306a36Sopenharmony_ci#define AR5K_EEPROM_INFO(_n) (AR5K_EEPROM_INFO_BASE + (_n)) 5062306a36Sopenharmony_ci 5162306a36Sopenharmony_ci#define AR5K_EEPROM_VERSION AR5K_EEPROM_INFO(1) /* EEPROM Version */ 5262306a36Sopenharmony_ci#define AR5K_EEPROM_VERSION_3_0 0x3000 /* No idea what's going on before this version */ 5362306a36Sopenharmony_ci#define AR5K_EEPROM_VERSION_3_1 0x3001 /* ob/db values for 2GHz (ar5211_rfregs) */ 5462306a36Sopenharmony_ci#define AR5K_EEPROM_VERSION_3_2 0x3002 /* different frequency representation (eeprom_bin2freq) */ 5562306a36Sopenharmony_ci#define AR5K_EEPROM_VERSION_3_3 0x3003 /* offsets changed, has 32 CTLs (see below) and ee_false_detect (eeprom_read_modes) */ 5662306a36Sopenharmony_ci#define AR5K_EEPROM_VERSION_3_4 0x3004 /* has ee_i_gain, ee_cck_ofdm_power_delta (eeprom_read_modes) */ 5762306a36Sopenharmony_ci#define AR5K_EEPROM_VERSION_4_0 0x4000 /* has ee_misc, ee_cal_pier, ee_turbo_max_power and ee_xr_power (eeprom_init) */ 5862306a36Sopenharmony_ci#define AR5K_EEPROM_VERSION_4_1 0x4001 /* has ee_margin_tx_rx (eeprom_init) */ 5962306a36Sopenharmony_ci#define AR5K_EEPROM_VERSION_4_2 0x4002 /* has ee_cck_ofdm_gain_delta (eeprom_init) */ 6062306a36Sopenharmony_ci#define AR5K_EEPROM_VERSION_4_3 0x4003 /* power calibration changes */ 6162306a36Sopenharmony_ci#define AR5K_EEPROM_VERSION_4_4 0x4004 6262306a36Sopenharmony_ci#define AR5K_EEPROM_VERSION_4_5 0x4005 6362306a36Sopenharmony_ci#define AR5K_EEPROM_VERSION_4_6 0x4006 /* has ee_scaled_cck_delta */ 6462306a36Sopenharmony_ci#define AR5K_EEPROM_VERSION_4_7 0x3007 /* 4007 ? */ 6562306a36Sopenharmony_ci#define AR5K_EEPROM_VERSION_4_9 0x4009 /* EAR futureproofing */ 6662306a36Sopenharmony_ci#define AR5K_EEPROM_VERSION_5_0 0x5000 /* Has 2413 PDADC calibration etc */ 6762306a36Sopenharmony_ci#define AR5K_EEPROM_VERSION_5_1 0x5001 /* Has capability values */ 6862306a36Sopenharmony_ci#define AR5K_EEPROM_VERSION_5_3 0x5003 /* Has spur mitigation tables */ 6962306a36Sopenharmony_ci 7062306a36Sopenharmony_ci#define AR5K_EEPROM_MODE_11A 0 7162306a36Sopenharmony_ci#define AR5K_EEPROM_MODE_11B 1 7262306a36Sopenharmony_ci#define AR5K_EEPROM_MODE_11G 2 7362306a36Sopenharmony_ci 7462306a36Sopenharmony_ci#define AR5K_EEPROM_HDR AR5K_EEPROM_INFO(2) /* Header that contains the device caps */ 7562306a36Sopenharmony_ci#define AR5K_EEPROM_HDR_11A(_v) (((_v) >> AR5K_EEPROM_MODE_11A) & 0x1) 7662306a36Sopenharmony_ci#define AR5K_EEPROM_HDR_11B(_v) (((_v) >> AR5K_EEPROM_MODE_11B) & 0x1) 7762306a36Sopenharmony_ci#define AR5K_EEPROM_HDR_11G(_v) (((_v) >> AR5K_EEPROM_MODE_11G) & 0x1) 7862306a36Sopenharmony_ci#define AR5K_EEPROM_HDR_T_2GHZ_DIS(_v) (((_v) >> 3) & 0x1) /* Disable turbo for 2GHz */ 7962306a36Sopenharmony_ci#define AR5K_EEPROM_HDR_T_5GHZ_DBM(_v) (((_v) >> 4) & 0x7f) /* Max turbo power for < 2W power consumption */ 8062306a36Sopenharmony_ci#define AR5K_EEPROM_HDR_DEVICE(_v) (((_v) >> 11) & 0x7) /* Device type (1 Cardbus, 2 PCI, 3 MiniPCI, 4 AP) */ 8162306a36Sopenharmony_ci#define AR5K_EEPROM_HDR_RFKILL(_v) (((_v) >> 14) & 0x1) /* Device has RFKill support */ 8262306a36Sopenharmony_ci#define AR5K_EEPROM_HDR_T_5GHZ_DIS(_v) (((_v) >> 15) & 0x1) /* Disable turbo for 5GHz */ 8362306a36Sopenharmony_ci 8462306a36Sopenharmony_ci/* Newer EEPROMs are using a different offset */ 8562306a36Sopenharmony_ci#define AR5K_EEPROM_OFF(_v, _v3_0, _v3_3) \ 8662306a36Sopenharmony_ci (((_v) >= AR5K_EEPROM_VERSION_3_3) ? _v3_3 : _v3_0) 8762306a36Sopenharmony_ci 8862306a36Sopenharmony_ci#define AR5K_EEPROM_ANT_GAIN(_v) AR5K_EEPROM_OFF(_v, 0x00c4, 0x00c3) 8962306a36Sopenharmony_ci#define AR5K_EEPROM_ANT_GAIN_5GHZ(_v) ((s8)(((_v) >> 8) & 0xff)) 9062306a36Sopenharmony_ci#define AR5K_EEPROM_ANT_GAIN_2GHZ(_v) ((s8)((_v) & 0xff)) 9162306a36Sopenharmony_ci 9262306a36Sopenharmony_ci/* Misc values available since EEPROM 4.0 */ 9362306a36Sopenharmony_ci#define AR5K_EEPROM_MISC0 AR5K_EEPROM_INFO(4) 9462306a36Sopenharmony_ci#define AR5K_EEPROM_EARSTART(_v) ((_v) & 0xfff) 9562306a36Sopenharmony_ci#define AR5K_EEPROM_HDR_XR2_DIS(_v) (((_v) >> 12) & 0x1) 9662306a36Sopenharmony_ci#define AR5K_EEPROM_HDR_XR5_DIS(_v) (((_v) >> 13) & 0x1) 9762306a36Sopenharmony_ci#define AR5K_EEPROM_EEMAP(_v) (((_v) >> 14) & 0x3) 9862306a36Sopenharmony_ci 9962306a36Sopenharmony_ci#define AR5K_EEPROM_MISC1 AR5K_EEPROM_INFO(5) 10062306a36Sopenharmony_ci#define AR5K_EEPROM_TARGET_PWRSTART(_v) ((_v) & 0xfff) 10162306a36Sopenharmony_ci#define AR5K_EEPROM_HAS32KHZCRYSTAL(_v) (((_v) >> 14) & 0x1) /* has 32KHz crystal for sleep mode */ 10262306a36Sopenharmony_ci#define AR5K_EEPROM_HAS32KHZCRYSTAL_OLD(_v) (((_v) >> 15) & 0x1) 10362306a36Sopenharmony_ci 10462306a36Sopenharmony_ci#define AR5K_EEPROM_MISC2 AR5K_EEPROM_INFO(6) 10562306a36Sopenharmony_ci#define AR5K_EEPROM_EEP_FILE_VERSION(_v) (((_v) >> 8) & 0xff) 10662306a36Sopenharmony_ci#define AR5K_EEPROM_EAR_FILE_VERSION(_v) ((_v) & 0xff) 10762306a36Sopenharmony_ci 10862306a36Sopenharmony_ci#define AR5K_EEPROM_MISC3 AR5K_EEPROM_INFO(7) 10962306a36Sopenharmony_ci#define AR5K_EEPROM_ART_BUILD_NUM(_v) (((_v) >> 10) & 0x3f) 11062306a36Sopenharmony_ci#define AR5K_EEPROM_EAR_FILE_ID(_v) ((_v) & 0xff) 11162306a36Sopenharmony_ci 11262306a36Sopenharmony_ci#define AR5K_EEPROM_MISC4 AR5K_EEPROM_INFO(8) 11362306a36Sopenharmony_ci#define AR5K_EEPROM_CAL_DATA_START(_v) (((_v) >> 4) & 0xfff) 11462306a36Sopenharmony_ci#define AR5K_EEPROM_MASK_R0(_v) (((_v) >> 2) & 0x3) /* modes supported by radio 0 (bit 1: G, bit 2: A) */ 11562306a36Sopenharmony_ci#define AR5K_EEPROM_MASK_R1(_v) ((_v) & 0x3) /* modes supported by radio 1 (bit 1: G, bit 2: A) */ 11662306a36Sopenharmony_ci 11762306a36Sopenharmony_ci#define AR5K_EEPROM_MISC5 AR5K_EEPROM_INFO(9) 11862306a36Sopenharmony_ci#define AR5K_EEPROM_COMP_DIS(_v) ((_v) & 0x1) /* disable compression */ 11962306a36Sopenharmony_ci#define AR5K_EEPROM_AES_DIS(_v) (((_v) >> 1) & 0x1) /* disable AES */ 12062306a36Sopenharmony_ci#define AR5K_EEPROM_FF_DIS(_v) (((_v) >> 2) & 0x1) /* disable fast frames */ 12162306a36Sopenharmony_ci#define AR5K_EEPROM_BURST_DIS(_v) (((_v) >> 3) & 0x1) /* disable bursting */ 12262306a36Sopenharmony_ci#define AR5K_EEPROM_MAX_QCU(_v) (((_v) >> 4) & 0xf) /* max number of QCUs. defaults to 10 */ 12362306a36Sopenharmony_ci#define AR5K_EEPROM_HEAVY_CLIP_EN(_v) (((_v) >> 8) & 0x1) /* enable heavy clipping */ 12462306a36Sopenharmony_ci#define AR5K_EEPROM_KEY_CACHE_SIZE(_v) (((_v) >> 12) & 0xf) /* key cache size. defaults to 128 */ 12562306a36Sopenharmony_ci 12662306a36Sopenharmony_ci#define AR5K_EEPROM_MISC6 AR5K_EEPROM_INFO(10) 12762306a36Sopenharmony_ci#define AR5K_EEPROM_TX_CHAIN_DIS ((_v) & 0x7) /* MIMO chains disabled for TX bitmask */ 12862306a36Sopenharmony_ci#define AR5K_EEPROM_RX_CHAIN_DIS (((_v) >> 3) & 0x7) /* MIMO chains disabled for RX bitmask */ 12962306a36Sopenharmony_ci#define AR5K_EEPROM_FCC_MID_EN (((_v) >> 6) & 0x1) /* 5.47-5.7GHz supported */ 13062306a36Sopenharmony_ci#define AR5K_EEPROM_JAP_U1EVEN_EN (((_v) >> 7) & 0x1) /* Japan UNII1 band (5.15-5.25GHz) on even channels (5180, 5200, 5220, 5240) supported */ 13162306a36Sopenharmony_ci#define AR5K_EEPROM_JAP_U2_EN (((_v) >> 8) & 0x1) /* Japan UNII2 band (5.25-5.35GHz) supported */ 13262306a36Sopenharmony_ci#define AR5K_EEPROM_JAP_MID_EN (((_v) >> 9) & 0x1) /* Japan band from 5.47-5.7GHz supported */ 13362306a36Sopenharmony_ci#define AR5K_EEPROM_JAP_U1ODD_EN (((_v) >> 10) & 0x1) /* Japan UNII2 band (5.15-5.25GHz) on odd channels (5170, 5190, 5210, 5230) supported */ 13462306a36Sopenharmony_ci#define AR5K_EEPROM_JAP_11A_NEW_EN (((_v) >> 11) & 0x1) /* Japan A mode enabled (using even channels) */ 13562306a36Sopenharmony_ci 13662306a36Sopenharmony_ci/* calibration settings */ 13762306a36Sopenharmony_ci#define AR5K_EEPROM_MODES_11A(_v) AR5K_EEPROM_OFF(_v, 0x00c5, 0x00d4) 13862306a36Sopenharmony_ci#define AR5K_EEPROM_MODES_11B(_v) AR5K_EEPROM_OFF(_v, 0x00d0, 0x00f2) 13962306a36Sopenharmony_ci#define AR5K_EEPROM_MODES_11G(_v) AR5K_EEPROM_OFF(_v, 0x00da, 0x010d) 14062306a36Sopenharmony_ci#define AR5K_EEPROM_CTL(_v) AR5K_EEPROM_OFF(_v, 0x00e4, 0x0128) /* Conformance test limits */ 14162306a36Sopenharmony_ci#define AR5K_EEPROM_GROUPS_START(_v) AR5K_EEPROM_OFF(_v, 0x0100, 0x0150) /* Start of Groups */ 14262306a36Sopenharmony_ci#define AR5K_EEPROM_GROUP1_OFFSET 0x0 14362306a36Sopenharmony_ci#define AR5K_EEPROM_GROUP2_OFFSET 0x5 14462306a36Sopenharmony_ci#define AR5K_EEPROM_GROUP3_OFFSET 0x37 14562306a36Sopenharmony_ci#define AR5K_EEPROM_GROUP4_OFFSET 0x46 14662306a36Sopenharmony_ci#define AR5K_EEPROM_GROUP5_OFFSET 0x55 14762306a36Sopenharmony_ci#define AR5K_EEPROM_GROUP6_OFFSET 0x65 14862306a36Sopenharmony_ci#define AR5K_EEPROM_GROUP7_OFFSET 0x69 14962306a36Sopenharmony_ci#define AR5K_EEPROM_GROUP8_OFFSET 0x6f 15062306a36Sopenharmony_ci 15162306a36Sopenharmony_ci#define AR5K_EEPROM_TARGET_PWR_OFF_11A(_v) AR5K_EEPROM_OFF(_v, AR5K_EEPROM_GROUPS_START(_v) + \ 15262306a36Sopenharmony_ci AR5K_EEPROM_GROUP5_OFFSET, 0x0000) 15362306a36Sopenharmony_ci#define AR5K_EEPROM_TARGET_PWR_OFF_11B(_v) AR5K_EEPROM_OFF(_v, AR5K_EEPROM_GROUPS_START(_v) + \ 15462306a36Sopenharmony_ci AR5K_EEPROM_GROUP6_OFFSET, 0x0010) 15562306a36Sopenharmony_ci#define AR5K_EEPROM_TARGET_PWR_OFF_11G(_v) AR5K_EEPROM_OFF(_v, AR5K_EEPROM_GROUPS_START(_v) + \ 15662306a36Sopenharmony_ci AR5K_EEPROM_GROUP7_OFFSET, 0x0014) 15762306a36Sopenharmony_ci 15862306a36Sopenharmony_ci/* [3.1 - 3.3] */ 15962306a36Sopenharmony_ci#define AR5K_EEPROM_OBDB0_2GHZ 0x00ec 16062306a36Sopenharmony_ci#define AR5K_EEPROM_OBDB1_2GHZ 0x00ed 16162306a36Sopenharmony_ci 16262306a36Sopenharmony_ci#define AR5K_EEPROM_PROTECT 0x003f /* EEPROM protect status */ 16362306a36Sopenharmony_ci#define AR5K_EEPROM_PROTECT_RD_0_31 0x0001 /* Read protection bit for offsets 0x0 - 0x1f */ 16462306a36Sopenharmony_ci#define AR5K_EEPROM_PROTECT_WR_0_31 0x0002 /* Write protection bit for offsets 0x0 - 0x1f */ 16562306a36Sopenharmony_ci#define AR5K_EEPROM_PROTECT_RD_32_63 0x0004 /* 0x20 - 0x3f */ 16662306a36Sopenharmony_ci#define AR5K_EEPROM_PROTECT_WR_32_63 0x0008 16762306a36Sopenharmony_ci#define AR5K_EEPROM_PROTECT_RD_64_127 0x0010 /* 0x40 - 0x7f */ 16862306a36Sopenharmony_ci#define AR5K_EEPROM_PROTECT_WR_64_127 0x0020 16962306a36Sopenharmony_ci#define AR5K_EEPROM_PROTECT_RD_128_191 0x0040 /* 0x80 - 0xbf (regdom) */ 17062306a36Sopenharmony_ci#define AR5K_EEPROM_PROTECT_WR_128_191 0x0080 17162306a36Sopenharmony_ci#define AR5K_EEPROM_PROTECT_RD_192_207 0x0100 /* 0xc0 - 0xcf */ 17262306a36Sopenharmony_ci#define AR5K_EEPROM_PROTECT_WR_192_207 0x0200 17362306a36Sopenharmony_ci#define AR5K_EEPROM_PROTECT_RD_208_223 0x0400 /* 0xd0 - 0xdf */ 17462306a36Sopenharmony_ci#define AR5K_EEPROM_PROTECT_WR_208_223 0x0800 17562306a36Sopenharmony_ci#define AR5K_EEPROM_PROTECT_RD_224_239 0x1000 /* 0xe0 - 0xef */ 17662306a36Sopenharmony_ci#define AR5K_EEPROM_PROTECT_WR_224_239 0x2000 17762306a36Sopenharmony_ci#define AR5K_EEPROM_PROTECT_RD_240_255 0x4000 /* 0xf0 - 0xff */ 17862306a36Sopenharmony_ci#define AR5K_EEPROM_PROTECT_WR_240_255 0x8000 17962306a36Sopenharmony_ci 18062306a36Sopenharmony_ci/* Some EEPROM defines */ 18162306a36Sopenharmony_ci#define AR5K_EEPROM_EEP_SCALE 100 18262306a36Sopenharmony_ci#define AR5K_EEPROM_EEP_DELTA 10 18362306a36Sopenharmony_ci#define AR5K_EEPROM_N_MODES 3 18462306a36Sopenharmony_ci#define AR5K_EEPROM_N_5GHZ_CHAN 10 18562306a36Sopenharmony_ci#define AR5K_EEPROM_N_5GHZ_RATE_CHAN 8 18662306a36Sopenharmony_ci#define AR5K_EEPROM_N_2GHZ_CHAN 3 18762306a36Sopenharmony_ci#define AR5K_EEPROM_N_2GHZ_CHAN_2413 4 18862306a36Sopenharmony_ci#define AR5K_EEPROM_N_2GHZ_CHAN_MAX 4 18962306a36Sopenharmony_ci#define AR5K_EEPROM_MAX_CHAN 10 19062306a36Sopenharmony_ci#define AR5K_EEPROM_N_PWR_POINTS_5111 11 19162306a36Sopenharmony_ci#define AR5K_EEPROM_N_PCDAC 11 19262306a36Sopenharmony_ci#define AR5K_EEPROM_N_PHASE_CAL 5 19362306a36Sopenharmony_ci#define AR5K_EEPROM_N_TEST_FREQ 8 19462306a36Sopenharmony_ci#define AR5K_EEPROM_N_EDGES 8 19562306a36Sopenharmony_ci#define AR5K_EEPROM_N_INTERCEPTS 11 19662306a36Sopenharmony_ci#define AR5K_EEPROM_FREQ_M(_v) AR5K_EEPROM_OFF(_v, 0x7f, 0xff) 19762306a36Sopenharmony_ci#define AR5K_EEPROM_PCDAC_M 0x3f 19862306a36Sopenharmony_ci#define AR5K_EEPROM_PCDAC_START 1 19962306a36Sopenharmony_ci#define AR5K_EEPROM_PCDAC_STOP 63 20062306a36Sopenharmony_ci#define AR5K_EEPROM_PCDAC_STEP 1 20162306a36Sopenharmony_ci#define AR5K_EEPROM_NON_EDGE_M 0x40 20262306a36Sopenharmony_ci#define AR5K_EEPROM_CHANNEL_POWER 8 20362306a36Sopenharmony_ci#define AR5K_EEPROM_N_OBDB 4 20462306a36Sopenharmony_ci#define AR5K_EEPROM_OBDB_DIS 0xffff 20562306a36Sopenharmony_ci#define AR5K_EEPROM_CHANNEL_DIS 0xff 20662306a36Sopenharmony_ci#define AR5K_EEPROM_SCALE_OC_DELTA(_x) (((_x) * 2) / 10) 20762306a36Sopenharmony_ci#define AR5K_EEPROM_N_CTLS(_v) AR5K_EEPROM_OFF(_v, 16, 32) 20862306a36Sopenharmony_ci#define AR5K_EEPROM_MAX_CTLS 32 20962306a36Sopenharmony_ci#define AR5K_EEPROM_N_PD_CURVES 4 21062306a36Sopenharmony_ci#define AR5K_EEPROM_N_XPD0_POINTS 4 21162306a36Sopenharmony_ci#define AR5K_EEPROM_N_XPD3_POINTS 3 21262306a36Sopenharmony_ci#define AR5K_EEPROM_N_PD_GAINS 4 21362306a36Sopenharmony_ci#define AR5K_EEPROM_N_PD_POINTS 5 21462306a36Sopenharmony_ci#define AR5K_EEPROM_N_INTERCEPT_10_2GHZ 35 21562306a36Sopenharmony_ci#define AR5K_EEPROM_N_INTERCEPT_10_5GHZ 55 21662306a36Sopenharmony_ci#define AR5K_EEPROM_POWER_M 0x3f 21762306a36Sopenharmony_ci#define AR5K_EEPROM_POWER_MIN 0 21862306a36Sopenharmony_ci#define AR5K_EEPROM_POWER_MAX 3150 21962306a36Sopenharmony_ci#define AR5K_EEPROM_POWER_STEP 50 22062306a36Sopenharmony_ci#define AR5K_EEPROM_POWER_TABLE_SIZE 64 22162306a36Sopenharmony_ci#define AR5K_EEPROM_N_POWER_LOC_11B 4 22262306a36Sopenharmony_ci#define AR5K_EEPROM_N_POWER_LOC_11G 6 22362306a36Sopenharmony_ci#define AR5K_EEPROM_I_GAIN 10 22462306a36Sopenharmony_ci#define AR5K_EEPROM_CCK_OFDM_DELTA 15 22562306a36Sopenharmony_ci#define AR5K_EEPROM_N_IQ_CAL 2 22662306a36Sopenharmony_ci/* 5GHz/2GHz */ 22762306a36Sopenharmony_cienum ath5k_eeprom_freq_bands { 22862306a36Sopenharmony_ci AR5K_EEPROM_BAND_5GHZ = 0, 22962306a36Sopenharmony_ci AR5K_EEPROM_BAND_2GHZ = 1, 23062306a36Sopenharmony_ci AR5K_EEPROM_N_FREQ_BANDS, 23162306a36Sopenharmony_ci}; 23262306a36Sopenharmony_ci/* Spur chans per freq band */ 23362306a36Sopenharmony_ci#define AR5K_EEPROM_N_SPUR_CHANS 5 23462306a36Sopenharmony_ci/* fbin value for chan 2464 x2 */ 23562306a36Sopenharmony_ci#define AR5K_EEPROM_5413_SPUR_CHAN_1 1640 23662306a36Sopenharmony_ci/* fbin value for chan 2420 x2 */ 23762306a36Sopenharmony_ci#define AR5K_EEPROM_5413_SPUR_CHAN_2 1200 23862306a36Sopenharmony_ci#define AR5K_EEPROM_SPUR_CHAN_MASK 0x3FFF 23962306a36Sopenharmony_ci#define AR5K_EEPROM_NO_SPUR 0x8000 24062306a36Sopenharmony_ci#define AR5K_SPUR_CHAN_WIDTH 87 24162306a36Sopenharmony_ci#define AR5K_SPUR_SYMBOL_WIDTH_BASE_100Hz 3125 24262306a36Sopenharmony_ci#define AR5K_SPUR_SYMBOL_WIDTH_TURBO_100Hz 6250 24362306a36Sopenharmony_ci 24462306a36Sopenharmony_ci#define AR5K_EEPROM_READ(_o, _v) do { \ 24562306a36Sopenharmony_ci if (!ath5k_hw_nvram_read(ah, (_o), &(_v))) \ 24662306a36Sopenharmony_ci return -EIO; \ 24762306a36Sopenharmony_ci} while (0) 24862306a36Sopenharmony_ci 24962306a36Sopenharmony_ci#define AR5K_EEPROM_READ_HDR(_o, _v) \ 25062306a36Sopenharmony_ci AR5K_EEPROM_READ(_o, ah->ah_capabilities.cap_eeprom._v); \ 25162306a36Sopenharmony_ci 25262306a36Sopenharmony_cienum ath5k_ant_table { 25362306a36Sopenharmony_ci AR5K_ANT_CTL = 0, /* Idle switch table settings */ 25462306a36Sopenharmony_ci AR5K_ANT_SWTABLE_A = 1, /* Switch table for antenna A */ 25562306a36Sopenharmony_ci AR5K_ANT_SWTABLE_B = 2, /* Switch table for antenna B */ 25662306a36Sopenharmony_ci AR5K_ANT_MAX, 25762306a36Sopenharmony_ci}; 25862306a36Sopenharmony_ci 25962306a36Sopenharmony_cienum ath5k_ctl_mode { 26062306a36Sopenharmony_ci AR5K_CTL_11A = 0, 26162306a36Sopenharmony_ci AR5K_CTL_11B = 1, 26262306a36Sopenharmony_ci AR5K_CTL_11G = 2, 26362306a36Sopenharmony_ci AR5K_CTL_TURBO = 3, 26462306a36Sopenharmony_ci AR5K_CTL_TURBOG = 4, 26562306a36Sopenharmony_ci AR5K_CTL_2GHT20 = 5, 26662306a36Sopenharmony_ci AR5K_CTL_5GHT20 = 6, 26762306a36Sopenharmony_ci AR5K_CTL_2GHT40 = 7, 26862306a36Sopenharmony_ci AR5K_CTL_5GHT40 = 8, 26962306a36Sopenharmony_ci AR5K_CTL_MODE_M = 15, 27062306a36Sopenharmony_ci}; 27162306a36Sopenharmony_ci 27262306a36Sopenharmony_ci/* Per channel calibration data, used for power table setup */ 27362306a36Sopenharmony_cistruct ath5k_chan_pcal_info_rf5111 { 27462306a36Sopenharmony_ci /* Power levels in half dBm units 27562306a36Sopenharmony_ci * for one power curve. */ 27662306a36Sopenharmony_ci u8 pwr[AR5K_EEPROM_N_PWR_POINTS_5111]; 27762306a36Sopenharmony_ci /* PCDAC table steps 27862306a36Sopenharmony_ci * for the above values */ 27962306a36Sopenharmony_ci u8 pcdac[AR5K_EEPROM_N_PWR_POINTS_5111]; 28062306a36Sopenharmony_ci /* Starting PCDAC step */ 28162306a36Sopenharmony_ci u8 pcdac_min; 28262306a36Sopenharmony_ci /* Final PCDAC step */ 28362306a36Sopenharmony_ci u8 pcdac_max; 28462306a36Sopenharmony_ci}; 28562306a36Sopenharmony_ci 28662306a36Sopenharmony_cistruct ath5k_chan_pcal_info_rf5112 { 28762306a36Sopenharmony_ci /* Power levels in quarter dBm units 28862306a36Sopenharmony_ci * for lower (0) and higher (3) 28962306a36Sopenharmony_ci * level curves in 0.25dB units */ 29062306a36Sopenharmony_ci s8 pwr_x0[AR5K_EEPROM_N_XPD0_POINTS]; 29162306a36Sopenharmony_ci s8 pwr_x3[AR5K_EEPROM_N_XPD3_POINTS]; 29262306a36Sopenharmony_ci /* PCDAC table steps 29362306a36Sopenharmony_ci * for the above values */ 29462306a36Sopenharmony_ci u8 pcdac_x0[AR5K_EEPROM_N_XPD0_POINTS]; 29562306a36Sopenharmony_ci u8 pcdac_x3[AR5K_EEPROM_N_XPD3_POINTS]; 29662306a36Sopenharmony_ci}; 29762306a36Sopenharmony_ci 29862306a36Sopenharmony_cistruct ath5k_chan_pcal_info_rf2413 { 29962306a36Sopenharmony_ci /* Starting pwr/pddac values */ 30062306a36Sopenharmony_ci s8 pwr_i[AR5K_EEPROM_N_PD_GAINS]; 30162306a36Sopenharmony_ci u8 pddac_i[AR5K_EEPROM_N_PD_GAINS]; 30262306a36Sopenharmony_ci /* (pwr,pddac) points 30362306a36Sopenharmony_ci * power levels in 0.5dB units */ 30462306a36Sopenharmony_ci s8 pwr[AR5K_EEPROM_N_PD_GAINS] 30562306a36Sopenharmony_ci [AR5K_EEPROM_N_PD_POINTS]; 30662306a36Sopenharmony_ci u8 pddac[AR5K_EEPROM_N_PD_GAINS] 30762306a36Sopenharmony_ci [AR5K_EEPROM_N_PD_POINTS]; 30862306a36Sopenharmony_ci}; 30962306a36Sopenharmony_ci 31062306a36Sopenharmony_cienum ath5k_powertable_type { 31162306a36Sopenharmony_ci AR5K_PWRTABLE_PWR_TO_PCDAC = 0, 31262306a36Sopenharmony_ci AR5K_PWRTABLE_LINEAR_PCDAC = 1, 31362306a36Sopenharmony_ci AR5K_PWRTABLE_PWR_TO_PDADC = 2, 31462306a36Sopenharmony_ci}; 31562306a36Sopenharmony_ci 31662306a36Sopenharmony_cistruct ath5k_pdgain_info { 31762306a36Sopenharmony_ci u8 pd_points; 31862306a36Sopenharmony_ci u8 *pd_step; 31962306a36Sopenharmony_ci /* Power values are in 32062306a36Sopenharmony_ci * 0.25dB units */ 32162306a36Sopenharmony_ci s16 *pd_pwr; 32262306a36Sopenharmony_ci}; 32362306a36Sopenharmony_ci 32462306a36Sopenharmony_cistruct ath5k_chan_pcal_info { 32562306a36Sopenharmony_ci /* Frequency */ 32662306a36Sopenharmony_ci u16 freq; 32762306a36Sopenharmony_ci /* Tx power boundaries */ 32862306a36Sopenharmony_ci s16 max_pwr; 32962306a36Sopenharmony_ci s16 min_pwr; 33062306a36Sopenharmony_ci union { 33162306a36Sopenharmony_ci struct ath5k_chan_pcal_info_rf5111 rf5111_info; 33262306a36Sopenharmony_ci struct ath5k_chan_pcal_info_rf5112 rf5112_info; 33362306a36Sopenharmony_ci struct ath5k_chan_pcal_info_rf2413 rf2413_info; 33462306a36Sopenharmony_ci }; 33562306a36Sopenharmony_ci /* Raw values used by phy code 33662306a36Sopenharmony_ci * Curves are stored in order from lower 33762306a36Sopenharmony_ci * gain to higher gain (max txpower -> min txpower) */ 33862306a36Sopenharmony_ci struct ath5k_pdgain_info *pd_curves; 33962306a36Sopenharmony_ci}; 34062306a36Sopenharmony_ci 34162306a36Sopenharmony_ci/* Per rate calibration data for each mode, 34262306a36Sopenharmony_ci * used for rate power table setup. 34362306a36Sopenharmony_ci * Note: Values in 0.5dB units */ 34462306a36Sopenharmony_cistruct ath5k_rate_pcal_info { 34562306a36Sopenharmony_ci u16 freq; /* Frequency */ 34662306a36Sopenharmony_ci /* Power level for 6-24Mbit/s rates or 34762306a36Sopenharmony_ci * 1Mb rate */ 34862306a36Sopenharmony_ci u16 target_power_6to24; 34962306a36Sopenharmony_ci /* Power level for 36Mbit rate or 35062306a36Sopenharmony_ci * 2Mb rate */ 35162306a36Sopenharmony_ci u16 target_power_36; 35262306a36Sopenharmony_ci /* Power level for 48Mbit rate or 35362306a36Sopenharmony_ci * 5.5Mbit rate */ 35462306a36Sopenharmony_ci u16 target_power_48; 35562306a36Sopenharmony_ci /* Power level for 54Mbit rate or 35662306a36Sopenharmony_ci * 11Mbit rate */ 35762306a36Sopenharmony_ci u16 target_power_54; 35862306a36Sopenharmony_ci}; 35962306a36Sopenharmony_ci 36062306a36Sopenharmony_ci/* Power edges for conformance test limits */ 36162306a36Sopenharmony_cistruct ath5k_edge_power { 36262306a36Sopenharmony_ci u16 freq; 36362306a36Sopenharmony_ci u16 edge; /* in half dBm */ 36462306a36Sopenharmony_ci bool flag; 36562306a36Sopenharmony_ci}; 36662306a36Sopenharmony_ci 36762306a36Sopenharmony_ci/** 36862306a36Sopenharmony_ci * struct ath5k_eeprom_info - EEPROM calibration data 36962306a36Sopenharmony_ci * 37062306a36Sopenharmony_ci * @ee_regdomain: ath/regd.c takes care of COUNTRY_ERD and WORLDWIDE_ROAMING 37162306a36Sopenharmony_ci * flags 37262306a36Sopenharmony_ci * @ee_ant_gain: Antenna gain in 0.5dB steps signed [5211 only?] 37362306a36Sopenharmony_ci * @ee_cck_ofdm_gain_delta: difference in gainF to output the same power for 37462306a36Sopenharmony_ci * OFDM and CCK packets 37562306a36Sopenharmony_ci * @ee_cck_ofdm_power_delta: power difference between OFDM (6Mbps) and CCK 37662306a36Sopenharmony_ci * (11Mbps) rate in G mode. 0.1dB steps 37762306a36Sopenharmony_ci * @ee_scaled_cck_delta: for Japan Channel 14: 0.1dB resolution 37862306a36Sopenharmony_ci * 37962306a36Sopenharmony_ci * @ee_i_cal: Initial I coefficient to correct I/Q mismatch in the receive path 38062306a36Sopenharmony_ci * @ee_q_cal: Initial Q coefficient to correct I/Q mismatch in the receive path 38162306a36Sopenharmony_ci * @ee_fixed_bias: use ee_ob and ee_db settings or use automatic control 38262306a36Sopenharmony_ci * @ee_switch_settling: RX/TX Switch settling time 38362306a36Sopenharmony_ci * @ee_atn_tx_rx: Difference in attenuation between TX and RX in 1dB steps 38462306a36Sopenharmony_ci * @ee_ant_control: Antenna Control Settings 38562306a36Sopenharmony_ci * @ee_ob: Bias current for Output stage of PA 38662306a36Sopenharmony_ci * B/G mode: Index [0] is used for AR2112/5112, otherwise [1] 38762306a36Sopenharmony_ci * A mode: [0] 5.15-5.25 [1] 5.25-5.50 [2] 5.50-5.70 [3] 5.70-5.85 GHz 38862306a36Sopenharmony_ci * @ee_db: Bias current for Output stage of PA. see @ee_ob 38962306a36Sopenharmony_ci * @ee_tx_end2xlna_enable: Time difference from when BB finishes sending a frame 39062306a36Sopenharmony_ci * to when the external LNA is activated 39162306a36Sopenharmony_ci * @ee_tx_end2xpa_disable: Time difference from when BB finishes sending a frame 39262306a36Sopenharmony_ci * to when the external PA switch is deactivated 39362306a36Sopenharmony_ci * @ee_tx_frm2xpa_enable: Time difference from when MAC sends frame to when 39462306a36Sopenharmony_ci * external PA switch is activated 39562306a36Sopenharmony_ci * @ee_thr_62: Clear Channel Assessment (CCA) sensitivity 39662306a36Sopenharmony_ci * (IEEE802.11a section 17.3.10.5 ) 39762306a36Sopenharmony_ci * @ee_xlna_gain: Total gain of the LNA (information only) 39862306a36Sopenharmony_ci * @ee_xpd: Use external (1) or internal power detector 39962306a36Sopenharmony_ci * @ee_x_gain: Gain for external power detector output (differences in EEMAP 40062306a36Sopenharmony_ci * versions!) 40162306a36Sopenharmony_ci * @ee_i_gain: Initial gain value after reset 40262306a36Sopenharmony_ci * @ee_margin_tx_rx: Margin in dB when final attenuation stage should be used 40362306a36Sopenharmony_ci * 40462306a36Sopenharmony_ci * @ee_false_detect: Backoff in Sensitivity (dB) on channels with spur signals 40562306a36Sopenharmony_ci * @ee_noise_floor_thr: Noise floor threshold in 1dB steps 40662306a36Sopenharmony_ci * @ee_adc_desired_size: Desired amplitude for ADC, used by AGC; in 0.5 dB steps 40762306a36Sopenharmony_ci * @ee_pga_desired_size: Desired output of PGA (for BB gain) in 0.5 dB steps 40862306a36Sopenharmony_ci * @ee_pd_gain_overlap: PD ADC curves need to overlap in 0.5dB steps (ee_map>=2) 40962306a36Sopenharmony_ci */ 41062306a36Sopenharmony_cistruct ath5k_eeprom_info { 41162306a36Sopenharmony_ci 41262306a36Sopenharmony_ci /* Header information */ 41362306a36Sopenharmony_ci u16 ee_magic; 41462306a36Sopenharmony_ci u16 ee_protect; 41562306a36Sopenharmony_ci u16 ee_regdomain; 41662306a36Sopenharmony_ci u16 ee_version; 41762306a36Sopenharmony_ci u16 ee_header; 41862306a36Sopenharmony_ci u16 ee_ant_gain; 41962306a36Sopenharmony_ci u8 ee_rfkill_pin; 42062306a36Sopenharmony_ci bool ee_rfkill_pol; 42162306a36Sopenharmony_ci bool ee_is_hb63; 42262306a36Sopenharmony_ci bool ee_serdes; 42362306a36Sopenharmony_ci u16 ee_misc0; 42462306a36Sopenharmony_ci u16 ee_misc1; 42562306a36Sopenharmony_ci u16 ee_misc2; 42662306a36Sopenharmony_ci u16 ee_misc3; 42762306a36Sopenharmony_ci u16 ee_misc4; 42862306a36Sopenharmony_ci u16 ee_misc5; 42962306a36Sopenharmony_ci u16 ee_misc6; 43062306a36Sopenharmony_ci u16 ee_cck_ofdm_gain_delta; 43162306a36Sopenharmony_ci u16 ee_cck_ofdm_power_delta; 43262306a36Sopenharmony_ci u16 ee_scaled_cck_delta; 43362306a36Sopenharmony_ci 43462306a36Sopenharmony_ci /* RF Calibration settings (reset, rfregs) */ 43562306a36Sopenharmony_ci u16 ee_i_cal[AR5K_EEPROM_N_MODES]; 43662306a36Sopenharmony_ci u16 ee_q_cal[AR5K_EEPROM_N_MODES]; 43762306a36Sopenharmony_ci u16 ee_fixed_bias[AR5K_EEPROM_N_MODES]; 43862306a36Sopenharmony_ci u16 ee_turbo_max_power[AR5K_EEPROM_N_MODES]; 43962306a36Sopenharmony_ci u16 ee_xr_power[AR5K_EEPROM_N_MODES]; 44062306a36Sopenharmony_ci u16 ee_switch_settling[AR5K_EEPROM_N_MODES]; 44162306a36Sopenharmony_ci u16 ee_atn_tx_rx[AR5K_EEPROM_N_MODES]; 44262306a36Sopenharmony_ci u16 ee_ant_control[AR5K_EEPROM_N_MODES][AR5K_EEPROM_N_PCDAC]; 44362306a36Sopenharmony_ci u16 ee_ob[AR5K_EEPROM_N_MODES][AR5K_EEPROM_N_OBDB]; 44462306a36Sopenharmony_ci u16 ee_db[AR5K_EEPROM_N_MODES][AR5K_EEPROM_N_OBDB]; 44562306a36Sopenharmony_ci u16 ee_tx_end2xlna_enable[AR5K_EEPROM_N_MODES]; 44662306a36Sopenharmony_ci u16 ee_tx_end2xpa_disable[AR5K_EEPROM_N_MODES]; 44762306a36Sopenharmony_ci u16 ee_tx_frm2xpa_enable[AR5K_EEPROM_N_MODES]; 44862306a36Sopenharmony_ci u16 ee_thr_62[AR5K_EEPROM_N_MODES]; 44962306a36Sopenharmony_ci u16 ee_xlna_gain[AR5K_EEPROM_N_MODES]; 45062306a36Sopenharmony_ci u16 ee_xpd[AR5K_EEPROM_N_MODES]; 45162306a36Sopenharmony_ci u16 ee_x_gain[AR5K_EEPROM_N_MODES]; 45262306a36Sopenharmony_ci u16 ee_i_gain[AR5K_EEPROM_N_MODES]; 45362306a36Sopenharmony_ci u16 ee_margin_tx_rx[AR5K_EEPROM_N_MODES]; 45462306a36Sopenharmony_ci u16 ee_switch_settling_turbo[AR5K_EEPROM_N_MODES]; 45562306a36Sopenharmony_ci u16 ee_margin_tx_rx_turbo[AR5K_EEPROM_N_MODES]; 45662306a36Sopenharmony_ci u16 ee_atn_tx_rx_turbo[AR5K_EEPROM_N_MODES]; 45762306a36Sopenharmony_ci 45862306a36Sopenharmony_ci /* Power calibration data */ 45962306a36Sopenharmony_ci u16 ee_false_detect[AR5K_EEPROM_N_MODES]; 46062306a36Sopenharmony_ci 46162306a36Sopenharmony_ci /* Number of pd gain curves per mode */ 46262306a36Sopenharmony_ci u8 ee_pd_gains[AR5K_EEPROM_N_MODES]; 46362306a36Sopenharmony_ci /* Back mapping pdcurve number -> pdcurve index in pd->pd_curves */ 46462306a36Sopenharmony_ci u8 ee_pdc_to_idx[AR5K_EEPROM_N_MODES][AR5K_EEPROM_N_PD_GAINS]; 46562306a36Sopenharmony_ci 46662306a36Sopenharmony_ci u8 ee_n_piers[AR5K_EEPROM_N_MODES]; 46762306a36Sopenharmony_ci struct ath5k_chan_pcal_info ee_pwr_cal_a[AR5K_EEPROM_N_5GHZ_CHAN]; 46862306a36Sopenharmony_ci struct ath5k_chan_pcal_info ee_pwr_cal_b[AR5K_EEPROM_N_2GHZ_CHAN_MAX]; 46962306a36Sopenharmony_ci struct ath5k_chan_pcal_info ee_pwr_cal_g[AR5K_EEPROM_N_2GHZ_CHAN_MAX]; 47062306a36Sopenharmony_ci 47162306a36Sopenharmony_ci /* Per rate target power levels */ 47262306a36Sopenharmony_ci u8 ee_rate_target_pwr_num[AR5K_EEPROM_N_MODES]; 47362306a36Sopenharmony_ci struct ath5k_rate_pcal_info ee_rate_tpwr_a[AR5K_EEPROM_N_5GHZ_CHAN]; 47462306a36Sopenharmony_ci struct ath5k_rate_pcal_info ee_rate_tpwr_b[AR5K_EEPROM_N_2GHZ_CHAN_MAX]; 47562306a36Sopenharmony_ci struct ath5k_rate_pcal_info ee_rate_tpwr_g[AR5K_EEPROM_N_2GHZ_CHAN_MAX]; 47662306a36Sopenharmony_ci 47762306a36Sopenharmony_ci /* Conformance test limits (Unused) */ 47862306a36Sopenharmony_ci u8 ee_ctls; 47962306a36Sopenharmony_ci u8 ee_ctl[AR5K_EEPROM_MAX_CTLS]; 48062306a36Sopenharmony_ci struct ath5k_edge_power ee_ctl_pwr[AR5K_EEPROM_N_EDGES * AR5K_EEPROM_MAX_CTLS]; 48162306a36Sopenharmony_ci 48262306a36Sopenharmony_ci /* Noise Floor Calibration settings */ 48362306a36Sopenharmony_ci s16 ee_noise_floor_thr[AR5K_EEPROM_N_MODES]; 48462306a36Sopenharmony_ci s8 ee_adc_desired_size[AR5K_EEPROM_N_MODES]; 48562306a36Sopenharmony_ci s8 ee_pga_desired_size[AR5K_EEPROM_N_MODES]; 48662306a36Sopenharmony_ci s8 ee_adc_desired_size_turbo[AR5K_EEPROM_N_MODES]; 48762306a36Sopenharmony_ci s8 ee_pga_desired_size_turbo[AR5K_EEPROM_N_MODES]; 48862306a36Sopenharmony_ci s8 ee_pd_gain_overlap; 48962306a36Sopenharmony_ci 49062306a36Sopenharmony_ci /* Spur mitigation data (fbin values for spur channels) */ 49162306a36Sopenharmony_ci u16 ee_spur_chans[AR5K_EEPROM_N_SPUR_CHANS][AR5K_EEPROM_N_FREQ_BANDS]; 49262306a36Sopenharmony_ci 49362306a36Sopenharmony_ci /* Antenna raw switch tables */ 49462306a36Sopenharmony_ci u32 ee_antenna[AR5K_EEPROM_N_MODES][AR5K_ANT_MAX]; 49562306a36Sopenharmony_ci}; 496