PageRenderTime 116ms CodeModel.GetById 12ms app.highlight 90ms RepoModel.GetById 1ms app.codeStats 1ms

/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c

http://github.com/mirrors/linux
C | 5632 lines | 4677 code | 481 blank | 474 comment | 355 complexity | 28cf6144aaeebaaa42ae4fd940489bd8 MD5 | raw file

Large files files are truncated, but you can click here to view the full file

   1/*
   2 * Copyright (c) 2010-2011 Atheros Communications Inc.
   3 *
   4 * Permission to use, copy, modify, and/or distribute this software for any
   5 * purpose with or without fee is hereby granted, provided that the above
   6 * copyright notice and this permission notice appear in all copies.
   7 *
   8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
   9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  15 */
  16
  17#include <asm/unaligned.h>
  18#include <linux/kernel.h>
  19#include "hw.h"
  20#include "ar9003_phy.h"
  21#include "ar9003_eeprom.h"
  22#include "ar9003_mci.h"
  23
  24#define COMP_HDR_LEN 4
  25#define COMP_CKSUM_LEN 2
  26
  27#define LE16(x) cpu_to_le16(x)
  28#define LE32(x) cpu_to_le32(x)
  29
  30/* Local defines to distinguish between extension and control CTL's */
  31#define EXT_ADDITIVE (0x8000)
  32#define CTL_11A_EXT (CTL_11A | EXT_ADDITIVE)
  33#define CTL_11G_EXT (CTL_11G | EXT_ADDITIVE)
  34#define CTL_11B_EXT (CTL_11B | EXT_ADDITIVE)
  35
  36#define SUB_NUM_CTL_MODES_AT_5G_40 2    /* excluding HT40, EXT-OFDM */
  37#define SUB_NUM_CTL_MODES_AT_2G_40 3    /* excluding HT40, EXT-OFDM, EXT-CCK */
  38
  39#define CTL(_tpower, _flag) ((_tpower) | ((_flag) << 6))
  40
  41#define EEPROM_DATA_LEN_9485	1088
  42
  43static int ar9003_hw_power_interpolate(int32_t x,
  44				       int32_t *px, int32_t *py, u_int16_t np);
  45
  46static const struct ar9300_eeprom ar9300_default = {
  47	.eepromVersion = 2,
  48	.templateVersion = 2,
  49	.macAddr = {0, 2, 3, 4, 5, 6},
  50	.custData = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  51		     0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  52	.baseEepHeader = {
  53		.regDmn = { LE16(0), LE16(0x1f) },
  54		.txrxMask =  0x77, /* 4 bits tx and 4 bits rx */
  55		.opCapFlags = {
  56			.opFlags = AR5416_OPFLAGS_11G | AR5416_OPFLAGS_11A,
  57			.eepMisc = AR9300_EEPMISC_LITTLE_ENDIAN,
  58		},
  59		.rfSilent = 0,
  60		.blueToothOptions = 0,
  61		.deviceCap = 0,
  62		.deviceType = 5, /* takes lower byte in eeprom location */
  63		.pwrTableOffset = AR9300_PWR_TABLE_OFFSET,
  64		.params_for_tuning_caps = {0, 0},
  65		.featureEnable = 0x0c,
  66		 /*
  67		  * bit0 - enable tx temp comp - disabled
  68		  * bit1 - enable tx volt comp - disabled
  69		  * bit2 - enable fastClock - enabled
  70		  * bit3 - enable doubling - enabled
  71		  * bit4 - enable internal regulator - disabled
  72		  * bit5 - enable pa predistortion - disabled
  73		  */
  74		.miscConfiguration = 0, /* bit0 - turn down drivestrength */
  75		.eepromWriteEnableGpio = 3,
  76		.wlanDisableGpio = 0,
  77		.wlanLedGpio = 8,
  78		.rxBandSelectGpio = 0xff,
  79		.txrxgain = 0,
  80		.swreg = 0,
  81	 },
  82	.modalHeader2G = {
  83	/* ar9300_modal_eep_header  2g */
  84		/* 4 idle,t1,t2,b(4 bits per setting) */
  85		.antCtrlCommon = LE32(0x110),
  86		/* 4 ra1l1, ra2l1, ra1l2, ra2l2, ra12 */
  87		.antCtrlCommon2 = LE32(0x22222),
  88
  89		/*
  90		 * antCtrlChain[AR9300_MAX_CHAINS]; 6 idle, t, r,
  91		 * rx1, rx12, b (2 bits each)
  92		 */
  93		.antCtrlChain = { LE16(0x150), LE16(0x150), LE16(0x150) },
  94
  95		/*
  96		 * xatten1DB[AR9300_MAX_CHAINS];  3 xatten1_db
  97		 * for ar9280 (0xa20c/b20c 5:0)
  98		 */
  99		.xatten1DB = {0, 0, 0},
 100
 101		/*
 102		 * xatten1Margin[AR9300_MAX_CHAINS]; 3 xatten1_margin
 103		 * for ar9280 (0xa20c/b20c 16:12
 104		 */
 105		.xatten1Margin = {0, 0, 0},
 106		.tempSlope = 36,
 107		.voltSlope = 0,
 108
 109		/*
 110		 * spurChans[OSPREY_EEPROM_MODAL_SPURS]; spur
 111		 * channels in usual fbin coding format
 112		 */
 113		.spurChans = {0, 0, 0, 0, 0},
 114
 115		/*
 116		 * noiseFloorThreshCh[AR9300_MAX_CHAINS]; 3 Check
 117		 * if the register is per chain
 118		 */
 119		.noiseFloorThreshCh = {-1, 0, 0},
 120		.reserved = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
 121		.quick_drop = 0,
 122		.xpaBiasLvl = 0,
 123		.txFrameToDataStart = 0x0e,
 124		.txFrameToPaOn = 0x0e,
 125		.txClip = 3, /* 4 bits tx_clip, 4 bits dac_scale_cck */
 126		.antennaGain = 0,
 127		.switchSettling = 0x2c,
 128		.adcDesiredSize = -30,
 129		.txEndToXpaOff = 0,
 130		.txEndToRxOn = 0x2,
 131		.txFrameToXpaOn = 0xe,
 132		.thresh62 = 28,
 133		.papdRateMaskHt20 = LE32(0x0cf0e0e0),
 134		.papdRateMaskHt40 = LE32(0x6cf0e0e0),
 135		.switchcomspdt = 0,
 136		.xlna_bias_strength = 0,
 137		.futureModal = {
 138			0, 0, 0, 0, 0, 0, 0,
 139		},
 140	 },
 141	.base_ext1 = {
 142		.ant_div_control = 0,
 143		.future = {0, 0},
 144		.tempslopextension = {0, 0, 0, 0, 0, 0, 0, 0}
 145	},
 146	.calFreqPier2G = {
 147		FREQ2FBIN(2412, 1),
 148		FREQ2FBIN(2437, 1),
 149		FREQ2FBIN(2472, 1),
 150	 },
 151	/* ar9300_cal_data_per_freq_op_loop 2g */
 152	.calPierData2G = {
 153		{ {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0} },
 154		{ {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0} },
 155		{ {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0} },
 156	 },
 157	.calTarget_freqbin_Cck = {
 158		FREQ2FBIN(2412, 1),
 159		FREQ2FBIN(2484, 1),
 160	 },
 161	.calTarget_freqbin_2G = {
 162		FREQ2FBIN(2412, 1),
 163		FREQ2FBIN(2437, 1),
 164		FREQ2FBIN(2472, 1)
 165	 },
 166	.calTarget_freqbin_2GHT20 = {
 167		FREQ2FBIN(2412, 1),
 168		FREQ2FBIN(2437, 1),
 169		FREQ2FBIN(2472, 1)
 170	 },
 171	.calTarget_freqbin_2GHT40 = {
 172		FREQ2FBIN(2412, 1),
 173		FREQ2FBIN(2437, 1),
 174		FREQ2FBIN(2472, 1)
 175	 },
 176	.calTargetPowerCck = {
 177		 /* 1L-5L,5S,11L,11S */
 178		 { {36, 36, 36, 36} },
 179		 { {36, 36, 36, 36} },
 180	},
 181	.calTargetPower2G = {
 182		 /* 6-24,36,48,54 */
 183		 { {32, 32, 28, 24} },
 184		 { {32, 32, 28, 24} },
 185		 { {32, 32, 28, 24} },
 186	},
 187	.calTargetPower2GHT20 = {
 188		{ {32, 32, 32, 32, 28, 20, 32, 32, 28, 20, 32, 32, 28, 20} },
 189		{ {32, 32, 32, 32, 28, 20, 32, 32, 28, 20, 32, 32, 28, 20} },
 190		{ {32, 32, 32, 32, 28, 20, 32, 32, 28, 20, 32, 32, 28, 20} },
 191	},
 192	.calTargetPower2GHT40 = {
 193		{ {32, 32, 32, 32, 28, 20, 32, 32, 28, 20, 32, 32, 28, 20} },
 194		{ {32, 32, 32, 32, 28, 20, 32, 32, 28, 20, 32, 32, 28, 20} },
 195		{ {32, 32, 32, 32, 28, 20, 32, 32, 28, 20, 32, 32, 28, 20} },
 196	},
 197	.ctlIndex_2G =  {
 198		0x11, 0x12, 0x15, 0x17, 0x41, 0x42,
 199		0x45, 0x47, 0x31, 0x32, 0x35, 0x37,
 200	},
 201	.ctl_freqbin_2G = {
 202		{
 203			FREQ2FBIN(2412, 1),
 204			FREQ2FBIN(2417, 1),
 205			FREQ2FBIN(2457, 1),
 206			FREQ2FBIN(2462, 1)
 207		},
 208		{
 209			FREQ2FBIN(2412, 1),
 210			FREQ2FBIN(2417, 1),
 211			FREQ2FBIN(2462, 1),
 212			0xFF,
 213		},
 214
 215		{
 216			FREQ2FBIN(2412, 1),
 217			FREQ2FBIN(2417, 1),
 218			FREQ2FBIN(2462, 1),
 219			0xFF,
 220		},
 221		{
 222			FREQ2FBIN(2422, 1),
 223			FREQ2FBIN(2427, 1),
 224			FREQ2FBIN(2447, 1),
 225			FREQ2FBIN(2452, 1)
 226		},
 227
 228		{
 229			/* Data[4].ctlEdges[0].bChannel */ FREQ2FBIN(2412, 1),
 230			/* Data[4].ctlEdges[1].bChannel */ FREQ2FBIN(2417, 1),
 231			/* Data[4].ctlEdges[2].bChannel */ FREQ2FBIN(2472, 1),
 232			/* Data[4].ctlEdges[3].bChannel */ FREQ2FBIN(2484, 1),
 233		},
 234
 235		{
 236			/* Data[5].ctlEdges[0].bChannel */ FREQ2FBIN(2412, 1),
 237			/* Data[5].ctlEdges[1].bChannel */ FREQ2FBIN(2417, 1),
 238			/* Data[5].ctlEdges[2].bChannel */ FREQ2FBIN(2472, 1),
 239			0,
 240		},
 241
 242		{
 243			/* Data[6].ctlEdges[0].bChannel */ FREQ2FBIN(2412, 1),
 244			/* Data[6].ctlEdges[1].bChannel */ FREQ2FBIN(2417, 1),
 245			FREQ2FBIN(2472, 1),
 246			0,
 247		},
 248
 249		{
 250			/* Data[7].ctlEdges[0].bChannel */ FREQ2FBIN(2422, 1),
 251			/* Data[7].ctlEdges[1].bChannel */ FREQ2FBIN(2427, 1),
 252			/* Data[7].ctlEdges[2].bChannel */ FREQ2FBIN(2447, 1),
 253			/* Data[7].ctlEdges[3].bChannel */ FREQ2FBIN(2462, 1),
 254		},
 255
 256		{
 257			/* Data[8].ctlEdges[0].bChannel */ FREQ2FBIN(2412, 1),
 258			/* Data[8].ctlEdges[1].bChannel */ FREQ2FBIN(2417, 1),
 259			/* Data[8].ctlEdges[2].bChannel */ FREQ2FBIN(2472, 1),
 260		},
 261
 262		{
 263			/* Data[9].ctlEdges[0].bChannel */ FREQ2FBIN(2412, 1),
 264			/* Data[9].ctlEdges[1].bChannel */ FREQ2FBIN(2417, 1),
 265			/* Data[9].ctlEdges[2].bChannel */ FREQ2FBIN(2472, 1),
 266			0
 267		},
 268
 269		{
 270			/* Data[10].ctlEdges[0].bChannel */ FREQ2FBIN(2412, 1),
 271			/* Data[10].ctlEdges[1].bChannel */ FREQ2FBIN(2417, 1),
 272			/* Data[10].ctlEdges[2].bChannel */ FREQ2FBIN(2472, 1),
 273			0
 274		},
 275
 276		{
 277			/* Data[11].ctlEdges[0].bChannel */ FREQ2FBIN(2422, 1),
 278			/* Data[11].ctlEdges[1].bChannel */ FREQ2FBIN(2427, 1),
 279			/* Data[11].ctlEdges[2].bChannel */ FREQ2FBIN(2447, 1),
 280			/* Data[11].ctlEdges[3].bChannel */ FREQ2FBIN(2462, 1),
 281		}
 282	 },
 283	.ctlPowerData_2G = {
 284		 { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } },
 285		 { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } },
 286		 { { CTL(60, 1), CTL(60, 0), CTL(60, 0), CTL(60, 1) } },
 287
 288		 { { CTL(60, 1), CTL(60, 0), CTL(60, 0), CTL(60, 0) } },
 289		 { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } },
 290		 { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } },
 291
 292		 { { CTL(60, 0), CTL(60, 1), CTL(60, 1), CTL(60, 0) } },
 293		 { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } },
 294		 { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } },
 295
 296		 { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } },
 297		 { { CTL(60, 0), CTL(60, 1), CTL(60, 1), CTL(60, 1) } },
 298		 { { CTL(60, 0), CTL(60, 1), CTL(60, 1), CTL(60, 1) } },
 299	 },
 300	.modalHeader5G = {
 301		/* 4 idle,t1,t2,b (4 bits per setting) */
 302		.antCtrlCommon = LE32(0x110),
 303		/* 4 ra1l1, ra2l1, ra1l2,ra2l2,ra12 */
 304		.antCtrlCommon2 = LE32(0x22222),
 305		 /* antCtrlChain 6 idle, t,r,rx1,rx12,b (2 bits each) */
 306		.antCtrlChain = {
 307			LE16(0x000), LE16(0x000), LE16(0x000),
 308		},
 309		 /* xatten1DB 3 xatten1_db for AR9280 (0xa20c/b20c 5:0) */
 310		.xatten1DB = {0, 0, 0},
 311
 312		/*
 313		 * xatten1Margin[AR9300_MAX_CHAINS]; 3 xatten1_margin
 314		 * for merlin (0xa20c/b20c 16:12
 315		 */
 316		.xatten1Margin = {0, 0, 0},
 317		.tempSlope = 68,
 318		.voltSlope = 0,
 319		/* spurChans spur channels in usual fbin coding format */
 320		.spurChans = {0, 0, 0, 0, 0},
 321		/* noiseFloorThreshCh Check if the register is per chain */
 322		.noiseFloorThreshCh = {-1, 0, 0},
 323		.reserved = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
 324		.quick_drop = 0,
 325		.xpaBiasLvl = 0,
 326		.txFrameToDataStart = 0x0e,
 327		.txFrameToPaOn = 0x0e,
 328		.txClip = 3, /* 4 bits tx_clip, 4 bits dac_scale_cck */
 329		.antennaGain = 0,
 330		.switchSettling = 0x2d,
 331		.adcDesiredSize = -30,
 332		.txEndToXpaOff = 0,
 333		.txEndToRxOn = 0x2,
 334		.txFrameToXpaOn = 0xe,
 335		.thresh62 = 28,
 336		.papdRateMaskHt20 = LE32(0x0c80c080),
 337		.papdRateMaskHt40 = LE32(0x0080c080),
 338		.switchcomspdt = 0,
 339		.xlna_bias_strength = 0,
 340		.futureModal = {
 341			0, 0, 0, 0, 0, 0, 0,
 342		},
 343	 },
 344	.base_ext2 = {
 345		.tempSlopeLow = 0,
 346		.tempSlopeHigh = 0,
 347		.xatten1DBLow = {0, 0, 0},
 348		.xatten1MarginLow = {0, 0, 0},
 349		.xatten1DBHigh = {0, 0, 0},
 350		.xatten1MarginHigh = {0, 0, 0}
 351	},
 352	.calFreqPier5G = {
 353		FREQ2FBIN(5180, 0),
 354		FREQ2FBIN(5220, 0),
 355		FREQ2FBIN(5320, 0),
 356		FREQ2FBIN(5400, 0),
 357		FREQ2FBIN(5500, 0),
 358		FREQ2FBIN(5600, 0),
 359		FREQ2FBIN(5725, 0),
 360		FREQ2FBIN(5825, 0)
 361	},
 362	.calPierData5G = {
 363			{
 364				{0, 0, 0, 0, 0},
 365				{0, 0, 0, 0, 0},
 366				{0, 0, 0, 0, 0},
 367				{0, 0, 0, 0, 0},
 368				{0, 0, 0, 0, 0},
 369				{0, 0, 0, 0, 0},
 370				{0, 0, 0, 0, 0},
 371				{0, 0, 0, 0, 0},
 372			},
 373			{
 374				{0, 0, 0, 0, 0},
 375				{0, 0, 0, 0, 0},
 376				{0, 0, 0, 0, 0},
 377				{0, 0, 0, 0, 0},
 378				{0, 0, 0, 0, 0},
 379				{0, 0, 0, 0, 0},
 380				{0, 0, 0, 0, 0},
 381				{0, 0, 0, 0, 0},
 382			},
 383			{
 384				{0, 0, 0, 0, 0},
 385				{0, 0, 0, 0, 0},
 386				{0, 0, 0, 0, 0},
 387				{0, 0, 0, 0, 0},
 388				{0, 0, 0, 0, 0},
 389				{0, 0, 0, 0, 0},
 390				{0, 0, 0, 0, 0},
 391				{0, 0, 0, 0, 0},
 392			},
 393
 394	},
 395	.calTarget_freqbin_5G = {
 396		FREQ2FBIN(5180, 0),
 397		FREQ2FBIN(5220, 0),
 398		FREQ2FBIN(5320, 0),
 399		FREQ2FBIN(5400, 0),
 400		FREQ2FBIN(5500, 0),
 401		FREQ2FBIN(5600, 0),
 402		FREQ2FBIN(5725, 0),
 403		FREQ2FBIN(5825, 0)
 404	},
 405	.calTarget_freqbin_5GHT20 = {
 406		FREQ2FBIN(5180, 0),
 407		FREQ2FBIN(5240, 0),
 408		FREQ2FBIN(5320, 0),
 409		FREQ2FBIN(5500, 0),
 410		FREQ2FBIN(5700, 0),
 411		FREQ2FBIN(5745, 0),
 412		FREQ2FBIN(5725, 0),
 413		FREQ2FBIN(5825, 0)
 414	},
 415	.calTarget_freqbin_5GHT40 = {
 416		FREQ2FBIN(5180, 0),
 417		FREQ2FBIN(5240, 0),
 418		FREQ2FBIN(5320, 0),
 419		FREQ2FBIN(5500, 0),
 420		FREQ2FBIN(5700, 0),
 421		FREQ2FBIN(5745, 0),
 422		FREQ2FBIN(5725, 0),
 423		FREQ2FBIN(5825, 0)
 424	 },
 425	.calTargetPower5G = {
 426		/* 6-24,36,48,54 */
 427		{ {20, 20, 20, 10} },
 428		{ {20, 20, 20, 10} },
 429		{ {20, 20, 20, 10} },
 430		{ {20, 20, 20, 10} },
 431		{ {20, 20, 20, 10} },
 432		{ {20, 20, 20, 10} },
 433		{ {20, 20, 20, 10} },
 434		{ {20, 20, 20, 10} },
 435	 },
 436	.calTargetPower5GHT20 = {
 437		/*
 438		 * 0_8_16,1-3_9-11_17-19,
 439		 * 4,5,6,7,12,13,14,15,20,21,22,23
 440		 */
 441		{ {20, 20, 10, 10, 0, 0, 10, 10, 0, 0, 10, 10, 0, 0} },
 442		{ {20, 20, 10, 10, 0, 0, 10, 10, 0, 0, 10, 10, 0, 0} },
 443		{ {20, 20, 10, 10, 0, 0, 10, 10, 0, 0, 10, 10, 0, 0} },
 444		{ {20, 20, 10, 10, 0, 0, 10, 10, 0, 0, 10, 10, 0, 0} },
 445		{ {20, 20, 10, 10, 0, 0, 10, 10, 0, 0, 10, 10, 0, 0} },
 446		{ {20, 20, 10, 10, 0, 0, 10, 10, 0, 0, 10, 10, 0, 0} },
 447		{ {20, 20, 10, 10, 0, 0, 10, 10, 0, 0, 10, 10, 0, 0} },
 448		{ {20, 20, 10, 10, 0, 0, 10, 10, 0, 0, 10, 10, 0, 0} },
 449	 },
 450	.calTargetPower5GHT40 =  {
 451		/*
 452		 * 0_8_16,1-3_9-11_17-19,
 453		 * 4,5,6,7,12,13,14,15,20,21,22,23
 454		 */
 455		{ {20, 20, 10, 10, 0, 0, 10, 10, 0, 0, 10, 10, 0, 0} },
 456		{ {20, 20, 10, 10, 0, 0, 10, 10, 0, 0, 10, 10, 0, 0} },
 457		{ {20, 20, 10, 10, 0, 0, 10, 10, 0, 0, 10, 10, 0, 0} },
 458		{ {20, 20, 10, 10, 0, 0, 10, 10, 0, 0, 10, 10, 0, 0} },
 459		{ {20, 20, 10, 10, 0, 0, 10, 10, 0, 0, 10, 10, 0, 0} },
 460		{ {20, 20, 10, 10, 0, 0, 10, 10, 0, 0, 10, 10, 0, 0} },
 461		{ {20, 20, 10, 10, 0, 0, 10, 10, 0, 0, 10, 10, 0, 0} },
 462		{ {20, 20, 10, 10, 0, 0, 10, 10, 0, 0, 10, 10, 0, 0} },
 463	 },
 464	.ctlIndex_5G =  {
 465		0x10, 0x16, 0x18, 0x40, 0x46,
 466		0x48, 0x30, 0x36, 0x38
 467	},
 468	.ctl_freqbin_5G =  {
 469		{
 470			/* Data[0].ctlEdges[0].bChannel */ FREQ2FBIN(5180, 0),
 471			/* Data[0].ctlEdges[1].bChannel */ FREQ2FBIN(5260, 0),
 472			/* Data[0].ctlEdges[2].bChannel */ FREQ2FBIN(5280, 0),
 473			/* Data[0].ctlEdges[3].bChannel */ FREQ2FBIN(5500, 0),
 474			/* Data[0].ctlEdges[4].bChannel */ FREQ2FBIN(5600, 0),
 475			/* Data[0].ctlEdges[5].bChannel */ FREQ2FBIN(5700, 0),
 476			/* Data[0].ctlEdges[6].bChannel */ FREQ2FBIN(5745, 0),
 477			/* Data[0].ctlEdges[7].bChannel */ FREQ2FBIN(5825, 0)
 478		},
 479		{
 480			/* Data[1].ctlEdges[0].bChannel */ FREQ2FBIN(5180, 0),
 481			/* Data[1].ctlEdges[1].bChannel */ FREQ2FBIN(5260, 0),
 482			/* Data[1].ctlEdges[2].bChannel */ FREQ2FBIN(5280, 0),
 483			/* Data[1].ctlEdges[3].bChannel */ FREQ2FBIN(5500, 0),
 484			/* Data[1].ctlEdges[4].bChannel */ FREQ2FBIN(5520, 0),
 485			/* Data[1].ctlEdges[5].bChannel */ FREQ2FBIN(5700, 0),
 486			/* Data[1].ctlEdges[6].bChannel */ FREQ2FBIN(5745, 0),
 487			/* Data[1].ctlEdges[7].bChannel */ FREQ2FBIN(5825, 0)
 488		},
 489
 490		{
 491			/* Data[2].ctlEdges[0].bChannel */ FREQ2FBIN(5190, 0),
 492			/* Data[2].ctlEdges[1].bChannel */ FREQ2FBIN(5230, 0),
 493			/* Data[2].ctlEdges[2].bChannel */ FREQ2FBIN(5270, 0),
 494			/* Data[2].ctlEdges[3].bChannel */ FREQ2FBIN(5310, 0),
 495			/* Data[2].ctlEdges[4].bChannel */ FREQ2FBIN(5510, 0),
 496			/* Data[2].ctlEdges[5].bChannel */ FREQ2FBIN(5550, 0),
 497			/* Data[2].ctlEdges[6].bChannel */ FREQ2FBIN(5670, 0),
 498			/* Data[2].ctlEdges[7].bChannel */ FREQ2FBIN(5755, 0)
 499		},
 500
 501		{
 502			/* Data[3].ctlEdges[0].bChannel */ FREQ2FBIN(5180, 0),
 503			/* Data[3].ctlEdges[1].bChannel */ FREQ2FBIN(5200, 0),
 504			/* Data[3].ctlEdges[2].bChannel */ FREQ2FBIN(5260, 0),
 505			/* Data[3].ctlEdges[3].bChannel */ FREQ2FBIN(5320, 0),
 506			/* Data[3].ctlEdges[4].bChannel */ FREQ2FBIN(5500, 0),
 507			/* Data[3].ctlEdges[5].bChannel */ FREQ2FBIN(5700, 0),
 508			/* Data[3].ctlEdges[6].bChannel */ 0xFF,
 509			/* Data[3].ctlEdges[7].bChannel */ 0xFF,
 510		},
 511
 512		{
 513			/* Data[4].ctlEdges[0].bChannel */ FREQ2FBIN(5180, 0),
 514			/* Data[4].ctlEdges[1].bChannel */ FREQ2FBIN(5260, 0),
 515			/* Data[4].ctlEdges[2].bChannel */ FREQ2FBIN(5500, 0),
 516			/* Data[4].ctlEdges[3].bChannel */ FREQ2FBIN(5700, 0),
 517			/* Data[4].ctlEdges[4].bChannel */ 0xFF,
 518			/* Data[4].ctlEdges[5].bChannel */ 0xFF,
 519			/* Data[4].ctlEdges[6].bChannel */ 0xFF,
 520			/* Data[4].ctlEdges[7].bChannel */ 0xFF,
 521		},
 522
 523		{
 524			/* Data[5].ctlEdges[0].bChannel */ FREQ2FBIN(5190, 0),
 525			/* Data[5].ctlEdges[1].bChannel */ FREQ2FBIN(5270, 0),
 526			/* Data[5].ctlEdges[2].bChannel */ FREQ2FBIN(5310, 0),
 527			/* Data[5].ctlEdges[3].bChannel */ FREQ2FBIN(5510, 0),
 528			/* Data[5].ctlEdges[4].bChannel */ FREQ2FBIN(5590, 0),
 529			/* Data[5].ctlEdges[5].bChannel */ FREQ2FBIN(5670, 0),
 530			/* Data[5].ctlEdges[6].bChannel */ 0xFF,
 531			/* Data[5].ctlEdges[7].bChannel */ 0xFF
 532		},
 533
 534		{
 535			/* Data[6].ctlEdges[0].bChannel */ FREQ2FBIN(5180, 0),
 536			/* Data[6].ctlEdges[1].bChannel */ FREQ2FBIN(5200, 0),
 537			/* Data[6].ctlEdges[2].bChannel */ FREQ2FBIN(5220, 0),
 538			/* Data[6].ctlEdges[3].bChannel */ FREQ2FBIN(5260, 0),
 539			/* Data[6].ctlEdges[4].bChannel */ FREQ2FBIN(5500, 0),
 540			/* Data[6].ctlEdges[5].bChannel */ FREQ2FBIN(5600, 0),
 541			/* Data[6].ctlEdges[6].bChannel */ FREQ2FBIN(5700, 0),
 542			/* Data[6].ctlEdges[7].bChannel */ FREQ2FBIN(5745, 0)
 543		},
 544
 545		{
 546			/* Data[7].ctlEdges[0].bChannel */ FREQ2FBIN(5180, 0),
 547			/* Data[7].ctlEdges[1].bChannel */ FREQ2FBIN(5260, 0),
 548			/* Data[7].ctlEdges[2].bChannel */ FREQ2FBIN(5320, 0),
 549			/* Data[7].ctlEdges[3].bChannel */ FREQ2FBIN(5500, 0),
 550			/* Data[7].ctlEdges[4].bChannel */ FREQ2FBIN(5560, 0),
 551			/* Data[7].ctlEdges[5].bChannel */ FREQ2FBIN(5700, 0),
 552			/* Data[7].ctlEdges[6].bChannel */ FREQ2FBIN(5745, 0),
 553			/* Data[7].ctlEdges[7].bChannel */ FREQ2FBIN(5825, 0)
 554		},
 555
 556		{
 557			/* Data[8].ctlEdges[0].bChannel */ FREQ2FBIN(5190, 0),
 558			/* Data[8].ctlEdges[1].bChannel */ FREQ2FBIN(5230, 0),
 559			/* Data[8].ctlEdges[2].bChannel */ FREQ2FBIN(5270, 0),
 560			/* Data[8].ctlEdges[3].bChannel */ FREQ2FBIN(5510, 0),
 561			/* Data[8].ctlEdges[4].bChannel */ FREQ2FBIN(5550, 0),
 562			/* Data[8].ctlEdges[5].bChannel */ FREQ2FBIN(5670, 0),
 563			/* Data[8].ctlEdges[6].bChannel */ FREQ2FBIN(5755, 0),
 564			/* Data[8].ctlEdges[7].bChannel */ FREQ2FBIN(5795, 0)
 565		}
 566	 },
 567	.ctlPowerData_5G = {
 568		{
 569			{
 570				CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 1),
 571				CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 0),
 572			}
 573		},
 574		{
 575			{
 576				CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 1),
 577				CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 0),
 578			}
 579		},
 580		{
 581			{
 582				CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 1),
 583				CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 1),
 584			}
 585		},
 586		{
 587			{
 588				CTL(60, 0), CTL(60, 1), CTL(60, 1), CTL(60, 0),
 589				CTL(60, 1), CTL(60, 0), CTL(60, 0), CTL(60, 0),
 590			}
 591		},
 592		{
 593			{
 594				CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 0),
 595				CTL(60, 0), CTL(60, 0), CTL(60, 0), CTL(60, 0),
 596			}
 597		},
 598		{
 599			{
 600				CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 1),
 601				CTL(60, 1), CTL(60, 0), CTL(60, 0), CTL(60, 0),
 602			}
 603		},
 604		{
 605			{
 606				CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 1),
 607				CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 1),
 608			}
 609		},
 610		{
 611			{
 612				CTL(60, 1), CTL(60, 1), CTL(60, 0), CTL(60, 1),
 613				CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 0),
 614			}
 615		},
 616		{
 617			{
 618				CTL(60, 1), CTL(60, 0), CTL(60, 1), CTL(60, 1),
 619				CTL(60, 1), CTL(60, 1), CTL(60, 0), CTL(60, 1),
 620			}
 621		},
 622	 }
 623};
 624
 625static const struct ar9300_eeprom ar9300_x113 = {
 626	.eepromVersion = 2,
 627	.templateVersion = 6,
 628	.macAddr = {0x00, 0x03, 0x7f, 0x0, 0x0, 0x0},
 629	.custData = {"x113-023-f0000"},
 630	.baseEepHeader = {
 631		.regDmn = { LE16(0), LE16(0x1f) },
 632		.txrxMask =  0x77, /* 4 bits tx and 4 bits rx */
 633		.opCapFlags = {
 634			.opFlags = AR5416_OPFLAGS_11A,
 635			.eepMisc = AR9300_EEPMISC_LITTLE_ENDIAN,
 636		},
 637		.rfSilent = 0,
 638		.blueToothOptions = 0,
 639		.deviceCap = 0,
 640		.deviceType = 5, /* takes lower byte in eeprom location */
 641		.pwrTableOffset = AR9300_PWR_TABLE_OFFSET,
 642		.params_for_tuning_caps = {0, 0},
 643		.featureEnable = 0x0d,
 644		 /*
 645		  * bit0 - enable tx temp comp - disabled
 646		  * bit1 - enable tx volt comp - disabled
 647		  * bit2 - enable fastClock - enabled
 648		  * bit3 - enable doubling - enabled
 649		  * bit4 - enable internal regulator - disabled
 650		  * bit5 - enable pa predistortion - disabled
 651		  */
 652		.miscConfiguration = 0, /* bit0 - turn down drivestrength */
 653		.eepromWriteEnableGpio = 6,
 654		.wlanDisableGpio = 0,
 655		.wlanLedGpio = 8,
 656		.rxBandSelectGpio = 0xff,
 657		.txrxgain = 0x21,
 658		.swreg = 0,
 659	 },
 660	.modalHeader2G = {
 661	/* ar9300_modal_eep_header  2g */
 662		/* 4 idle,t1,t2,b(4 bits per setting) */
 663		.antCtrlCommon = LE32(0x110),
 664		/* 4 ra1l1, ra2l1, ra1l2, ra2l2, ra12 */
 665		.antCtrlCommon2 = LE32(0x44444),
 666
 667		/*
 668		 * antCtrlChain[AR9300_MAX_CHAINS]; 6 idle, t, r,
 669		 * rx1, rx12, b (2 bits each)
 670		 */
 671		.antCtrlChain = { LE16(0x150), LE16(0x150), LE16(0x150) },
 672
 673		/*
 674		 * xatten1DB[AR9300_MAX_CHAINS];  3 xatten1_db
 675		 * for ar9280 (0xa20c/b20c 5:0)
 676		 */
 677		.xatten1DB = {0, 0, 0},
 678
 679		/*
 680		 * xatten1Margin[AR9300_MAX_CHAINS]; 3 xatten1_margin
 681		 * for ar9280 (0xa20c/b20c 16:12
 682		 */
 683		.xatten1Margin = {0, 0, 0},
 684		.tempSlope = 25,
 685		.voltSlope = 0,
 686
 687		/*
 688		 * spurChans[OSPREY_EEPROM_MODAL_SPURS]; spur
 689		 * channels in usual fbin coding format
 690		 */
 691		.spurChans = {FREQ2FBIN(2464, 1), 0, 0, 0, 0},
 692
 693		/*
 694		 * noiseFloorThreshCh[AR9300_MAX_CHAINS]; 3 Check
 695		 * if the register is per chain
 696		 */
 697		.noiseFloorThreshCh = {-1, 0, 0},
 698		.reserved = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
 699		.quick_drop = 0,
 700		.xpaBiasLvl = 0,
 701		.txFrameToDataStart = 0x0e,
 702		.txFrameToPaOn = 0x0e,
 703		.txClip = 3, /* 4 bits tx_clip, 4 bits dac_scale_cck */
 704		.antennaGain = 0,
 705		.switchSettling = 0x2c,
 706		.adcDesiredSize = -30,
 707		.txEndToXpaOff = 0,
 708		.txEndToRxOn = 0x2,
 709		.txFrameToXpaOn = 0xe,
 710		.thresh62 = 28,
 711		.papdRateMaskHt20 = LE32(0x0c80c080),
 712		.papdRateMaskHt40 = LE32(0x0080c080),
 713		.switchcomspdt = 0,
 714		.xlna_bias_strength = 0,
 715		.futureModal = {
 716			0, 0, 0, 0, 0, 0, 0,
 717		},
 718	 },
 719	 .base_ext1 = {
 720		.ant_div_control = 0,
 721		.future = {0, 0},
 722		.tempslopextension = {0, 0, 0, 0, 0, 0, 0, 0}
 723	 },
 724	.calFreqPier2G = {
 725		FREQ2FBIN(2412, 1),
 726		FREQ2FBIN(2437, 1),
 727		FREQ2FBIN(2472, 1),
 728	 },
 729	/* ar9300_cal_data_per_freq_op_loop 2g */
 730	.calPierData2G = {
 731		{ {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0} },
 732		{ {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0} },
 733		{ {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0} },
 734	 },
 735	.calTarget_freqbin_Cck = {
 736		FREQ2FBIN(2412, 1),
 737		FREQ2FBIN(2472, 1),
 738	 },
 739	.calTarget_freqbin_2G = {
 740		FREQ2FBIN(2412, 1),
 741		FREQ2FBIN(2437, 1),
 742		FREQ2FBIN(2472, 1)
 743	 },
 744	.calTarget_freqbin_2GHT20 = {
 745		FREQ2FBIN(2412, 1),
 746		FREQ2FBIN(2437, 1),
 747		FREQ2FBIN(2472, 1)
 748	 },
 749	.calTarget_freqbin_2GHT40 = {
 750		FREQ2FBIN(2412, 1),
 751		FREQ2FBIN(2437, 1),
 752		FREQ2FBIN(2472, 1)
 753	 },
 754	.calTargetPowerCck = {
 755		 /* 1L-5L,5S,11L,11S */
 756		 { {34, 34, 34, 34} },
 757		 { {34, 34, 34, 34} },
 758	},
 759	.calTargetPower2G = {
 760		 /* 6-24,36,48,54 */
 761		 { {34, 34, 32, 32} },
 762		 { {34, 34, 32, 32} },
 763		 { {34, 34, 32, 32} },
 764	},
 765	.calTargetPower2GHT20 = {
 766		{ {32, 32, 32, 32, 32, 28, 32, 32, 30, 28, 0, 0, 0, 0} },
 767		{ {32, 32, 32, 32, 32, 28, 32, 32, 30, 28, 0, 0, 0, 0} },
 768		{ {32, 32, 32, 32, 32, 28, 32, 32, 30, 28, 0, 0, 0, 0} },
 769	},
 770	.calTargetPower2GHT40 = {
 771		{ {30, 30, 30, 30, 30, 28, 30, 30, 28, 26, 0, 0, 0, 0} },
 772		{ {30, 30, 30, 30, 30, 28, 30, 30, 28, 26, 0, 0, 0, 0} },
 773		{ {30, 30, 30, 30, 30, 28, 30, 30, 28, 26, 0, 0, 0, 0} },
 774	},
 775	.ctlIndex_2G =  {
 776		0x11, 0x12, 0x15, 0x17, 0x41, 0x42,
 777		0x45, 0x47, 0x31, 0x32, 0x35, 0x37,
 778	},
 779	.ctl_freqbin_2G = {
 780		{
 781			FREQ2FBIN(2412, 1),
 782			FREQ2FBIN(2417, 1),
 783			FREQ2FBIN(2457, 1),
 784			FREQ2FBIN(2462, 1)
 785		},
 786		{
 787			FREQ2FBIN(2412, 1),
 788			FREQ2FBIN(2417, 1),
 789			FREQ2FBIN(2462, 1),
 790			0xFF,
 791		},
 792
 793		{
 794			FREQ2FBIN(2412, 1),
 795			FREQ2FBIN(2417, 1),
 796			FREQ2FBIN(2462, 1),
 797			0xFF,
 798		},
 799		{
 800			FREQ2FBIN(2422, 1),
 801			FREQ2FBIN(2427, 1),
 802			FREQ2FBIN(2447, 1),
 803			FREQ2FBIN(2452, 1)
 804		},
 805
 806		{
 807			/* Data[4].ctlEdges[0].bChannel */ FREQ2FBIN(2412, 1),
 808			/* Data[4].ctlEdges[1].bChannel */ FREQ2FBIN(2417, 1),
 809			/* Data[4].ctlEdges[2].bChannel */ FREQ2FBIN(2472, 1),
 810			/* Data[4].ctlEdges[3].bChannel */ FREQ2FBIN(2484, 1),
 811		},
 812
 813		{
 814			/* Data[5].ctlEdges[0].bChannel */ FREQ2FBIN(2412, 1),
 815			/* Data[5].ctlEdges[1].bChannel */ FREQ2FBIN(2417, 1),
 816			/* Data[5].ctlEdges[2].bChannel */ FREQ2FBIN(2472, 1),
 817			0,
 818		},
 819
 820		{
 821			/* Data[6].ctlEdges[0].bChannel */ FREQ2FBIN(2412, 1),
 822			/* Data[6].ctlEdges[1].bChannel */ FREQ2FBIN(2417, 1),
 823			FREQ2FBIN(2472, 1),
 824			0,
 825		},
 826
 827		{
 828			/* Data[7].ctlEdges[0].bChannel */ FREQ2FBIN(2422, 1),
 829			/* Data[7].ctlEdges[1].bChannel */ FREQ2FBIN(2427, 1),
 830			/* Data[7].ctlEdges[2].bChannel */ FREQ2FBIN(2447, 1),
 831			/* Data[7].ctlEdges[3].bChannel */ FREQ2FBIN(2462, 1),
 832		},
 833
 834		{
 835			/* Data[8].ctlEdges[0].bChannel */ FREQ2FBIN(2412, 1),
 836			/* Data[8].ctlEdges[1].bChannel */ FREQ2FBIN(2417, 1),
 837			/* Data[8].ctlEdges[2].bChannel */ FREQ2FBIN(2472, 1),
 838		},
 839
 840		{
 841			/* Data[9].ctlEdges[0].bChannel */ FREQ2FBIN(2412, 1),
 842			/* Data[9].ctlEdges[1].bChannel */ FREQ2FBIN(2417, 1),
 843			/* Data[9].ctlEdges[2].bChannel */ FREQ2FBIN(2472, 1),
 844			0
 845		},
 846
 847		{
 848			/* Data[10].ctlEdges[0].bChannel */ FREQ2FBIN(2412, 1),
 849			/* Data[10].ctlEdges[1].bChannel */ FREQ2FBIN(2417, 1),
 850			/* Data[10].ctlEdges[2].bChannel */ FREQ2FBIN(2472, 1),
 851			0
 852		},
 853
 854		{
 855			/* Data[11].ctlEdges[0].bChannel */ FREQ2FBIN(2422, 1),
 856			/* Data[11].ctlEdges[1].bChannel */ FREQ2FBIN(2427, 1),
 857			/* Data[11].ctlEdges[2].bChannel */ FREQ2FBIN(2447, 1),
 858			/* Data[11].ctlEdges[3].bChannel */ FREQ2FBIN(2462, 1),
 859		}
 860	 },
 861	.ctlPowerData_2G = {
 862		 { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } },
 863		 { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } },
 864		 { { CTL(60, 1), CTL(60, 0), CTL(60, 0), CTL(60, 1) } },
 865
 866		 { { CTL(60, 1), CTL(60, 0), CTL(60, 0), CTL(60, 0) } },
 867		 { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } },
 868		 { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } },
 869
 870		 { { CTL(60, 0), CTL(60, 1), CTL(60, 1), CTL(60, 0) } },
 871		 { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } },
 872		 { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } },
 873
 874		 { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } },
 875		 { { CTL(60, 0), CTL(60, 1), CTL(60, 1), CTL(60, 1) } },
 876		 { { CTL(60, 0), CTL(60, 1), CTL(60, 1), CTL(60, 1) } },
 877	 },
 878	.modalHeader5G = {
 879		/* 4 idle,t1,t2,b (4 bits per setting) */
 880		.antCtrlCommon = LE32(0x220),
 881		/* 4 ra1l1, ra2l1, ra1l2,ra2l2,ra12 */
 882		.antCtrlCommon2 = LE32(0x11111),
 883		 /* antCtrlChain 6 idle, t,r,rx1,rx12,b (2 bits each) */
 884		.antCtrlChain = {
 885			LE16(0x150), LE16(0x150), LE16(0x150),
 886		},
 887		 /* xatten1DB 3 xatten1_db for AR9280 (0xa20c/b20c 5:0) */
 888		.xatten1DB = {0, 0, 0},
 889
 890		/*
 891		 * xatten1Margin[AR9300_MAX_CHAINS]; 3 xatten1_margin
 892		 * for merlin (0xa20c/b20c 16:12
 893		 */
 894		.xatten1Margin = {0, 0, 0},
 895		.tempSlope = 68,
 896		.voltSlope = 0,
 897		/* spurChans spur channels in usual fbin coding format */
 898		.spurChans = {FREQ2FBIN(5500, 0), 0, 0, 0, 0},
 899		/* noiseFloorThreshCh Check if the register is per chain */
 900		.noiseFloorThreshCh = {-1, 0, 0},
 901		.reserved = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
 902		.quick_drop = 0,
 903		.xpaBiasLvl = 0xf,
 904		.txFrameToDataStart = 0x0e,
 905		.txFrameToPaOn = 0x0e,
 906		.txClip = 3, /* 4 bits tx_clip, 4 bits dac_scale_cck */
 907		.antennaGain = 0,
 908		.switchSettling = 0x2d,
 909		.adcDesiredSize = -30,
 910		.txEndToXpaOff = 0,
 911		.txEndToRxOn = 0x2,
 912		.txFrameToXpaOn = 0xe,
 913		.thresh62 = 28,
 914		.papdRateMaskHt20 = LE32(0x0cf0e0e0),
 915		.papdRateMaskHt40 = LE32(0x6cf0e0e0),
 916		.switchcomspdt = 0,
 917		.xlna_bias_strength = 0,
 918		.futureModal = {
 919			0, 0, 0, 0, 0, 0, 0,
 920		},
 921	 },
 922	.base_ext2 = {
 923		.tempSlopeLow = 72,
 924		.tempSlopeHigh = 105,
 925		.xatten1DBLow = {0, 0, 0},
 926		.xatten1MarginLow = {0, 0, 0},
 927		.xatten1DBHigh = {0, 0, 0},
 928		.xatten1MarginHigh = {0, 0, 0}
 929	 },
 930	.calFreqPier5G = {
 931		FREQ2FBIN(5180, 0),
 932		FREQ2FBIN(5240, 0),
 933		FREQ2FBIN(5320, 0),
 934		FREQ2FBIN(5400, 0),
 935		FREQ2FBIN(5500, 0),
 936		FREQ2FBIN(5600, 0),
 937		FREQ2FBIN(5745, 0),
 938		FREQ2FBIN(5785, 0)
 939	},
 940	.calPierData5G = {
 941			{
 942				{0, 0, 0, 0, 0},
 943				{0, 0, 0, 0, 0},
 944				{0, 0, 0, 0, 0},
 945				{0, 0, 0, 0, 0},
 946				{0, 0, 0, 0, 0},
 947				{0, 0, 0, 0, 0},
 948				{0, 0, 0, 0, 0},
 949				{0, 0, 0, 0, 0},
 950			},
 951			{
 952				{0, 0, 0, 0, 0},
 953				{0, 0, 0, 0, 0},
 954				{0, 0, 0, 0, 0},
 955				{0, 0, 0, 0, 0},
 956				{0, 0, 0, 0, 0},
 957				{0, 0, 0, 0, 0},
 958				{0, 0, 0, 0, 0},
 959				{0, 0, 0, 0, 0},
 960			},
 961			{
 962				{0, 0, 0, 0, 0},
 963				{0, 0, 0, 0, 0},
 964				{0, 0, 0, 0, 0},
 965				{0, 0, 0, 0, 0},
 966				{0, 0, 0, 0, 0},
 967				{0, 0, 0, 0, 0},
 968				{0, 0, 0, 0, 0},
 969				{0, 0, 0, 0, 0},
 970			},
 971
 972	},
 973	.calTarget_freqbin_5G = {
 974		FREQ2FBIN(5180, 0),
 975		FREQ2FBIN(5220, 0),
 976		FREQ2FBIN(5320, 0),
 977		FREQ2FBIN(5400, 0),
 978		FREQ2FBIN(5500, 0),
 979		FREQ2FBIN(5600, 0),
 980		FREQ2FBIN(5745, 0),
 981		FREQ2FBIN(5785, 0)
 982	},
 983	.calTarget_freqbin_5GHT20 = {
 984		FREQ2FBIN(5180, 0),
 985		FREQ2FBIN(5240, 0),
 986		FREQ2FBIN(5320, 0),
 987		FREQ2FBIN(5400, 0),
 988		FREQ2FBIN(5500, 0),
 989		FREQ2FBIN(5700, 0),
 990		FREQ2FBIN(5745, 0),
 991		FREQ2FBIN(5825, 0)
 992	},
 993	.calTarget_freqbin_5GHT40 = {
 994		FREQ2FBIN(5190, 0),
 995		FREQ2FBIN(5230, 0),
 996		FREQ2FBIN(5320, 0),
 997		FREQ2FBIN(5410, 0),
 998		FREQ2FBIN(5510, 0),
 999		FREQ2FBIN(5670, 0),
1000		FREQ2FBIN(5755, 0),
1001		FREQ2FBIN(5825, 0)
1002	 },
1003	.calTargetPower5G = {
1004		/* 6-24,36,48,54 */
1005		{ {42, 40, 40, 34} },
1006		{ {42, 40, 40, 34} },
1007		{ {42, 40, 40, 34} },
1008		{ {42, 40, 40, 34} },
1009		{ {42, 40, 40, 34} },
1010		{ {42, 40, 40, 34} },
1011		{ {42, 40, 40, 34} },
1012		{ {42, 40, 40, 34} },
1013	 },
1014	.calTargetPower5GHT20 = {
1015		/*
1016		 * 0_8_16,1-3_9-11_17-19,
1017		 * 4,5,6,7,12,13,14,15,20,21,22,23
1018		 */
1019		{ {40, 40, 40, 40, 32, 28, 40, 40, 32, 28, 40, 40, 32, 20} },
1020		{ {40, 40, 40, 40, 32, 28, 40, 40, 32, 28, 40, 40, 32, 20} },
1021		{ {40, 40, 40, 40, 32, 28, 40, 40, 32, 28, 40, 40, 32, 20} },
1022		{ {40, 40, 40, 40, 32, 28, 40, 40, 32, 28, 40, 40, 32, 20} },
1023		{ {40, 40, 40, 40, 32, 28, 40, 40, 32, 28, 40, 40, 32, 20} },
1024		{ {40, 40, 40, 40, 32, 28, 40, 40, 32, 28, 40, 40, 32, 20} },
1025		{ {38, 38, 38, 38, 32, 28, 38, 38, 32, 28, 38, 38, 32, 26} },
1026		{ {36, 36, 36, 36, 32, 28, 36, 36, 32, 28, 36, 36, 32, 26} },
1027	 },
1028	.calTargetPower5GHT40 =  {
1029		/*
1030		 * 0_8_16,1-3_9-11_17-19,
1031		 * 4,5,6,7,12,13,14,15,20,21,22,23
1032		 */
1033		{ {40, 40, 40, 38, 30, 26, 40, 40, 30, 26, 40, 40, 30, 24} },
1034		{ {40, 40, 40, 38, 30, 26, 40, 40, 30, 26, 40, 40, 30, 24} },
1035		{ {40, 40, 40, 38, 30, 26, 40, 40, 30, 26, 40, 40, 30, 24} },
1036		{ {40, 40, 40, 38, 30, 26, 40, 40, 30, 26, 40, 40, 30, 24} },
1037		{ {40, 40, 40, 38, 30, 26, 40, 40, 30, 26, 40, 40, 30, 24} },
1038		{ {40, 40, 40, 38, 30, 26, 40, 40, 30, 26, 40, 40, 30, 24} },
1039		{ {36, 36, 36, 36, 30, 26, 36, 36, 30, 26, 36, 36, 30, 24} },
1040		{ {34, 34, 34, 34, 30, 26, 34, 34, 30, 26, 34, 34, 30, 24} },
1041	 },
1042	.ctlIndex_5G =  {
1043		0x10, 0x16, 0x18, 0x40, 0x46,
1044		0x48, 0x30, 0x36, 0x38
1045	},
1046	.ctl_freqbin_5G =  {
1047		{
1048			/* Data[0].ctlEdges[0].bChannel */ FREQ2FBIN(5180, 0),
1049			/* Data[0].ctlEdges[1].bChannel */ FREQ2FBIN(5260, 0),
1050			/* Data[0].ctlEdges[2].bChannel */ FREQ2FBIN(5280, 0),
1051			/* Data[0].ctlEdges[3].bChannel */ FREQ2FBIN(5500, 0),
1052			/* Data[0].ctlEdges[4].bChannel */ FREQ2FBIN(5600, 0),
1053			/* Data[0].ctlEdges[5].bChannel */ FREQ2FBIN(5700, 0),
1054			/* Data[0].ctlEdges[6].bChannel */ FREQ2FBIN(5745, 0),
1055			/* Data[0].ctlEdges[7].bChannel */ FREQ2FBIN(5825, 0)
1056		},
1057		{
1058			/* Data[1].ctlEdges[0].bChannel */ FREQ2FBIN(5180, 0),
1059			/* Data[1].ctlEdges[1].bChannel */ FREQ2FBIN(5260, 0),
1060			/* Data[1].ctlEdges[2].bChannel */ FREQ2FBIN(5280, 0),
1061			/* Data[1].ctlEdges[3].bChannel */ FREQ2FBIN(5500, 0),
1062			/* Data[1].ctlEdges[4].bChannel */ FREQ2FBIN(5520, 0),
1063			/* Data[1].ctlEdges[5].bChannel */ FREQ2FBIN(5700, 0),
1064			/* Data[1].ctlEdges[6].bChannel */ FREQ2FBIN(5745, 0),
1065			/* Data[1].ctlEdges[7].bChannel */ FREQ2FBIN(5825, 0)
1066		},
1067
1068		{
1069			/* Data[2].ctlEdges[0].bChannel */ FREQ2FBIN(5190, 0),
1070			/* Data[2].ctlEdges[1].bChannel */ FREQ2FBIN(5230, 0),
1071			/* Data[2].ctlEdges[2].bChannel */ FREQ2FBIN(5270, 0),
1072			/* Data[2].ctlEdges[3].bChannel */ FREQ2FBIN(5310, 0),
1073			/* Data[2].ctlEdges[4].bChannel */ FREQ2FBIN(5510, 0),
1074			/* Data[2].ctlEdges[5].bChannel */ FREQ2FBIN(5550, 0),
1075			/* Data[2].ctlEdges[6].bChannel */ FREQ2FBIN(5670, 0),
1076			/* Data[2].ctlEdges[7].bChannel */ FREQ2FBIN(5755, 0)
1077		},
1078
1079		{
1080			/* Data[3].ctlEdges[0].bChannel */ FREQ2FBIN(5180, 0),
1081			/* Data[3].ctlEdges[1].bChannel */ FREQ2FBIN(5200, 0),
1082			/* Data[3].ctlEdges[2].bChannel */ FREQ2FBIN(5260, 0),
1083			/* Data[3].ctlEdges[3].bChannel */ FREQ2FBIN(5320, 0),
1084			/* Data[3].ctlEdges[4].bChannel */ FREQ2FBIN(5500, 0),
1085			/* Data[3].ctlEdges[5].bChannel */ FREQ2FBIN(5700, 0),
1086			/* Data[3].ctlEdges[6].bChannel */ 0xFF,
1087			/* Data[3].ctlEdges[7].bChannel */ 0xFF,
1088		},
1089
1090		{
1091			/* Data[4].ctlEdges[0].bChannel */ FREQ2FBIN(5180, 0),
1092			/* Data[4].ctlEdges[1].bChannel */ FREQ2FBIN(5260, 0),
1093			/* Data[4].ctlEdges[2].bChannel */ FREQ2FBIN(5500, 0),
1094			/* Data[4].ctlEdges[3].bChannel */ FREQ2FBIN(5700, 0),
1095			/* Data[4].ctlEdges[4].bChannel */ 0xFF,
1096			/* Data[4].ctlEdges[5].bChannel */ 0xFF,
1097			/* Data[4].ctlEdges[6].bChannel */ 0xFF,
1098			/* Data[4].ctlEdges[7].bChannel */ 0xFF,
1099		},
1100
1101		{
1102			/* Data[5].ctlEdges[0].bChannel */ FREQ2FBIN(5190, 0),
1103			/* Data[5].ctlEdges[1].bChannel */ FREQ2FBIN(5270, 0),
1104			/* Data[5].ctlEdges[2].bChannel */ FREQ2FBIN(5310, 0),
1105			/* Data[5].ctlEdges[3].bChannel */ FREQ2FBIN(5510, 0),
1106			/* Data[5].ctlEdges[4].bChannel */ FREQ2FBIN(5590, 0),
1107			/* Data[5].ctlEdges[5].bChannel */ FREQ2FBIN(5670, 0),
1108			/* Data[5].ctlEdges[6].bChannel */ 0xFF,
1109			/* Data[5].ctlEdges[7].bChannel */ 0xFF
1110		},
1111
1112		{
1113			/* Data[6].ctlEdges[0].bChannel */ FREQ2FBIN(5180, 0),
1114			/* Data[6].ctlEdges[1].bChannel */ FREQ2FBIN(5200, 0),
1115			/* Data[6].ctlEdges[2].bChannel */ FREQ2FBIN(5220, 0),
1116			/* Data[6].ctlEdges[3].bChannel */ FREQ2FBIN(5260, 0),
1117			/* Data[6].ctlEdges[4].bChannel */ FREQ2FBIN(5500, 0),
1118			/* Data[6].ctlEdges[5].bChannel */ FREQ2FBIN(5600, 0),
1119			/* Data[6].ctlEdges[6].bChannel */ FREQ2FBIN(5700, 0),
1120			/* Data[6].ctlEdges[7].bChannel */ FREQ2FBIN(5745, 0)
1121		},
1122
1123		{
1124			/* Data[7].ctlEdges[0].bChannel */ FREQ2FBIN(5180, 0),
1125			/* Data[7].ctlEdges[1].bChannel */ FREQ2FBIN(5260, 0),
1126			/* Data[7].ctlEdges[2].bChannel */ FREQ2FBIN(5320, 0),
1127			/* Data[7].ctlEdges[3].bChannel */ FREQ2FBIN(5500, 0),
1128			/* Data[7].ctlEdges[4].bChannel */ FREQ2FBIN(5560, 0),
1129			/* Data[7].ctlEdges[5].bChannel */ FREQ2FBIN(5700, 0),
1130			/* Data[7].ctlEdges[6].bChannel */ FREQ2FBIN(5745, 0),
1131			/* Data[7].ctlEdges[7].bChannel */ FREQ2FBIN(5825, 0)
1132		},
1133
1134		{
1135			/* Data[8].ctlEdges[0].bChannel */ FREQ2FBIN(5190, 0),
1136			/* Data[8].ctlEdges[1].bChannel */ FREQ2FBIN(5230, 0),
1137			/* Data[8].ctlEdges[2].bChannel */ FREQ2FBIN(5270, 0),
1138			/* Data[8].ctlEdges[3].bChannel */ FREQ2FBIN(5510, 0),
1139			/* Data[8].ctlEdges[4].bChannel */ FREQ2FBIN(5550, 0),
1140			/* Data[8].ctlEdges[5].bChannel */ FREQ2FBIN(5670, 0),
1141			/* Data[8].ctlEdges[6].bChannel */ FREQ2FBIN(5755, 0),
1142			/* Data[8].ctlEdges[7].bChannel */ FREQ2FBIN(5795, 0)
1143		}
1144	 },
1145	.ctlPowerData_5G = {
1146		{
1147			{
1148				CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 1),
1149				CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 0),
1150			}
1151		},
1152		{
1153			{
1154				CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 1),
1155				CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 0),
1156			}
1157		},
1158		{
1159			{
1160				CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 1),
1161				CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 1),
1162			}
1163		},
1164		{
1165			{
1166				CTL(60, 0), CTL(60, 1), CTL(60, 1), CTL(60, 0),
1167				CTL(60, 1), CTL(60, 0), CTL(60, 0), CTL(60, 0),
1168			}
1169		},
1170		{
1171			{
1172				CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 0),
1173				CTL(60, 0), CTL(60, 0), CTL(60, 0), CTL(60, 0),
1174			}
1175		},
1176		{
1177			{
1178				CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 1),
1179				CTL(60, 1), CTL(60, 0), CTL(60, 0), CTL(60, 0),
1180			}
1181		},
1182		{
1183			{
1184				CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 1),
1185				CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 1),
1186			}
1187		},
1188		{
1189			{
1190				CTL(60, 1), CTL(60, 1), CTL(60, 0), CTL(60, 1),
1191				CTL(60, 1), CTL(60, 1), CTL(60, 1), CTL(60, 0),
1192			}
1193		},
1194		{
1195			{
1196				CTL(60, 1), CTL(60, 0), CTL(60, 1), CTL(60, 1),
1197				CTL(60, 1), CTL(60, 1), CTL(60, 0), CTL(60, 1),
1198			}
1199		},
1200	 }
1201};
1202
1203
1204static const struct ar9300_eeprom ar9300_h112 = {
1205	.eepromVersion = 2,
1206	.templateVersion = 3,
1207	.macAddr = {0x00, 0x03, 0x7f, 0x0, 0x0, 0x0},
1208	.custData = {"h112-241-f0000"},
1209	.baseEepHeader = {
1210		.regDmn = { LE16(0), LE16(0x1f) },
1211		.txrxMask =  0x77, /* 4 bits tx and 4 bits rx */
1212		.opCapFlags = {
1213			.opFlags = AR5416_OPFLAGS_11G | AR5416_OPFLAGS_11A,
1214			.eepMisc = AR9300_EEPMISC_LITTLE_ENDIAN,
1215		},
1216		.rfSilent = 0,
1217		.blueToothOptions = 0,
1218		.deviceCap = 0,
1219		.deviceType = 5, /* takes lower byte in eeprom location */
1220		.pwrTableOffset = AR9300_PWR_TABLE_OFFSET,
1221		.params_for_tuning_caps = {0, 0},
1222		.featureEnable = 0x0d,
1223		/*
1224		 * bit0 - enable tx temp comp - disabled
1225		 * bit1 - enable tx volt comp - disabled
1226		 * bit2 - enable fastClock - enabled
1227		 * bit3 - enable doubling - enabled
1228		 * bit4 - enable internal regulator - disabled
1229		 * bit5 - enable pa predistortion - disabled
1230		 */
1231		.miscConfiguration = 0, /* bit0 - turn down drivestrength */
1232		.eepromWriteEnableGpio = 6,
1233		.wlanDisableGpio = 0,
1234		.wlanLedGpio = 8,
1235		.rxBandSelectGpio = 0xff,
1236		.txrxgain = 0x10,
1237		.swreg = 0,
1238	},
1239	.modalHeader2G = {
1240		/* ar9300_modal_eep_header  2g */
1241		/* 4 idle,t1,t2,b(4 bits per setting) */
1242		.antCtrlCommon = LE32(0x110),
1243		/* 4 ra1l1, ra2l1, ra1l2, ra2l2, ra12 */
1244		.antCtrlCommon2 = LE32(0x44444),
1245
1246		/*
1247		 * antCtrlChain[AR9300_MAX_CHAINS]; 6 idle, t, r,
1248		 * rx1, rx12, b (2 bits each)
1249		 */
1250		.antCtrlChain = { LE16(0x150), LE16(0x150), LE16(0x150) },
1251
1252		/*
1253		 * xatten1DB[AR9300_MAX_CHAINS];  3 xatten1_db
1254		 * for ar9280 (0xa20c/b20c 5:0)
1255		 */
1256		.xatten1DB = {0, 0, 0},
1257
1258		/*
1259		 * xatten1Margin[AR9300_MAX_CHAINS]; 3 xatten1_margin
1260		 * for ar9280 (0xa20c/b20c 16:12
1261		 */
1262		.xatten1Margin = {0, 0, 0},
1263		.tempSlope = 25,
1264		.voltSlope = 0,
1265
1266		/*
1267		 * spurChans[OSPREY_EEPROM_MODAL_SPURS]; spur
1268		 * channels in usual fbin coding format
1269		 */
1270		.spurChans = {FREQ2FBIN(2464, 1), 0, 0, 0, 0},
1271
1272		/*
1273		 * noiseFloorThreshCh[AR9300_MAX_CHAINS]; 3 Check
1274		 * if the register is per chain
1275		 */
1276		.noiseFloorThreshCh = {-1, 0, 0},
1277		.reserved = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1278		.quick_drop = 0,
1279		.xpaBiasLvl = 0,
1280		.txFrameToDataStart = 0x0e,
1281		.txFrameToPaOn = 0x0e,
1282		.txClip = 3, /* 4 bits tx_clip, 4 bits dac_scale_cck */
1283		.antennaGain = 0,
1284		.switchSettling = 0x2c,
1285		.adcDesiredSize = -30,
1286		.txEndToXpaOff = 0,
1287		.txEndToRxOn = 0x2,
1288		.txFrameToXpaOn = 0xe,
1289		.thresh62 = 28,
1290		.papdRateMaskHt20 = LE32(0x0c80c080),
1291		.papdRateMaskHt40 = LE32(0x0080c080),
1292		.switchcomspdt = 0,
1293		.xlna_bias_strength = 0,
1294		.futureModal = {
1295			0, 0, 0, 0, 0, 0, 0,
1296		},
1297	},
1298	.base_ext1 = {
1299		.ant_div_control = 0,
1300		.future = {0, 0},
1301		.tempslopextension = {0, 0, 0, 0, 0, 0, 0, 0}
1302	},
1303	.calFreqPier2G = {
1304		FREQ2FBIN(2412, 1),
1305		FREQ2FBIN(2437, 1),
1306		FREQ2FBIN(2462, 1),
1307	},
1308	/* ar9300_cal_data_per_freq_op_loop 2g */
1309	.calPierData2G = {
1310		{ {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0} },
1311		{ {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0} },
1312		{ {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0} },
1313	},
1314	.calTarget_freqbin_Cck = {
1315		FREQ2FBIN(2412, 1),
1316		FREQ2FBIN(2472, 1),
1317	},
1318	.calTarget_freqbin_2G = {
1319		FREQ2FBIN(2412, 1),
1320		FREQ2FBIN(2437, 1),
1321		FREQ2FBIN(2472, 1)
1322	},
1323	.calTarget_freqbin_2GHT20 = {
1324		FREQ2FBIN(2412, 1),
1325		FREQ2FBIN(2437, 1),
1326		FREQ2FBIN(2472, 1)
1327	},
1328	.calTarget_freqbin_2GHT40 = {
1329		FREQ2FBIN(2412, 1),
1330		FREQ2FBIN(2437, 1),
1331		FREQ2FBIN(2472, 1)
1332	},
1333	.calTargetPowerCck = {
1334		/* 1L-5L,5S,11L,11S */
1335		{ {34, 34, 34, 34} },
1336		{ {34, 34, 34, 34} },
1337	},
1338	.calTargetPower2G = {
1339		/* 6-24,36,48,54 */
1340		{ {34, 34, 32, 32} },
1341		{ {34, 34, 32, 32} },
1342		{ {34, 34, 32, 32} },
1343	},
1344	.calTargetPower2GHT20 = {
1345		{ {32, 32, 32, 32, 32, 30, 32, 32, 30, 28, 28, 28, 28, 24} },
1346		{ {32, 32, 32, 32, 32, 30, 32, 32, 30, 28, 28, 28, 28, 24} },
1347		{ {32, 32, 32, 32, 32, 30, 32, 32, 30, 28, 28, 28, 28, 24} },
1348	},
1349	.calTargetPower2GHT40 = {
1350		{ {30, 30, 30, 30, 30, 28, 30, 30, 28, 26, 26, 26, 26, 22} },
1351		{ {30, 30, 30, 30, 30, 28, 30, 30, 28, 26, 26, 26, 26, 22} },
1352		{ {30, 30, 30, 30, 30, 28, 30, 30, 28, 26, 26, 26, 26, 22} },
1353	},
1354	.ctlIndex_2G =  {
1355		0x11, 0x12, 0x15, 0x17, 0x41, 0x42,
1356		0x45, 0x47, 0x31, 0x32, 0x35, 0x37,
1357	},
1358	.ctl_freqbin_2G = {
1359		{
1360			FREQ2FBIN(2412, 1),
1361			FREQ2FBIN(2417, 1),
1362			FREQ2FBIN(2457, 1),
1363			FREQ2FBIN(2462, 1)
1364		},
1365		{
1366			FREQ2FBIN(2412, 1),
1367			FREQ2FBIN(2417, 1),
1368			FREQ2FBIN(2462, 1),
1369			0xFF,
1370		},
1371
1372		{
1373			FREQ2FBIN(2412, 1),
1374			FREQ2FBIN(2417, 1),
1375			FREQ2FBIN(2462, 1),
1376			0xFF,
1377		},
1378		{
1379			FREQ2FBIN(2422, 1),
1380			FREQ2FBIN(2427, 1),
1381			FREQ2FBIN(2447, 1),
1382			FREQ2FBIN(2452, 1)
1383		},
1384
1385		{
1386			/* Data[4].ctlEdges[0].bChannel */ FREQ2FBIN(2412, 1),
1387			/* Data[4].ctlEdges[1].bChannel */ FREQ2FBIN(2417, 1),
1388			/* Data[4].ctlEdges[2].bChannel */ FREQ2FBIN(2472, 1),
1389			/* Data[4].ctlEdges[3].bChannel */ FREQ2FBIN(2484, 1),
1390		},
1391
1392		{
1393			/* Data[5].ctlEdges[0].bChannel */ FREQ2FBIN(2412, 1),
1394			/* Data[5].ctlEdges[1].bChannel */ FREQ2FBIN(2417, 1),
1395			/* Data[5].ctlEdges[2].bChannel */ FREQ2FBIN(2472, 1),
1396			0,
1397		},
1398
1399		{
1400			/* Data[6].ctlEdges[0].bChannel */ FREQ2FBIN(2412, 1),
1401			/* Data[6].ctlEdges[1].bChannel */ FREQ2FBIN(2417, 1),
1402			FREQ2FBIN(2472, 1),
1403			0,
1404		},
1405
1406		{
1407			/* Data[7].ctlEdges[0].bChannel */ FREQ2FBIN(2422, 1),
1408			/* Data[7].ctlEdges[1].bChannel */ FREQ2FBIN(2427, 1),
1409			/* Data[7].ctlEdges[2].bChannel */ FREQ2FBIN(2447, 1),
1410			/* Data[7].ctlEdges[3].bChannel */ FREQ2FBIN(2462, 1),
1411		},
1412
1413		{
1414			/* Data[8].ctlEdges[0].bChannel */ FREQ2FBIN(2412, 1),
1415			/* Data[8].ctlEdges[1].bChannel */ FREQ2FBIN(2417, 1),
1416			/* Data[8].ctlEdges[2].bChannel */ FREQ2FBIN(2472, 1),
1417		},
1418
1419		{
1420			/* Data[9].ctlEdges[0].bChannel */ FREQ2FBIN(2412, 1),
1421			/* Data[9].ctlEdges[1].bChannel */ FREQ2FBIN(2417, 1),
1422			/* Data[9].ctlEdges[2].bChannel */ FREQ2FBIN(2472, 1),
1423			0
1424		},
1425
1426		{
1427			/* Data[10].ctlEdges[0].bChannel */ FREQ2FBIN(2412, 1),
1428			/* Data[10].ctlEdges[1].bChannel */ FREQ2FBIN(2417, 1),
1429			/* Data[10].ctlEdges[2].bChannel */ FREQ2FBIN(2472, 1),
1430			0
1431		},
1432
1433		{
1434			/* Data[11].ctlEdges[0].bChannel */ FREQ2FBIN(2422, 1),
1435			/* Data[11].ctlEdges[1].bChannel */ FREQ2FBIN(2427, 1),
1436			/* Data[11].ctlEdges[2].bChannel */ FREQ2FBIN(2447, 1),
1437			/* Data[11].ctlEdges[3].bChannel */ FREQ2FBIN(2462, 1),
1438		}
1439	},
1440	.ctlPowerData_2G = {
1441		{ { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } },
1442		{ { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } },
1443		{ { CTL(60, 1), CTL(60, 0), CTL(60, 0), CTL(60, 1) } },
1444
1445		{ { CTL(60, 1), CTL(60, 0), CTL(60, 0), CTL(60, 0) } },
1446		{ { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } },
1447		{ { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } },
1448
1449		{ { CTL(60, 0), CTL(60, 1), CTL(60, 1), CTL(60, 0) } },
1450		{ { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } },
1451		{ { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } },
1452
1453		{ { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } },
1454		{ { CTL(60, 0), CTL(60, 1), CTL(60, 1), CTL(60, 1) } },
1455		{ { CTL(60, 0), CTL(60, 1), CTL(60, 1), CTL(60, 1) } },
1456	},
1457	.modalHeader5G = {
1458		/* 4 idle,t1,t2,b (4 bits per setting) */
1459		.antCtrlCommon = LE32(0x220),
1460		/* 4 ra1l1, ra2l1, ra1l2,ra2l2,ra12 */
1461		.antCtrlCommon2 = LE32(0x44444),
1462		/* antCtrlChain 6 idle, t,r,rx1,rx12,b (2 bits each) */
1463		.antCtrlChain = {
1464			LE16(0x150), LE16(0x150), LE16(0x150),
1465		},
1466		/* xatten1DB 3 xatten1_db for AR9280 (0xa20c/b20c 5:0) */
1467		.xatten1DB = {0, 0, 0},
1468
1469		/*
1470		 * xatten1Margin[AR9300_MAX_CHAINS]; 3 xatten1_margin
1471		 * for merlin (0xa20c/b20c 16:12
1472		 */
1473		.xatten1Margin = {0, 0, 0},
1474		.tempSlope = 45,
1475		.voltSlope = 0,
1476		/* spurChans spur channels in usual fbin coding format */
1477		.spurChans = {0, 0, 0, 0, 0},
1478		/* noiseFloorThreshCh Check if the register is per chain */
1479		.noiseFloorThreshCh = {-1, 0, 0},
1480		.reserved = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1481		.quick_drop = 0,
1482		.xpaBiasLvl = 0,
1483		.txFrameToDataStart = 0x0e,
1484		.txFrameToPaOn = 0x0e,
1485		.txClip = 3, /* 4 bits tx_clip, 4 bits dac_scale_cck */
1486		.antennaGain = 0,
1487		.switchSettling = 0x2d,
1488		.adcDesiredSize = -30,
1489		.txEndToXpaOff = 0,
1490		.txEndToRxOn = 0x2,
1491		.txFrameToXpaOn = 0xe,
1492		.thresh62 = 28,
1493		.papdRateMaskHt20 = LE32(0x0cf0e0e0),
1494		.papdRateMaskHt40 = LE32(0x6cf0e0e0),
1495		.switchcomspdt = 0,
1496		.xlna_bias_strength = 0,
1497		.futureModal = {
1498			0, 0, 0, 0, 0, 0, 0,
1499		},
1500	},
1501	.base_ext2 = {
1502		.tempSlopeLow = 40,
1503		.tempSlopeHigh = 50,
1504		.xatten1DBLow = {0, 0, 0},
1505		.xatten1MarginLow = {0, 0, 0},
1506		.xatten1DBHigh = {0, 0, 0},
1507		.xatten1MarginHigh = {0, 0, 0}
1508	},
1509	.calFreqPier5G = {
1510		FREQ2FBIN(5180, 0),
1511		FREQ2FBIN(5220, 0),
1512		FREQ2FBIN(5320, 0),
1513		FREQ2FBIN(5400, 0),
1514		FREQ2FBIN(5500, 0),
1515		FREQ2FBIN(5600, 0),
1516		FREQ2FBIN(5700, 0),
1517		FREQ2FBIN(5785, 0)
1518	},
1519	.calPierData5G = {
1520		{
1521			{0, 0, 0, 0, 0},
1522			{0, 0, 0, 0, 0},
1523			{0, 0, 0, 0, 0},
1524			{0, 0, 0, 0, 0},
1525			{0, 0, 0, 0, 0},
1526			{0, 0, 0, 0, 0},
1527			{0, 0, 0, 0, 0},
1528			{0, 0, 0, 0, 0},
1529		},
1530		{
1531			{0, 0, 0, 0, 0},
1532			{0, 0, 0, 0, 0},
1533			{0, 0, 0, 0, 0},
1534			{0, 0, 0, 0, 0},
1535			{0, 0, 0, 0, 0},
1536			{0, 0, 0, 0, 0},
1537			{0, 0, 0, 0, 0},
1538			{0, 0, 0, 0, 0},
1539		},
1540		{
1541			{0, 0, 0, 0, 0},
1542			{0, 0, 0, 0, 0},
1543			{0, 0, 0, 0, 0},
1544			{0, 0, 0, 0, 0},
1545			{0, 0, 0, 0, 0},
1546			{0, 0, 0, 0, 0},
1547			{0, 0, 0, 0, 0},
1548			{0, 0, 0, 0, 0},
1549		},
1550
1551	},
1552	.calTarget_freqbin_5G = {
1553		FREQ2FBIN(5180, 0),
1554		FREQ2FBIN(5240, 0),
1555		FREQ2FBIN(5320, 0),
1556		FREQ2FBIN(5400, 0),
1557		FREQ2FBIN(5500, 0),
1558		FREQ2FBIN(5600, 0),
1559		FREQ2FBIN(5700, 0),
1560		FREQ2FBIN(5825, 0)
1561	},
1562	.calTarget_freqbin_5GHT20 = {
1563		FREQ2FBIN(5180, 0),
1564		FREQ2FBIN(5240, 0),
1565		FREQ2FBIN(5320, 0),
1566		FREQ2FBIN(5400, 0),
1567		FREQ2FBIN(5500, 0),
1568		FREQ2FBIN(5700, 0),
1569		FREQ2FBIN(5745, 0),
1570		FREQ2FBIN(5825, 0)
1571	},
1572	.calTarget_freqbin_5GHT40 = {
1573		FREQ2FBIN(5180, 0),
1574		FREQ2FBIN(5240, 0),
1575		FREQ2FBIN(5320, 0),
1576		FREQ2FBIN(5400, 0),
1577		FREQ2FBIN(5500, 0),
1578		FREQ2FBIN(5700, 0),
1579		FREQ2FBIN(5745, 0),
1580		FREQ2FBIN(5825, 0)
1581	},
1582	.calTargetPower5G = {
1583		/* 6-24,36,48,54 */
1584		{ {30, 30, 28, 24} },
1585		{ {30, 30, 28, 24} },
1586		{ {30, 30, 28, 24} },
1587		{ {30, 30, 28, 24} },
1588		{ {30, 30, 28, 24} },
1589		{ {30, 30, 28, 24} },
1590		{ {30, 30, 28, 24} },
1591		{ {30, 30, 28, 24} },
1592	},
1593	.calTargetPower5GHT20 = {
1594		/*
1595		 * 0_8_16,1-3_9-11_17-19,
1596		 * 4,5,6,7,12,13,14,15,20,21,22,23
1597		 */
1598		{ {30, 30, 30, 28, 24, 20, 30, 28, 24, 20, 20, 20, 20, 16} },
1599		{ {30, 30, 30, 28, 24, 20, 30, 28, 24, 20, 20, 20, 20, 16} },
1600		{ {30, 30, 30, 26, 22, 18, 30, 26, 22, 18, 18, 18, 18, 16} },
1601		{ {30, 30, 30, 26, 22, 18, 30, 26, 22, 18, 18, 18, 18, 16} },
1602		{ {30, 30, 30, 24, 20, 16, 30, 24, 20, 16, 16, 16, 16, 14} },
1603		{ {30, 30, 30, 24, 20, 16, 30, 24, 20, 16, 16, 16, 16, 14} },
1604		{ {30, 30, 30, 22, 18, 14, 30, 22, 18, 14, 14, 14, 14, 12} },
1605		{ {30, 30, 30, 22, 18, 14, 30, 22, 18, 14, 14, 14, 14, 12} },
1606	},
1607	.calTargetPower5GHT40 =  {
1608		/*
1609		 * 0_8_16,1-3_9-11_17-19,
1610		 * 4,5,6,7,12,13,14,15,20,21,22,23
1611		 */
1612		{ {28, 28, 28, 26, 22, 18, 28, 26, 22, 18, 18, 18, 18, 14} },
1613		{ {28, 28, 28, 26, 22, 18, 28, 26, 22, 18, 18, 18, 18, 14} },
1614		{ {28, 28, 28, 24, 20, 16, 28, 24, 20, 16, 16, 16, 16, 12} },
1615		{ {28, 28, 28, 24, 20, 16, 28, 24, 20, 16, 16, 16, 16, 12} },
1616		{ {28, 28, 28, 22, 18, 14, 28, 22, 18, 14, 14, 14, 14, 10} },
1617		{ {28, 28, 28, 22, 18, 14, 28, 22, 18, 14, 14, 14, 14, 10} },
1618		{ {28, 28, 28, 20, 16, 12, 28, 20, 16, 12, 12, 12, 12, 8} },
1619		{ {28, 28, 28, 20, 16, 12, 28, 20, 16, 12, 12, 12, 12, 8} },
1620	},
1621	.ctlIndex_5G =  {
1622		0x10, 0x16, 0x18, 0x40, 0x46,
1623		0x48, 0x30, 0x36, 0x38
1624	},
1625	.ctl_freqbin_5G =  {
1626		{
1627			/* Data[0].ctlEdges[0].bChannel */ FREQ2FBIN(5180, 0),
1628			/* Data[0].ctlEdges[1].bChannel */ FREQ2FBIN(5260, 0),
1629			/* Data[0].ctlEdges[2].bChannel */ FREQ2FBIN(5280, 0),
1630			/* Data[0].ctlEdges[3].bChannel */ FREQ2FBIN(5500, 0),
1631			/* Data[0].ctlEdges[4].bChannel */ FREQ2FBIN(5600, 0),
1632			/* Data[0].ctlEdges[5].bChannel */ FREQ2FBIN(5700, 0),
1633			/* Data[0].ctlEdges[6].bChannel */ FREQ2FBIN(5745, 0),
1634			/* Data[0].ctlEdges[7].bChannel */ FREQ2FBIN(5825, 0)
1635		},
1636		{
1637			/* Data[1].ctlEdges[0].bChannel */ FREQ2FBIN(5180, 0),
1638			/* Data[1].ctlEdges[1].bChannel */ FREQ2FBIN(5260, 0),
1639			/* Data[1].ctlEdges[2].bChannel */ FREQ2FBIN(5280, 0),
1640			/* Data[1].ctlEdges[3].bChannel */ FREQ2FBIN(5500, 0),
1641			/* Data[1].ctlEdges[4].bChannel */ FREQ2FBIN(5520, 0),
1642			/* Data[1].ctlEdges[5].bChannel */ FREQ2FBIN(5700, 0),
1643			/* Data[1].ctlEdges[6].bChannel */ FREQ2FBIN(5745, 0),
1644			/* Data[1].ctlEdges[7].bChannel */ FREQ2FBIN(5825, 0)
1645		},
1646
1647		{
1648			/* Data[2].ctlEdges[0].bChannel */ FREQ2FBIN(5190, 0),
1649			/* Data[2].ctlEdges[1].bChannel */ FREQ2FBIN(5230, 0),
1650			/* Data[2].ctlEdges[2].bChannel */ FREQ2FBIN(5270, 0),
1651			/* Data[2].ctlEdges[3].bChannel */ FREQ2FBIN(5310, 0),
1652			/* Data[2].ctlEdges[4].bChannel */ FREQ2FBIN(5510, 0),
1653			/* Data[2].ctlEdges[5].bChannel */ FREQ2FBIN(5550, 0),
1654			/* Data[2].ctlEdges[6].bChannel */ FREQ2FBIN(5670, 0),
1655			/* Data[2].ctlEdges[7].bChannel */ FREQ2FBIN(5755, 0)
1656		},
1657
1658		{
1659			/* Data[3].ctlEdges[0].bChannel */ FREQ2FBIN(5180, 0),
1660			/* Data[3].ctlEdges[1].bChannel */ FREQ2FBIN(5200, 0),
1661			/* Data[3].ctlEdges[2].bChannel */ FREQ2FBIN(5260, 0),
1662			/* Data[3].ctlEdges[3].bChannel */ FREQ2FBIN(5320, 0),
1663			/* Data[3].ctlEdges[4].bChannel */ FREQ2FBIN(5500, 0),
1664			/* Data[3].ctlEdges[5].bChannel */ FREQ2FBIN(5700, 0),
1665			/* Data[3].ctlEdges[6].bChannel */ 0xFF,
1666			/* Data[3].ctlEdges[7].bChannel */ 0xFF,
1667		},
1668
1669		{
1670			/* Data[4].ctlEdges[0].bChannel */ FREQ2FBIN(5180, 0),
1671			/* Data[4].ctlEdges[1].bChannel */ FREQ2FBIN(5260, 0),
1672			/* Data[4].ctlEdges[2].bChannel */ FREQ2FBIN(5500, 0),
1673			/* Data[4].ctlEdges[3].bChannel */ FREQ2FBIN(5700, 0),
1674			/* Data[4].ctlEdges[4].bChannel */ 0xFF,
1675			/* Data[4].ctlEdges[5].bChannel */ 0xFF,
1676			/* Data[4].ctlEdges[6].bChannel */ 0xFF,
1677			/* Data[4].ctlEdges[7].bChannel */ 0xFF,
1678		},
1679
1680		{
1681			/* Data[5].ctlEdges[0].bChannel */ FREQ2FBIN(5190, 0),
1682			/* Data[5].ctlEdges[1].bChannel */ FREQ2FBIN(5270, 0),
1683			/* Data[5].ctlEdges[2].bChannel */ FREQ2FBIN(5310, 0),
1684			/* Data[5].ctlEdges[3].bChannel */ FREQ2FBIN(5510, 0),
1685			/* Data[5].ctlEdges[4].bChannel */ FREQ2FBIN(5590, 0),
1686			/* Data[5].ctlEdges[5].bChannel */ FREQ2FBIN(5670, 0),
1687			/* Data[5].ctlEdges[6].bChannel */ 0xFF,
1688			/* Data[5].ctlEdges[7].bChannel */ 0xFF
1689		},
1690
1691		{
1692			/* Data[6].ctlEdges[0].bChannel */ FREQ2FBIN(5180, 0),
1693			/* Data[6].ctlEdges[1].bChannel */ FREQ2FBIN(5200, 0),
1694			/* Data[6].ctlEdges[2].bChannel */ FREQ2FBIN(5220, 0),
1695			/* Data[6].ctlEdges[3].bChannel */ FREQ2FBIN(5260, 0),
1696			/* Data[6].ctlEdges[4].bChannel */ FREQ2FBIN(5500, 0),
1697			/* Data[6].ctlEdges[5].bChannel */ FREQ2FBIN(5600, 0),
1698			/* Data[6].ctlEdges[6].bChannel */ FREQ2FBIN(5700, 0),
1699			/* Data[6].ctlEdges[7].bChannel */ FREQ2FBIN(5745, 0)
1700		},
1701
1702		{
1703			/* Data[7].ctlEdges[0].bChannel */ FREQ2FBIN(5180, 0),
1704			/* Data[7].ctlEdges[1].bChannel */ FREQ2FBIN(5260, 0),
1705			/* Data[7].ctlEdges[2].bChannel */ FREQ2FBIN(5320, 0),
1706			/* Data[7].ctlEdges[3].bChannel */ FREQ2FBIN(5500, 0),
1707			/* Data[7].ctlEdges[4].bChannel */ FREQ2FBIN(5560, 0),
1708			/* Data[7].ctlEdges[5].bChannel */ FREQ2FBIN(5700, 0),
1709			/* Data[7].ctlEdges[6].bChannel */ FREQ2FBIN(5745, 0),
1710			/* Data[7].ctlEdges[7].bChannel */ FRE

Large files files are truncated, but you can click here to view the full file