1*9d1f2812Sstsp /* $OpenBSD: ar5416reg.h,v 1.7 2019/02/01 16:15:07 stsp Exp $ */ 2498e8a28Sdamien 3498e8a28Sdamien /*- 4498e8a28Sdamien * Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr> 5498e8a28Sdamien * Copyright (c) 2008-2009 Atheros Communications Inc. 6498e8a28Sdamien * 7498e8a28Sdamien * Permission to use, copy, modify, and/or distribute this software for any 8498e8a28Sdamien * purpose with or without fee is hereby granted, provided that the above 9498e8a28Sdamien * copyright notice and this permission notice appear in all copies. 10498e8a28Sdamien * 11498e8a28Sdamien * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 12498e8a28Sdamien * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 13498e8a28Sdamien * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 14498e8a28Sdamien * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 15498e8a28Sdamien * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 16498e8a28Sdamien * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 17498e8a28Sdamien * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 18498e8a28Sdamien */ 19498e8a28Sdamien 20498e8a28Sdamien #define AR5416_MAX_CHAINS 3 21498e8a28Sdamien 22*9d1f2812Sstsp #define AR5416_PHY_CCA_MIN_GOOD_VAL_2GHZ (-100) 23*9d1f2812Sstsp #define AR5416_PHY_CCA_MIN_GOOD_VAL_5GHZ (-110) 24*9d1f2812Sstsp #define AR5416_PHY_CCA_MAX_GOOD_VAL_2GHZ (-80) 25*9d1f2812Sstsp #define AR5416_PHY_CCA_MAX_GOOD_VAL_5GHZ (-90) 26498e8a28Sdamien 27498e8a28Sdamien /* 28498e8a28Sdamien * ROM layout used by AR5416, AR9160 and AR9280. 29498e8a28Sdamien */ 30498e8a28Sdamien #define AR5416_EEP_START_LOC 256 31498e8a28Sdamien #define AR5416_NUM_5G_CAL_PIERS 8 32498e8a28Sdamien #define AR5416_NUM_2G_CAL_PIERS 4 33498e8a28Sdamien #define AR5416_NUM_5G_20_TARGET_POWERS 8 34498e8a28Sdamien #define AR5416_NUM_5G_40_TARGET_POWERS 8 35498e8a28Sdamien #define AR5416_NUM_2G_CCK_TARGET_POWERS 3 36498e8a28Sdamien #define AR5416_NUM_2G_20_TARGET_POWERS 4 37498e8a28Sdamien #define AR5416_NUM_2G_40_TARGET_POWERS 4 38498e8a28Sdamien #define AR5416_NUM_CTLS 24 39498e8a28Sdamien #define AR5416_NUM_BAND_EDGES 8 40498e8a28Sdamien #define AR5416_NUM_PD_GAINS 4 41498e8a28Sdamien #define AR5416_PD_GAINS_IN_MASK 4 42498e8a28Sdamien #define AR5416_PD_GAIN_ICEPTS 5 43498e8a28Sdamien 44498e8a28Sdamien struct ar5416_base_eep_header { 45498e8a28Sdamien uint16_t length; 46498e8a28Sdamien uint16_t checksum; 47498e8a28Sdamien uint16_t version; 48498e8a28Sdamien uint8_t opCapFlags; 49498e8a28Sdamien uint8_t eepMisc; 50498e8a28Sdamien uint16_t regDmn[2]; 51498e8a28Sdamien uint8_t macAddr[6]; 52498e8a28Sdamien uint8_t rxMask; 53498e8a28Sdamien uint8_t txMask; 54498e8a28Sdamien uint16_t rfSilent; 55498e8a28Sdamien uint16_t blueToothOptions; 56498e8a28Sdamien uint16_t deviceCap; 57498e8a28Sdamien uint32_t binBuildNumber; 58498e8a28Sdamien uint8_t deviceType; 59498e8a28Sdamien /* End of common header. */ 60498e8a28Sdamien uint8_t pwdclkind; 61bd6ea91dSdamien uint8_t fastClk5g; 62bd6ea91dSdamien uint8_t divChain; 63498e8a28Sdamien uint8_t rxGainType; 64498e8a28Sdamien #define AR5416_EEP_RXGAIN_23DB_BACKOFF 0 65498e8a28Sdamien #define AR5416_EEP_RXGAIN_13DB_BACKOFF 1 66498e8a28Sdamien #define AR5416_EEP_RXGAIN_ORIG 2 67498e8a28Sdamien 68498e8a28Sdamien uint8_t dacHiPwrMode_5G; 69498e8a28Sdamien uint8_t openLoopPwrCntl; 70498e8a28Sdamien uint8_t dacLpMode; 71498e8a28Sdamien uint8_t txGainType; 72498e8a28Sdamien uint8_t rcChainMask; 73498e8a28Sdamien uint8_t desiredScaleCCK; 74498e8a28Sdamien uint8_t pwrTableOffset; 75498e8a28Sdamien uint8_t frac_n_5g; 76bd6ea91dSdamien uint8_t futureBase[21]; 77498e8a28Sdamien } __packed; 78498e8a28Sdamien 79498e8a28Sdamien struct ar5416_modal_eep_header { 80498e8a28Sdamien uint32_t antCtrlChain[AR5416_MAX_CHAINS]; 81498e8a28Sdamien uint32_t antCtrlCommon; 82498e8a28Sdamien uint8_t antennaGainCh[AR5416_MAX_CHAINS]; 83498e8a28Sdamien uint8_t switchSettling; 84498e8a28Sdamien uint8_t txRxAttenCh[AR5416_MAX_CHAINS]; 85498e8a28Sdamien uint8_t rxTxMarginCh[AR5416_MAX_CHAINS]; 86498e8a28Sdamien uint8_t adcDesiredSize; 87498e8a28Sdamien uint8_t pgaDesiredSize; 88498e8a28Sdamien uint8_t xlnaGainCh[AR5416_MAX_CHAINS]; 89498e8a28Sdamien uint8_t txEndToXpaOff; 90498e8a28Sdamien uint8_t txEndToRxOn; 91498e8a28Sdamien uint8_t txFrameToXpaOn; 92498e8a28Sdamien uint8_t thresh62; 93498e8a28Sdamien uint8_t noiseFloorThreshCh[AR5416_MAX_CHAINS]; 94498e8a28Sdamien uint8_t xpdGain; 95498e8a28Sdamien uint8_t xpd; 96498e8a28Sdamien uint8_t iqCalICh[AR5416_MAX_CHAINS]; 97498e8a28Sdamien uint8_t iqCalQCh[AR5416_MAX_CHAINS]; 98498e8a28Sdamien uint8_t pdGainOverlap; 99498e8a28Sdamien uint8_t ob; 100498e8a28Sdamien uint8_t db; 101498e8a28Sdamien uint8_t xpaBiasLvl; 102498e8a28Sdamien uint8_t pwrDecreaseFor2Chain; 103498e8a28Sdamien uint8_t pwrDecreaseFor3Chain; 104498e8a28Sdamien uint8_t txFrameToDataStart; 105498e8a28Sdamien uint8_t txFrameToPaOn; 106498e8a28Sdamien uint8_t ht40PowerIncForPdadc; 107498e8a28Sdamien uint8_t bswAtten[AR5416_MAX_CHAINS]; 108498e8a28Sdamien uint8_t bswMargin[AR5416_MAX_CHAINS]; 109498e8a28Sdamien uint8_t swSettleHt40; 110498e8a28Sdamien uint8_t xatten2Db[AR5416_MAX_CHAINS]; 111498e8a28Sdamien uint8_t xatten2Margin[AR5416_MAX_CHAINS]; 112498e8a28Sdamien uint8_t ob_ch1; 113498e8a28Sdamien uint8_t db_ch1; 114498e8a28Sdamien uint8_t flagBits; 115498e8a28Sdamien #define AR5416_EEP_FLAG_USEANT1 0x01 116498e8a28Sdamien #define AR5416_EEP_FLAG_FORCEXPAON 0x02 117498e8a28Sdamien #define AR5416_EEP_FLAG_LOCALBIAS 0x04 118498e8a28Sdamien #define AR5416_EEP_FLAG_FEMBANDSELECT 0x08 119498e8a28Sdamien #define AR5416_EEP_FLAG_XLNABUFIN 0x10 120498e8a28Sdamien #define AR5416_EEP_FLAG_XLNAISEL_M 0x60 121498e8a28Sdamien #define AR5416_EEP_FLAG_XLNAISEL_S 5 122498e8a28Sdamien #define AR5416_EEP_FLAG_XLNABUFMODE 0x80 123498e8a28Sdamien 124498e8a28Sdamien uint8_t miscBits; 125498e8a28Sdamien #define AR5416_EEP_MISC_TX_DAC_SCALE_CCK_M 0x03 126498e8a28Sdamien #define AR5416_EEP_MISC_TX_DAC_SCALE_CCK_S 0 127498e8a28Sdamien #define AR5416_EEP_MISC_TX_CLIP_M 0xfc 128498e8a28Sdamien #define AR5416_EEP_MISC_TX_CLIP_S 2 129498e8a28Sdamien 130498e8a28Sdamien uint16_t xpaBiasLvlFreq[3]; 131498e8a28Sdamien uint8_t futureModal[6]; 132498e8a28Sdamien struct ar_spur_chan spurChans[AR_EEPROM_MODAL_SPURS]; 133498e8a28Sdamien } __packed; 134498e8a28Sdamien 135498e8a28Sdamien struct ar5416_cal_data_per_freq { 136498e8a28Sdamien uint8_t pwrPdg[AR5416_NUM_PD_GAINS][AR5416_PD_GAIN_ICEPTS]; 137498e8a28Sdamien uint8_t vpdPdg[AR5416_NUM_PD_GAINS][AR5416_PD_GAIN_ICEPTS]; 138498e8a28Sdamien } __packed; 139498e8a28Sdamien 140498e8a28Sdamien struct ar5416_cal_ctl_data { 141498e8a28Sdamien struct ar_cal_ctl_edges 142498e8a28Sdamien ctlEdges[AR5416_MAX_CHAINS][AR5416_NUM_BAND_EDGES]; 143498e8a28Sdamien } __packed; 144498e8a28Sdamien 145498e8a28Sdamien struct ar5416_eeprom { 146498e8a28Sdamien struct ar5416_base_eep_header baseEepHeader; 147498e8a28Sdamien uint8_t custData[64]; 148498e8a28Sdamien struct ar5416_modal_eep_header modalHeader[2]; 149498e8a28Sdamien uint8_t calFreqPier5G[AR5416_NUM_5G_CAL_PIERS]; 150498e8a28Sdamien uint8_t calFreqPier2G[AR5416_NUM_2G_CAL_PIERS]; 151498e8a28Sdamien struct ar5416_cal_data_per_freq 152498e8a28Sdamien calPierData5G[AR5416_MAX_CHAINS][AR5416_NUM_5G_CAL_PIERS]; 153498e8a28Sdamien struct ar5416_cal_data_per_freq 154498e8a28Sdamien calPierData2G[AR5416_MAX_CHAINS][AR5416_NUM_2G_CAL_PIERS]; 155498e8a28Sdamien struct ar_cal_target_power_leg 156498e8a28Sdamien calTargetPower5G[AR5416_NUM_5G_20_TARGET_POWERS]; 157498e8a28Sdamien struct ar_cal_target_power_ht 158498e8a28Sdamien calTargetPower5GHT20[AR5416_NUM_5G_20_TARGET_POWERS]; 159498e8a28Sdamien struct ar_cal_target_power_ht 160498e8a28Sdamien calTargetPower5GHT40[AR5416_NUM_5G_40_TARGET_POWERS]; 161498e8a28Sdamien struct ar_cal_target_power_leg 162498e8a28Sdamien calTargetPowerCck[AR5416_NUM_2G_CCK_TARGET_POWERS]; 163498e8a28Sdamien struct ar_cal_target_power_leg 164498e8a28Sdamien calTargetPower2G[AR5416_NUM_2G_20_TARGET_POWERS]; 165498e8a28Sdamien struct ar_cal_target_power_ht 166498e8a28Sdamien calTargetPower2GHT20[AR5416_NUM_2G_20_TARGET_POWERS]; 167498e8a28Sdamien struct ar_cal_target_power_ht 168498e8a28Sdamien calTargetPower2GHT40[AR5416_NUM_2G_40_TARGET_POWERS]; 169498e8a28Sdamien uint8_t ctlIndex[AR5416_NUM_CTLS]; 170498e8a28Sdamien struct ar5416_cal_ctl_data ctlData[AR5416_NUM_CTLS]; 171498e8a28Sdamien uint8_t padding; 172498e8a28Sdamien } __packed; 173498e8a28Sdamien 174498e8a28Sdamien /* Macro to "pack" registers to 16-bit to save some .rodata space. */ 175498e8a28Sdamien #define P(x) (x) 176498e8a28Sdamien 177498e8a28Sdamien /* 178498e8a28Sdamien * AR5416 initialization values. 179498e8a28Sdamien */ 180498e8a28Sdamien static const uint16_t ar5416_regs[] = { 181498e8a28Sdamien P(0x01030), P(0x01070), P(0x010b0), P(0x010f0), P(0x08014), 182498e8a28Sdamien P(0x0801c), P(0x08120), P(0x081d0), P(0x09804), P(0x09820), 183498e8a28Sdamien P(0x09824), P(0x09828), P(0x09834), P(0x09838), P(0x09844), 184498e8a28Sdamien P(0x09848), P(0x0a848), P(0x0b848), P(0x09850), P(0x09858), 185498e8a28Sdamien P(0x0985c), P(0x09860), P(0x09864), P(0x09868), P(0x0986c), 186498e8a28Sdamien P(0x09914), P(0x09918), P(0x09924), P(0x09944), P(0x09960), 187498e8a28Sdamien P(0x0a960), P(0x0b960), P(0x09964), P(0x099bc), P(0x099c0), 188498e8a28Sdamien P(0x099c4), P(0x099c8), P(0x099cc), P(0x099d0), P(0x099d4), 189498e8a28Sdamien P(0x099d8), P(0x0a204), P(0x0a208), P(0x0a20c), P(0x0b20c), 190498e8a28Sdamien P(0x0c20c), P(0x0a21c), P(0x0a230), P(0x0a274), P(0x0a300), 191498e8a28Sdamien P(0x0a304), P(0x0a308), P(0x0a30c), P(0x0a310), P(0x0a314), 192498e8a28Sdamien P(0x0a318), P(0x0a31c), P(0x0a320), P(0x0a324), P(0x0a328), 193498e8a28Sdamien P(0x0a32c), P(0x0a330), P(0x0a334) 194498e8a28Sdamien }; 195498e8a28Sdamien 196498e8a28Sdamien static const uint32_t ar5416_vals_5g20[] = { 197498e8a28Sdamien 0x00000230, 0x00000168, 0x00000e60, 0x0000a000, 0x03e803e8, 198498e8a28Sdamien 0x128d93a7, 0x08f04800, 0x00003210, 0x00000300, 0x02020200, 199498e8a28Sdamien 0x00000e0e, 0x0a020001, 0x00000e0e, 0x00000007, 0x1372161e, 200498e8a28Sdamien 0x001a6a65, 0x001a6a65, 0x001a6a65, 0x6c48b4e0, 0x7ec82d2e, 201498e8a28Sdamien 0x31395d5e, 0x00049d18, 0x0001ce00, 0x409a4190, 0x050cb081, 202498e8a28Sdamien 0x000007d0, 0x000001b8, 0xd0058a0b, 0xffb81020, 0x00000900, 203498e8a28Sdamien 0x00000900, 0x00000900, 0x00000000, 0x001a0a00, 0x038919be, 204498e8a28Sdamien 0x06336f77, 0x6af6532c, 0x08f186c8, 0x00046384, 0x00000000, 205498e8a28Sdamien 0x00000000, 0x00000880, 0xd6be4788, 0x002ec1e0, 0x002ec1e0, 206498e8a28Sdamien 0x002ec1e0, 0x1883800a, 0x00000000, 0x0a1a9caa, 0x18010000, 207498e8a28Sdamien 0x30032602, 0x48073e06, 0x560b4c0a, 0x641a600f, 0x7a4f6e1b, 208498e8a28Sdamien 0x8c5b7e5a, 0x9d0f96cf, 0xb51fa69f, 0xcb3fbd07, 0x0000d7bf, 209498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000 210498e8a28Sdamien }; 211498e8a28Sdamien 212498e8a28Sdamien static const uint32_t ar5416_vals_5g40[] = { 213498e8a28Sdamien 0x00000460, 0x000002d0, 0x00001cc0, 0x00014000, 0x07d007d0, 214498e8a28Sdamien 0x128d93cf, 0x08f04800, 0x00003210, 0x000003c4, 0x02020200, 215498e8a28Sdamien 0x00000e0e, 0x0a020001, 0x00000e0e, 0x00000007, 0x1372161e, 216498e8a28Sdamien 0x001a6a65, 0x001a6a65, 0x001a6a65, 0x6d48b4e0, 0x7ec82d2e, 217498e8a28Sdamien 0x3139605e, 0x00049d18, 0x0001ce00, 0x409a4190, 0x050cb081, 218498e8a28Sdamien 0x00000fa0, 0x00000370, 0xd0058a0b, 0xffb81020, 0x00000900, 219498e8a28Sdamien 0x00000900, 0x00000900, 0x00000000, 0x001a0a00, 0x038919be, 220498e8a28Sdamien 0x06336f77, 0x6af6532c, 0x08f186c8, 0x00046384, 0x00000000, 221498e8a28Sdamien 0x00000000, 0x00000880, 0xd6be4788, 0x002ec1e0, 0x002ec1e0, 222498e8a28Sdamien 0x002ec1e0, 0x1883800a, 0x00000000, 0x0a1a9caa, 0x18010000, 223498e8a28Sdamien 0x30032602, 0x48073e06, 0x560b4c0a, 0x641a600f, 0x7a4f6e1b, 224498e8a28Sdamien 0x8c5b7e5a, 0x9d0f96cf, 0xb51fa69f, 0xcb3fbcbf, 0x0000d7bf, 225498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000 226498e8a28Sdamien }; 227498e8a28Sdamien 228498e8a28Sdamien static const uint32_t ar5416_vals_2g40[] = { 229498e8a28Sdamien 0x000002c0, 0x00000318, 0x00007c70, 0x00016000, 0x10801600, 230498e8a28Sdamien 0x12e013d7, 0x08f04810, 0x0000320a, 0x000003c4, 0x02020200, 231498e8a28Sdamien 0x00000e0e, 0x0a020001, 0x00000e0e, 0x00000007, 0x137216a0, 232498e8a28Sdamien 0x00197a68, 0x00197a68, 0x00197a68, 0x6d48b0de, 0x7ec82d2e, 233498e8a28Sdamien 0x3139605e, 0x00049d18, 0x0001ce00, 0x409a4190, 0x050cb081, 234498e8a28Sdamien 0x00001130, 0x00000268, 0xd0058a0b, 0xffb81020, 0x00012d80, 235498e8a28Sdamien 0x00012d80, 0x00012d80, 0x00001120, 0x001a0a00, 0x038919be, 236498e8a28Sdamien 0x06336f77, 0x6af6532c, 0x08f186c8, 0x00046384, 0x00000000, 237498e8a28Sdamien 0x00000000, 0x00000880, 0xd03e4788, 0x002ac120, 0x002ac120, 238498e8a28Sdamien 0x002ac120, 0x1883800a, 0x00000210, 0x0a1a7caa, 0x18010000, 239498e8a28Sdamien 0x2e032402, 0x4a0a3c06, 0x621a540b, 0x764f6c1b, 0x845b7a5a, 240498e8a28Sdamien 0x950f8ccf, 0xa5cf9b4f, 0xbddfaf1f, 0xd1ffc93f, 0x00000000, 241498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000 242498e8a28Sdamien }; 243498e8a28Sdamien 244498e8a28Sdamien static const uint32_t ar5416_vals_2g20[] = { 245498e8a28Sdamien 0x00000160, 0x0000018c, 0x00003e38, 0x0000b000, 0x08400b00, 246498e8a28Sdamien 0x12e013ab, 0x08f04810, 0x0000320a, 0x00000300, 0x02020200, 247498e8a28Sdamien 0x00000e0e, 0x0a020001, 0x00000e0e, 0x00000007, 0x137216a0, 248498e8a28Sdamien 0x00197a68, 0x00197a68, 0x00197a68, 0x6c48b0de, 0x7ec82d2e, 249498e8a28Sdamien 0x31395d5e, 0x00049d18, 0x0001ce00, 0x409a4190, 0x050cb081, 250498e8a28Sdamien 0x00000898, 0x00000134, 0xd0058a0b, 0xffb81020, 0x00012d80, 251498e8a28Sdamien 0x00012d80, 0x00012d80, 0x00001120, 0x001a0a00, 0x038919be, 252498e8a28Sdamien 0x06336f77, 0x6af6532c, 0x08f186c8, 0x00046384, 0x00000000, 253498e8a28Sdamien 0x00000000, 0x00000880, 0xd03e4788, 0x002ac120, 0x002ac120, 254498e8a28Sdamien 0x002ac120, 0x1883800a, 0x00000108, 0x0a1a7caa, 0x18010000, 255498e8a28Sdamien 0x2e032402, 0x4a0a3c06, 0x621a540b, 0x764f6c1b, 0x845b7a5a, 256498e8a28Sdamien 0x950f8ccf, 0xa5cf9b4f, 0xbddfaf1f, 0xd1ffc93f, 0x00000000, 257498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000 258498e8a28Sdamien }; 259498e8a28Sdamien 260498e8a28Sdamien static const uint16_t ar5416_cm_regs[] = { 261498e8a28Sdamien P(0x0000c), P(0x00030), P(0x00034), P(0x00040), P(0x00044), 262498e8a28Sdamien P(0x00048), P(0x0004c), P(0x00050), P(0x00054), P(0x00800), 263498e8a28Sdamien P(0x00804), P(0x00808), P(0x0080c), P(0x00810), P(0x00814), 264498e8a28Sdamien P(0x00818), P(0x0081c), P(0x00820), P(0x00824), P(0x01040), 265498e8a28Sdamien P(0x01044), P(0x01048), P(0x0104c), P(0x01050), P(0x01054), 266498e8a28Sdamien P(0x01058), P(0x0105c), P(0x01060), P(0x01064), P(0x01230), 267498e8a28Sdamien P(0x01270), P(0x01038), P(0x01078), P(0x010b8), P(0x010f8), 268498e8a28Sdamien P(0x01138), P(0x01178), P(0x011b8), P(0x011f8), P(0x01238), 269498e8a28Sdamien P(0x01278), P(0x012b8), P(0x012f8), P(0x01338), P(0x01378), 270498e8a28Sdamien P(0x013b8), P(0x013f8), P(0x01438), P(0x01478), P(0x014b8), 271498e8a28Sdamien P(0x014f8), P(0x01538), P(0x01578), P(0x015b8), P(0x015f8), 272498e8a28Sdamien P(0x01638), P(0x01678), P(0x016b8), P(0x016f8), P(0x01738), 273498e8a28Sdamien P(0x01778), P(0x017b8), P(0x017f8), P(0x0103c), P(0x0107c), 274498e8a28Sdamien P(0x010bc), P(0x010fc), P(0x0113c), P(0x0117c), P(0x011bc), 275498e8a28Sdamien P(0x011fc), P(0x0123c), P(0x0127c), P(0x012bc), P(0x012fc), 276498e8a28Sdamien P(0x0133c), P(0x0137c), P(0x013bc), P(0x013fc), P(0x0143c), 277498e8a28Sdamien P(0x0147c), P(0x04030), P(0x0403c), P(0x07010), P(0x07038), 278498e8a28Sdamien P(0x08004), P(0x08008), P(0x0800c), P(0x08018), P(0x08020), 279498e8a28Sdamien P(0x08038), P(0x0803c), P(0x08048), P(0x08054), P(0x08058), 280498e8a28Sdamien P(0x0805c), P(0x08060), P(0x08064), P(0x080c0), P(0x080c4), 281498e8a28Sdamien P(0x080c8), P(0x080cc), P(0x080d0), P(0x080d4), P(0x080d8), 282498e8a28Sdamien P(0x080e0), P(0x080e4), P(0x080e8), P(0x080ec), P(0x080f0), 283498e8a28Sdamien P(0x080f4), P(0x080f8), P(0x080fc), P(0x08100), P(0x08104), 284498e8a28Sdamien P(0x08108), P(0x0810c), P(0x08110), P(0x08118), P(0x0811c), 285498e8a28Sdamien P(0x08124), P(0x08128), P(0x0812c), P(0x08130), P(0x08134), 286498e8a28Sdamien P(0x08138), P(0x0813c), P(0x08144), P(0x08168), P(0x0816c), 287498e8a28Sdamien P(0x08170), P(0x08174), P(0x08178), P(0x0817c), P(0x081c4), 288498e8a28Sdamien P(0x081ec), P(0x081f0), P(0x081f4), P(0x081f8), P(0x081fc), 289498e8a28Sdamien P(0x08200), P(0x08204), P(0x08208), P(0x0820c), P(0x08210), 290498e8a28Sdamien P(0x08214), P(0x08218), P(0x0821c), P(0x08220), P(0x08224), 291498e8a28Sdamien P(0x08228), P(0x0822c), P(0x08230), P(0x08234), P(0x08238), 292498e8a28Sdamien P(0x0823c), P(0x08240), P(0x08244), P(0x08248), P(0x0824c), 293498e8a28Sdamien P(0x08250), P(0x08254), P(0x08258), P(0x0825c), P(0x08260), 294498e8a28Sdamien P(0x08264), P(0x08270), P(0x08274), P(0x08278), P(0x0827c), 295498e8a28Sdamien P(0x08284), P(0x08288), P(0x0828c), P(0x08294), P(0x08298), 296498e8a28Sdamien P(0x08300), P(0x08304), P(0x08308), P(0x0830c), P(0x08310), 297498e8a28Sdamien P(0x08314), P(0x08318), P(0x08328), P(0x0832c), P(0x08330), 298498e8a28Sdamien P(0x08334), P(0x08338), P(0x0833c), P(0x08340), P(0x09808), 299498e8a28Sdamien P(0x0980c), P(0x09810), P(0x09814), P(0x0981c), P(0x0982c), 300498e8a28Sdamien P(0x09830), P(0x0983c), P(0x09840), P(0x0984c), P(0x09854), 301498e8a28Sdamien P(0x09900), P(0x09904), P(0x09908), P(0x0990c), P(0x0991c), 302498e8a28Sdamien P(0x09920), P(0x0a920), P(0x0b920), P(0x09928), P(0x0992c), 303498e8a28Sdamien P(0x09934), P(0x09938), P(0x0993c), P(0x09948), P(0x0994c), 304498e8a28Sdamien P(0x09954), P(0x09958), P(0x0c95c), P(0x0c968), P(0x09970), 305498e8a28Sdamien P(0x09974), P(0x09978), P(0x0997c), P(0x09980), P(0x09984), 306498e8a28Sdamien P(0x09988), P(0x0998c), P(0x09990), P(0x09994), P(0x09998), 307498e8a28Sdamien P(0x0999c), P(0x099a0), P(0x099a4), P(0x099a8), P(0x099ac), 308498e8a28Sdamien P(0x099b0), P(0x099dc), P(0x099e0), P(0x099e4), P(0x099e8), 309498e8a28Sdamien P(0x099ec), P(0x099fc), P(0x09b00), P(0x09b04), P(0x09b08), 310498e8a28Sdamien P(0x09b0c), P(0x09b10), P(0x09b14), P(0x09b18), P(0x09b1c), 311498e8a28Sdamien P(0x09b20), P(0x09b24), P(0x09b28), P(0x09b2c), P(0x09b30), 312498e8a28Sdamien P(0x09b34), P(0x09b38), P(0x09b3c), P(0x09b40), P(0x09b44), 313498e8a28Sdamien P(0x09b48), P(0x09b4c), P(0x09b50), P(0x09b54), P(0x09b58), 314498e8a28Sdamien P(0x09b5c), P(0x09b60), P(0x09b64), P(0x09b68), P(0x09b6c), 315498e8a28Sdamien P(0x09b70), P(0x09b74), P(0x09b78), P(0x09b7c), P(0x09b80), 316498e8a28Sdamien P(0x09b84), P(0x09b88), P(0x09b8c), P(0x09b90), P(0x09b94), 317498e8a28Sdamien P(0x09b98), P(0x09b9c), P(0x09ba0), P(0x09ba4), P(0x09ba8), 318498e8a28Sdamien P(0x09bac), P(0x09bb0), P(0x09bb4), P(0x09bb8), P(0x09bbc), 319498e8a28Sdamien P(0x09bc0), P(0x09bc4), P(0x09bc8), P(0x09bcc), P(0x09bd0), 320498e8a28Sdamien P(0x09bd4), P(0x09bd8), P(0x09bdc), P(0x09be0), P(0x09be4), 321498e8a28Sdamien P(0x09be8), P(0x09bec), P(0x09bf0), P(0x09bf4), P(0x09bf8), 322498e8a28Sdamien P(0x09bfc), P(0x0a210), P(0x0a214), P(0x0a218), P(0x0a220), 323498e8a28Sdamien P(0x0a224), P(0x0a228), P(0x0a22c), P(0x0a234), P(0x0a238), 324498e8a28Sdamien P(0x0a23c), P(0x0a240), P(0x0a244), P(0x0a248), P(0x0a24c), 325498e8a28Sdamien P(0x0a250), P(0x0a254), P(0x0a258), P(0x0a25c), P(0x0a260), 326498e8a28Sdamien P(0x0a268), P(0x0a26c), P(0x0b26c), P(0x0c26c), P(0x0d270), 327498e8a28Sdamien P(0x0a278), P(0x0a27c), P(0x0a338), P(0x0a33c), P(0x0a340), 328498e8a28Sdamien P(0x0a344), P(0x0a348), P(0x0a34c), P(0x0a350), P(0x0a354), 329498e8a28Sdamien P(0x0a358), P(0x0d35c), P(0x0d360), P(0x0d364), P(0x0d368), 330498e8a28Sdamien P(0x0d36c), P(0x0d370), P(0x0d374), P(0x0d378), P(0x0d37c), 331498e8a28Sdamien P(0x0d380), P(0x0d384), P(0x0a388), P(0x0a38c), P(0x0a390), 332498e8a28Sdamien P(0x0a394), P(0x0a398), P(0x0a39c), P(0x0a3a0), P(0x0a3a4), 333498e8a28Sdamien P(0x0a3a8), P(0x0a3ac), P(0x0a3b0), P(0x0a3b4), P(0x0a3b8), 334498e8a28Sdamien P(0x0a3bc), P(0x0a3c0), P(0x0a3c4), P(0x0a3c8), P(0x0a3cc), 335498e8a28Sdamien P(0x0a3d0), P(0x0a3d4), P(0x0a3dc), P(0x0a3e0) 336498e8a28Sdamien }; 337498e8a28Sdamien 338498e8a28Sdamien static const uint32_t ar5416_cm_vals[] = { 339498e8a28Sdamien 0x00000000, 0x00020015, 0x00000005, 0x00000000, 0x00000008, 340498e8a28Sdamien 0x00000008, 0x00000010, 0x00000000, 0x0000001f, 0x00000000, 341498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 342498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x002ffc0f, 343498e8a28Sdamien 0x002ffc0f, 0x002ffc0f, 0x002ffc0f, 0x002ffc0f, 0x002ffc0f, 344498e8a28Sdamien 0x002ffc0f, 0x002ffc0f, 0x002ffc0f, 0x002ffc0f, 0x00000000, 345498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 346498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 347498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 348498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 349498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 350498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 351498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 352498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 353498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 354498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 355498e8a28Sdamien 0x00000000, 0x00000002, 0x00000002, 0x00000000, 0x000004c2, 356498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000700, 0x00000000, 357498e8a28Sdamien 0x00000000, 0x00000000, 0x40000000, 0x00000000, 0x00000000, 358498e8a28Sdamien 0x000fc78f, 0x0000000f, 0x00000000, 0x2a82301a, 0x05dc01e0, 359498e8a28Sdamien 0x1f402710, 0x01f40000, 0x00001e00, 0x00000000, 0x00400000, 360498e8a28Sdamien 0xffffffff, 0x0000ffff, 0x003f3f3f, 0x00000000, 0x00000000, 361498e8a28Sdamien 0x00000000, 0x00000000, 0x00020000, 0x00020000, 0x00000001, 362498e8a28Sdamien 0x00000052, 0x00000000, 0x00000168, 0x000100aa, 0x00003210, 363498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 364498e8a28Sdamien 0x00000000, 0x00000000, 0xffffffff, 0x00000000, 0x00000000, 365498e8a28Sdamien 0x32143320, 0xfaa4fa50, 0x00000100, 0x00000000, 0x00000000, 366498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 367498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 368498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 369498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 370498e8a28Sdamien 0x00000000, 0x00100000, 0x0010f400, 0x00000100, 0x0001e800, 371498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x400000ff, 0x00080922, 3726af6bb5bSdamien 0x88000010, 0x00000000, 0x40000000, 0x003e4180, 0x00000000, 373498e8a28Sdamien 0x0000002c, 0x0000002c, 0x00000000, 0x00000000, 0x00000000, 374498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 375498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000007, 0x00000302, 376498e8a28Sdamien 0x00000e00, 0x00070000, 0x00000000, 0x000107ff, 0x00000000, 377498e8a28Sdamien 0xad848e19, 0x7d14e000, 0x9c0a9f6b, 0x00000000, 0x0000a000, 378498e8a28Sdamien 0x00000000, 0x00200400, 0x206a002e, 0x1284233c, 0x00000859, 379498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x10000fff, 380498e8a28Sdamien 0x05100000, 0x05100000, 0x05100000, 0x00000001, 0x00000004, 381498e8a28Sdamien 0x1e1f2022, 0x0a0b0c0d, 0x00000000, 0x9280b212, 0x00020028, 382498e8a28Sdamien 0x5d50e188, 0x00081fff, 0x004b6a8e, 0x000003ce, 0x190fb515, 383498e8a28Sdamien 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 384498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 385498e8a28Sdamien 0x00000000, 0x00000000, 0x00000001, 0x001fff00, 0x00000000, 386498e8a28Sdamien 0x03051000, 0x00000000, 0x00000200, 0xaaaaaaaa, 0x3c466478, 387498e8a28Sdamien 0x000000aa, 0x00001042, 0x00000000, 0x00000001, 0x00000002, 388498e8a28Sdamien 0x00000003, 0x00000004, 0x00000005, 0x00000008, 0x00000009, 389498e8a28Sdamien 0x0000000a, 0x0000000b, 0x0000000c, 0x0000000d, 0x00000010, 390498e8a28Sdamien 0x00000011, 0x00000012, 0x00000013, 0x00000014, 0x00000015, 391498e8a28Sdamien 0x00000018, 0x00000019, 0x0000001a, 0x0000001b, 0x0000001c, 392498e8a28Sdamien 0x0000001d, 0x00000020, 0x00000021, 0x00000022, 0x00000023, 393498e8a28Sdamien 0x00000024, 0x00000025, 0x00000028, 0x00000029, 0x0000002a, 394498e8a28Sdamien 0x0000002b, 0x0000002c, 0x0000002d, 0x00000030, 0x00000031, 395498e8a28Sdamien 0x00000032, 0x00000033, 0x00000034, 0x00000035, 0x00000035, 396498e8a28Sdamien 0x00000035, 0x00000035, 0x00000035, 0x00000035, 0x00000035, 397498e8a28Sdamien 0x00000035, 0x00000035, 0x00000035, 0x00000035, 0x00000035, 398498e8a28Sdamien 0x00000035, 0x00000035, 0x00000035, 0x00000035, 0x00000035, 399498e8a28Sdamien 0x00000035, 0x00000035, 0x00000035, 0x00000035, 0x00000010, 400498e8a28Sdamien 0x0000001a, 0x40806333, 0x00106c10, 0x009c4060, 0x018830c6, 401498e8a28Sdamien 0x00000400, 0x00000bb5, 0x00000011, 0x20202020, 0x20202020, 402498e8a28Sdamien 0x13c889af, 0x38490a20, 0x00007bb6, 0x0fff3ffc, 0x00000001, 403498e8a28Sdamien 0x0000a000, 0x00000000, 0x0cc75380, 0x0f0f0f01, 0xdfa91f01, 404498e8a28Sdamien 0x00000000, 0x0e79e5c6, 0x0e79e5c6, 0x0e79e5c6, 0x00820820, 405498e8a28Sdamien 0x1ce739ce, 0x051701ce, 0x00000000, 0x00000000, 0x00000000, 406498e8a28Sdamien 0x00000000, 0x3fffffff, 0x3fffffff, 0x3fffffff, 0x0003ffff, 407498e8a28Sdamien 0x79a8aa1f, 0x07ffffef, 0x0fffffe7, 0x17ffffe5, 0x1fffffe4, 408498e8a28Sdamien 0x37ffffe3, 0x3fffffe3, 0x57ffffe3, 0x5fffffe2, 0x7fffffe2, 409498e8a28Sdamien 0x7f3c7bba, 0xf3307ff0, 0x08000000, 0x20202020, 0x20202020, 410498e8a28Sdamien 0x1ce739ce, 0x000001ce, 0x00000001, 0x00000000, 0x00000000, 411498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 412498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000246, 0x20202020, 413498e8a28Sdamien 0x20202020, 0x20202020, 0x1ce739ce, 0x000001ce 414498e8a28Sdamien }; 415498e8a28Sdamien 416498e8a28Sdamien static const struct athn_ini ar5416_ini = { 417498e8a28Sdamien nitems(ar5416_regs), 418498e8a28Sdamien ar5416_regs, 419498e8a28Sdamien ar5416_vals_5g20, 420498e8a28Sdamien ar5416_vals_5g40, 421498e8a28Sdamien ar5416_vals_2g40, 422498e8a28Sdamien ar5416_vals_2g20, 423498e8a28Sdamien nitems(ar5416_cm_regs), 424498e8a28Sdamien ar5416_cm_regs, 425498e8a28Sdamien ar5416_cm_vals 426498e8a28Sdamien }; 427498e8a28Sdamien 428498e8a28Sdamien /* 429498e8a28Sdamien * AR9160 initialization values. 430498e8a28Sdamien */ 431498e8a28Sdamien static const uint16_t ar9160_regs[] = { 432498e8a28Sdamien P(0x01030), P(0x01070), P(0x010b0), P(0x010f0), P(0x08014), 4336af6bb5bSdamien P(0x0801c), P(0x08120), P(0x081d0), P(0x09804), P(0x09820), 4346af6bb5bSdamien P(0x09824), P(0x09828), P(0x09834), P(0x09838), P(0x09844), 4356af6bb5bSdamien P(0x09848), P(0x0a848), P(0x0b848), P(0x09850), P(0x09858), 4366af6bb5bSdamien P(0x0985c), P(0x09860), P(0x09864), P(0x09868), P(0x0986c), 4376af6bb5bSdamien P(0x09914), P(0x09918), P(0x09924), P(0x09944), P(0x09960), 4386af6bb5bSdamien P(0x0a960), P(0x0b960), P(0x09964), P(0x0c968), P(0x099bc), 4396af6bb5bSdamien P(0x099c0), P(0x099c4), P(0x099c8), P(0x099cc), P(0x099d0), 4406af6bb5bSdamien P(0x099d4), P(0x099d8), P(0x0a204), P(0x0a208), P(0x0a20c), 4416af6bb5bSdamien P(0x0b20c), P(0x0c20c), P(0x0a21c), P(0x0a230), P(0x0a274), 4426af6bb5bSdamien P(0x0a300), P(0x0a304), P(0x0a308), P(0x0a30c), P(0x0a310), 4436af6bb5bSdamien P(0x0a314), P(0x0a318), P(0x0a31c), P(0x0a320), P(0x0a324), 4446af6bb5bSdamien P(0x0a328), P(0x0a32c), P(0x0a330), P(0x0a334) 445498e8a28Sdamien }; 446498e8a28Sdamien 447498e8a28Sdamien static const uint32_t ar9160_vals_5g20[] = { 448498e8a28Sdamien 0x00000230, 0x00000168, 0x00000e60, 0x0000a000, 0x03e803e8, 4496af6bb5bSdamien 0x128d93a7, 0x08f04800, 0x00003210, 0x00000300, 0x02020200, 4506af6bb5bSdamien 0x00000e0e, 0x0a020001, 0x00000e0e, 0x00000007, 0x0372161e, 4516af6bb5bSdamien 0x001a6a65, 0x001a6a65, 0x001a6a65, 0x6c48b4e2, 0x7ec82d2e, 4526af6bb5bSdamien 0x31395d5e, 0x00048d18, 0x0001ce00, 0x409a40d0, 0x050cb081, 4536af6bb5bSdamien 0x000007d0, 0x0000000a, 0xd00a8a07, 0xffb81020, 0x00009b40, 4546af6bb5bSdamien 0x00009b40, 0x00009b40, 0x00001120, 0x000003b5, 0x001a0600, 4556af6bb5bSdamien 0x038919be, 0x06336f77, 0x6af65329, 0x08f186c8, 0x00046384, 4566af6bb5bSdamien 0x00000000, 0x00000000, 0x00000880, 0xd6be4788, 0x002fc160, 4576af6bb5bSdamien 0x002fc160, 0x002fc160, 0x1883800a, 0x00000000, 0x0a1a9caa, 4586af6bb5bSdamien 0x18010000, 0x30032602, 0x48073e06, 0x560b4c0a, 0x641a600f, 4596af6bb5bSdamien 0x7a4f6e1b, 0x8c5b7e5a, 0x9d0f96cf, 0xb51fa69f, 0xcb3fbd07, 4606af6bb5bSdamien 0x0000d7bf, 0x00000000, 0x00000000, 0x00000000 461498e8a28Sdamien }; 462498e8a28Sdamien 463498e8a28Sdamien static const uint32_t ar9160_vals_5g40[] = { 464498e8a28Sdamien 0x00000460, 0x000002d0, 0x00001cc0, 0x00014000, 0x07d007d0, 4656af6bb5bSdamien 0x128d93cf, 0x08f04800, 0x00003210, 0x000003c4, 0x02020200, 4666af6bb5bSdamien 0x00000e0e, 0x0a020001, 0x00000e0e, 0x00000007, 0x0372161e, 4676af6bb5bSdamien 0x001a6a65, 0x001a6a65, 0x001a6a65, 0x6d48b4e2, 0x7ec82d2e, 4686af6bb5bSdamien 0x3139605e, 0x00048d18, 0x0001ce00, 0x409a40d0, 0x050cb081, 4696af6bb5bSdamien 0x00000fa0, 0x00000014, 0xd00a8a07, 0xffb81020, 0x00009b40, 4706af6bb5bSdamien 0x00009b40, 0x00009b40, 0x00001120, 0x000003b5, 0x001a0600, 4716af6bb5bSdamien 0x038919be, 0x06336f77, 0x6af65329, 0x08f186c8, 0x00046384, 4726af6bb5bSdamien 0x00000000, 0x00000000, 0x00000880, 0xd6be4788, 0x002fc160, 4736af6bb5bSdamien 0x002fc160, 0x002fc160, 0x1883800a, 0x00000000, 0x0a1a9caa, 4746af6bb5bSdamien 0x18010000, 0x30032602, 0x48073e06, 0x560b4c0a, 0x641a600f, 4756af6bb5bSdamien 0x7a4f6e1b, 0x8c5b7e5a, 0x9d0f96cf, 0xb51fa69f, 0xcb3fbcbf, 4766af6bb5bSdamien 0x0000d7bf, 0x00000000, 0x00000000, 0x00000000 477498e8a28Sdamien }; 478498e8a28Sdamien 479498e8a28Sdamien static const uint32_t ar9160_vals_2g40[] = { 480498e8a28Sdamien 0x000002c0, 0x00000318, 0x00007c70, 0x00016000, 0x10801600, 4816af6bb5bSdamien 0x12e013d7, 0x08f04810, 0x0000320a, 0x000003c4, 0x02020200, 4826af6bb5bSdamien 0x00000e0e, 0x0a020001, 0x00000e0e, 0x00000007, 0x037216a0, 4836af6bb5bSdamien 0x00197a68, 0x00197a68, 0x00197a68, 0x6d48b0e2, 0x7ec82d2e, 4846af6bb5bSdamien 0x3139605e, 0x00048d20, 0x0001ce00, 0x409a40d0, 0x050cb081, 4856af6bb5bSdamien 0x00001130, 0x00000016, 0xd00a8a0d, 0xffb81020, 0x00009b40, 4866af6bb5bSdamien 0x00009b40, 0x00009b40, 0x00001120, 0x000003ce, 0x001a0c00, 4876af6bb5bSdamien 0x038919be, 0x06336f77, 0x6af65329, 0x08f186c8, 0x00046384, 4886af6bb5bSdamien 0x00000000, 0x00000000, 0x00000880, 0xd03e4788, 0x002ac120, 4896af6bb5bSdamien 0x002ac120, 0x002ac120, 0x1883800a, 0x00000210, 0x0a1a7caa, 4906af6bb5bSdamien 0x18010000, 0x2e032402, 0x4a0a3c06, 0x621a540b, 0x764f6c1b, 4916af6bb5bSdamien 0x845b7a5a, 0x950f8ccf, 0xa5cf9b4f, 0xbddfaf1f, 0xd1ffc93f, 4926af6bb5bSdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000 493498e8a28Sdamien }; 494498e8a28Sdamien 495498e8a28Sdamien static const uint32_t ar9160_vals_2g20[] = { 496498e8a28Sdamien 0x00000160, 0x0000018c, 0x00003e38, 0x0000b000, 0x08400b00, 4976af6bb5bSdamien 0x12e013ab, 0x08f04810, 0x0000320a, 0x00000300, 0x02020200, 4986af6bb5bSdamien 0x00000e0e, 0x0a020001, 0x00000e0e, 0x00000007, 0x037216a0, 4996af6bb5bSdamien 0x00197a68, 0x00197a68, 0x00197a68, 0x6c48b0e2, 0x7ec82d2e, 5006af6bb5bSdamien 0x31395d5e, 0x00048d20, 0x0001ce00, 0x409a40d0, 0x050cb081, 5016af6bb5bSdamien 0x00000898, 0x0000000b, 0xd00a8a0d, 0xffb81020, 0x00009b40, 5026af6bb5bSdamien 0x00009b40, 0x00009b40, 0x00001120, 0x000003ce, 0x001a0c00, 5036af6bb5bSdamien 0x038919be, 0x06336f77, 0x6af65329, 0x08f186c8, 0x00046384, 5046af6bb5bSdamien 0x00000000, 0x00000000, 0x00000880, 0xd03e4788, 0x002ac120, 5056af6bb5bSdamien 0x002ac120, 0x002ac120, 0x1883800a, 0x00000108, 0x0a1a7caa, 5066af6bb5bSdamien 0x18010000, 0x2e032402, 0x4a0a3c06, 0x621a540b, 0x764f6c1b, 5076af6bb5bSdamien 0x845b7a5a, 0x950f8ccf, 0xa5cf9b4f, 0xbddfaf1f, 0xd1ffc93f, 5086af6bb5bSdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000 509498e8a28Sdamien }; 510498e8a28Sdamien 511498e8a28Sdamien static const uint16_t ar9160_cm_regs[] = { 512498e8a28Sdamien P(0x0000c), P(0x00030), P(0x00034), P(0x00040), P(0x00044), 513498e8a28Sdamien P(0x00048), P(0x0004c), P(0x00050), P(0x00054), P(0x00800), 514498e8a28Sdamien P(0x00804), P(0x00808), P(0x0080c), P(0x00810), P(0x00814), 515498e8a28Sdamien P(0x00818), P(0x0081c), P(0x00820), P(0x00824), P(0x01040), 516498e8a28Sdamien P(0x01044), P(0x01048), P(0x0104c), P(0x01050), P(0x01054), 517498e8a28Sdamien P(0x01058), P(0x0105c), P(0x01060), P(0x01064), P(0x01230), 518498e8a28Sdamien P(0x01270), P(0x01038), P(0x01078), P(0x010b8), P(0x010f8), 519498e8a28Sdamien P(0x01138), P(0x01178), P(0x011b8), P(0x011f8), P(0x01238), 520498e8a28Sdamien P(0x01278), P(0x012b8), P(0x012f8), P(0x01338), P(0x01378), 521498e8a28Sdamien P(0x013b8), P(0x013f8), P(0x01438), P(0x01478), P(0x014b8), 522498e8a28Sdamien P(0x014f8), P(0x01538), P(0x01578), P(0x015b8), P(0x015f8), 523498e8a28Sdamien P(0x01638), P(0x01678), P(0x016b8), P(0x016f8), P(0x01738), 524498e8a28Sdamien P(0x01778), P(0x017b8), P(0x017f8), P(0x0103c), P(0x0107c), 525498e8a28Sdamien P(0x010bc), P(0x010fc), P(0x0113c), P(0x0117c), P(0x011bc), 526498e8a28Sdamien P(0x011fc), P(0x0123c), P(0x0127c), P(0x012bc), P(0x012fc), 527498e8a28Sdamien P(0x0133c), P(0x0137c), P(0x013bc), P(0x013fc), P(0x0143c), 528498e8a28Sdamien P(0x0147c), P(0x04030), P(0x0403c), P(0x07010), P(0x07038), 529498e8a28Sdamien P(0x08004), P(0x08008), P(0x0800c), P(0x08018), P(0x08020), 530498e8a28Sdamien P(0x08038), P(0x0803c), P(0x08048), P(0x08054), P(0x08058), 531498e8a28Sdamien P(0x0805c), P(0x08060), P(0x08064), P(0x080c0), P(0x080c4), 532498e8a28Sdamien P(0x080c8), P(0x080cc), P(0x080d0), P(0x080d4), P(0x080d8), 533498e8a28Sdamien P(0x080e0), P(0x080e4), P(0x080e8), P(0x080ec), P(0x080f0), 534498e8a28Sdamien P(0x080f4), P(0x080f8), P(0x080fc), P(0x08100), P(0x08104), 535498e8a28Sdamien P(0x08108), P(0x0810c), P(0x08110), P(0x08118), P(0x0811c), 5366af6bb5bSdamien P(0x08124), P(0x08128), P(0x0812c), P(0x08130), P(0x08134), 5376af6bb5bSdamien P(0x08138), P(0x0813c), P(0x08144), P(0x08168), P(0x0816c), 5386af6bb5bSdamien P(0x08170), P(0x08174), P(0x08178), P(0x0817c), P(0x081c4), 5396af6bb5bSdamien P(0x081ec), P(0x081f0), P(0x081f4), P(0x081f8), P(0x081fc), 5406af6bb5bSdamien P(0x08200), P(0x08204), P(0x08208), P(0x0820c), P(0x08210), 5416af6bb5bSdamien P(0x08214), P(0x08218), P(0x0821c), P(0x08220), P(0x08224), 5426af6bb5bSdamien P(0x08228), P(0x0822c), P(0x08230), P(0x08234), P(0x08238), 5436af6bb5bSdamien P(0x0823c), P(0x08240), P(0x08244), P(0x08248), P(0x0824c), 5446af6bb5bSdamien P(0x08250), P(0x08254), P(0x08258), P(0x0825c), P(0x08260), 5456af6bb5bSdamien P(0x08264), P(0x08270), P(0x08274), P(0x08278), P(0x0827c), 5466af6bb5bSdamien P(0x08284), P(0x08288), P(0x0828c), P(0x08294), P(0x08298), 5476af6bb5bSdamien P(0x08300), P(0x08304), P(0x08308), P(0x0830c), P(0x08310), 5486af6bb5bSdamien P(0x08314), P(0x08318), P(0x08328), P(0x0832c), P(0x08330), 5496af6bb5bSdamien P(0x08334), P(0x08338), P(0x0833c), P(0x08340), P(0x09808), 5506af6bb5bSdamien P(0x0980c), P(0x09810), P(0x09814), P(0x0981c), P(0x0982c), 5516af6bb5bSdamien P(0x09830), P(0x0983c), P(0x09840), P(0x0984c), P(0x09854), 5526af6bb5bSdamien P(0x09900), P(0x09904), P(0x09908), P(0x0990c), P(0x0991c), 5536af6bb5bSdamien P(0x09920), P(0x0a920), P(0x0b920), P(0x09928), P(0x0992c), 5546af6bb5bSdamien P(0x09934), P(0x09938), P(0x0993c), P(0x09948), P(0x0994c), 5556af6bb5bSdamien P(0x09954), P(0x09958), P(0x09940), P(0x0c95c), P(0x09970), 5566af6bb5bSdamien P(0x09974), P(0x09978), P(0x0997c), P(0x09980), P(0x09984), 5576af6bb5bSdamien P(0x09988), P(0x0998c), P(0x09990), P(0x09994), P(0x09998), 5586af6bb5bSdamien P(0x0999c), P(0x099a0), P(0x099a4), P(0x099a8), P(0x099ac), 5596af6bb5bSdamien P(0x099b0), P(0x099dc), P(0x099e0), P(0x099e4), P(0x099e8), 5606af6bb5bSdamien P(0x099ec), P(0x099fc), P(0x09b00), P(0x09b04), P(0x09b08), 5616af6bb5bSdamien P(0x09b0c), P(0x09b10), P(0x09b14), P(0x09b18), P(0x09b1c), 5626af6bb5bSdamien P(0x09b20), P(0x09b24), P(0x09b28), P(0x09b2c), P(0x09b30), 5636af6bb5bSdamien P(0x09b34), P(0x09b38), P(0x09b3c), P(0x09b40), P(0x09b44), 5646af6bb5bSdamien P(0x09b48), P(0x09b4c), P(0x09b50), P(0x09b54), P(0x09b58), 5656af6bb5bSdamien P(0x09b5c), P(0x09b60), P(0x09b64), P(0x09b68), P(0x09b6c), 5666af6bb5bSdamien P(0x09b70), P(0x09b74), P(0x09b78), P(0x09b7c), P(0x09b80), 5676af6bb5bSdamien P(0x09b84), P(0x09b88), P(0x09b8c), P(0x09b90), P(0x09b94), 5686af6bb5bSdamien P(0x09b98), P(0x09b9c), P(0x09ba0), P(0x09ba4), P(0x09ba8), 5696af6bb5bSdamien P(0x09bac), P(0x09bb0), P(0x09bb4), P(0x09bb8), P(0x09bbc), 5706af6bb5bSdamien P(0x09bc0), P(0x09bc4), P(0x09bc8), P(0x09bcc), P(0x09bd0), 5716af6bb5bSdamien P(0x09bd4), P(0x09bd8), P(0x09bdc), P(0x09be0), P(0x09be4), 5726af6bb5bSdamien P(0x09be8), P(0x09bec), P(0x09bf0), P(0x09bf4), P(0x09bf8), 5736af6bb5bSdamien P(0x09bfc), P(0x0a210), P(0x0a214), P(0x0a218), P(0x0a220), 5746af6bb5bSdamien P(0x0a224), P(0x0a228), P(0x0a22c), P(0x0a234), P(0x0a238), 5756af6bb5bSdamien P(0x0a23c), P(0x0a240), P(0x0a244), P(0x0a248), P(0x0a24c), 5766af6bb5bSdamien P(0x0a250), P(0x0a254), P(0x0a258), P(0x0a25c), P(0x0a260), 5776af6bb5bSdamien P(0x0a268), P(0x0a26c), P(0x0b26c), P(0x0c26c), P(0x0d270), 5786af6bb5bSdamien P(0x0a278), P(0x0a27c), P(0x0a338), P(0x0a33c), P(0x0a340), 5796af6bb5bSdamien P(0x0a344), P(0x0a348), P(0x0a34c), P(0x0a350), P(0x0a354), 5806af6bb5bSdamien P(0x0a358), P(0x0d35c), P(0x0d360), P(0x0d364), P(0x0d368), 5816af6bb5bSdamien P(0x0d36c), P(0x0d370), P(0x0d374), P(0x0d378), P(0x0d37c), 5826af6bb5bSdamien P(0x0d380), P(0x0d384), P(0x0a388), P(0x0a38c), P(0x0a390), 5836af6bb5bSdamien P(0x0a394), P(0x0a398), P(0x0a39c), P(0x0a3a0), P(0x0a3a4), 5846af6bb5bSdamien P(0x0a3a8), P(0x0a3ac), P(0x0a3b0), P(0x0a3b4), P(0x0a3b8), 5856af6bb5bSdamien P(0x0a3bc), P(0x0a3c0), P(0x0a3c4), P(0x0a3c8), P(0x0a3cc), 5866af6bb5bSdamien P(0x0a3d0), P(0x0a3d4), P(0x0a3dc), P(0x0a3e0) 587498e8a28Sdamien }; 588498e8a28Sdamien 589498e8a28Sdamien static const uint32_t ar9160_cm_vals[] = { 590498e8a28Sdamien 0x00000000, 0x00020015, 0x00000005, 0x00000000, 0x00000008, 591498e8a28Sdamien 0x00000008, 0x00000010, 0x00000000, 0x0000001f, 0x00000000, 592498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 593498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x002ffc0f, 594498e8a28Sdamien 0x002ffc0f, 0x002ffc0f, 0x002ffc0f, 0x002ffc0f, 0x002ffc0f, 595498e8a28Sdamien 0x002ffc0f, 0x002ffc0f, 0x002ffc0f, 0x002ffc0f, 0x00000000, 596498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 597498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 598498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 599498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 600498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 601498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 602498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 603498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 604498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 605498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 606498e8a28Sdamien 0x00000000, 0x00000002, 0x00000002, 0x00000020, 0x000004c2, 607498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000700, 0x00000000, 608498e8a28Sdamien 0x00000000, 0x00000000, 0x40000000, 0x00000000, 0x00000000, 609498e8a28Sdamien 0x000fc78f, 0x0000000f, 0x00000000, 0x2a82301a, 0x05dc01e0, 610498e8a28Sdamien 0x1f402710, 0x01f40000, 0x00001e00, 0x00000000, 0x00400000, 611498e8a28Sdamien 0xffffffff, 0x0000ffff, 0x003f3f3f, 0x00000000, 0x00000000, 612498e8a28Sdamien 0x00000000, 0x00000000, 0x00020000, 0x00020000, 0x00000001, 613498e8a28Sdamien 0x00000052, 0x00000000, 0x00000168, 0x000100aa, 0x00003210, 6146af6bb5bSdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 6156af6bb5bSdamien 0x00000000, 0x00000000, 0xffffffff, 0x00000000, 0x00000000, 6166af6bb5bSdamien 0x32143320, 0xfaa4fa50, 0x00000100, 0x00000000, 0x00000000, 617498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 618498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 619498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 620498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 6216af6bb5bSdamien 0x00000000, 0x00100000, 0x0010f400, 0x00000100, 0x0001e800, 6226af6bb5bSdamien 0x00000000, 0x00000000, 0x00000000, 0x400000ff, 0x00080922, 6236af6bb5bSdamien 0x88a00010, 0x00000000, 0x40000000, 0x003e4180, 0x00000000, 6246af6bb5bSdamien 0x0000002c, 0x0000002c, 0x00000000, 0x00000000, 0x00000000, 625498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 6266af6bb5bSdamien 0x00000000, 0x00000000, 0x00000000, 0x00000007, 0x00000302, 6276af6bb5bSdamien 0x00000e00, 0x00ff0000, 0x00000000, 0x000107ff, 0x00000000, 6286af6bb5bSdamien 0xad848e19, 0x7d14e000, 0x9c0a9f6b, 0x00000000, 0x0000a000, 6296af6bb5bSdamien 0x00000000, 0x00200400, 0x206a01ae, 0x1284233c, 0x00000859, 6306af6bb5bSdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x10000fff, 6316af6bb5bSdamien 0x05100000, 0x05100000, 0x05100000, 0x00000001, 0x00000004, 6326af6bb5bSdamien 0x1e1f2022, 0x0a0b0c0d, 0x00000000, 0x9280b212, 0x00020028, 6336af6bb5bSdamien 0x5f3ca3de, 0x2108ecff, 0x00750604, 0x004b6a8e, 0x190fb515, 6346af6bb5bSdamien 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 6356af6bb5bSdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 6366af6bb5bSdamien 0x00000000, 0x00000000, 0x00000001, 0x201fff00, 0x006f0000, 6376af6bb5bSdamien 0x03051000, 0x00000000, 0x00000200, 0xaaaaaaaa, 0x3c466478, 6386af6bb5bSdamien 0x0cc80caa, 0x00001042, 0x00000000, 0x00000001, 0x00000002, 6396af6bb5bSdamien 0x00000003, 0x00000004, 0x00000005, 0x00000008, 0x00000009, 6406af6bb5bSdamien 0x0000000a, 0x0000000b, 0x0000000c, 0x0000000d, 0x00000010, 6416af6bb5bSdamien 0x00000011, 0x00000012, 0x00000013, 0x00000014, 0x00000015, 6426af6bb5bSdamien 0x00000018, 0x00000019, 0x0000001a, 0x0000001b, 0x0000001c, 6436af6bb5bSdamien 0x0000001d, 0x00000020, 0x00000021, 0x00000022, 0x00000023, 6446af6bb5bSdamien 0x00000024, 0x00000025, 0x00000028, 0x00000029, 0x0000002a, 6456af6bb5bSdamien 0x0000002b, 0x0000002c, 0x0000002d, 0x00000030, 0x00000031, 6466af6bb5bSdamien 0x00000032, 0x00000033, 0x00000034, 0x00000035, 0x00000035, 647498e8a28Sdamien 0x00000035, 0x00000035, 0x00000035, 0x00000035, 0x00000035, 648498e8a28Sdamien 0x00000035, 0x00000035, 0x00000035, 0x00000035, 0x00000035, 649498e8a28Sdamien 0x00000035, 0x00000035, 0x00000035, 0x00000035, 0x00000035, 6506af6bb5bSdamien 0x00000035, 0x00000035, 0x00000035, 0x00000035, 0x00000010, 6516af6bb5bSdamien 0x0000001a, 0x40806333, 0x00106c10, 0x009c4060, 0x018830c6, 6526af6bb5bSdamien 0x00000400, 0x001a0bb5, 0x00000000, 0x20202020, 0x20202020, 6536af6bb5bSdamien 0x13c889af, 0x38490a20, 0x00007bb6, 0x0fff3ffc, 0x00000001, 6546af6bb5bSdamien 0x0000e000, 0x00000000, 0x0cc75380, 0x0f0f0f01, 0xdfa91f01, 6556af6bb5bSdamien 0x00000001, 0x0e79e5c6, 0x0e79e5c6, 0x0e79e5c6, 0x00820820, 6566af6bb5bSdamien 0x1ce739ce, 0x050701ce, 0x00000000, 0x00000000, 0x00000000, 6576af6bb5bSdamien 0x00000000, 0x3fffffff, 0x3fffffff, 0x3fffffff, 0x0003ffff, 6586af6bb5bSdamien 0x79bfaa03, 0x07ffffef, 0x0fffffe7, 0x17ffffe5, 0x1fffffe4, 6596af6bb5bSdamien 0x37ffffe3, 0x3fffffe3, 0x57ffffe3, 0x5fffffe2, 0x7fffffe2, 6606af6bb5bSdamien 0x7f3c7bba, 0xf3307ff0, 0x0c000000, 0x20202020, 0x20202020, 6616af6bb5bSdamien 0x1ce739ce, 0x000001ce, 0x00000001, 0x00000000, 0x00000000, 662498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 6636af6bb5bSdamien 0x00000000, 0x00000000, 0x00000000, 0x00000246, 0x20202020, 6646af6bb5bSdamien 0x20202020, 0x20202020, 0x1ce739ce, 0x000001ce 665498e8a28Sdamien }; 666498e8a28Sdamien 667498e8a28Sdamien static const struct athn_ini ar9160_ini = { 668498e8a28Sdamien nitems(ar9160_regs), 669498e8a28Sdamien ar9160_regs, 670498e8a28Sdamien ar9160_vals_5g20, 671498e8a28Sdamien ar9160_vals_5g40, 672498e8a28Sdamien ar9160_vals_2g40, 673498e8a28Sdamien ar9160_vals_2g20, 674498e8a28Sdamien nitems(ar9160_cm_regs), 675498e8a28Sdamien ar9160_cm_regs, 676498e8a28Sdamien ar9160_cm_vals 677498e8a28Sdamien }; 678498e8a28Sdamien 679498e8a28Sdamien /* 680498e8a28Sdamien * BB/RF Gains common to AR5416 and AR9160. 681498e8a28Sdamien */ 682498e8a28Sdamien static const uint32_t ar5416_bb_rfgain_vals_5g[] = { 683498e8a28Sdamien 0x00000000, 0x00000040, 0x00000080, 0x000001a1, 0x000001e1, 684498e8a28Sdamien 0x00000021, 0x00000061, 0x00000168, 0x000001a8, 0x000001e8, 685498e8a28Sdamien 0x00000028, 0x00000068, 0x00000189, 0x000001c9, 0x00000009, 686498e8a28Sdamien 0x00000049, 0x00000089, 0x00000170, 0x000001b0, 0x000001f0, 687498e8a28Sdamien 0x00000030, 0x00000070, 0x00000191, 0x000001d1, 0x00000011, 688498e8a28Sdamien 0x00000051, 0x00000091, 0x000001b8, 0x000001f8, 0x00000038, 689498e8a28Sdamien 0x00000078, 0x00000199, 0x000001d9, 0x00000019, 0x00000059, 690498e8a28Sdamien 0x00000099, 0x000000d9, 0x000000f9, 0x000000f9, 0x000000f9, 691498e8a28Sdamien 0x000000f9, 0x000000f9, 0x000000f9, 0x000000f9, 0x000000f9, 692498e8a28Sdamien 0x000000f9, 0x000000f9, 0x000000f9, 0x000000f9, 0x000000f9, 693498e8a28Sdamien 0x000000f9, 0x000000f9, 0x000000f9, 0x000000f9, 0x000000f9, 694498e8a28Sdamien 0x000000f9, 0x000000f9, 0x000000f9, 0x000000f9, 0x000000f9, 695498e8a28Sdamien 0x000000f9, 0x000000f9, 0x000000f9, 0x000000f9 696498e8a28Sdamien }; 697498e8a28Sdamien 698498e8a28Sdamien static const uint32_t ar5416_bb_rfgain_vals_2g[] = { 699498e8a28Sdamien 0x00000000, 0x00000040, 0x00000080, 0x00000141, 0x00000181, 700498e8a28Sdamien 0x000001c1, 0x00000001, 0x00000041, 0x000001a8, 0x000001e8, 701498e8a28Sdamien 0x00000028, 0x00000068, 0x000000a8, 0x00000169, 0x000001a9, 702498e8a28Sdamien 0x000001e9, 0x00000029, 0x00000069, 0x00000190, 0x000001d0, 703498e8a28Sdamien 0x00000010, 0x00000050, 0x00000090, 0x00000151, 0x00000191, 704498e8a28Sdamien 0x000001d1, 0x00000011, 0x00000051, 0x00000198, 0x000001d8, 705498e8a28Sdamien 0x00000018, 0x00000058, 0x00000098, 0x00000159, 0x00000199, 706498e8a28Sdamien 0x000001d9, 0x00000019, 0x00000059, 0x00000099, 0x000000d9, 707498e8a28Sdamien 0x000000f9, 0x000000f9, 0x000000f9, 0x000000f9, 0x000000f9, 708498e8a28Sdamien 0x000000f9, 0x000000f9, 0x000000f9, 0x000000f9, 0x000000f9, 709498e8a28Sdamien 0x000000f9, 0x000000f9, 0x000000f9, 0x000000f9, 0x000000f9, 710498e8a28Sdamien 0x000000f9, 0x000000f9, 0x000000f9, 0x000000f9, 0x000000f9, 711498e8a28Sdamien 0x000000f9, 0x000000f9, 0x000000f9, 0x000000f9 712498e8a28Sdamien }; 713498e8a28Sdamien 714498e8a28Sdamien static const uint32_t ar5416_2_1_addac_vals[] = { 715498e8a28Sdamien 0x00000000, 0x00000003, 0x00000000, 0x0000000c, 0x00000000, 716498e8a28Sdamien 0x00000030, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 717498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 718498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000060, 0x00000000, 719498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 720498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 721498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 722498e8a28Sdamien 0x00000000 723498e8a28Sdamien }; 724498e8a28Sdamien 725498e8a28Sdamien static const struct athn_addac ar5416_2_1_addac = { 726498e8a28Sdamien nitems(ar5416_2_1_addac_vals), 727498e8a28Sdamien ar5416_2_1_addac_vals 728498e8a28Sdamien }; 729498e8a28Sdamien 730498e8a28Sdamien static const uint32_t ar5416_2_2_addac_vals[] = { 731498e8a28Sdamien 0x00000000, 0x00000003, 0x00000000, 0x0000000c, 0x00000000, 732498e8a28Sdamien 0x00000030, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 733498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 734498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000060, 0x00000000, 735498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 736498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 737498e8a28Sdamien 0x00000000, 0x00000058, 0x00000000, 0x00000000, 0x00000000, 738498e8a28Sdamien 0x00000000 739498e8a28Sdamien }; 740498e8a28Sdamien 741498e8a28Sdamien static const struct athn_addac ar5416_2_2_addac = { 742498e8a28Sdamien nitems(ar5416_2_2_addac_vals), 743498e8a28Sdamien ar5416_2_2_addac_vals 744498e8a28Sdamien }; 745498e8a28Sdamien 746498e8a28Sdamien static const uint32_t ar9160_1_0_addac_vals[] = { 747498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 748498e8a28Sdamien 0x00000000, 0x000000c0, 0x00000018, 0x00000004, 0x00000000, 749498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 750498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 751498e8a28Sdamien 0x00000000, 0x000000c0, 0x00000019, 0x00000004, 0x00000000, 752498e8a28Sdamien 0x00000000, 0x00000000, 0x00000004, 0x00000003, 0x00000008, 753498e8a28Sdamien 0x00000000 754498e8a28Sdamien }; 755498e8a28Sdamien 756498e8a28Sdamien static const struct athn_addac ar9160_1_0_addac = { 757498e8a28Sdamien nitems(ar9160_1_0_addac_vals), 758498e8a28Sdamien ar9160_1_0_addac_vals 759498e8a28Sdamien }; 760498e8a28Sdamien 761498e8a28Sdamien static const uint32_t ar9160_1_1_addac_vals[] = { 762498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 763498e8a28Sdamien 0x00000000, 0x000000c0, 0x00000018, 0x00000004, 0x00000000, 764498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 765498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 766498e8a28Sdamien 0x00000000, 0x000000c0, 0x00000019, 0x00000004, 0x00000000, 767498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 768498e8a28Sdamien 0x00000000 769498e8a28Sdamien }; 770498e8a28Sdamien 771498e8a28Sdamien static const struct athn_addac ar9160_1_1_addac = { 772498e8a28Sdamien nitems(ar9160_1_1_addac_vals), 773498e8a28Sdamien ar9160_1_1_addac_vals 774498e8a28Sdamien }; 775498e8a28Sdamien 776498e8a28Sdamien static const uint32_t ar5416_bank6tpc_vals[] = { 777498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00e00000, 0x005e0000, 778498e8a28Sdamien 0x00120000, 0x00620000, 0x00020000, 0x00ff0000, 0x00ff0000, 779498e8a28Sdamien 0x00ff0000, 0x40ff0000, 0x005f0000, 0x00870000, 0x00f90000, 780498e8a28Sdamien 0x007b0000, 0x00ff0000, 0x00f50000, 0x00dc0000, 0x00110000, 781498e8a28Sdamien 0x006100a8, 0x00423022, 0x201400df, 0x00c40002, 0x003000f2, 782498e8a28Sdamien 0x00440016, 0x00410040, 0x0001805e, 0x0000c0ab, 0x000000e1, 783498e8a28Sdamien 0x00007081, 0x000000d4 784498e8a28Sdamien }; 785498e8a28Sdamien 786498e8a28Sdamien static const uint32_t ar9160_bank6tpc_vals[] = { 787498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00e00000, 0x005e0000, 788498e8a28Sdamien 0x00120000, 0x00620000, 0x00020000, 0x00ff0000, 0x00ff0000, 789498e8a28Sdamien 0x00ff0000, 0x40ff0000, 0x005f0000, 0x00870000, 0x00f90000, 790498e8a28Sdamien 0x007b0000, 0x00ff0000, 0x00f50000, 0x00dc0000, 0x00110000, 791498e8a28Sdamien 0x006100a8, 0x00423022, 0x2014008f, 0x00c40002, 0x003000f2, 792498e8a28Sdamien 0x00440016, 0x00410040, 0x0001805e, 0x0000c0ab, 0x000000e1, 793498e8a28Sdamien 0x00007080, 0x000000d4 794498e8a28Sdamien }; 795498e8a28Sdamien 796498e8a28Sdamien static const uint32_t ar5416_bank6_vals[] = { 797498e8a28Sdamien 0x00000000, 0x00000000, 0x00000000, 0x00e00000, 0x005e0000, 798498e8a28Sdamien 0x00120000, 0x00620000, 0x00020000, 0x00ff0000, 0x00ff0000, 799498e8a28Sdamien 0x00ff0000, 0x40ff0000, 0x005f0000, 0x00870000, 0x00f90000, 800498e8a28Sdamien 0x007b0000, 0x00ff0000, 0x00f50000, 0x00dc0000, 0x00110000, 801498e8a28Sdamien 0x006100a8, 0x004210a2, 0x0014008f, 0x00c40003, 0x003000f2, 802498e8a28Sdamien 0x00440016, 0x00410040, 0x0001805e, 0x0000c0ab, 0x000000f1, 803498e8a28Sdamien 0x00002081, 0x000000d4 804498e8a28Sdamien }; 805498e8a28Sdamien 806498e8a28Sdamien /* 807498e8a28Sdamien * Serializer/Deserializer programming. 808498e8a28Sdamien */ 809c8971d2aSstsp 810c8971d2aSstsp static const uint32_t ar5416_serdes_regs[] = { 811c8971d2aSstsp AR_PCIE_SERDES, 812c8971d2aSstsp AR_PCIE_SERDES, 813c8971d2aSstsp AR_PCIE_SERDES, 814c8971d2aSstsp AR_PCIE_SERDES, 815c8971d2aSstsp AR_PCIE_SERDES, 816c8971d2aSstsp AR_PCIE_SERDES, 817c8971d2aSstsp AR_PCIE_SERDES, 818c8971d2aSstsp AR_PCIE_SERDES, 819c8971d2aSstsp AR_PCIE_SERDES, 820c8971d2aSstsp AR_PCIE_SERDES2 821c8971d2aSstsp }; 822c8971d2aSstsp 823328b15b2Skettenis static const uint32_t ar5416_serdes_vals[] = { 824498e8a28Sdamien 0x9248fc00, 825498e8a28Sdamien 0x24924924, 826498e8a28Sdamien /* RX shut off when elecidle is asserted. */ 827498e8a28Sdamien 0x28000039, 828498e8a28Sdamien 0x53160824, 829498e8a28Sdamien 0xe5980579, 830498e8a28Sdamien 0x001defff, 831498e8a28Sdamien 0x1aaabe40, 832498e8a28Sdamien 0xbe105554, 833c8971d2aSstsp 0x000e3007, 834c8971d2aSstsp 0x00000000 835498e8a28Sdamien }; 836328b15b2Skettenis 837328b15b2Skettenis static const struct athn_serdes ar5416_serdes = { 838328b15b2Skettenis nitems(ar5416_serdes_vals), 839c8971d2aSstsp ar5416_serdes_regs, 840c8971d2aSstsp ar5416_serdes_vals, 841328b15b2Skettenis }; 842