1250003Sadrian/* 2250003Sadrian * Copyright (c) 2013 Qualcomm Atheros, Inc. 3250003Sadrian * 4250003Sadrian * Permission to use, copy, modify, and/or distribute this software for any 5250003Sadrian * purpose with or without fee is hereby granted, provided that the above 6250003Sadrian * copyright notice and this permission notice appear in all copies. 7250003Sadrian * 8250003Sadrian * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 9250003Sadrian * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 10250003Sadrian * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 11250003Sadrian * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 12250003Sadrian * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 13250003Sadrian * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 14250003Sadrian * PERFORMANCE OF THIS SOFTWARE. 15250003Sadrian */ 16250003Sadrian/* 17250003Sadrian * Copyright (c) 2002-2005 Atheros Communications, Inc. 18250003Sadrian * All Rights Reserved. 19250003Sadrian * 20250003Sadrian * Copyright (c) 2011 Qualcomm Atheros, Inc. 21250003Sadrian * All Rights Reserved. 22250003Sadrian * Qualcomm Atheros Confidential and Proprietary. 23250003Sadrian * 24250003Sadrian */ 25250003Sadrian 26250003Sadrian#ifndef _ATH_AR9300PHY_H_ 27250003Sadrian#define _ATH_AR9300PHY_H_ 28250003Sadrian 29250003Sadrian#include "osprey_reg_map.h" 30250003Sadrian 31250003Sadrian/* 32250003Sadrian * BB PHY register map 33250003Sadrian */ 34250003Sadrian#define AR_PHY_BASE offsetof(struct bb_reg_map, bb_chn_reg_map) /* base address of phy regs */ 35250003Sadrian#define AR_PHY(_n) (AR_PHY_BASE + ((_n)<<2)) 36250003Sadrian 37250003Sadrian/* 38250003Sadrian * Channel Register Map 39250003Sadrian */ 40250003Sadrian#define AR_CHAN_BASE offsetof(struct bb_reg_map, bb_chn_reg_map) 41250003Sadrian#define AR_CHAN_OFFSET(_x) (AR_CHAN_BASE + offsetof(struct chn_reg_map, _x)) 42250003Sadrian 43250003Sadrian#define AR_PHY_TIMING1 AR_CHAN_OFFSET(BB_timing_controls_1) 44250003Sadrian#define AR_PHY_TIMING2 AR_CHAN_OFFSET(BB_timing_controls_2) 45250003Sadrian#define AR_PHY_TIMING3 AR_CHAN_OFFSET(BB_timing_controls_3) 46250003Sadrian#define AR_PHY_TIMING4 AR_CHAN_OFFSET(BB_timing_control_4) 47250003Sadrian#define AR_PHY_TIMING5 AR_CHAN_OFFSET(BB_timing_control_5) 48250003Sadrian#define AR_PHY_TIMING6 AR_CHAN_OFFSET(BB_timing_control_6) 49250003Sadrian#define AR_PHY_TIMING11 AR_CHAN_OFFSET(BB_timing_control_11) 50250003Sadrian#define AR_PHY_SPUR_REG AR_CHAN_OFFSET(BB_spur_mask_controls) 51250003Sadrian#define AR_PHY_RX_IQCAL_CORR_B0 AR_CHAN_OFFSET(BB_rx_iq_corr_b0) 52250003Sadrian#define AR_PHY_TX_IQCAL_CONTROL_3 AR_CHAN_OFFSET(BB_txiqcal_control_3) 53250003Sadrian 54250003Sadrian/* BB_timing_control_11 */ 55250003Sadrian#define AR_PHY_TIMING11_SPUR_FREQ_SD 0x3FF00000 56250003Sadrian#define AR_PHY_TIMING11_SPUR_FREQ_SD_S 20 57250003Sadrian 58250003Sadrian#define AR_PHY_TIMING11_SPUR_DELTA_PHASE 0x000FFFFF 59250003Sadrian#define AR_PHY_TIMING11_SPUR_DELTA_PHASE_S 0 60250003Sadrian 61250003Sadrian#define AR_PHY_TIMING11_USE_SPUR_FILTER_IN_AGC 0x40000000 62250003Sadrian#define AR_PHY_TIMING11_USE_SPUR_FILTER_IN_AGC_S 30 63250003Sadrian 64250003Sadrian#define AR_PHY_TIMING11_USE_SPUR_FILTER_IN_SELFCOR 0x80000000 65250003Sadrian#define AR_PHY_TIMING11_USE_SPUR_FILTER_IN_SELFCOR_S 31 66250003Sadrian 67250003Sadrian/* BB_spur_mask_controls */ 68250003Sadrian#define AR_PHY_SPUR_REG_ENABLE_NF_RSSI_SPUR_MIT 0x4000000 69250003Sadrian#define AR_PHY_SPUR_REG_ENABLE_NF_RSSI_SPUR_MIT_S 26 70250003Sadrian 71250003Sadrian#define AR_PHY_SPUR_REG_ENABLE_MASK_PPM 0x20000 /* bins move with freq offset */ 72250003Sadrian#define AR_PHY_SPUR_REG_ENABLE_MASK_PPM_S 17 73250003Sadrian#define AR_PHY_SPUR_REG_SPUR_RSSI_THRESH 0x000000FF 74250003Sadrian#define AR_PHY_SPUR_REG_SPUR_RSSI_THRESH_S 0 75250003Sadrian#define AR_PHY_SPUR_REG_EN_VIT_SPUR_RSSI 0x00000100 76250003Sadrian#define AR_PHY_SPUR_REG_EN_VIT_SPUR_RSSI_S 8 77250003Sadrian#define AR_PHY_SPUR_REG_MASK_RATE_CNTL 0x03FC0000 78250003Sadrian#define AR_PHY_SPUR_REG_MASK_RATE_CNTL_S 18 79250003Sadrian 80250003Sadrian/* BB_rx_iq_corr_b0 */ 81250003Sadrian#define AR_PHY_RX_IQCAL_CORR_B0_LOOPBACK_IQCORR_EN 0x20000000 82250003Sadrian#define AR_PHY_RX_IQCAL_CORR_B0_LOOPBACK_IQCORR_EN_S 29 83250003Sadrian/* BB_txiqcal_control_3 */ 84250003Sadrian#define AR_PHY_TX_IQCAL_CONTROL_3_IQCORR_EN 0x80000000 85250003Sadrian#define AR_PHY_TX_IQCAL_CONTROL_3_IQCORR_EN_S 31 86250003Sadrian 87250003Sadrian#if 0 88250003Sadrian/* enable vit puncture per rate, 8 bits, lsb is low rate */ 89250003Sadrian#define AR_PHY_SPUR_REG_MASK_RATE_CNTL (0xFF << 18) 90250003Sadrian#define AR_PHY_SPUR_REG_MASK_RATE_CNTL_S 18 91250003Sadrian#define AR_PHY_SPUR_REG_ENABLE_MASK_PPM 0x20000 /* bins move with freq offset */ 92250003Sadrian#define AR_PHY_SPUR_REG_MASK_RATE_SELECT (0xFF << 9) /* use mask1 or mask2, one per rate */ 93250003Sadrian#define AR_PHY_SPUR_REG_MASK_RATE_SELECT_S 9 94250003Sadrian#define AR_PHY_SPUR_REG_ENABLE_VIT_SPUR_RSSI 0x100 95250003Sadrian#define AR_PHY_SPUR_REG_SPUR_RSSI_THRESH 0x7F 96250003Sadrian#define AR_PHY_SPUR_REG_SPUR_RSSI_THRESH_S 0 97250003Sadrian#endif 98250003Sadrian 99250003Sadrian#define AR_PHY_FIND_SIG_LOW AR_CHAN_OFFSET(BB_find_signal_low) 100250003Sadrian#define AR_PHY_SFCORR AR_CHAN_OFFSET(BB_sfcorr) 101250003Sadrian#if 0 102250003Sadrian#define AR_PHY_SFCORR_M2COUNT_THR 0x0000001F 103250003Sadrian#define AR_PHY_SFCORR_M2COUNT_THR_S 0 104250003Sadrian#define AR_PHY_SFCORR_M1_THRESH 0x00FE0000 105250003Sadrian#define AR_PHY_SFCORR_M1_THRESH_S 17 106250003Sadrian#define AR_PHY_SFCORR_M2_THRESH 0x7F000000 107250003Sadrian#define AR_PHY_SFCORR_M2_THRESH_S 24 108250003Sadrian#endif 109250003Sadrian 110250003Sadrian#define AR_PHY_SFCORR_LOW AR_CHAN_OFFSET(BB_self_corr_low) 111250003Sadrian#define AR_PHY_SFCORR_EXT AR_CHAN_OFFSET(BB_ext_chan_scorr_thr) 112250003Sadrian#if 0 113250003Sadrian#define AR_PHY_SFCORR_EXT_M1_THRESH 0x0000007F // [06:00] 114250003Sadrian#define AR_PHY_SFCORR_EXT_M1_THRESH_S 0 115250003Sadrian#define AR_PHY_SFCORR_EXT_M2_THRESH 0x00003F80 // [13:07] 116250003Sadrian#define AR_PHY_SFCORR_EXT_M2_THRESH_S 7 117250003Sadrian#define AR_PHY_SFCORR_EXT_M1_THRESH_LOW 0x001FC000 // [20:14] 118250003Sadrian#define AR_PHY_SFCORR_EXT_M1_THRESH_LOW_S 14 119250003Sadrian#define AR_PHY_SFCORR_EXT_M2_THRESH_LOW 0x0FE00000 // [27:21] 120250003Sadrian#define AR_PHY_SFCORR_EXT_M2_THRESH_LOW_S 21 121250003Sadrian#define AR_PHY_SFCORR_SPUR_SUBCHNL_SD_S 28 122250003Sadrian#endif 123250003Sadrian 124250003Sadrian#define AR_PHY_EXT_CCA AR_CHAN_OFFSET(BB_ext_chan_pwr_thr_2_b0) 125250003Sadrian#define AR_PHY_RADAR_0 AR_CHAN_OFFSET(BB_radar_detection) /* radar detection settings */ 126250003Sadrian#define AR_PHY_RADAR_1 AR_CHAN_OFFSET(BB_radar_detection_2) 127250003Sadrian#define AR_PHY_RADAR_1_CF_BIN_THRESH 0x07000000 128250003Sadrian#define AR_PHY_RADAR_1_CF_BIN_THRESH_S 24 129250003Sadrian#define AR_PHY_RADAR_EXT AR_CHAN_OFFSET(BB_extension_radar) /* extension channel radar settings */ 130250003Sadrian#define AR_PHY_MULTICHAIN_CTRL AR_CHAN_OFFSET(BB_multichain_control) 131250003Sadrian#define AR_PHY_PERCHAIN_CSD AR_CHAN_OFFSET(BB_per_chain_csd) 132250003Sadrian 133250003Sadrian#define AR_PHY_TX_PHASE_RAMP_0 AR_CHAN_OFFSET(BB_tx_phase_ramp_b0) 134250003Sadrian#define AR_PHY_ADC_GAIN_DC_CORR_0 AR_CHAN_OFFSET(BB_adc_gain_dc_corr_b0) 135250003Sadrian#define AR_PHY_IQ_ADC_MEAS_0_B0 AR_CHAN_OFFSET(BB_iq_adc_meas_0_b0) 136250003Sadrian#define AR_PHY_IQ_ADC_MEAS_1_B0 AR_CHAN_OFFSET(BB_iq_adc_meas_1_b0) 137250003Sadrian#define AR_PHY_IQ_ADC_MEAS_2_B0 AR_CHAN_OFFSET(BB_iq_adc_meas_2_b0) 138250003Sadrian#define AR_PHY_IQ_ADC_MEAS_3_B0 AR_CHAN_OFFSET(BB_iq_adc_meas_3_b0) 139250003Sadrian 140250003Sadrian#define AR_PHY_TX_IQ_CORR_0 AR_CHAN_OFFSET(BB_tx_iq_corr_b0) 141250003Sadrian#define AR_PHY_TX_CRC AR_CHAN_OFFSET(BB_tx_crc) 142250003Sadrian#define AR_PHY_TST_DAC_CONST AR_CHAN_OFFSET(BB_tstdac_constant) 143250003Sadrian#define AR_PHY_SPUR_REPORT_0 AR_CHAN_OFFSET(BB_spur_report_b0) 144250003Sadrian#define AR_PHY_CHAN_INFO_TAB_0 AR_CHAN_OFFSET(BB_chan_info_chan_tab_b0) 145250003Sadrian 146250003Sadrian 147250003Sadrian/* 148250003Sadrian * Channel Field Definitions 149250003Sadrian */ 150250003Sadrian/* BB_timing_controls_2 */ 151250003Sadrian#define AR_PHY_TIMING2_USE_FORCE_PPM 0x00001000 152250003Sadrian#define AR_PHY_TIMING2_FORCE_PPM_VAL 0x00000fff 153250003Sadrian#define AR_PHY_TIMING2_HT_Fine_Timing_EN 0x80000000 154250003Sadrian#define AR_PHY_TIMING2_DC_OFFSET 0x08000000 155250003Sadrian#define AR_PHY_TIMING2_DC_OFFSET_S 27 156250003Sadrian 157250003Sadrian/* BB_timing_controls_3 */ 158250003Sadrian#define AR_PHY_TIMING3_DSC_MAN 0xFFFE0000 159250003Sadrian#define AR_PHY_TIMING3_DSC_MAN_S 17 160250003Sadrian#define AR_PHY_TIMING3_DSC_EXP 0x0001E000 161250003Sadrian#define AR_PHY_TIMING3_DSC_EXP_S 13 162250003Sadrian/* BB_timing_control_4 */ 163250003Sadrian#define AR_PHY_TIMING4_IQCAL_LOG_COUNT_MAX 0xF000 /* Mask for max number of samples (logarithmic) */ 164250003Sadrian#define AR_PHY_TIMING4_IQCAL_LOG_COUNT_MAX_S 12 /* Shift for max number of samples */ 165250003Sadrian#define AR_PHY_TIMING4_DO_CAL 0x10000 /* perform calibration */ 166250003Sadrian#define AR_PHY_TIMING4_ENABLE_PILOT_MASK 0x10000000 167250003Sadrian#define AR_PHY_TIMING4_ENABLE_PILOT_MASK_S 28 168250003Sadrian#define AR_PHY_TIMING4_ENABLE_CHAN_MASK 0x20000000 169250003Sadrian#define AR_PHY_TIMING4_ENABLE_CHAN_MASK_S 29 170250003Sadrian 171250003Sadrian#define AR_PHY_TIMING4_ENABLE_SPUR_FILTER 0x40000000 172250003Sadrian#define AR_PHY_TIMING4_ENABLE_SPUR_FILTER_S 30 173250003Sadrian#define AR_PHY_TIMING4_ENABLE_SPUR_RSSI 0x80000000 174250003Sadrian#define AR_PHY_TIMING4_ENABLE_SPUR_RSSI_S 31 175250003Sadrian 176250003Sadrian/* BB_adc_gain_dc_corr_b0 */ 177250003Sadrian#define AR_PHY_NEW_ADC_GAIN_CORR_ENABLE 0x40000000 178250003Sadrian#define AR_PHY_NEW_ADC_DC_OFFSET_CORR_ENABLE 0x80000000 179250003Sadrian/* BB_self_corr_low */ 180250003Sadrian#define AR_PHY_SFCORR_LOW_USE_SELF_CORR_LOW 0x00000001 181250003Sadrian#define AR_PHY_SFCORR_LOW_M2COUNT_THR_LOW 0x00003F00 182250003Sadrian#define AR_PHY_SFCORR_LOW_M2COUNT_THR_LOW_S 8 183250003Sadrian#define AR_PHY_SFCORR_LOW_M1_THRESH_LOW 0x001FC000 184250003Sadrian#define AR_PHY_SFCORR_LOW_M1_THRESH_LOW_S 14 185250003Sadrian#define AR_PHY_SFCORR_LOW_M2_THRESH_LOW 0x0FE00000 186250003Sadrian#define AR_PHY_SFCORR_LOW_M2_THRESH_LOW_S 21 187250003Sadrian/* BB_sfcorr */ 188250003Sadrian#define AR_PHY_SFCORR_M2COUNT_THR 0x0000001F 189250003Sadrian#define AR_PHY_SFCORR_M2COUNT_THR_S 0 190250003Sadrian#define AR_PHY_SFCORR_M1_THRESH 0x00FE0000 191250003Sadrian#define AR_PHY_SFCORR_M1_THRESH_S 17 192250003Sadrian#define AR_PHY_SFCORR_M2_THRESH 0x7F000000 193250003Sadrian#define AR_PHY_SFCORR_M2_THRESH_S 24 194250003Sadrian/* BB_ext_chan_scorr_thr */ 195250003Sadrian#define AR_PHY_SFCORR_EXT_M1_THRESH 0x0000007F // [06:00] 196250003Sadrian#define AR_PHY_SFCORR_EXT_M1_THRESH_S 0 197250003Sadrian#define AR_PHY_SFCORR_EXT_M2_THRESH 0x00003F80 // [13:07] 198250003Sadrian#define AR_PHY_SFCORR_EXT_M2_THRESH_S 7 199250003Sadrian#define AR_PHY_SFCORR_EXT_M1_THRESH_LOW 0x001FC000 // [20:14] 200250003Sadrian#define AR_PHY_SFCORR_EXT_M1_THRESH_LOW_S 14 201250003Sadrian#define AR_PHY_SFCORR_EXT_M2_THRESH_LOW 0x0FE00000 // [27:21] 202250003Sadrian#define AR_PHY_SFCORR_EXT_M2_THRESH_LOW_S 21 203250003Sadrian#define AR_PHY_SFCORR_EXT_SPUR_SUBCHANNEL_SD 0x10000000 204250003Sadrian#define AR_PHY_SFCORR_EXT_SPUR_SUBCHANNEL_SD_S 28 205250003Sadrian#define AR_PHY_SFCORR_SPUR_SUBCHNL_SD_S 28 206250003Sadrian/* BB_ext_chan_pwr_thr_2_b0 */ 207250003Sadrian#define AR_PHY_EXT_CCA_THRESH62 0x007F0000 208250003Sadrian#define AR_PHY_EXT_CCA_THRESH62_S 16 209250003Sadrian#define AR_PHY_EXT_MINCCA_PWR 0x01FF0000 210250003Sadrian#define AR_PHY_EXT_MINCCA_PWR_S 16 211250003Sadrian#define AR_PHY_EXT_CYCPWR_THR1 0x0000FE00L // [15:09] 212250003Sadrian#define AR_PHY_EXT_CYCPWR_THR1_S 9 213250003Sadrian/* BB_timing_control_5 */ 214250003Sadrian#define AR_PHY_TIMING5_CYCPWR_THR1 0x000000FE 215250003Sadrian#define AR_PHY_TIMING5_CYCPWR_THR1_S 1 216250003Sadrian#define AR_PHY_TIMING5_CYCPWR_THR1_ENABLE 0x00000001 217250003Sadrian#define AR_PHY_TIMING5_CYCPWR_THR1_ENABLE_S 0 218250003Sadrian#define AR_PHY_TIMING5_CYCPWR_THR1A 0x007F0000 219250003Sadrian#define AR_PHY_TIMING5_CYCPWR_THR1A_S 16 220250003Sadrian#define AR_PHY_TIMING5_RSSI_THR1A (0x7F << 16) 221250003Sadrian#define AR_PHY_TIMING5_RSSI_THR1A_S 16 222250003Sadrian#define AR_PHY_TIMING5_RSSI_THR1A_ENA (0x1 << 15) 223250003Sadrian/* BB_radar_detection) */ 224250003Sadrian#define AR_PHY_RADAR_0_ENA 0x00000001 /* Enable radar detection */ 225250003Sadrian#define AR_PHY_RADAR_0_FFT_ENA 0x80000000 /* Enable FFT data */ 226250003Sadrian#define AR_PHY_RADAR_0_INBAND 0x0000003e /* Inband pulse threshold */ 227250003Sadrian#define AR_PHY_RADAR_0_INBAND_S 1 228250003Sadrian#define AR_PHY_RADAR_0_PRSSI 0x00000FC0 /* Pulse rssi threshold */ 229250003Sadrian#define AR_PHY_RADAR_0_PRSSI_S 6 230250003Sadrian#define AR_PHY_RADAR_0_HEIGHT 0x0003F000 /* Pulse height threshold */ 231250003Sadrian#define AR_PHY_RADAR_0_HEIGHT_S 12 232250003Sadrian#define AR_PHY_RADAR_0_RRSSI 0x00FC0000 /* Radar rssi threshold */ 233250003Sadrian#define AR_PHY_RADAR_0_RRSSI_S 18 234250003Sadrian#define AR_PHY_RADAR_0_FIRPWR 0x7F000000 /* Radar firpwr threshold */ 235250003Sadrian#define AR_PHY_RADAR_0_FIRPWR_S 24 236250003Sadrian/* BB_radar_detection_2 */ 237250003Sadrian#define AR_PHY_RADAR_1_RELPWR_ENA 0x00800000 /* enable to check radar relative power */ 238250003Sadrian#define AR_PHY_RADAR_1_USE_FIR128 0x00400000 /* enable to use the average inband power 239250003Sadrian * measured over 128 cycles 240250003Sadrian */ 241250003Sadrian#define AR_PHY_RADAR_1_RELPWR_THRESH 0x003F0000 /* relative pwr thresh */ 242250003Sadrian#define AR_PHY_RADAR_1_RELPWR_THRESH_S 16 243250003Sadrian#define AR_PHY_RADAR_1_BLOCK_CHECK 0x00008000 /* Enable to block radar check if weak OFDM 244250003Sadrian * sig or pkt is immediately after tx to rx 245250003Sadrian * transition 246250003Sadrian */ 247250003Sadrian#define AR_PHY_RADAR_1_MAX_RRSSI 0x00004000 /* Enable to use max rssi */ 248250003Sadrian#define AR_PHY_RADAR_1_RELSTEP_CHECK 0x00002000 /* Enable to use pulse relative step check */ 249250003Sadrian#define AR_PHY_RADAR_1_RELSTEP_THRESH 0x00001F00 /* Pulse relative step threshold */ 250250003Sadrian#define AR_PHY_RADAR_1_RELSTEP_THRESH_S 8 251250003Sadrian#define AR_PHY_RADAR_1_MAXLEN 0x000000FF /* Max length of radar pulse */ 252250003Sadrian#define AR_PHY_RADAR_1_MAXLEN_S 0 253250003Sadrian/* BB_extension_radar */ 254250003Sadrian#define AR_PHY_RADAR_EXT_ENA 0x00004000 /* Enable extension channel radar detection */ 255250003Sadrian#define AR_PHY_RADAR_DC_PWR_THRESH 0x007f8000 256250003Sadrian#define AR_PHY_RADAR_DC_PWR_THRESH_S 15 257250003Sadrian#define AR_PHY_RADAR_LB_DC_CAP 0x7f800000 258250003Sadrian#define AR_PHY_RADAR_LB_DC_CAP_S 23 259250003Sadrian/* per chain csd*/ 260250003Sadrian#define AR_PHY_PERCHAIN_CSD_chn1_2chains 0x0000001f 261250003Sadrian#define AR_PHY_PERCHAIN_CSD_chn1_2chains_S 0 262250003Sadrian#define AR_PHY_PERCHAIN_CSD_chn1_3chains 0x000003e0 263250003Sadrian#define AR_PHY_PERCHAIN_CSD_chn1_3chains_S 5 264250003Sadrian#define AR_PHY_PERCHAIN_CSD_chn2_3chains 0x00007c00 265250003Sadrian#define AR_PHY_PERCHAIN_CSD_chn2_3chains_S 10 266250003Sadrian/* BB_find_signal_low */ 267250003Sadrian#define AR_PHY_FIND_SIG_LOW_FIRSTEP_LOW (0x3f << 6) 268250003Sadrian#define AR_PHY_FIND_SIG_LOW_FIRSTEP_LOW_S 6 269250003Sadrian#define AR_PHY_FIND_SIG_LOW_FIRPWR (0x7f << 12) 270250003Sadrian#define AR_PHY_FIND_SIG_LOW_FIRPWR_S 12 271250003Sadrian#define AR_PHY_FIND_SIG_LOW_FIRPWR_SIGN_BIT 19 272250003Sadrian#define AR_PHY_FIND_SIG_LOW_RELSTEP 0x1f 273250003Sadrian#define AR_PHY_FIND_SIG_LOW_RELSTEP_S 0 274250003Sadrian#define AR_PHY_FIND_SIG_LOW_RELSTEP_SIGN_BIT 5 275250003Sadrian/* BB_chan_info_chan_tab_b* */ 276250003Sadrian#define AR_PHY_CHAN_INFO_TAB_S2_READ 0x00000008 277250003Sadrian#define AR_PHY_CHAN_INFO_TAB_S2_READ_S 3 278250003Sadrian/* BB_rx_iq_corr_b* */ 279250003Sadrian#define AR_PHY_RX_IQCAL_CORR_IQCORR_Q_Q_COFF 0x0000007F /* Mask for kcos_theta-1 for q correction */ 280250003Sadrian#define AR_PHY_RX_IQCAL_CORR_IQCORR_Q_Q_COFF_S 0 /* shift for Q_COFF */ 281250003Sadrian#define AR_PHY_RX_IQCAL_CORR_IQCORR_Q_I_COFF 0x00003F80 /* Mask for sin_theta for i correction */ 282250003Sadrian#define AR_PHY_RX_IQCAL_CORR_IQCORR_Q_I_COFF_S 7 /* Shift for sin_theta for i correction */ 283250003Sadrian#define AR_PHY_RX_IQCAL_CORR_IQCORR_ENABLE 0x00004000 /* enable IQ correction */ 284250003Sadrian#define AR_PHY_RX_IQCAL_CORR_LOOPBACK_IQCORR_Q_Q_COFF 0x003f8000 285250003Sadrian#define AR_PHY_RX_IQCAL_CORR_LOOPBACK_IQCORR_Q_Q_COFF_S 15 286250003Sadrian#define AR_PHY_RX_IQCAL_CORR_LOOPBACK_IQCORR_Q_I_COFF 0x1fc00000 287250003Sadrian#define AR_PHY_RX_IQCAL_CORR_LOOPBACK_IQCORR_Q_I_COFF_S 22 288250003Sadrian 289250003Sadrian/* 290250003Sadrian * MRC Register Map 291250003Sadrian */ 292250003Sadrian#define AR_MRC_BASE offsetof(struct bb_reg_map, bb_mrc_reg_map) 293250003Sadrian#define AR_MRC_OFFSET(_x) (AR_MRC_BASE + offsetof(struct mrc_reg_map, _x)) 294250003Sadrian 295250003Sadrian#define AR_PHY_TIMING_3A AR_MRC_OFFSET(BB_timing_control_3a) 296250003Sadrian#define AR_PHY_LDPC_CNTL1 AR_MRC_OFFSET(BB_ldpc_cntl1) 297250003Sadrian#define AR_PHY_LDPC_CNTL2 AR_MRC_OFFSET(BB_ldpc_cntl2) 298250003Sadrian#define AR_PHY_PILOT_SPUR_MASK AR_MRC_OFFSET(BB_pilot_spur_mask) 299250003Sadrian#define AR_PHY_CHAN_SPUR_MASK AR_MRC_OFFSET(BB_chan_spur_mask) 300250003Sadrian#define AR_PHY_SGI_DELTA AR_MRC_OFFSET(BB_short_gi_delta_slope) 301250003Sadrian#define AR_PHY_ML_CNTL_1 AR_MRC_OFFSET(BB_ml_cntl1) 302250003Sadrian#define AR_PHY_ML_CNTL_2 AR_MRC_OFFSET(BB_ml_cntl2) 303250003Sadrian#define AR_PHY_TST_ADC AR_MRC_OFFSET(BB_tstadc) 304250003Sadrian 305250003Sadrian/* BB_pilot_spur_mask fields */ 306250003Sadrian#define AR_PHY_PILOT_SPUR_MASK_CF_PILOT_MASK_IDX_A 0x00000FE0 307250003Sadrian#define AR_PHY_PILOT_SPUR_MASK_CF_PILOT_MASK_IDX_A_S 5 308250003Sadrian#define AR_PHY_PILOT_SPUR_MASK_CF_PILOT_MASK_A 0x1F 309250003Sadrian#define AR_PHY_PILOT_SPUR_MASK_CF_PILOT_MASK_A_S 0 310250003Sadrian 311250003Sadrian/* BB_chan_spur_mask fields */ 312250003Sadrian#define AR_PHY_CHAN_SPUR_MASK_CF_CHAN_MASK_IDX_A 0x00000FE0 313250003Sadrian#define AR_PHY_CHAN_SPUR_MASK_CF_CHAN_MASK_IDX_A_S 5 314250003Sadrian#define AR_PHY_CHAN_SPUR_MASK_CF_CHAN_MASK_A 0x1F 315250003Sadrian#define AR_PHY_CHAN_SPUR_MASK_CF_CHAN_MASK_A_S 0 316250003Sadrian 317250003Sadrian/* 318250003Sadrian * MRC Feild Definitions 319250003Sadrian */ 320250003Sadrian#define AR_PHY_SGI_DSC_MAN 0x0007FFF0 321250003Sadrian#define AR_PHY_SGI_DSC_MAN_S 4 322250003Sadrian#define AR_PHY_SGI_DSC_EXP 0x0000000F 323250003Sadrian#define AR_PHY_SGI_DSC_EXP_S 0 324250003Sadrian/* 325250003Sadrian * BBB Register Map 326250003Sadrian */ 327250003Sadrian#define AR_BBB_BASE offsetof(struct bb_reg_map, bb_bbb_reg_map) 328250003Sadrian#define AR_BBB_OFFSET(_x) (AR_BBB_BASE + offsetof(struct bbb_reg_map, _x)) 329250003Sadrian 330250003Sadrian#define AR_PHY_BBB_RX_CTRL(_i) AR_BBB_OFFSET(BB_bbb_rx_ctrl_##_i) 331250003Sadrian 332250003Sadrian/* 333250003Sadrian * AGC Register Map 334250003Sadrian */ 335250003Sadrian#define AR_AGC_BASE offsetof(struct bb_reg_map, bb_agc_reg_map) 336250003Sadrian#define AR_AGC_OFFSET(_x) (AR_AGC_BASE + offsetof(struct agc_reg_map, _x)) 337250003Sadrian 338250003Sadrian#define AR_PHY_SETTLING AR_AGC_OFFSET(BB_settling_time) 339250003Sadrian#define AR_PHY_FORCEMAX_GAINS_0 AR_AGC_OFFSET(BB_gain_force_max_gains_b0) 340250003Sadrian#define AR_PHY_GAINS_MINOFF0 AR_AGC_OFFSET(BB_gains_min_offsets_b0) 341250003Sadrian#define AR_PHY_DESIRED_SZ AR_AGC_OFFSET(BB_desired_sigsize) 342250003Sadrian#define AR_PHY_FIND_SIG AR_AGC_OFFSET(BB_find_signal) 343250003Sadrian#define AR_PHY_AGC AR_AGC_OFFSET(BB_agc) 344250003Sadrian#define AR_PHY_EXT_ATTEN_CTL_0 AR_AGC_OFFSET(BB_ext_atten_switch_ctl_b0) 345250003Sadrian#define AR_PHY_CCA_0 AR_AGC_OFFSET(BB_cca_b0) 346250003Sadrian#define AR_PHY_EXT_CCA0 AR_AGC_OFFSET(BB_cca_ctrl_2_b0) 347250003Sadrian#define AR_PHY_RESTART AR_AGC_OFFSET(BB_restart) 348250003Sadrian#define AR_PHY_MC_GAIN_CTRL AR_AGC_OFFSET(BB_multichain_gain_ctrl) 349250003Sadrian#define AR_PHY_EXTCHN_PWRTHR1 AR_AGC_OFFSET(BB_ext_chan_pwr_thr_1) 350250003Sadrian#define AR_PHY_EXT_CHN_WIN AR_AGC_OFFSET(BB_ext_chan_detect_win) 351250003Sadrian#define AR_PHY_20_40_DET_THR AR_AGC_OFFSET(BB_pwr_thr_20_40_det) 352250003Sadrian#define AR_PHY_RIFS_SRCH AR_AGC_OFFSET(BB_rifs_srch) 353250003Sadrian#define AR_PHY_PEAK_DET_CTRL_1 AR_AGC_OFFSET(BB_peak_det_ctrl_1) 354250003Sadrian 355250003Sadrian#define AR_PHY_PEAK_DET_ENABLE 0x00000002 356250003Sadrian 357250003Sadrian#define AR_PHY_PEAK_DET_CTRL_2 AR_AGC_OFFSET(BB_peak_det_ctrl_2) 358250003Sadrian#define AR_PHY_RX_GAIN_BOUNDS_1 AR_AGC_OFFSET(BB_rx_gain_bounds_1) 359250003Sadrian#define AR_PHY_RX_GAIN_BOUNDS_2 AR_AGC_OFFSET(BB_rx_gain_bounds_2) 360250003Sadrian#define AR_PHY_RSSI_0 AR_AGC_OFFSET(BB_rssi_b0) 361250003Sadrian#define AR_PHY_SPUR_CCK_REP0 AR_AGC_OFFSET(BB_spur_est_cck_report_b0) 362250003Sadrian#define AR_PHY_CCK_DETECT AR_AGC_OFFSET(BB_bbb_sig_detect) 363250003Sadrian#define AR_PHY_DAG_CTRLCCK AR_AGC_OFFSET(BB_bbb_dagc_ctrl) 364250003Sadrian#define AR_PHY_IQCORR_CTRL_CCK AR_AGC_OFFSET(BB_iqcorr_ctrl_cck) 365250003Sadrian#define AR_PHY_DIG_DC_STATUS_I_B0 AR_AGC_OFFSET(BB_agc_dig_dc_status_i_b0) 366250003Sadrian#define AR_PHY_DIG_DC_STATUS_Q_B0 AR_AGC_OFFSET(BB_agc_dig_dc_status_q_b0) 367250003Sadrian#define AR_PHY_DIG_DC_C1_RES 0x000001ff 368250003Sadrian#define AR_PHY_DIG_DC_C1_RES_S 0 369250003Sadrian#define AR_PHY_DIG_DC_C2_RES 0x0003fe00 370250003Sadrian#define AR_PHY_DIG_DC_C2_RES_S 9 371250003Sadrian#define AR_PHY_DIG_DC_C3_RES 0x07fc0000 372250003Sadrian#define AR_PHY_DIG_DC_C3_RES_S 18 373250003Sadrian 374250003Sadrian#define AR_PHY_CCK_SPUR_MIT AR_AGC_OFFSET(BB_cck_spur_mit) 375250003Sadrian#define AR_PHY_CCK_SPUR_MIT_SPUR_RSSI_THR 0x000001fe 376250003Sadrian#define AR_PHY_CCK_SPUR_MIT_SPUR_RSSI_THR_S 1 377250003Sadrian#define AR_PHY_CCK_SPUR_MIT_SPUR_FILTER_TYPE 0x60000000 378250003Sadrian#define AR_PHY_CCK_SPUR_MIT_SPUR_FILTER_TYPE_S 29 379250003Sadrian#define AR_PHY_CCK_SPUR_MIT_USE_CCK_SPUR_MIT 0x00000001 380250003Sadrian#define AR_PHY_CCK_SPUR_MIT_USE_CCK_SPUR_MIT_S 0 381250003Sadrian#define AR_PHY_CCK_SPUR_MIT_CCK_SPUR_FREQ 0x1ffffe00 382250003Sadrian#define AR_PHY_CCK_SPUR_MIT_CCK_SPUR_FREQ_S 9 383250003Sadrian 384250003Sadrian#define AR_PHY_MRC_CCK_CTRL AR_AGC_OFFSET(BB_mrc_cck_ctrl) 385250003Sadrian#define AR_PHY_MRC_CCK_ENABLE 0x00000001 386250003Sadrian#define AR_PHY_MRC_CCK_ENABLE_S 0 387250003Sadrian#define AR_PHY_MRC_CCK_MUX_REG 0x00000002 388250003Sadrian#define AR_PHY_MRC_CCK_MUX_REG_S 1 389250003Sadrian 390250003Sadrian#define AR_PHY_RX_OCGAIN AR_AGC_OFFSET(BB_rx_ocgain) 391250003Sadrian 392250003Sadrian#define AR_PHY_CCA_NOM_VAL_OSPREY_2GHZ -110 393250003Sadrian#define AR_PHY_CCA_NOM_VAL_OSPREY_5GHZ -115 394250003Sadrian#define AR_PHY_CCA_MIN_GOOD_VAL_OSPREY_2GHZ -125 395250003Sadrian#define AR_PHY_CCA_MIN_GOOD_VAL_OSPREY_5GHZ -125 396250003Sadrian#define AR_PHY_CCA_MAX_GOOD_VAL_OSPREY_2GHZ -95 397250003Sadrian#define AR_PHY_CCA_MAX_GOOD_VAL_OSPREY_5GHZ -100 398250003Sadrian#define AR_PHY_CCA_NOM_VAL_PEACOCK_5GHZ -105 399250003Sadrian 400250003Sadrian#define AR_PHY_CCA_NOM_VAL_JUPITER_2GHZ -127 401250003Sadrian#define AR_PHY_CCA_MIN_GOOD_VAL_JUPITER_2GHZ -127 402250003Sadrian#define AR_PHY_CCA_NOM_VAL_JUPITER_5GHZ -127 403250003Sadrian#define AR_PHY_CCA_MIN_GOOD_VAL_JUPITER_5GHZ -127 404250003Sadrian 405250003Sadrian#define AR_PHY_BT_COEX_4 AR_AGC_OFFSET(BB_bt_coex_4) 406250003Sadrian#define AR_PHY_BT_COEX_5 AR_AGC_OFFSET(BB_bt_coex_5) 407250003Sadrian 408250003Sadrian/* 409250003Sadrian * Noise floor readings at least CW_INT_DELTA above the nominal NF 410250003Sadrian * indicate that CW interference is present. 411250003Sadrian */ 412250003Sadrian#define AR_PHY_CCA_CW_INT_DELTA 30 413250003Sadrian 414250003Sadrian/* 415250003Sadrian * AGC Field Definitions 416250003Sadrian */ 417250003Sadrian/* BB_ext_atten_switch_ctl_b0 */ 418250003Sadrian#define AR_PHY_EXT_ATTEN_CTL_RXTX_MARGIN 0x00FC0000 419250003Sadrian#define AR_PHY_EXT_ATTEN_CTL_RXTX_MARGIN_S 18 420250003Sadrian#define AR_PHY_EXT_ATTEN_CTL_BSW_MARGIN 0x00003C00 421250003Sadrian#define AR_PHY_EXT_ATTEN_CTL_BSW_MARGIN_S 10 422250003Sadrian#define AR_PHY_EXT_ATTEN_CTL_BSW_ATTEN 0x0000001F 423250003Sadrian#define AR_PHY_EXT_ATTEN_CTL_BSW_ATTEN_S 0 424250003Sadrian#define AR_PHY_EXT_ATTEN_CTL_XATTEN2_MARGIN 0x003E0000 425250003Sadrian#define AR_PHY_EXT_ATTEN_CTL_XATTEN2_MARGIN_S 17 426250003Sadrian#define AR_PHY_EXT_ATTEN_CTL_XATTEN1_MARGIN 0x0001F000 427250003Sadrian#define AR_PHY_EXT_ATTEN_CTL_XATTEN1_MARGIN_S 12 428250003Sadrian#define AR_PHY_EXT_ATTEN_CTL_XATTEN2_DB 0x00000FC0 429250003Sadrian#define AR_PHY_EXT_ATTEN_CTL_XATTEN2_DB_S 6 430250003Sadrian#define AR_PHY_EXT_ATTEN_CTL_XATTEN1_DB 0x0000003F 431250003Sadrian#define AR_PHY_EXT_ATTEN_CTL_XATTEN1_DB_S 0 432250003Sadrian/* BB_gain_force_max_gains_b0 */ 433250003Sadrian#define AR_PHY_RXGAIN_TXRX_ATTEN 0x0003F000 434250003Sadrian#define AR_PHY_RXGAIN_TXRX_ATTEN_S 12 435250003Sadrian#define AR_PHY_RXGAIN_TXRX_RF_MAX 0x007C0000 436250003Sadrian#define AR_PHY_RXGAIN_TXRX_RF_MAX_S 18 437250003Sadrian#define AR9280_PHY_RXGAIN_TXRX_ATTEN 0x00003F80 438250003Sadrian#define AR9280_PHY_RXGAIN_TXRX_ATTEN_S 7 439250003Sadrian#define AR9280_PHY_RXGAIN_TXRX_MARGIN 0x001FC000 440250003Sadrian#define AR9280_PHY_RXGAIN_TXRX_MARGIN_S 14 441250003Sadrian/* BB_settling_time */ 442250003Sadrian#define AR_PHY_SETTLING_SWITCH 0x00003F80 443250003Sadrian#define AR_PHY_SETTLING_SWITCH_S 7 444250003Sadrian/* BB_desired_sigsize */ 445250003Sadrian#define AR_PHY_DESIRED_SZ_ADC 0x000000FF 446250003Sadrian#define AR_PHY_DESIRED_SZ_ADC_S 0 447250003Sadrian#define AR_PHY_DESIRED_SZ_PGA 0x0000FF00 448250003Sadrian#define AR_PHY_DESIRED_SZ_PGA_S 8 449250003Sadrian#define AR_PHY_DESIRED_SZ_TOT_DES 0x0FF00000 450250003Sadrian#define AR_PHY_DESIRED_SZ_TOT_DES_S 20 451250003Sadrian/* BB_cca_b0 */ 452250003Sadrian#define AR_PHY_MINCCA_PWR 0x1FF00000 453250003Sadrian#define AR_PHY_MINCCA_PWR_S 20 454250003Sadrian#define AR_PHY_CCA_THRESH62 0x0007F000 455250003Sadrian#define AR_PHY_CCA_THRESH62_S 12 456250003Sadrian#define AR9280_PHY_MINCCA_PWR 0x1FF00000 457250003Sadrian#define AR9280_PHY_MINCCA_PWR_S 20 458250003Sadrian#define AR9280_PHY_CCA_THRESH62 0x000FF000 459250003Sadrian#define AR9280_PHY_CCA_THRESH62_S 12 460250003Sadrian/* BB_cca_ctrl_2_b0 */ 461250003Sadrian#define AR_PHY_EXT_CCA0_THRESH62 0x000000FF 462250003Sadrian#define AR_PHY_EXT_CCA0_THRESH62_S 0 463250003Sadrian/* BB_bbb_sig_detect */ 464250003Sadrian#define AR_PHY_CCK_DETECT_WEAK_SIG_THR_CCK 0x0000003F 465250003Sadrian#define AR_PHY_CCK_DETECT_WEAK_SIG_THR_CCK_S 0 466250003Sadrian#define AR_PHY_CCK_DETECT_ANT_SWITCH_TIME 0x00001FC0 // [12:6] settling time for antenna switch 467250003Sadrian#define AR_PHY_CCK_DETECT_ANT_SWITCH_TIME_S 6 468250003Sadrian#define AR_PHY_CCK_DETECT_BB_ENABLE_ANT_FAST_DIV 0x2000 469250003Sadrian#define AR_PHY_CCK_DETECT_BB_ENABLE_ANT_FAST_DIV_S 13 470250003Sadrian 471250003Sadrian/* BB_bbb_dagc_ctrl */ 472250003Sadrian#define AR_PHY_DAG_CTRLCCK_EN_RSSI_THR 0x00000200 473250003Sadrian#define AR_PHY_DAG_CTRLCCK_EN_RSSI_THR_S 9 474250003Sadrian#define AR_PHY_DAG_CTRLCCK_RSSI_THR 0x0001FC00 475250003Sadrian#define AR_PHY_DAG_CTRLCCK_RSSI_THR_S 10 476250003Sadrian 477250003Sadrian/* BB_rifs_srch */ 478250003Sadrian#define AR_PHY_RIFS_INIT_DELAY 0x3ff0000 479250003Sadrian 480250003Sadrian/*B_tpc_7*/ 481250003Sadrian#define AR_PHY_TPC_7_TX_GAIN_TABLE_MAX 0x3f 482250003Sadrian#define AR_PHY_TPC_7_TX_GAIN_TABLE_MAX_S (0) 483250003Sadrian 484250003Sadrian/* BB_agc */ 485250003Sadrian#define AR_PHY_AGC_QUICK_DROP_S (22) 486250003Sadrian#define AR_PHY_AGC_QUICK_DROP (0xf << AR_PHY_AGC_QUICK_DROP_S) 487250003Sadrian#define AR_PHY_AGC_COARSE_LOW 0x00007F80 488250003Sadrian#define AR_PHY_AGC_COARSE_LOW_S 7 489250003Sadrian#define AR_PHY_AGC_COARSE_HIGH 0x003F8000 490250003Sadrian#define AR_PHY_AGC_COARSE_HIGH_S 15 491250003Sadrian#define AR_PHY_AGC_COARSE_PWR_CONST 0x0000007F 492250003Sadrian#define AR_PHY_AGC_COARSE_PWR_CONST_S 0 493250003Sadrian/* BB_find_signal */ 494250003Sadrian#define AR_PHY_FIND_SIG_FIRSTEP 0x0003F000 495250003Sadrian#define AR_PHY_FIND_SIG_FIRSTEP_S 12 496250003Sadrian#define AR_PHY_FIND_SIG_FIRPWR 0x03FC0000 497250003Sadrian#define AR_PHY_FIND_SIG_FIRPWR_S 18 498250003Sadrian#define AR_PHY_FIND_SIG_FIRPWR_SIGN_BIT 25 499250003Sadrian#define AR_PHY_FIND_SIG_RELPWR (0x1f << 6) 500250003Sadrian#define AR_PHY_FIND_SIG_RELPWR_S 6 501250003Sadrian#define AR_PHY_FIND_SIG_RELPWR_SIGN_BIT 11 502250003Sadrian#define AR_PHY_FIND_SIG_RELSTEP 0x1f 503250003Sadrian#define AR_PHY_FIND_SIG_RELSTEP_S 0 504250003Sadrian#define AR_PHY_FIND_SIG_RELSTEP_SIGN_BIT 5 505250003Sadrian/* BB_restart */ 506250003Sadrian#define AR_PHY_RESTART_DIV_GC 0x001C0000 /* bb_ant_fast_div_gc_limit */ 507250003Sadrian#define AR_PHY_RESTART_DIV_GC_S 18 508250003Sadrian#define AR_PHY_RESTART_ENA 0x01 /* enable restart */ 509250003Sadrian#define AR_PHY_DC_RESTART_DIS 0x40000000 /* disable DC restart */ 510250003Sadrian 511250003Sadrian#define AR_PHY_TPC_OLPC_GAIN_DELTA_PAL_ON 0xFF000000 //Mask BIT[31:24] 512250003Sadrian#define AR_PHY_TPC_OLPC_GAIN_DELTA_PAL_ON_S 24 513250003Sadrian#define AR_PHY_TPC_OLPC_GAIN_DELTA 0x00FF0000 //Mask BIT[23:16] 514250003Sadrian#define AR_PHY_TPC_OLPC_GAIN_DELTA_S 16 515250003Sadrian 516250003Sadrian#define AR_PHY_TPC_6_ERROR_EST_MODE 0x03000000 //Mask BIT[25:24] 517250003Sadrian#define AR_PHY_TPC_6_ERROR_EST_MODE_S 24 518250003Sadrian 519250003Sadrian/* 520250003Sadrian * SM Register Map 521250003Sadrian */ 522250003Sadrian#define AR_SM_BASE offsetof(struct bb_reg_map, bb_sm_reg_map) 523250003Sadrian#define AR_SM_OFFSET(_x) (AR_SM_BASE + offsetof(struct sm_reg_map, _x)) 524250003Sadrian 525250003Sadrian#define AR_PHY_D2_CHIP_ID AR_SM_OFFSET(BB_D2_chip_id) 526250003Sadrian#define AR_PHY_GEN_CTRL AR_SM_OFFSET(BB_gen_controls) 527250003Sadrian#define AR_PHY_MODE AR_SM_OFFSET(BB_modes_select) 528250003Sadrian#define AR_PHY_ACTIVE AR_SM_OFFSET(BB_active) 529250003Sadrian#define AR_PHY_SPUR_MASK_A AR_SM_OFFSET(BB_vit_spur_mask_A) 530250003Sadrian#define AR_PHY_SPUR_MASK_B AR_SM_OFFSET(BB_vit_spur_mask_B) 531250003Sadrian#define AR_PHY_SPECTRAL_SCAN AR_SM_OFFSET(BB_spectral_scan) 532250003Sadrian#define AR_PHY_RADAR_BW_FILTER AR_SM_OFFSET(BB_radar_bw_filter) 533250003Sadrian#define AR_PHY_SEARCH_START_DELAY AR_SM_OFFSET(BB_search_start_delay) 534250003Sadrian#define AR_PHY_MAX_RX_LEN AR_SM_OFFSET(BB_max_rx_length) 535250003Sadrian#define AR_PHY_FRAME_CTL AR_SM_OFFSET(BB_frame_control) 536250003Sadrian#define AR_PHY_RFBUS_REQ AR_SM_OFFSET(BB_rfbus_request) 537250003Sadrian#define AR_PHY_RFBUS_GRANT AR_SM_OFFSET(BB_rfbus_grant) 538250003Sadrian#define AR_PHY_RIFS AR_SM_OFFSET(BB_rifs) 539250003Sadrian#define AR_PHY_RX_CLR_DELAY AR_SM_OFFSET(BB_rx_clear_delay) 540250003Sadrian#define AR_PHY_RX_DELAY AR_SM_OFFSET(BB_analog_power_on_time) 541250003Sadrian#define AR_PHY_BB_POWERTX_RATE9 AR_SM_OFFSET(BB_powertx_rate9) 542250003Sadrian#define AR_PHY_TPC_7 AR_SM_OFFSET(BB_tpc_7) 543250003Sadrian#define AR_PHY_CL_MAP_0_B0 AR_SM_OFFSET(BB_cl_map_0_b0) 544250003Sadrian#define AR_PHY_CL_MAP_1_B0 AR_SM_OFFSET(BB_cl_map_1_b0) 545250003Sadrian#define AR_PHY_CL_MAP_2_B0 AR_SM_OFFSET(BB_cl_map_2_b0) 546250003Sadrian#define AR_PHY_CL_MAP_3_B0 AR_SM_OFFSET(BB_cl_map_3_b0) 547250003Sadrian 548250003Sadrian#define AR_PHY_RF_CTL(_i) AR_SM_OFFSET(BB_tx_timing_##_i) 549250003Sadrian 550250003Sadrian#define AR_PHY_XPA_TIMING_CTL AR_SM_OFFSET(BB_xpa_timing_control) 551250003Sadrian#define AR_PHY_MISC_PA_CTL AR_SM_OFFSET(BB_misc_pa_control) 552250003Sadrian#define AR_PHY_SWITCH_CHAIN_0 AR_SM_OFFSET(BB_switch_table_chn_b0) 553250003Sadrian#define AR_PHY_SWITCH_COM AR_SM_OFFSET(BB_switch_table_com1) 554250003Sadrian#define AR_PHY_SWITCH_COM_2 AR_SM_OFFSET(BB_switch_table_com2) 555250003Sadrian#define AR_PHY_RX_CHAINMASK AR_SM_OFFSET(BB_multichain_enable) 556250003Sadrian#define AR_PHY_CAL_CHAINMASK AR_SM_OFFSET(BB_cal_chain_mask) 557250003Sadrian#define AR_PHY_AGC_CONTROL AR_SM_OFFSET(BB_agc_control) 558250003Sadrian#define AR_PHY_CALMODE AR_SM_OFFSET(BB_iq_adc_cal_mode) 559250003Sadrian#define AR_PHY_FCAL_1 AR_SM_OFFSET(BB_fcal_1) 560250003Sadrian#define AR_PHY_FCAL_2_0 AR_SM_OFFSET(BB_fcal_2_b0) 561250003Sadrian#define AR_PHY_DFT_TONE_CTL_0 AR_SM_OFFSET(BB_dft_tone_ctrl_b0) 562250003Sadrian#define AR_PHY_CL_CAL_CTL AR_SM_OFFSET(BB_cl_cal_ctrl) 563250003Sadrian#define AR_PHY_BBGAINMAP_0_1_0 AR_SM_OFFSET(BB_cl_bbgain_map_0_1_b0) 564250003Sadrian#define AR_PHY_BBGAINMAP_2_3_0 AR_SM_OFFSET(BB_cl_bbgain_map_2_3_b0) 565250003Sadrian#define AR_PHY_CL_TAB_0 AR_SM_OFFSET(BB_cl_tab_b0) 566250003Sadrian#define AR_PHY_SYNTH_CONTROL AR_SM_OFFSET(BB_synth_control) 567250003Sadrian#define AR_PHY_ADDAC_CLK_SEL AR_SM_OFFSET(BB_addac_clk_select) 568250003Sadrian#define AR_PHY_PLL_CTL AR_SM_OFFSET(BB_pll_cntl) 569250003Sadrian#define AR_PHY_ANALOG_SWAP AR_SM_OFFSET(BB_analog_swap) 570250003Sadrian#define AR_PHY_ADDAC_PARA_CTL AR_SM_OFFSET(BB_addac_parallel_control) 571250003Sadrian#define AR_PHY_XPA_CFG AR_SM_OFFSET(BB_force_analog) 572250003Sadrian#define AR_PHY_AIC_CTRL_0_B0_10 AR_SM_OFFSET(overlay_0xa580.Jupiter_10.BB_aic_ctrl_0_b0) 573250003Sadrian#define AR_PHY_AIC_CTRL_1_B0_10 AR_SM_OFFSET(overlay_0xa580.Jupiter_10.BB_aic_ctrl_1_b0) 574250003Sadrian#define AR_PHY_AIC_CTRL_2_B0_10 AR_SM_OFFSET(overlay_0xa580.Jupiter_10.BB_aic_ctrl_2_b0) 575250003Sadrian#define AR_PHY_AIC_CTRL_3_B0_10 AR_SM_OFFSET(overlay_0xa580.Jupiter_10.BB_aic_ctrl_3_b0) 576250003Sadrian#define AR_PHY_AIC_STAT_0_B0_10 AR_SM_OFFSET(overlay_0xa580.Jupiter_10.BB_aic_stat_0_b0) 577250003Sadrian#define AR_PHY_AIC_STAT_1_B0_10 AR_SM_OFFSET(overlay_0xa580.Jupiter_10.BB_aic_stat_1_b0) 578250003Sadrian#define AR_PHY_AIC_CTRL_0_B0_20 AR_SM_OFFSET(overlay_0xa580.Jupiter_20.BB_aic_ctrl_0_b0) 579250003Sadrian#define AR_PHY_AIC_CTRL_1_B0_20 AR_SM_OFFSET(overlay_0xa580.Jupiter_20.BB_aic_ctrl_1_b0) 580250003Sadrian#define AR_PHY_AIC_CTRL_2_B0_20 AR_SM_OFFSET(overlay_0xa580.Jupiter_20.BB_aic_ctrl_2_b0) 581250003Sadrian#define AR_PHY_AIC_CTRL_3_B0_20 AR_SM_OFFSET(overlay_0xa580.Jupiter_20.BB_aic_ctrl_3_b0) 582250003Sadrian#define AR_PHY_AIC_CTRL_4_B0_20 AR_SM_OFFSET(overlay_0xa580.Jupiter_20.BB_aic_ctrl_4_b0) 583250003Sadrian#define AR_PHY_AIC_STAT_0_B0_20 AR_SM_OFFSET(overlay_0xa580.Jupiter_20.BB_aic_stat_0_b0) 584250003Sadrian#define AR_PHY_AIC_STAT_1_B0_20 AR_SM_OFFSET(overlay_0xa580.Jupiter_20.BB_aic_stat_1_b0) 585250003Sadrian#define AR_PHY_AIC_STAT_2_B0_20 AR_SM_OFFSET(overlay_0xa580.Jupiter_20.BB_aic_stat_2_b0) 586250003Sadrian#define AR_PHY_AIC_CTRL_0_B1_10 AR_SM1_OFFSET(overlay_0x4b0.Jupiter_10.BB_aic_ctrl_0_b1) 587250003Sadrian#define AR_PHY_AIC_CTRL_1_B1_10 AR_SM1_OFFSET(overlay_0x4b0.Jupiter_10.BB_aic_ctrl_1_b1) 588250003Sadrian#define AR_PHY_AIC_STAT_0_B1_10 AR_SM1_OFFSET(overlay_0x4b0.Jupiter_10.BB_aic_stat_0_b1) 589250003Sadrian#define AR_PHY_AIC_STAT_1_B1_10 AR_SM1_OFFSET(overlay_0x4b0.Jupiter_10.BB_aic_stat_1_b1) 590250003Sadrian#define AR_PHY_AIC_CTRL_0_B1_20 AR_SM1_OFFSET(overlay_0x4b0.Jupiter_20.BB_aic_ctrl_0_b1) 591250003Sadrian#define AR_PHY_AIC_CTRL_1_B1_20 AR_SM1_OFFSET(overlay_0x4b0.Jupiter_20.BB_aic_ctrl_1_b1) 592250003Sadrian#define AR_PHY_AIC_CTRL_4_B1_20 AR_SM1_OFFSET(overlay_0x4b0.Jupiter_20.BB_aic_ctrl_4_b1) 593250003Sadrian#define AR_PHY_AIC_STAT_0_B1_20 AR_SM1_OFFSET(overlay_0x4b0.Jupiter_20.BB_aic_stat_0_b1) 594250003Sadrian#define AR_PHY_AIC_STAT_1_B1_20 AR_SM1_OFFSET(overlay_0x4b0.Jupiter_20.BB_aic_stat_1_b1) 595250003Sadrian#define AR_PHY_AIC_STAT_2_B1_20 AR_SM1_OFFSET(overlay_0x4b0.Jupiter_20.BB_aic_stat_2_b1) 596250003Sadrian#define AR_PHY_AIC_SRAM_ADDR_B0 AR_SM_OFFSET(BB_tables_intf_addr_b0) 597250003Sadrian#define AR_PHY_AIC_SRAM_DATA_B0 AR_SM_OFFSET(BB_tables_intf_data_b0) 598250003Sadrian#define AR_PHY_AIC_SRAM_ADDR_B1 AR_SM1_OFFSET(overlay_0x4b0.Jupiter_10.BB_tables_intf_addr_b1) 599250003Sadrian#define AR_PHY_AIC_SRAM_DATA_B1 AR_SM1_OFFSET(overlay_0x4b0.Jupiter_10.BB_tables_intf_data_b1) 600250003Sadrian 601250003Sadrian 602250003Sadrian/* AIC fields */ 603250003Sadrian#define AR_PHY_AIC_MON_ENABLE 0x80000000 604250003Sadrian#define AR_PHY_AIC_MON_ENABLE_S 31 605250003Sadrian#define AR_PHY_AIC_CAL_MAX_HOP_COUNT 0x7F000000 606250003Sadrian#define AR_PHY_AIC_CAL_MAX_HOP_COUNT_S 24 607250003Sadrian#define AR_PHY_AIC_CAL_MIN_VALID_COUNT 0x00FE0000 608250003Sadrian#define AR_PHY_AIC_CAL_MIN_VALID_COUNT_S 17 609250003Sadrian#define AR_PHY_AIC_F_WLAN 0x0001FC00 610250003Sadrian#define AR_PHY_AIC_F_WLAN_S 10 611250003Sadrian#define AR_PHY_AIC_CAL_CH_VALID_RESET 0x00000200 612250003Sadrian#define AR_PHY_AIC_CAL_CH_VALID_RESET_S 9 613250003Sadrian#define AR_PHY_AIC_CAL_ENABLE 0x00000100 614250003Sadrian#define AR_PHY_AIC_CAL_ENABLE_S 8 615250003Sadrian#define AR_PHY_AIC_BTTX_PWR_THR 0x000000FE 616250003Sadrian#define AR_PHY_AIC_BTTX_PWR_THR_S 1 617250003Sadrian#define AR_PHY_AIC_ENABLE 0x00000001 618250003Sadrian#define AR_PHY_AIC_ENABLE_S 0 619250003Sadrian#define AR_PHY_AIC_CAL_BT_REF_DELAY 0x78000000 620250003Sadrian#define AR_PHY_AIC_CAL_BT_REF_DELAY_S 27 621250003Sadrian#define AR_PHY_AIC_CAL_ROT_ATT_DB_EST_ISO 0x07000000 622250003Sadrian#define AR_PHY_AIC_CAL_ROT_ATT_DB_EST_ISO_S 24 623250003Sadrian#define AR_PHY_AIC_CAL_COM_ATT_DB_EST_ISO 0x00F00000 624250003Sadrian#define AR_PHY_AIC_CAL_COM_ATT_DB_EST_ISO_S 20 625250003Sadrian#define AR_PHY_AIC_BT_IDLE_CFG 0x00080000 626250003Sadrian#define AR_PHY_AIC_BT_IDLE_CFG_S 19 627250003Sadrian#define AR_PHY_AIC_STDBY_COND 0x00060000 628250003Sadrian#define AR_PHY_AIC_STDBY_COND_S 17 629250003Sadrian#define AR_PHY_AIC_STDBY_ROT_ATT_DB 0x0001F800 630250003Sadrian#define AR_PHY_AIC_STDBY_ROT_ATT_DB_S 11 631250003Sadrian#define AR_PHY_AIC_STDBY_COM_ATT_DB 0x00000700 632250003Sadrian#define AR_PHY_AIC_STDBY_COM_ATT_DB_S 8 633250003Sadrian#define AR_PHY_AIC_RSSI_MAX 0x000000F0 634250003Sadrian#define AR_PHY_AIC_RSSI_MAX_S 4 635250003Sadrian#define AR_PHY_AIC_RSSI_MIN 0x0000000F 636250003Sadrian#define AR_PHY_AIC_RSSI_MIN_S 0 637250003Sadrian#define AR_PHY_AIC_RADIO_DELAY 0x7F000000 638250003Sadrian#define AR_PHY_AIC_RADIO_DELAY_S 24 639250003Sadrian#define AR_PHY_AIC_CAL_STEP_SIZE_CORR 0x00F00000 640250003Sadrian#define AR_PHY_AIC_CAL_STEP_SIZE_CORR_S 20 641250003Sadrian#define AR_PHY_AIC_CAL_ROT_IDX_CORR 0x000F8000 642250003Sadrian#define AR_PHY_AIC_CAL_ROT_IDX_CORR_S 15 643250003Sadrian#define AR_PHY_AIC_CAL_CONV_CHECK_FACTOR 0x00006000 644250003Sadrian#define AR_PHY_AIC_CAL_CONV_CHECK_FACTOR_S 13 645250003Sadrian#define AR_PHY_AIC_ROT_IDX_COUNT_MAX 0x00001C00 646250003Sadrian#define AR_PHY_AIC_ROT_IDX_COUNT_MAX_S 10 647250003Sadrian#define AR_PHY_AIC_CAL_SYNTH_TOGGLE 0x00000200 648250003Sadrian#define AR_PHY_AIC_CAL_SYNTH_TOGGLE_S 9 649250003Sadrian#define AR_PHY_AIC_CAL_SYNTH_AFTER_BTRX 0x00000100 650250003Sadrian#define AR_PHY_AIC_CAL_SYNTH_AFTER_BTRX_S 8 651250003Sadrian#define AR_PHY_AIC_CAL_SYNTH_SETTLING 0x000000FF 652250003Sadrian#define AR_PHY_AIC_CAL_SYNTH_SETTLING_S 0 653250003Sadrian#define AR_PHY_AIC_MON_MAX_HOP_COUNT 0x0FE00000 654250003Sadrian#define AR_PHY_AIC_MON_MAX_HOP_COUNT_S 21 655250003Sadrian#define AR_PHY_AIC_MON_MIN_STALE_COUNT 0x001FC000 656250003Sadrian#define AR_PHY_AIC_MON_MIN_STALE_COUNT_S 14 657250003Sadrian#define AR_PHY_AIC_MON_PWR_EST_LONG 0x00002000 658250003Sadrian#define AR_PHY_AIC_MON_PWR_EST_LONG_S 13 659250003Sadrian#define AR_PHY_AIC_MON_PD_TALLY_SCALING 0x00001800 660250003Sadrian#define AR_PHY_AIC_MON_PD_TALLY_SCALING_S 11 661250003Sadrian#define AR_PHY_AIC_MON_PERF_THR 0x000007C0 662250003Sadrian#define AR_PHY_AIC_MON_PERF_THR_S 6 663250003Sadrian#define AR_PHY_AIC_CAL_COM_ATT_DB_FIXED 0x00000020 664250003Sadrian#define AR_PHY_AIC_CAL_COM_ATT_DB_FIXED_S 5 665250003Sadrian#define AR_PHY_AIC_CAL_TARGET_MAG_SETTING 0x00000018 666250003Sadrian#define AR_PHY_AIC_CAL_TARGET_MAG_SETTING_S 3 667250003Sadrian#define AR_PHY_AIC_CAL_PERF_CHECK_FACTOR 0x00000006 668250003Sadrian#define AR_PHY_AIC_CAL_PERF_CHECK_FACTOR_S 1 669250003Sadrian#define AR_PHY_AIC_CAL_PWR_EST_LONG 0x00000001 670250003Sadrian#define AR_PHY_AIC_CAL_PWR_EST_LONG_S 0 671250003Sadrian#define AR_PHY_AIC_MON_DONE 0x80000000 672250003Sadrian#define AR_PHY_AIC_MON_DONE_S 31 673250003Sadrian#define AR_PHY_AIC_MON_ACTIVE 0x40000000 674250003Sadrian#define AR_PHY_AIC_MON_ACTIVE_S 30 675250003Sadrian#define AR_PHY_AIC_MEAS_COUNT 0x3F000000 676250003Sadrian#define AR_PHY_AIC_MEAS_COUNT_S 24 677250003Sadrian#define AR_PHY_AIC_CAL_ANT_ISO_EST 0x00FC0000 678250003Sadrian#define AR_PHY_AIC_CAL_ANT_ISO_EST_S 18 679250003Sadrian#define AR_PHY_AIC_CAL_HOP_COUNT 0x0003F800 680250003Sadrian#define AR_PHY_AIC_CAL_HOP_COUNT_S 11 681250003Sadrian#define AR_PHY_AIC_CAL_VALID_COUNT 0x000007F0 682250003Sadrian#define AR_PHY_AIC_CAL_VALID_COUNT_S 4 683250003Sadrian#define AR_PHY_AIC_CAL_BT_TOO_WEAK_ERR 0x00000008 684250003Sadrian#define AR_PHY_AIC_CAL_BT_TOO_WEAK_ERR_S 3 685250003Sadrian#define AR_PHY_AIC_CAL_BT_TOO_STRONG_ERR 0x00000004 686250003Sadrian#define AR_PHY_AIC_CAL_BT_TOO_STRONG_ERR_S 2 687250003Sadrian#define AR_PHY_AIC_CAL_DONE 0x00000002 688250003Sadrian#define AR_PHY_AIC_CAL_DONE_S 1 689250003Sadrian#define AR_PHY_AIC_CAL_ACTIVE 0x00000001 690250003Sadrian#define AR_PHY_AIC_CAL_ACTIVE_S 0 691250003Sadrian#define AR_PHY_AIC_MEAS_MAG_MIN 0xFFC00000 692250003Sadrian#define AR_PHY_AIC_MEAS_MAG_MIN_S 22 693250003Sadrian#define AR_PHY_AIC_MON_STALE_COUNT 0x003F8000 694250003Sadrian#define AR_PHY_AIC_MON_STALE_COUNT_S 15 695250003Sadrian#define AR_PHY_AIC_MON_HOP_COUNT 0x00007F00 696250003Sadrian#define AR_PHY_AIC_MON_HOP_COUNT_S 8 697250003Sadrian#define AR_PHY_AIC_CAL_AIC_SM 0x000000F8 698250003Sadrian#define AR_PHY_AIC_CAL_AIC_SM_S 3 699250003Sadrian#define AR_PHY_AIC_SM 0x00000007 700250003Sadrian#define AR_PHY_AIC_SM_S 0 701250003Sadrian#define AR_PHY_AIC_SRAM_VALID 0x00000001 702250003Sadrian#define AR_PHY_AIC_SRAM_VALID_S 0 703250003Sadrian#define AR_PHY_AIC_SRAM_ROT_QUAD_ATT_DB 0x0000007E 704250003Sadrian#define AR_PHY_AIC_SRAM_ROT_QUAD_ATT_DB_S 1 705250003Sadrian#define AR_PHY_AIC_SRAM_VGA_QUAD_SIGN 0x00000080 706250003Sadrian#define AR_PHY_AIC_SRAM_VGA_QUAD_SIGN_S 7 707250003Sadrian#define AR_PHY_AIC_SRAM_ROT_DIR_ATT_DB 0x00003F00 708250003Sadrian#define AR_PHY_AIC_SRAM_ROT_DIR_ATT_DB_S 8 709250003Sadrian#define AR_PHY_AIC_SRAM_VGA_DIR_SIGN 0x00004000 710250003Sadrian#define AR_PHY_AIC_SRAM_VGA_DIR_SIGN_S 14 711250003Sadrian#define AR_PHY_AIC_SRAM_COM_ATT_6DB 0x00038000 712250003Sadrian#define AR_PHY_AIC_SRAM_COM_ATT_6DB_S 15 713250003Sadrian 714250003Sadrian#define AR_PHY_FRAME_CTL_CF_OVERLAP_WINDOW 3 715250003Sadrian#define AR_PHY_FRAME_CTL_CF_OVERLAP_WINDOW_S 0 716250003Sadrian 717250003Sadrian/* BB_cl_tab_bx */ 718250003Sadrian#define AR_PHY_CL_TAB_CARR_LK_DC_ADD_I 0x07FF0000 719250003Sadrian#define AR_PHY_CL_TAB_CARR_LK_DC_ADD_I_S 16 720250003Sadrian#define AR_PHY_CL_TAB_CARR_LK_DC_ADD_Q 0x0000FFE0 721250003Sadrian#define AR_PHY_CL_TAB_CARR_LK_DC_ADD_Q_S 5 722250003Sadrian#define AR_PHY_CL_TAB_GAIN_MOD 0x0000001F 723250003Sadrian#define AR_PHY_CL_TAB_GAIN_MOD_S 0 724250003Sadrian 725250003Sadrian/* BB_vit_spur_mask_A fields */ 726250003Sadrian#define AR_PHY_SPUR_MASK_A_CF_PUNC_MASK_IDX_A 0x0001FC00 727250003Sadrian#define AR_PHY_SPUR_MASK_A_CF_PUNC_MASK_IDX_A_S 10 728250003Sadrian#define AR_PHY_SPUR_MASK_A_CF_PUNC_MASK_A 0x3FF 729250003Sadrian#define AR_PHY_SPUR_MASK_A_CF_PUNC_MASK_A_S 0 730250003Sadrian 731250003Sadrian/* enable_flt_svd*/ 732250003Sadrian#define AR_PHY_ENABLE_FLT_SVD 0x00001000 733250003Sadrian#define AR_PHY_ENABLE_FLT_SVD_S 12 734250003Sadrian 735250003Sadrian#define AR_PHY_TEST AR_SM_OFFSET(BB_test_controls) 736250003Sadrian 737250003Sadrian#define AR_PHY_TEST_BBB_OBS_SEL 0x780000 738250003Sadrian#define AR_PHY_TEST_BBB_OBS_SEL_S 19 /* bits 19 to 22 are cf_bbb_obs_sel*/ 739250003Sadrian 740250003Sadrian#define AR_PHY_TEST_RX_OBS_SEL_BIT5_S 23 741250003Sadrian#define AR_PHY_TEST_RX_OBS_SEL_BIT5 (1 << AR_PHY_TEST_RX_OBS_SEL_BIT5_S)// This is bit 5 for cf_rx_obs_sel 742250003Sadrian 743250003Sadrian#define AR_PHY_TEST_CHAIN_SEL 0xC0000000 744250003Sadrian#define AR_PHY_TEST_CHAIN_SEL_S 30 /*bits 30 and 31 are tstdac_out_sel which selects which chain to drive out*/ 745250003Sadrian 746250003Sadrian#define AR_PHY_TEST_CTL_STATUS AR_SM_OFFSET(BB_test_controls_status) 747250003Sadrian#define AR_PHY_TEST_CTL_TSTDAC_EN 0x1 748250003Sadrian#define AR_PHY_TEST_CTL_TSTDAC_EN_S 0 /*cf_tstdac_en, driver to tstdac bus, 0=disable, 1=enable*/ 749250003Sadrian#define AR_PHY_TEST_CTL_TX_OBS_SEL 0x1C 750250003Sadrian#define AR_PHY_TEST_CTL_TX_OBS_SEL_S 2 /* cf_tx_obs_sel, bits 2:4*/ 751250003Sadrian#define AR_PHY_TEST_CTL_TX_OBS_MUX_SEL 0x60 752250003Sadrian#define AR_PHY_TEST_CTL_TX_OBS_MUX_SEL_S 5 /* cf_tx_obs_sel, bits 5:6, setting to 11 selects ADC*/ 753250003Sadrian#define AR_PHY_TEST_CTL_TSTADC_EN 0x100 754250003Sadrian#define AR_PHY_TEST_CTL_TSTADC_EN_S 8 /*cf_tstadc_en, driver to tstadc bus, 0=disable, 1=enable*/ 755250003Sadrian#define AR_PHY_TEST_CTL_RX_OBS_SEL 0x3C00 756250003Sadrian#define AR_PHY_TEST_CTL_RX_OBS_SEL_S 10 /* cf_tx_obs_sel, bits 10:13*/ 757250003Sadrian#define AR_PHY_TEST_CTL_DEBUGPORT_SEL 0xe0000000 758250003Sadrian#define AR_PHY_TEST_CTL_DEBUGPORT_SEL_S 29 759250003Sadrian 760250003Sadrian 761250003Sadrian#define AR_PHY_TSTDAC AR_SM_OFFSET(BB_tstdac) 762250003Sadrian 763250003Sadrian#define AR_PHY_CHAN_STATUS AR_SM_OFFSET(BB_channel_status) 764250003Sadrian#define AR_PHY_CHAN_INFO_MEMORY AR_SM_OFFSET(BB_chaninfo_ctrl) 765250003Sadrian#define AR_PHY_CHNINFO_NOISEPWR AR_SM_OFFSET(BB_chan_info_noise_pwr) 766250003Sadrian#define AR_PHY_CHNINFO_GAINDIFF AR_SM_OFFSET(BB_chan_info_gain_diff) 767250003Sadrian#define AR_PHY_CHNINFO_FINETIM AR_SM_OFFSET(BB_chan_info_fine_timing) 768250003Sadrian#define AR_PHY_CHAN_INFO_GAIN_0 AR_SM_OFFSET(BB_chan_info_gain_b0) 769250003Sadrian#define AR_PHY_SCRAMBLER_SEED AR_SM_OFFSET(BB_scrambler_seed) 770250003Sadrian#define AR_PHY_CCK_TX_CTRL AR_SM_OFFSET(BB_bbb_tx_ctrl) 771250003Sadrian 772250003Sadrian#define AR_PHY_TX_FIR(_i) AR_SM_OFFSET(BB_bbb_txfir_##_i) 773250003Sadrian 774250003Sadrian#define AR_PHY_HEAVYCLIP_CTL AR_SM_OFFSET(BB_heavy_clip_ctrl) 775250003Sadrian#define AR_PHY_HEAVYCLIP_20 AR_SM_OFFSET(BB_heavy_clip_20) 776250003Sadrian#define AR_PHY_HEAVYCLIP_40 AR_SM_OFFSET(BB_heavy_clip_40) 777250003Sadrian#define AR_PHY_ILLEGAL_TXRATE AR_SM_OFFSET(BB_illegal_tx_rate) 778250003Sadrian 779250003Sadrian#define AR_PHY_POWER_TX_RATE(_i) AR_SM_OFFSET(BB_powertx_rate##_i) 780250003Sadrian 781250003Sadrian#define AR_PHY_PWRTX_MAX AR_SM_OFFSET(BB_powertx_max) /* TPC register */ 782250003Sadrian#define AR_PHY_PWRTX_MAX_TPC_ENABLE 0x00000040 783250003Sadrian#define AR_PHY_POWER_TX_SUB AR_SM_OFFSET(BB_powertx_sub) 784250003Sadrian#define AR_PHY_PER_PACKET_POWERTX_MAX 0x00000040 785250003Sadrian#define AR_PHY_PER_PACKET_POWERTX_MAX_S 6 786250003Sadrian#define AR_PHY_POWER_TX_SUB_2_DISABLE 0xFFFFFFC0 /* 2 chain */ 787250003Sadrian#define AR_PHY_POWER_TX_SUB_3_DISABLE 0xFFFFF000 /* 3 chain */ 788250003Sadrian 789250003Sadrian#define AR_PHY_TPC(_i) AR_SM_OFFSET(BB_tpc_##_i) /* values 1-3, 7-10 and 12-15 */ 790250003Sadrian#define AR_PHY_TPC_4_B0 AR_SM_OFFSET(BB_tpc_4_b0) 791250003Sadrian#define AR_PHY_TPC_5_B0 AR_SM_OFFSET(BB_tpc_5_b0) 792250003Sadrian#define AR_PHY_TPC_6_B0 AR_SM_OFFSET(BB_tpc_6_b0) 793250003Sadrian#define AR_PHY_TPC_18 AR_SM_OFFSET(BB_tpc_18) 794250003Sadrian#define AR_PHY_TPC_19 AR_SM_OFFSET(BB_tpc_19) 795250003Sadrian 796250003Sadrian#define AR_PHY_TX_FORCED_GAIN AR_SM_OFFSET(BB_tx_forced_gain) 797250003Sadrian 798250003Sadrian#define AR_PHY_PDADC_TAB_0 AR_SM_OFFSET(BB_pdadc_tab_b0) 799250003Sadrian 800250003Sadrian#define AR_PHY_RTT_CTRL AR_SM_OFFSET(overlay_0xa580.Jupiter_20.BB_rtt_ctrl) 801250003Sadrian#define AR_PHY_RTT_TABLE_SW_INTF_B0 AR_SM_OFFSET(overlay_0xa580.Jupiter_20.BB_rtt_table_sw_intf_b0) 802250003Sadrian#define AR_PHY_RTT_TABLE_SW_INTF_1_B0 AR_SM_OFFSET(overlay_0xa580.Jupiter_20.BB_rtt_table_sw_intf_1_b0) 803250003Sadrian 804250003Sadrian#define AR_PHY_TX_IQCAL_CONTROL_0(_ah) \ 805250003Sadrian (AR_SREV_POSEIDON(_ah) ? \ 806250003Sadrian AR_SM_OFFSET(overlay_0xa580.Poseidon.BB_txiqcal_control_0) : \ 807250003Sadrian AR_SM_OFFSET(overlay_0xa580.Osprey.BB_txiqcal_control_0)) 808250003Sadrian 809250003Sadrian#define AR_PHY_TX_IQCAL_CONTROL_1(_ah) \ 810250003Sadrian (AR_SREV_POSEIDON(_ah) ? \ 811250003Sadrian AR_SM_OFFSET(overlay_0xa580.Poseidon.BB_txiqcal_control_1) : \ 812250003Sadrian AR_SM_OFFSET(overlay_0xa580.Osprey.BB_txiqcal_control_1)) 813250003Sadrian 814250003Sadrian#define AR_PHY_TX_IQCAL_START(_ah) \ 815250003Sadrian (AR_SREV_POSEIDON(_ah) ? \ 816250003Sadrian AR_SM_OFFSET(overlay_0xa580.Poseidon.BB_txiqcal_control_0) : \ 817250003Sadrian AR_SM_OFFSET(overlay_0xa580.Osprey.BB_txiqcal_start)) 818250003Sadrian 819250003Sadrian#define AR_PHY_TX_IQCAL_STATUS_B0(_ah) \ 820250003Sadrian (AR_SREV_POSEIDON(_ah) ? \ 821250003Sadrian AR_SM_OFFSET(overlay_0xa580.Poseidon.BB_txiqcal_status_b0) : \ 822250003Sadrian AR_SM_OFFSET(overlay_0xa580.Osprey.BB_txiqcal_status_b0)) 823250003Sadrian 824250003Sadrian#define AR_PHY_TX_IQCAL_CORR_COEFF_01_B0 AR_SM_OFFSET(overlay_0xa580.Osprey.BB_txiq_corr_coeff_01_b0) 825250003Sadrian#define AR_PHY_TX_IQCAL_CORR_COEFF_23_B0 AR_SM_OFFSET(overlay_0xa580.Osprey.BB_txiq_corr_coeff_23_b0) 826250003Sadrian#define AR_PHY_TX_IQCAL_CORR_COEFF_45_B0 AR_SM_OFFSET(overlay_0xa580.Osprey.BB_txiq_corr_coeff_45_b0) 827250003Sadrian#define AR_PHY_TX_IQCAL_CORR_COEFF_67_B0 AR_SM_OFFSET(overlay_0xa580.Osprey.BB_txiq_corr_coeff_67_b0) 828250003Sadrian 829250003Sadrian#define AR_PHY_TX_IQCAL_CORR_COEFF_01_B0_POSEIDON AR_SM_OFFSET(overlay_0xa580.Poseidon.BB_txiq_corr_coeff_01_b0) 830250003Sadrian#define AR_PHY_TX_IQCAL_CORR_COEFF_23_B0_POSEIDON AR_SM_OFFSET(overlay_0xa580.Poseidon.BB_txiq_corr_coeff_23_b0) 831250003Sadrian#define AR_PHY_TX_IQCAL_CORR_COEFF_45_B0_POSEIDON AR_SM_OFFSET(overlay_0xa580.Poseidon.BB_txiq_corr_coeff_45_b0) 832250003Sadrian#define AR_PHY_TX_IQCAL_CORR_COEFF_67_B0_POSEIDON AR_SM_OFFSET(overlay_0xa580.Poseidon.BB_txiq_corr_coeff_67_b0) 833250003Sadrian 834250003Sadrian#define AR_PHY_TXGAIN_TAB(_i) AR_SM_OFFSET(BB_tx_gain_tab_##_i) /* values 1-22 */ 835250003Sadrian#define AR_PHY_TXGAIN_TAB_PAL(_i) AR_SM_OFFSET(BB_tx_gain_tab_pal_##_i) /* values 1-22 */ 836250003Sadrian#define AR_PHY_PANIC_WD_STATUS AR_SM_OFFSET(BB_panic_watchdog_status) 837250003Sadrian#define AR_PHY_PANIC_WD_CTL_1 AR_SM_OFFSET(BB_panic_watchdog_ctrl_1) 838250003Sadrian#define AR_PHY_PANIC_WD_CTL_2 AR_SM_OFFSET(BB_panic_watchdog_ctrl_2) 839250003Sadrian#define AR_PHY_BT_CTL AR_SM_OFFSET(BB_bluetooth_cntl) 840250003Sadrian#define AR_PHY_ONLY_WARMRESET AR_SM_OFFSET(BB_phyonly_warm_reset) 841250003Sadrian#define AR_PHY_ONLY_CTL AR_SM_OFFSET(BB_phyonly_control) 842250003Sadrian#define AR_PHY_ECO_CTRL AR_SM_OFFSET(BB_eco_ctrl) 843250003Sadrian#define AR_PHY_BB_THERM_ADC_1 AR_SM_OFFSET(BB_therm_adc_1) 844250003Sadrian#define AR_PHY_BB_THERM_ADC_4 AR_SM_OFFSET(BB_therm_adc_4) 845250003Sadrian 846250003Sadrian#define AR_PHY_65NM(_field) offsetof(struct radio65_reg, _field) 847250003Sadrian#define AR_PHY_65NM_CH0_TXRF1 AR_PHY_65NM(ch0_TXRF1) 848250003Sadrian#define AR_PHY_65NM_CH0_TXRF2 AR_PHY_65NM(ch0_TXRF2) 849250003Sadrian#define AR_PHY_65NM_CH0_TXRF2_DB2G 0x07000000 850250003Sadrian#define AR_PHY_65NM_CH0_TXRF2_DB2G_S 24 851250003Sadrian#define AR_PHY_65NM_CH0_TXRF2_OB2G_CCK 0x00E00000 852250003Sadrian#define AR_PHY_65NM_CH0_TXRF2_OB2G_CCK_S 21 853250003Sadrian#define AR_PHY_65NM_CH0_TXRF2_OB2G_PSK 0x001C0000 854250003Sadrian#define AR_PHY_65NM_CH0_TXRF2_OB2G_PSK_S 18 855250003Sadrian#define AR_PHY_65NM_CH0_TXRF2_OB2G_QAM 0x00038000 856250003Sadrian#define AR_PHY_65NM_CH0_TXRF2_OB2G_QAM_S 15 857250003Sadrian#define AR_PHY_65NM_CH0_TXRF3 AR_PHY_65NM(ch0_TXRF3) 858250003Sadrian#define AR_PHY_65NM_CH0_TXRF3_CAPDIV2G 0x0000001E 859250003Sadrian#define AR_PHY_65NM_CH0_TXRF3_CAPDIV2G_S 1 860250003Sadrian#define AR_PHY_65NM_CH0_TXRF3_OLD_PAL_SPARE 0x00000001 861250003Sadrian#define AR_PHY_65NM_CH0_TXRF3_OLD_PAL_SPARE_S 0 862250003Sadrian#define AR_PHY_65NM_CH1_TXRF1 AR_PHY_65NM(ch1_TXRF1) 863250003Sadrian#define AR_PHY_65NM_CH1_TXRF2 AR_PHY_65NM(ch1_TXRF2) 864250003Sadrian#define AR_PHY_65NM_CH1_TXRF3 AR_PHY_65NM(ch1_TXRF3) 865250003Sadrian#define AR_PHY_65NM_CH2_TXRF1 AR_PHY_65NM(ch2_TXRF1) 866250003Sadrian#define AR_PHY_65NM_CH2_TXRF2 AR_PHY_65NM(ch2_TXRF2) 867250003Sadrian#define AR_PHY_65NM_CH2_TXRF3 AR_PHY_65NM(ch2_TXRF3) 868250003Sadrian 869250003Sadrian#define AR_PHY_65NM_CH0_SYNTH4 AR_PHY_65NM(ch0_SYNTH4) 870250003Sadrian#define AR_PHY_SYNTH4_LONG_SHIFT_SELECT 0x00000002 871250003Sadrian#define AR_PHY_SYNTH4_LONG_SHIFT_SELECT_S 1 872250003Sadrian#define AR_PHY_65NM_CH0_SYNTH7 AR_PHY_65NM(ch0_SYNTH7) 873250003Sadrian#define AR_PHY_65NM_CH0_BIAS1 AR_PHY_65NM(ch0_BIAS1) 874250003Sadrian#define AR_PHY_65NM_CH0_BIAS2 AR_PHY_65NM(ch0_BIAS2) 875250003Sadrian#define AR_PHY_65NM_CH0_BIAS4 AR_PHY_65NM(ch0_BIAS4) 876250003Sadrian#define AR_PHY_65NM_CH0_RXTX4 AR_PHY_65NM(ch0_RXTX4) 877250003Sadrian#define AR_PHY_65NM_CH0_SYNTH12 AR_PHY_65NM(ch0_SYNTH12) 878250003Sadrian#define AR_PHY_65NM_CH0_SYNTH12_VREFMUL3 0x00780000 879250003Sadrian#define AR_PHY_65NM_CH0_SYNTH12_VREFMUL3_S 19 880250003Sadrian#define AR_PHY_65NM_CH1_RXTX4 AR_PHY_65NM(ch1_RXTX4) 881250003Sadrian#define AR_PHY_65NM_CH2_RXTX4 AR_PHY_65NM(ch2_RXTX4) 882250003Sadrian#define AR_PHY_65NM_RXTX4_XLNA_BIAS 0xC0000000 883250003Sadrian#define AR_PHY_65NM_RXTX4_XLNA_BIAS_S 30 884250003Sadrian 885250003Sadrian#define AR_PHY_65NM_CH0_TOP AR_PHY_65NM(overlay_0x16180.Osprey.ch0_TOP) 886250003Sadrian#define AR_PHY_65NM_CH0_TOP_JUPITER AR_PHY_65NM(overlay_0x16180.Jupiter.ch0_TOP1) 887250003Sadrian#define AR_PHY_65NM_CH0_TOP_XPABIASLVL 0x00000300 888250003Sadrian#define AR_PHY_65NM_CH0_TOP_XPABIASLVL_S 8 889250003Sadrian#define AR_PHY_65NM_CH0_TOP2 AR_PHY_65NM(overlay_0x16180.Osprey.ch0_TOP2) 890250003Sadrian 891250003Sadrian#define AR_OSPREY_CH0_XTAL AR_PHY_65NM(overlay_0x16180.Osprey.ch0_XTAL) 892250003Sadrian#define AR_OSPREY_CHO_XTAL_CAPINDAC 0x7F000000 893250003Sadrian#define AR_OSPREY_CHO_XTAL_CAPINDAC_S 24 894250003Sadrian#define AR_OSPREY_CHO_XTAL_CAPOUTDAC 0x00FE0000 895250003Sadrian#define AR_OSPREY_CHO_XTAL_CAPOUTDAC_S 17 896250003Sadrian 897250003Sadrian#define AR_PHY_65NM_CH0_THERM AR_PHY_65NM(overlay_0x16180.Osprey.ch0_THERM) 898250003Sadrian#define AR_PHY_65NM_CH0_THERM_JUPITER AR_PHY_65NM(overlay_0x16180.Jupiter.ch0_THERM) 899250003Sadrian 900250003Sadrian#define AR_PHY_65NM_CH0_THERM_XPABIASLVL_MSB 0x00000003 901250003Sadrian#define AR_PHY_65NM_CH0_THERM_XPABIASLVL_MSB_S 0 902250003Sadrian#define AR_PHY_65NM_CH0_THERM_XPASHORT2GND 0x00000004 903250003Sadrian#define AR_PHY_65NM_CH0_THERM_XPASHORT2GND_S 2 904250003Sadrian#define AR_PHY_65NM_CH0_THERM_SAR_ADC_OUT 0x0000ff00 905250003Sadrian#define AR_PHY_65NM_CH0_THERM_SAR_ADC_OUT_S 8 906250003Sadrian#define AR_PHY_65NM_CH0_THERM_START 0x20000000 907250003Sadrian#define AR_PHY_65NM_CH0_THERM_START_S 29 908250003Sadrian#define AR_PHY_65NM_CH0_THERM_LOCAL 0x80000000 909250003Sadrian#define AR_PHY_65NM_CH0_THERM_LOCAL_S 31 910250003Sadrian 911250003Sadrian#define AR_PHY_65NM_CH0_RXTX1 AR_PHY_65NM(ch0_RXTX1) 912250003Sadrian#define AR_PHY_65NM_CH0_RXTX2 AR_PHY_65NM(ch0_RXTX2) 913250003Sadrian#define AR_PHY_65NM_CH0_RXTX2_SYNTHON_MASK 0x00000004 914250003Sadrian#define AR_PHY_65NM_CH0_RXTX2_SYNTHON_MASK_S 2 915250003Sadrian#define AR_PHY_65NM_CH0_RXTX2_SYNTHOVR_MASK 0x00000008 916250003Sadrian#define AR_PHY_65NM_CH0_RXTX2_SYNTHOVR_MASK_S 3 917250003Sadrian#define AR_PHY_65NM_CH0_RXTX3 AR_PHY_65NM(ch0_RXTX3) 918250003Sadrian#define AR_PHY_65NM_CH1_RXTX1 AR_PHY_65NM(ch1_RXTX1) 919250003Sadrian#define AR_PHY_65NM_CH1_RXTX2 AR_PHY_65NM(ch1_RXTX2) 920250003Sadrian#define AR_PHY_65NM_CH1_RXTX3 AR_PHY_65NM(ch1_RXTX3) 921250003Sadrian#define AR_PHY_65NM_CH2_RXTX1 AR_PHY_65NM(ch2_RXTX1) 922250003Sadrian#define AR_PHY_65NM_CH2_RXTX2 AR_PHY_65NM(ch2_RXTX2) 923250003Sadrian#define AR_PHY_65NM_CH2_RXTX3 AR_PHY_65NM(ch2_RXTX3) 924250003Sadrian 925250003Sadrian#define AR_PHY_65NM_CH0_BB1 AR_PHY_65NM(ch0_BB1) 926250003Sadrian#define AR_PHY_65NM_CH0_BB2 AR_PHY_65NM(ch0_BB2) 927250003Sadrian#define AR_PHY_65NM_CH0_BB3 AR_PHY_65NM(ch0_BB3) 928250003Sadrian#define AR_PHY_65NM_CH1_BB1 AR_PHY_65NM(ch1_BB1) 929250003Sadrian#define AR_PHY_65NM_CH1_BB2 AR_PHY_65NM(ch1_BB2) 930250003Sadrian#define AR_PHY_65NM_CH1_BB3 AR_PHY_65NM(ch1_BB3) 931250003Sadrian#define AR_PHY_65NM_CH2_BB1 AR_PHY_65NM(ch2_BB1) 932250003Sadrian#define AR_PHY_65NM_CH2_BB2 AR_PHY_65NM(ch2_BB2) 933250003Sadrian#define AR_PHY_CH_BB3_SEL_OFST_READBK 0x00000300 934250003Sadrian#define AR_PHY_CH_BB3_SEL_OFST_READBK_S 8 935250003Sadrian#define AR_PHY_CH_BB3_OFSTCORRI2VQ 0x03e00000 936250003Sadrian#define AR_PHY_CH_BB3_OFSTCORRI2VQ_S 21 937250003Sadrian#define AR_PHY_CH_BB3_OFSTCORRI2VI 0x7c000000 938250003Sadrian#define AR_PHY_CH_BB3_OFSTCORRI2VI_S 26 939250003Sadrian 940250003Sadrian#define AR_PHY_RX1DB_BIQUAD_LONG_SHIFT 0x00380000 941250003Sadrian#define AR_PHY_RX1DB_BIQUAD_LONG_SHIFT_S 19 942250003Sadrian#define AR_PHY_RX6DB_BIQUAD_LONG_SHIFT 0x00c00000 943250003Sadrian#define AR_PHY_RX6DB_BIQUAD_LONG_SHIFT_S 22 944250003Sadrian#define AR_PHY_LNAGAIN_LONG_SHIFT 0xe0000000 945250003Sadrian#define AR_PHY_LNAGAIN_LONG_SHIFT_S 29 946250003Sadrian#define AR_PHY_MXRGAIN_LONG_SHIFT 0x03000000 947250003Sadrian#define AR_PHY_MXRGAIN_LONG_SHIFT_S 24 948250003Sadrian#define AR_PHY_VGAGAIN_LONG_SHIFT 0x1c000000 949250003Sadrian#define AR_PHY_VGAGAIN_LONG_SHIFT_S 26 950250003Sadrian#define AR_PHY_SCFIR_GAIN_LONG_SHIFT 0x00000001 951250003Sadrian#define AR_PHY_SCFIR_GAIN_LONG_SHIFT_S 0 952250003Sadrian#define AR_PHY_MANRXGAIN_LONG_SHIFT 0x00000002 953250003Sadrian#define AR_PHY_MANRXGAIN_LONG_SHIFT_S 1 954250003Sadrian#define AR_PHY_MANTXGAIN_LONG_SHIFT 0x80000000 955250003Sadrian#define AR_PHY_MANTXGAIN_LONG_SHIFT_S 31 956250003Sadrian 957250003Sadrian/* 958250003Sadrian * SM Field Definitions 959250003Sadrian */ 960250003Sadrian 961250003Sadrian/* BB_cl_cal_ctrl - AR_PHY_CL_CAL_CTL */ 962250003Sadrian#define AR_PHY_CL_CAL_ENABLE 0x00000002 /* do carrier leak calibration after agc_calibrate_done */ 963250003Sadrian#define AR_PHY_PARALLEL_CAL_ENABLE 0x00000001 964250003Sadrian#define AR_PHY_TPCRG1_PD_CAL_ENABLE 0x00400000 965250003Sadrian#define AR_PHY_TPCRG1_PD_CAL_ENABLE_S 22 966250003Sadrian#define AR_PHY_CL_MAP_HW_GEN 0x80000000 967250003Sadrian#define AR_PHY_CL_MAP_HW_GEN_S 31 968250003Sadrian 969250003Sadrian/* BB_addac_parallel_control - AR_PHY_ADDAC_PARA_CTL */ 970250003Sadrian#define AR_PHY_ADDAC_PARACTL_OFF_PWDADC 0x00008000 971250003Sadrian 972250003Sadrian/* BB_fcal_2_b0 - AR_PHY_FCAL_2_0 */ 973250003Sadrian#define AR_PHY_FCAL20_CAP_STATUS_0 0x01f00000 974250003Sadrian#define AR_PHY_FCAL20_CAP_STATUS_0_S 20 975250003Sadrian 976250003Sadrian/* BB_rfbus_request */ 977250003Sadrian#define AR_PHY_RFBUS_REQ_EN 0x00000001 /* request for RF bus */ 978250003Sadrian/* BB_rfbus_grant */ 979250003Sadrian#define AR_PHY_RFBUS_GRANT_EN 0x00000001 /* RF bus granted */ 980250003Sadrian/* BB_gen_controls */ 981250003Sadrian#define AR_PHY_GC_TURBO_MODE 0x00000001 /* set turbo mode bits */ 982250003Sadrian#define AR_PHY_GC_TURBO_SHORT 0x00000002 /* set short symbols to turbo mode setting */ 983250003Sadrian#define AR_PHY_GC_DYN2040_EN 0x00000004 /* enable dyn 20/40 mode */ 984250003Sadrian#define AR_PHY_GC_DYN2040_PRI_ONLY 0x00000008 /* dyn 20/40 - primary only */ 985250003Sadrian#define AR_PHY_GC_DYN2040_PRI_CH 0x00000010 /* dyn 20/40 - primary ch offset (0=+10MHz, 1=-10MHz)*/ 986250003Sadrian#define AR_PHY_GC_DYN2040_PRI_CH_S 4 987250003Sadrian 988250003Sadrian#define AR_PHY_GC_DYN2040_EXT_CH 0x00000020 /* dyn 20/40 - ext ch spacing (0=20MHz/ 1=25MHz) */ 989250003Sadrian#define AR_PHY_GC_HT_EN 0x00000040 /* ht enable */ 990250003Sadrian#define AR_PHY_GC_SHORT_GI_40 0x00000080 /* allow short GI for HT 40 */ 991250003Sadrian#define AR_PHY_GC_WALSH 0x00000100 /* walsh spatial spreading for 2 chains,2 streams TX */ 992250003Sadrian#define AR_PHY_GC_SINGLE_HT_LTF1 0x00000200 /* single length (4us) 1st HT long training symbol */ 993250003Sadrian#define AR_PHY_GC_GF_DETECT_EN 0x00000400 /* enable Green Field detection. Only affects rx, not tx */ 994250003Sadrian#define AR_PHY_GC_ENABLE_DAC_FIFO 0x00000800 /* fifo between bb and dac */ 995250003Sadrian 996250003Sadrian#define AR_PHY_MS_HALF_RATE 0x00000020 997250003Sadrian#define AR_PHY_MS_QUARTER_RATE 0x00000040 998250003Sadrian 999250003Sadrian/* BB_analog_power_on_time */ 1000250003Sadrian#define AR_PHY_RX_DELAY_DELAY 0x00003FFF /* delay from wakeup to rx ena */ 1001250003Sadrian/* BB_agc_control */ 1002250003Sadrian#define AR_PHY_AGC_CONTROL_CAL 0x00000001 /* do internal calibration */ 1003250003Sadrian#define AR_PHY_AGC_CONTROL_NF 0x00000002 /* do noise-floor calibration */ 1004250003Sadrian#define AR_PHY_AGC_CONTROL_OFFSET_CAL 0x00000800 /* allow offset calibration */ 1005250003Sadrian#define AR_PHY_AGC_CONTROL_ENABLE_NF 0x00008000 /* enable noise floor calibration to happen */ 1006250003Sadrian#define AR_PHY_AGC_CONTROL_FLTR_CAL 0x00010000 /* allow tx filter calibration */ 1007250003Sadrian#define AR_PHY_AGC_CONTROL_NO_UPDATE_NF 0x00020000 /* don't update noise floor automatically */ 1008250003Sadrian#define AR_PHY_AGC_CONTROL_EXT_NF_PWR_MEAS 0x00040000 /* extend noise floor power measurement */ 1009250003Sadrian#define AR_PHY_AGC_CONTROL_CLC_SUCCESS 0x00080000 /* carrier leak calibration done */ 1010250003Sadrian#define AR_PHY_AGC_CONTROL_PKDET_CAL 0x00100000 /* allow peak deteter calibration */ 1011250003Sadrian 1012250003Sadrian#define AR_PHY_AGC_CONTROL_YCOK_MAX 0x000003c0 1013250003Sadrian#define AR_PHY_AGC_CONTROL_YCOK_MAX_S 6 1014250003Sadrian 1015250003Sadrian/* BB_iq_adc_cal_mode */ 1016250003Sadrian#define AR_PHY_CALMODE_IQ 0x00000000 1017250003Sadrian#define AR_PHY_CALMODE_ADC_GAIN 0x00000001 1018250003Sadrian#define AR_PHY_CALMODE_ADC_DC_PER 0x00000002 1019250003Sadrian#define AR_PHY_CALMODE_ADC_DC_INIT 0x00000003 1020250003Sadrian/* BB_analog_swap */ 1021250003Sadrian#define AR_PHY_SWAP_ALT_CHAIN 0x00000040 1022250003Sadrian/* BB_modes_select */ 1023250003Sadrian#define AR_PHY_MODE_OFDM 0x00000000 /* OFDM */ 1024250003Sadrian#define AR_PHY_MODE_CCK 0x00000001 /* CCK */ 1025250003Sadrian#define AR_PHY_MODE_DYNAMIC 0x00000004 /* dynamic CCK/OFDM mode */ 1026250003Sadrian#define AR_PHY_MODE_DYNAMIC_S 2 1027250003Sadrian#define AR_PHY_MODE_HALF 0x00000020 /* enable half rate */ 1028250003Sadrian#define AR_PHY_MODE_QUARTER 0x00000040 /* enable quarter rate */ 1029250003Sadrian#define AR_PHY_MAC_CLK_MODE 0x00000080 /* MAC runs at 128/141MHz clock */ 1030250003Sadrian#define AR_PHY_MODE_DYN_CCK_DISABLE 0x00000100 /* Disable dynamic CCK detection */ 1031250003Sadrian#define AR_PHY_MODE_SVD_HALF 0x00000200 /* enable svd half rate */ 1032250003Sadrian#define AR_PHY_MODE_DISABLE_CCK 0x00000100 1033250003Sadrian#define AR_PHY_MODE_DISABLE_CCK_S 8 1034250003Sadrian/* BB_active */ 1035250003Sadrian#define AR_PHY_ACTIVE_EN 0x00000001 /* Activate PHY chips */ 1036250003Sadrian#define AR_PHY_ACTIVE_DIS 0x00000000 /* Deactivate PHY chips */ 1037250003Sadrian/* BB_force_analog */ 1038250003Sadrian#define AR_PHY_FORCE_XPA_CFG 0x000000001 1039250003Sadrian#define AR_PHY_FORCE_XPA_CFG_S 0 1040250003Sadrian/* BB_xpa_timing_control */ 1041250003Sadrian#define AR_PHY_XPA_TIMING_CTL_TX_END_XPAB_OFF 0xFF000000 1042250003Sadrian#define AR_PHY_XPA_TIMING_CTL_TX_END_XPAB_OFF_S 24 1043250003Sadrian#define AR_PHY_XPA_TIMING_CTL_TX_END_XPAA_OFF 0x00FF0000 1044250003Sadrian#define AR_PHY_XPA_TIMING_CTL_TX_END_XPAA_OFF_S 16 1045250003Sadrian#define AR_PHY_XPA_TIMING_CTL_FRAME_XPAB_ON 0x0000FF00 1046250003Sadrian#define AR_PHY_XPA_TIMING_CTL_FRAME_XPAB_ON_S 8 1047250003Sadrian#define AR_PHY_XPA_TIMING_CTL_FRAME_XPAA_ON 0x000000FF 1048250003Sadrian#define AR_PHY_XPA_TIMING_CTL_FRAME_XPAA_ON_S 0 1049250003Sadrian/* BB_tx_timing_3 */ 1050250003Sadrian#define AR_PHY_TX_END_TO_A2_RX_ON 0x00FF0000 1051250003Sadrian#define AR_PHY_TX_END_TO_A2_RX_ON_S 16 1052250003Sadrian/* BB_tx_timing_2 */ 1053250003Sadrian#define AR_PHY_TX_END_DATA_START 0x000000FF 1054250003Sadrian#define AR_PHY_TX_END_DATA_START_S 0 1055250003Sadrian#define AR_PHY_TX_END_PA_ON 0x0000FF00 1056250003Sadrian#define AR_PHY_TX_END_PA_ON_S 8 1057250003Sadrian/* BB_tpc_5_b0 */ 1058250003Sadrian/* ar2413 power control */ 1059250003Sadrian#define AR_PHY_TPCRG5_PD_GAIN_OVERLAP 0x0000000F 1060250003Sadrian#define AR_PHY_TPCRG5_PD_GAIN_OVERLAP_S 0 1061250003Sadrian#define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_1 0x000003F0 1062250003Sadrian#define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_1_S 4 1063250003Sadrian#define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_2 0x0000FC00 1064250003Sadrian#define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_2_S 10 1065250003Sadrian#define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_3 0x003F0000 1066250003Sadrian#define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_3_S 16 1067250003Sadrian#define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_4 0x0FC00000 1068250003Sadrian#define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_4_S 22 1069250003Sadrian/* BB_tpc_1 */ 1070250003Sadrian#define AR_PHY_TPCRG1_NUM_PD_GAIN 0x0000c000 1071250003Sadrian#define AR_PHY_TPCRG1_NUM_PD_GAIN_S 14 1072250003Sadrian#define AR_PHY_TPCRG1_PD_GAIN_1 0x00030000 1073250003Sadrian#define AR_PHY_TPCRG1_PD_GAIN_1_S 16 1074250003Sadrian#define AR_PHY_TPCRG1_PD_GAIN_2 0x000C0000 1075250003Sadrian#define AR_PHY_TPCRG1_PD_GAIN_2_S 18 1076250003Sadrian#define AR_PHY_TPCRG1_PD_GAIN_3 0x00300000 1077250003Sadrian#define AR_PHY_TPCRG1_PD_GAIN_3_S 20 1078250003Sadrian#define AR_PHY_TPCGR1_FORCED_DAC_GAIN 0x0000003e 1079250003Sadrian#define AR_PHY_TPCGR1_FORCED_DAC_GAIN_S 1 1080250003Sadrian#define AR_PHY_TPCGR1_FORCE_DAC_GAIN 0x00000001 1081250003Sadrian 1082250003Sadrian/* BB_tx_forced_gain */ 1083250003Sadrian#define AR_PHY_TXGAIN_FORCE 0x00000001 1084250003Sadrian#define AR_PHY_TXGAIN_FORCE_S 0 1085250003Sadrian#define AR_PHY_TXGAIN_FORCED_PADVGNRA 0x00003c00 1086250003Sadrian#define AR_PHY_TXGAIN_FORCED_PADVGNRA_S 10 1087250003Sadrian#define AR_PHY_TXGAIN_FORCED_PADVGNRB 0x0003c000 1088250003Sadrian#define AR_PHY_TXGAIN_FORCED_PADVGNRB_S 14 1089250003Sadrian#define AR_PHY_TXGAIN_FORCED_PADVGNRC 0x003c0000 1090250003Sadrian#define AR_PHY_TXGAIN_FORCED_PADVGNRC_S 18 1091250003Sadrian#define AR_PHY_TXGAIN_FORCED_PADVGNRD 0x00c00000 1092250003Sadrian#define AR_PHY_TXGAIN_FORCED_PADVGNRD_S 22 1093250003Sadrian#define AR_PHY_TXGAIN_FORCED_TXMXRGAIN 0x000003c0 1094250003Sadrian#define AR_PHY_TXGAIN_FORCED_TXMXRGAIN_S 6 1095250003Sadrian#define AR_PHY_TXGAIN_FORCED_TXBB1DBGAIN 0x0000000e 1096250003Sadrian#define AR_PHY_TXGAIN_FORCED_TXBB1DBGAIN_S 1 1097250003Sadrian#define AR_PHY_TXGAIN_FORCED_TXBB6DBGAIN 0x00000030 1098250003Sadrian#define AR_PHY_TXGAIN_FORCED_TXBB6DBGAIN_S 4 1099250003Sadrian 1100250003Sadrian/* BB_powertx_rate1 */ 1101250003Sadrian#define AR_PHY_POWER_TX_RATE1 0x9934 1102250003Sadrian#define AR_PHY_POWER_TX_RATE2 0x9938 1103250003Sadrian#define AR_PHY_POWER_TX_RATE_MAX AR_PHY_PWRTX_MAX 1104250003Sadrian#define AR_PHY_POWER_TX_RATE_MAX_TPC_ENABLE 0x00000040 1105250003Sadrian/* BB_test_controls */ 1106250003Sadrian#define PHY_AGC_CLR 0x10000000 /* disable AGC to A2 */ 1107250003Sadrian#define RFSILENT_BB 0x00002000 /* shush bb */ 1108250003Sadrian/* BB_chan_info_gain_diff */ 1109250003Sadrian#define AR_PHY_CHAN_INFO_GAIN_DIFF_PPM_MASK 0xFFF /* PPM value is 12-bit signed integer */ 1110250003Sadrian#define AR_PHY_CHAN_INFO_GAIN_DIFF_PPM_SIGNED_BIT 0x800 /* Sign bit */ 1111250003Sadrian#define AR_PHY_CHAN_INFO_GAIN_DIFF_UPPER_LIMIT 320 /* Maximum absolute value */ 1112250003Sadrian/* BB_chaninfo_ctrl */ 1113250003Sadrian#define AR_PHY_CHAN_INFO_MEMORY_CAPTURE_MASK 0x0001 1114250003Sadrian/* BB_search_start_delay */ 1115250003Sadrian#define AR_PHY_RX_DELAY_DELAY 0x00003FFF /* delay from wakeup to rx ena */ 1116250003Sadrian/* BB_bbb_tx_ctrl */ 1117250003Sadrian#define AR_PHY_CCK_TX_CTRL_JAPAN 0x00000010 1118250003Sadrian/* BB_spectral_scan */ 1119250003Sadrian#define AR_PHY_SPECTRAL_SCAN_ENABLE 0x00000001 /* Enable spectral scan */ 1120250003Sadrian#define AR_PHY_SPECTRAL_SCAN_ENABLE_S 0 1121250003Sadrian#define AR_PHY_SPECTRAL_SCAN_ACTIVE 0x00000002 /* Activate spectral scan */ 1122250003Sadrian#define AR_PHY_SPECTRAL_SCAN_ACTIVE_S 1 1123250003Sadrian#define AR_PHY_SPECTRAL_SCAN_FFT_PERIOD 0x000000F0 /* Interval for FFT reports */ 1124250003Sadrian#define AR_PHY_SPECTRAL_SCAN_FFT_PERIOD_S 4 1125250003Sadrian#define AR_PHY_SPECTRAL_SCAN_PERIOD 0x0000FF00 /* Interval for FFT reports */ 1126250003Sadrian#define AR_PHY_SPECTRAL_SCAN_PERIOD_S 8 1127250003Sadrian#define AR_PHY_SPECTRAL_SCAN_COUNT 0x0FFF0000 /* Number of reports */ 1128250003Sadrian#define AR_PHY_SPECTRAL_SCAN_COUNT_S 16 1129250003Sadrian#define AR_PHY_SPECTRAL_SCAN_SHORT_REPEAT 0x10000000 /* Short repeat */ 1130250003Sadrian#define AR_PHY_SPECTRAL_SCAN_SHORT_REPEAT_S 28 1131250003Sadrian#define AR_PHY_SPECTRAL_SCAN_PRIORITY_HI 0x20000000 /* high priority */ 1132250003Sadrian#define AR_PHY_SPECTRAL_SCAN_PRIORITY_HI_S 29 1133250003Sadrian/* BB_channel_status */ 1134250003Sadrian#define AR_PHY_CHANNEL_STATUS_RX_CLEAR 0x00000004 1135250003Sadrian/* BB_rtt_ctrl */ 1136250003Sadrian#define AR_PHY_RTT_CTRL_ENA_RADIO_RETENTION 0x00000001 1137250003Sadrian#define AR_PHY_RTT_CTRL_ENA_RADIO_RETENTION_S 0 1138250003Sadrian#define AR_PHY_RTT_CTRL_RESTORE_MASK 0x0000007E 1139250003Sadrian#define AR_PHY_RTT_CTRL_RESTORE_MASK_S 1 1140250003Sadrian#define AR_PHY_RTT_CTRL_FORCE_RADIO_RESTORE 0x00000080 1141250003Sadrian#define AR_PHY_RTT_CTRL_FORCE_RADIO_RESTORE_S 7 1142250003Sadrian/* BB_rtt_table_sw_intf_b0 */ 1143250003Sadrian#define AR_PHY_RTT_SW_RTT_TABLE_ACCESS_0 0x00000001 1144250003Sadrian#define AR_PHY_RTT_SW_RTT_TABLE_ACCESS_0_S 0 1145250003Sadrian#define AR_PHY_RTT_SW_RTT_TABLE_WRITE_0 0x00000002 1146250003Sadrian#define AR_PHY_RTT_SW_RTT_TABLE_WRITE_0_S 1 1147250003Sadrian#define AR_PHY_RTT_SW_RTT_TABLE_ADDR_0 0x0000001C 1148250003Sadrian#define AR_PHY_RTT_SW_RTT_TABLE_ADDR_0_S 2 1149250003Sadrian/* BB_rtt_table_sw_intf_1_b0 */ 1150250003Sadrian#define AR_PHY_RTT_SW_RTT_TABLE_DATA_0 0xFFFFFFF0 1151250003Sadrian#define AR_PHY_RTT_SW_RTT_TABLE_DATA_0_S 4 1152250003Sadrian/* BB_txiqcal_control_0 */ 1153250003Sadrian#define AR_PHY_TX_IQCAL_CONTROL_0_ENABLE_TXIQ_CAL 0x80000000 1154250003Sadrian#define AR_PHY_TX_IQCAL_CONTROL_0_ENABLE_TXIQ_CAL_S 31 1155250003Sadrian/* BB_txiqcal_control_1 */ 1156250003Sadrian#define AR_PHY_TX_IQCAL_CONTROL_1_IQCORR_I_Q_COFF_DELPT 0x01fc0000 1157250003Sadrian#define AR_PHY_TX_IQCAL_CONTROL_1_IQCORR_I_Q_COFF_DELPT_S 18 1158250003Sadrian/* BB_txiqcal_start */ 1159250003Sadrian#define AR_PHY_TX_IQCAL_START_DO_CAL 0x00000001 1160250003Sadrian#define AR_PHY_TX_IQCAL_START_DO_CAL_S 0 1161250003Sadrian/* BB_txiqcal_start for Poseidon */ 1162250003Sadrian#define AR_PHY_TX_IQCAL_START_DO_CAL_POSEIDON 0x80000000 1163250003Sadrian#define AR_PHY_TX_IQCAL_START_DO_CAL_POSEIDON_S 31 1164250003Sadrian 1165250003Sadrian/* Generic B0, B1, B2 IQ Cal bit fields */ 1166250003Sadrian/* BB_txiqcal_status_b* */ 1167250003Sadrian#define AR_PHY_TX_IQCAL_STATUS_FAILED 0x00000001 1168250003Sadrian#define AR_PHY_CALIBRATED_GAINS_0_S 1 1169250003Sadrian#define AR_PHY_CALIBRATED_GAINS_0 (0x1f<<AR_PHY_CALIBRATED_GAINS_0_S) 1170250003Sadrian/* BB_txiq_corr_coeff_01_b* */ 1171250003Sadrian#define AR_PHY_TX_IQCAL_CORR_COEFF_00_COEFF_TABLE_S 0 1172250003Sadrian#define AR_PHY_TX_IQCAL_CORR_COEFF_00_COEFF_TABLE 0x00003fff 1173250003Sadrian#define AR_PHY_TX_IQCAL_CORR_COEFF_01_COEFF_TABLE_S 14 1174250003Sadrian#define AR_PHY_TX_IQCAL_CORR_COEFF_01_COEFF_TABLE (0x00003fff<<AR_PHY_TX_IQCAL_CORR_COEFF_01_COEFF_TABLE_S) 1175250003Sadrian 1176250003Sadrian/* temp compensation */ 1177250003Sadrian/* BB_tpc_18 */ 1178250003Sadrian#define AR_PHY_TPC_18_THERM_CAL_VALUE 0xff //Mask bits 7:0 1179250003Sadrian#define AR_PHY_TPC_18_THERM_CAL_VALUE_S 0 1180250003Sadrian/* BB_tpc_19 */ 1181250003Sadrian#define AR_PHY_TPC_19_ALPHA_THERM 0xff //Mask bits 7:0 1182250003Sadrian#define AR_PHY_TPC_19_ALPHA_THERM_S 0 1183250003Sadrian 1184250003Sadrian/* ch0_RXTX4 */ 1185250003Sadrian#define AR_PHY_65NM_CH0_RXTX4_THERM_ON 0x10000000 1186250003Sadrian#define AR_PHY_65NM_CH0_RXTX4_THERM_ON_S 28 1187250003Sadrian 1188250003Sadrian/* BB_therm_adc_1 */ 1189250003Sadrian#define AR_PHY_BB_THERM_ADC_1_INIT_THERM 0x000000ff 1190250003Sadrian#define AR_PHY_BB_THERM_ADC_1_INIT_THERM_S 0 1191250003Sadrian 1192250003Sadrian/* BB_therm_adc_4 */ 1193250003Sadrian#define AR_PHY_BB_THERM_ADC_4_LATEST_THERM 0x000000ff 1194250003Sadrian#define AR_PHY_BB_THERM_ADC_4_LATEST_THERM_S 0 1195250003Sadrian 1196250003Sadrian/* BB_switch_table_chn_b */ 1197250003Sadrian#define AR_PHY_SWITCH_TABLE_R0 0x00000010 1198250003Sadrian#define AR_PHY_SWITCH_TABLE_R0_S 4 1199250003Sadrian#define AR_PHY_SWITCH_TABLE_R1 0x00000040 1200250003Sadrian#define AR_PHY_SWITCH_TABLE_R1_S 6 1201250003Sadrian#define AR_PHY_SWITCH_TABLE_R12 0x00000100 1202250003Sadrian#define AR_PHY_SWITCH_TABLE_R12_S 8 1203250003Sadrian 1204250003Sadrian/* 1205250003Sadrian * Channel 1 Register Map 1206250003Sadrian */ 1207250003Sadrian#define AR_CHAN1_BASE offsetof(struct bb_reg_map, overlay_0xa800.Osprey.bb_chn1_reg_map) 1208250003Sadrian#define AR_CHAN1_OFFSET(_x) (AR_CHAN1_BASE + offsetof(struct chn1_reg_map, _x)) 1209250003Sadrian 1210250003Sadrian#define AR_PHY_TIMING4_1 AR_CHAN1_OFFSET(BB_timing_control_4_b1) 1211250003Sadrian#define AR_PHY_EXT_CCA_1 AR_CHAN1_OFFSET(BB_ext_chan_pwr_thr_2_b1) 1212250003Sadrian#define AR_PHY_TX_PHASE_RAMP_1 AR_CHAN1_OFFSET(BB_tx_phase_ramp_b1) 1213250003Sadrian#define AR_PHY_ADC_GAIN_DC_CORR_1 AR_CHAN1_OFFSET(BB_adc_gain_dc_corr_b1) 1214250003Sadrian 1215250003Sadrian#define AR_PHY_IQ_ADC_MEAS_0_B1 AR_CHAN_OFFSET(BB_iq_adc_meas_0_b1) 1216250003Sadrian#define AR_PHY_IQ_ADC_MEAS_1_B1 AR_CHAN_OFFSET(BB_iq_adc_meas_1_b1) 1217250003Sadrian#define AR_PHY_IQ_ADC_MEAS_2_B1 AR_CHAN_OFFSET(BB_iq_adc_meas_2_b1) 1218250003Sadrian#define AR_PHY_IQ_ADC_MEAS_3_B1 AR_CHAN_OFFSET(BB_iq_adc_meas_3_b1) 1219250003Sadrian 1220250003Sadrian#define AR_PHY_TX_IQ_CORR_1 AR_CHAN1_OFFSET(BB_tx_iq_corr_b1) 1221250003Sadrian#define AR_PHY_SPUR_REPORT_1 AR_CHAN1_OFFSET(BB_spur_report_b1) 1222250003Sadrian#define AR_PHY_CHAN_INFO_TAB_1 AR_CHAN1_OFFSET(BB_chan_info_chan_tab_b1) 1223250003Sadrian#define AR_PHY_RX_IQCAL_CORR_B1 AR_CHAN1_OFFSET(BB_rx_iq_corr_b1) 1224250003Sadrian 1225250003Sadrian/* 1226250003Sadrian * Channel 1 Field Definitions 1227250003Sadrian */ 1228250003Sadrian/* BB_ext_chan_pwr_thr_2_b1 */ 1229250003Sadrian#define AR_PHY_CH1_EXT_MINCCA_PWR 0x01FF0000 1230250003Sadrian#define AR_PHY_CH1_EXT_MINCCA_PWR_S 16 1231250003Sadrian 1232250003Sadrian/* 1233250003Sadrian * AGC 1 Register Map 1234250003Sadrian */ 1235250003Sadrian#define AR_AGC1_BASE offsetof(struct bb_reg_map, overlay_0xa800.Osprey.bb_agc1_reg_map) 1236250003Sadrian#define AR_AGC1_OFFSET(_x) (AR_AGC1_BASE + offsetof(struct agc1_reg_map, _x)) 1237250003Sadrian 1238250003Sadrian#define AR_PHY_FORCEMAX_GAINS_1 AR_AGC1_OFFSET(BB_gain_force_max_gains_b1) 1239250003Sadrian#define AR_PHY_GAINS_MINOFF_1 AR_AGC1_OFFSET(BB_gains_min_offsets_b1) 1240250003Sadrian#define AR_PHY_EXT_ATTEN_CTL_1 AR_AGC1_OFFSET(BB_ext_atten_switch_ctl_b1) 1241250003Sadrian#define AR_PHY_CCA_1 AR_AGC1_OFFSET(BB_cca_b1) 1242250003Sadrian#define AR_PHY_CCA_CTRL_1 AR_AGC1_OFFSET(BB_cca_ctrl_2_b1) 1243250003Sadrian#define AR_PHY_RSSI_1 AR_AGC1_OFFSET(BB_rssi_b1) 1244250003Sadrian#define AR_PHY_SPUR_CCK_REP_1 AR_AGC1_OFFSET(BB_spur_est_cck_report_b1) 1245250003Sadrian#define AR_PHY_RX_OCGAIN_2 AR_AGC1_OFFSET(BB_rx_ocgain2) 1246250003Sadrian#define AR_PHY_DIG_DC_STATUS_I_B1 AR_AGC1_OFFSET(BB_agc_dig_dc_status_i_b1) 1247250003Sadrian#define AR_PHY_DIG_DC_STATUS_Q_B1 AR_AGC1_OFFSET(BB_agc_dig_dc_status_q_b1) 1248250003Sadrian 1249250003Sadrian/* 1250250003Sadrian * AGC 1 Register Map for Poseidon 1251250003Sadrian */ 1252250003Sadrian#define AR_AGC1_BASE_POSEIDON offsetof(struct bb_reg_map, overlay_0xa800.Poseidon.bb_agc1_reg_map) 1253250003Sadrian#define AR_AGC1_OFFSET_POSEIDON(_x) (AR_AGC1_BASE_POSEIDON + offsetof(struct agc1_reg_map, _x)) 1254250003Sadrian 1255250003Sadrian#define AR_PHY_FORCEMAX_GAINS_1_POSEIDON AR_AGC1_OFFSET_POSEIDON(BB_gain_force_max_gains_b1) 1256250003Sadrian#define AR_PHY_EXT_ATTEN_CTL_1_POSEIDON AR_AGC1_OFFSET_POSEIDON(BB_ext_atten_switch_ctl_b1) 1257250003Sadrian#define AR_PHY_RSSI_1_POSEIDON AR_AGC1_OFFSET_POSEIDON(BB_rssi_b1) 1258250003Sadrian#define AR_PHY_RX_OCGAIN_2_POSEIDON AR_AGC1_OFFSET_POSEIDON(BB_rx_ocgain2) 1259250003Sadrian 1260250003Sadrian/* 1261250003Sadrian * AGC 1 Field Definitions 1262250003Sadrian */ 1263250003Sadrian/* BB_cca_b1 */ 1264250003Sadrian#define AR_PHY_CH1_MINCCA_PWR 0x1FF00000 1265250003Sadrian#define AR_PHY_CH1_MINCCA_PWR_S 20 1266250003Sadrian 1267250003Sadrian/* 1268250003Sadrian * SM 1 Register Map 1269250003Sadrian */ 1270250003Sadrian#define AR_SM1_BASE offsetof(struct bb_reg_map, overlay_0xa800.Osprey.bb_sm1_reg_map) 1271250003Sadrian#define AR_SM1_OFFSET(_x) (AR_SM1_BASE + offsetof(struct sm1_reg_map, _x)) 1272250003Sadrian 1273250003Sadrian#define AR_PHY_SWITCH_CHAIN_1 AR_SM1_OFFSET(BB_switch_table_chn_b1) 1274250003Sadrian#define AR_PHY_FCAL_2_1 AR_SM1_OFFSET(BB_fcal_2_b1) 1275250003Sadrian#define AR_PHY_DFT_TONE_CTL_1 AR_SM1_OFFSET(BB_dft_tone_ctrl_b1) 1276250003Sadrian#define AR_PHY_BBGAINMAP_0_1_1 AR_SM1_OFFSET(BB_cl_bbgain_map_0_1_b1) 1277250003Sadrian#define AR_PHY_BBGAINMAP_2_3_1 AR_SM1_OFFSET(BB_cl_bbgain_map_2_3_b1) 1278250003Sadrian#define AR_PHY_CL_TAB_1 AR_SM1_OFFSET(BB_cl_tab_b1) 1279250003Sadrian#define AR_PHY_CHAN_INFO_GAIN_1 AR_SM1_OFFSET(BB_chan_info_gain_b1) 1280250003Sadrian#define AR_PHY_TPC_4_B1 AR_SM1_OFFSET(BB_tpc_4_b1) 1281250003Sadrian#define AR_PHY_TPC_5_B1 AR_SM1_OFFSET(BB_tpc_5_b1) 1282250003Sadrian#define AR_PHY_TPC_6_B1 AR_SM1_OFFSET(BB_tpc_6_b1) 1283250003Sadrian#define AR_PHY_TPC_11_B1 AR_SM1_OFFSET(BB_tpc_11_b1) 1284250003Sadrian#define AR_SCORPION_PHY_TPC_19_B1 AR_SM1_OFFSET(overlay_b440.Scorpion.BB_tpc_19_b1) 1285250003Sadrian#define AR_PHY_PDADC_TAB_1 AR_SM1_OFFSET(overlay_b440.BB_pdadc_tab_b1) 1286250003Sadrian 1287250003Sadrian 1288250003Sadrian#define AR_PHY_RTT_TABLE_SW_INTF_B1 AR_SM1_OFFSET(overlay_b440.Jupiter_20.BB_rtt_table_sw_intf_b1) 1289250003Sadrian#define AR_PHY_RTT_TABLE_SW_INTF_1_B1 AR_SM1_OFFSET(overlay_b440.Jupiter_20.BB_rtt_table_sw_intf_1_b1) 1290250003Sadrian 1291250003Sadrian#define AR_PHY_TX_IQCAL_STATUS_B1 AR_SM1_OFFSET(BB_txiqcal_status_b1) 1292250003Sadrian#define AR_PHY_TX_IQCAL_CORR_COEFF_01_B1 AR_SM1_OFFSET(BB_txiq_corr_coeff_01_b1) 1293250003Sadrian#define AR_PHY_TX_IQCAL_CORR_COEFF_23_B1 AR_SM1_OFFSET(BB_txiq_corr_coeff_23_b1) 1294250003Sadrian#define AR_PHY_TX_IQCAL_CORR_COEFF_45_B1 AR_SM1_OFFSET(BB_txiq_corr_coeff_45_b1) 1295250003Sadrian#define AR_PHY_TX_IQCAL_CORR_COEFF_67_B1 AR_SM1_OFFSET(BB_txiq_corr_coeff_67_b1) 1296250003Sadrian#define AR_PHY_CL_MAP_0_B1 AR_SM1_OFFSET(BB_cl_map_0_b1) 1297250003Sadrian#define AR_PHY_CL_MAP_1_B1 AR_SM1_OFFSET(BB_cl_map_1_b1) 1298250003Sadrian#define AR_PHY_CL_MAP_2_B1 AR_SM1_OFFSET(BB_cl_map_2_b1) 1299250003Sadrian#define AR_PHY_CL_MAP_3_B1 AR_SM1_OFFSET(BB_cl_map_3_b1) 1300250003Sadrian/* 1301250003Sadrian * SM 1 Field Definitions 1302250003Sadrian */ 1303250003Sadrian/* BB_rtt_table_sw_intf_b1 */ 1304250003Sadrian#define AR_PHY_RTT_SW_RTT_TABLE_ACCESS_1 0x00000001 1305250003Sadrian#define AR_PHY_RTT_SW_RTT_TABLE_ACCESS_1_S 0 1306250003Sadrian#define AR_PHY_RTT_SW_RTT_TABLE_WRITE_1 0x00000002 1307250003Sadrian#define AR_PHY_RTT_SW_RTT_TABLE_WRITE_1_S 1 1308250003Sadrian#define AR_PHY_RTT_SW_RTT_TABLE_ADDR_1 0x0000001C 1309250003Sadrian#define AR_PHY_RTT_SW_RTT_TABLE_ADDR_1_S 2 1310250003Sadrian/* BB_rtt_table_sw_intf_1_b1 */ 1311250003Sadrian#define AR_PHY_RTT_SW_RTT_TABLE_DATA_1 0xFFFFFFF0 1312250003Sadrian#define AR_PHY_RTT_SW_RTT_TABLE_DATA_1_S 4 1313250003Sadrian 1314250003Sadrian/* 1315250003Sadrian * SM 1 Register Map for Poseidon 1316250003Sadrian */ 1317250003Sadrian#define AR_SM1_BASE_POSEIDON offsetof(struct bb_reg_map, overlay_0xa800.Poseidon.bb_sm1_reg_map) 1318250003Sadrian#define AR_SM1_OFFSET_POSEIDON(_x) (AR_SM1_BASE_POSEIDON + offsetof(struct sm1_reg_map, _x)) 1319250003Sadrian 1320250003Sadrian#define AR_PHY_SWITCH_CHAIN_1_POSEIDON AR_SM1_OFFSET_POSEIDON(BB_switch_table_chn_b1) 1321250003Sadrian 1322250003Sadrian/* 1323250003Sadrian * Channel 2 Register Map 1324250003Sadrian */ 1325250003Sadrian#define AR_CHAN2_BASE offsetof(struct bb_reg_map, overlay_0xa800.Osprey.bb_chn2_reg_map) 1326250003Sadrian#define AR_CHAN2_OFFSET(_x) (AR_CHAN2_BASE + offsetof(struct chn2_reg_map, _x)) 1327250003Sadrian 1328250003Sadrian#define AR_PHY_TIMING4_2 AR_CHAN2_OFFSET(BB_timing_control_4_b2) 1329250003Sadrian#define AR_PHY_EXT_CCA_2 AR_CHAN2_OFFSET(BB_ext_chan_pwr_thr_2_b2) 1330250003Sadrian#define AR_PHY_TX_PHASE_RAMP_2 AR_CHAN2_OFFSET(BB_tx_phase_ramp_b2) 1331250003Sadrian#define AR_PHY_ADC_GAIN_DC_CORR_2 AR_CHAN2_OFFSET(BB_adc_gain_dc_corr_b2) 1332250003Sadrian 1333250003Sadrian#define AR_PHY_IQ_ADC_MEAS_0_B2 AR_CHAN_OFFSET(BB_iq_adc_meas_0_b2) 1334250003Sadrian#define AR_PHY_IQ_ADC_MEAS_1_B2 AR_CHAN_OFFSET(BB_iq_adc_meas_1_b2) 1335250003Sadrian#define AR_PHY_IQ_ADC_MEAS_2_B2 AR_CHAN_OFFSET(BB_iq_adc_meas_2_b2) 1336250003Sadrian#define AR_PHY_IQ_ADC_MEAS_3_B2 AR_CHAN_OFFSET(BB_iq_adc_meas_3_b2) 1337250003Sadrian 1338250003Sadrian#define AR_PHY_TX_IQ_CORR_2 AR_CHAN2_OFFSET(BB_tx_iq_corr_b2) 1339250003Sadrian#define AR_PHY_SPUR_REPORT_2 AR_CHAN2_OFFSET(BB_spur_report_b2) 1340250003Sadrian#define AR_PHY_CHAN_INFO_TAB_2 AR_CHAN2_OFFSET(BB_chan_info_chan_tab_b2) 1341250003Sadrian#define AR_PHY_RX_IQCAL_CORR_B2 AR_CHAN2_OFFSET(BB_rx_iq_corr_b2) 1342250003Sadrian 1343250003Sadrian/* 1344250003Sadrian * Channel 2 Field Definitions 1345250003Sadrian */ 1346250003Sadrian/* BB_ext_chan_pwr_thr_2_b2 */ 1347250003Sadrian#define AR_PHY_CH2_EXT_MINCCA_PWR 0x01FF0000 1348250003Sadrian#define AR_PHY_CH2_EXT_MINCCA_PWR_S 16 1349250003Sadrian/* 1350250003Sadrian * AGC 2 Register Map 1351250003Sadrian */ 1352250003Sadrian#define AR_AGC2_BASE offsetof(struct bb_reg_map, overlay_0xa800.Osprey.bb_agc2_reg_map) 1353250003Sadrian#define AR_AGC2_OFFSET(_x) (AR_AGC2_BASE + offsetof(struct agc2_reg_map, _x)) 1354250003Sadrian 1355250003Sadrian#define AR_PHY_FORCEMAX_GAINS_2 AR_AGC2_OFFSET(BB_gain_force_max_gains_b2) 1356250003Sadrian#define AR_PHY_GAINS_MINOFF_2 AR_AGC2_OFFSET(BB_gains_min_offsets_b2) 1357250003Sadrian#define AR_PHY_EXT_ATTEN_CTL_2 AR_AGC2_OFFSET(BB_ext_atten_switch_ctl_b2) 1358250003Sadrian#define AR_PHY_CCA_2 AR_AGC2_OFFSET(BB_cca_b2) 1359250003Sadrian#define AR_PHY_CCA_CTRL_2 AR_AGC2_OFFSET(BB_cca_ctrl_2_b2) 1360250003Sadrian#define AR_PHY_RSSI_2 AR_AGC2_OFFSET(BB_rssi_b2) 1361250003Sadrian#define AR_PHY_SPUR_CCK_REP_2 AR_AGC2_OFFSET(BB_spur_est_cck_report_b2) 1362250003Sadrian 1363250003Sadrian/* 1364250003Sadrian * AGC 2 Field Definitions 1365250003Sadrian */ 1366250003Sadrian/* BB_cca_b2 */ 1367250003Sadrian#define AR_PHY_CH2_MINCCA_PWR 0x1FF00000 1368250003Sadrian#define AR_PHY_CH2_MINCCA_PWR_S 20 1369250003Sadrian 1370250003Sadrian/* 1371250003Sadrian * SM 2 Register Map 1372250003Sadrian */ 1373250003Sadrian#define AR_SM2_BASE offsetof(struct bb_reg_map, overlay_0xa800.Osprey.bb_sm2_reg_map) 1374250003Sadrian#define AR_SM2_OFFSET(_x) (AR_SM2_BASE + offsetof(struct sm2_reg_map, _x)) 1375250003Sadrian 1376250003Sadrian#define AR_PHY_SWITCH_CHAIN_2 AR_SM2_OFFSET(BB_switch_table_chn_b2) 1377250003Sadrian#define AR_PHY_FCAL_2_2 AR_SM2_OFFSET(BB_fcal_2_b2) 1378250003Sadrian#define AR_PHY_DFT_TONE_CTL_2 AR_SM2_OFFSET(BB_dft_tone_ctrl_b2) 1379250003Sadrian#define AR_PHY_BBGAINMAP_0_1_2 AR_SM2_OFFSET(BB_cl_bbgain_map_0_1_b2) 1380250003Sadrian#define AR_PHY_BBGAINMAP_2_3_2 AR_SM2_OFFSET(BB_cl_bbgain_map_2_3_b2) 1381250003Sadrian#define AR_PHY_CL_TAB_2 AR_SM2_OFFSET(BB_cl_tab_b2) 1382250003Sadrian#define AR_PHY_CHAN_INFO_GAIN_2 AR_SM2_OFFSET(BB_chan_info_gain_b2) 1383250003Sadrian#define AR_PHY_TPC_4_B2 AR_SM2_OFFSET(BB_tpc_4_b2) 1384250003Sadrian#define AR_PHY_TPC_5_B2 AR_SM2_OFFSET(BB_tpc_5_b2) 1385250003Sadrian#define AR_PHY_TPC_6_B2 AR_SM2_OFFSET(BB_tpc_6_b2) 1386250003Sadrian#define AR_PHY_TPC_11_B2 AR_SM2_OFFSET(BB_tpc_11_b2) 1387250003Sadrian#define AR_SCORPION_PHY_TPC_19_B2 AR_SM2_OFFSET(overlay_c440.Scorpion.BB_tpc_19_b2) 1388250003Sadrian#define AR_PHY_PDADC_TAB_2 AR_SM2_OFFSET(overlay_c440.BB_pdadc_tab_b2) 1389250003Sadrian#define AR_PHY_TX_IQCAL_STATUS_B2 AR_SM2_OFFSET(BB_txiqcal_status_b2) 1390250003Sadrian#define AR_PHY_TX_IQCAL_CORR_COEFF_01_B2 AR_SM2_OFFSET(BB_txiq_corr_coeff_01_b2) 1391250003Sadrian#define AR_PHY_TX_IQCAL_CORR_COEFF_23_B2 AR_SM2_OFFSET(BB_txiq_corr_coeff_23_b2) 1392250003Sadrian#define AR_PHY_TX_IQCAL_CORR_COEFF_45_B2 AR_SM2_OFFSET(BB_txiq_corr_coeff_45_b2) 1393250003Sadrian#define AR_PHY_TX_IQCAL_CORR_COEFF_67_B2 AR_SM2_OFFSET(BB_txiq_corr_coeff_67_b2) 1394250003Sadrian 1395250003Sadrian/* 1396250003Sadrian * bb_chn_ext_reg_map 1397250003Sadrian */ 1398250003Sadrian#define AR_CHN_EXT_BASE_POSEIDON offsetof(struct bb_reg_map, overlay_0xa800.Poseidon.bb_chn_ext_reg_map) 1399250003Sadrian#define AR_CHN_EXT_OFFSET_POSEIDON(_x) (AR_CHN_EXT_BASE_POSEIDON + offsetof(struct chn_ext_reg_map, _x)) 1400250003Sadrian 1401250003Sadrian#define AR_PHY_PAPRD_VALID_OBDB_POSEIDON AR_CHN_EXT_OFFSET_POSEIDON(BB_paprd_valid_obdb_b0) 1402250003Sadrian#define AR_PHY_PAPRD_VALID_OBDB_0 0x3f 1403250003Sadrian#define AR_PHY_PAPRD_VALID_OBDB_0_S 0 1404250003Sadrian#define AR_PHY_PAPRD_VALID_OBDB_1 0x3f 1405250003Sadrian#define AR_PHY_PAPRD_VALID_OBDB_1_S 6 1406250003Sadrian#define AR_PHY_PAPRD_VALID_OBDB_2 0x3f 1407250003Sadrian#define AR_PHY_PAPRD_VALID_OBDB_2_S 12 1408250003Sadrian#define AR_PHY_PAPRD_VALID_OBDB_3 0x3f 1409250003Sadrian#define AR_PHY_PAPRD_VALID_OBDB_3_S 18 1410250003Sadrian#define AR_PHY_PAPRD_VALID_OBDB_4 0x3f 1411250003Sadrian#define AR_PHY_PAPRD_VALID_OBDB_4_S 24 1412250003Sadrian 1413250003Sadrian/* BB_txiqcal_status_b1 */ 1414250003Sadrian#define AR_PHY_TX_IQCAL_STATUS_B2_FAILED 0x00000001 1415250003Sadrian 1416250003Sadrian/* 1417250003Sadrian * AGC 3 Register Map 1418250003Sadrian */ 1419250003Sadrian#define AR_AGC3_BASE offsetof(struct bb_reg_map, bb_agc3_reg_map) 1420250003Sadrian#define AR_AGC3_OFFSET(_x) (AR_AGC3_BASE + offsetof(struct agc3_reg_map, _x)) 1421250003Sadrian 1422250003Sadrian#define AR_PHY_RSSI_3 AR_AGC3_OFFSET(BB_rssi_b3) 1423250003Sadrian 1424250003Sadrian/* 1425250003Sadrian * Misc helper defines 1426250003Sadrian */ 1427250003Sadrian#define AR_PHY_CHAIN_OFFSET (AR_CHAN1_BASE - AR_CHAN_BASE) 1428250003Sadrian 1429250003Sadrian#define AR_PHY_NEW_ADC_DC_GAIN_CORR(_i) (AR_PHY_ADC_GAIN_DC_CORR_0 + (AR_PHY_CHAIN_OFFSET * (_i))) 1430250003Sadrian#define AR_PHY_SWITCH_CHAIN(_i) (AR_PHY_SWITCH_CHAIN_0 + (AR_PHY_CHAIN_OFFSET * (_i))) 1431250003Sadrian#define AR_PHY_EXT_ATTEN_CTL(_i) (AR_PHY_EXT_ATTEN_CTL_0 + (AR_PHY_CHAIN_OFFSET * (_i))) 1432250003Sadrian 1433250003Sadrian#define AR_PHY_RXGAIN(_i) (AR_PHY_FORCEMAX_GAINS_0 + (AR_PHY_CHAIN_OFFSET * (_i))) 1434250003Sadrian#define AR_PHY_TPCRG5(_i) (AR_PHY_TPC_5_B0 + (AR_PHY_CHAIN_OFFSET * (_i))) 1435250003Sadrian#define AR_PHY_PDADC_TAB(_i) (AR_PHY_PDADC_TAB_0 + (AR_PHY_CHAIN_OFFSET * (_i))) 1436250003Sadrian 1437250003Sadrian#define AR_PHY_CAL_MEAS_0(_i) (AR_PHY_IQ_ADC_MEAS_0_B0 + (AR_PHY_CHAIN_OFFSET * (_i))) 1438250003Sadrian#define AR_PHY_CAL_MEAS_1(_i) (AR_PHY_IQ_ADC_MEAS_1_B0 + (AR_PHY_CHAIN_OFFSET * (_i))) 1439250003Sadrian#define AR_PHY_CAL_MEAS_2(_i) (AR_PHY_IQ_ADC_MEAS_2_B0 + (AR_PHY_CHAIN_OFFSET * (_i))) 1440250003Sadrian#define AR_PHY_CAL_MEAS_3(_i) (AR_PHY_IQ_ADC_MEAS_3_B0 + (AR_PHY_CHAIN_OFFSET * (_i))) 1441250003Sadrian 1442250003Sadrian#define AR_PHY_CHIP_ID 0x9818 /* PHY chip revision ID */ 1443250003Sadrian#define AR_PHY_CHIP_ID_REV_0 0x80 /* 5416 Rev 0 (owl 1.0) BB */ 1444250003Sadrian#define AR_PHY_CHIP_ID_REV_1 0x81 /* 5416 Rev 1 (owl 2.0) BB */ 1445250003Sadrian#define AR_PHY_CHIP_ID_SOWL_REV_0 0xb0 /* 9160 Rev 0 (sowl 1.0) BB */ 1446250003Sadrian 1447250003Sadrian/* BB Panic Watchdog control register 1 */ 1448250003Sadrian#define AR_PHY_BB_PANIC_NON_IDLE_ENABLE 0x00000001 1449250003Sadrian#define AR_PHY_BB_PANIC_IDLE_ENABLE 0x00000002 1450250003Sadrian#define AR_PHY_BB_PANIC_IDLE_MASK 0xFFFF0000 1451250003Sadrian#define AR_PHY_BB_PANIC_NON_IDLE_MASK 0x0000FFFC 1452250003Sadrian/* BB Panic Watchdog control register 2 */ 1453250003Sadrian#define AR_PHY_BB_PANIC_RST_ENABLE 0x00000002 1454250003Sadrian#define AR_PHY_BB_PANIC_IRQ_ENABLE 0x00000004 1455250003Sadrian#define AR_PHY_BB_PANIC_CNTL2_MASK 0xFFFFFFF9 1456250003Sadrian/* BB Panic Watchdog status register */ 1457250003Sadrian#define AR_PHY_BB_WD_STATUS 0x00000007 /* snapshot of r_panic_watchdog_sm */ 1458250003Sadrian#define AR_PHY_BB_WD_STATUS_S 0 1459250003Sadrian#define AR_PHY_BB_WD_DET_HANG 0x00000008 /* panic_watchdog_det_hang */ 1460250003Sadrian#define AR_PHY_BB_WD_DET_HANG_S 3 1461250003Sadrian#define AR_PHY_BB_WD_RADAR_SM 0x000000F0 /* snapshot of radar state machine r_rdr_sm */ 1462250003Sadrian#define AR_PHY_BB_WD_RADAR_SM_S 4 1463250003Sadrian#define AR_PHY_BB_WD_RX_OFDM_SM 0x00000F00 /* snapshot of rx state machine (OFDM) r_rx_sm */ 1464250003Sadrian#define AR_PHY_BB_WD_RX_OFDM_SM_S 8 1465250003Sadrian#define AR_PHY_BB_WD_RX_CCK_SM 0x0000F000 /* snapshot of rx state machine (CCK) r_rx_sm_cck */ 1466250003Sadrian#define AR_PHY_BB_WD_RX_CCK_SM_S 12 1467250003Sadrian#define AR_PHY_BB_WD_TX_OFDM_SM 0x000F0000 /* snapshot of tx state machine (OFDM) r_tx_sm */ 1468250003Sadrian#define AR_PHY_BB_WD_TX_OFDM_SM_S 16 1469250003Sadrian#define AR_PHY_BB_WD_TX_CCK_SM 0x00F00000 /* snapshot of tx state machine (CCK) r_tx_sm_cck */ 1470250003Sadrian#define AR_PHY_BB_WD_TX_CCK_SM_S 20 1471250003Sadrian#define AR_PHY_BB_WD_AGC_SM 0x0F000000 /* snapshot of AGC state machine r_agc_sm */ 1472250003Sadrian#define AR_PHY_BB_WD_AGC_SM_S 24 1473250003Sadrian#define AR_PHY_BB_WD_SRCH_SM 0xF0000000 /* snapshot of agc search state machine r_srch_sm */ 1474250003Sadrian#define AR_PHY_BB_WD_SRCH_SM_S 28 1475250003Sadrian 1476250003Sadrian#define AR_PHY_BB_WD_STATUS_CLR 0x00000008 /* write 0 to reset watchdog */ 1477250003Sadrian 1478250003Sadrian 1479250003Sadrian/***** PAPRD *****/ 1480250003Sadrian#define AR_PHY_PAPRD_AM2AM AR_CHAN_OFFSET(BB_paprd_am2am_mask) 1481250003Sadrian#define AR_PHY_PAPRD_AM2AM_MASK 0x01ffffff 1482250003Sadrian#define AR_PHY_PAPRD_AM2AM_MASK_S 0 1483250003Sadrian 1484250003Sadrian#define AR_PHY_PAPRD_AM2PM AR_CHAN_OFFSET(BB_paprd_am2pm_mask) 1485250003Sadrian#define AR_PHY_PAPRD_AM2PM_MASK 0x01ffffff 1486250003Sadrian#define AR_PHY_PAPRD_AM2PM_MASK_S 0 1487250003Sadrian 1488250003Sadrian#define AR_PHY_PAPRD_HT40 AR_CHAN_OFFSET(BB_paprd_ht40_mask) 1489250003Sadrian#define AR_PHY_PAPRD_HT40_MASK 0x01ffffff 1490250003Sadrian#define AR_PHY_PAPRD_HT40_MASK_S 0 1491250003Sadrian 1492250003Sadrian#define AR_PHY_PAPRD_CTRL0_B0 AR_CHAN_OFFSET(BB_paprd_ctrl0_b0) 1493250003Sadrian#define AR_PHY_PAPRD_CTRL0_B0_PAPRD_ENABLE_0 1 1494250003Sadrian#define AR_PHY_PAPRD_CTRL0_B0_PAPRD_ENABLE_0_S 0 1495250003Sadrian#define AR_PHY_PAPRD_CTRL0_B0_USE_SINGLE_TABLE_MASK 0x00000001 1496250003Sadrian#define AR_PHY_PAPRD_CTRL0_B0_USE_SINGLE_TABLE_MASK_S 0x00000001 1497250003Sadrian#define AR_PHY_PAPRD_CTRL0_B0_PAPRD_MAG_THRSH_0 0x1F 1498250003Sadrian#define AR_PHY_PAPRD_CTRL0_B0_PAPRD_MAG_THRSH_0_S 27 1499250003Sadrian 1500250003Sadrian#define AR_PHY_PAPRD_CTRL1_B0 AR_CHAN_OFFSET(BB_paprd_ctrl1_b0) 1501250003Sadrian#define AR_PHY_PAPRD_CTRL1_B0_PAPRD_POWER_AT_AM2AM_CAL_0 0x3f 1502250003Sadrian#define AR_PHY_PAPRD_CTRL1_B0_PAPRD_POWER_AT_AM2AM_CAL_0_S 3 1503250003Sadrian#define AR_PHY_PAPRD_CTRL1_B0_ADAPTIVE_AM2PM_ENABLE_0 1 1504250003Sadrian#define AR_PHY_PAPRD_CTRL1_B0_ADAPTIVE_AM2PM_ENABLE_0_S 2 1505250003Sadrian#define AR_PHY_PAPRD_CTRL1_B0_ADAPTIVE_AM2AM_ENABLE_0 1 1506250003Sadrian#define AR_PHY_PAPRD_CTRL1_B0_ADAPTIVE_AM2AM_ENABLE_0_S 1 1507250003Sadrian#define AR_PHY_PAPRD_CTRL1_B0_ADAPTIVE_SCALING_ENA 1 1508250003Sadrian#define AR_PHY_PAPRD_CTRL1_B0_ADAPTIVE_SCALING_ENA_S 0 1509250003Sadrian#define AR_PHY_PAPRD_CTRL1_B0_PA_GAIN_SCALE_FACT_0_MASK 0xFF 1510250003Sadrian#define AR_PHY_PAPRD_CTRL1_B0_PA_GAIN_SCALE_FACT_0_MASK_S 9 1511250003Sadrian#define AR_PHY_PAPRD_CTRL1_B0_PAPRD_MAG_SCALE_FACT_0 0x7FF 1512250003Sadrian#define AR_PHY_PAPRD_CTRL1_B0_PAPRD_MAG_SCALE_FACT_0_S 17 1513250003Sadrian 1514250003Sadrian#define AR_PHY_PAPRD_CTRL0_B1 AR_CHAN1_OFFSET(BB_paprd_ctrl0_b1) 1515250003Sadrian#define AR_PHY_PAPRD_CTRL0_B1_PAPRD_MAG_THRSH_1 0x1F 1516250003Sadrian#define AR_PHY_PAPRD_CTRL0_B1_PAPRD_MAG_THRSH_1_S 27 1517250003Sadrian#define AR_PHY_PAPRD_CTRL0_B1_PAPRD_ADAPTIVE_USE_SINGLE_TABLE_1 1 1518250003Sadrian#define AR_PHY_PAPRD_CTRL0_B1_PAPRD_ADAPTIVE_USE_SINGLE_TABLE_1_S 1 1519250003Sadrian#define AR_PHY_PAPRD_CTRL0_B1_PAPRD_ENABLE_1 1 1520250003Sadrian#define AR_PHY_PAPRD_CTRL0_B1_PAPRD_ENABLE_1_S 0 1521250003Sadrian 1522250003Sadrian#define AR_PHY_PAPRD_CTRL1_B1 AR_CHAN1_OFFSET(BB_paprd_ctrl1_b1) 1523250003Sadrian#define AR_PHY_PAPRD_CTRL1_B1_PAPRD_POWER_AT_AM2AM_CAL_1 0x3f 1524250003Sadrian#define AR_PHY_PAPRD_CTRL1_B1_PAPRD_POWER_AT_AM2AM_CAL_1_S 3 1525250003Sadrian#define AR_PHY_PAPRD_CTRL1_B1_ADAPTIVE_AM2PM_ENABLE_1 1 1526250003Sadrian#define AR_PHY_PAPRD_CTRL1_B1_ADAPTIVE_AM2PM_ENABLE_1_S 2 1527250003Sadrian#define AR_PHY_PAPRD_CTRL1_B1_ADAPTIVE_AM2AM_ENABLE_1 1 1528250003Sadrian#define AR_PHY_PAPRD_CTRL1_B1_ADAPTIVE_AM2AM_ENABLE_1_S 1 1529250003Sadrian#define AR_PHY_PAPRD_CTRL1_B1_ADAPTIVE_SCALING_ENA 1 1530250003Sadrian#define AR_PHY_PAPRD_CTRL1_B1_ADAPTIVE_SCALING_ENA_S 0 1531250003Sadrian#define AR_PHY_PAPRD_CTRL1_B1_PA_GAIN_SCALE_FACT_1_MASK 0xFF 1532250003Sadrian#define AR_PHY_PAPRD_CTRL1_B1_PA_GAIN_SCALE_FACT_1_MASK_S 9 1533250003Sadrian#define AR_PHY_PAPRD_CTRL1_B1_PAPRD_MAG_SCALE_FACT_1 0x7FF 1534250003Sadrian#define AR_PHY_PAPRD_CTRL1_B1_PAPRD_MAG_SCALE_FACT_1_S 17 1535250003Sadrian 1536250003Sadrian#define AR_PHY_PAPRD_CTRL0_B2 AR_CHAN2_OFFSET(BB_paprd_ctrl0_b2) 1537250003Sadrian#define AR_PHY_PAPRD_CTRL0_B2_PAPRD_MAG_THRSH_2 0x1F 1538250003Sadrian#define AR_PHY_PAPRD_CTRL0_B2_PAPRD_MAG_THRSH_2_S 27 1539250003Sadrian#define AR_PHY_PAPRD_CTRL0_B2_PAPRD_ADAPTIVE_USE_SINGLE_TABLE_2 1 1540250003Sadrian#define AR_PHY_PAPRD_CTRL0_B2_PAPRD_ADAPTIVE_USE_SINGLE_TABLE_2_S 1 1541250003Sadrian#define AR_PHY_PAPRD_CTRL0_B2_PAPRD_ENABLE_2 1 1542250003Sadrian#define AR_PHY_PAPRD_CTRL0_B2_PAPRD_ENABLE_2_S 0 1543250003Sadrian 1544250003Sadrian 1545250003Sadrian#define AR_PHY_PAPRD_CTRL1_B2 AR_CHAN2_OFFSET(BB_paprd_ctrl1_b2) 1546250003Sadrian#define AR_PHY_PAPRD_CTRL1_B2_PAPRD_POWER_AT_AM2AM_CAL_2 0x3f 1547250003Sadrian#define AR_PHY_PAPRD_CTRL1_B2_PAPRD_POWER_AT_AM2AM_CAL_2_S 3 1548250003Sadrian#define AR_PHY_PAPRD_CTRL1_B2_ADAPTIVE_AM2PM_ENABLE_2 1 1549250003Sadrian#define AR_PHY_PAPRD_CTRL1_B2_ADAPTIVE_AM2PM_ENABLE_2_S 2 1550250003Sadrian#define AR_PHY_PAPRD_CTRL1_B2_ADAPTIVE_AM2AM_ENABLE_2 1 1551250003Sadrian#define AR_PHY_PAPRD_CTRL1_B2_ADAPTIVE_AM2AM_ENABLE_2_S 1 1552250003Sadrian#define AR_PHY_PAPRD_CTRL1_B2_ADAPTIVE_SCALING_ENA 1 1553250003Sadrian#define AR_PHY_PAPRD_CTRL1_B2_ADAPTIVE_SCALING_ENA_S 0 1554250003Sadrian#define AR_PHY_PAPRD_CTRL1_B2_PA_GAIN_SCALE_FACT_2_MASK 0xFF 1555250003Sadrian#define AR_PHY_PAPRD_CTRL1_B2_PA_GAIN_SCALE_FACT_2_MASK_S 9 1556250003Sadrian#define AR_PHY_PAPRD_CTRL1_B2_PAPRD_MAG_SCALE_FACT_2 0x7FF 1557250003Sadrian#define AR_PHY_PAPRD_CTRL1_B2_PAPRD_MAG_SCALE_FACT_2_S 17 1558250003Sadrian 1559250003Sadrian#define AR_PHY_PAPRD_TRAINER_CNTL1 AR_SM_OFFSET(overlay_0xa580.Osprey.BB_paprd_trainer_cntl1) 1560250003Sadrian#define AR_PHY_PAPRD_TRAINER_CNTL1_POSEIDON AR_SM_OFFSET(overlay_0xa580.Poseidon.BB_paprd_trainer_cntl1) 1561250003Sadrian#define AR_PHY_PAPRD_TRAINER_CNTL1_CF_PAPRD_LB_SKIP 0x3f 1562250003Sadrian#define AR_PHY_PAPRD_TRAINER_CNTL1_CF_PAPRD_LB_SKIP_S 12 1563250003Sadrian#define AR_PHY_PAPRD_TRAINER_CNTL1_CF_PAPRD_LB_ENABLE 1 1564250003Sadrian#define AR_PHY_PAPRD_TRAINER_CNTL1_CF_PAPRD_LB_ENABLE_S 11 1565250003Sadrian#define AR_PHY_PAPRD_TRAINER_CNTL1_CF_PAPRD_TX_GAIN_FORCE 1 1566250003Sadrian#define AR_PHY_PAPRD_TRAINER_CNTL1_CF_PAPRD_TX_GAIN_FORCE_S 10 1567250003Sadrian#define AR_PHY_PAPRD_TRAINER_CNTL1_CF_PAPRD_RX_BB_GAIN_FORCE 1 1568250003Sadrian#define AR_PHY_PAPRD_TRAINER_CNTL1_CF_PAPRD_RX_BB_GAIN_FORCE_S 9 1569250003Sadrian#define AR_PHY_PAPRD_TRAINER_CNTL1_CF_PAPRD_IQCORR_ENABLE 1 1570250003Sadrian#define AR_PHY_PAPRD_TRAINER_CNTL1_CF_PAPRD_IQCORR_ENABLE_S 8 1571250003Sadrian#define AR_PHY_PAPRD_TRAINER_CNTL1_CF_PAPRD_AGC2_SETTLING 0x3F 1572250003Sadrian#define AR_PHY_PAPRD_TRAINER_CNTL1_CF_PAPRD_AGC2_SETTLING_S 1 1573250003Sadrian#define AR_PHY_PAPRD_TRAINER_CNTL1_CF_CF_PAPRD_TRAIN_ENABLE 1 1574250003Sadrian#define AR_PHY_PAPRD_TRAINER_CNTL1_CF_CF_PAPRD_TRAIN_ENABLE_S 0 1575250003Sadrian 1576250003Sadrian#define AR_PHY_PAPRD_TRAINER_CNTL2 AR_SM_OFFSET(overlay_0xa580.Osprey.BB_paprd_trainer_cntl2) 1577250003Sadrian#define AR_PHY_PAPRD_TRAINER_CNTL2_POSEIDON AR_SM_OFFSET(overlay_0xa580.Poseidon.BB_paprd_trainer_cntl2) 1578250003Sadrian#define AR_PHY_PAPRD_TRAINER_CNTL2_CF_PAPRD_INIT_RX_BB_GAIN 0xFFFFFFFF 1579250003Sadrian#define AR_PHY_PAPRD_TRAINER_CNTL2_CF_PAPRD_INIT_RX_BB_GAIN_S 0 1580250003Sadrian 1581250003Sadrian#define AR_PHY_PAPRD_TRAINER_CNTL3 AR_SM_OFFSET(overlay_0xa580.Osprey.BB_paprd_trainer_cntl3) 1582250003Sadrian#define AR_PHY_PAPRD_TRAINER_CNTL3_POSEIDON AR_SM_OFFSET(overlay_0xa580.Poseidon.BB_paprd_trainer_cntl3) 1583250003Sadrian#define AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_BBTXMIX_DISABLE 1 1584250003Sadrian#define AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_BBTXMIX_DISABLE_S 29 1585250003Sadrian#define AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_FINE_CORR_LEN 0xF 1586250003Sadrian#define AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_FINE_CORR_LEN_S 24 1587250003Sadrian#define AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_COARSE_CORR_LEN 0xF 1588250003Sadrian#define AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_COARSE_CORR_LEN_S 20 1589250003Sadrian#define AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_COARSE_CORR_LEN 0xF 1590250003Sadrian#define AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_COARSE_CORR_LEN_S 20 1591250003Sadrian#define AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_NUM_CORR_STAGES 0x7 1592250003Sadrian#define AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_NUM_CORR_STAGES_S 17 1593250003Sadrian#define AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_MIN_LOOPBACK_DEL 0x1F 1594250003Sadrian#define AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_MIN_LOOPBACK_DEL_S 12 1595250003Sadrian#define AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_QUICK_DROP 0x3F 1596250003Sadrian#define AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_QUICK_DROP_S 6 1597250003Sadrian#define AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_ADC_DESIRED_SIZE 0x3F 1598250003Sadrian#define AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_ADC_DESIRED_SIZE_S 0 1599250003Sadrian 1600250003Sadrian#define AR_PHY_PAPRD_TRAINER_CNTL4 AR_SM_OFFSET(overlay_0xa580.Osprey.BB_paprd_trainer_cntl4) 1601250003Sadrian#define AR_PHY_PAPRD_TRAINER_CNTL4_POSEIDON AR_SM_OFFSET(overlay_0xa580.Poseidon.BB_paprd_trainer_cntl4) 1602250003Sadrian#define AR_PHY_PAPRD_TRAINER_CNTL4_CF_PAPRD_NUM_TRAIN_SAMPLES 0x3FF 1603250003Sadrian#define AR_PHY_PAPRD_TRAINER_CNTL4_CF_PAPRD_NUM_TRAIN_SAMPLES_S 16 1604250003Sadrian#define AR_PHY_PAPRD_TRAINER_CNTL4_CF_PAPRD_SAFETY_DELTA 0xF 1605250003Sadrian#define AR_PHY_PAPRD_TRAINER_CNTL4_CF_PAPRD_SAFETY_DELTA_S 12 1606250003Sadrian#define AR_PHY_PAPRD_TRAINER_CNTL4_CF_PAPRD_MIN_CORR 0xFFF 1607250003Sadrian#define AR_PHY_PAPRD_TRAINER_CNTL4_CF_PAPRD_MIN_CORR_S 0 1608250003Sadrian 1609250003Sadrian#define AR_PHY_PAPRD_PRE_POST_SCALE_0_B0 AR_CHAN_OFFSET(BB_paprd_pre_post_scale_0_b0) 1610250003Sadrian#define AR_PHY_PAPRD_PRE_POST_SCALE_0_B0_PAPRD_PRE_POST_SCALING_0_0 0x3FFFF 1611250003Sadrian#define AR_PHY_PAPRD_PRE_POST_SCALE_0_B0_PAPRD_PRE_POST_SCALING_0_0_S 0 1612250003Sadrian 1613250003Sadrian#define AR_PHY_PAPRD_PRE_POST_SCALE_1_B0 AR_CHAN_OFFSET(BB_paprd_pre_post_scale_1_b0) 1614250003Sadrian#define AR_PHY_PAPRD_PRE_POST_SCALE_1_B0_PAPRD_PRE_POST_SCALING_1_0 0x3FFFF 1615250003Sadrian#define AR_PHY_PAPRD_PRE_POST_SCALE_1_B0_PAPRD_PRE_POST_SCALING_1_0_S 0 1616250003Sadrian 1617250003Sadrian#define AR_PHY_PAPRD_PRE_POST_SCALE_2_B0 AR_CHAN_OFFSET(BB_paprd_pre_post_scale_2_b0) 1618250003Sadrian#define AR_PHY_PAPRD_PRE_POST_SCALE_2_B0_PAPRD_PRE_POST_SCALING_2_0 0x3FFFF 1619250003Sadrian#define AR_PHY_PAPRD_PRE_POST_SCALE_2_B0_PAPRD_PRE_POST_SCALING_2_0_S 0 1620250003Sadrian 1621250003Sadrian#define AR_PHY_PAPRD_PRE_POST_SCALE_3_B0 AR_CHAN_OFFSET(BB_paprd_pre_post_scale_3_b0) 1622250003Sadrian#define AR_PHY_PAPRD_PRE_POST_SCALE_3_B0_PAPRD_PRE_POST_SCALING_3_0 0x3FFFF 1623250003Sadrian#define AR_PHY_PAPRD_PRE_POST_SCALE_3_B0_PAPRD_PRE_POST_SCALING_3_0_S 0 1624250003Sadrian 1625250003Sadrian#define AR_PHY_PAPRD_PRE_POST_SCALE_4_B0 AR_CHAN_OFFSET(BB_paprd_pre_post_scale_4_b0) 1626250003Sadrian#define AR_PHY_PAPRD_PRE_POST_SCALE_4_B0_PAPRD_PRE_POST_SCALING_4_0 0x3FFFF 1627250003Sadrian#define AR_PHY_PAPRD_PRE_POST_SCALE_4_B0_PAPRD_PRE_POST_SCALING_4_0_S 0 1628250003Sadrian 1629250003Sadrian#define AR_PHY_PAPRD_PRE_POST_SCALE_5_B0 AR_CHAN_OFFSET(BB_paprd_pre_post_scale_5_b0) 1630250003Sadrian#define AR_PHY_PAPRD_PRE_POST_SCALE_5_B0_PAPRD_PRE_POST_SCALING_5_0 0x3FFFF 1631250003Sadrian#define AR_PHY_PAPRD_PRE_POST_SCALE_5_B0_PAPRD_PRE_POST_SCALING_5_0_S 0 1632250003Sadrian 1633250003Sadrian#define AR_PHY_PAPRD_PRE_POST_SCALE_6_B0 AR_CHAN_OFFSET(BB_paprd_pre_post_scale_6_b0) 1634250003Sadrian#define AR_PHY_PAPRD_PRE_POST_SCALE_6_B0_PAPRD_PRE_POST_SCALING_6_0 0x3FFFF 1635250003Sadrian#define AR_PHY_PAPRD_PRE_POST_SCALE_6_B0_PAPRD_PRE_POST_SCALING_6_0_S 0 1636250003Sadrian 1637250003Sadrian#define AR_PHY_PAPRD_PRE_POST_SCALE_7_B0 AR_CHAN_OFFSET(BB_paprd_pre_post_scale_7_b0) 1638250003Sadrian#define AR_PHY_PAPRD_PRE_POST_SCALE_7_B0_PAPRD_PRE_POST_SCALING_7_0 0x3FFFF 1639250003Sadrian#define AR_PHY_PAPRD_PRE_POST_SCALE_7_B0_PAPRD_PRE_POST_SCALING_7_0_S 0 1640250003Sadrian 1641250003Sadrian#define AR_PHY_PAPRD_TRAINER_STAT1 AR_SM_OFFSET(overlay_0xa580.Osprey.BB_paprd_trainer_stat1) 1642250003Sadrian#define AR_PHY_PAPRD_TRAINER_STAT1_POSEIDON AR_SM_OFFSET(overlay_0xa580.Poseidon.BB_paprd_trainer_stat1) 1643250003Sadrian#define AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_AGC2_PWR 0xff 1644250003Sadrian#define AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_AGC2_PWR_S 9 1645250003Sadrian#define AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_RX_GAIN_IDX 0x1f 1646250003Sadrian#define AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_RX_GAIN_IDX_S 4 1647250003Sadrian#define AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_TRAIN_ACTIVE 0x1 1648250003Sadrian#define AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_TRAIN_ACTIVE_S 3 1649250003Sadrian#define AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_CORR_ERR 0x1 1650250003Sadrian#define AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_CORR_ERR_S 2 1651250003Sadrian#define AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_TRAIN_INCOMPLETE 0x1 1652250003Sadrian#define AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_TRAIN_INCOMPLETE_S 1 1653250003Sadrian#define AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_TRAIN_DONE 1 1654250003Sadrian#define AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_TRAIN_DONE_S 0 1655250003Sadrian 1656250003Sadrian#define AR_PHY_PAPRD_TRAINER_STAT2 AR_SM_OFFSET(overlay_0xa580.Osprey.BB_paprd_trainer_stat2) 1657250003Sadrian#define AR_PHY_PAPRD_TRAINER_STAT2_POSEIDON AR_SM_OFFSET(overlay_0xa580.Poseidon.BB_paprd_trainer_stat2) 1658250003Sadrian#define AR_PHY_PAPRD_TRAINER_STAT2_PAPRD_FINE_IDX 0x3 1659250003Sadrian#define AR_PHY_PAPRD_TRAINER_STAT2_PAPRD_FINE_IDX_S 21 1660250003Sadrian#define AR_PHY_PAPRD_TRAINER_STAT2_PAPRD_COARSE_IDX 0x1F 1661250003Sadrian#define AR_PHY_PAPRD_TRAINER_STAT2_PAPRD_COARSE_IDX_S 16 1662250003Sadrian#define AR_PHY_PAPRD_TRAINER_STAT2_PAPRD_FINE_VAL 0xffff 1663250003Sadrian#define AR_PHY_PAPRD_TRAINER_STAT2_PAPRD_FINE_VAL_S 0 1664250003Sadrian 1665250003Sadrian#define AR_PHY_PAPRD_TRAINER_STAT3 AR_SM_OFFSET(overlay_0xa580.Osprey.BB_paprd_trainer_stat3) 1666250003Sadrian#define AR_PHY_PAPRD_TRAINER_STAT3_POSEIDON AR_SM_OFFSET(overlay_0xa580.Poseidon.BB_paprd_trainer_stat3) 1667250003Sadrian#define AR_PHY_PAPRD_TRAINER_STAT3_PAPRD_TRAIN_SAMPLES_CNT 0xfffff 1668250003Sadrian#define AR_PHY_PAPRD_TRAINER_STAT3_PAPRD_TRAIN_SAMPLES_CNT_S 0 1669250003Sadrian 1670250003Sadrian#define AR_PHY_TPC_12 AR_SM_OFFSET(BB_tpc_12) 1671250003Sadrian#define AR_PHY_TPC_12_DESIRED_SCALE_HT40_5 0x1F 1672250003Sadrian#define AR_PHY_TPC_12_DESIRED_SCALE_HT40_5_S 25 1673250003Sadrian 1674250003Sadrian#define AR_PHY_TPC_19_ALT_ALPHA_VOLT 0x1f 1675250003Sadrian#define AR_PHY_TPC_19_ALT_ALPHA_VOLT_S 16 1676250003Sadrian 1677250003Sadrian#define AR_PHY_TPC_18_ALT_THERM_CAL_VALUE 0xff 1678250003Sadrian#define AR_PHY_TPC_18_ALT_THERM_CAL_VALUE_S 0 1679250003Sadrian 1680250003Sadrian#define AR_PHY_TPC_18_ALT_VOLT_CAL_VALUE 0xff 1681250003Sadrian#define AR_PHY_TPC_18_ALT_VOLT_CAL_VALUE_S 8 1682250003Sadrian 1683250003Sadrian#define AR_PHY_THERM_ADC_4 AR_SM_OFFSET(BB_therm_adc_4) 1684250003Sadrian#define AR_PHY_THERM_ADC_4_LATEST_THERM_VALUE 0xFF 1685250003Sadrian#define AR_PHY_THERM_ADC_4_LATEST_THERM_VALUE_S 0 1686250003Sadrian#define AR_PHY_THERM_ADC_4_LATEST_VOLT_VALUE 0xFF 1687250003Sadrian#define AR_PHY_THERM_ADC_4_LATEST_VOLT_VALUE_S 8 1688250003Sadrian 1689250003Sadrian 1690250003Sadrian#define AR_PHY_TPC_11_B0 AR_SM_OFFSET(BB_tpc_11_b0) 1691250003Sadrian#define AR_PHY_TPC_11_B0_OLPC_GAIN_DELTA_0 0xFF 1692250003Sadrian#define AR_PHY_TPC_11_B0_OLPC_GAIN_DELTA_0_S 16 1693250003Sadrian 1694250003Sadrian#define AR_PHY_TPC_11_B1 AR_SM1_OFFSET(BB_tpc_11_b1) 1695250003Sadrian#define AR_PHY_TPC_11_B1_OLPC_GAIN_DELTA_1 0xFF 1696250003Sadrian#define AR_PHY_TPC_11_B1_OLPC_GAIN_DELTA_1_S 16 1697250003Sadrian 1698250003Sadrian#define AR_PHY_TPC_11_B2 AR_SM2_OFFSET(BB_tpc_11_b2) 1699250003Sadrian#define AR_PHY_TPC_11_B2_OLPC_GAIN_DELTA_2 0xFF 1700250003Sadrian#define AR_PHY_TPC_11_B2_OLPC_GAIN_DELTA_2_S 16 1701250003Sadrian 1702250003Sadrian 1703250003Sadrian#define AR_PHY_TX_FORCED_GAIN_FORCED_TXBB1DBGAIN 0x7 1704250003Sadrian#define AR_PHY_TX_FORCED_GAIN_FORCED_TXBB1DBGAIN_S 1 1705250003Sadrian#define AR_PHY_TX_FORCED_GAIN_FORCED_TXBB6DBGAIN 0x3 1706250003Sadrian#define AR_PHY_TX_FORCED_GAIN_FORCED_TXBB6DBGAIN_S 4 1707250003Sadrian#define AR_PHY_TX_FORCED_GAIN_FORCED_TXMXRGAIN 0xf 1708250003Sadrian#define AR_PHY_TX_FORCED_GAIN_FORCED_TXMXRGAIN_S 6 1709250003Sadrian#define AR_PHY_TX_FORCED_GAIN_FORCED_PADRVGNA 0xf 1710250003Sadrian#define AR_PHY_TX_FORCED_GAIN_FORCED_PADRVGNA_S 10 1711250003Sadrian#define AR_PHY_TX_FORCED_GAIN_FORCED_PADRVGNB 0xf 1712250003Sadrian#define AR_PHY_TX_FORCED_GAIN_FORCED_PADRVGNB_S 14 1713250003Sadrian#define AR_PHY_TX_FORCED_GAIN_FORCED_PADRVGNC 0xf 1714250003Sadrian#define AR_PHY_TX_FORCED_GAIN_FORCED_PADRVGNC_S 18 1715250003Sadrian#define AR_PHY_TX_FORCED_GAIN_FORCED_PADRVGND 0x3 1716250003Sadrian#define AR_PHY_TX_FORCED_GAIN_FORCED_PADRVGND_S 22 1717250003Sadrian#define AR_PHY_TX_FORCED_GAIN_FORCED_ENABLE_PAL 1 1718250003Sadrian#define AR_PHY_TX_FORCED_GAIN_FORCED_ENABLE_PAL_S 24 1719250003Sadrian#define AR_PHY_TX_FORCED_GAIN_FORCE_TX_GAIN 1 1720250003Sadrian#define AR_PHY_TX_FORCED_GAIN_FORCE_TX_GAIN_S 0 1721250003Sadrian 1722250003Sadrian#define AR_PHY_TPC_1 AR_SM_OFFSET(BB_tpc_1) 1723250003Sadrian#define AR_PHY_TPC_1_FORCED_DAC_GAIN 0x1f 1724250003Sadrian#define AR_PHY_TPC_1_FORCED_DAC_GAIN_S 1 1725250003Sadrian#define AR_PHY_TPC_1_FORCE_DAC_GAIN 1 1726250003Sadrian#define AR_PHY_TPC_1_FORCE_DAC_GAIN_S 0 1727250003Sadrian 1728250003Sadrian#define AR_PHY_CHAN_INFO_MEMORY_CHANINFOMEM_S2_READ 1 1729250003Sadrian#define AR_PHY_CHAN_INFO_MEMORY_CHANINFOMEM_S2_READ_S 3 1730250003Sadrian 1731250003Sadrian#define AR_PHY_PAPRD_MEM_TAB_B0 AR_CHAN_OFFSET(BB_paprd_mem_tab_b0) 1732250003Sadrian#define AR_PHY_PAPRD_MEM_TAB_B1 AR_CHAN1_OFFSET(BB_paprd_mem_tab_b1) 1733250003Sadrian#define AR_PHY_PAPRD_MEM_TAB_B2 AR_CHAN2_OFFSET(BB_paprd_mem_tab_b2) 1734250003Sadrian 1735250003Sadrian#define AR_PHY_PA_GAIN123_B0 AR_CHAN_OFFSET(BB_pa_gain123_b0) 1736250003Sadrian#define AR_PHY_PA_GAIN123_B0_PA_GAIN1_0 0x3FF 1737250003Sadrian#define AR_PHY_PA_GAIN123_B0_PA_GAIN1_0_S 0 1738250003Sadrian 1739250003Sadrian#define AR_PHY_PA_GAIN123_B1 AR_CHAN1_OFFSET(BB_pa_gain123_b1) 1740250003Sadrian#define AR_PHY_PA_GAIN123_B1_PA_GAIN1_1 0x3FF 1741250003Sadrian#define AR_PHY_PA_GAIN123_B1_PA_GAIN1_1_S 0 1742250003Sadrian 1743250003Sadrian#define AR_PHY_PA_GAIN123_B2 AR_CHAN2_OFFSET(BB_pa_gain123_b2) 1744250003Sadrian#define AR_PHY_PA_GAIN123_B2_PA_GAIN1_2 0x3FF 1745250003Sadrian#define AR_PHY_PA_GAIN123_B2_PA_GAIN1_2_S 0 1746250003Sadrian 1747250003Sadrian//Legacy 54M 1748250003Sadrian#define AR_PHY_POWERTX_RATE2 AR_SM_OFFSET(BB_powertx_rate2) 1749250003Sadrian#define AR_PHY_POWERTX_RATE2_POWERTX54M_7 0x3F 1750250003Sadrian#define AR_PHY_POWERTX_RATE2_POWERTX54M_7_S 24 1751250003Sadrian 1752250003Sadrian#define AR_PHY_POWERTX_RATE5 AR_SM_OFFSET(BB_powertx_rate5) 1753250003Sadrian#define AR_PHY_POWERTX_RATE5_POWERTXHT20_0 0x3F 1754250003Sadrian#define AR_PHY_POWERTX_RATE5_POWERTXHT20_0_S 0 1755250003Sadrian//HT20 MCS5 1756250003Sadrian#define AR_PHY_POWERTX_RATE5_POWERTXHT20_3 0x3F 1757250003Sadrian#define AR_PHY_POWERTX_RATE5_POWERTXHT20_3_S 24 1758250003Sadrian 1759250003Sadrian//HT20 MCS7 1760250003Sadrian#define AR_PHY_POWERTX_RATE6 AR_SM_OFFSET(BB_powertx_rate6) 1761250003Sadrian#define AR_PHY_POWERTX_RATE6_POWERTXHT20_5 0x3F 1762250003Sadrian#define AR_PHY_POWERTX_RATE6_POWERTXHT20_5_S 8 1763250003Sadrian//HT20 MCS6 1764250003Sadrian#define AR_PHY_POWERTX_RATE6_POWERTXHT20_4 0x3F 1765250003Sadrian#define AR_PHY_POWERTX_RATE6_POWERTXHT20_4_S 0 1766250003Sadrian 1767250003Sadrian#define AR_PHY_POWERTX_RATE7 AR_SM_OFFSET(BB_powertx_rate7) 1768250003Sadrian//HT40 MCS5 1769250003Sadrian#define AR_PHY_POWERTX_RATE7_POWERTXHT40_3 0x3F 1770250003Sadrian#define AR_PHY_POWERTX_RATE7_POWERTXHT40_3_S 24 1771250003Sadrian 1772250003Sadrian//HT40 MCS7 1773250003Sadrian#define AR_PHY_POWERTX_RATE8 AR_SM_OFFSET(BB_powertx_rate8) 1774250003Sadrian#define AR_PHY_POWERTX_RATE8_POWERTXHT40_5 0x3F 1775250003Sadrian#define AR_PHY_POWERTX_RATE8_POWERTXHT40_5_S 8 1776250003Sadrian//HT40 MCS6 1777250003Sadrian#define AR_PHY_POWERTX_RATE8_POWERTXHT40_4 0x3F 1778250003Sadrian#define AR_PHY_POWERTX_RATE8_POWERTXHT40_4_S 0 1779250003Sadrian 1780250003Sadrian//HT20 MCS15 1781250003Sadrian#define AR_PHY_POWERTX_RATE10 AR_SM_OFFSET(BB_powertx_rate10) 1782250003Sadrian#define AR_PHY_POWERTX_RATE10_POWERTXHT20_9 0x3F 1783250003Sadrian#define AR_PHY_POWERTX_RATE10_POWERTXHT20_9_S 8 1784250003Sadrian 1785250003Sadrian//HT20 MCS23 1786250003Sadrian#define AR_PHY_POWERTX_RATE11 AR_SM_OFFSET(BB_powertx_rate11) 1787250003Sadrian#define AR_PHY_POWERTX_RATE11_POWERTXHT20_13 0x3F 1788250003Sadrian#define AR_PHY_POWERTX_RATE11_POWERTXHT20_13_S 8 1789250003Sadrian 1790250003Sadrian#define AR_PHY_CL_TAB_0_CL_GAIN_MOD 0x1F 1791250003Sadrian#define AR_PHY_CL_TAB_0_CL_GAIN_MOD_S 0 1792250003Sadrian 1793250003Sadrian#define AR_PHY_CL_TAB_1_CL_GAIN_MOD 0x1F 1794250003Sadrian#define AR_PHY_CL_TAB_1_CL_GAIN_MOD_S 0 1795250003Sadrian 1796250003Sadrian#define AR_PHY_CL_TAB_2_CL_GAIN_MOD 0x1F 1797250003Sadrian#define AR_PHY_CL_TAB_2_CL_GAIN_MOD_S 0 1798250003Sadrian 1799250003Sadrian/* 1800250003Sadrian * Hornet/Poseidon Analog Registers 1801250003Sadrian */ 1802250003Sadrian#define AR_HORNET_CH0_TOP AR_PHY_65NM(overlay_0x16180.Poseidon.ch0_TOP) 1803250003Sadrian#define AR_HORNET_CH0_TOP2 AR_PHY_65NM(overlay_0x16180.Poseidon.ch0_TOP2) 1804250003Sadrian#define AR_HORNET_CH0_TOP2_XPABIASLVL 0xf000 1805250003Sadrian#define AR_HORNET_CH0_TOP2_XPABIASLVL_S 12 1806250003Sadrian 1807250003Sadrian#define AR_SCORPION_CH0_TOP AR_PHY_65NM(overlay_0x16180.Poseidon.ch0_TOP) 1808250003Sadrian#define AR_SCORPION_CH0_TOP_XPABIASLVL 0x3c0 1809250003Sadrian#define AR_SCORPION_CH0_TOP_XPABIASLVL_S 6 1810250003Sadrian 1811250003Sadrian#define AR_SCORPION_CH0_XTAL AR_PHY_65NM(overlay_0x16180.Poseidon.ch0_XTAL) 1812250003Sadrian 1813250003Sadrian#define AR_HORNET_CH0_THERM AR_PHY_65NM(overlay_0x16180.Poseidon.ch0_THERM) 1814250003Sadrian 1815250003Sadrian#define AR_HORNET_CH0_XTAL AR_PHY_65NM(overlay_0x16180.Poseidon.ch0_XTAL) 1816250003Sadrian#define AR_HORNET_CHO_XTAL_CAPINDAC 0x7F000000 1817250003Sadrian#define AR_HORNET_CHO_XTAL_CAPINDAC_S 24 1818250003Sadrian#define AR_HORNET_CHO_XTAL_CAPOUTDAC 0x00FE0000 1819250003Sadrian#define AR_HORNET_CHO_XTAL_CAPOUTDAC_S 17 1820250003Sadrian 1821250003Sadrian#define AR_HORNET_CH0_DDR_DPLL2 AR_PHY_65NM(overlay_0x16180.Poseidon.ch0_DDR_DPLL2) 1822250003Sadrian#define AR_HORNET_CH0_DDR_DPLL3 AR_PHY_65NM(overlay_0x16180.Poseidon.ch0_DDR_DPLL3) 1823250003Sadrian#define AR_PHY_CCA_NOM_VAL_HORNET_2GHZ -118 1824250003Sadrian 1825250003Sadrian#define AR_PHY_BB_DPLL1 AR_PHY_65NM(overlay_0x16180.Poseidon.ch0_BB_DPLL1) 1826250003Sadrian#define AR_PHY_BB_DPLL1_REFDIV 0xF8000000 1827250003Sadrian#define AR_PHY_BB_DPLL1_REFDIV_S 27 1828250003Sadrian#define AR_PHY_BB_DPLL1_NINI 0x07FC0000 1829250003Sadrian#define AR_PHY_BB_DPLL1_NINI_S 18 1830250003Sadrian#define AR_PHY_BB_DPLL1_NFRAC 0x0003FFFF 1831250003Sadrian#define AR_PHY_BB_DPLL1_NFRAC_S 0 1832250003Sadrian 1833250003Sadrian#define AR_PHY_BB_DPLL2 AR_PHY_65NM(overlay_0x16180.Poseidon.ch0_BB_DPLL2) 1834250003Sadrian#define AR_PHY_BB_DPLL2_RANGE 0x80000000 1835250003Sadrian#define AR_PHY_BB_DPLL2_RANGE_S 31 1836250003Sadrian#define AR_PHY_BB_DPLL2_LOCAL_PLL 0x40000000 1837250003Sadrian#define AR_PHY_BB_DPLL2_LOCAL_PLL_S 30 1838250003Sadrian#define AR_PHY_BB_DPLL2_KI 0x3C000000 1839250003Sadrian#define AR_PHY_BB_DPLL2_KI_S 26 1840250003Sadrian#define AR_PHY_BB_DPLL2_KD 0x03F80000 1841250003Sadrian#define AR_PHY_BB_DPLL2_KD_S 19 1842250003Sadrian#define AR_PHY_BB_DPLL2_EN_NEGTRIG 0x00040000 1843250003Sadrian#define AR_PHY_BB_DPLL2_EN_NEGTRIG_S 18 1844250003Sadrian#define AR_PHY_BB_DPLL2_SEL_1SDM 0x00020000 1845250003Sadrian#define AR_PHY_BB_DPLL2_SEL_1SDM_S 17 1846250003Sadrian#define AR_PHY_BB_DPLL2_PLL_PWD 0x00010000 1847250003Sadrian#define AR_PHY_BB_DPLL2_PLL_PWD_S 16 1848250003Sadrian#define AR_PHY_BB_DPLL2_OUTDIV 0x0000E000 1849250003Sadrian#define AR_PHY_BB_DPLL2_OUTDIV_S 13 1850250003Sadrian#define AR_PHY_BB_DPLL2_DELTA 0x00001F80 1851250003Sadrian#define AR_PHY_BB_DPLL2_DELTA_S 7 1852250003Sadrian#define AR_PHY_BB_DPLL2_SPARE 0x0000007F 1853250003Sadrian#define AR_PHY_BB_DPLL2_SPARE_S 0 1854250003Sadrian 1855250003Sadrian#define AR_PHY_BB_DPLL3 AR_PHY_65NM(overlay_0x16180.Poseidon.ch0_BB_DPLL3) 1856250003Sadrian#define AR_PHY_BB_DPLL3_MEAS_AT_TXON 0x80000000 1857250003Sadrian#define AR_PHY_BB_DPLL3_MEAS_AT_TXON_S 31 1858250003Sadrian#define AR_PHY_BB_DPLL3_DO_MEAS 0x40000000 1859250003Sadrian#define AR_PHY_BB_DPLL3_DO_MEAS_S 30 1860250003Sadrian#define AR_PHY_BB_DPLL3_PHASE_SHIFT 0x3F800000 1861250003Sadrian#define AR_PHY_BB_DPLL3_PHASE_SHIFT_S 23 1862250003Sadrian#define AR_PHY_BB_DPLL3_SQSUM_DVC 0x007FFFF8 1863250003Sadrian#define AR_PHY_BB_DPLL3_SQSUM_DVC_S 3 1864250003Sadrian#define AR_PHY_BB_DPLL3_SPARE 0x00000007 1865250003Sadrian#define AR_PHY_BB_DPLL3_SPARE_S 0x0 1866250003Sadrian 1867250003Sadrian#define AR_PHY_BB_DPLL4 AR_PHY_65NM(overlay_0x16180.Poseidon.ch0_BB_DPLL4) 1868250003Sadrian#define AR_PHY_BB_DPLL4_MEAN_DVC 0xFFE00000 1869250003Sadrian#define AR_PHY_BB_DPLL4_MEAN_DVC_S 21 1870250003Sadrian#define AR_PHY_BB_DPLL4_VC_MEAS0 0x001FFFF0 1871250003Sadrian#define AR_PHY_BB_DPLL4_VC_MEAS0_S 4 1872250003Sadrian#define AR_PHY_BB_DPLL4_MEAS_DONE 0x00000008 1873250003Sadrian#define AR_PHY_BB_DPLL4_MEAS_DONE_S 3 1874250003Sadrian#define AR_PHY_BB_DPLL4_SPARE 0x00000007 1875250003Sadrian#define AR_PHY_BB_DPLL4_SPARE_S 0 1876250003Sadrian 1877250003Sadrian/* 1878250003Sadrian * Wasp Analog Registers 1879250003Sadrian */ 1880250003Sadrian#define AR_PHY_PLL_CONTROL AR_PHY_65NM(overlay_0x16180.Osprey.ch0_pll_cntl) 1881250003Sadrian#define AR_PHY_PLL_MODE AR_PHY_65NM(overlay_0x16180.Osprey.ch0_pll_mode) 1882250003Sadrian#define AR_PHY_PLL_BB_DPLL3 AR_PHY_65NM(overlay_0x16180.Osprey.ch0_bb_dpll3) 1883250003Sadrian#define AR_PHY_PLL_BB_DPLL4 AR_PHY_65NM(overlay_0x16180.Osprey.ch0_bb_dpll4) 1884250003Sadrian 1885250003Sadrian/* 1886250003Sadrian * PMU Register Map 1887250003Sadrian */ 1888250003Sadrian#define AR_PHY_PMU(_field) offsetof(struct pmu_reg, _field) 1889250003Sadrian#define AR_PHY_PMU1 AR_PHY_PMU(ch0_PMU1) 1890250003Sadrian#define AR_PHY_PMU2 AR_PHY_PMU(ch0_PMU2) 1891250003Sadrian#define AR_PHY_JUPITER_PMU(_field) offsetof(struct radio65_reg, _field) 1892250003Sadrian#define AR_PHY_PMU1_JUPITER AR_PHY_JUPITER_PMU(overlay_0x16180.Jupiter.ch0_PMU1) 1893250003Sadrian#define AR_PHY_PMU2_JUPITER AR_PHY_JUPITER_PMU(overlay_0x16180.Jupiter.ch0_PMU2) 1894250003Sadrian 1895250003Sadrian/* 1896250003Sadrian * GLB Register Map 1897250003Sadrian */ 1898250003Sadrian#define AR_PHY_GLB(_field) offsetof(struct glb_reg, _field) 1899250003Sadrian#define AR_PHY_GLB_CONTROL_JUPITER AR_PHY_GLB(overlap_0x20044.Jupiter.GLB_CONTROL) 1900250003Sadrian 1901250003Sadrian/* 1902250003Sadrian * PMU Field Definitions 1903250003Sadrian */ 1904250003Sadrian/* ch0_PMU1 */ 1905250003Sadrian#define AR_PHY_PMU1_PWD 0x00000001 /* power down switch regulator */ 1906250003Sadrian#define AR_PHY_PMU1_PWD_S 0 1907250003Sadrian 1908250003Sadrian/* ch0_PMU2 */ 1909250003Sadrian#define AR_PHY_PMU2_PGM 0x00200000 1910250003Sadrian#define AR_PHY_PMU2_PGM_S 21 1911250003Sadrian 1912250003Sadrian/* ch0_PHY_CTRL2 */ 1913250003Sadrian#define AR_PHY_CTRL2_TX_MAN_CAL 0x03C00000 1914250003Sadrian#define AR_PHY_CTRL2_TX_MAN_CAL_S 22 1915250003Sadrian#define AR_PHY_CTRL2_TX_CAL_SEL 0x00200000 1916250003Sadrian#define AR_PHY_CTRL2_TX_CAL_SEL_S 21 1917250003Sadrian#define AR_PHY_CTRL2_TX_CAL_EN 0x00100000 1918250003Sadrian#define AR_PHY_CTRL2_TX_CAL_EN_S 20 1919250003Sadrian 1920250003Sadrian#define PCIE_CO_ERR_CTR_CTRL 0x40e8 1921250003Sadrian#define PCIE_CO_ERR_CTR_CTR0 0x40e0 1922250003Sadrian#define PCIE_CO_ERR_CTR_CTR1 0x40e4 1923250003Sadrian 1924250003Sadrian 1925250003Sadrian#define RCVD_ERR_CTR_RUN 0x0001 1926250003Sadrian#define RCVD_ERR_CTR_AUTO_STOP 0x0002 1927250003Sadrian#define BAD_TLP_ERR_CTR_RUN 0x0004 1928250003Sadrian#define BAD_TLP_ERR_CTR_AUTO_STOP 0x0008 1929250003Sadrian#define BAD_DLLP_ERR_CTR_RUN 0x0010 1930250003Sadrian#define BAD_DLLP_ERR_CTR_AUTO_STOP 0x0020 1931250003Sadrian#define RPLY_TO_ERR_CTR_RUN 0x0040 1932250003Sadrian#define RPLY_TO_ERR_CTR_AUTO_STOP 0x0080 1933250003Sadrian#define RPLY_NUM_RO_ERR_CTR_RUN 0x0100 1934250003Sadrian#define RPLY_NUM_RO_ERR_CTR_AUTO_STOP 0x0200 1935250003Sadrian 1936250003Sadrian#define RCVD_ERR_MASK 0x000000ff 1937250003Sadrian#define RCVD_ERR_MASK_S 0 1938250003Sadrian#define BAD_TLP_ERR_MASK 0x0000ff00 1939250003Sadrian#define BAD_TLP_ERR_MASK_S 8 1940250003Sadrian#define BAD_DLLP_ERR_MASK 0x00ff0000 1941250003Sadrian#define BAD_DLLP_ERR_MASK_S 16 1942250003Sadrian 1943250003Sadrian#define RPLY_TO_ERR_MASK 0x000000ff 1944250003Sadrian#define RPLY_TO_ERR_MASK_S 0 1945250003Sadrian#define RPLY_NUM_RO_ERR_MASK 0x0000ff00 1946250003Sadrian#define RPLY_NUM_RO_ERR_MASK_S 8 1947250003Sadrian 1948250003Sadrian#define AR_MERLIN_RADIO_SYNTH4 offsetof(struct merlin2_0_radio_reg_map, SYNTH4) 1949250003Sadrian#define AR_MERLIN_RADIO_SYNTH6 offsetof(struct merlin2_0_radio_reg_map, SYNTH6) 1950250003Sadrian#define AR_MERLIN_RADIO_SYNTH7 offsetof(struct merlin2_0_radio_reg_map, SYNTH7) 1951250003Sadrian#define AR_MERLIN_RADIO_TOP0 offsetof(struct merlin2_0_radio_reg_map, TOP0) 1952250003Sadrian#define AR_MERLIN_RADIO_TOP1 offsetof(struct merlin2_0_radio_reg_map, TOP1) 1953250003Sadrian#define AR_MERLIN_RADIO_TOP2 offsetof(struct merlin2_0_radio_reg_map, TOP2) 1954250003Sadrian#define AR_MERLIN_RADIO_TOP3 offsetof(struct merlin2_0_radio_reg_map, TOP3) 1955250003Sadrian#endif /* _ATH_AR9300PHY_H_ */ 1956