2 * Copyright (c) 2007-2008 Atheros Communications Inc.
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 #include "../80211core/cprecomp.h"
27 * Per-node statistics maintained by the driver for use in
28 * optimizing signal quality and other operational aspects.
31 u32_t ns_avgbrssi
; /* average beacon rssi */
32 u32_t ns_avgrssi
; /* average data rssi */
33 u32_t ns_avgtxrssi
; /* average tx rssi */
36 #define ZM_HAL_RSSI_EP_MULTIPLIER (1<<7) /* pow2 to optimize out * and / */
39 u32_t ast_ani_niup
; /* ANI increased noise immunity */
40 u32_t ast_ani_nidown
; /* ANI decreased noise immunity */
41 u32_t ast_ani_spurup
; /* ANI increased spur immunity */
42 u32_t ast_ani_spurdown
;/* ANI descreased spur immunity */
43 u32_t ast_ani_ofdmon
; /* ANI OFDM weak signal detect on */
44 u32_t ast_ani_ofdmoff
;/* ANI OFDM weak signal detect off */
45 u32_t ast_ani_cckhigh
;/* ANI CCK weak signal threshold high */
46 u32_t ast_ani_ccklow
; /* ANI CCK weak signal threshold low */
47 u32_t ast_ani_stepup
; /* ANI increased first step level */
48 u32_t ast_ani_stepdown
;/* ANI decreased first step level */
49 u32_t ast_ani_ofdmerrs
;/* ANI cumulative ofdm phy err count */
50 u32_t ast_ani_cckerrs
;/* ANI cumulative cck phy err count */
51 u32_t ast_ani_reset
; /* ANI parameters zero'd for non-STA */
52 u32_t ast_ani_lzero
; /* ANI listen time forced to zero */
53 u32_t ast_ani_lneg
; /* ANI listen time calculated < 0 */
54 ZM_HAL_MIB_STATS ast_mibstats
; /* MIB counter stats */
55 ZM_HAL_NODE_STATS ast_nodestats
; /* Latest rssi stats from driver */
59 * Per-channel ANI state private to the driver.
63 u8_t noiseImmunityLevel
;
64 u8_t spurImmunityLevel
;
66 u8_t ofdmWeakSigDetectOff
;
67 u8_t cckWeakSigThreshold
;
78 u32_t noiseFloor
; /* The current noise floor */
79 u32_t txFrameCount
; /* Last txFrameCount */
80 u32_t rxFrameCount
; /* Last rx Frame count */
81 u32_t cycleCount
; /* Last cycleCount (can detect wrap-around) */
82 u32_t ofdmPhyErrCount
;/* OFDM err count since last reset */
83 u32_t cckPhyErrCount
; /* CCK err count since last reset */
84 u32_t ofdmPhyErrBase
; /* Base value for ofdm err counter */
85 u32_t cckPhyErrBase
; /* Base value for cck err counters */
86 s16_t pktRssi
[2]; /* Average rssi of pkts for 2 antennas */
87 s16_t ofdmErrRssi
[2]; /* Average rssi of ofdm phy errs for 2 ant */
88 s16_t cckErrRssi
[2]; /* Average rssi of cck phy errs for 2 ant */
92 ZM_HAL_ANI_PRESENT
, /* is ANI support present */
93 ZM_HAL_ANI_NOISE_IMMUNITY_LEVEL
, /* set level */
94 ZM_HAL_ANI_OFDM_WEAK_SIGNAL_DETECTION
, /* enable/disable */
95 ZM_HAL_ANI_CCK_WEAK_SIGNAL_THR
, /* enable/disable */
96 ZM_HAL_ANI_FIRSTEP_LEVEL
, /* set level */
97 ZM_HAL_ANI_SPUR_IMMUNITY_LEVEL
, /* set level */
98 ZM_HAL_ANI_MODE
, /* 0 => manual, 1 => auto */
99 ZM_HAL_ANI_PHYERR_RESET
, /* reset phy error stats */
102 #define AR_PHY_COUNTMAX (3 << 22) // Max counted before intr
103 #define ZM_HAL_PROCESS_ANI 0x00000001 /* ANI state setup */
104 #define ZM_RSSI_DUMMY_MARKER 0x127
106 /* PHY registers in ar5416, related base and register offsets
107 may need to be changed in otus BB */
108 #define AR_PHY_BASE 0x1C5800 /* base address of phy regs */
109 #define AR_PHY(_n) (AR_PHY_BASE + ((_n)<<2))
111 #define AR_PHY_TEST 0x1C5800 /* PHY test control */
112 #define PHY_AGC_CLR 0x10000000 /* disable AGC to A2 */
113 #define RFSILENT_BB 0x00002000 /* shush bb */
115 #define AR_PHY_TURBO 0x1C5804 /* frame control register */
116 #define AR_PHY_FC_TURBO_MODE 0x00000001 /* Set turbo mode bits */
117 #define AR_PHY_FC_TURBO_SHORT 0x00000002 /* Set short symbols to turbo mode setting */
118 #define AR_PHY_FC_DYN2040_EN 0x00000004 /* Enable dyn 20/40 mode */
119 #define AR_PHY_FC_DYN2040_PRI_ONLY 0x00000008 /* dyn 20/40 - primary only */
120 #define AR_PHY_FC_DYN2040_PRI_CH 0x00000010 /* dyn 20/40 - primary ch offset (0=+10MHz, 1=-10MHz)*/
121 #define AR_PHY_FC_DYN2040_EXT_CH 0x00000020 /* dyn 20/40 - ext ch spacing (0=20MHz/ 1=25MHz) */
122 #define AR_PHY_FC_HT_EN 0x00000040 /* ht enable */
123 #define AR_PHY_FC_SHORT_GI_40 0x00000080 /* allow short GI for HT 40 */
124 #define AR_PHY_FC_WALSH 0x00000100 /* walsh spatial spreading for 2 chains,2 streams TX */
125 #define AR_PHY_FC_SINGLE_HT_LTF1 0x00000200 /* single length (4us) 1st HT long training symbol */
127 #define AR_PHY_TIMING2 0x1C5810 /* Timing Control 2 */
128 #define AR_PHY_TIMING2_USE_FORCE 0x00001000
129 #define AR_PHY_TIMING2_FORCE_VAL 0x00000fff
131 #define AR_PHY_TIMING3 0x1C5814 /* Timing control 3 */
132 #define AR_PHY_TIMING3_DSC_MAN 0xFFFE0000
133 #define AR_PHY_TIMING3_DSC_MAN_S 17
134 #define AR_PHY_TIMING3_DSC_EXP 0x0001E000
135 #define AR_PHY_TIMING3_DSC_EXP_S 13
137 #define AR_PHY_CHIP_ID 0x1C5818 /* PHY chip revision ID */
138 #define AR_PHY_CHIP_ID_REV_0 0x80 /* 5416 Rev 0 (owl 1.0) BB */
139 #define AR_PHY_CHIP_ID_REV_1 0x81 /* 5416 Rev 1 (owl 2.0) BB */
141 #define AR_PHY_ACTIVE 0x1C581C /* activation register */
142 #define AR_PHY_ACTIVE_EN 0x00000001 /* Activate PHY chips */
143 #define AR_PHY_ACTIVE_DIS 0x00000000 /* Deactivate PHY chips */
145 #define AR_PHY_RF_CTL2 0x1C5824
146 #define AR_PHY_TX_END_DATA_START 0x000000FF
147 #define AR_PHY_TX_END_DATA_START_S 0
148 #define AR_PHY_TX_END_PA_ON 0x0000FF00
149 #define AR_PHY_TX_END_PA_ON_S 8
152 #define AR_PHY_RF_CTL3 0x1C5828
153 #define AR_PHY_TX_END_TO_A2_RX_ON 0x00FF0000
154 #define AR_PHY_TX_END_TO_A2_RX_ON_S 16
156 #define AR_PHY_ADC_CTL 0x1C582C
157 #define AR_PHY_ADC_CTL_OFF_INBUFGAIN 0x00000003
158 #define AR_PHY_ADC_CTL_OFF_INBUFGAIN_S 0
159 #define AR_PHY_ADC_CTL_OFF_PWDDAC 0x00002000
160 #define AR_PHY_ADC_CTL_OFF_PWDBANDGAP 0x00004000 /* BB Rev 4.2+ only */
161 #define AR_PHY_ADC_CTL_OFF_PWDADC 0x00008000 /* BB Rev 4.2+ only */
162 #define AR_PHY_ADC_CTL_ON_INBUFGAIN 0x00030000
163 #define AR_PHY_ADC_CTL_ON_INBUFGAIN_S 16
165 #define AR_PHY_ADC_SERIAL_CTL 0x1C5830
166 #define AR_PHY_SEL_INTERNAL_ADDAC 0x00000000
167 #define AR_PHY_SEL_EXTERNAL_RADIO 0x00000001
169 #define AR_PHY_RF_CTL4 0x1C5834
170 #define AR_PHY_RF_CTL4_TX_END_XPAB_OFF 0xFF000000
171 #define AR_PHY_RF_CTL4_TX_END_XPAB_OFF_S 24
172 #define AR_PHY_RF_CTL4_TX_END_XPAA_OFF 0x00FF0000
173 #define AR_PHY_RF_CTL4_TX_END_XPAA_OFF_S 16
174 #define AR_PHY_RF_CTL4_FRAME_XPAB_ON 0x0000FF00
175 #define AR_PHY_RF_CTL4_FRAME_XPAB_ON_S 8
176 #define AR_PHY_RF_CTL4_FRAME_XPAA_ON 0x000000FF
177 #define AR_PHY_RF_CTL4_FRAME_XPAA_ON_S 0
179 #define AR_PHY_SETTLING 0x1C5844
180 #define AR_PHY_SETTLING_SWITCH 0x00003F80
181 #define AR_PHY_SETTLING_SWITCH_S 7
183 #define AR_PHY_RXGAIN 0x1C5848
184 #define AR_PHY_RXGAIN_TXRX_ATTEN 0x0003F000
185 #define AR_PHY_RXGAIN_TXRX_ATTEN_S 12
186 #define AR_PHY_RXGAIN_TXRX_RF_MAX 0x007C0000
187 #define AR_PHY_RXGAIN_TXRX_RF_MAX_S 18
189 #define AR_PHY_DESIRED_SZ 0x1C5850
190 #define AR_PHY_DESIRED_SZ_ADC 0x000000FF
191 #define AR_PHY_DESIRED_SZ_ADC_S 0
192 #define AR_PHY_DESIRED_SZ_PGA 0x0000FF00
193 #define AR_PHY_DESIRED_SZ_PGA_S 8
194 #define AR_PHY_DESIRED_SZ_TOT_DES 0x0FF00000
195 #define AR_PHY_DESIRED_SZ_TOT_DES_S 20
197 #define AR_PHY_FIND_SIG 0x1C5858
198 #define AR_PHY_FIND_SIG_FIRSTEP 0x0003F000
199 #define AR_PHY_FIND_SIG_FIRSTEP_S 12
200 #define AR_PHY_FIND_SIG_FIRPWR 0x03FC0000
201 #define AR_PHY_FIND_SIG_FIRPWR_S 18
203 #define AR_PHY_AGC_CTL1 0x1C585C
204 #define AR_PHY_AGC_CTL1_COARSE_LOW 0x00007F80
205 #define AR_PHY_AGC_CTL1_COARSE_LOW_S 7
206 #define AR_PHY_AGC_CTL1_COARSE_HIGH 0x003F8000
207 #define AR_PHY_AGC_CTL1_COARSE_HIGH_S 15
209 #define AR_PHY_AGC_CONTROL 0x1C5860 /* chip calibration and noise floor setting */
210 #define AR_PHY_AGC_CONTROL_CAL 0x00000001 /* do internal calibration */
211 #define AR_PHY_AGC_CONTROL_NF 0x00000002 /* do noise-floor calculation */
213 #define AR_PHY_CCA 0x1C5864
214 #define AR_PHY_MINCCA_PWR 0x1FF00000
215 #define AR_PHY_MINCCA_PWR_S 19
216 #define AR_PHY_CCA_THRESH62 0x0007F000
217 #define AR_PHY_CCA_THRESH62_S 12
219 #define AR_PHY_SFCORR_LOW 0x1C586C
220 #define AR_PHY_SFCORR_LOW_USE_SELF_CORR_LOW 0x00000001
221 #define AR_PHY_SFCORR_LOW_M2COUNT_THR_LOW 0x00003F00
222 #define AR_PHY_SFCORR_LOW_M2COUNT_THR_LOW_S 8
223 #define AR_PHY_SFCORR_LOW_M1_THRESH_LOW 0x001FC000
224 #define AR_PHY_SFCORR_LOW_M1_THRESH_LOW_S 14
225 #define AR_PHY_SFCORR_LOW_M2_THRESH_LOW 0x0FE00000
226 #define AR_PHY_SFCORR_LOW_M2_THRESH_LOW_S 21
228 #define AR_PHY_SFCORR 0x1C5868
229 #define AR_PHY_SFCORR_M2COUNT_THR 0x0000001F
230 #define AR_PHY_SFCORR_M2COUNT_THR_S 0
231 #define AR_PHY_SFCORR_M1_THRESH 0x00FE0000
232 #define AR_PHY_SFCORR_M1_THRESH_S 17
233 #define AR_PHY_SFCORR_M2_THRESH 0x7F000000
234 #define AR_PHY_SFCORR_M2_THRESH_S 24
236 #define AR_PHY_SLEEP_CTR_CONTROL 0x1C5870
237 #define AR_PHY_SLEEP_CTR_LIMIT 0x1C5874
238 #define AR_PHY_SLEEP_SCAL 0x1C5878
240 #define AR_PHY_PLL_CTL 0x1C587c /* PLL control register */
241 #define AR_PHY_PLL_CTL_40 0xaa /* 40 MHz */
242 #define AR_PHY_PLL_CTL_40_5413 0x04
243 #define AR_PHY_PLL_CTL_44 0xab /* 44 MHz for 11b, 11g */
244 #define AR_PHY_PLL_CTL_44_2133 0xeb /* 44 MHz for 11b, 11g */
245 #define AR_PHY_PLL_CTL_40_2133 0xea /* 40 MHz for 11a, turbos */
247 #define AR_PHY_RX_DELAY 0x1C5914 /* analog pow-on time (100ns) */
248 #define AR_PHY_RX_DELAY_DELAY 0x00003FFF /* delay from wakeup to rx ena */
250 #define AR_PHY_TIMING_CTRL4 0x1C5920 /* timing control */
251 #define AR_PHY_TIMING_CTRL4_IQCORR_Q_Q_COFF 0x01F /* Mask for kcos_theta-1 for q correction */
252 #define AR_PHY_TIMING_CTRL4_IQCORR_Q_Q_COFF_S 0 /* shift for Q_COFF */
253 #define AR_PHY_TIMING_CTRL4_IQCORR_Q_I_COFF 0x7E0 /* Mask for sin_theta for i correction */
254 #define AR_PHY_TIMING_CTRL4_IQCORR_Q_I_COFF_S 5 /* Shift for sin_theta for i correction */
255 #define AR_PHY_TIMING_CTRL4_IQCORR_ENABLE 0x800 /* enable IQ correction */
256 #define AR_PHY_TIMING_CTRL4_IQCAL_LOG_COUNT_MAX 0xF000 /* Mask for max number of samples (logarithmic) */
257 #define AR_PHY_TIMING_CTRL4_IQCAL_LOG_COUNT_MAX_S 12 /* Shift for max number of samples */
258 #define AR_PHY_TIMING_CTRL4_DO_IQCAL 0x10000 /* perform IQ calibration */
260 #define AR_PHY_TIMING5 0x1C5924
261 #define AR_PHY_TIMING5_CYCPWR_THR1 0x000000FE
262 #define AR_PHY_TIMING5_CYCPWR_THR1_S 1
264 #define AR_PHY_POWER_TX_RATE1 0x1C5934
265 #define AR_PHY_POWER_TX_RATE2 0x1C5938
266 #define AR_PHY_POWER_TX_RATE_MAX 0x1C593c
267 #define AR_PHY_POWER_TX_RATE_MAX_TPC_ENABLE 0x00000040
269 #define AR_PHY_FRAME_CTL 0x1C5944
270 #define AR_PHY_FRAME_CTL_TX_CLIP 0x00000038
271 #define AR_PHY_FRAME_CTL_TX_CLIP_S 3
273 #define AR_PHY_TXPWRADJ 0x1C594C /* BB Rev 4.2+ only */
274 #define AR_PHY_TXPWRADJ_CCK_GAIN_DELTA 0x00000FC0
275 #define AR_PHY_TXPWRADJ_CCK_GAIN_DELTA_S 6
276 #define AR_PHY_TXPWRADJ_CCK_PCDAC_INDEX 0x00FC0000
277 #define AR_PHY_TXPWRADJ_CCK_PCDAC_INDEX_S 18
279 #define AR_PHY_RADAR_0 0x1C5954 /* radar detection settings */
280 #define AR_PHY_RADAR_0_ENA 0x00000001 /* Enable radar detection */
281 #define AR_PHY_RADAR_0_INBAND 0x0000003e /* Inband pulse threshold */
282 #define AR_PHY_RADAR_0_INBAND_S 1
283 #define AR_PHY_RADAR_0_PRSSI 0x00000FC0 /* Pulse rssi threshold */
284 #define AR_PHY_RADAR_0_PRSSI_S 6
285 #define AR_PHY_RADAR_0_HEIGHT 0x0003F000 /* Pulse height threshold */
286 #define AR_PHY_RADAR_0_HEIGHT_S 12
287 #define AR_PHY_RADAR_0_RRSSI 0x00FC0000 /* Radar rssi threshold */
288 #define AR_PHY_RADAR_0_RRSSI_S 18
289 #define AR_PHY_RADAR_0_FIRPWR 0x7F000000 /* Radar firpwr threshold */
290 #define AR_PHY_RADAR_0_FIRPWR_S 24
292 #define AR_PHY_SWITCH_CHAIN_0 0x1C5960
293 #define AR_PHY_SWITCH_COM 0x1C5964
295 #define AR_PHY_SIGMA_DELTA 0x1C596C /* AR5312 only */
296 #define AR_PHY_SIGMA_DELTA_ADC_SEL 0x00000003
297 #define AR_PHY_SIGMA_DELTA_ADC_SEL_S 0
298 #define AR_PHY_SIGMA_DELTA_FILT2 0x000000F8
299 #define AR_PHY_SIGMA_DELTA_FILT2_S 3
300 #define AR_PHY_SIGMA_DELTA_FILT1 0x00001F00
301 #define AR_PHY_SIGMA_DELTA_FILT1_S 8
302 #define AR_PHY_SIGMA_DELTA_ADC_CLIP 0x01FFE000
303 #define AR_PHY_SIGMA_DELTA_ADC_CLIP_S 13
305 #define AR_PHY_RESTART 0x1C5970 /* restart */
306 #define AR_PHY_RESTART_DIV_GC 0x001C0000 /* bb_ant_fast_div_gc_limit */
307 #define AR_PHY_RESTART_DIV_GC_S 18
309 #define AR_PHY_RFBUS_REQ 0x1C597C
310 #define AR_PHY_RFBUS_REQ_EN 0x00000001
312 #define AR_PHY_RX_CHAINMASK 0x1C59a4
314 #define AR_PHY_EXT_CCA 0x1C59bc
315 #define AR_PHY_EXT_MINCCA_PWR 0xFF800000
316 #define AR_PHY_EXT_MINCCA_PWR_S 23
318 #define AR_PHY_HALFGI 0x1C59D0 /* Timing control 3 */
319 #define AR_PHY_HALFGI_DSC_MAN 0x0007FFF0
320 #define AR_PHY_HALFGI_DSC_MAN_S 4
321 #define AR_PHY_HALFGI_DSC_EXP 0x0000000F
322 #define AR_PHY_HALFGI_DSC_EXP_S 0
324 #define AR_PHY_HEAVY_CLIP_ENABLE 0x1C59E0
326 #define AR_PHY_M_SLEEP 0x1C59f0 /* sleep control registers */
327 #define AR_PHY_REFCLKDLY 0x1C59f4
328 #define AR_PHY_REFCLKPD 0x1C59f8
330 /* PHY IQ calibration results */
331 #define AR_PHY_IQCAL_RES_PWR_MEAS_I 0x1C5C10 /* power measurement for I */
332 #define AR_PHY_IQCAL_RES_PWR_MEAS_Q 0x1C5C14 /* power measurement for Q */
333 #define AR_PHY_IQCAL_RES_IQ_CORR_MEAS 0x1C5C18 /* IQ correlation measurement */
335 #define AR_PHY_CURRENT_RSSI 0x1C5C1c /* rssi of current frame rx'd */
337 #define AR_PHY_RFBUS_GRANT 0x1C5C20
338 #define AR_PHY_RFBUS_GRANT_EN 0x00000001
340 #define AR_PHY_MODE 0x1C6200 /* Mode register */
341 #define AR_PHY_MODE_AR2133 0x08 /* AR2133 */
342 #define AR_PHY_MODE_AR5111 0x00 /* AR5111/AR2111 */
343 #define AR_PHY_MODE_AR5112 0x08 /* AR5112*/
344 #define AR_PHY_MODE_DYNAMIC 0x04 /* dynamic CCK/OFDM mode */
345 #define AR_PHY_MODE_RF2GHZ 0x02 /* 2.4 GHz */
346 #define AR_PHY_MODE_RF5GHZ 0x00 /* 5 GHz */
347 #define AR_PHY_MODE_CCK 0x01 /* CCK */
348 #define AR_PHY_MODE_OFDM 0x00 /* OFDM */
350 #define AR_PHY_CCK_TX_CTRL 0x1C6204
351 #define AR_PHY_CCK_TX_CTRL_JAPAN 0x00000010
353 #define AR_PHY_CCK_DETECT 0x1C6208
354 #define AR_PHY_CCK_DETECT_WEAK_SIG_THR_CCK 0x0000003F
355 #define AR_PHY_CCK_DETECT_WEAK_SIG_THR_CCK_S 0
356 #define AR_PHY_CCK_DETECT_ANT_SWITCH_TIME 0x00001FC0 // [12:6] settling time for antenna switch
357 #define AR_PHY_CCK_DETECT_ANT_SWITCH_TIME_S 6
358 #define AR_PHY_CCK_DETECT_BB_ENABLE_ANT_FAST_DIV 0x2000
360 #define AR_PHY_GAIN_2GHZ 0x1C620C
361 #define AR_PHY_GAIN_2GHZ_RXTX_MARGIN 0x00FC0000
362 #define AR_PHY_GAIN_2GHZ_RXTX_MARGIN_S 18
363 #define AR_PHY_GAIN_2GHZ_BSW_MARGIN 0x00003C00
364 #define AR_PHY_GAIN_2GHZ_BSW_MARGIN_S 10
365 #define AR_PHY_GAIN_2GHZ_BSW_ATTEN 0x0000001F
366 #define AR_PHY_GAIN_2GHZ_BSW_ATTEN_S 0
368 #define AR_PHY_CCK_RXCTRL4 0x1C621C
369 #define AR_PHY_CCK_RXCTRL4_FREQ_EST_SHORT 0x01F80000
370 #define AR_PHY_CCK_RXCTRL4_FREQ_EST_SHORT_S 19
372 #define AR_PHY_DAG_CTRLCCK 0x1C6228
373 #define AR_PHY_DAG_CTRLCCK_EN_RSSI_THR 0x00000200 /* BB Rev 4.2+ only */
374 #define AR_PHY_DAG_CTRLCCK_RSSI_THR 0x0001FC00 /* BB Rev 4.2+ only */
375 #define AR_PHY_DAG_CTRLCCK_RSSI_THR_S 10 /* BB Rev 4.2+ only */
377 #define AR_PHY_POWER_TX_RATE3 0x1C6234
378 #define AR_PHY_POWER_TX_RATE4 0x1C6238
380 #define AR_PHY_SCRM_SEQ_XR 0x1C623C
381 #define AR_PHY_HEADER_DETECT_XR 0x1C6240
382 #define AR_PHY_CHIRP_DETECTED_XR 0x1C6244
383 #define AR_PHY_BLUETOOTH 0x1C6254
385 #define AR_PHY_TPCRG1 0x1C6258 /* ar2413 power control */
386 #define AR_PHY_TPCRG1_NUM_PD_GAIN 0x0000c000
387 #define AR_PHY_TPCRG1_NUM_PD_GAIN_S 14
389 #define AR_PHY_TPCRG1_PD_GAIN_1 0x00030000
390 #define AR_PHY_TPCRG1_PD_GAIN_1_S 16
391 #define AR_PHY_TPCRG1_PD_GAIN_2 0x000C0000
392 #define AR_PHY_TPCRG1_PD_GAIN_2_S 18
393 #define AR_PHY_TPCRG1_PD_GAIN_3 0x00300000
394 #define AR_PHY_TPCRG1_PD_GAIN_3_S 20
397 #define AR_PHY_ANALOG_SWAP 0xa268
398 #define AR_PHY_SWAP_ALT_CHAIN 0x00000040
400 #define AR_PHY_TPCRG5 0x1C626C /* ar2413 power control */
401 #define AR_PHY_TPCRG5_PD_GAIN_OVERLAP 0x0000000F
402 #define AR_PHY_TPCRG5_PD_GAIN_OVERLAP_S 0
403 #define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_1 0x000003F0
404 #define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_1_S 4
405 #define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_2 0x0000FC00
406 #define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_2_S 10
407 #define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_3 0x003F0000
408 #define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_3_S 16
409 #define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_4 0x0FC00000
410 #define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_4_S 22
412 #define AR_PHY_POWER_TX_RATE5 0x1C638C
413 #define AR_PHY_POWER_TX_RATE6 0x1C6390
415 #define AR_PHY_CAL_CHAINMASK 0x1C639C
417 #define AR_PHY_POWER_TX_SUB 0x1C63C8
418 #define AR_PHY_POWER_TX_RATE7 0x1C63CC
419 #define AR_PHY_POWER_TX_RATE8 0x1C63D0
420 #define AR_PHY_POWER_TX_RATE9 0x1C63D4