1*572ff6f6SMatthew Dillon /* 2*572ff6f6SMatthew Dillon * Copyright (c) 2008 Sam Leffler, Errno Consulting 3*572ff6f6SMatthew Dillon * Copyright (c) 2008 Atheros Communications, Inc. 4*572ff6f6SMatthew Dillon * 5*572ff6f6SMatthew Dillon * Permission to use, copy, modify, and/or distribute this software for any 6*572ff6f6SMatthew Dillon * purpose with or without fee is hereby granted, provided that the above 7*572ff6f6SMatthew Dillon * copyright notice and this permission notice appear in all copies. 8*572ff6f6SMatthew Dillon * 9*572ff6f6SMatthew Dillon * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10*572ff6f6SMatthew Dillon * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11*572ff6f6SMatthew Dillon * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12*572ff6f6SMatthew Dillon * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13*572ff6f6SMatthew Dillon * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14*572ff6f6SMatthew Dillon * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15*572ff6f6SMatthew Dillon * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16*572ff6f6SMatthew Dillon * 17*572ff6f6SMatthew Dillon * $FreeBSD$ 18*572ff6f6SMatthew Dillon */ 19*572ff6f6SMatthew Dillon #ifndef _AH_EEPROM_V14_H_ 20*572ff6f6SMatthew Dillon #define _AH_EEPROM_V14_H_ 21*572ff6f6SMatthew Dillon 22*572ff6f6SMatthew Dillon #include "ah_eeprom.h" 23*572ff6f6SMatthew Dillon 24*572ff6f6SMatthew Dillon /* reg_off = 4 * (eep_off) */ 25*572ff6f6SMatthew Dillon #define AR5416_EEPROM_S 2 26*572ff6f6SMatthew Dillon #define AR5416_EEPROM_OFFSET 0x2000 27*572ff6f6SMatthew Dillon #define AR5416_EEPROM_START_ADDR 0x503f1200 28*572ff6f6SMatthew Dillon #define AR5416_EEPROM_MAX 0xae0 /* Ignore for the moment used only on the flash implementations */ 29*572ff6f6SMatthew Dillon #define AR5416_EEPROM_MAGIC 0xa55a 30*572ff6f6SMatthew Dillon #define AR5416_EEPROM_MAGIC_OFFSET 0x0 31*572ff6f6SMatthew Dillon 32*572ff6f6SMatthew Dillon #define owl_get_ntxchains(_txchainmask) \ 33*572ff6f6SMatthew Dillon (((_txchainmask >> 2) & 1) + ((_txchainmask >> 1) & 1) + (_txchainmask & 1)) 34*572ff6f6SMatthew Dillon 35*572ff6f6SMatthew Dillon #ifdef __LINUX_ARM_ARCH__ /* AP71 */ 36*572ff6f6SMatthew Dillon #define owl_eep_start_loc 0 37*572ff6f6SMatthew Dillon #else 38*572ff6f6SMatthew Dillon #define owl_eep_start_loc 256 39*572ff6f6SMatthew Dillon #endif 40*572ff6f6SMatthew Dillon 41*572ff6f6SMatthew Dillon /* End temp defines */ 42*572ff6f6SMatthew Dillon 43*572ff6f6SMatthew Dillon #define AR5416_EEP_NO_BACK_VER 0x1 44*572ff6f6SMatthew Dillon #define AR5416_EEP_VER 0xE 45*572ff6f6SMatthew Dillon #define AR5416_EEP_VER_MINOR_MASK 0xFFF 46*572ff6f6SMatthew Dillon // Adds modal params txFrameToPaOn, txFrametoDataStart, ht40PowerInc 47*572ff6f6SMatthew Dillon #define AR5416_EEP_MINOR_VER_2 0x2 48*572ff6f6SMatthew Dillon // Adds modal params bswAtten, bswMargin, swSettle and base OpFlags for HT20/40 Disable 49*572ff6f6SMatthew Dillon #define AR5416_EEP_MINOR_VER_3 0x3 50*572ff6f6SMatthew Dillon #define AR5416_EEP_MINOR_VER_7 0x7 51*572ff6f6SMatthew Dillon #define AR5416_EEP_MINOR_VER_9 0x9 52*572ff6f6SMatthew Dillon #define AR5416_EEP_MINOR_VER_10 0xa 53*572ff6f6SMatthew Dillon #define AR5416_EEP_MINOR_VER_16 0x10 54*572ff6f6SMatthew Dillon #define AR5416_EEP_MINOR_VER_17 0x11 55*572ff6f6SMatthew Dillon #define AR5416_EEP_MINOR_VER_19 0x13 56*572ff6f6SMatthew Dillon #define AR5416_EEP_MINOR_VER_20 0x14 57*572ff6f6SMatthew Dillon #define AR5416_EEP_MINOR_VER_21 0x15 58*572ff6f6SMatthew Dillon #define AR5416_EEP_MINOR_VER_22 0x16 59*572ff6f6SMatthew Dillon 60*572ff6f6SMatthew Dillon // 16-bit offset location start of calibration struct 61*572ff6f6SMatthew Dillon #define AR5416_EEP_START_LOC 256 62*572ff6f6SMatthew Dillon #define AR5416_NUM_5G_CAL_PIERS 8 63*572ff6f6SMatthew Dillon #define AR5416_NUM_2G_CAL_PIERS 4 64*572ff6f6SMatthew Dillon #define AR5416_NUM_5G_20_TARGET_POWERS 8 65*572ff6f6SMatthew Dillon #define AR5416_NUM_5G_40_TARGET_POWERS 8 66*572ff6f6SMatthew Dillon #define AR5416_NUM_2G_CCK_TARGET_POWERS 3 67*572ff6f6SMatthew Dillon #define AR5416_NUM_2G_20_TARGET_POWERS 4 68*572ff6f6SMatthew Dillon #define AR5416_NUM_2G_40_TARGET_POWERS 4 69*572ff6f6SMatthew Dillon #define AR5416_NUM_CTLS 24 70*572ff6f6SMatthew Dillon #define AR5416_NUM_BAND_EDGES 8 71*572ff6f6SMatthew Dillon #define AR5416_NUM_PD_GAINS 4 72*572ff6f6SMatthew Dillon #define AR5416_PD_GAINS_IN_MASK 4 73*572ff6f6SMatthew Dillon #define AR5416_PD_GAIN_ICEPTS 5 74*572ff6f6SMatthew Dillon #define AR5416_EEPROM_MODAL_SPURS 5 75*572ff6f6SMatthew Dillon #define AR5416_MAX_RATE_POWER 63 76*572ff6f6SMatthew Dillon #define AR5416_NUM_PDADC_VALUES 128 77*572ff6f6SMatthew Dillon #define AR5416_NUM_RATES 16 78*572ff6f6SMatthew Dillon #define AR5416_BCHAN_UNUSED 0xFF 79*572ff6f6SMatthew Dillon #define AR5416_MAX_PWR_RANGE_IN_HALF_DB 64 80*572ff6f6SMatthew Dillon #define AR5416_EEPMISC_BIG_ENDIAN 0x01 81*572ff6f6SMatthew Dillon #define FREQ2FBIN(x,y) ((y) ? ((x) - 2300) : (((x) - 4800) / 5)) 82*572ff6f6SMatthew Dillon #define AR5416_MAX_CHAINS 3 83*572ff6f6SMatthew Dillon #define AR5416_PWR_TABLE_OFFSET_DB -5 84*572ff6f6SMatthew Dillon #define AR5416_ANT_16S 25 85*572ff6f6SMatthew Dillon 86*572ff6f6SMatthew Dillon #define AR5416_NUM_ANT_CHAIN_FIELDS 7 87*572ff6f6SMatthew Dillon #define AR5416_NUM_ANT_COMMON_FIELDS 4 88*572ff6f6SMatthew Dillon #define AR5416_SIZE_ANT_CHAIN_FIELD 3 89*572ff6f6SMatthew Dillon #define AR5416_SIZE_ANT_COMMON_FIELD 4 90*572ff6f6SMatthew Dillon #define AR5416_ANT_CHAIN_MASK 0x7 91*572ff6f6SMatthew Dillon #define AR5416_ANT_COMMON_MASK 0xf 92*572ff6f6SMatthew Dillon #define AR5416_CHAIN_0_IDX 0 93*572ff6f6SMatthew Dillon #define AR5416_CHAIN_1_IDX 1 94*572ff6f6SMatthew Dillon #define AR5416_CHAIN_2_IDX 2 95*572ff6f6SMatthew Dillon 96*572ff6f6SMatthew Dillon #define AR5416_OPFLAGS_11A 0x01 97*572ff6f6SMatthew Dillon #define AR5416_OPFLAGS_11G 0x02 98*572ff6f6SMatthew Dillon #define AR5416_OPFLAGS_N_5G_HT40 0x04 /* If set, disable 5G HT40 */ 99*572ff6f6SMatthew Dillon #define AR5416_OPFLAGS_N_2G_HT40 0x08 100*572ff6f6SMatthew Dillon #define AR5416_OPFLAGS_N_5G_HT20 0x10 101*572ff6f6SMatthew Dillon #define AR5416_OPFLAGS_N_2G_HT20 0x20 102*572ff6f6SMatthew Dillon 103*572ff6f6SMatthew Dillon /* RF silent fields in EEPROM */ 104*572ff6f6SMatthew Dillon #define EEP_RFSILENT_ENABLED 0x0001 /* enabled/disabled */ 105*572ff6f6SMatthew Dillon #define EEP_RFSILENT_ENABLED_S 0 106*572ff6f6SMatthew Dillon #define EEP_RFSILENT_POLARITY 0x0002 /* polarity */ 107*572ff6f6SMatthew Dillon #define EEP_RFSILENT_POLARITY_S 1 108*572ff6f6SMatthew Dillon #define EEP_RFSILENT_GPIO_SEL 0x001c /* gpio PIN */ 109*572ff6f6SMatthew Dillon #define EEP_RFSILENT_GPIO_SEL_S 2 110*572ff6f6SMatthew Dillon 111*572ff6f6SMatthew Dillon /* Rx gain type values */ 112*572ff6f6SMatthew Dillon #define AR5416_EEP_RXGAIN_23dB_BACKOFF 0 113*572ff6f6SMatthew Dillon #define AR5416_EEP_RXGAIN_13dB_BACKOFF 1 114*572ff6f6SMatthew Dillon #define AR5416_EEP_RXGAIN_ORIG 2 115*572ff6f6SMatthew Dillon 116*572ff6f6SMatthew Dillon /* Tx gain type values */ 117*572ff6f6SMatthew Dillon #define AR5416_EEP_TXGAIN_ORIG 0 118*572ff6f6SMatthew Dillon #define AR5416_EEP_TXGAIN_HIGH_POWER 1 119*572ff6f6SMatthew Dillon 120*572ff6f6SMatthew Dillon typedef struct spurChanStruct { 121*572ff6f6SMatthew Dillon uint16_t spurChan; 122*572ff6f6SMatthew Dillon uint8_t spurRangeLow; 123*572ff6f6SMatthew Dillon uint8_t spurRangeHigh; 124*572ff6f6SMatthew Dillon } __packed SPUR_CHAN; 125*572ff6f6SMatthew Dillon 126*572ff6f6SMatthew Dillon typedef struct CalTargetPowerLegacy { 127*572ff6f6SMatthew Dillon uint8_t bChannel; 128*572ff6f6SMatthew Dillon uint8_t tPow2x[4]; 129*572ff6f6SMatthew Dillon } __packed CAL_TARGET_POWER_LEG; 130*572ff6f6SMatthew Dillon 131*572ff6f6SMatthew Dillon typedef struct CalTargetPowerHt { 132*572ff6f6SMatthew Dillon uint8_t bChannel; 133*572ff6f6SMatthew Dillon uint8_t tPow2x[8]; 134*572ff6f6SMatthew Dillon } __packed CAL_TARGET_POWER_HT; 135*572ff6f6SMatthew Dillon 136*572ff6f6SMatthew Dillon typedef struct CalCtlEdges { 137*572ff6f6SMatthew Dillon uint8_t bChannel; 138*572ff6f6SMatthew Dillon uint8_t tPowerFlag; /* [0..5] tPower [6..7] flag */ 139*572ff6f6SMatthew Dillon #define CAL_CTL_EDGES_POWER 0x3f 140*572ff6f6SMatthew Dillon #define CAL_CTL_EDGES_POWER_S 0 141*572ff6f6SMatthew Dillon #define CAL_CTL_EDGES_FLAG 0xc0 142*572ff6f6SMatthew Dillon #define CAL_CTL_EDGES_FLAG_S 6 143*572ff6f6SMatthew Dillon } __packed CAL_CTL_EDGES; 144*572ff6f6SMatthew Dillon 145*572ff6f6SMatthew Dillon /* 146*572ff6f6SMatthew Dillon * These are the secondary regulatory domain flags 147*572ff6f6SMatthew Dillon * for regDmn[1]. 148*572ff6f6SMatthew Dillon */ 149*572ff6f6SMatthew Dillon #define AR5416_REGDMN_EN_FCC_MID 0x01 /* 5.47 - 5.7GHz operation */ 150*572ff6f6SMatthew Dillon #define AR5416_REGDMN_EN_JAP_MID 0x02 /* 5.47 - 5.7GHz operation */ 151*572ff6f6SMatthew Dillon #define AR5416_REGDMN_EN_FCC_DFS_HT40 0x04 /* FCC HT40 + DFS operation */ 152*572ff6f6SMatthew Dillon #define AR5416_REGDMN_EN_JAP_HT40 0x08 /* JP HT40 operation */ 153*572ff6f6SMatthew Dillon #define AR5416_REGDMN_EN_JAP_DFS_HT40 0x10 /* JP HT40 + DFS operation */ 154*572ff6f6SMatthew Dillon 155*572ff6f6SMatthew Dillon /* 156*572ff6f6SMatthew Dillon * NB: The format in EEPROM has words 0 and 2 swapped (i.e. version 157*572ff6f6SMatthew Dillon * and length are swapped). We reverse their position after reading 158*572ff6f6SMatthew Dillon * the data into host memory so the version field is at the same 159*572ff6f6SMatthew Dillon * offset as in previous EEPROM layouts. This makes utilities that 160*572ff6f6SMatthew Dillon * inspect the EEPROM contents work without looking at the PCI device 161*572ff6f6SMatthew Dillon * id which may or may not be reliable. 162*572ff6f6SMatthew Dillon */ 163*572ff6f6SMatthew Dillon typedef struct BaseEepHeader { 164*572ff6f6SMatthew Dillon uint16_t version; /* NB: length in EEPROM */ 165*572ff6f6SMatthew Dillon uint16_t checksum; 166*572ff6f6SMatthew Dillon uint16_t length; /* NB: version in EEPROM */ 167*572ff6f6SMatthew Dillon uint8_t opCapFlags; 168*572ff6f6SMatthew Dillon uint8_t eepMisc; 169*572ff6f6SMatthew Dillon uint16_t regDmn[2]; 170*572ff6f6SMatthew Dillon uint8_t macAddr[6]; 171*572ff6f6SMatthew Dillon uint8_t rxMask; 172*572ff6f6SMatthew Dillon uint8_t txMask; 173*572ff6f6SMatthew Dillon uint16_t rfSilent; 174*572ff6f6SMatthew Dillon uint16_t blueToothOptions; 175*572ff6f6SMatthew Dillon uint16_t deviceCap; 176*572ff6f6SMatthew Dillon uint32_t binBuildNumber; 177*572ff6f6SMatthew Dillon uint8_t deviceType; 178*572ff6f6SMatthew Dillon uint8_t pwdclkind; 179*572ff6f6SMatthew Dillon uint8_t fastClk5g; 180*572ff6f6SMatthew Dillon uint8_t divChain; 181*572ff6f6SMatthew Dillon uint8_t rxGainType; 182*572ff6f6SMatthew Dillon uint8_t dacHiPwrMode_5G;/* use the DAC high power mode (MB91) */ 183*572ff6f6SMatthew Dillon uint8_t openLoopPwrCntl;/* 1: use open loop power control, 184*572ff6f6SMatthew Dillon 0: use closed loop power control */ 185*572ff6f6SMatthew Dillon uint8_t dacLpMode; 186*572ff6f6SMatthew Dillon uint8_t txGainType; /* high power tx gain table support */ 187*572ff6f6SMatthew Dillon uint8_t rcChainMask; /* "1" if the card is an HB93 1x2 */ 188*572ff6f6SMatthew Dillon uint8_t desiredScaleCCK; 189*572ff6f6SMatthew Dillon uint8_t pwr_table_offset; 190*572ff6f6SMatthew Dillon uint8_t frac_n_5g; /* 191*572ff6f6SMatthew Dillon * bit 0: indicates that fracN synth 192*572ff6f6SMatthew Dillon * mode applies to all 5G channels 193*572ff6f6SMatthew Dillon */ 194*572ff6f6SMatthew Dillon uint8_t futureBase[21]; 195*572ff6f6SMatthew Dillon } __packed BASE_EEP_HEADER; // 64 B 196*572ff6f6SMatthew Dillon 197*572ff6f6SMatthew Dillon typedef struct ModalEepHeader { 198*572ff6f6SMatthew Dillon uint32_t antCtrlChain[AR5416_MAX_CHAINS]; // 12 199*572ff6f6SMatthew Dillon uint32_t antCtrlCommon; // 4 200*572ff6f6SMatthew Dillon int8_t antennaGainCh[AR5416_MAX_CHAINS]; // 3 201*572ff6f6SMatthew Dillon uint8_t switchSettling; // 1 202*572ff6f6SMatthew Dillon uint8_t txRxAttenCh[AR5416_MAX_CHAINS]; // 3 203*572ff6f6SMatthew Dillon uint8_t rxTxMarginCh[AR5416_MAX_CHAINS]; // 3 204*572ff6f6SMatthew Dillon uint8_t adcDesiredSize; // 1 205*572ff6f6SMatthew Dillon int8_t pgaDesiredSize; // 1 206*572ff6f6SMatthew Dillon uint8_t xlnaGainCh[AR5416_MAX_CHAINS]; // 3 207*572ff6f6SMatthew Dillon uint8_t txEndToXpaOff; // 1 208*572ff6f6SMatthew Dillon uint8_t txEndToRxOn; // 1 209*572ff6f6SMatthew Dillon uint8_t txFrameToXpaOn; // 1 210*572ff6f6SMatthew Dillon uint8_t thresh62; // 1 211*572ff6f6SMatthew Dillon uint8_t noiseFloorThreshCh[AR5416_MAX_CHAINS]; // 3 212*572ff6f6SMatthew Dillon uint8_t xpdGain; // 1 213*572ff6f6SMatthew Dillon uint8_t xpd; // 1 214*572ff6f6SMatthew Dillon int8_t iqCalICh[AR5416_MAX_CHAINS]; // 1 215*572ff6f6SMatthew Dillon int8_t iqCalQCh[AR5416_MAX_CHAINS]; // 1 216*572ff6f6SMatthew Dillon uint8_t pdGainOverlap; // 1 217*572ff6f6SMatthew Dillon uint8_t ob; // 1 218*572ff6f6SMatthew Dillon uint8_t db; // 1 219*572ff6f6SMatthew Dillon uint8_t xpaBiasLvl; // 1 220*572ff6f6SMatthew Dillon uint8_t pwrDecreaseFor2Chain; // 1 221*572ff6f6SMatthew Dillon uint8_t pwrDecreaseFor3Chain; // 1 -> 48 B 222*572ff6f6SMatthew Dillon uint8_t txFrameToDataStart; // 1 223*572ff6f6SMatthew Dillon uint8_t txFrameToPaOn; // 1 224*572ff6f6SMatthew Dillon uint8_t ht40PowerIncForPdadc; // 1 225*572ff6f6SMatthew Dillon uint8_t bswAtten[AR5416_MAX_CHAINS]; // 3 226*572ff6f6SMatthew Dillon uint8_t bswMargin[AR5416_MAX_CHAINS]; // 3 227*572ff6f6SMatthew Dillon uint8_t swSettleHt40; // 1 228*572ff6f6SMatthew Dillon uint8_t xatten2Db[AR5416_MAX_CHAINS]; // 3 -> New for AR9280 (0xa20c/b20c 11:6) 229*572ff6f6SMatthew Dillon uint8_t xatten2Margin[AR5416_MAX_CHAINS]; // 3 -> New for AR9280 (0xa20c/b20c 21:17) 230*572ff6f6SMatthew Dillon uint8_t ob_ch1; // 1 -> ob and db become chain specific from AR9280 231*572ff6f6SMatthew Dillon uint8_t db_ch1; // 1 232*572ff6f6SMatthew Dillon uint8_t flagBits; // 1 233*572ff6f6SMatthew Dillon #define AR5416_EEP_FLAG_USEANT1 0x80 /* +1 configured antenna */ 234*572ff6f6SMatthew Dillon #define AR5416_EEP_FLAG_FORCEXPAON 0x40 /* force XPA bit for 5G */ 235*572ff6f6SMatthew Dillon #define AR5416_EEP_FLAG_LOCALBIAS 0x20 /* enable local bias */ 236*572ff6f6SMatthew Dillon #define AR5416_EEP_FLAG_FEMBANDSELECT 0x10 /* FEM band select used */ 237*572ff6f6SMatthew Dillon #define AR5416_EEP_FLAG_XLNABUFIN 0x08 238*572ff6f6SMatthew Dillon #define AR5416_EEP_FLAG_XLNAISEL1 0x04 239*572ff6f6SMatthew Dillon #define AR5416_EEP_FLAG_XLNAISEL2 0x02 240*572ff6f6SMatthew Dillon #define AR5416_EEP_FLAG_XLNABUFMODE 0x01 241*572ff6f6SMatthew Dillon uint8_t miscBits; // [0..1]: bb_tx_dac_scale_cck 242*572ff6f6SMatthew Dillon uint16_t xpaBiasLvlFreq[3]; // 3 243*572ff6f6SMatthew Dillon uint8_t futureModal[6]; // 6 244*572ff6f6SMatthew Dillon 245*572ff6f6SMatthew Dillon SPUR_CHAN spurChans[AR5416_EEPROM_MODAL_SPURS]; // 20 B 246*572ff6f6SMatthew Dillon } __packed MODAL_EEP_HEADER; // == 100 B 247*572ff6f6SMatthew Dillon 248*572ff6f6SMatthew Dillon typedef struct calDataPerFreqOpLoop { 249*572ff6f6SMatthew Dillon uint8_t pwrPdg[2][5]; /* power measurement */ 250*572ff6f6SMatthew Dillon uint8_t vpdPdg[2][5]; /* pdadc voltage at power measurement */ 251*572ff6f6SMatthew Dillon uint8_t pcdac[2][5]; /* pcdac used for power measurement */ 252*572ff6f6SMatthew Dillon uint8_t empty[2][5]; /* future use */ 253*572ff6f6SMatthew Dillon } __packed CAL_DATA_PER_FREQ_OP_LOOP; 254*572ff6f6SMatthew Dillon 255*572ff6f6SMatthew Dillon typedef struct CalCtlData { 256*572ff6f6SMatthew Dillon CAL_CTL_EDGES ctlEdges[AR5416_MAX_CHAINS][AR5416_NUM_BAND_EDGES]; 257*572ff6f6SMatthew Dillon } __packed CAL_CTL_DATA; 258*572ff6f6SMatthew Dillon 259*572ff6f6SMatthew Dillon typedef struct calDataPerFreq { 260*572ff6f6SMatthew Dillon uint8_t pwrPdg[AR5416_NUM_PD_GAINS][AR5416_PD_GAIN_ICEPTS]; 261*572ff6f6SMatthew Dillon uint8_t vpdPdg[AR5416_NUM_PD_GAINS][AR5416_PD_GAIN_ICEPTS]; 262*572ff6f6SMatthew Dillon } __packed CAL_DATA_PER_FREQ; 263*572ff6f6SMatthew Dillon 264*572ff6f6SMatthew Dillon struct ar5416eeprom { 265*572ff6f6SMatthew Dillon BASE_EEP_HEADER baseEepHeader; // 64 B 266*572ff6f6SMatthew Dillon uint8_t custData[64]; // 64 B 267*572ff6f6SMatthew Dillon MODAL_EEP_HEADER modalHeader[2]; // 200 B 268*572ff6f6SMatthew Dillon uint8_t calFreqPier5G[AR5416_NUM_5G_CAL_PIERS]; 269*572ff6f6SMatthew Dillon uint8_t calFreqPier2G[AR5416_NUM_2G_CAL_PIERS]; 270*572ff6f6SMatthew Dillon CAL_DATA_PER_FREQ calPierData5G[AR5416_MAX_CHAINS][AR5416_NUM_5G_CAL_PIERS]; 271*572ff6f6SMatthew Dillon CAL_DATA_PER_FREQ calPierData2G[AR5416_MAX_CHAINS][AR5416_NUM_2G_CAL_PIERS]; 272*572ff6f6SMatthew Dillon CAL_TARGET_POWER_LEG calTargetPower5G[AR5416_NUM_5G_20_TARGET_POWERS]; 273*572ff6f6SMatthew Dillon CAL_TARGET_POWER_HT calTargetPower5GHT20[AR5416_NUM_5G_20_TARGET_POWERS]; 274*572ff6f6SMatthew Dillon CAL_TARGET_POWER_HT calTargetPower5GHT40[AR5416_NUM_5G_40_TARGET_POWERS]; 275*572ff6f6SMatthew Dillon CAL_TARGET_POWER_LEG calTargetPowerCck[AR5416_NUM_2G_CCK_TARGET_POWERS]; 276*572ff6f6SMatthew Dillon CAL_TARGET_POWER_LEG calTargetPower2G[AR5416_NUM_2G_20_TARGET_POWERS]; 277*572ff6f6SMatthew Dillon CAL_TARGET_POWER_HT calTargetPower2GHT20[AR5416_NUM_2G_20_TARGET_POWERS]; 278*572ff6f6SMatthew Dillon CAL_TARGET_POWER_HT calTargetPower2GHT40[AR5416_NUM_2G_40_TARGET_POWERS]; 279*572ff6f6SMatthew Dillon uint8_t ctlIndex[AR5416_NUM_CTLS]; 280*572ff6f6SMatthew Dillon CAL_CTL_DATA ctlData[AR5416_NUM_CTLS]; 281*572ff6f6SMatthew Dillon uint8_t padding; 282*572ff6f6SMatthew Dillon } __packed; 283*572ff6f6SMatthew Dillon 284*572ff6f6SMatthew Dillon typedef struct { 285*572ff6f6SMatthew Dillon struct ar5416eeprom ee_base; 286*572ff6f6SMatthew Dillon #define NUM_EDGES 8 287*572ff6f6SMatthew Dillon uint16_t ee_numCtls; 288*572ff6f6SMatthew Dillon RD_EDGES_POWER ee_rdEdgesPower[NUM_EDGES*AR5416_NUM_CTLS]; 289*572ff6f6SMatthew Dillon /* XXX these are dynamically calculated for use by shared code */ 290*572ff6f6SMatthew Dillon int8_t ee_antennaGainMax[2]; 291*572ff6f6SMatthew Dillon } HAL_EEPROM_v14; 292*572ff6f6SMatthew Dillon #endif /* _AH_EEPROM_V14_H_ */ 293