1 1.1 christos /* $NetBSD: arn5008reg.h,v 1.1 2013/03/30 02:53:00 christos Exp $ */ 2 1.1 christos /* $OpenBSD: ar5008reg.h,v 1.3 2010/12/31 17:50:48 damien Exp $ */ 3 1.1 christos 4 1.1 christos /*- 5 1.1 christos * Copyright (c) 2009 Damien Bergamini <damien.bergamini (at) free.fr> 6 1.1 christos * Copyright (c) 2008-2009 Atheros Communications Inc. 7 1.1 christos * 8 1.1 christos * Permission to use, copy, modify, and/or distribute this software for any 9 1.1 christos * purpose with or without fee is hereby granted, provided that the above 10 1.1 christos * copyright notice and this permission notice appear in all copies. 11 1.1 christos * 12 1.1 christos * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 13 1.1 christos * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 14 1.1 christos * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 15 1.1 christos * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 16 1.1 christos * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 17 1.1 christos * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 18 1.1 christos * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 19 1.1 christos */ 20 1.1 christos 21 1.1 christos #ifndef _ARN5008REG_H_ 22 1.1 christos #define _ARN5008REG_H_ 23 1.1 christos 24 1.1 christos /* 25 1.1 christos * MAC registers. 26 1.1 christos */ 27 1.1 christos #define AR_ISR_S2_S 0x00cc 28 1.1 christos #define AR_ISR_S3_S 0x00d0 29 1.1 christos #define AR_ISR_S4_S 0x00d4 30 1.1 christos #define AR_ISR_S5_S 0x00d8 31 1.1 christos #define AR_GPIO_IN_OUT 0x4048 32 1.1 christos #define AR_GPIO_OE_OUT 0x404c 33 1.1 christos #define AR_GPIO_INTR_POL 0x4050 34 1.1 christos #define AR_GPIO_INPUT_EN_VAL 0x4054 35 1.1 christos #define AR_GPIO_INPUT_MUX1 0x4058 36 1.1 christos #define AR_GPIO_INPUT_MUX2 0x405c 37 1.1 christos #define AR_GPIO_OUTPUT_MUX(i) (0x4060 + (i) * 4) 38 1.1 christos #define AR_INPUT_STATE 0x406c 39 1.1 christos #define AR_EEPROM_STATUS_DATA 0x407c 40 1.1 christos #define AR_OBS 0x4080 41 1.1 christos #define AR_GPIO_PDPU 0x4088 42 1.1 christos #define AR_PCIE_MSI 0x4094 43 1.1 christos 44 1.1 christos /* 45 1.1 christos * Analog registers. 46 1.1 christos */ 47 1.1 christos #define AR_IS_ANALOG_REG(reg) ((reg) >= 0x7800 && (reg) <= 0x78b4) 48 1.1 christos #define AR_AN_RF2G1_CH0 0x7810 49 1.1 christos #define AR_AN_RF5G1_CH0 0x7818 50 1.1 christos #define AR_AN_RF2G1_CH1 0x7834 51 1.1 christos #define AR_AN_RF5G1_CH1 0x783c 52 1.1 christos #define AR_AN_SYNTH9 0x7868 53 1.1 christos #define AR_AN_TOP1 0x7890 54 1.1 christos #define AR_AN_TOP2 0x7894 55 1.1 christos 56 1.1 christos /* 57 1.1 christos * PHY registers. 58 1.1 christos */ 59 1.1 christos #define AR_PHY_BASE 0x9800 60 1.1 christos #define AR_PHY(i) (AR_PHY_BASE + (i) * 4) 61 1.1 christos #define AR_PHY_TEST 0x9800 62 1.1 christos #define AR_PHY_TURBO 0x9804 63 1.1 christos #define AR_PHY_TEST2 0x9808 64 1.1 christos #define AR_PHY_TIMING2 0x9810 65 1.1 christos #define AR_PHY_TIMING3 0x9814 66 1.1 christos #define AR_PHY_CHIP_ID 0x9818 67 1.1 christos #define AR_PHY_ACTIVE 0x981c 68 1.1 christos #define AR_PHY_RF_CTL2 0x9824 69 1.1 christos #define AR_PHY_RF_CTL3 0x9828 70 1.1 christos #define AR_PHY_ADC_CTL 0x982c 71 1.1 christos #define AR_PHY_ADC_SERIAL_CTL 0x9830 72 1.1 christos #define AR_PHY_RF_CTL4 0x9834 73 1.1 christos #define AR_PHY_TSTDAC_CONST 0x983c 74 1.1 christos #define AR_PHY_SETTLING 0x9844 75 1.1 christos #define AR_PHY_RXGAIN 0x9848 76 1.1 christos #define AR_PHY_DESIRED_SZ 0x9850 77 1.1 christos #define AR_PHY_FIND_SIG 0x9858 78 1.1 christos #define AR_PHY_AGC_CTL1 0x985c 79 1.1 christos #define AR_PHY_AGC_CONTROL 0x9860 80 1.1 christos #define AR_PHY_CCA(i) (0x9864 + (i) * 0x1000) 81 1.1 christos #define AR_PHY_SFCORR 0x9868 82 1.1 christos #define AR_PHY_SFCORR_LOW 0x986c 83 1.1 christos #define AR_PHY_SLEEP_CTR_CONTROL 0x9870 84 1.1 christos #define AR_PHY_SLEEP_CTR_LIMIT 0x9874 85 1.1 christos #define AR_PHY_SLEEP_SCAL 0x9878 86 1.1 christos #define AR_PHY_PLL_CTL 0x987c 87 1.1 christos #define AR_PHY_BIN_MASK_1 0x9900 88 1.1 christos #define AR_PHY_BIN_MASK_2 0x9904 89 1.1 christos #define AR_PHY_BIN_MASK_3 0x9908 90 1.1 christos #define AR_PHY_MASK_CTL 0x990c 91 1.1 christos #define AR_PHY_RX_DELAY 0x9914 92 1.1 christos #define AR_PHY_SEARCH_START_DELAY 0x9918 93 1.1 christos #define AR_PHY_TIMING_CTRL4_0 0x9920 94 1.1 christos #define AR_PHY_TIMING_CTRL4(i) (0x9920 + (i) * 0x1000) 95 1.1 christos #define AR_PHY_TIMING5 0x9924 96 1.1 christos #define AR_PHY_POWER_TX_RATE1 0x9934 97 1.1 christos #define AR_PHY_POWER_TX_RATE2 0x9938 98 1.1 christos #define AR_PHY_POWER_TX_RATE_MAX 0x993c 99 1.1 christos #define AR_PHY_RADAR_EXT 0x9940 100 1.1 christos #define AR_PHY_FRAME_CTL 0x9944 101 1.1 christos #define AR_PHY_SPUR_REG 0x994c 102 1.1 christos #define AR_PHY_RADAR_0 0x9954 103 1.1 christos #define AR_PHY_RADAR_1 0x9958 104 1.1 christos #define AR_PHY_SWITCH_CHAIN_0 0x9960 105 1.1 christos #define AR_PHY_SWITCH_COM 0x9964 106 1.1 christos #define AR_PHY_SIGMA_DELTA 0x996c 107 1.1 christos #define AR_PHY_RESTART 0x9970 108 1.1 christos #define AR_PHY_RFBUS_REQ 0x997c 109 1.1 christos #define AR_PHY_TIMING7 0x9980 110 1.1 christos #define AR_PHY_TIMING8 0x9984 111 1.1 christos #define AR_PHY_BIN_MASK2_1 0x9988 112 1.1 christos #define AR_PHY_BIN_MASK2_2 0x998c 113 1.1 christos #define AR_PHY_BIN_MASK2_3 0x9990 114 1.1 christos #define AR_PHY_BIN_MASK2_4 0x9994 115 1.1 christos #define AR_PHY_TIMING9 0x9998 116 1.1 christos #define AR_PHY_TIMING10 0x999c 117 1.1 christos #define AR_PHY_TIMING11 0x99a0 118 1.1 christos #define AR_PHY_RX_CHAINMASK 0x99a4 119 1.1 christos #define AR_PHY_MULTICHAIN_GAIN_CTL 0x99ac 120 1.1 christos #define AR_PHY_NEW_ADC_DC_GAIN_CORR(i) (0x99b4 + (i) * 0x1000) 121 1.1 christos #define AR_PHY_EXT_CCA0 0x99b8 122 1.1 christos #define AR_PHY_EXT_CCA(i) (0x99bc + (i) * 0x1000) 123 1.1 christos #define AR_PHY_SFCORR_EXT 0x99c0 124 1.1 christos #define AR_PHY_HALFGI 0x99d0 125 1.1 christos #define AR_PHY_CHANNEL_MASK_01_30 0x99d4 126 1.1 christos #define AR_PHY_CHANNEL_MASK_31_60 0x99d8 127 1.1 christos #define AR_PHY_CHAN_INFO_MEMORY 0x99dc 128 1.1 christos #define AR_PHY_HEAVY_CLIP_ENABLE 0x99e0 129 1.1 christos #define AR_PHY_HEAVY_CLIP_FACTOR_RIFS 0x99ec 130 1.1 christos #define AR_PHY_CALMODE 0x99f0 131 1.1 christos #define AR_PHY_REFCLKDLY 0x99f4 132 1.1 christos #define AR_PHY_REFCLKPD 0x99f8 133 1.1 christos #define AR_PHY_BB_RFGAIN(i) (0x9a00 + (i) * 4) 134 1.1 christos #define AR_PHY_CAL_MEAS_0(i) (0x9c10 + (i) * 0x1000) 135 1.1 christos #define AR_PHY_CAL_MEAS_1(i) (0x9c14 + (i) * 0x1000) 136 1.1 christos #define AR_PHY_CAL_MEAS_2(i) (0x9c18 + (i) * 0x1000) 137 1.1 christos #define AR_PHY_CAL_MEAS_3(i) (0x9c1c + (i) * 0x1000) 138 1.1 christos #define AR_PHY_CURRENT_RSSI 0x9c1c 139 1.1 christos #define AR_PHY_RFBUS_GRANT 0x9c20 140 1.1 christos #define AR9280_PHY_CURRENT_RSSI 0x9c3c 141 1.1 christos #define AR_PHY_CHAN_INFO_GAIN_DIFF 0x9cf4 142 1.1 christos #define AR_PHY_CHAN_INFO_GAIN 0x9cfc 143 1.1 christos #define AR_PHY_MODE 0xa200 144 1.1 christos #define AR_PHY_CCK_TX_CTRL 0xa204 145 1.1 christos #define AR_PHY_CCK_DETECT 0xa208 146 1.1 christos #define AR_PHY_GAIN_2GHZ 0xa20c 147 1.1 christos #define AR_PHY_CCK_RXCTRL4 0xa21c 148 1.1 christos #define AR_PHY_DAG_CTRLCCK 0xa228 149 1.1 christos #define AR_PHY_FORCE_CLKEN_CCK 0xa22c 150 1.1 christos #define AR_PHY_POWER_TX_RATE3 0xa234 151 1.1 christos #define AR_PHY_POWER_TX_RATE4 0xa238 152 1.1 christos #define AR_PHY_SCRM_SEQ_XR 0xa23c 153 1.1 christos #define AR_PHY_HEADER_DETECT_XR 0xa240 154 1.1 christos #define AR_PHY_CHIRP_DETECTED_XR 0xa244 155 1.1 christos #define AR_PHY_BLUETOOTH 0xa254 156 1.1 christos #define AR_PHY_TPCRG1 0xa258 157 1.1 christos #define AR_PHY_TX_PWRCTRL4 0xa264 158 1.1 christos #define AR_PHY_ANALOG_SWAP 0xa268 159 1.1 christos #define AR_PHY_TPCRG5 0xa26c 160 1.1 christos #define AR_PHY_TX_PWRCTRL6_0 0xa270 161 1.1 christos #define AR_PHY_TX_PWRCTRL7 0xa274 162 1.1 christos #define AR_PHY_TX_PWRCTRL9 0xa27c 163 1.1 christos #define AR_PHY_PDADC_TBL_BASE 0xa280 164 1.1 christos #define AR_PHY_TX_GAIN_TBL(i) (0xa300 + (i) * 4) 165 1.1 christos #define AR_PHY_CL_CAL_CTL 0xa358 166 1.1 christos #define AR_PHY_CLC_TBL(i) (0xa35c + (i) * 4) 167 1.1 christos #define AR_PHY_POWER_TX_RATE5 0xa38c 168 1.1 christos #define AR_PHY_POWER_TX_RATE6 0xa390 169 1.1 christos #define AR_PHY_CH0_TX_PWRCTRL11 0xa398 170 1.1 christos #define AR_PHY_CAL_CHAINMASK 0xa39c 171 1.1 christos #define AR_PHY_VIT_MASK2_M_46_61 0xa3a0 172 1.1 christos #define AR_PHY_VIT_MASK2_M_31_45 0xa3a4 173 1.1 christos #define AR_PHY_VIT_MASK2_M_16_30 0xa3a8 174 1.1 christos #define AR_PHY_VIT_MASK2_M_00_15 0xa3ac 175 1.1 christos #define AR_PHY_PILOT_MASK_01_30 0xa3b0 176 1.1 christos #define AR_PHY_PILOT_MASK_31_60 0xa3b4 177 1.1 christos #define AR_PHY_VIT_MASK2_P_15_01 0xa3b8 178 1.1 christos #define AR_PHY_VIT_MASK2_P_30_16 0xa3bc 179 1.1 christos #define AR_PHY_VIT_MASK2_P_45_31 0xa3c0 180 1.1 christos #define AR_PHY_VIT_MASK2_P_61_46 0xa3c4 181 1.1 christos #define AR_PHY_POWER_TX_SUB 0xa3c8 182 1.1 christos #define AR_PHY_POWER_TX_RATE7 0xa3cc 183 1.1 christos #define AR_PHY_POWER_TX_RATE8 0xa3d0 184 1.1 christos #define AR_PHY_POWER_TX_RATE9 0xa3d4 185 1.1 christos #define AR_PHY_XPA_CFG 0xa3d8 186 1.1 christos #define AR_PHY_TX_PWRCTRL6_1 0xb270 187 1.1 christos #define AR_PHY_CH1_TX_PWRCTRL11 0xb398 188 1.1 christos 189 1.1 christos /* 190 1.1 christos * AR7010 registers. 191 1.1 christos */ 192 1.1 christos #define AR7010_GPIO_OE 0x52000 193 1.1 christos #define AR7010_GPIO_IN 0x52004 194 1.1 christos #define AR7010_GPIO_OUT 0x52008 195 1.1 christos 196 1.1 christos 197 1.1 christos /* Bits for AR_AN_RF2G1_CH0. */ 198 1.1 christos #define AR_AN_RF2G1_CH0_OB_M 0x03800000 199 1.1 christos #define AR_AN_RF2G1_CH0_OB_S 23 200 1.1 christos #define AR_AN_RF2G1_CH0_DB_M 0x1c000000 201 1.1 christos #define AR_AN_RF2G1_CH0_DB_S 26 202 1.1 christos 203 1.1 christos /* Bits for AR_AN_RF5G1_CH0. */ 204 1.1 christos #define AR_AN_RF5G1_CH0_OB5_M 0x00070000 205 1.1 christos #define AR_AN_RF5G1_CH0_OB5_S 16 206 1.1 christos #define AR_AN_RF5G1_CH0_DB5_M 0x00380000 207 1.1 christos #define AR_AN_RF5G1_CH0_DB5_S 19 208 1.1 christos 209 1.1 christos /* Bits for AR_AN_RF2G1_CH1. */ 210 1.1 christos #define AR_AN_RF2G1_CH1_OB_M 0x03800000 211 1.1 christos #define AR_AN_RF2G1_CH1_OB_S 23 212 1.1 christos #define AR_AN_RF2G1_CH1_DB_M 0x1c000000 213 1.1 christos #define AR_AN_RF2G1_CH1_DB_S 26 214 1.1 christos 215 1.1 christos /* Bits for AR_AN_RF5G1_CH1. */ 216 1.1 christos #define AR_AN_RF5G1_CH1_OB5_M 0x00070000 217 1.1 christos #define AR_AN_RF5G1_CH1_OB5_S 16 218 1.1 christos #define AR_AN_RF5G1_CH1_DB5_M 0x00380000 219 1.1 christos #define AR_AN_RF5G1_CH1_DB5_S 19 220 1.1 christos 221 1.1 christos /* Bits for AR_AN_SYNTH9. */ 222 1.1 christos #define AR_AN_SYNTH9_REFDIVA_M 0xf8000000 223 1.1 christos #define AR_AN_SYNTH9_REFDIVA_S 27 224 1.1 christos 225 1.1 christos /* Bits for AR_AN_TOP1. */ 226 1.1 christos #define AR_AN_TOP1_DACLPMODE 0x00040000 227 1.1 christos 228 1.1 christos /* Bits for AR_AN_TOP2. */ 229 1.1 christos #define AR_AN_TOP2_XPABIAS_LVL_M 0xc0000000 230 1.1 christos #define AR_AN_TOP2_XPABIAS_LVL_S 30 231 1.1 christos #define AR_AN_TOP2_LOCALBIAS 0x00200000 232 1.1 christos #define AR_AN_TOP2_PWDCLKIND 0x00400000 233 1.1 christos 234 1.1 christos /* Bits for AR_PHY_TEST. */ 235 1.1 christos #define AR_PHY_TEST_RFSILENT_BB 0x00002000 236 1.1 christos #define AR_PHY_TEST_AGC_CLR 0x10000000 237 1.1 christos 238 1.1 christos /* Bits for AR_PHY_TURBO. */ 239 1.1 christos #define AR_PHY_FC_TURBO_MODE 0x00000001 240 1.1 christos #define AR_PHY_FC_TURBO_SHORT 0x00000002 241 1.1 christos #define AR_PHY_FC_DYN2040_EN 0x00000004 242 1.1 christos #define AR_PHY_FC_DYN2040_PRI_ONLY 0x00000008 243 1.1 christos #define AR_PHY_FC_DYN2040_PRI_CH 0x00000010 244 1.1 christos #define AR_PHY_FC_DYN2040_EXT_CH 0x00000020 245 1.1 christos #define AR_PHY_FC_HT_EN 0x00000040 246 1.1 christos #define AR_PHY_FC_SHORT_GI_40 0x00000080 247 1.1 christos #define AR_PHY_FC_WALSH 0x00000100 248 1.1 christos #define AR_PHY_FC_SINGLE_HT_LTF1 0x00000200 249 1.1 christos #define AR_PHY_FC_ENABLE_DAC_FIFO 0x00000800 250 1.1 christos 251 1.1 christos /* Bits for AR_PHY_TIMING3. */ 252 1.1 christos #define AR_PHY_TIMING3_DSC_MAN_M 0xfffe0000 253 1.1 christos #define AR_PHY_TIMING3_DSC_MAN_S 17 254 1.1 christos #define AR_PHY_TIMING3_DSC_EXP_M 0x0001e000 255 1.1 christos #define AR_PHY_TIMING3_DSC_EXP_S 13 256 1.1 christos 257 1.1 christos /* Bits for AR_PHY_CHIP_ID. */ 258 1.1 christos #define AR_PHY_CHIP_ID_REV_0 0x00000080 259 1.1 christos #define AR_PHY_CHIP_ID_REV_1 0x00000081 260 1.1 christos #define AR_PHY_CHIP_ID_9160_REV_0 0x000000b0 261 1.1 christos 262 1.1 christos /* Bits for AR_PHY_ACTIVE. */ 263 1.1 christos #define AR_PHY_ACTIVE_EN 0x00000001 264 1.1 christos #define AR_PHY_ACTIVE_DIS 0x00000000 265 1.1 christos 266 1.1 christos /* Bits for AR_PHY_RF_CTL2. */ 267 1.1 christos #define AR_PHY_TX_END_DATA_START_M 0x000000ff 268 1.1 christos #define AR_PHY_TX_END_DATA_START_S 0 269 1.1 christos #define AR_PHY_TX_END_PA_ON_M 0x0000ff00 270 1.1 christos #define AR_PHY_TX_END_PA_ON_S 8 271 1.1 christos 272 1.1 christos /* Bits for AR_PHY_RF_CTL3. */ 273 1.1 christos #define AR_PHY_TX_END_TO_A2_RX_ON_M 0x00ff0000 274 1.1 christos #define AR_PHY_TX_END_TO_A2_RX_ON_S 16 275 1.1 christos 276 1.1 christos /* Bits for AR_PHY_ADC_CTL. */ 277 1.1 christos #define AR_PHY_ADC_CTL_OFF_INBUFGAIN_M 0x00000003 278 1.1 christos #define AR_PHY_ADC_CTL_OFF_INBUFGAIN_S 0 279 1.1 christos #define AR_PHY_ADC_CTL_OFF_PWDDAC 0x00002000 280 1.1 christos #define AR_PHY_ADC_CTL_OFF_PWDBANDGAP 0x00004000 281 1.1 christos #define AR_PHY_ADC_CTL_OFF_PWDADC 0x00008000 282 1.1 christos #define AR_PHY_ADC_CTL_ON_INBUFGAIN_M 0x00030000 283 1.1 christos #define AR_PHY_ADC_CTL_ON_INBUFGAIN_S 16 284 1.1 christos 285 1.1 christos /* Bits for AR_PHY_ADC_SERIAL_CTL. */ 286 1.1 christos #define AR_PHY_SEL_INTERNAL_ADDAC 0x00000000 287 1.1 christos #define AR_PHY_SEL_EXTERNAL_RADIO 0x00000001 288 1.1 christos 289 1.1 christos /* Bits for AR_PHY_RF_CTL4. */ 290 1.1 christos #define AR_PHY_RF_CTL4_TX_END_XPAB_OFF_M 0xff000000 291 1.1 christos #define AR_PHY_RF_CTL4_TX_END_XPAB_OFF_S 24 292 1.1 christos #define AR_PHY_RF_CTL4_TX_END_XPAA_OFF_M 0x00ff0000 293 1.1 christos #define AR_PHY_RF_CTL4_TX_END_XPAA_OFF_S 16 294 1.1 christos #define AR_PHY_RF_CTL4_FRAME_XPAB_ON_M 0x0000ff00 295 1.1 christos #define AR_PHY_RF_CTL4_FRAME_XPAB_ON_S 8 296 1.1 christos #define AR_PHY_RF_CTL4_FRAME_XPAA_ON_M 0x000000ff 297 1.1 christos #define AR_PHY_RF_CTL4_FRAME_XPAA_ON_S 0 298 1.1 christos 299 1.1 christos /* Bits for AR_PHY_SETTLING. */ 300 1.1 christos #define AR_PHY_SETTLING_SWITCH_M 0x00003f80 301 1.1 christos #define AR_PHY_SETTLING_SWITCH_S 7 302 1.1 christos 303 1.1 christos /* Bits for AR_PHY_RXGAIN. */ 304 1.1 christos #define AR_PHY_RXGAIN_TXRX_ATTEN_M 0x0003f000 305 1.1 christos #define AR_PHY_RXGAIN_TXRX_ATTEN_S 12 306 1.1 christos #define AR_PHY_RXGAIN_TXRX_RF_MAX_M 0x007c0000 307 1.1 christos #define AR_PHY_RXGAIN_TXRX_RF_MAX_S 18 308 1.1 christos #define AR9280_PHY_RXGAIN_TXRX_ATTEN_M 0x00003f80 309 1.1 christos #define AR9280_PHY_RXGAIN_TXRX_ATTEN_S 7 310 1.1 christos #define AR9280_PHY_RXGAIN_TXRX_MARGIN_M 0x001fc000 311 1.1 christos #define AR9280_PHY_RXGAIN_TXRX_MARGIN_S 14 312 1.1 christos 313 1.1 christos /* Bits for AR_PHY_DESIRED_SZ. */ 314 1.1 christos #define AR_PHY_DESIRED_SZ_ADC_M 0x000000ff 315 1.1 christos #define AR_PHY_DESIRED_SZ_ADC_S 0 316 1.1 christos #define AR_PHY_DESIRED_SZ_PGA_M 0x0000ff00 317 1.1 christos #define AR_PHY_DESIRED_SZ_PGA_S 8 318 1.1 christos #define AR_PHY_DESIRED_SZ_TOT_DES_M 0x0ff00000 319 1.1 christos #define AR_PHY_DESIRED_SZ_TOT_DES_S 20 320 1.1 christos 321 1.1 christos /* Bits for AR_PHY_FIND_SIG. */ 322 1.1 christos #define AR_PHY_FIND_SIG_FIRSTEP_M 0x0003f000 323 1.1 christos #define AR_PHY_FIND_SIG_FIRSTEP_S 12 324 1.1 christos #define AR_PHY_FIND_SIG_FIRPWR_M 0x03fc0000 325 1.1 christos #define AR_PHY_FIND_SIG_FIRPWR_S 18 326 1.1 christos 327 1.1 christos /* Bits for AR_PHY_AGC_CTL1. */ 328 1.1 christos #define AR_PHY_AGC_CTL1_COARSE_LOW_M 0x00007f80 329 1.1 christos #define AR_PHY_AGC_CTL1_COARSE_LOW_S 7 330 1.1 christos #define AR_PHY_AGC_CTL1_COARSE_HIGH_M 0x003f8000 331 1.1 christos #define AR_PHY_AGC_CTL1_COARSE_HIGH_S 15 332 1.1 christos 333 1.1 christos /* Bits for AR_PHY_AGC_CONTROL. */ 334 1.1 christos #define AR_PHY_AGC_CONTROL_CAL 0x00000001 335 1.1 christos #define AR_PHY_AGC_CONTROL_NF 0x00000002 336 1.1 christos #define AR_PHY_AGC_CONTROL_ENABLE_NF 0x00008000 337 1.1 christos #define AR_PHY_AGC_CONTROL_FLTR_CAL 0x00010000 338 1.1 christos #define AR_PHY_AGC_CONTROL_NO_UPDATE_NF 0x00020000 339 1.1 christos 340 1.1 christos /* Bits for AR_PHY_CCA. */ 341 1.1 christos #define AR_PHY_MAXCCA_PWR_M 0x000001ff 342 1.1 christos #define AR_PHY_MAXCCA_PWR_S 0 343 1.1 christos #define AR_PHY_CCA_THRESH62_M 0x0007f000 344 1.1 christos #define AR_PHY_CCA_THRESH62_S 12 345 1.1 christos #define AR_PHY_MINCCA_PWR_M 0x0ff80000 346 1.1 christos #define AR_PHY_MINCCA_PWR_S 19 347 1.1 christos #define AR9280_PHY_CCA_THRESH62_M 0x000ff000 348 1.1 christos #define AR9280_PHY_CCA_THRESH62_S 12 349 1.1 christos #define AR9280_PHY_MINCCA_PWR_M 0x1ff00000 350 1.1 christos #define AR9280_PHY_MINCCA_PWR_S 20 351 1.1 christos 352 1.1 christos /* Bits for AR_PHY_SFCORR_LOW. */ 353 1.1 christos #define AR_PHY_SFCORR_LOW_USE_SELF_CORR_LOW 0x00000001 354 1.1 christos #define AR_PHY_SFCORR_LOW_M2COUNT_THR_LOW_M 0x00003f00 355 1.1 christos #define AR_PHY_SFCORR_LOW_M2COUNT_THR_LOW_S 8 356 1.1 christos #define AR_PHY_SFCORR_LOW_M1_THRESH_LOW_M 0x001fc000 357 1.1 christos #define AR_PHY_SFCORR_LOW_M1_THRESH_LOW_S 14 358 1.1 christos #define AR_PHY_SFCORR_LOW_M2_THRESH_LOW_M 0x0fe00000 359 1.1 christos #define AR_PHY_SFCORR_LOW_M2_THRESH_LOW_S 21 360 1.1 christos 361 1.1 christos /* Bits for AR_PHY_SFCORR. */ 362 1.1 christos #define AR_PHY_SFCORR_M2COUNT_THR_M 0x0000001f 363 1.1 christos #define AR_PHY_SFCORR_M2COUNT_THR_S 0 364 1.1 christos #define AR_PHY_SFCORR_M1_THRESH_M 0x00fe0000 365 1.1 christos #define AR_PHY_SFCORR_M1_THRESH_S 17 366 1.1 christos #define AR_PHY_SFCORR_M2_THRESH_M 0x7f000000 367 1.1 christos #define AR_PHY_SFCORR_M2_THRESH_S 24 368 1.1 christos 369 1.1 christos /* Bits for AR_PHY_RX_DELAY. */ 370 1.1 christos #define AR_PHY_RX_DELAY_DELAY_M 0x00003fff 371 1.1 christos #define AR_PHY_RX_DELAY_DELAY_S 0 372 1.1 christos 373 1.1 christos /* Bits for AR_PHY_TIMING_CTRL4_0. */ 374 1.1 christos #define AR_PHY_TIMING_CTRL4_IQCORR_Q_Q_COFF_M 0x0000001f 375 1.1 christos #define AR_PHY_TIMING_CTRL4_IQCORR_Q_Q_COFF_S 0 376 1.1 christos #define AR_PHY_TIMING_CTRL4_IQCORR_Q_I_COFF_M 0x000007e0 377 1.1 christos #define AR_PHY_TIMING_CTRL4_IQCORR_Q_I_COFF_S 5 378 1.1 christos #define AR_PHY_TIMING_CTRL4_IQCORR_ENABLE 0x00000800 379 1.1 christos #define AR_PHY_TIMING_CTRL4_IQCAL_LOG_COUNT_MAX_M 0x0000f000 380 1.1 christos #define AR_PHY_TIMING_CTRL4_IQCAL_LOG_COUNT_MAX_S 12 381 1.1 christos #define AR_PHY_TIMING_CTRL4_DO_CAL 0x00010000 382 1.1 christos #define AR_PHY_TIMING_CTRL4_ENABLE_PILOT_MASK 0x10000000 383 1.1 christos #define AR_PHY_TIMING_CTRL4_ENABLE_CHAN_MASK 0x20000000 384 1.1 christos #define AR_PHY_TIMING_CTRL4_ENABLE_SPUR_FILTER 0x40000000 385 1.1 christos #define AR_PHY_TIMING_CTRL4_ENABLE_SPUR_RSSI 0x80000000 386 1.1 christos 387 1.1 christos /* Bits for AR_PHY_TIMING5. */ 388 1.1 christos #define AR_PHY_TIMING5_CYCPWR_THR1_M 0x000000fe 389 1.1 christos #define AR_PHY_TIMING5_CYCPWR_THR1_S 1 390 1.1 christos 391 1.1 christos /* Bits for AR_PHY_POWER_TX_RATE_MAX. */ 392 1.1 christos #define AR_PHY_POWER_TX_RATE_MAX_TPC_ENABLE 0x00000040 393 1.1 christos 394 1.1 christos /* Bits for AR_PHY_FRAME_CTL. */ 395 1.1 christos #define AR_PHY_FRAME_CTL_TX_CLIP_M 0x00000038 396 1.1 christos #define AR_PHY_FRAME_CTL_TX_CLIP_S 3 397 1.1 christos 398 1.1 christos /* Bits for AR_PHY_TXPWRADJ. */ 399 1.1 christos #define AR_PHY_TXPWRADJ_CCK_GAIN_DELTA_M 0x00000fc0 400 1.1 christos #define AR_PHY_TXPWRADJ_CCK_GAIN_DELTA_S 6 401 1.1 christos #define AR_PHY_TXPWRADJ_CCK_PCDAC_INDEX_M 0x00fc0000 402 1.1 christos #define AR_PHY_TXPWRADJ_CCK_PCDAC_INDEX_S 18 403 1.1 christos 404 1.1 christos /* Bits for AR_PHY_RADAR_EXT. */ 405 1.1 christos #define AR_PHY_RADAR_EXT_ENA 0x00004000 406 1.1 christos 407 1.1 christos /* Bits for AR_PHY_RADAR_0. */ 408 1.1 christos #define AR_PHY_RADAR_0_ENA 0x00000001 409 1.1 christos #define AR_PHY_RADAR_0_INBAND_M 0x0000003e 410 1.1 christos #define AR_PHY_RADAR_0_INBAND_S 1 411 1.1 christos #define AR_PHY_RADAR_0_PRSSI_M 0x00000fc0 412 1.1 christos #define AR_PHY_RADAR_0_PRSSI_S 6 413 1.1 christos #define AR_PHY_RADAR_0_HEIGHT_M 0x0003f000 414 1.1 christos #define AR_PHY_RADAR_0_HEIGHT_S 12 415 1.1 christos #define AR_PHY_RADAR_0_RRSSI_M 0x00fc0000 416 1.1 christos #define AR_PHY_RADAR_0_RRSSI_S 18 417 1.1 christos #define AR_PHY_RADAR_0_FIRPWR_M 0x7f000000 418 1.1 christos #define AR_PHY_RADAR_0_FIRPWR_S 24 419 1.1 christos #define AR_PHY_RADAR_0_FFT_ENA 0x80000000 420 1.1 christos 421 1.1 christos /* Bits for AR_PHY_RADAR_1. */ 422 1.1 christos #define AR_PHY_RADAR_1_MAXLEN_M 0x000000ff 423 1.1 christos #define AR_PHY_RADAR_1_MAXLEN_S 0 424 1.1 christos #define AR_PHY_RADAR_1_RELSTEP_THRESH_M 0x00001f00 425 1.1 christos #define AR_PHY_RADAR_1_RELSTEP_THRESH_S 8 426 1.1 christos #define AR_PHY_RADAR_1_RELSTEP_CHECK 0x00002000 427 1.1 christos #define AR_PHY_RADAR_1_MAX_RRSSI 0x00004000 428 1.1 christos #define AR_PHY_RADAR_1_BLOCK_CHECK 0x00008000 429 1.1 christos #define AR_PHY_RADAR_1_RELPWR_THRESH_M 0x003f0000 430 1.1 christos #define AR_PHY_RADAR_1_RELPWR_THRESH_S 16 431 1.1 christos #define AR_PHY_RADAR_1_USE_FIR128 0x00400000 432 1.1 christos #define AR_PHY_RADAR_1_RELPWR_ENA 0x00800000 433 1.1 christos 434 1.1 christos /* Bits for AR_PHY_SIGMA_DELTA. */ 435 1.1 christos #define AR_PHY_SIGMA_DELTA_ADC_SEL_M 0x00000003 436 1.1 christos #define AR_PHY_SIGMA_DELTA_ADC_SEL_S 0 437 1.1 christos #define AR_PHY_SIGMA_DELTA_FILT2_M 0x000000f8 438 1.1 christos #define AR_PHY_SIGMA_DELTA_FILT2_S 3 439 1.1 christos #define AR_PHY_SIGMA_DELTA_FILT1_M 0x00001f00 440 1.1 christos #define AR_PHY_SIGMA_DELTA_FILT1_S 8 441 1.1 christos #define AR_PHY_SIGMA_DELTA_ADC_CLIP_M 0x01ffe000 442 1.1 christos #define AR_PHY_SIGMA_DELTA_ADC_CLIP_S 13 443 1.1 christos 444 1.1 christos /* Bits for AR_PHY_RESTART. */ 445 1.1 christos #define AR_PHY_RESTART_DIV_GC_M 0x001c0000 446 1.1 christos #define AR_PHY_RESTART_DIV_GC_S 18 447 1.1 christos 448 1.1 christos /* Bits for AR_PHY_RFBUS_REQ. */ 449 1.1 christos #define AR_PHY_RFBUS_REQ_EN 0x00000001 450 1.1 christos 451 1.1 christos /* Bits for AR_PHY_TIMING11. */ 452 1.1 christos #define AR_PHY_TIMING11_SPUR_DELTA_PHASE_M 0x000fffff 453 1.1 christos #define AR_PHY_TIMING11_SPUR_DELTA_PHASE_S 0 454 1.1 christos #define AR_PHY_TIMING11_SPUR_FREQ_SD_M 0x3ff00000 455 1.1 christos #define AR_PHY_TIMING11_SPUR_FREQ_SD_S 20 456 1.1 christos #define AR_PHY_TIMING11_USE_SPUR_IN_AGC 0x40000000 457 1.1 christos #define AR_PHY_TIMING11_USE_SPUR_IN_SELFCOR 0x80000000 458 1.1 christos 459 1.1 christos /* Bits for AR_PHY_NEW_ADC_DC_GAIN_CORR(). */ 460 1.1 christos #define AR_PHY_NEW_ADC_GAIN_CORR_ENABLE 0x40000000 461 1.1 christos #define AR_PHY_NEW_ADC_DC_OFFSET_CORR_ENABLE 0x80000000 462 1.1 christos 463 1.1 christos /* Bits for AR_PHY_EXT_CCA0. */ 464 1.1 christos #define AR_PHY_EXT_CCA0_THRESH62_M 0x000000ff 465 1.1 christos #define AR_PHY_EXT_CCA0_THRESH62_S 0 466 1.1 christos 467 1.1 christos /* Bits for AR_PHY_EXT_CCA. */ 468 1.1 christos #define AR_PHY_EXT_MAXCCA_PWR_M 0x000001ff 469 1.1 christos #define AR_PHY_EXT_MAXCCA_PWR_S 0 470 1.1 christos #define AR_PHY_EXT_CCA_CYCPWR_THR1_M 0x0000fe00 471 1.1 christos #define AR_PHY_EXT_CCA_CYCPWR_THR1_S 9 472 1.1 christos #define AR_PHY_EXT_CCA_THRESH62_M 0x007f0000 473 1.1 christos #define AR_PHY_EXT_CCA_THRESH62_S 16 474 1.1 christos #define AR_PHY_EXT_MINCCA_PWR_M 0xff800000 475 1.1 christos #define AR_PHY_EXT_MINCCA_PWR_S 23 476 1.1 christos #define AR9280_PHY_EXT_MINCCA_PWR_M 0x01ff0000 477 1.1 christos #define AR9280_PHY_EXT_MINCCA_PWR_S 16 478 1.1 christos 479 1.1 christos /* Bits for AR_PHY_SFCORR_EXT. */ 480 1.1 christos #define AR_PHY_SFCORR_EXT_M1_THRESH_M 0x0000007f 481 1.1 christos #define AR_PHY_SFCORR_EXT_M1_THRESH_S 0 482 1.1 christos #define AR_PHY_SFCORR_EXT_M2_THRESH_M 0x00003f80 483 1.1 christos #define AR_PHY_SFCORR_EXT_M2_THRESH_S 7 484 1.1 christos #define AR_PHY_SFCORR_EXT_M1_THRESH_LOW_M 0x001fc000 485 1.1 christos #define AR_PHY_SFCORR_EXT_M1_THRESH_LOW_S 14 486 1.1 christos #define AR_PHY_SFCORR_EXT_M2_THRESH_LOW_M 0x0fe00000 487 1.1 christos #define AR_PHY_SFCORR_EXT_M2_THRESH_LOW_S 21 488 1.1 christos #define AR_PHY_SFCORR_SPUR_SUBCHNL_SD_M 0xf0000000 489 1.1 christos #define AR_PHY_SFCORR_SPUR_SUBCHNL_SD_S 28 490 1.1 christos 491 1.1 christos /* Bits for AR_PHY_HALFGI. */ 492 1.1 christos #define AR_PHY_HALFGI_DSC_EXP_M 0x0000000f 493 1.1 christos #define AR_PHY_HALFGI_DSC_EXP_S 0 494 1.1 christos #define AR_PHY_HALFGI_DSC_MAN_M 0x0007fff0 495 1.1 christos #define AR_PHY_HALFGI_DSC_MAN_S 4 496 1.1 christos 497 1.1 christos /* Bits for AR_PHY_CHAN_INFO_MEMORY. */ 498 1.1 christos #define AR_PHY_CHAN_INFO_MEMORY_CAPTURE_MASK 0x00000001 499 1.1 christos 500 1.1 christos /* Bits for AR_PHY_HEAVY_CLIP_FACTOR_RIFS. */ 501 1.1 christos #define AR_PHY_RIFS_INIT_DELAY_M 0x03ff0000 502 1.1 christos #define AR_PHY_RIFS_INIT_DELAY_S 16 503 1.1 christos 504 1.1 christos /* Bits for AR_PHY_CALMODE. */ 505 1.1 christos #define AR_PHY_CALMODE_IQ 0x00000000 506 1.1 christos #define AR_PHY_CALMODE_ADC_GAIN 0x00000001 507 1.1 christos #define AR_PHY_CALMODE_ADC_DC_PER 0x00000002 508 1.1 christos #define AR_PHY_CALMODE_ADC_DC_INIT 0x00000003 509 1.1 christos 510 1.1 christos /* Bits for AR_PHY_RFBUS_GRANT. */ 511 1.1 christos #define AR_PHY_RFBUS_GRANT_EN 0x00000001 512 1.1 christos 513 1.1 christos /* Bits for AR_PHY_CHAN_INFO_GAIN_DIFF. */ 514 1.1 christos #define AR_PHY_CHAN_INFO_GAIN_DIFF_UPPER_LIMIT 320 515 1.1 christos 516 1.1 christos /* Bits for AR_PHY_MODE. */ 517 1.1 christos #define AR_PHY_MODE_ASYNCFIFO 0x00000080 518 1.1 christos #define AR_PHY_MODE_AR2133 0x00000008 519 1.1 christos #define AR_PHY_MODE_AR5111 0x00000000 520 1.1 christos #define AR_PHY_MODE_AR5112 0x00000008 521 1.1 christos #define AR_PHY_MODE_DYNAMIC 0x00000004 522 1.1 christos #define AR_PHY_MODE_RF2GHZ 0x00000002 523 1.1 christos #define AR_PHY_MODE_RF5GHZ 0x00000000 524 1.1 christos #define AR_PHY_MODE_CCK 0x00000001 525 1.1 christos #define AR_PHY_MODE_OFDM 0x00000000 526 1.1 christos #define AR_PHY_MODE_DYN_CCK_DISABLE 0x00000100 527 1.1 christos 528 1.1 christos /* Bits for AR_PHY_CCK_TX_CTRL. */ 529 1.1 christos #define AR_PHY_CCK_TX_CTRL_TX_DAC_SCALE_CCK_M 0x0000000c 530 1.1 christos #define AR_PHY_CCK_TX_CTRL_TX_DAC_SCALE_CCK_S 2 531 1.1 christos #define AR_PHY_CCK_TX_CTRL_JAPAN 0x00000010 532 1.1 christos 533 1.1 christos /* Bits for AR_PHY_CCK_DETECT. */ 534 1.1 christos #define AR_PHY_CCK_DETECT_WEAK_SIG_THR_CCK_M 0x0000003f 535 1.1 christos #define AR_PHY_CCK_DETECT_WEAK_SIG_THR_CCK_S 0 536 1.1 christos #define AR_PHY_CCK_DETECT_ANT_SWITCH_TIME_M 0x00001fc0 537 1.1 christos #define AR_PHY_CCK_DETECT_ANT_SWITCH_TIME_S 6 538 1.1 christos #define AR_PHY_CCK_DETECT_BB_ENABLE_ANT_FAST_DIV 0x00002000 539 1.1 christos 540 1.1 christos /* Bits for AR_PHY_GAIN_2GHZ. */ 541 1.1 christos #define AR_PHY_GAIN_2GHZ_XATTEN1_DB_M 0x0000003f 542 1.1 christos #define AR_PHY_GAIN_2GHZ_XATTEN1_DB_S 0 543 1.1 christos #define AR_PHY_GAIN_2GHZ_BSW_ATTEN_M 0x0000001f 544 1.1 christos #define AR_PHY_GAIN_2GHZ_BSW_ATTEN_S 0 545 1.1 christos #define AR_PHY_GAIN_2GHZ_XATTEN2_DB_M 0x00000fc0 546 1.1 christos #define AR_PHY_GAIN_2GHZ_XATTEN2_DB_S 6 547 1.1 christos #define AR_PHY_GAIN_2GHZ_BSW_MARGIN_M 0x00003c00 548 1.1 christos #define AR_PHY_GAIN_2GHZ_BSW_MARGIN_S 10 549 1.1 christos #define AR_PHY_GAIN_2GHZ_XATTEN1_MARGIN_M 0x0001f000 550 1.1 christos #define AR_PHY_GAIN_2GHZ_XATTEN1_MARGIN_S 12 551 1.1 christos #define AR_PHY_GAIN_2GHZ_XATTEN2_MARGIN_M 0x003e0000 552 1.1 christos #define AR_PHY_GAIN_2GHZ_XATTEN2_MARGIN_S 17 553 1.1 christos #define AR_PHY_GAIN_2GHZ_RXTX_MARGIN_M 0x00fc0000 554 1.1 christos #define AR_PHY_GAIN_2GHZ_RXTX_MARGIN_S 18 555 1.1 christos 556 1.1 christos /* Bit for AR_PHY_CCK_RXCTRL4. */ 557 1.1 christos #define AR_PHY_CCK_RXCTRL4_FREQ_EST_SHORT_M 0x01f80000 558 1.1 christos #define AR_PHY_CCK_RXCTRL4_FREQ_EST_SHORT_S 19 559 1.1 christos 560 1.1 christos /* Bits for AR_PHY_DAG_CTRLCCK. */ 561 1.1 christos #define AR_PHY_DAG_CTRLCCK_EN_RSSI_THR 0x00000200 562 1.1 christos #define AR_PHY_DAG_CTRLCCK_RSSI_THR_M 0x0001fc00 563 1.1 christos #define AR_PHY_DAG_CTRLCCK_RSSI_THR_S 10 564 1.1 christos 565 1.1 christos /* Bits for AR_PHY_FORCE_CLKEN_CCK. */ 566 1.1 christos #define AR_PHY_FORCE_CLKEN_CCK_MRC_MUX 0x00000040 567 1.1 christos 568 1.1 christos /* Bits for AR_PHY_TPCRG1. */ 569 1.1 christos #define AR_PHY_TPCRG1_NUM_PD_GAIN_M 0x0000c000 570 1.1 christos #define AR_PHY_TPCRG1_NUM_PD_GAIN_S 14 571 1.1 christos #define AR_PHY_TPCRG1_PD_GAIN_1_M 0x00030000 572 1.1 christos #define AR_PHY_TPCRG1_PD_GAIN_1_S 16 573 1.1 christos #define AR_PHY_TPCRG1_PD_GAIN_2_M 0x000c0000 574 1.1 christos #define AR_PHY_TPCRG1_PD_GAIN_2_S 18 575 1.1 christos #define AR_PHY_TPCRG1_PD_GAIN_3_M 0x00300000 576 1.1 christos #define AR_PHY_TPCRG1_PD_GAIN_3_S 20 577 1.1 christos #define AR_PHY_TPCRG1_PD_CAL_ENABLE 0x00400000 578 1.1 christos 579 1.1 christos /* Bits for AR_PHY_TX_PWRCTRL4. */ 580 1.1 christos #define AR_PHY_TX_PWRCTRL_PD_AVG_VALID 0x00000001 581 1.1 christos #define AR_PHY_TX_PWRCTRL_PD_AVG_OUT_M 0x000001fe 582 1.1 christos #define AR_PHY_TX_PWRCTRL_PD_AVG_OUT_S 1 583 1.1 christos 584 1.1 christos /* Bits for AR_PHY_TX_PWRCTRL6_[01]. */ 585 1.1 christos #define AR_PHY_TX_PWRCTRL_ERR_EST_MODE_M 0x03000000 586 1.1 christos #define AR_PHY_TX_PWRCTRL_ERR_EST_MODE_S 24 587 1.1 christos 588 1.1 christos /* Bits for AR_PHY_TX_PWRCTRL7. */ 589 1.1 christos #define AR_PHY_TX_PWRCTRL_TX_GAIN_TAB_MAX_M 0x0007e000 590 1.1 christos #define AR_PHY_TX_PWRCTRL_TX_GAIN_TAB_MAX_S 13 591 1.1 christos #define AR_PHY_TX_PWRCTRL_INIT_TX_GAIN_M 0x01f80000 592 1.1 christos #define AR_PHY_TX_PWRCTRL_INIT_TX_GAIN_S 19 593 1.1 christos 594 1.1 christos /* Bits for AR_PHY_TX_PWRCTRL9. */ 595 1.1 christos #define AR_PHY_TX_DESIRED_SCALE_CCK_M 0x00007c00 596 1.1 christos #define AR_PHY_TX_DESIRED_SCALE_CCK_S 10 /* XXX should be 9? */ 597 1.1 christos #define AR_PHY_TX_PWRCTRL9_RES_DC_REMOVAL 0x80000000 598 1.1 christos 599 1.1 christos /* Bits for AR_PHY_TX_GAIN_TBL. */ 600 1.1 christos #define AR_PHY_TX_GAIN_CLC_M 0x0000001e 601 1.1 christos #define AR_PHY_TX_GAIN_CLC_S 1 602 1.1 christos #define AR_PHY_TX_GAIN_M 0x0007f000 603 1.1 christos #define AR_PHY_TX_GAIN_S 12 604 1.1 christos 605 1.1 christos /* Bits for AR_PHY_SPUR_REG. */ 606 1.1 christos #define AR_PHY_SPUR_REG_SPUR_RSSI_THRESH_M 0x0000007f 607 1.1 christos #define AR_PHY_SPUR_REG_SPUR_RSSI_THRESH_S 0 608 1.1 christos #define AR_SPUR_RSSI_THRESH 40 609 1.1 christos #define AR_PHY_SPUR_REG_ENABLE_VIT_SPUR_RSSI 0x00000100 610 1.1 christos #define AR_PHY_SPUR_REG_MASK_RATE_SELECT 0x0001fe00 611 1.1 christos #define AR_PHY_SPUR_REG_ENABLE_MASK_PPM 0x00020000 612 1.1 christos #define AR_PHY_SPUR_REG_MASK_RATE_CNTL 0x03fc0000 613 1.1 christos 614 1.1 christos /* Bits for AR_PHY_ANALOG_SWAP. */ 615 1.1 christos #define AR_PHY_SWAP_ALT_CHAIN 0x00000040 616 1.1 christos 617 1.1 christos /* Bits for AR_PHY_TPCRG5. */ 618 1.1 christos #define AR_PHY_TPCRG5_PD_GAIN_OVERLAP_M 0x0000000f 619 1.1 christos #define AR_PHY_TPCRG5_PD_GAIN_OVERLAP_S 0 620 1.1 christos #define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_1_M 0x000003f0 621 1.1 christos #define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_1_S 4 622 1.1 christos #define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_2_M 0x0000fc00 623 1.1 christos #define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_2_S 10 624 1.1 christos #define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_3_M 0x003f0000 625 1.1 christos #define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_3_S 16 626 1.1 christos #define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_4_M 0x0fc00000 627 1.1 christos #define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_4_S 22 628 1.1 christos 629 1.1 christos /* Bits for AR_PHY_CL_CAL_CTL. */ 630 1.1 christos #define AR_PHY_PARALLEL_CAL_ENABLE 0x00000001 631 1.1 christos #define AR_PHY_CL_CAL_ENABLE 0x00000002 632 1.1 christos 633 1.1 christos /* Bits for AR_PHY_CLC_TBL. */ 634 1.1 christos #define AR_PHY_CLC_Q0_M 0x0000ffd0 635 1.1 christos #define AR_PHY_CLC_Q0_S 5 636 1.1 christos #define AR_PHY_CLC_I0_M 0x07ff0000 637 1.1 christos #define AR_PHY_CLC_I0_S 16 638 1.1 christos 639 1.1 christos /* Bits for AR_PHY_XPA_CFG. */ 640 1.1 christos #define AR_PHY_FORCE_XPA_CFG 0x000000001 641 1.1 christos 642 1.1 christos /* Bits for AR_PHY_CH[01]_TX_PWRCTRL11. */ 643 1.1 christos #define AR_PHY_TX_PWRCTRL_OLPC_TEMP_COMP_M 0x0000fc00 644 1.1 christos #define AR_PHY_TX_PWRCTRL_OLPC_TEMP_COMP_S 10 645 1.1 christos #define AR_PHY_TX_PWRCTRL_OLPC_PWR_M 0x00ff0000 646 1.1 christos #define AR_PHY_TX_PWRCTRL_OLPC_PWR_S 16 647 1.1 christos 648 1.1 christos /* Bits for AR_PHY_NEW_ADC_DC_GAIN_CORR. */ 649 1.1 christos #define AR_PHY_NEW_ADC_DC_GAIN_QGAIN_M 0x0000003f 650 1.1 christos #define AR_PHY_NEW_ADC_DC_GAIN_QGAIN_S 0 651 1.1 christos #define AR_PHY_NEW_ADC_DC_GAIN_IGAIN_M 0x00000fc0 652 1.1 christos #define AR_PHY_NEW_ADC_DC_GAIN_IGAIN_S 6 653 1.1 christos #define AR_PHY_NEW_ADC_DC_GAIN_QDC_M 0x001ff000 654 1.1 christos #define AR_PHY_NEW_ADC_DC_GAIN_QDC_S 12 655 1.1 christos #define AR_PHY_NEW_ADC_DC_GAIN_IDC_M 0x3fe00000 656 1.1 christos #define AR_PHY_NEW_ADC_DC_GAIN_IDC_S 21 657 1.1 christos 658 1.1 christos /* Bits for AR_PHY(0x37). */ 659 1.1 christos #define AR5416_BMODE_SYNTH 0x00000002 660 1.1 christos #define AR5416_AMODE_REFSEL_M 0x0000000c 661 1.1 christos #define AR5416_AMODE_REFSEL_S 2 662 1.1 christos 663 1.1 christos 664 1.1 christos #define AR5008_MAX_SCATTER 16 /* NB: not a hardware limit. */ 665 1.1 christos 666 1.1 christos /* 667 1.1 christos * Tx DMA descriptor. 668 1.1 christos */ 669 1.1 christos struct ar_tx_desc { 670 1.1 christos uint32_t ds_link; 671 1.1 christos uint32_t ds_data; 672 1.1 christos uint32_t ds_ctl0; 673 1.1 christos uint32_t ds_ctl1; 674 1.1 christos uint32_t ds_ctl2; 675 1.1 christos uint32_t ds_ctl3; 676 1.1 christos uint32_t ds_ctl4; 677 1.1 christos uint32_t ds_ctl5; 678 1.1 christos uint32_t ds_ctl6; 679 1.1 christos uint32_t ds_ctl7; 680 1.1 christos uint32_t ds_ctl8; 681 1.1 christos uint32_t ds_ctl9; 682 1.1 christos uint32_t ds_ctl10; 683 1.1 christos uint32_t ds_ctl11; 684 1.1 christos uint32_t ds_status0; 685 1.1 christos uint32_t ds_status1; 686 1.1 christos uint32_t ds_tstamp; 687 1.1 christos uint32_t ds_ba_bitmap_lo; 688 1.1 christos uint32_t ds_ba_bitmap_hi; 689 1.1 christos uint32_t ds_evm0; 690 1.1 christos uint32_t ds_evm1; 691 1.1 christos uint32_t ds_evm2; 692 1.1 christos uint32_t ds_status8; 693 1.1 christos uint32_t ds_status9; 694 1.1 christos /* 695 1.1 christos * Padding to make Tx descriptors 128 bytes such that they will 696 1.1 christos * not cross a 4KB boundary. 697 1.1 christos */ 698 1.1 christos uint32_t pad[8]; 699 1.1 christos } __packed __attribute__((aligned(4))); 700 1.1 christos 701 1.1 christos /* Bits for ds_ctl0. */ 702 1.1 christos #define AR_TXC0_FRAME_LEN_M 0x00000fff 703 1.1 christos #define AR_TXC0_FRAME_LEN_S 0 704 1.1 christos #define AR_TXC0_VIRT_MORE_FRAG 0x00001000 705 1.1 christos #define AR_TXC0_XMIT_POWER_M 0x003f0000 706 1.1 christos #define AR_TXC0_XMIT_POWER_S 16 707 1.1 christos #define AR_TXC0_RTS_ENABLE 0x00400000 708 1.1 christos #define AR_TXC0_VEOL 0x00800000 709 1.1 christos #define AR_TXC0_CLR_DEST_MASK 0x01000000 710 1.1 christos #define AR_TXC0_INTR_REQ 0x20000000 711 1.1 christos #define AR_TXC0_DEST_IDX_VALID 0x40000000 712 1.1 christos #define AR_TXC0_CTS_ENABLE 0x80000000 713 1.1 christos 714 1.1 christos /* Bits for ds_ctl1. */ 715 1.1 christos #define AR_TXC1_BUF_LEN_M 0x00000fff 716 1.1 christos #define AR_TXC1_BUF_LEN_S 0 717 1.1 christos #define AR_TXC1_MORE 0x00001000 718 1.1 christos #define AR_TXC1_DEST_IDX_M 0x000fe000 719 1.1 christos #define AR_TXC1_DEST_IDX_S 13 720 1.1 christos #define AR_TXC1_FRAME_TYPE_M 0x00f00000 721 1.1 christos #define AR_TXC1_FRAME_TYPE_S 20 722 1.1 christos #define AR_FRAME_TYPE_NORMAL 0 723 1.1 christos #define AR_FRAME_TYPE_ATIM 1 724 1.1 christos #define AR_FRAME_TYPE_PSPOLL 2 725 1.1 christos #define AR_FRAME_TYPE_BEACON 3 726 1.1 christos #define AR_FRAME_TYPE_PROBE_RESP 4 727 1.1 christos #define AR_TXC1_NO_ACK 0x01000000 728 1.1 christos #define AR_TXC1_INSERT_TS 0x02000000 729 1.1 christos #define AR_TXC1_EXT_ONLY 0x08000000 730 1.1 christos #define AR_TXC1_EXT_AND_CTL 0x10000000 731 1.1 christos #define AR_TXC1_MORE_AGGR 0x20000000 732 1.1 christos #define AR_TXC1_IS_AGGR 0x40000000 733 1.1 christos 734 1.1 christos /* Bits for ds_ctl2. */ 735 1.1 christos #define AR_TXC2_BURST_DUR_M 0x00007fff 736 1.1 christos #define AR_TXC2_BURST_DUR_S 0 737 1.1 christos #define AR_TXC2_DUR_UPDATE_ENA 0x00008000 738 1.1 christos #define AR_TXC2_XMIT_DATA_TRIES0_M 0x000f0000 739 1.1 christos #define AR_TXC2_XMIT_DATA_TRIES0_S 16 740 1.1 christos #define AR_TXC2_XMIT_DATA_TRIES1_M 0x00f00000 741 1.1 christos #define AR_TXC2_XMIT_DATA_TRIES1_S 20 742 1.1 christos #define AR_TXC2_XMIT_DATA_TRIES2_M 0x0f000000 743 1.1 christos #define AR_TXC2_XMIT_DATA_TRIES2_S 24 744 1.1 christos #define AR_TXC2_XMIT_DATA_TRIES3_M 0xf0000000 745 1.1 christos #define AR_TXC2_XMIT_DATA_TRIES3_S 28 746 1.1 christos 747 1.1 christos /* Bits for ds_ctl3. */ 748 1.1 christos #define AR_TXC3_XMIT_RATE0_M 0x000000ff 749 1.1 christos #define AR_TXC3_XMIT_RATE0_S 0 750 1.1 christos #define AR_TXC3_XMIT_RATE1_M 0x0000ff00 751 1.1 christos #define AR_TXC3_XMIT_RATE1_S 8 752 1.1 christos #define AR_TXC3_XMIT_RATE2_M 0x00ff0000 753 1.1 christos #define AR_TXC3_XMIT_RATE2_S 16 754 1.1 christos #define AR_TXC3_XMIT_RATE3_M 0xff000000 755 1.1 christos #define AR_TXC3_XMIT_RATE3_S 24 756 1.1 christos 757 1.1 christos /* Bits for ds_ctl4. */ 758 1.1 christos #define AR_TXC4_PACKET_DUR0_M 0x00007fff 759 1.1 christos #define AR_TXC4_PACKET_DUR0_S 0 760 1.1 christos #define AR_TXC4_RTSCTS_QUAL0 0x00008000 761 1.1 christos #define AR_TXC4_PACKET_DUR1_M 0x7fff0000 762 1.1 christos #define AR_TXC4_PACKET_DUR1_S 16 763 1.1 christos #define AR_TXC4_RTSCTS_QUAL1 0x80000000 764 1.1 christos /* Shortcut. */ 765 1.1 christos #define AR_TXC4_RTSCTS_QUAL01 \ 766 1.1 christos (AR_TXC4_RTSCTS_QUAL0 | AR_TXC4_RTSCTS_QUAL1) 767 1.1 christos 768 1.1 christos /* Bits for ds_ctl5. */ 769 1.1 christos #define AR_TXC5_PACKET_DUR2_M 0x00007fff 770 1.1 christos #define AR_TXC5_PACKET_DUR2_S 0 771 1.1 christos #define AR_TXC5_RTSCTS_QUAL2 0x00008000 772 1.1 christos #define AR_TXC5_PACKET_DUR3_M 0x7fff0000 773 1.1 christos #define AR_TXC5_PACKET_DUR3_S 16 774 1.1 christos #define AR_TXC5_RTSCTS_QUAL3 0x80000000 775 1.1 christos /* Shortcut. */ 776 1.1 christos #define AR_TXC5_RTSCTS_QUAL23 \ 777 1.1 christos (AR_TXC5_RTSCTS_QUAL2 | AR_TXC5_RTSCTS_QUAL3) 778 1.1 christos 779 1.1 christos /* Bits for ds_ctl6. */ 780 1.1 christos #define AR_TXC6_AGGR_LEN_M 0x0000ffff 781 1.1 christos #define AR_TXC6_AGGR_LEN_S 0 782 1.1 christos #define AR_TXC6_PAD_DELIM_M 0x03fc0000 783 1.1 christos #define AR_TXC6_PAD_DELIM_S 18 784 1.1 christos #define AR_TXC6_ENCR_TYPE_M 0x0c000000 785 1.1 christos #define AR_TXC6_ENCR_TYPE_S 26 786 1.1 christos #define AR_ENCR_TYPE_CLEAR 0 787 1.1 christos #define AR_ENCR_TYPE_WEP 1 788 1.1 christos #define AR_ENCR_TYPE_AES 2 789 1.1 christos #define AR_ENCR_TYPE_TKIP 3 790 1.1 christos 791 1.1 christos /* Bits for ds_ctl7. */ 792 1.1 christos #define AR_TXC7_2040_0 0x00000001 793 1.1 christos #define AR_TXC7_GI0 0x00000002 794 1.1 christos #define AR_TXC7_CHAIN_SEL0_M 0x0000001c 795 1.1 christos #define AR_TXC7_CHAIN_SEL0_S 2 796 1.1 christos #define AR_TXC7_2040_1 0x00000020 797 1.1 christos #define AR_TXC7_GI1 0x00000040 798 1.1 christos #define AR_TXC7_CHAIN_SEL1_M 0x00000380 799 1.1 christos #define AR_TXC7_CHAIN_SEL1_S 7 800 1.1 christos #define AR_TXC7_2040_2 0x00000400 801 1.1 christos #define AR_TXC7_GI2 0x00000800 802 1.1 christos #define AR_TXC7_CHAIN_SEL2_M 0x00007000 803 1.1 christos #define AR_TXC7_CHAIN_SEL2_S 12 804 1.1 christos #define AR_TXC7_2040_3 0x00008000 805 1.1 christos #define AR_TXC7_GI3 0x00010000 806 1.1 christos #define AR_TXC7_CHAIN_SEL3_M 0x000e0000 807 1.1 christos #define AR_TXC7_CHAIN_SEL3_S 17 808 1.1 christos #define AR_TXC7_RTSCTS_RATE_M 0x0ff00000 809 1.1 christos #define AR_TXC7_RTSCTS_RATE_S 20 810 1.1 christos /* Shortcuts. */ 811 1.1 christos #define AR_TXC7_2040_0123 \ 812 1.1 christos (AR_TXC7_2040_0 | AR_TXC7_2040_1 | AR_TXC7_2040_2 | AR_TXC7_2040_3) 813 1.1 christos #define AR_TXC7_GI0123 \ 814 1.1 christos (AR_TXC7_GI0 | AR_TXC7_GI1 | AR_TXC7_GI2 | AR_TXC7_GI3) 815 1.1 christos 816 1.1 christos /* Bits for ds_status0. */ 817 1.1 christos #define AR_TXS0_RSSI_ANT0(i) (((x) >> ((i) * 8)) & 0xff) 818 1.1 christos #define AR_TXS0_BA_STATUS 0x40000000 819 1.1 christos 820 1.1 christos /* Bits for ds_status1. */ 821 1.1 christos #define AR_TXS1_FRM_XMIT_OK 0x00000001 822 1.1 christos #define AR_TXS1_EXCESSIVE_RETRIES 0x00000002 823 1.1 christos #define AR_TXS1_FIFO_UNDERRUN 0x00000004 824 1.1 christos #define AR_TXS1_FILTERED 0x00000008 825 1.1 christos #define AR_TXS1_RTS_FAIL_CNT_M 0x000000f0 826 1.1 christos #define AR_TXS1_RTS_FAIL_CNT_S 4 827 1.1 christos #define AR_TXS1_DATA_FAIL_CNT_M 0x00000f00 828 1.1 christos #define AR_TXS1_DATA_FAIL_CNT_S 8 829 1.1 christos #define AR_TXS1_VIRT_RETRY_CNT_M 0x0000f000 830 1.1 christos #define AR_TXS1_VIRT_RETRY_CNT_S 12 831 1.1 christos #define AR_TXS1_TX_DELIM_UNDERRUN 0x00010000 832 1.1 christos #define AR_TXS1_TX_DATA_UNDERRUN 0x00020000 833 1.1 christos #define AR_TXS1_DESC_CFG_ERR 0x00040000 834 1.1 christos #define AR_TXS1_TX_TIMER_EXPIRED 0x00080000 835 1.1 christos /* Shortcut. */ 836 1.1 christos #define AR_TXS1_UNDERRUN \ 837 1.1 christos (AR_TXS1_FIFO_UNDERRUN | \ 838 1.1 christos AR_TXS1_TX_DELIM_UNDERRUN | \ 839 1.1 christos AR_TXS1_TX_DATA_UNDERRUN) 840 1.1 christos 841 1.1 christos /* Bits for ds_status9. */ 842 1.1 christos #define AR_TXS9_DONE 0x00000001 843 1.1 christos #define AR_TXS9_SEQNUM_M 0x00001ffe 844 1.1 christos #define AR_TXS9_SEQNUM_S 1 845 1.1 christos #define AR_TXS9_TXOP_EXCEEDED 0x00020000 846 1.1 christos #define AR_TXS9_FINAL_IDX_M 0x00600000 847 1.1 christos #define AR_TXS9_FINAL_IDX_S 21 848 1.1 christos #define AR_TXS9_POWER_MGMT 0x02000000 849 1.1 christos 850 1.1 christos /* 851 1.1 christos * Rx DMA descriptor. 852 1.1 christos */ 853 1.1 christos struct ar_rx_desc { 854 1.1 christos uint32_t ds_link; 855 1.1 christos uint32_t ds_data; 856 1.1 christos uint32_t ds_ctl0; 857 1.1 christos uint32_t ds_ctl1; 858 1.1 christos uint32_t ds_status0; 859 1.1 christos uint32_t ds_status1; 860 1.1 christos uint32_t ds_status2; 861 1.1 christos uint32_t ds_status3; 862 1.1 christos uint32_t ds_status4; 863 1.1 christos uint32_t ds_status5; 864 1.1 christos uint32_t ds_status6; 865 1.1 christos uint32_t ds_status7; 866 1.1 christos uint32_t ds_status8; 867 1.1 christos /* 868 1.1 christos * Padding to make Rx descriptors 64 bytes such that they will 869 1.1 christos * not cross a 4KB boundary. 870 1.1 christos */ 871 1.1 christos uint32_t pad[3]; 872 1.1 christos } __packed __attribute__((aligned(4))); 873 1.1 christos 874 1.1 christos /* Bits for ds_ctl1. */ 875 1.1 christos #define AR_RXC1_BUF_LEN_M 0x00000fff 876 1.1 christos #define AR_RXC1_BUF_LEN_S 0 877 1.1 christos #define AR_RXC1_INTR_REQ 0x00002000 878 1.1 christos 879 1.1 christos /* Bits for ds_ctl2. */ 880 1.1 christos #define AR_RXS0_RSSI_ANT00(x) (((x) >> 0) & 0xff) 881 1.1 christos #define AR_RXS0_RSSI_ANT01(x) (((x) >> 8) & 0xff) 882 1.1 christos #define AR_RXS0_RSSI_ANT02(x) (((x) >> 16) & 0xff) 883 1.1 christos #define AR_RXS0_RATE_M 0xff000000 884 1.1 christos #define AR_RXS0_RATE_S 24 885 1.1 christos 886 1.1 christos /* Bits for ds_status1. */ 887 1.1 christos #define AR_RXS1_DATA_LEN_M 0x00000fff 888 1.1 christos #define AR_RXS1_DATA_LEN_S 0 889 1.1 christos #define AR_RXS1_MORE 0x00001000 890 1.1 christos 891 1.1 christos /* Bits for ds_status3. */ 892 1.1 christos #define AR_RXS3_GI 0x00000001 893 1.1 christos #define AR_RXS3_2040 0x00000002 894 1.1 christos #define AR_RXS3_PARALLEL_40 0x00000004 895 1.1 christos #define AR_RXS3_ANTENNA_M 0xffffff00 896 1.1 christos #define AR_RXS3_ANTENNA_S 8 897 1.1 christos #define AR_RXS3_RATE_M 0x000003fc 898 1.1 christos #define AR_RXS3_RATE_S 2 899 1.1 christos 900 1.1 christos /* Bits for ds_status4. */ 901 1.1 christos #define AR_RXS4_RSSI_COMBINED_M 0xff000000 902 1.1 christos #define AR_RXS4_RSSI_COMBINED_S 24 903 1.1 christos 904 1.1 christos /* Bits for ds_status8. */ 905 1.1 christos #define AR_RXS8_DONE 0x00000001 906 1.1 christos #define AR_RXS8_FRAME_OK 0x00000002 907 1.1 christos #define AR_RXS8_CRC_ERR 0x00000004 908 1.1 christos #define AR_RXS8_DECRYPT_CRC_ERR 0x00000008 909 1.1 christos #define AR_RXS8_PHY_ERR 0x00000010 910 1.1 christos #define AR_RXS8_MICHAEL_ERR 0x00000020 911 1.1 christos #define AR_RXS8_PRE_DELIM_CRC_ERR 0x00000040 912 1.1 christos #define AR_RXS8_PHY_ERR_CODE_M 0x0000ff00 913 1.1 christos #define AR_RXS8_PHY_ERR_CODE_S 8 914 1.1 christos #define AR_RXS8_KEY_IDX_VALID 0x00000100 915 1.1 christos #define AR_RXS8_KEY_IDX_M 0x0000fe00 916 1.1 christos #define AR_RXS8_KEY_IDX_S 9 917 1.1 christos #define AR_RXS8_POST_DELIM_CRC_ERR 0x00040000 918 1.1 christos #define AR_RXS8_DECRYPT_BUSY_ERR 0x40000000 919 1.1 christos 920 1.1 christos #define AR_MAX_PWR_RANGE_IN_HALF_DB 64 921 1.1 christos #define AR9285_PD_GAIN_BOUNDARY_DEFAULT 58 922 1.1 christos 923 1.1 christos /* 924 1.1 christos * AR5008 family common ROM header. 925 1.1 christos */ 926 1.1 christos #define AR_EEPROM_MAGIC_OFFSET 0x0000 927 1.1 christos #if BYTE_ORDER == BIG_ENDIAN 928 1.1 christos #define AR_EEPROM_MAGIC 0x5aa5 929 1.1 christos #else 930 1.1 christos #define AR_EEPROM_MAGIC 0xa55a 931 1.1 christos #endif 932 1.1 christos 933 1.1 christos #define AR_NO_SPUR 0x8000 934 1.1 christos #define AR_NUM_PDADC_VALUES 128 935 1.1 christos 936 1.1 christos struct ar_base_eep_header { 937 1.1 christos uint16_t length; 938 1.1 christos uint16_t checksum; 939 1.1 christos uint16_t version; 940 1.1 christos #define AR_EEP_VER 0xe 941 1.1 christos #define AR_EEP_VER_MINOR_MASK 0x0fff 942 1.1 christos #define AR_EEP_MINOR_VER_2 2 943 1.1 christos #define AR_EEP_MINOR_VER_3 3 944 1.1 christos #define AR_EEP_MINOR_VER_7 7 945 1.1 christos #define AR_EEP_MINOR_VER_9 9 946 1.1 christos #define AR_EEP_MINOR_VER_10 10 947 1.1 christos #define AR_EEP_MINOR_VER_16 16 948 1.1 christos #define AR_EEP_MINOR_VER_17 17 949 1.1 christos #define AR_EEP_MINOR_VER_19 19 950 1.1 christos #define AR_EEP_MINOR_VER_20 20 951 1.1 christos #define AR_EEP_MINOR_VER_21 21 952 1.1 christos #define AR_EEP_MINOR_VER_22 22 953 1.1 christos 954 1.1 christos uint8_t opCapFlags; 955 1.1 christos #define AR_OPFLAGS_11A 0x01 956 1.1 christos #define AR_OPFLAGS_11G 0x02 957 1.1 christos #define AR_OPFLAGS_11N_5G40 0x04 958 1.1 christos #define AR_OPFLAGS_11N_2G40 0x08 959 1.1 christos #define AR_OPFLAGS_11N_5G20 0x10 960 1.1 christos #define AR_OPFLAGS_11N_2G20 0x20 961 1.1 christos /* Shortcut. */ 962 1.1 christos #define AR_OPFLAGS_11N 0x3c 963 1.1 christos 964 1.1 christos uint8_t eepMisc; 965 1.1 christos uint16_t regDmn[2]; 966 1.1 christos uint8_t macAddr[6]; 967 1.1 christos uint8_t rxMask; 968 1.1 christos uint8_t txMask; 969 1.1 christos uint16_t rfSilent; 970 1.1 christos #define AR_EEP_RFSILENT_ENABLED 0x0001 971 1.1 christos #define AR_EEP_RFSILENT_GPIO_SEL_M 0x001c 972 1.1 christos #define AR_EEP_RFSILENT_GPIO_SEL_S 2 973 1.1 christos #define AR_EEP_RFSILENT_POLARITY 0x0002 974 1.1 christos 975 1.1 christos uint16_t blueToothOptions; 976 1.1 christos uint16_t deviceCap; 977 1.1 christos #define AR_EEP_DEVCAP_COMPRESS_DIS 0x0001 978 1.1 christos #define AR_EEP_DEVCAP_AES_DIS 0x0002 979 1.1 christos #define AR_EEP_DEVCAP_FASTFRAME_DIS 0x0004 980 1.1 christos #define AR_EEP_DEVCAP_BURST_DIS 0x0008 981 1.1 christos #define AR_EEP_DEVCAP_MAXQCU_M 0x01f0 982 1.1 christos #define AR_EEP_DEVCAP_MAXQCU_S 4 983 1.1 christos #define AR_EEP_DEVCAP_HEAVY_CLIP_EN 0x0200 984 1.1 christos #define AR_EEP_DEVCAP_KC_ENTRIES_M 0xf000 985 1.1 christos #define AR_EEP_DEVCAP_KC_ENTRIES_S 12 986 1.1 christos 987 1.1 christos uint32_t binBuildNumber; 988 1.1 christos uint8_t deviceType; 989 1.1 christos } __packed; 990 1.1 christos 991 1.1 christos #define AR_EEP_TXGAIN_ORIGINAL 0 992 1.1 christos #define AR_EEP_TXGAIN_HIGH_POWER 1 993 1.1 christos 994 1.1 christos #define AR_EEPROM_MODAL_SPURS 5 995 1.1 christos 996 1.1 christos struct ar_spur_chan { 997 1.1 christos uint16_t spurChan; 998 1.1 christos uint8_t spurRangeLow; 999 1.1 christos uint8_t spurRangeHigh; 1000 1.1 christos } __packed; 1001 1.1 christos 1002 1.1 christos struct ar_cal_data_per_freq_olpc { 1003 1.1 christos uint8_t pwrPdg[2][5]; 1004 1.1 christos uint8_t vpdPdg[2][5]; 1005 1.1 christos uint8_t pcdac[2][5]; 1006 1.1 christos uint8_t empty[2][5]; 1007 1.1 christos } __packed; 1008 1.1 christos 1009 1.1 christos struct ar_cal_target_power_leg { 1010 1.1 christos uint8_t bChannel; 1011 1.1 christos uint8_t tPow2x[4]; 1012 1.1 christos } __packed; 1013 1.1 christos 1014 1.1 christos struct ar_cal_target_power_ht { 1015 1.1 christos uint8_t bChannel; 1016 1.1 christos uint8_t tPow2x[8]; 1017 1.1 christos } __packed; 1018 1.1 christos 1019 1.1 christos struct ar_cal_ctl_edges { 1020 1.1 christos uint8_t bChannel; 1021 1.1 christos uint8_t tPowerFlag; 1022 1.1 christos #define AR_CAL_CTL_EDGES_POWER_M 0x3f 1023 1.1 christos #define AR_CAL_CTL_EDGES_POWER_S 0 1024 1.1 christos #define AR_CAL_CTL_EDGES_FLAG_M 0xc0 1025 1.1 christos #define AR_CAL_CTL_EDGES_FLAG_S 6 1026 1.1 christos } __packed; 1027 1.1 christos 1028 1.1 christos #endif /* _ARN5008REG_H_ */ 1029