162306a36Sopenharmony_ci/* 262306a36Sopenharmony_ci * Copyright (c) 2010-2011 Atheros Communications, Inc. 362306a36Sopenharmony_ci * 462306a36Sopenharmony_ci * Permission to use, copy, modify, and/or distribute this software for any 562306a36Sopenharmony_ci * purpose with or without fee is hereby granted, provided that the above 662306a36Sopenharmony_ci * copyright notice and this permission notice appear in all copies. 762306a36Sopenharmony_ci * 862306a36Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 962306a36Sopenharmony_ci * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 1062306a36Sopenharmony_ci * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 1162306a36Sopenharmony_ci * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 1262306a36Sopenharmony_ci * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 1362306a36Sopenharmony_ci * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 1462306a36Sopenharmony_ci * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 1562306a36Sopenharmony_ci */ 1662306a36Sopenharmony_ci 1762306a36Sopenharmony_ci#ifndef AR9003_PHY_H 1862306a36Sopenharmony_ci#define AR9003_PHY_H 1962306a36Sopenharmony_ci 2062306a36Sopenharmony_ci/* 2162306a36Sopenharmony_ci * Channel Register Map 2262306a36Sopenharmony_ci */ 2362306a36Sopenharmony_ci#define AR_CHAN_BASE 0x9800 2462306a36Sopenharmony_ci 2562306a36Sopenharmony_ci#define AR_PHY_TIMING1 (AR_CHAN_BASE + 0x0) 2662306a36Sopenharmony_ci#define AR_PHY_TIMING2 (AR_CHAN_BASE + 0x4) 2762306a36Sopenharmony_ci#define AR_PHY_TIMING3 (AR_CHAN_BASE + 0x8) 2862306a36Sopenharmony_ci#define AR_PHY_TIMING4 (AR_CHAN_BASE + 0xc) 2962306a36Sopenharmony_ci#define AR_PHY_TIMING5 (AR_CHAN_BASE + 0x10) 3062306a36Sopenharmony_ci#define AR_PHY_TIMING6 (AR_CHAN_BASE + 0x14) 3162306a36Sopenharmony_ci#define AR_PHY_TIMING11 (AR_CHAN_BASE + 0x18) 3262306a36Sopenharmony_ci#define AR_PHY_SPUR_REG (AR_CHAN_BASE + 0x1c) 3362306a36Sopenharmony_ci#define AR_PHY_RX_IQCAL_CORR_B0 (AR_CHAN_BASE + 0xdc) 3462306a36Sopenharmony_ci#define AR_PHY_TX_IQCAL_CONTROL_3 (AR_CHAN_BASE + 0xb0) 3562306a36Sopenharmony_ci#define AR_PHY_TIMING_CONTROL4_DO_GAIN_DC_IQ_CAL_SHIFT 16 3662306a36Sopenharmony_ci 3762306a36Sopenharmony_ci#define AR_PHY_TIMING11_SPUR_FREQ_SD 0x3FF00000 3862306a36Sopenharmony_ci#define AR_PHY_TIMING11_SPUR_FREQ_SD_S 20 3962306a36Sopenharmony_ci 4062306a36Sopenharmony_ci#define AR_PHY_TIMING11_SPUR_DELTA_PHASE 0x000FFFFF 4162306a36Sopenharmony_ci#define AR_PHY_TIMING11_SPUR_DELTA_PHASE_S 0 4262306a36Sopenharmony_ci 4362306a36Sopenharmony_ci#define AR_PHY_TIMING11_USE_SPUR_FILTER_IN_AGC 0x40000000 4462306a36Sopenharmony_ci#define AR_PHY_TIMING11_USE_SPUR_FILTER_IN_AGC_S 30 4562306a36Sopenharmony_ci 4662306a36Sopenharmony_ci#define AR_PHY_TIMING11_USE_SPUR_FILTER_IN_SELFCOR 0x80000000 4762306a36Sopenharmony_ci#define AR_PHY_TIMING11_USE_SPUR_FILTER_IN_SELFCOR_S 31 4862306a36Sopenharmony_ci 4962306a36Sopenharmony_ci#define AR_PHY_SPUR_REG_ENABLE_NF_RSSI_SPUR_MIT 0x4000000 5062306a36Sopenharmony_ci#define AR_PHY_SPUR_REG_ENABLE_NF_RSSI_SPUR_MIT_S 26 5162306a36Sopenharmony_ci 5262306a36Sopenharmony_ci#define AR_PHY_SPUR_REG_ENABLE_MASK_PPM 0x20000 /* bins move with freq offset */ 5362306a36Sopenharmony_ci#define AR_PHY_SPUR_REG_ENABLE_MASK_PPM_S 17 5462306a36Sopenharmony_ci#define AR_PHY_SPUR_REG_SPUR_RSSI_THRESH 0x000000FF 5562306a36Sopenharmony_ci#define AR_PHY_SPUR_REG_SPUR_RSSI_THRESH_S 0 5662306a36Sopenharmony_ci#define AR_PHY_SPUR_REG_EN_VIT_SPUR_RSSI 0x00000100 5762306a36Sopenharmony_ci#define AR_PHY_SPUR_REG_EN_VIT_SPUR_RSSI_S 8 5862306a36Sopenharmony_ci#define AR_PHY_SPUR_REG_MASK_RATE_CNTL 0x03FC0000 5962306a36Sopenharmony_ci#define AR_PHY_SPUR_REG_MASK_RATE_CNTL_S 18 6062306a36Sopenharmony_ci 6162306a36Sopenharmony_ci#define AR_PHY_RX_IQCAL_CORR_B0_LOOPBACK_IQCORR_EN 0x20000000 6262306a36Sopenharmony_ci#define AR_PHY_RX_IQCAL_CORR_B0_LOOPBACK_IQCORR_EN_S 29 6362306a36Sopenharmony_ci 6462306a36Sopenharmony_ci#define AR_PHY_TX_IQCAL_CONTROL_3_IQCORR_EN 0x80000000 6562306a36Sopenharmony_ci#define AR_PHY_TX_IQCAL_CONTROL_3_IQCORR_EN_S 31 6662306a36Sopenharmony_ci 6762306a36Sopenharmony_ci#define AR_PHY_FIND_SIG_LOW (AR_CHAN_BASE + 0x20) 6862306a36Sopenharmony_ci 6962306a36Sopenharmony_ci#define AR_PHY_SFCORR (AR_CHAN_BASE + 0x24) 7062306a36Sopenharmony_ci#define AR_PHY_SFCORR_LOW (AR_CHAN_BASE + 0x28) 7162306a36Sopenharmony_ci#define AR_PHY_SFCORR_EXT (AR_CHAN_BASE + 0x2c) 7262306a36Sopenharmony_ci 7362306a36Sopenharmony_ci#define AR_PHY_EXT_CCA (AR_CHAN_BASE + 0x30) 7462306a36Sopenharmony_ci#define AR_PHY_RADAR_0 (AR_CHAN_BASE + 0x34) 7562306a36Sopenharmony_ci#define AR_PHY_RADAR_1 (AR_CHAN_BASE + 0x38) 7662306a36Sopenharmony_ci#define AR_PHY_RADAR_EXT (AR_CHAN_BASE + 0x3c) 7762306a36Sopenharmony_ci#define AR_PHY_MULTICHAIN_CTRL (AR_CHAN_BASE + 0x80) 7862306a36Sopenharmony_ci#define AR_PHY_PERCHAIN_CSD (AR_CHAN_BASE + 0x84) 7962306a36Sopenharmony_ci 8062306a36Sopenharmony_ci#define AR_PHY_TX_PHASE_RAMP_0 (AR_CHAN_BASE + 0xd0) 8162306a36Sopenharmony_ci#define AR_PHY_ADC_GAIN_DC_CORR_0 (AR_CHAN_BASE + 0xd4) 8262306a36Sopenharmony_ci#define AR_PHY_IQ_ADC_MEAS_0_B0 (AR_CHAN_BASE + 0xc0) 8362306a36Sopenharmony_ci#define AR_PHY_IQ_ADC_MEAS_1_B0 (AR_CHAN_BASE + 0xc4) 8462306a36Sopenharmony_ci#define AR_PHY_IQ_ADC_MEAS_2_B0 (AR_CHAN_BASE + 0xc8) 8562306a36Sopenharmony_ci#define AR_PHY_IQ_ADC_MEAS_3_B0 (AR_CHAN_BASE + 0xcc) 8662306a36Sopenharmony_ci 8762306a36Sopenharmony_ci/* The following registers changed position from AR9300 1.0 to AR9300 2.0 */ 8862306a36Sopenharmony_ci#define AR_PHY_TX_PHASE_RAMP_0_9300_10 (AR_CHAN_BASE + 0xd0 - 0x10) 8962306a36Sopenharmony_ci#define AR_PHY_ADC_GAIN_DC_CORR_0_9300_10 (AR_CHAN_BASE + 0xd4 - 0x10) 9062306a36Sopenharmony_ci#define AR_PHY_IQ_ADC_MEAS_0_B0_9300_10 (AR_CHAN_BASE + 0xc0 + 0x8) 9162306a36Sopenharmony_ci#define AR_PHY_IQ_ADC_MEAS_1_B0_9300_10 (AR_CHAN_BASE + 0xc4 + 0x8) 9262306a36Sopenharmony_ci#define AR_PHY_IQ_ADC_MEAS_2_B0_9300_10 (AR_CHAN_BASE + 0xc8 + 0x8) 9362306a36Sopenharmony_ci#define AR_PHY_IQ_ADC_MEAS_3_B0_9300_10 (AR_CHAN_BASE + 0xcc + 0x8) 9462306a36Sopenharmony_ci 9562306a36Sopenharmony_ci#define AR_PHY_TX_CRC (AR_CHAN_BASE + 0xa0) 9662306a36Sopenharmony_ci#define AR_PHY_TST_DAC_CONST (AR_CHAN_BASE + 0xa4) 9762306a36Sopenharmony_ci#define AR_PHY_SPUR_REPORT_0 (AR_CHAN_BASE + 0xa8) 9862306a36Sopenharmony_ci#define AR_PHY_CHAN_INFO_TAB_0 (AR_CHAN_BASE + 0x300) 9962306a36Sopenharmony_ci 10062306a36Sopenharmony_ci/* 10162306a36Sopenharmony_ci * Channel Field Definitions 10262306a36Sopenharmony_ci */ 10362306a36Sopenharmony_ci#define AR_PHY_TIMING2_USE_FORCE_PPM 0x00001000 10462306a36Sopenharmony_ci#define AR_PHY_TIMING2_FORCE_PPM_VAL 0x00000fff 10562306a36Sopenharmony_ci#define AR_PHY_TIMING3_DSC_MAN 0xFFFE0000 10662306a36Sopenharmony_ci#define AR_PHY_TIMING3_DSC_MAN_S 17 10762306a36Sopenharmony_ci#define AR_PHY_TIMING3_DSC_EXP 0x0001E000 10862306a36Sopenharmony_ci#define AR_PHY_TIMING3_DSC_EXP_S 13 10962306a36Sopenharmony_ci#define AR_PHY_TIMING4_IQCAL_LOG_COUNT_MAX 0xF000 11062306a36Sopenharmony_ci#define AR_PHY_TIMING4_IQCAL_LOG_COUNT_MAX_S 12 11162306a36Sopenharmony_ci#define AR_PHY_TIMING4_DO_CAL 0x10000 11262306a36Sopenharmony_ci 11362306a36Sopenharmony_ci#define AR_PHY_TIMING4_ENABLE_PILOT_MASK 0x10000000 11462306a36Sopenharmony_ci#define AR_PHY_TIMING4_ENABLE_PILOT_MASK_S 28 11562306a36Sopenharmony_ci#define AR_PHY_TIMING4_ENABLE_CHAN_MASK 0x20000000 11662306a36Sopenharmony_ci#define AR_PHY_TIMING4_ENABLE_CHAN_MASK_S 29 11762306a36Sopenharmony_ci 11862306a36Sopenharmony_ci#define AR_PHY_TIMING4_ENABLE_SPUR_FILTER 0x40000000 11962306a36Sopenharmony_ci#define AR_PHY_TIMING4_ENABLE_SPUR_FILTER_S 30 12062306a36Sopenharmony_ci#define AR_PHY_TIMING4_ENABLE_SPUR_RSSI 0x80000000 12162306a36Sopenharmony_ci#define AR_PHY_TIMING4_ENABLE_SPUR_RSSI_S 31 12262306a36Sopenharmony_ci 12362306a36Sopenharmony_ci#define AR_PHY_NEW_ADC_GAIN_CORR_ENABLE 0x40000000 12462306a36Sopenharmony_ci#define AR_PHY_NEW_ADC_DC_OFFSET_CORR_ENABLE 0x80000000 12562306a36Sopenharmony_ci#define AR_PHY_SFCORR_LOW_USE_SELF_CORR_LOW 0x00000001 12662306a36Sopenharmony_ci#define AR_PHY_SFCORR_LOW_M2COUNT_THR_LOW 0x00003F00 12762306a36Sopenharmony_ci#define AR_PHY_SFCORR_LOW_M2COUNT_THR_LOW_S 8 12862306a36Sopenharmony_ci#define AR_PHY_SFCORR_LOW_M1_THRESH_LOW 0x001FC000 12962306a36Sopenharmony_ci#define AR_PHY_SFCORR_LOW_M1_THRESH_LOW_S 14 13062306a36Sopenharmony_ci#define AR_PHY_SFCORR_LOW_M2_THRESH_LOW 0x0FE00000 13162306a36Sopenharmony_ci#define AR_PHY_SFCORR_LOW_M2_THRESH_LOW_S 21 13262306a36Sopenharmony_ci#define AR_PHY_SFCORR_M2COUNT_THR 0x0000001F 13362306a36Sopenharmony_ci#define AR_PHY_SFCORR_M2COUNT_THR_S 0 13462306a36Sopenharmony_ci#define AR_PHY_SFCORR_M1_THRESH 0x00FE0000 13562306a36Sopenharmony_ci#define AR_PHY_SFCORR_M1_THRESH_S 17 13662306a36Sopenharmony_ci#define AR_PHY_SFCORR_M2_THRESH 0x7F000000 13762306a36Sopenharmony_ci#define AR_PHY_SFCORR_M2_THRESH_S 24 13862306a36Sopenharmony_ci#define AR_PHY_SFCORR_EXT_M1_THRESH 0x0000007F 13962306a36Sopenharmony_ci#define AR_PHY_SFCORR_EXT_M1_THRESH_S 0 14062306a36Sopenharmony_ci#define AR_PHY_SFCORR_EXT_M2_THRESH 0x00003F80 14162306a36Sopenharmony_ci#define AR_PHY_SFCORR_EXT_M2_THRESH_S 7 14262306a36Sopenharmony_ci#define AR_PHY_SFCORR_EXT_M1_THRESH_LOW 0x001FC000 14362306a36Sopenharmony_ci#define AR_PHY_SFCORR_EXT_M1_THRESH_LOW_S 14 14462306a36Sopenharmony_ci#define AR_PHY_SFCORR_EXT_M2_THRESH_LOW 0x0FE00000 14562306a36Sopenharmony_ci#define AR_PHY_SFCORR_EXT_M2_THRESH_LOW_S 21 14662306a36Sopenharmony_ci#define AR_PHY_SFCORR_EXT_SPUR_SUBCHANNEL_SD 0x10000000 14762306a36Sopenharmony_ci#define AR_PHY_SFCORR_EXT_SPUR_SUBCHANNEL_SD_S 28 14862306a36Sopenharmony_ci#define AR_PHY_SFCORR_SPUR_SUBCHNL_SD_S 28 14962306a36Sopenharmony_ci#define AR_PHY_EXT_CCA_THRESH62 0x007F0000 15062306a36Sopenharmony_ci#define AR_PHY_EXT_CCA_THRESH62_S 16 15162306a36Sopenharmony_ci#define AR_PHY_EXTCHN_PWRTHR1_ANT_DIV_ALT_ANT_MINGAINIDX 0x0000FF00 15262306a36Sopenharmony_ci#define AR_PHY_EXTCHN_PWRTHR1_ANT_DIV_ALT_ANT_MINGAINIDX_S 8 15362306a36Sopenharmony_ci#define AR_PHY_EXT_MINCCA_PWR 0x01FF0000 15462306a36Sopenharmony_ci#define AR_PHY_EXT_MINCCA_PWR_S 16 15562306a36Sopenharmony_ci#define AR_PHY_EXT_CYCPWR_THR1 0x0000FE00L 15662306a36Sopenharmony_ci#define AR_PHY_EXT_CYCPWR_THR1_S 9 15762306a36Sopenharmony_ci#define AR_PHY_TIMING5_CYCPWR_THR1 0x000000FE 15862306a36Sopenharmony_ci#define AR_PHY_TIMING5_CYCPWR_THR1_S 1 15962306a36Sopenharmony_ci#define AR_PHY_TIMING5_CYCPWR_THR1_ENABLE 0x00000001 16062306a36Sopenharmony_ci#define AR_PHY_TIMING5_CYCPWR_THR1_ENABLE_S 0 16162306a36Sopenharmony_ci#define AR_PHY_TIMING5_CYCPWR_THR1A 0x007F0000 16262306a36Sopenharmony_ci#define AR_PHY_TIMING5_CYCPWR_THR1A_S 16 16362306a36Sopenharmony_ci#define AR_PHY_TIMING5_RSSI_THR1A (0x7F << 16) 16462306a36Sopenharmony_ci#define AR_PHY_TIMING5_RSSI_THR1A_S 16 16562306a36Sopenharmony_ci#define AR_PHY_TIMING5_RSSI_THR1A_ENA (0x1 << 15) 16662306a36Sopenharmony_ci#define AR_PHY_RADAR_0_ENA 0x00000001 16762306a36Sopenharmony_ci#define AR_PHY_RADAR_0_FFT_ENA 0x80000000 16862306a36Sopenharmony_ci#define AR_PHY_RADAR_0_INBAND 0x0000003e 16962306a36Sopenharmony_ci#define AR_PHY_RADAR_0_INBAND_S 1 17062306a36Sopenharmony_ci#define AR_PHY_RADAR_0_PRSSI 0x00000FC0 17162306a36Sopenharmony_ci#define AR_PHY_RADAR_0_PRSSI_S 6 17262306a36Sopenharmony_ci#define AR_PHY_RADAR_0_HEIGHT 0x0003F000 17362306a36Sopenharmony_ci#define AR_PHY_RADAR_0_HEIGHT_S 12 17462306a36Sopenharmony_ci#define AR_PHY_RADAR_0_RRSSI 0x00FC0000 17562306a36Sopenharmony_ci#define AR_PHY_RADAR_0_RRSSI_S 18 17662306a36Sopenharmony_ci#define AR_PHY_RADAR_0_FIRPWR 0x7F000000 17762306a36Sopenharmony_ci#define AR_PHY_RADAR_0_FIRPWR_S 24 17862306a36Sopenharmony_ci#define AR_PHY_RADAR_1_RELPWR_ENA 0x00800000 17962306a36Sopenharmony_ci#define AR_PHY_RADAR_1_USE_FIR128 0x00400000 18062306a36Sopenharmony_ci#define AR_PHY_RADAR_1_RELPWR_THRESH 0x003F0000 18162306a36Sopenharmony_ci#define AR_PHY_RADAR_1_RELPWR_THRESH_S 16 18262306a36Sopenharmony_ci#define AR_PHY_RADAR_1_BLOCK_CHECK 0x00008000 18362306a36Sopenharmony_ci#define AR_PHY_RADAR_1_MAX_RRSSI 0x00004000 18462306a36Sopenharmony_ci#define AR_PHY_RADAR_1_RELSTEP_CHECK 0x00002000 18562306a36Sopenharmony_ci#define AR_PHY_RADAR_1_RELSTEP_THRESH 0x00001F00 18662306a36Sopenharmony_ci#define AR_PHY_RADAR_1_RELSTEP_THRESH_S 8 18762306a36Sopenharmony_ci#define AR_PHY_RADAR_1_MAXLEN 0x000000FF 18862306a36Sopenharmony_ci#define AR_PHY_RADAR_1_MAXLEN_S 0 18962306a36Sopenharmony_ci#define AR_PHY_RADAR_EXT_ENA 0x00004000 19062306a36Sopenharmony_ci#define AR_PHY_RADAR_DC_PWR_THRESH 0x007f8000 19162306a36Sopenharmony_ci#define AR_PHY_RADAR_DC_PWR_THRESH_S 15 19262306a36Sopenharmony_ci#define AR_PHY_RADAR_LB_DC_CAP 0x7f800000 19362306a36Sopenharmony_ci#define AR_PHY_RADAR_LB_DC_CAP_S 23 19462306a36Sopenharmony_ci#define AR_PHY_FIND_SIG_LOW_FIRSTEP_LOW (0x3f << 6) 19562306a36Sopenharmony_ci#define AR_PHY_FIND_SIG_LOW_FIRSTEP_LOW_S 6 19662306a36Sopenharmony_ci#define AR_PHY_FIND_SIG_LOW_FIRPWR (0x7f << 12) 19762306a36Sopenharmony_ci#define AR_PHY_FIND_SIG_LOW_FIRPWR_S 12 19862306a36Sopenharmony_ci#define AR_PHY_FIND_SIG_LOW_FIRPWR_SIGN_BIT 19 19962306a36Sopenharmony_ci#define AR_PHY_FIND_SIG_LOW_RELSTEP 0x1f 20062306a36Sopenharmony_ci#define AR_PHY_FIND_SIG_LOW_RELSTEP_S 0 20162306a36Sopenharmony_ci#define AR_PHY_FIND_SIG_LOW_RELSTEP_SIGN_BIT 5 20262306a36Sopenharmony_ci#define AR_PHY_CHAN_INFO_TAB_S2_READ 0x00000008 20362306a36Sopenharmony_ci#define AR_PHY_CHAN_INFO_TAB_S2_READ_S 3 20462306a36Sopenharmony_ci#define AR_PHY_RX_IQCAL_CORR_IQCORR_Q_Q_COFF 0x0000007F 20562306a36Sopenharmony_ci#define AR_PHY_RX_IQCAL_CORR_IQCORR_Q_Q_COFF_S 0 20662306a36Sopenharmony_ci#define AR_PHY_RX_IQCAL_CORR_IQCORR_Q_I_COFF 0x00003F80 20762306a36Sopenharmony_ci#define AR_PHY_RX_IQCAL_CORR_IQCORR_Q_I_COFF_S 7 20862306a36Sopenharmony_ci#define AR_PHY_RX_IQCAL_CORR_IQCORR_ENABLE 0x00004000 20962306a36Sopenharmony_ci#define AR_PHY_RX_IQCAL_CORR_LOOPBACK_IQCORR_Q_Q_COFF 0x003f8000 21062306a36Sopenharmony_ci#define AR_PHY_RX_IQCAL_CORR_LOOPBACK_IQCORR_Q_Q_COFF_S 15 21162306a36Sopenharmony_ci#define AR_PHY_RX_IQCAL_CORR_LOOPBACK_IQCORR_Q_I_COFF 0x1fc00000 21262306a36Sopenharmony_ci#define AR_PHY_RX_IQCAL_CORR_LOOPBACK_IQCORR_Q_I_COFF_S 22 21362306a36Sopenharmony_ci 21462306a36Sopenharmony_ci/* 21562306a36Sopenharmony_ci * MRC Register Map 21662306a36Sopenharmony_ci */ 21762306a36Sopenharmony_ci#define AR_MRC_BASE 0x9c00 21862306a36Sopenharmony_ci 21962306a36Sopenharmony_ci#define AR_PHY_TIMING_3A (AR_MRC_BASE + 0x0) 22062306a36Sopenharmony_ci#define AR_PHY_LDPC_CNTL1 (AR_MRC_BASE + 0x4) 22162306a36Sopenharmony_ci#define AR_PHY_LDPC_CNTL2 (AR_MRC_BASE + 0x8) 22262306a36Sopenharmony_ci#define AR_PHY_PILOT_SPUR_MASK (AR_MRC_BASE + 0xc) 22362306a36Sopenharmony_ci#define AR_PHY_CHAN_SPUR_MASK (AR_MRC_BASE + 0x10) 22462306a36Sopenharmony_ci#define AR_PHY_SGI_DELTA (AR_MRC_BASE + 0x14) 22562306a36Sopenharmony_ci#define AR_PHY_ML_CNTL_1 (AR_MRC_BASE + 0x18) 22662306a36Sopenharmony_ci#define AR_PHY_ML_CNTL_2 (AR_MRC_BASE + 0x1c) 22762306a36Sopenharmony_ci#define AR_PHY_TST_ADC (AR_MRC_BASE + 0x20) 22862306a36Sopenharmony_ci 22962306a36Sopenharmony_ci#define AR_PHY_PILOT_SPUR_MASK_CF_PILOT_MASK_IDX_A 0x00000FE0 23062306a36Sopenharmony_ci#define AR_PHY_PILOT_SPUR_MASK_CF_PILOT_MASK_IDX_A_S 5 23162306a36Sopenharmony_ci#define AR_PHY_PILOT_SPUR_MASK_CF_PILOT_MASK_A 0x1F 23262306a36Sopenharmony_ci#define AR_PHY_PILOT_SPUR_MASK_CF_PILOT_MASK_A_S 0 23362306a36Sopenharmony_ci#define AR_PHY_PILOT_SPUR_MASK_CF_PILOT_MASK_IDX_B 0x00FE0000 23462306a36Sopenharmony_ci#define AR_PHY_PILOT_SPUR_MASK_CF_PILOT_MASK_IDX_B_S 17 23562306a36Sopenharmony_ci#define AR_PHY_PILOT_SPUR_MASK_CF_PILOT_MASK_B 0x0001F000 23662306a36Sopenharmony_ci#define AR_PHY_PILOT_SPUR_MASK_CF_PILOT_MASK_B_S 12 23762306a36Sopenharmony_ci 23862306a36Sopenharmony_ci#define AR_PHY_CHAN_SPUR_MASK_CF_CHAN_MASK_IDX_A 0x00000FE0 23962306a36Sopenharmony_ci#define AR_PHY_CHAN_SPUR_MASK_CF_CHAN_MASK_IDX_A_S 5 24062306a36Sopenharmony_ci#define AR_PHY_CHAN_SPUR_MASK_CF_CHAN_MASK_A 0x1F 24162306a36Sopenharmony_ci#define AR_PHY_CHAN_SPUR_MASK_CF_CHAN_MASK_A_S 0 24262306a36Sopenharmony_ci#define AR_PHY_CHAN_SPUR_MASK_CF_CHAN_MASK_IDX_B 0x00FE0000 24362306a36Sopenharmony_ci#define AR_PHY_CHAN_SPUR_MASK_CF_CHAN_MASK_IDX_B_S 17 24462306a36Sopenharmony_ci#define AR_PHY_CHAN_SPUR_MASK_CF_CHAN_MASK_B 0x0001F000 24562306a36Sopenharmony_ci#define AR_PHY_CHAN_SPUR_MASK_CF_CHAN_MASK_B_S 12 24662306a36Sopenharmony_ci 24762306a36Sopenharmony_ci 24862306a36Sopenharmony_ci/* 24962306a36Sopenharmony_ci * MRC Feild Definitions 25062306a36Sopenharmony_ci */ 25162306a36Sopenharmony_ci#define AR_PHY_SGI_DSC_MAN 0x0007FFF0 25262306a36Sopenharmony_ci#define AR_PHY_SGI_DSC_MAN_S 4 25362306a36Sopenharmony_ci#define AR_PHY_SGI_DSC_EXP 0x0000000F 25462306a36Sopenharmony_ci#define AR_PHY_SGI_DSC_EXP_S 0 25562306a36Sopenharmony_ci/* 25662306a36Sopenharmony_ci * BBB Register Map 25762306a36Sopenharmony_ci */ 25862306a36Sopenharmony_ci#define AR_BBB_BASE 0x9d00 25962306a36Sopenharmony_ci 26062306a36Sopenharmony_ci/* 26162306a36Sopenharmony_ci * AGC Register Map 26262306a36Sopenharmony_ci */ 26362306a36Sopenharmony_ci#define AR_AGC_BASE 0x9e00 26462306a36Sopenharmony_ci 26562306a36Sopenharmony_ci#define AR_PHY_SETTLING (AR_AGC_BASE + 0x0) 26662306a36Sopenharmony_ci#define AR_PHY_FORCEMAX_GAINS_0 (AR_AGC_BASE + 0x4) 26762306a36Sopenharmony_ci#define AR_PHY_GAINS_MINOFF0 (AR_AGC_BASE + 0x8) 26862306a36Sopenharmony_ci#define AR_PHY_DESIRED_SZ (AR_AGC_BASE + 0xc) 26962306a36Sopenharmony_ci#define AR_PHY_FIND_SIG (AR_AGC_BASE + 0x10) 27062306a36Sopenharmony_ci#define AR_PHY_AGC (AR_AGC_BASE + 0x14) 27162306a36Sopenharmony_ci#define AR_PHY_EXT_ATTEN_CTL_0 (AR_AGC_BASE + 0x18) 27262306a36Sopenharmony_ci#define AR_PHY_CCA_0 (AR_AGC_BASE + 0x1c) 27362306a36Sopenharmony_ci#define AR_PHY_CCA_CTRL_0 (AR_AGC_BASE + 0x20) 27462306a36Sopenharmony_ci#define AR_PHY_RESTART (AR_AGC_BASE + 0x24) 27562306a36Sopenharmony_ci 27662306a36Sopenharmony_ci/* 27762306a36Sopenharmony_ci * Antenna Diversity settings 27862306a36Sopenharmony_ci */ 27962306a36Sopenharmony_ci#define AR_PHY_MC_GAIN_CTRL (AR_AGC_BASE + 0x28) 28062306a36Sopenharmony_ci#define AR_ANT_DIV_CTRL_ALL 0x7e000000 28162306a36Sopenharmony_ci#define AR_ANT_DIV_CTRL_ALL_S 25 28262306a36Sopenharmony_ci#define AR_ANT_DIV_ENABLE 0x1000000 28362306a36Sopenharmony_ci#define AR_ANT_DIV_ENABLE_S 24 28462306a36Sopenharmony_ci 28562306a36Sopenharmony_ci 28662306a36Sopenharmony_ci#define AR_PHY_ANT_FAST_DIV_BIAS 0x00007e00 28762306a36Sopenharmony_ci#define AR_PHY_ANT_FAST_DIV_BIAS_S 9 28862306a36Sopenharmony_ci#define AR_PHY_ANT_SW_RX_PROT 0x00800000 28962306a36Sopenharmony_ci#define AR_PHY_ANT_SW_RX_PROT_S 23 29062306a36Sopenharmony_ci#define AR_PHY_ANT_DIV_LNADIV 0x01000000 29162306a36Sopenharmony_ci#define AR_PHY_ANT_DIV_LNADIV_S 24 29262306a36Sopenharmony_ci#define AR_PHY_ANT_DIV_ALT_LNACONF 0x06000000 29362306a36Sopenharmony_ci#define AR_PHY_ANT_DIV_ALT_LNACONF_S 25 29462306a36Sopenharmony_ci#define AR_PHY_ANT_DIV_MAIN_LNACONF 0x18000000 29562306a36Sopenharmony_ci#define AR_PHY_ANT_DIV_MAIN_LNACONF_S 27 29662306a36Sopenharmony_ci#define AR_PHY_ANT_DIV_ALT_GAINTB 0x20000000 29762306a36Sopenharmony_ci#define AR_PHY_ANT_DIV_ALT_GAINTB_S 29 29862306a36Sopenharmony_ci#define AR_PHY_ANT_DIV_MAIN_GAINTB 0x40000000 29962306a36Sopenharmony_ci#define AR_PHY_ANT_DIV_MAIN_GAINTB_S 30 30062306a36Sopenharmony_ci 30162306a36Sopenharmony_ci#define AR_PHY_EXTCHN_PWRTHR1 (AR_AGC_BASE + 0x2c) 30262306a36Sopenharmony_ci#define AR_PHY_EXT_CHN_WIN (AR_AGC_BASE + 0x30) 30362306a36Sopenharmony_ci#define AR_PHY_20_40_DET_THR (AR_AGC_BASE + 0x34) 30462306a36Sopenharmony_ci#define AR_PHY_RIFS_SRCH (AR_AGC_BASE + 0x38) 30562306a36Sopenharmony_ci#define AR_PHY_PEAK_DET_CTRL_1 (AR_AGC_BASE + 0x3c) 30662306a36Sopenharmony_ci#define AR_PHY_PEAK_DET_CTRL_2 (AR_AGC_BASE + 0x40) 30762306a36Sopenharmony_ci#define AR_PHY_RX_GAIN_BOUNDS_1 (AR_AGC_BASE + 0x44) 30862306a36Sopenharmony_ci#define AR_PHY_RX_GAIN_BOUNDS_2 (AR_AGC_BASE + 0x48) 30962306a36Sopenharmony_ci#define AR_PHY_RSSI_0 (AR_AGC_BASE + 0x180) 31062306a36Sopenharmony_ci#define AR_PHY_SPUR_CCK_REP0 (AR_AGC_BASE + 0x184) 31162306a36Sopenharmony_ci 31262306a36Sopenharmony_ci#define AR_PHY_CCK_DETECT (AR_AGC_BASE + 0x1c0) 31362306a36Sopenharmony_ci#define AR_FAST_DIV_ENABLE 0x2000 31462306a36Sopenharmony_ci#define AR_FAST_DIV_ENABLE_S 13 31562306a36Sopenharmony_ci 31662306a36Sopenharmony_ci#define AR_PHY_DAG_CTRLCCK (AR_AGC_BASE + 0x1c4) 31762306a36Sopenharmony_ci#define AR_PHY_IQCORR_CTRL_CCK (AR_AGC_BASE + 0x1c8) 31862306a36Sopenharmony_ci 31962306a36Sopenharmony_ci#define AR_PHY_CCK_SPUR_MIT (AR_AGC_BASE + 0x1cc) 32062306a36Sopenharmony_ci#define AR_PHY_CCK_SPUR_MIT_SPUR_RSSI_THR 0x000001fe 32162306a36Sopenharmony_ci#define AR_PHY_CCK_SPUR_MIT_SPUR_RSSI_THR_S 1 32262306a36Sopenharmony_ci#define AR_PHY_CCK_SPUR_MIT_SPUR_FILTER_TYPE 0x60000000 32362306a36Sopenharmony_ci#define AR_PHY_CCK_SPUR_MIT_SPUR_FILTER_TYPE_S 29 32462306a36Sopenharmony_ci#define AR_PHY_CCK_SPUR_MIT_USE_CCK_SPUR_MIT 0x00000001 32562306a36Sopenharmony_ci#define AR_PHY_CCK_SPUR_MIT_USE_CCK_SPUR_MIT_S 0 32662306a36Sopenharmony_ci#define AR_PHY_CCK_SPUR_MIT_CCK_SPUR_FREQ 0x1ffffe00 32762306a36Sopenharmony_ci#define AR_PHY_CCK_SPUR_MIT_CCK_SPUR_FREQ_S 9 32862306a36Sopenharmony_ci 32962306a36Sopenharmony_ci#define AR_PHY_MRC_CCK_CTRL (AR_AGC_BASE + 0x1d0) 33062306a36Sopenharmony_ci#define AR_PHY_MRC_CCK_ENABLE 0x00000001 33162306a36Sopenharmony_ci#define AR_PHY_MRC_CCK_ENABLE_S 0 33262306a36Sopenharmony_ci#define AR_PHY_MRC_CCK_MUX_REG 0x00000002 33362306a36Sopenharmony_ci#define AR_PHY_MRC_CCK_MUX_REG_S 1 33462306a36Sopenharmony_ci 33562306a36Sopenharmony_ci#define AR_PHY_RX_OCGAIN (AR_AGC_BASE + 0x200) 33662306a36Sopenharmony_ci 33762306a36Sopenharmony_ci#define AR_PHY_CCA_NOM_VAL_9300_2GHZ -110 33862306a36Sopenharmony_ci#define AR_PHY_CCA_NOM_VAL_9300_5GHZ -115 33962306a36Sopenharmony_ci#define AR_PHY_CCA_MIN_GOOD_VAL_9300_2GHZ -125 34062306a36Sopenharmony_ci#define AR_PHY_CCA_MIN_GOOD_VAL_9300_5GHZ -125 34162306a36Sopenharmony_ci#define AR_PHY_CCA_MAX_GOOD_VAL_9300_2GHZ -60 34262306a36Sopenharmony_ci#define AR_PHY_CCA_MAX_GOOD_VAL_9300_5GHZ -60 34362306a36Sopenharmony_ci#define AR_PHY_CCA_MAX_GOOD_VAL_9300_FCC_2GHZ -95 34462306a36Sopenharmony_ci#define AR_PHY_CCA_MAX_GOOD_VAL_9300_FCC_5GHZ -100 34562306a36Sopenharmony_ci 34662306a36Sopenharmony_ci#define AR_PHY_CCA_NOM_VAL_9462_2GHZ -127 34762306a36Sopenharmony_ci#define AR_PHY_CCA_MIN_GOOD_VAL_9462_2GHZ -127 34862306a36Sopenharmony_ci#define AR_PHY_CCA_MAX_GOOD_VAL_9462_2GHZ -60 34962306a36Sopenharmony_ci#define AR_PHY_CCA_NOM_VAL_9462_5GHZ -127 35062306a36Sopenharmony_ci#define AR_PHY_CCA_MIN_GOOD_VAL_9462_5GHZ -127 35162306a36Sopenharmony_ci#define AR_PHY_CCA_MAX_GOOD_VAL_9462_5GHZ -60 35262306a36Sopenharmony_ci 35362306a36Sopenharmony_ci#define AR_PHY_CCA_NOM_VAL_9330_2GHZ -118 35462306a36Sopenharmony_ci 35562306a36Sopenharmony_ci#define AR9300_EXT_LNA_CTL_GPIO_AR9485 9 35662306a36Sopenharmony_ci 35762306a36Sopenharmony_ci/* 35862306a36Sopenharmony_ci * AGC Field Definitions 35962306a36Sopenharmony_ci */ 36062306a36Sopenharmony_ci#define AR_PHY_EXT_ATTEN_CTL_RXTX_MARGIN 0x00FC0000 36162306a36Sopenharmony_ci#define AR_PHY_EXT_ATTEN_CTL_RXTX_MARGIN_S 18 36262306a36Sopenharmony_ci#define AR_PHY_EXT_ATTEN_CTL_BSW_MARGIN 0x00003C00 36362306a36Sopenharmony_ci#define AR_PHY_EXT_ATTEN_CTL_BSW_MARGIN_S 10 36462306a36Sopenharmony_ci#define AR_PHY_EXT_ATTEN_CTL_BSW_ATTEN 0x0000001F 36562306a36Sopenharmony_ci#define AR_PHY_EXT_ATTEN_CTL_BSW_ATTEN_S 0 36662306a36Sopenharmony_ci#define AR_PHY_EXT_ATTEN_CTL_XATTEN2_MARGIN 0x003E0000 36762306a36Sopenharmony_ci#define AR_PHY_EXT_ATTEN_CTL_XATTEN2_MARGIN_S 17 36862306a36Sopenharmony_ci#define AR_PHY_EXT_ATTEN_CTL_XATTEN1_MARGIN 0x0001F000 36962306a36Sopenharmony_ci#define AR_PHY_EXT_ATTEN_CTL_XATTEN1_MARGIN_S 12 37062306a36Sopenharmony_ci#define AR_PHY_EXT_ATTEN_CTL_XATTEN2_DB 0x00000FC0 37162306a36Sopenharmony_ci#define AR_PHY_EXT_ATTEN_CTL_XATTEN2_DB_S 6 37262306a36Sopenharmony_ci#define AR_PHY_EXT_ATTEN_CTL_XATTEN1_DB 0x0000003F 37362306a36Sopenharmony_ci#define AR_PHY_EXT_ATTEN_CTL_XATTEN1_DB_S 0 37462306a36Sopenharmony_ci#define AR_PHY_RXGAIN_TXRX_ATTEN 0x0003F000 37562306a36Sopenharmony_ci#define AR_PHY_RXGAIN_TXRX_ATTEN_S 12 37662306a36Sopenharmony_ci#define AR_PHY_RXGAIN_TXRX_RF_MAX 0x007C0000 37762306a36Sopenharmony_ci#define AR_PHY_RXGAIN_TXRX_RF_MAX_S 18 37862306a36Sopenharmony_ci#define AR9280_PHY_RXGAIN_TXRX_ATTEN 0x00003F80 37962306a36Sopenharmony_ci#define AR9280_PHY_RXGAIN_TXRX_ATTEN_S 7 38062306a36Sopenharmony_ci#define AR9280_PHY_RXGAIN_TXRX_MARGIN 0x001FC000 38162306a36Sopenharmony_ci#define AR9280_PHY_RXGAIN_TXRX_MARGIN_S 14 38262306a36Sopenharmony_ci#define AR_PHY_SETTLING_SWITCH 0x00003F80 38362306a36Sopenharmony_ci#define AR_PHY_SETTLING_SWITCH_S 7 38462306a36Sopenharmony_ci#define AR_PHY_DESIRED_SZ_ADC 0x000000FF 38562306a36Sopenharmony_ci#define AR_PHY_DESIRED_SZ_ADC_S 0 38662306a36Sopenharmony_ci#define AR_PHY_DESIRED_SZ_PGA 0x0000FF00 38762306a36Sopenharmony_ci#define AR_PHY_DESIRED_SZ_PGA_S 8 38862306a36Sopenharmony_ci#define AR_PHY_DESIRED_SZ_TOT_DES 0x0FF00000 38962306a36Sopenharmony_ci#define AR_PHY_DESIRED_SZ_TOT_DES_S 20 39062306a36Sopenharmony_ci#define AR_PHY_MINCCA_PWR 0x1FF00000 39162306a36Sopenharmony_ci#define AR_PHY_MINCCA_PWR_S 20 39262306a36Sopenharmony_ci#define AR_PHY_CCA_THRESH62 0x0007F000 39362306a36Sopenharmony_ci#define AR_PHY_CCA_THRESH62_S 12 39462306a36Sopenharmony_ci#define AR9280_PHY_MINCCA_PWR 0x1FF00000 39562306a36Sopenharmony_ci#define AR9280_PHY_MINCCA_PWR_S 20 39662306a36Sopenharmony_ci#define AR9280_PHY_CCA_THRESH62 0x000FF000 39762306a36Sopenharmony_ci#define AR9280_PHY_CCA_THRESH62_S 12 39862306a36Sopenharmony_ci#define AR_PHY_EXT_CCA0_THRESH62 0x000000FF 39962306a36Sopenharmony_ci#define AR_PHY_EXT_CCA0_THRESH62_S 0 40062306a36Sopenharmony_ci#define AR_PHY_EXT_CCA0_THRESH62_1 0x000001FF 40162306a36Sopenharmony_ci#define AR_PHY_EXT_CCA0_THRESH62_1_S 0 40262306a36Sopenharmony_ci#define AR_PHY_CCK_DETECT_WEAK_SIG_THR_CCK 0x0000003F 40362306a36Sopenharmony_ci#define AR_PHY_CCK_DETECT_WEAK_SIG_THR_CCK_S 0 40462306a36Sopenharmony_ci#define AR_PHY_CCK_DETECT_ANT_SWITCH_TIME 0x00001FC0 40562306a36Sopenharmony_ci#define AR_PHY_CCK_DETECT_ANT_SWITCH_TIME_S 6 40662306a36Sopenharmony_ci#define AR_PHY_CCK_DETECT_BB_ENABLE_ANT_FAST_DIV 0x2000 40762306a36Sopenharmony_ci 40862306a36Sopenharmony_ci#define AR_PHY_DAG_CTRLCCK_EN_RSSI_THR 0x00000200 40962306a36Sopenharmony_ci#define AR_PHY_DAG_CTRLCCK_EN_RSSI_THR_S 9 41062306a36Sopenharmony_ci#define AR_PHY_DAG_CTRLCCK_RSSI_THR 0x0001FC00 41162306a36Sopenharmony_ci#define AR_PHY_DAG_CTRLCCK_RSSI_THR_S 10 41262306a36Sopenharmony_ci 41362306a36Sopenharmony_ci#define AR_PHY_RIFS_INIT_DELAY 0x3ff0000 41462306a36Sopenharmony_ci#define AR_PHY_AGC_QUICK_DROP 0x03c00000 41562306a36Sopenharmony_ci#define AR_PHY_AGC_QUICK_DROP_S 22 41662306a36Sopenharmony_ci#define AR_PHY_AGC_COARSE_LOW 0x00007F80 41762306a36Sopenharmony_ci#define AR_PHY_AGC_COARSE_LOW_S 7 41862306a36Sopenharmony_ci#define AR_PHY_AGC_COARSE_HIGH 0x003F8000 41962306a36Sopenharmony_ci#define AR_PHY_AGC_COARSE_HIGH_S 15 42062306a36Sopenharmony_ci#define AR_PHY_AGC_COARSE_PWR_CONST 0x0000007F 42162306a36Sopenharmony_ci#define AR_PHY_AGC_COARSE_PWR_CONST_S 0 42262306a36Sopenharmony_ci#define AR_PHY_FIND_SIG_FIRSTEP 0x0003F000 42362306a36Sopenharmony_ci#define AR_PHY_FIND_SIG_FIRSTEP_S 12 42462306a36Sopenharmony_ci#define AR_PHY_FIND_SIG_FIRPWR 0x03FC0000 42562306a36Sopenharmony_ci#define AR_PHY_FIND_SIG_FIRPWR_S 18 42662306a36Sopenharmony_ci#define AR_PHY_FIND_SIG_FIRPWR_SIGN_BIT 25 42762306a36Sopenharmony_ci#define AR_PHY_FIND_SIG_RELPWR (0x1f << 6) 42862306a36Sopenharmony_ci#define AR_PHY_FIND_SIG_RELPWR_S 6 42962306a36Sopenharmony_ci#define AR_PHY_FIND_SIG_RELPWR_SIGN_BIT 11 43062306a36Sopenharmony_ci#define AR_PHY_FIND_SIG_RELSTEP 0x1f 43162306a36Sopenharmony_ci#define AR_PHY_FIND_SIG_RELSTEP_S 0 43262306a36Sopenharmony_ci#define AR_PHY_FIND_SIG_RELSTEP_SIGN_BIT 5 43362306a36Sopenharmony_ci#define AR_PHY_RESTART_ENABLE_DIV_M2FLAG 0x00200000 43462306a36Sopenharmony_ci#define AR_PHY_RESTART_ENABLE_DIV_M2FLAG_S 21 43562306a36Sopenharmony_ci#define AR_PHY_RESTART_DIV_GC 0x001C0000 43662306a36Sopenharmony_ci#define AR_PHY_RESTART_DIV_GC_S 18 43762306a36Sopenharmony_ci#define AR_PHY_RESTART_ENA 0x01 43862306a36Sopenharmony_ci#define AR_PHY_DC_RESTART_DIS 0x40000000 43962306a36Sopenharmony_ci 44062306a36Sopenharmony_ci#define AR_PHY_TPC_OLPC_GAIN_DELTA_PAL_ON 0xFF000000 44162306a36Sopenharmony_ci#define AR_PHY_TPC_OLPC_GAIN_DELTA_PAL_ON_S 24 44262306a36Sopenharmony_ci#define AR_PHY_TPC_OLPC_GAIN_DELTA 0x00FF0000 44362306a36Sopenharmony_ci#define AR_PHY_TPC_OLPC_GAIN_DELTA_S 16 44462306a36Sopenharmony_ci 44562306a36Sopenharmony_ci#define AR_PHY_TPC_6_ERROR_EST_MODE 0x03000000 44662306a36Sopenharmony_ci#define AR_PHY_TPC_6_ERROR_EST_MODE_S 24 44762306a36Sopenharmony_ci 44862306a36Sopenharmony_ci/* 44962306a36Sopenharmony_ci * SM Register Map 45062306a36Sopenharmony_ci */ 45162306a36Sopenharmony_ci#define AR_SM_BASE 0xa200 45262306a36Sopenharmony_ci 45362306a36Sopenharmony_ci#define AR_PHY_D2_CHIP_ID (AR_SM_BASE + 0x0) 45462306a36Sopenharmony_ci#define AR_PHY_GEN_CTRL (AR_SM_BASE + 0x4) 45562306a36Sopenharmony_ci#define AR_PHY_MODE (AR_SM_BASE + 0x8) 45662306a36Sopenharmony_ci#define AR_PHY_ACTIVE (AR_SM_BASE + 0xc) 45762306a36Sopenharmony_ci#define AR_PHY_SPUR_MASK_A(_ah) (AR_SM_BASE + (AR_SREV_9561(_ah) ? 0x18 : 0x20)) 45862306a36Sopenharmony_ci#define AR_PHY_SPUR_MASK_B(_ah) (AR_SM_BASE + (AR_SREV_9561(_ah) ? 0x1c : 0x24)) 45962306a36Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN (AR_SM_BASE + 0x28) 46062306a36Sopenharmony_ci#define AR_PHY_RADAR_BW_FILTER (AR_SM_BASE + 0x2c) 46162306a36Sopenharmony_ci#define AR_PHY_SEARCH_START_DELAY (AR_SM_BASE + 0x30) 46262306a36Sopenharmony_ci#define AR_PHY_MAX_RX_LEN (AR_SM_BASE + 0x34) 46362306a36Sopenharmony_ci#define AR_PHY_FRAME_CTL (AR_SM_BASE + 0x38) 46462306a36Sopenharmony_ci#define AR_PHY_RFBUS_REQ (AR_SM_BASE + 0x3c) 46562306a36Sopenharmony_ci#define AR_PHY_RFBUS_GRANT (AR_SM_BASE + 0x40) 46662306a36Sopenharmony_ci#define AR_PHY_RIFS (AR_SM_BASE + 0x44) 46762306a36Sopenharmony_ci#define AR_PHY_RX_CLR_DELAY (AR_SM_BASE + 0x50) 46862306a36Sopenharmony_ci#define AR_PHY_RX_DELAY (AR_SM_BASE + 0x54) 46962306a36Sopenharmony_ci 47062306a36Sopenharmony_ci#define AR_PHY_XPA_TIMING_CTL (AR_SM_BASE + 0x64) 47162306a36Sopenharmony_ci#define AR_PHY_MISC_PA_CTL (AR_SM_BASE + 0x80) 47262306a36Sopenharmony_ci#define AR_PHY_SWITCH_CHAIN_0 (AR_SM_BASE + 0x84) 47362306a36Sopenharmony_ci#define AR_PHY_SWITCH_COM (AR_SM_BASE + 0x88) 47462306a36Sopenharmony_ci#define AR_PHY_SWITCH_COM_2 (AR_SM_BASE + 0x8c) 47562306a36Sopenharmony_ci#define AR_PHY_RX_CHAINMASK (AR_SM_BASE + 0xa0) 47662306a36Sopenharmony_ci#define AR_PHY_CAL_CHAINMASK (AR_SM_BASE + 0xc0) 47762306a36Sopenharmony_ci#define AR_PHY_CALMODE (AR_SM_BASE + 0xc8) 47862306a36Sopenharmony_ci#define AR_PHY_FCAL_1 (AR_SM_BASE + 0xcc) 47962306a36Sopenharmony_ci#define AR_PHY_FCAL_2_0 (AR_SM_BASE + 0xd0) 48062306a36Sopenharmony_ci#define AR_PHY_DFT_TONE_CTL_0 (AR_SM_BASE + 0xd4) 48162306a36Sopenharmony_ci#define AR_PHY_CL_CAL_CTL (AR_SM_BASE + 0xd8) 48262306a36Sopenharmony_ci#define AR_PHY_CL_TAB_0 (AR_SM_BASE + 0x100) 48362306a36Sopenharmony_ci#define AR_PHY_SYNTH_CONTROL (AR_SM_BASE + 0x140) 48462306a36Sopenharmony_ci#define AR_PHY_ADDAC_CLK_SEL (AR_SM_BASE + 0x144) 48562306a36Sopenharmony_ci#define AR_PHY_PLL_CTL (AR_SM_BASE + 0x148) 48662306a36Sopenharmony_ci#define AR_PHY_ANALOG_SWAP (AR_SM_BASE + 0x14c) 48762306a36Sopenharmony_ci#define AR_PHY_ADDAC_PARA_CTL (AR_SM_BASE + 0x150) 48862306a36Sopenharmony_ci#define AR_PHY_XPA_CFG (AR_SM_BASE + 0x158) 48962306a36Sopenharmony_ci 49062306a36Sopenharmony_ci#define AR_PHY_FLC_PWR_THRESH 7 49162306a36Sopenharmony_ci#define AR_PHY_FLC_PWR_THRESH_S 0 49262306a36Sopenharmony_ci 49362306a36Sopenharmony_ci#define AR_PHY_FRAME_CTL_CF_OVERLAP_WINDOW 3 49462306a36Sopenharmony_ci#define AR_PHY_FRAME_CTL_CF_OVERLAP_WINDOW_S 0 49562306a36Sopenharmony_ci 49662306a36Sopenharmony_ci#define AR_PHY_SPUR_MASK_A_CF_PUNC_MASK_IDX_A 0x0001FC00 49762306a36Sopenharmony_ci#define AR_PHY_SPUR_MASK_A_CF_PUNC_MASK_IDX_A_S 10 49862306a36Sopenharmony_ci#define AR_PHY_SPUR_MASK_A_CF_PUNC_MASK_A 0x3FF 49962306a36Sopenharmony_ci#define AR_PHY_SPUR_MASK_A_CF_PUNC_MASK_A_S 0 50062306a36Sopenharmony_ci 50162306a36Sopenharmony_ci#define AR_PHY_TEST(_ah) (AR_SM_BASE + (AR_SREV_9561(_ah) ? 0x15c : 0x160)) 50262306a36Sopenharmony_ci 50362306a36Sopenharmony_ci#define AR_PHY_TEST_BBB_OBS_SEL 0x780000 50462306a36Sopenharmony_ci#define AR_PHY_TEST_BBB_OBS_SEL_S 19 50562306a36Sopenharmony_ci 50662306a36Sopenharmony_ci#define AR_PHY_TEST_RX_OBS_SEL_BIT5_S 23 50762306a36Sopenharmony_ci#define AR_PHY_TEST_RX_OBS_SEL_BIT5 (1 << AR_PHY_TEST_RX_OBS_SEL_BIT5_S) 50862306a36Sopenharmony_ci 50962306a36Sopenharmony_ci#define AR_PHY_TEST_CHAIN_SEL 0xC0000000 51062306a36Sopenharmony_ci#define AR_PHY_TEST_CHAIN_SEL_S 30 51162306a36Sopenharmony_ci 51262306a36Sopenharmony_ci#define AR_PHY_TEST_CTL_STATUS(_ah) (AR_SM_BASE + (AR_SREV_9561(_ah) ? 0x160 : 0x164)) 51362306a36Sopenharmony_ci#define AR_PHY_TEST_CTL_TSTDAC_EN 0x1 51462306a36Sopenharmony_ci#define AR_PHY_TEST_CTL_TSTDAC_EN_S 0 51562306a36Sopenharmony_ci#define AR_PHY_TEST_CTL_TX_OBS_SEL 0x1C 51662306a36Sopenharmony_ci#define AR_PHY_TEST_CTL_TX_OBS_SEL_S 2 51762306a36Sopenharmony_ci#define AR_PHY_TEST_CTL_TX_OBS_MUX_SEL 0x60 51862306a36Sopenharmony_ci#define AR_PHY_TEST_CTL_TX_OBS_MUX_SEL_S 5 51962306a36Sopenharmony_ci#define AR_PHY_TEST_CTL_TSTADC_EN 0x100 52062306a36Sopenharmony_ci#define AR_PHY_TEST_CTL_TSTADC_EN_S 8 52162306a36Sopenharmony_ci#define AR_PHY_TEST_CTL_RX_OBS_SEL 0x3C00 52262306a36Sopenharmony_ci#define AR_PHY_TEST_CTL_RX_OBS_SEL_S 10 52362306a36Sopenharmony_ci#define AR_PHY_TEST_CTL_DEBUGPORT_SEL 0xe0000000 52462306a36Sopenharmony_ci#define AR_PHY_TEST_CTL_DEBUGPORT_SEL_S 29 52562306a36Sopenharmony_ci 52662306a36Sopenharmony_ci 52762306a36Sopenharmony_ci#define AR_PHY_TSTDAC(_ah) (AR_SM_BASE + (AR_SREV_9561(_ah) ? 0x164 : 0x168)) 52862306a36Sopenharmony_ci 52962306a36Sopenharmony_ci#define AR_PHY_CHAN_STATUS(_ah) (AR_SM_BASE + (AR_SREV_9561(_ah) ? 0x168 : 0x16c)) 53062306a36Sopenharmony_ci 53162306a36Sopenharmony_ci#define AR_PHY_CHAN_INFO_MEMORY(_ah) (AR_SM_BASE + (AR_SREV_9561(_ah) ? 0x16c : 0x170)) 53262306a36Sopenharmony_ci#define AR_PHY_CHAN_INFO_MEMORY_CHANINFOMEM_S2_READ 0x00000008 53362306a36Sopenharmony_ci#define AR_PHY_CHAN_INFO_MEMORY_CHANINFOMEM_S2_READ_S 3 53462306a36Sopenharmony_ci 53562306a36Sopenharmony_ci#define AR_PHY_CHNINFO_NOISEPWR(_ah) (AR_SM_BASE + (AR_SREV_9561(_ah) ? 0x170 : 0x174)) 53662306a36Sopenharmony_ci#define AR_PHY_CHNINFO_GAINDIFF(_ah) (AR_SM_BASE + (AR_SREV_9561(_ah) ? 0x174 : 0x178)) 53762306a36Sopenharmony_ci#define AR_PHY_CHNINFO_FINETIM(_ah) (AR_SM_BASE + (AR_SREV_9561(_ah) ? 0x178 : 0x17c)) 53862306a36Sopenharmony_ci#define AR_PHY_CHAN_INFO_GAIN_0(_ah) (AR_SM_BASE + (AR_SREV_9561(_ah) ? 0x17c : 0x180)) 53962306a36Sopenharmony_ci#define AR_PHY_SCRAMBLER_SEED(_ah) (AR_SM_BASE + (AR_SREV_9561(_ah) ? 0x184 : 0x190)) 54062306a36Sopenharmony_ci#define AR_PHY_CCK_TX_CTRL(_ah) (AR_SM_BASE + (AR_SREV_9561(_ah) ? 0x188 : 0x194)) 54162306a36Sopenharmony_ci 54262306a36Sopenharmony_ci#define AR_PHY_HEAVYCLIP_CTL(_ah) (AR_SM_BASE + (AR_SREV_9561(_ah) ? 0x198 : 0x1a4)) 54362306a36Sopenharmony_ci#define AR_PHY_HEAVYCLIP_20 (AR_SM_BASE + 0x1a8) 54462306a36Sopenharmony_ci#define AR_PHY_HEAVYCLIP_40 (AR_SM_BASE + 0x1ac) 54562306a36Sopenharmony_ci#define AR_PHY_HEAVYCLIP_1 (AR_SM_BASE + 0x19c) 54662306a36Sopenharmony_ci#define AR_PHY_HEAVYCLIP_2 (AR_SM_BASE + 0x1a0) 54762306a36Sopenharmony_ci#define AR_PHY_HEAVYCLIP_3 (AR_SM_BASE + 0x1a4) 54862306a36Sopenharmony_ci#define AR_PHY_HEAVYCLIP_4 (AR_SM_BASE + 0x1a8) 54962306a36Sopenharmony_ci#define AR_PHY_HEAVYCLIP_5 (AR_SM_BASE + 0x1ac) 55062306a36Sopenharmony_ci#define AR_PHY_ILLEGAL_TXRATE (AR_SM_BASE + 0x1b0) 55162306a36Sopenharmony_ci 55262306a36Sopenharmony_ci#define AR_PHY_POWER_TX_RATE(_d) (AR_SM_BASE + 0x1c0 + ((_d) << 2)) 55362306a36Sopenharmony_ci 55462306a36Sopenharmony_ci#define AR_PHY_PWRTX_MAX (AR_SM_BASE + 0x1f0) 55562306a36Sopenharmony_ci#define AR_PHY_POWER_TX_SUB (AR_SM_BASE + 0x1f4) 55662306a36Sopenharmony_ci 55762306a36Sopenharmony_ci#define AR_PHY_TPC_1 (AR_SM_BASE + 0x1f8) 55862306a36Sopenharmony_ci#define AR_PHY_TPC_1_FORCED_DAC_GAIN 0x0000003e 55962306a36Sopenharmony_ci#define AR_PHY_TPC_1_FORCED_DAC_GAIN_S 1 56062306a36Sopenharmony_ci#define AR_PHY_TPC_1_FORCE_DAC_GAIN 0x00000001 56162306a36Sopenharmony_ci#define AR_PHY_TPC_1_FORCE_DAC_GAIN_S 0 56262306a36Sopenharmony_ci 56362306a36Sopenharmony_ci#define AR_PHY_TPC_4_B0 (AR_SM_BASE + 0x204) 56462306a36Sopenharmony_ci#define AR_PHY_TPC_5_B0 (AR_SM_BASE + 0x208) 56562306a36Sopenharmony_ci#define AR_PHY_TPC_6_B0 (AR_SM_BASE + 0x20c) 56662306a36Sopenharmony_ci 56762306a36Sopenharmony_ci#define AR_PHY_TPC_11_B0 (AR_SM_BASE + 0x220) 56862306a36Sopenharmony_ci#define AR_PHY_TPC_11_B1 (AR_SM1_BASE + 0x220) 56962306a36Sopenharmony_ci#define AR_PHY_TPC_11_B2 (AR_SM2_BASE + 0x220) 57062306a36Sopenharmony_ci#define AR_PHY_TPC_11_OLPC_GAIN_DELTA 0x00ff0000 57162306a36Sopenharmony_ci#define AR_PHY_TPC_11_OLPC_GAIN_DELTA_S 16 57262306a36Sopenharmony_ci 57362306a36Sopenharmony_ci#define AR_PHY_TPC_12 (AR_SM_BASE + 0x224) 57462306a36Sopenharmony_ci#define AR_PHY_TPC_12_DESIRED_SCALE_HT40_5 0x3e000000 57562306a36Sopenharmony_ci#define AR_PHY_TPC_12_DESIRED_SCALE_HT40_5_S 25 57662306a36Sopenharmony_ci 57762306a36Sopenharmony_ci#define AR_PHY_TPC_18 (AR_SM_BASE + 0x23c) 57862306a36Sopenharmony_ci#define AR_PHY_TPC_18_THERM_CAL_VALUE 0x000000ff 57962306a36Sopenharmony_ci#define AR_PHY_TPC_18_THERM_CAL_VALUE_S 0 58062306a36Sopenharmony_ci#define AR_PHY_TPC_18_VOLT_CAL_VALUE 0x0000ff00 58162306a36Sopenharmony_ci#define AR_PHY_TPC_18_VOLT_CAL_VALUE_S 8 58262306a36Sopenharmony_ci 58362306a36Sopenharmony_ci#define AR_PHY_TPC_19 (AR_SM_BASE + 0x240) 58462306a36Sopenharmony_ci#define AR_PHY_TPC_19_ALPHA_VOLT 0x001f0000 58562306a36Sopenharmony_ci#define AR_PHY_TPC_19_ALPHA_VOLT_S 16 58662306a36Sopenharmony_ci#define AR_PHY_TPC_19_ALPHA_THERM 0xff 58762306a36Sopenharmony_ci#define AR_PHY_TPC_19_ALPHA_THERM_S 0 58862306a36Sopenharmony_ci 58962306a36Sopenharmony_ci#define AR_PHY_TX_FORCED_GAIN (AR_SM_BASE + 0x258) 59062306a36Sopenharmony_ci#define AR_PHY_TX_FORCED_GAIN_FORCE_TX_GAIN 0x00000001 59162306a36Sopenharmony_ci#define AR_PHY_TX_FORCED_GAIN_FORCE_TX_GAIN_S 0 59262306a36Sopenharmony_ci#define AR_PHY_TX_FORCED_GAIN_FORCED_TXBB1DBGAIN 0x0000000e 59362306a36Sopenharmony_ci#define AR_PHY_TX_FORCED_GAIN_FORCED_TXBB1DBGAIN_S 1 59462306a36Sopenharmony_ci#define AR_PHY_TX_FORCED_GAIN_FORCED_TXBB6DBGAIN 0x00000030 59562306a36Sopenharmony_ci#define AR_PHY_TX_FORCED_GAIN_FORCED_TXBB6DBGAIN_S 4 59662306a36Sopenharmony_ci#define AR_PHY_TX_FORCED_GAIN_FORCED_TXMXRGAIN 0x000003c0 59762306a36Sopenharmony_ci#define AR_PHY_TX_FORCED_GAIN_FORCED_TXMXRGAIN_S 6 59862306a36Sopenharmony_ci#define AR_PHY_TX_FORCED_GAIN_FORCED_PADRVGNA 0x00003c00 59962306a36Sopenharmony_ci#define AR_PHY_TX_FORCED_GAIN_FORCED_PADRVGNA_S 10 60062306a36Sopenharmony_ci#define AR_PHY_TX_FORCED_GAIN_FORCED_PADRVGNB 0x0003c000 60162306a36Sopenharmony_ci#define AR_PHY_TX_FORCED_GAIN_FORCED_PADRVGNB_S 14 60262306a36Sopenharmony_ci#define AR_PHY_TX_FORCED_GAIN_FORCED_PADRVGNC 0x003c0000 60362306a36Sopenharmony_ci#define AR_PHY_TX_FORCED_GAIN_FORCED_PADRVGNC_S 18 60462306a36Sopenharmony_ci#define AR_PHY_TX_FORCED_GAIN_FORCED_PADRVGND 0x00c00000 60562306a36Sopenharmony_ci#define AR_PHY_TX_FORCED_GAIN_FORCED_PADRVGND_S 22 60662306a36Sopenharmony_ci#define AR_PHY_TX_FORCED_GAIN_FORCED_ENABLE_PAL 0x01000000 60762306a36Sopenharmony_ci#define AR_PHY_TX_FORCED_GAIN_FORCED_ENABLE_PAL_S 24 60862306a36Sopenharmony_ci 60962306a36Sopenharmony_ci 61062306a36Sopenharmony_ci#define AR_PHY_PDADC_TAB_0 (AR_SM_BASE + 0x280) 61162306a36Sopenharmony_ci 61262306a36Sopenharmony_ci#define AR_PHY_TXGAIN_TABLE (AR_SM_BASE + 0x300) 61362306a36Sopenharmony_ci 61462306a36Sopenharmony_ci#define AR_PHY_TX_IQCAL_CONTROL_0(_ah) (AR_SM_BASE + (AR_SREV_9485(_ah) ? \ 61562306a36Sopenharmony_ci 0x3c4 : 0x444)) 61662306a36Sopenharmony_ci#define AR_PHY_TX_IQCAL_CONTROL_1(_ah) (AR_SM_BASE + (AR_SREV_9485(_ah) ? \ 61762306a36Sopenharmony_ci 0x3c8 : 0x448)) 61862306a36Sopenharmony_ci#define AR_PHY_TX_IQCAL_START(_ah) (AR_SM_BASE + (AR_SREV_9485(_ah) ? \ 61962306a36Sopenharmony_ci 0x3c4 : 0x440)) 62062306a36Sopenharmony_ci#define AR_PHY_TX_IQCAL_STATUS_B0(_ah) (AR_SM_BASE + (AR_SREV_9485(_ah) ? \ 62162306a36Sopenharmony_ci 0x3f0 : 0x48c)) 62262306a36Sopenharmony_ci#define AR_PHY_TX_IQCAL_CORR_COEFF_B0(_ah, _i) (AR_SM_BASE + \ 62362306a36Sopenharmony_ci (AR_SREV_9485(_ah) ? \ 62462306a36Sopenharmony_ci 0x3d0 : 0x450) + ((_i) << 2)) 62562306a36Sopenharmony_ci#define AR_PHY_RTT_CTRL (AR_SM_BASE + 0x380) 62662306a36Sopenharmony_ci 62762306a36Sopenharmony_ci#define AR_PHY_WATCHDOG_STATUS (AR_SM_BASE + 0x5c0) 62862306a36Sopenharmony_ci#define AR_PHY_WATCHDOG_CTL_1 (AR_SM_BASE + 0x5c4) 62962306a36Sopenharmony_ci#define AR_PHY_WATCHDOG_CTL_2 (AR_SM_BASE + 0x5c8) 63062306a36Sopenharmony_ci#define AR_PHY_WATCHDOG_CTL (AR_SM_BASE + 0x5cc) 63162306a36Sopenharmony_ci#define AR_PHY_ONLY_WARMRESET (AR_SM_BASE + 0x5d0) 63262306a36Sopenharmony_ci#define AR_PHY_ONLY_CTL (AR_SM_BASE + 0x5d4) 63362306a36Sopenharmony_ci#define AR_PHY_ECO_CTRL (AR_SM_BASE + 0x5dc) 63462306a36Sopenharmony_ci 63562306a36Sopenharmony_ci#define AR_PHY_BB_THERM_ADC_1 (AR_SM_BASE + 0x248) 63662306a36Sopenharmony_ci#define AR_PHY_BB_THERM_ADC_1_INIT_THERM 0x000000ff 63762306a36Sopenharmony_ci#define AR_PHY_BB_THERM_ADC_1_INIT_THERM_S 0 63862306a36Sopenharmony_ci 63962306a36Sopenharmony_ci#define AR_PHY_BB_THERM_ADC_3 (AR_SM_BASE + 0x250) 64062306a36Sopenharmony_ci#define AR_PHY_BB_THERM_ADC_3_THERM_ADC_SCALE_GAIN 0x0001ff00 64162306a36Sopenharmony_ci#define AR_PHY_BB_THERM_ADC_3_THERM_ADC_SCALE_GAIN_S 8 64262306a36Sopenharmony_ci#define AR_PHY_BB_THERM_ADC_3_THERM_ADC_OFFSET 0x000000ff 64362306a36Sopenharmony_ci#define AR_PHY_BB_THERM_ADC_3_THERM_ADC_OFFSET_S 0 64462306a36Sopenharmony_ci 64562306a36Sopenharmony_ci#define AR_PHY_BB_THERM_ADC_4 (AR_SM_BASE + 0x254) 64662306a36Sopenharmony_ci#define AR_PHY_BB_THERM_ADC_4_LATEST_THERM_VALUE 0x000000ff 64762306a36Sopenharmony_ci#define AR_PHY_BB_THERM_ADC_4_LATEST_THERM_VALUE_S 0 64862306a36Sopenharmony_ci#define AR_PHY_BB_THERM_ADC_4_LATEST_VOLT_VALUE 0x0000ff00 64962306a36Sopenharmony_ci#define AR_PHY_BB_THERM_ADC_4_LATEST_VOLT_VALUE_S 8 65062306a36Sopenharmony_ci 65162306a36Sopenharmony_ci#define AR_PHY_65NM_CH0_TXRF3 0x16048 65262306a36Sopenharmony_ci#define AR_PHY_65NM_CH0_TXRF3_CAPDIV2G 0x0000001e 65362306a36Sopenharmony_ci#define AR_PHY_65NM_CH0_TXRF3_CAPDIV2G_S 1 65462306a36Sopenharmony_ci 65562306a36Sopenharmony_ci#define AR_PHY_65NM_CH0_SYNTH4 0x1608c 65662306a36Sopenharmony_ci#define AR_PHY_SYNTH4_LONG_SHIFT_SELECT ((AR_SREV_9462(ah) || AR_SREV_9565(ah)) ? 0x00000001 : 0x00000002) 65762306a36Sopenharmony_ci#define AR_PHY_SYNTH4_LONG_SHIFT_SELECT_S ((AR_SREV_9462(ah) || AR_SREV_9565(ah)) ? 0 : 1) 65862306a36Sopenharmony_ci#define AR_PHY_65NM_CH0_SYNTH7 0x16098 65962306a36Sopenharmony_ci#define AR_PHY_65NM_CH0_SYNTH12 0x160ac 66062306a36Sopenharmony_ci#define AR_PHY_65NM_CH0_BIAS1 0x160c0 66162306a36Sopenharmony_ci#define AR_PHY_65NM_CH0_BIAS2 0x160c4 66262306a36Sopenharmony_ci#define AR_PHY_65NM_CH0_BIAS4 0x160cc 66362306a36Sopenharmony_ci#define AR_PHY_65NM_CH0_RXTX2 0x16104 66462306a36Sopenharmony_ci#define AR_PHY_65NM_CH1_RXTX2 0x16504 66562306a36Sopenharmony_ci#define AR_PHY_65NM_CH2_RXTX2 0x16904 66662306a36Sopenharmony_ci#define AR_PHY_65NM_CH0_RXTX4 0x1610c 66762306a36Sopenharmony_ci#define AR_PHY_65NM_CH1_RXTX4 0x1650c 66862306a36Sopenharmony_ci#define AR_PHY_65NM_CH2_RXTX4 0x1690c 66962306a36Sopenharmony_ci 67062306a36Sopenharmony_ci#define AR_PHY_65NM_CH0_BB1 0x16140 67162306a36Sopenharmony_ci#define AR_PHY_65NM_CH0_BB2 0x16144 67262306a36Sopenharmony_ci#define AR_PHY_65NM_CH0_BB3 0x16148 67362306a36Sopenharmony_ci#define AR_PHY_65NM_CH1_BB1 0x16540 67462306a36Sopenharmony_ci#define AR_PHY_65NM_CH1_BB2 0x16544 67562306a36Sopenharmony_ci#define AR_PHY_65NM_CH1_BB3 0x16548 67662306a36Sopenharmony_ci#define AR_PHY_65NM_CH2_BB1 0x16940 67762306a36Sopenharmony_ci#define AR_PHY_65NM_CH2_BB2 0x16944 67862306a36Sopenharmony_ci#define AR_PHY_65NM_CH2_BB3 0x16948 67962306a36Sopenharmony_ci 68062306a36Sopenharmony_ci#define AR_PHY_65NM_CH0_SYNTH12_VREFMUL3 0x00780000 68162306a36Sopenharmony_ci#define AR_PHY_65NM_CH0_SYNTH12_VREFMUL3_S 19 68262306a36Sopenharmony_ci#define AR_PHY_65NM_CH0_RXTX2_SYNTHON_MASK 0x00000004 68362306a36Sopenharmony_ci#define AR_PHY_65NM_CH0_RXTX2_SYNTHON_MASK_S 2 68462306a36Sopenharmony_ci#define AR_PHY_65NM_CH0_RXTX2_SYNTHOVR_MASK 0x00000008 68562306a36Sopenharmony_ci#define AR_PHY_65NM_CH0_RXTX2_SYNTHOVR_MASK_S 3 68662306a36Sopenharmony_ci 68762306a36Sopenharmony_ci#define AR_CH0_TOP(_ah) (AR_SREV_9300(_ah) ? 0x16288 : \ 68862306a36Sopenharmony_ci (((AR_SREV_9462(_ah) || AR_SREV_9565(_ah)) ? 0x1628c : 0x16280))) 68962306a36Sopenharmony_ci#define AR_CH0_TOP_XPABIASLVL (AR_SREV_9550(ah) ? 0x3c0 : 0x300) 69062306a36Sopenharmony_ci#define AR_CH0_TOP_XPABIASLVL_S (AR_SREV_9550(ah) ? 6 : 8) 69162306a36Sopenharmony_ci 69262306a36Sopenharmony_ci#define AR_SWITCH_TABLE_COM_ALL (0xffff) 69362306a36Sopenharmony_ci#define AR_SWITCH_TABLE_COM_ALL_S (0) 69462306a36Sopenharmony_ci#define AR_SWITCH_TABLE_COM_AR9462_ALL (0xffffff) 69562306a36Sopenharmony_ci#define AR_SWITCH_TABLE_COM_AR9462_ALL_S (0) 69662306a36Sopenharmony_ci#define AR_SWITCH_TABLE_COM_AR9550_ALL (0xffffff) 69762306a36Sopenharmony_ci#define AR_SWITCH_TABLE_COM_AR9550_ALL_S (0) 69862306a36Sopenharmony_ci#define AR_SWITCH_TABLE_COM_SPDT (0x00f00000) 69962306a36Sopenharmony_ci#define AR_SWITCH_TABLE_COM_SPDT_ALL (0x0000fff0) 70062306a36Sopenharmony_ci#define AR_SWITCH_TABLE_COM_SPDT_ALL_S (4) 70162306a36Sopenharmony_ci 70262306a36Sopenharmony_ci#define AR_SWITCH_TABLE_COM2_ALL (0xffffff) 70362306a36Sopenharmony_ci#define AR_SWITCH_TABLE_COM2_ALL_S (0) 70462306a36Sopenharmony_ci 70562306a36Sopenharmony_ci#define AR_SWITCH_TABLE_ALL (0xfff) 70662306a36Sopenharmony_ci#define AR_SWITCH_TABLE_ALL_S (0) 70762306a36Sopenharmony_ci 70862306a36Sopenharmony_ci#define AR_CH0_THERM(_ah) (AR_SREV_9300(_ah) ? 0x16290 :\ 70962306a36Sopenharmony_ci ((AR_SREV_9462(_ah) || AR_SREV_9565(_ah)) ? 0x16294 : 0x1628c)) 71062306a36Sopenharmony_ci#define AR_CH0_THERM_XPABIASLVL_MSB 0x3 71162306a36Sopenharmony_ci#define AR_CH0_THERM_XPABIASLVL_MSB_S 0 71262306a36Sopenharmony_ci#define AR_CH0_THERM_XPASHORT2GND 0x4 71362306a36Sopenharmony_ci#define AR_CH0_THERM_XPASHORT2GND_S 2 71462306a36Sopenharmony_ci 71562306a36Sopenharmony_ci#define AR_CH0_THERM_LOCAL 0x80000000 71662306a36Sopenharmony_ci#define AR_CH0_THERM_START 0x20000000 71762306a36Sopenharmony_ci#define AR_CH0_THERM_SAR_ADC_OUT 0x0000ff00 71862306a36Sopenharmony_ci#define AR_CH0_THERM_SAR_ADC_OUT_S 8 71962306a36Sopenharmony_ci 72062306a36Sopenharmony_ci#define AR_CH0_TOP2(_ah) (AR_SREV_9300(_ah) ? 0x1628c : \ 72162306a36Sopenharmony_ci (AR_SREV_9462(_ah) ? 0x16290 : 0x16284)) 72262306a36Sopenharmony_ci#define AR_CH0_TOP2_XPABIASLVL (AR_SREV_9561(ah) ? 0x1e00 : 0xf000) 72362306a36Sopenharmony_ci#define AR_CH0_TOP2_XPABIASLVL_S (AR_SREV_9561(ah) ? 9 : 12) 72462306a36Sopenharmony_ci 72562306a36Sopenharmony_ci#define AR_CH0_XTAL(_ah) (AR_SREV_9300(_ah) ? 0x16294 : \ 72662306a36Sopenharmony_ci ((AR_SREV_9462(_ah) || AR_SREV_9565(_ah)) ? 0x16298 : \ 72762306a36Sopenharmony_ci (AR_SREV_9561(_ah) ? 0x162c0 : 0x16290))) 72862306a36Sopenharmony_ci#define AR_CH0_XTAL_CAPINDAC 0x7f000000 72962306a36Sopenharmony_ci#define AR_CH0_XTAL_CAPINDAC_S 24 73062306a36Sopenharmony_ci#define AR_CH0_XTAL_CAPOUTDAC 0x00fe0000 73162306a36Sopenharmony_ci#define AR_CH0_XTAL_CAPOUTDAC_S 17 73262306a36Sopenharmony_ci 73362306a36Sopenharmony_ci#define AR_PHY_PMU1(_ah) ((AR_SREV_9462(_ah) || AR_SREV_9565(_ah)) ? 0x16340 : \ 73462306a36Sopenharmony_ci (AR_SREV_9561(_ah) ? 0x16cc0 : 0x16c40)) 73562306a36Sopenharmony_ci#define AR_PHY_PMU1_PWD 0x1 73662306a36Sopenharmony_ci#define AR_PHY_PMU1_PWD_S 0 73762306a36Sopenharmony_ci 73862306a36Sopenharmony_ci#define AR_PHY_PMU2(_ah) ((AR_SREV_9462(_ah) || AR_SREV_9565(_ah)) ? 0x16344 : \ 73962306a36Sopenharmony_ci (AR_SREV_9561(_ah) ? 0x16cc4 : 0x16c44)) 74062306a36Sopenharmony_ci#define AR_PHY_PMU2_PGM 0x00200000 74162306a36Sopenharmony_ci#define AR_PHY_PMU2_PGM_S 21 74262306a36Sopenharmony_ci 74362306a36Sopenharmony_ci#define AR_PHY_RX1DB_BIQUAD_LONG_SHIFT 0x00380000 74462306a36Sopenharmony_ci#define AR_PHY_RX1DB_BIQUAD_LONG_SHIFT_S 19 74562306a36Sopenharmony_ci#define AR_PHY_RX6DB_BIQUAD_LONG_SHIFT 0x00c00000 74662306a36Sopenharmony_ci#define AR_PHY_RX6DB_BIQUAD_LONG_SHIFT_S 22 74762306a36Sopenharmony_ci#define AR_PHY_LNAGAIN_LONG_SHIFT 0xe0000000 74862306a36Sopenharmony_ci#define AR_PHY_LNAGAIN_LONG_SHIFT_S 29 74962306a36Sopenharmony_ci#define AR_PHY_MXRGAIN_LONG_SHIFT 0x03000000 75062306a36Sopenharmony_ci#define AR_PHY_MXRGAIN_LONG_SHIFT_S 24 75162306a36Sopenharmony_ci#define AR_PHY_VGAGAIN_LONG_SHIFT 0x1c000000 75262306a36Sopenharmony_ci#define AR_PHY_VGAGAIN_LONG_SHIFT_S 26 75362306a36Sopenharmony_ci#define AR_PHY_SCFIR_GAIN_LONG_SHIFT 0x00000001 75462306a36Sopenharmony_ci#define AR_PHY_SCFIR_GAIN_LONG_SHIFT_S 0 75562306a36Sopenharmony_ci#define AR_PHY_MANRXGAIN_LONG_SHIFT 0x00000002 75662306a36Sopenharmony_ci#define AR_PHY_MANRXGAIN_LONG_SHIFT_S 1 75762306a36Sopenharmony_ci 75862306a36Sopenharmony_ci/* 75962306a36Sopenharmony_ci * SM Field Definitions 76062306a36Sopenharmony_ci */ 76162306a36Sopenharmony_ci#define AR_PHY_CL_CAL_ENABLE 0x00000002 76262306a36Sopenharmony_ci#define AR_PHY_PARALLEL_CAL_ENABLE 0x00000001 76362306a36Sopenharmony_ci#define AR_PHY_TPCRG1_PD_CAL_ENABLE 0x00400000 76462306a36Sopenharmony_ci#define AR_PHY_TPCRG1_PD_CAL_ENABLE_S 22 76562306a36Sopenharmony_ci 76662306a36Sopenharmony_ci#define AR_PHY_ADDAC_PARACTL_OFF_PWDADC 0x00008000 76762306a36Sopenharmony_ci 76862306a36Sopenharmony_ci#define AR_PHY_FCAL20_CAP_STATUS_0 0x01f00000 76962306a36Sopenharmony_ci#define AR_PHY_FCAL20_CAP_STATUS_0_S 20 77062306a36Sopenharmony_ci 77162306a36Sopenharmony_ci#define AR_PHY_RFBUS_REQ_EN 0x00000001 /* request for RF bus */ 77262306a36Sopenharmony_ci#define AR_PHY_RFBUS_GRANT_EN 0x00000001 /* RF bus granted */ 77362306a36Sopenharmony_ci#define AR_PHY_GC_TURBO_MODE 0x00000001 /* set turbo mode bits */ 77462306a36Sopenharmony_ci#define AR_PHY_GC_TURBO_SHORT 0x00000002 /* set short symbols to turbo mode setting */ 77562306a36Sopenharmony_ci#define AR_PHY_GC_DYN2040_EN 0x00000004 /* enable dyn 20/40 mode */ 77662306a36Sopenharmony_ci#define AR_PHY_GC_DYN2040_PRI_ONLY 0x00000008 /* dyn 20/40 - primary only */ 77762306a36Sopenharmony_ci#define AR_PHY_GC_DYN2040_PRI_CH 0x00000010 /* dyn 20/40 - primary ch offset (0=+10MHz, 1=-10MHz)*/ 77862306a36Sopenharmony_ci#define AR_PHY_GC_DYN2040_PRI_CH_S 4 77962306a36Sopenharmony_ci#define AR_PHY_GC_DYN2040_EXT_CH 0x00000020 /* dyn 20/40 - ext ch spacing (0=20MHz/ 1=25MHz) */ 78062306a36Sopenharmony_ci#define AR_PHY_GC_HT_EN 0x00000040 /* ht enable */ 78162306a36Sopenharmony_ci#define AR_PHY_GC_SHORT_GI_40 0x00000080 /* allow short GI for HT 40 */ 78262306a36Sopenharmony_ci#define AR_PHY_GC_WALSH 0x00000100 /* walsh spatial spreading for 2 chains,2 streams TX */ 78362306a36Sopenharmony_ci#define AR_PHY_GC_SINGLE_HT_LTF1 0x00000200 /* single length (4us) 1st HT long training symbol */ 78462306a36Sopenharmony_ci#define AR_PHY_GC_GF_DETECT_EN 0x00000400 /* enable Green Field detection. Only affects rx, not tx */ 78562306a36Sopenharmony_ci#define AR_PHY_GC_ENABLE_DAC_FIFO 0x00000800 /* fifo between bb and dac */ 78662306a36Sopenharmony_ci#define AR_PHY_RX_DELAY_DELAY 0x00003FFF /* delay from wakeup to rx ena */ 78762306a36Sopenharmony_ci 78862306a36Sopenharmony_ci#define AR_PHY_CALMODE_IQ 0x00000000 78962306a36Sopenharmony_ci#define AR_PHY_CALMODE_ADC_GAIN 0x00000001 79062306a36Sopenharmony_ci#define AR_PHY_CALMODE_ADC_DC_PER 0x00000002 79162306a36Sopenharmony_ci#define AR_PHY_CALMODE_ADC_DC_INIT 0x00000003 79262306a36Sopenharmony_ci#define AR_PHY_SWAP_ALT_CHAIN 0x00000040 79362306a36Sopenharmony_ci#define AR_PHY_MODE_OFDM 0x00000000 79462306a36Sopenharmony_ci#define AR_PHY_MODE_CCK 0x00000001 79562306a36Sopenharmony_ci#define AR_PHY_MODE_DYNAMIC 0x00000004 79662306a36Sopenharmony_ci#define AR_PHY_MODE_DYNAMIC_S 2 79762306a36Sopenharmony_ci#define AR_PHY_MODE_HALF 0x00000020 79862306a36Sopenharmony_ci#define AR_PHY_MODE_QUARTER 0x00000040 79962306a36Sopenharmony_ci#define AR_PHY_MAC_CLK_MODE 0x00000080 80062306a36Sopenharmony_ci#define AR_PHY_MODE_DYN_CCK_DISABLE 0x00000100 80162306a36Sopenharmony_ci#define AR_PHY_MODE_SVD_HALF 0x00000200 80262306a36Sopenharmony_ci#define AR_PHY_ACTIVE_EN 0x00000001 80362306a36Sopenharmony_ci#define AR_PHY_ACTIVE_DIS 0x00000000 80462306a36Sopenharmony_ci#define AR_PHY_FORCE_XPA_CFG 0x000000001 80562306a36Sopenharmony_ci#define AR_PHY_FORCE_XPA_CFG_S 0 80662306a36Sopenharmony_ci#define AR_PHY_XPA_TIMING_CTL_TX_END_XPAB_OFF 0xFF000000 80762306a36Sopenharmony_ci#define AR_PHY_XPA_TIMING_CTL_TX_END_XPAB_OFF_S 24 80862306a36Sopenharmony_ci#define AR_PHY_XPA_TIMING_CTL_TX_END_XPAA_OFF 0x00FF0000 80962306a36Sopenharmony_ci#define AR_PHY_XPA_TIMING_CTL_TX_END_XPAA_OFF_S 16 81062306a36Sopenharmony_ci#define AR_PHY_XPA_TIMING_CTL_FRAME_XPAB_ON 0x0000FF00 81162306a36Sopenharmony_ci#define AR_PHY_XPA_TIMING_CTL_FRAME_XPAB_ON_S 8 81262306a36Sopenharmony_ci#define AR_PHY_XPA_TIMING_CTL_FRAME_XPAA_ON 0x000000FF 81362306a36Sopenharmony_ci#define AR_PHY_XPA_TIMING_CTL_FRAME_XPAA_ON_S 0 81462306a36Sopenharmony_ci#define AR_PHY_TX_END_TO_A2_RX_ON 0x00FF0000 81562306a36Sopenharmony_ci#define AR_PHY_TX_END_TO_A2_RX_ON_S 16 81662306a36Sopenharmony_ci#define AR_PHY_TX_END_DATA_START 0x000000FF 81762306a36Sopenharmony_ci#define AR_PHY_TX_END_DATA_START_S 0 81862306a36Sopenharmony_ci#define AR_PHY_TX_END_PA_ON 0x0000FF00 81962306a36Sopenharmony_ci#define AR_PHY_TX_END_PA_ON_S 8 82062306a36Sopenharmony_ci#define AR_PHY_TPCRG5_PD_GAIN_OVERLAP 0x0000000F 82162306a36Sopenharmony_ci#define AR_PHY_TPCRG5_PD_GAIN_OVERLAP_S 0 82262306a36Sopenharmony_ci#define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_1 0x000003F0 82362306a36Sopenharmony_ci#define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_1_S 4 82462306a36Sopenharmony_ci#define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_2 0x0000FC00 82562306a36Sopenharmony_ci#define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_2_S 10 82662306a36Sopenharmony_ci#define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_3 0x003F0000 82762306a36Sopenharmony_ci#define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_3_S 16 82862306a36Sopenharmony_ci#define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_4 0x0FC00000 82962306a36Sopenharmony_ci#define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_4_S 22 83062306a36Sopenharmony_ci#define AR_PHY_TPCRG1_NUM_PD_GAIN 0x0000c000 83162306a36Sopenharmony_ci#define AR_PHY_TPCRG1_NUM_PD_GAIN_S 14 83262306a36Sopenharmony_ci#define AR_PHY_TPCRG1_PD_GAIN_1 0x00030000 83362306a36Sopenharmony_ci#define AR_PHY_TPCRG1_PD_GAIN_1_S 16 83462306a36Sopenharmony_ci#define AR_PHY_TPCRG1_PD_GAIN_2 0x000C0000 83562306a36Sopenharmony_ci#define AR_PHY_TPCRG1_PD_GAIN_2_S 18 83662306a36Sopenharmony_ci#define AR_PHY_TPCRG1_PD_GAIN_3 0x00300000 83762306a36Sopenharmony_ci#define AR_PHY_TPCRG1_PD_GAIN_3_S 20 83862306a36Sopenharmony_ci#define AR_PHY_TPCGR1_FORCED_DAC_GAIN 0x0000003e 83962306a36Sopenharmony_ci#define AR_PHY_TPCGR1_FORCED_DAC_GAIN_S 1 84062306a36Sopenharmony_ci#define AR_PHY_TPCGR1_FORCE_DAC_GAIN 0x00000001 84162306a36Sopenharmony_ci#define AR_PHY_TXGAIN_FORCE 0x00000001 84262306a36Sopenharmony_ci#define AR_PHY_TXGAIN_FORCE_S 0 84362306a36Sopenharmony_ci#define AR_PHY_TXGAIN_FORCED_PADVGNRA 0x00003c00 84462306a36Sopenharmony_ci#define AR_PHY_TXGAIN_FORCED_PADVGNRA_S 10 84562306a36Sopenharmony_ci#define AR_PHY_TXGAIN_FORCED_PADVGNRB 0x0003c000 84662306a36Sopenharmony_ci#define AR_PHY_TXGAIN_FORCED_PADVGNRB_S 14 84762306a36Sopenharmony_ci#define AR_PHY_TXGAIN_FORCED_PADVGNRD 0x00c00000 84862306a36Sopenharmony_ci#define AR_PHY_TXGAIN_FORCED_PADVGNRD_S 22 84962306a36Sopenharmony_ci#define AR_PHY_TXGAIN_FORCED_TXMXRGAIN 0x000003c0 85062306a36Sopenharmony_ci#define AR_PHY_TXGAIN_FORCED_TXMXRGAIN_S 6 85162306a36Sopenharmony_ci#define AR_PHY_TXGAIN_FORCED_TXBB1DBGAIN 0x0000000e 85262306a36Sopenharmony_ci#define AR_PHY_TXGAIN_FORCED_TXBB1DBGAIN_S 1 85362306a36Sopenharmony_ci 85462306a36Sopenharmony_ci#define AR_PHY_POWER_TX_RATE1 0x9934 85562306a36Sopenharmony_ci#define AR_PHY_POWER_TX_RATE2 0x9938 85662306a36Sopenharmony_ci#define AR_PHY_POWER_TX_RATE_MAX 0x993c 85762306a36Sopenharmony_ci#define AR_PHY_POWER_TX_RATE_MAX_TPC_ENABLE 0x00000040 85862306a36Sopenharmony_ci#define PHY_AGC_CLR 0x10000000 85962306a36Sopenharmony_ci#define RFSILENT_BB 0x00002000 86062306a36Sopenharmony_ci#define AR_PHY_CHAN_INFO_GAIN_DIFF_PPM_MASK 0xFFF 86162306a36Sopenharmony_ci#define AR_PHY_CHAN_INFO_GAIN_DIFF_PPM_SIGNED_BIT 0x800 86262306a36Sopenharmony_ci#define AR_PHY_CHAN_INFO_GAIN_DIFF_UPPER_LIMIT 320 86362306a36Sopenharmony_ci#define AR_PHY_CHAN_INFO_MEMORY_CAPTURE_MASK 0x0001 86462306a36Sopenharmony_ci#define AR_PHY_RX_DELAY_DELAY 0x00003FFF 86562306a36Sopenharmony_ci#define AR_PHY_CCK_TX_CTRL_JAPAN 0x00000010 86662306a36Sopenharmony_ci 86762306a36Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_ENABLE 0x00000001 86862306a36Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_ENABLE_S 0 86962306a36Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_ACTIVE 0x00000002 87062306a36Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_ACTIVE_S 1 87162306a36Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_FFT_PERIOD 0x000000F0 87262306a36Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_FFT_PERIOD_S 4 87362306a36Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_PERIOD 0x0000FF00 87462306a36Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_PERIOD_S 8 87562306a36Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_COUNT 0x0FFF0000 87662306a36Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_COUNT_S 16 87762306a36Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_SHORT_REPEAT 0x10000000 87862306a36Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_SHORT_REPEAT_S 28 87962306a36Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_PRIORITY 0x20000000 88062306a36Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_PRIORITY_S 29 88162306a36Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_USE_ERR5 0x40000000 88262306a36Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_USE_ERR5_S 30 88362306a36Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_COMPRESSED_RPT 0x80000000 88462306a36Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_COMPRESSED_RPT_S 31 88562306a36Sopenharmony_ci 88662306a36Sopenharmony_ci#define AR_PHY_CHANNEL_STATUS_RX_CLEAR 0x00000004 88762306a36Sopenharmony_ci#define AR_PHY_RTT_CTRL_ENA_RADIO_RETENTION 0x00000001 88862306a36Sopenharmony_ci#define AR_PHY_RTT_CTRL_ENA_RADIO_RETENTION_S 0 88962306a36Sopenharmony_ci#define AR_PHY_RTT_CTRL_RESTORE_MASK 0x0000007E 89062306a36Sopenharmony_ci#define AR_PHY_RTT_CTRL_RESTORE_MASK_S 1 89162306a36Sopenharmony_ci#define AR_PHY_RTT_CTRL_FORCE_RADIO_RESTORE 0x00000080 89262306a36Sopenharmony_ci#define AR_PHY_RTT_CTRL_FORCE_RADIO_RESTORE_S 7 89362306a36Sopenharmony_ci#define AR_PHY_RTT_SW_RTT_TABLE_ACCESS 0x00000001 89462306a36Sopenharmony_ci#define AR_PHY_RTT_SW_RTT_TABLE_ACCESS_S 0 89562306a36Sopenharmony_ci#define AR_PHY_RTT_SW_RTT_TABLE_WRITE 0x00000002 89662306a36Sopenharmony_ci#define AR_PHY_RTT_SW_RTT_TABLE_WRITE_S 1 89762306a36Sopenharmony_ci#define AR_PHY_RTT_SW_RTT_TABLE_ADDR 0x0000001C 89862306a36Sopenharmony_ci#define AR_PHY_RTT_SW_RTT_TABLE_ADDR_S 2 89962306a36Sopenharmony_ci#define AR_PHY_RTT_SW_RTT_TABLE_DATA 0xFFFFFFF0 90062306a36Sopenharmony_ci#define AR_PHY_RTT_SW_RTT_TABLE_DATA_S 4 90162306a36Sopenharmony_ci#define AR_PHY_TX_IQCAL_CONTROL_0_ENABLE_TXIQ_CAL 0x80000000 90262306a36Sopenharmony_ci#define AR_PHY_TX_IQCAL_CONTROL_0_ENABLE_TXIQ_CAL_S 31 90362306a36Sopenharmony_ci#define AR_PHY_TX_IQCAL_CONTROL_1_IQCORR_I_Q_COFF_DELPT 0x01fc0000 90462306a36Sopenharmony_ci#define AR_PHY_TX_IQCAL_CONTROL_1_IQCORR_I_Q_COFF_DELPT_S 18 90562306a36Sopenharmony_ci#define AR_PHY_TX_IQCAL_START_DO_CAL 0x00000001 90662306a36Sopenharmony_ci#define AR_PHY_TX_IQCAL_START_DO_CAL_S 0 90762306a36Sopenharmony_ci 90862306a36Sopenharmony_ci#define AR_PHY_TX_IQCAL_STATUS_FAILED 0x00000001 90962306a36Sopenharmony_ci#define AR_PHY_CALIBRATED_GAINS_0 0x3e 91062306a36Sopenharmony_ci#define AR_PHY_CALIBRATED_GAINS_0_S 1 91162306a36Sopenharmony_ci 91262306a36Sopenharmony_ci#define AR_PHY_TX_IQCAL_CORR_COEFF_00_COEFF_TABLE 0x00003fff 91362306a36Sopenharmony_ci#define AR_PHY_TX_IQCAL_CORR_COEFF_00_COEFF_TABLE_S 0 91462306a36Sopenharmony_ci#define AR_PHY_TX_IQCAL_CORR_COEFF_01_COEFF_TABLE 0x0fffc000 91562306a36Sopenharmony_ci#define AR_PHY_TX_IQCAL_CORR_COEFF_01_COEFF_TABLE_S 14 91662306a36Sopenharmony_ci 91762306a36Sopenharmony_ci#define AR_PHY_65NM_CH0_RXTX4_THERM_ON 0x10000000 91862306a36Sopenharmony_ci#define AR_PHY_65NM_CH0_RXTX4_THERM_ON_S 28 91962306a36Sopenharmony_ci#define AR_PHY_65NM_CH0_RXTX4_THERM_ON_OVR 0x20000000 92062306a36Sopenharmony_ci#define AR_PHY_65NM_CH0_RXTX4_THERM_ON_OVR_S 29 92162306a36Sopenharmony_ci 92262306a36Sopenharmony_ci#define AR_PHY_65NM_RXTX4_XLNA_BIAS 0xC0000000 92362306a36Sopenharmony_ci#define AR_PHY_65NM_RXTX4_XLNA_BIAS_S 30 92462306a36Sopenharmony_ci 92562306a36Sopenharmony_ci/* 92662306a36Sopenharmony_ci * Channel 1 Register Map 92762306a36Sopenharmony_ci */ 92862306a36Sopenharmony_ci#define AR_CHAN1_BASE 0xa800 92962306a36Sopenharmony_ci 93062306a36Sopenharmony_ci#define AR_PHY_EXT_CCA_1 (AR_CHAN1_BASE + 0x30) 93162306a36Sopenharmony_ci#define AR_PHY_TX_PHASE_RAMP_1 (AR_CHAN1_BASE + 0xd0) 93262306a36Sopenharmony_ci#define AR_PHY_ADC_GAIN_DC_CORR_1 (AR_CHAN1_BASE + 0xd4) 93362306a36Sopenharmony_ci 93462306a36Sopenharmony_ci#define AR_PHY_SPUR_REPORT_1 (AR_CHAN1_BASE + 0xa8) 93562306a36Sopenharmony_ci#define AR_PHY_CHAN_INFO_TAB_1 (AR_CHAN1_BASE + 0x300) 93662306a36Sopenharmony_ci#define AR_PHY_RX_IQCAL_CORR_B1 (AR_CHAN1_BASE + 0xdc) 93762306a36Sopenharmony_ci 93862306a36Sopenharmony_ci/* 93962306a36Sopenharmony_ci * Channel 1 Field Definitions 94062306a36Sopenharmony_ci */ 94162306a36Sopenharmony_ci#define AR_PHY_CH1_EXT_MINCCA_PWR 0x01FF0000 94262306a36Sopenharmony_ci#define AR_PHY_CH1_EXT_MINCCA_PWR_S 16 94362306a36Sopenharmony_ci 94462306a36Sopenharmony_ci/* 94562306a36Sopenharmony_ci * AGC 1 Register Map 94662306a36Sopenharmony_ci */ 94762306a36Sopenharmony_ci#define AR_AGC1_BASE 0xae00 94862306a36Sopenharmony_ci 94962306a36Sopenharmony_ci#define AR_PHY_FORCEMAX_GAINS_1 (AR_AGC1_BASE + 0x4) 95062306a36Sopenharmony_ci#define AR_PHY_EXT_ATTEN_CTL_1 (AR_AGC1_BASE + 0x18) 95162306a36Sopenharmony_ci#define AR_PHY_CCA_1 (AR_AGC1_BASE + 0x1c) 95262306a36Sopenharmony_ci#define AR_PHY_CCA_CTRL_1 (AR_AGC1_BASE + 0x20) 95362306a36Sopenharmony_ci#define AR_PHY_RSSI_1 (AR_AGC1_BASE + 0x180) 95462306a36Sopenharmony_ci#define AR_PHY_SPUR_CCK_REP_1 (AR_AGC1_BASE + 0x184) 95562306a36Sopenharmony_ci#define AR_PHY_RX_OCGAIN_2 (AR_AGC1_BASE + 0x200) 95662306a36Sopenharmony_ci 95762306a36Sopenharmony_ci/* 95862306a36Sopenharmony_ci * AGC 1 Field Definitions 95962306a36Sopenharmony_ci */ 96062306a36Sopenharmony_ci#define AR_PHY_CH1_MINCCA_PWR 0x1FF00000 96162306a36Sopenharmony_ci#define AR_PHY_CH1_MINCCA_PWR_S 20 96262306a36Sopenharmony_ci 96362306a36Sopenharmony_ci/* 96462306a36Sopenharmony_ci * SM 1 Register Map 96562306a36Sopenharmony_ci */ 96662306a36Sopenharmony_ci#define AR_SM1_BASE 0xb200 96762306a36Sopenharmony_ci 96862306a36Sopenharmony_ci#define AR_PHY_SWITCH_CHAIN_1 (AR_SM1_BASE + 0x84) 96962306a36Sopenharmony_ci#define AR_PHY_FCAL_2_1 (AR_SM1_BASE + 0xd0) 97062306a36Sopenharmony_ci#define AR_PHY_DFT_TONE_CTL_1 (AR_SM1_BASE + 0xd4) 97162306a36Sopenharmony_ci#define AR_PHY_CL_TAB_1 (AR_SM1_BASE + 0x100) 97262306a36Sopenharmony_ci#define AR_PHY_CHAN_INFO_GAIN_1 (AR_SM1_BASE + 0x180) 97362306a36Sopenharmony_ci#define AR_PHY_TPC_4_B1 (AR_SM1_BASE + 0x204) 97462306a36Sopenharmony_ci#define AR_PHY_TPC_5_B1 (AR_SM1_BASE + 0x208) 97562306a36Sopenharmony_ci#define AR_PHY_TPC_6_B1 (AR_SM1_BASE + 0x20c) 97662306a36Sopenharmony_ci#define AR_PHY_TPC_11_B1 (AR_SM1_BASE + 0x220) 97762306a36Sopenharmony_ci#define AR_PHY_PDADC_TAB_1(_ah) (AR_SM1_BASE + (AR_SREV_9462_20_OR_LATER(_ah) ? \ 97862306a36Sopenharmony_ci 0x280 : 0x240)) 97962306a36Sopenharmony_ci#define AR_PHY_TPC_19_B1 (AR_SM1_BASE + 0x240) 98062306a36Sopenharmony_ci#define AR_PHY_TPC_19_B1_ALPHA_THERM 0xff 98162306a36Sopenharmony_ci#define AR_PHY_TPC_19_B1_ALPHA_THERM_S 0 98262306a36Sopenharmony_ci#define AR_PHY_TX_IQCAL_STATUS_B1 (AR_SM1_BASE + 0x48c) 98362306a36Sopenharmony_ci#define AR_PHY_TX_IQCAL_CORR_COEFF_B1(_i) (AR_SM1_BASE + 0x450 + ((_i) << 2)) 98462306a36Sopenharmony_ci 98562306a36Sopenharmony_ci#define AR_PHY_RTT_TABLE_SW_INTF_B(i) (0x384 + ((i) ? \ 98662306a36Sopenharmony_ci AR_SM1_BASE : AR_SM_BASE)) 98762306a36Sopenharmony_ci#define AR_PHY_RTT_TABLE_SW_INTF_1_B(i) (0x388 + ((i) ? \ 98862306a36Sopenharmony_ci AR_SM1_BASE : AR_SM_BASE)) 98962306a36Sopenharmony_ci/* 99062306a36Sopenharmony_ci * Channel 2 Register Map 99162306a36Sopenharmony_ci */ 99262306a36Sopenharmony_ci#define AR_CHAN2_BASE 0xb800 99362306a36Sopenharmony_ci 99462306a36Sopenharmony_ci#define AR_PHY_EXT_CCA_2 (AR_CHAN2_BASE + 0x30) 99562306a36Sopenharmony_ci#define AR_PHY_TX_PHASE_RAMP_2 (AR_CHAN2_BASE + 0xd0) 99662306a36Sopenharmony_ci#define AR_PHY_ADC_GAIN_DC_CORR_2 (AR_CHAN2_BASE + 0xd4) 99762306a36Sopenharmony_ci 99862306a36Sopenharmony_ci#define AR_PHY_SPUR_REPORT_2 (AR_CHAN2_BASE + 0xa8) 99962306a36Sopenharmony_ci#define AR_PHY_CHAN_INFO_TAB_2 (AR_CHAN2_BASE + 0x300) 100062306a36Sopenharmony_ci#define AR_PHY_RX_IQCAL_CORR_B2 (AR_CHAN2_BASE + 0xdc) 100162306a36Sopenharmony_ci 100262306a36Sopenharmony_ci/* 100362306a36Sopenharmony_ci * Channel 2 Field Definitions 100462306a36Sopenharmony_ci */ 100562306a36Sopenharmony_ci#define AR_PHY_CH2_EXT_MINCCA_PWR 0x01FF0000 100662306a36Sopenharmony_ci#define AR_PHY_CH2_EXT_MINCCA_PWR_S 16 100762306a36Sopenharmony_ci/* 100862306a36Sopenharmony_ci * AGC 2 Register Map 100962306a36Sopenharmony_ci */ 101062306a36Sopenharmony_ci#define AR_AGC2_BASE 0xbe00 101162306a36Sopenharmony_ci 101262306a36Sopenharmony_ci#define AR_PHY_FORCEMAX_GAINS_2 (AR_AGC2_BASE + 0x4) 101362306a36Sopenharmony_ci#define AR_PHY_EXT_ATTEN_CTL_2 (AR_AGC2_BASE + 0x18) 101462306a36Sopenharmony_ci#define AR_PHY_CCA_2 (AR_AGC2_BASE + 0x1c) 101562306a36Sopenharmony_ci#define AR_PHY_CCA_CTRL_2 (AR_AGC2_BASE + 0x20) 101662306a36Sopenharmony_ci#define AR_PHY_RSSI_2 (AR_AGC2_BASE + 0x180) 101762306a36Sopenharmony_ci 101862306a36Sopenharmony_ci/* 101962306a36Sopenharmony_ci * AGC 2 Field Definitions 102062306a36Sopenharmony_ci */ 102162306a36Sopenharmony_ci#define AR_PHY_CH2_MINCCA_PWR 0x1FF00000 102262306a36Sopenharmony_ci#define AR_PHY_CH2_MINCCA_PWR_S 20 102362306a36Sopenharmony_ci 102462306a36Sopenharmony_ci/* 102562306a36Sopenharmony_ci * SM 2 Register Map 102662306a36Sopenharmony_ci */ 102762306a36Sopenharmony_ci#define AR_SM2_BASE 0xc200 102862306a36Sopenharmony_ci 102962306a36Sopenharmony_ci#define AR_PHY_SWITCH_CHAIN_2 (AR_SM2_BASE + 0x84) 103062306a36Sopenharmony_ci#define AR_PHY_FCAL_2_2 (AR_SM2_BASE + 0xd0) 103162306a36Sopenharmony_ci#define AR_PHY_DFT_TONE_CTL_2 (AR_SM2_BASE + 0xd4) 103262306a36Sopenharmony_ci#define AR_PHY_CL_TAB_2 (AR_SM2_BASE + 0x100) 103362306a36Sopenharmony_ci#define AR_PHY_CHAN_INFO_GAIN_2 (AR_SM2_BASE + 0x180) 103462306a36Sopenharmony_ci#define AR_PHY_TPC_4_B2 (AR_SM2_BASE + 0x204) 103562306a36Sopenharmony_ci#define AR_PHY_TPC_5_B2 (AR_SM2_BASE + 0x208) 103662306a36Sopenharmony_ci#define AR_PHY_TPC_6_B2 (AR_SM2_BASE + 0x20c) 103762306a36Sopenharmony_ci#define AR_PHY_TPC_11_B2 (AR_SM2_BASE + 0x220) 103862306a36Sopenharmony_ci#define AR_PHY_TPC_19_B2 (AR_SM2_BASE + 0x240) 103962306a36Sopenharmony_ci#define AR_PHY_TX_IQCAL_STATUS_B2 (AR_SM2_BASE + 0x48c) 104062306a36Sopenharmony_ci#define AR_PHY_TX_IQCAL_CORR_COEFF_B2(_i) (AR_SM2_BASE + 0x450 + ((_i) << 2)) 104162306a36Sopenharmony_ci 104262306a36Sopenharmony_ci#define AR_PHY_TX_IQCAL_STATUS_B2_FAILED 0x00000001 104362306a36Sopenharmony_ci 104462306a36Sopenharmony_ci/* 104562306a36Sopenharmony_ci * AGC 3 Register Map 104662306a36Sopenharmony_ci */ 104762306a36Sopenharmony_ci#define AR_AGC3_BASE 0xce00 104862306a36Sopenharmony_ci 104962306a36Sopenharmony_ci#define AR_PHY_RSSI_3 (AR_AGC3_BASE + 0x180) 105062306a36Sopenharmony_ci 105162306a36Sopenharmony_ci/* GLB Registers */ 105262306a36Sopenharmony_ci#define AR_GLB_BASE 0x20000 105362306a36Sopenharmony_ci#define AR_GLB_GPIO_CONTROL (AR_GLB_BASE) 105462306a36Sopenharmony_ci#define AR_PHY_GLB_CONTROL (AR_GLB_BASE + 0x44) 105562306a36Sopenharmony_ci#define AR_GLB_SCRATCH(_ah) (AR_GLB_BASE + \ 105662306a36Sopenharmony_ci (AR_SREV_9462_20_OR_LATER(_ah) ? 0x4c : 0x50)) 105762306a36Sopenharmony_ci#define AR_GLB_STATUS (AR_GLB_BASE + 0x48) 105862306a36Sopenharmony_ci 105962306a36Sopenharmony_ci/* 106062306a36Sopenharmony_ci * Misc helper defines 106162306a36Sopenharmony_ci */ 106262306a36Sopenharmony_ci#define AR_PHY_CHAIN_OFFSET (AR_CHAN1_BASE - AR_CHAN_BASE) 106362306a36Sopenharmony_ci 106462306a36Sopenharmony_ci#define AR_PHY_NEW_ADC_DC_GAIN_CORR(_i) (AR_PHY_ADC_GAIN_DC_CORR_0 + (AR_PHY_CHAIN_OFFSET * (_i))) 106562306a36Sopenharmony_ci#define AR_PHY_NEW_ADC_DC_GAIN_CORR_9300_10(_i) (AR_PHY_ADC_GAIN_DC_CORR_0_9300_10 + (AR_PHY_CHAIN_OFFSET * (_i))) 106662306a36Sopenharmony_ci#define AR_PHY_SWITCH_CHAIN(_i) (AR_PHY_SWITCH_CHAIN_0 + (AR_PHY_CHAIN_OFFSET * (_i))) 106762306a36Sopenharmony_ci#define AR_PHY_EXT_ATTEN_CTL(_i) (AR_PHY_EXT_ATTEN_CTL_0 + (AR_PHY_CHAIN_OFFSET * (_i))) 106862306a36Sopenharmony_ci 106962306a36Sopenharmony_ci#define AR_PHY_RXGAIN(_i) (AR_PHY_FORCEMAX_GAINS_0 + (AR_PHY_CHAIN_OFFSET * (_i))) 107062306a36Sopenharmony_ci#define AR_PHY_TPCRG5(_i) (AR_PHY_TPC_5_B0 + (AR_PHY_CHAIN_OFFSET * (_i))) 107162306a36Sopenharmony_ci#define AR_PHY_PDADC_TAB(_i) (AR_PHY_PDADC_TAB_0 + (AR_PHY_CHAIN_OFFSET * (_i))) 107262306a36Sopenharmony_ci 107362306a36Sopenharmony_ci#define AR_PHY_CAL_MEAS_0(_i) (AR_PHY_IQ_ADC_MEAS_0_B0 + (AR_PHY_CHAIN_OFFSET * (_i))) 107462306a36Sopenharmony_ci#define AR_PHY_CAL_MEAS_1(_i) (AR_PHY_IQ_ADC_MEAS_1_B0 + (AR_PHY_CHAIN_OFFSET * (_i))) 107562306a36Sopenharmony_ci#define AR_PHY_CAL_MEAS_2(_i) (AR_PHY_IQ_ADC_MEAS_2_B0 + (AR_PHY_CHAIN_OFFSET * (_i))) 107662306a36Sopenharmony_ci#define AR_PHY_CAL_MEAS_3(_i) (AR_PHY_IQ_ADC_MEAS_3_B0 + (AR_PHY_CHAIN_OFFSET * (_i))) 107762306a36Sopenharmony_ci#define AR_PHY_CAL_MEAS_0_9300_10(_i) (AR_PHY_IQ_ADC_MEAS_0_B0_9300_10 + (AR_PHY_CHAIN_OFFSET * (_i))) 107862306a36Sopenharmony_ci#define AR_PHY_CAL_MEAS_1_9300_10(_i) (AR_PHY_IQ_ADC_MEAS_1_B0_9300_10 + (AR_PHY_CHAIN_OFFSET * (_i))) 107962306a36Sopenharmony_ci#define AR_PHY_CAL_MEAS_2_9300_10(_i) (AR_PHY_IQ_ADC_MEAS_2_B0_9300_10 + (AR_PHY_CHAIN_OFFSET * (_i))) 108062306a36Sopenharmony_ci#define AR_PHY_CAL_MEAS_3_9300_10(_i) (AR_PHY_IQ_ADC_MEAS_3_B0_9300_10 + (AR_PHY_CHAIN_OFFSET * (_i))) 108162306a36Sopenharmony_ci 108262306a36Sopenharmony_ci#define AR_PHY_WATCHDOG_NON_IDLE_ENABLE 0x00000001 108362306a36Sopenharmony_ci#define AR_PHY_WATCHDOG_IDLE_ENABLE 0x00000002 108462306a36Sopenharmony_ci#define AR_PHY_WATCHDOG_IDLE_MASK 0xFFFF0000 108562306a36Sopenharmony_ci#define AR_PHY_WATCHDOG_NON_IDLE_MASK 0x0000FFFC 108662306a36Sopenharmony_ci 108762306a36Sopenharmony_ci#define AR_PHY_WATCHDOG_RST_ENABLE 0x00000002 108862306a36Sopenharmony_ci#define AR_PHY_WATCHDOG_IRQ_ENABLE 0x00000004 108962306a36Sopenharmony_ci#define AR_PHY_WATCHDOG_CNTL2_MASK 0xFFFFFFF9 109062306a36Sopenharmony_ci 109162306a36Sopenharmony_ci#define AR_PHY_WATCHDOG_INFO 0x00000007 109262306a36Sopenharmony_ci#define AR_PHY_WATCHDOG_INFO_S 0 109362306a36Sopenharmony_ci#define AR_PHY_WATCHDOG_DET_HANG 0x00000008 109462306a36Sopenharmony_ci#define AR_PHY_WATCHDOG_DET_HANG_S 3 109562306a36Sopenharmony_ci#define AR_PHY_WATCHDOG_RADAR_SM 0x000000F0 109662306a36Sopenharmony_ci#define AR_PHY_WATCHDOG_RADAR_SM_S 4 109762306a36Sopenharmony_ci#define AR_PHY_WATCHDOG_RX_OFDM_SM 0x00000F00 109862306a36Sopenharmony_ci#define AR_PHY_WATCHDOG_RX_OFDM_SM_S 8 109962306a36Sopenharmony_ci#define AR_PHY_WATCHDOG_RX_CCK_SM 0x0000F000 110062306a36Sopenharmony_ci#define AR_PHY_WATCHDOG_RX_CCK_SM_S 12 110162306a36Sopenharmony_ci#define AR_PHY_WATCHDOG_TX_OFDM_SM 0x000F0000 110262306a36Sopenharmony_ci#define AR_PHY_WATCHDOG_TX_OFDM_SM_S 16 110362306a36Sopenharmony_ci#define AR_PHY_WATCHDOG_TX_CCK_SM 0x00F00000 110462306a36Sopenharmony_ci#define AR_PHY_WATCHDOG_TX_CCK_SM_S 20 110562306a36Sopenharmony_ci#define AR_PHY_WATCHDOG_AGC_SM 0x0F000000 110662306a36Sopenharmony_ci#define AR_PHY_WATCHDOG_AGC_SM_S 24 110762306a36Sopenharmony_ci#define AR_PHY_WATCHDOG_SRCH_SM 0xF0000000 110862306a36Sopenharmony_ci#define AR_PHY_WATCHDOG_SRCH_SM_S 28 110962306a36Sopenharmony_ci 111062306a36Sopenharmony_ci#define AR_PHY_WATCHDOG_STATUS_CLR 0x00000008 111162306a36Sopenharmony_ci 111262306a36Sopenharmony_ci/* 111362306a36Sopenharmony_ci * PAPRD registers 111462306a36Sopenharmony_ci */ 111562306a36Sopenharmony_ci#define AR_PHY_XPA_TIMING_CTL (AR_SM_BASE + 0x64) 111662306a36Sopenharmony_ci 111762306a36Sopenharmony_ci#define AR_PHY_PAPRD_AM2AM (AR_CHAN_BASE + 0xe4) 111862306a36Sopenharmony_ci#define AR_PHY_PAPRD_AM2AM_MASK 0x01ffffff 111962306a36Sopenharmony_ci#define AR_PHY_PAPRD_AM2AM_MASK_S 0 112062306a36Sopenharmony_ci 112162306a36Sopenharmony_ci#define AR_PHY_PAPRD_AM2PM (AR_CHAN_BASE + 0xe8) 112262306a36Sopenharmony_ci#define AR_PHY_PAPRD_AM2PM_MASK 0x01ffffff 112362306a36Sopenharmony_ci#define AR_PHY_PAPRD_AM2PM_MASK_S 0 112462306a36Sopenharmony_ci 112562306a36Sopenharmony_ci#define AR_PHY_PAPRD_HT40 (AR_CHAN_BASE + 0xec) 112662306a36Sopenharmony_ci#define AR_PHY_PAPRD_HT40_MASK 0x01ffffff 112762306a36Sopenharmony_ci#define AR_PHY_PAPRD_HT40_MASK_S 0 112862306a36Sopenharmony_ci 112962306a36Sopenharmony_ci#define AR_PHY_PAPRD_CTRL0_B0 (AR_CHAN_BASE + 0xf0) 113062306a36Sopenharmony_ci#define AR_PHY_PAPRD_CTRL0_B1 (AR_CHAN1_BASE + 0xf0) 113162306a36Sopenharmony_ci#define AR_PHY_PAPRD_CTRL0_B2 (AR_CHAN2_BASE + 0xf0) 113262306a36Sopenharmony_ci#define AR_PHY_PAPRD_CTRL0_PAPRD_ENABLE 0x00000001 113362306a36Sopenharmony_ci#define AR_PHY_PAPRD_CTRL0_PAPRD_ENABLE_S 0 113462306a36Sopenharmony_ci#define AR_PHY_PAPRD_CTRL0_USE_SINGLE_TABLE_MASK 0x00000002 113562306a36Sopenharmony_ci#define AR_PHY_PAPRD_CTRL0_USE_SINGLE_TABLE_MASK_S 1 113662306a36Sopenharmony_ci#define AR_PHY_PAPRD_CTRL0_PAPRD_MAG_THRSH 0xf8000000 113762306a36Sopenharmony_ci#define AR_PHY_PAPRD_CTRL0_PAPRD_MAG_THRSH_S 27 113862306a36Sopenharmony_ci 113962306a36Sopenharmony_ci#define AR_PHY_PAPRD_CTRL1_B0 (AR_CHAN_BASE + 0xf4) 114062306a36Sopenharmony_ci#define AR_PHY_PAPRD_CTRL1_B1 (AR_CHAN1_BASE + 0xf4) 114162306a36Sopenharmony_ci#define AR_PHY_PAPRD_CTRL1_B2 (AR_CHAN2_BASE + 0xf4) 114262306a36Sopenharmony_ci#define AR_PHY_PAPRD_CTRL1_ADAPTIVE_SCALING_ENA 0x00000001 114362306a36Sopenharmony_ci#define AR_PHY_PAPRD_CTRL1_ADAPTIVE_SCALING_ENA_S 0 114462306a36Sopenharmony_ci#define AR_PHY_PAPRD_CTRL1_ADAPTIVE_AM2AM_ENABLE 0x00000002 114562306a36Sopenharmony_ci#define AR_PHY_PAPRD_CTRL1_ADAPTIVE_AM2AM_ENABLE_S 1 114662306a36Sopenharmony_ci#define AR_PHY_PAPRD_CTRL1_ADAPTIVE_AM2PM_ENABLE 0x00000004 114762306a36Sopenharmony_ci#define AR_PHY_PAPRD_CTRL1_ADAPTIVE_AM2PM_ENABLE_S 2 114862306a36Sopenharmony_ci#define AR_PHY_PAPRD_CTRL1_PAPRD_POWER_AT_AM2AM_CAL 0x000001f8 114962306a36Sopenharmony_ci#define AR_PHY_PAPRD_CTRL1_PAPRD_POWER_AT_AM2AM_CAL_S 3 115062306a36Sopenharmony_ci#define AR_PHY_PAPRD_CTRL1_PA_GAIN_SCALE_FACT_MASK 0x0001fe00 115162306a36Sopenharmony_ci#define AR_PHY_PAPRD_CTRL1_PA_GAIN_SCALE_FACT_MASK_S 9 115262306a36Sopenharmony_ci#define AR_PHY_PAPRD_CTRL1_PAPRD_MAG_SCALE_FACT 0x0ffe0000 115362306a36Sopenharmony_ci#define AR_PHY_PAPRD_CTRL1_PAPRD_MAG_SCALE_FACT_S 17 115462306a36Sopenharmony_ci 115562306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL1(_ah) (AR_SM_BASE + (AR_SREV_9485(_ah) ? 0x580 : 0x490)) 115662306a36Sopenharmony_ci 115762306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL1_CF_CF_PAPRD_TRAIN_ENABLE 0x00000001 115862306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL1_CF_CF_PAPRD_TRAIN_ENABLE_S 0 115962306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL1_CF_PAPRD_AGC2_SETTLING 0x0000007e 116062306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL1_CF_PAPRD_AGC2_SETTLING_S 1 116162306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL1_CF_PAPRD_IQCORR_ENABLE 0x00000100 116262306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL1_CF_PAPRD_IQCORR_ENABLE_S 8 116362306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL1_CF_PAPRD_RX_BB_GAIN_FORCE 0x00000200 116462306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL1_CF_PAPRD_RX_BB_GAIN_FORCE_S 9 116562306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL1_CF_PAPRD_TX_GAIN_FORCE 0x00000400 116662306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL1_CF_PAPRD_TX_GAIN_FORCE_S 10 116762306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL1_CF_PAPRD_LB_ENABLE 0x00000800 116862306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL1_CF_PAPRD_LB_ENABLE_S 11 116962306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL1_CF_PAPRD_LB_SKIP 0x0003f000 117062306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL1_CF_PAPRD_LB_SKIP_S 12 117162306a36Sopenharmony_ci 117262306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL2(_ah) (AR_SM_BASE + (AR_SREV_9485(_ah) ? 0x584 : 0x494)) 117362306a36Sopenharmony_ci 117462306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL2_CF_PAPRD_INIT_RX_BB_GAIN 0xFFFFFFFF 117562306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL2_CF_PAPRD_INIT_RX_BB_GAIN_S 0 117662306a36Sopenharmony_ci 117762306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL3(_ah) (AR_SM_BASE + (AR_SREV_9485(_ah) ? 0x588 : 0x498)) 117862306a36Sopenharmony_ci 117962306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_ADC_DESIRED_SIZE 0x0000003f 118062306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_ADC_DESIRED_SIZE_S 0 118162306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_QUICK_DROP 0x00000fc0 118262306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_QUICK_DROP_S 6 118362306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_MIN_LOOPBACK_DEL 0x0001f000 118462306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_MIN_LOOPBACK_DEL_S 12 118562306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_NUM_CORR_STAGES 0x000e0000 118662306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_NUM_CORR_STAGES_S 17 118762306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_COARSE_CORR_LEN 0x00f00000 118862306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_COARSE_CORR_LEN_S 20 118962306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_FINE_CORR_LEN 0x0f000000 119062306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_FINE_CORR_LEN_S 24 119162306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_BBTXMIX_DISABLE 0x20000000 119262306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_BBTXMIX_DISABLE_S 29 119362306a36Sopenharmony_ci 119462306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL4(_ah) (AR_SM_BASE + (AR_SREV_9485(_ah) ? 0x58c : 0x49c)) 119562306a36Sopenharmony_ci 119662306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL4_CF_PAPRD_NUM_TRAIN_SAMPLES 0x03ff0000 119762306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL4_CF_PAPRD_NUM_TRAIN_SAMPLES_S 16 119862306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL4_CF_PAPRD_SAFETY_DELTA 0x0000f000 119962306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL4_CF_PAPRD_SAFETY_DELTA_S 12 120062306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL4_CF_PAPRD_MIN_CORR 0x00000fff 120162306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL4_CF_PAPRD_MIN_CORR_S 0 120262306a36Sopenharmony_ci 120362306a36Sopenharmony_ci#define AR_PHY_PAPRD_PRE_POST_SCALE_0_B0 (AR_CHAN_BASE + 0x100) 120462306a36Sopenharmony_ci#define AR_PHY_PAPRD_PRE_POST_SCALE_1_B0 (AR_CHAN_BASE + 0x104) 120562306a36Sopenharmony_ci#define AR_PHY_PAPRD_PRE_POST_SCALE_2_B0 (AR_CHAN_BASE + 0x108) 120662306a36Sopenharmony_ci#define AR_PHY_PAPRD_PRE_POST_SCALE_3_B0 (AR_CHAN_BASE + 0x10c) 120762306a36Sopenharmony_ci#define AR_PHY_PAPRD_PRE_POST_SCALE_4_B0 (AR_CHAN_BASE + 0x110) 120862306a36Sopenharmony_ci#define AR_PHY_PAPRD_PRE_POST_SCALE_5_B0 (AR_CHAN_BASE + 0x114) 120962306a36Sopenharmony_ci#define AR_PHY_PAPRD_PRE_POST_SCALE_6_B0 (AR_CHAN_BASE + 0x118) 121062306a36Sopenharmony_ci#define AR_PHY_PAPRD_PRE_POST_SCALE_7_B0 (AR_CHAN_BASE + 0x11c) 121162306a36Sopenharmony_ci#define AR_PHY_PAPRD_PRE_POST_SCALING 0x3FFFF 121262306a36Sopenharmony_ci#define AR_PHY_PAPRD_PRE_POST_SCALING_S 0 121362306a36Sopenharmony_ci 121462306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_STAT1(_ah) (AR_SM_BASE + (AR_SREV_9485(_ah) ? 0x590 : 0x4a0)) 121562306a36Sopenharmony_ci 121662306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_TRAIN_DONE 0x00000001 121762306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_TRAIN_DONE_S 0 121862306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_TRAIN_INCOMPLETE 0x00000002 121962306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_TRAIN_INCOMPLETE_S 1 122062306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_CORR_ERR 0x00000004 122162306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_CORR_ERR_S 2 122262306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_TRAIN_ACTIVE 0x00000008 122362306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_TRAIN_ACTIVE_S 3 122462306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_RX_GAIN_IDX 0x000001f0 122562306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_RX_GAIN_IDX_S 4 122662306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_AGC2_PWR 0x0001fe00 122762306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_AGC2_PWR_S 9 122862306a36Sopenharmony_ci 122962306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_STAT2(_ah) (AR_SM_BASE + (AR_SREV_9485(_ah) ? 0x594 : 0x4a4)) 123062306a36Sopenharmony_ci 123162306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_STAT2_PAPRD_FINE_VAL 0x0000ffff 123262306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_STAT2_PAPRD_FINE_VAL_S 0 123362306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_STAT2_PAPRD_COARSE_IDX 0x001f0000 123462306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_STAT2_PAPRD_COARSE_IDX_S 16 123562306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_STAT2_PAPRD_FINE_IDX 0x00600000 123662306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_STAT2_PAPRD_FINE_IDX_S 21 123762306a36Sopenharmony_ci 123862306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_STAT3(_ah) (AR_SM_BASE + (AR_SREV_9485(_ah) ? 0x598 : 0x4a8)) 123962306a36Sopenharmony_ci 124062306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_STAT3_PAPRD_TRAIN_SAMPLES_CNT 0x000fffff 124162306a36Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_STAT3_PAPRD_TRAIN_SAMPLES_CNT_S 0 124262306a36Sopenharmony_ci 124362306a36Sopenharmony_ci#define AR_PHY_PAPRD_MEM_TAB_B0 (AR_CHAN_BASE + 0x120) 124462306a36Sopenharmony_ci#define AR_PHY_PAPRD_MEM_TAB_B1 (AR_CHAN1_BASE + 0x120) 124562306a36Sopenharmony_ci#define AR_PHY_PAPRD_MEM_TAB_B2 (AR_CHAN2_BASE + 0x120) 124662306a36Sopenharmony_ci 124762306a36Sopenharmony_ci#define AR_PHY_PA_GAIN123_B0 (AR_CHAN_BASE + 0xf8) 124862306a36Sopenharmony_ci#define AR_PHY_PA_GAIN123_B1 (AR_CHAN1_BASE + 0xf8) 124962306a36Sopenharmony_ci#define AR_PHY_PA_GAIN123_B2 (AR_CHAN2_BASE + 0xf8) 125062306a36Sopenharmony_ci#define AR_PHY_PA_GAIN123_PA_GAIN1 0x3FF 125162306a36Sopenharmony_ci#define AR_PHY_PA_GAIN123_PA_GAIN1_S 0 125262306a36Sopenharmony_ci 125362306a36Sopenharmony_ci#define AR_PHY_POWERTX_RATE5 (AR_SM_BASE + 0x1d0) 125462306a36Sopenharmony_ci#define AR_PHY_POWERTX_RATE5_POWERTXHT20_0 0x3F 125562306a36Sopenharmony_ci#define AR_PHY_POWERTX_RATE5_POWERTXHT20_0_S 0 125662306a36Sopenharmony_ci 125762306a36Sopenharmony_ci#define AR_PHY_POWERTX_RATE6 (AR_SM_BASE + 0x1d4) 125862306a36Sopenharmony_ci#define AR_PHY_POWERTX_RATE6_POWERTXHT20_5 0x3F00 125962306a36Sopenharmony_ci#define AR_PHY_POWERTX_RATE6_POWERTXHT20_5_S 8 126062306a36Sopenharmony_ci 126162306a36Sopenharmony_ci#define AR_PHY_POWERTX_RATE8 (AR_SM_BASE + 0x1dc) 126262306a36Sopenharmony_ci#define AR_PHY_POWERTX_RATE8_POWERTXHT40_5 0x3F00 126362306a36Sopenharmony_ci#define AR_PHY_POWERTX_RATE8_POWERTXHT40_5_S 8 126462306a36Sopenharmony_ci 126562306a36Sopenharmony_ci#define AR_PHY_CL_TAB_CL_GAIN_MOD 0x1f 126662306a36Sopenharmony_ci#define AR_PHY_CL_TAB_CL_GAIN_MOD_S 0 126762306a36Sopenharmony_ci 126862306a36Sopenharmony_ci#define AR_BTCOEX_WL_LNADIV 0x1a64 126962306a36Sopenharmony_ci#define AR_BTCOEX_WL_LNADIV_PREDICTED_PERIOD 0x00003FFF 127062306a36Sopenharmony_ci#define AR_BTCOEX_WL_LNADIV_PREDICTED_PERIOD_S 0 127162306a36Sopenharmony_ci#define AR_BTCOEX_WL_LNADIV_DPDT_IGNORE_PRIORITY 0x00004000 127262306a36Sopenharmony_ci#define AR_BTCOEX_WL_LNADIV_DPDT_IGNORE_PRIORITY_S 14 127362306a36Sopenharmony_ci#define AR_BTCOEX_WL_LNADIV_FORCE_ON 0x00008000 127462306a36Sopenharmony_ci#define AR_BTCOEX_WL_LNADIV_FORCE_ON_S 15 127562306a36Sopenharmony_ci#define AR_BTCOEX_WL_LNADIV_MODE_OPTION 0x00030000 127662306a36Sopenharmony_ci#define AR_BTCOEX_WL_LNADIV_MODE_OPTION_S 16 127762306a36Sopenharmony_ci#define AR_BTCOEX_WL_LNADIV_MODE 0x007c0000 127862306a36Sopenharmony_ci#define AR_BTCOEX_WL_LNADIV_MODE_S 18 127962306a36Sopenharmony_ci#define AR_BTCOEX_WL_LNADIV_ALLOWED_TX_ANTDIV_WL_TX_REQ 0x00800000 128062306a36Sopenharmony_ci#define AR_BTCOEX_WL_LNADIV_ALLOWED_TX_ANTDIV_WL_TX_REQ_S 23 128162306a36Sopenharmony_ci#define AR_BTCOEX_WL_LNADIV_DISABLE_TX_ANTDIV_ENABLE 0x01000000 128262306a36Sopenharmony_ci#define AR_BTCOEX_WL_LNADIV_DISABLE_TX_ANTDIV_ENABLE_S 24 128362306a36Sopenharmony_ci#define AR_BTCOEX_WL_LNADIV_CONTINUOUS_BT_ACTIVE_PROTECT 0x02000000 128462306a36Sopenharmony_ci#define AR_BTCOEX_WL_LNADIV_CONTINUOUS_BT_ACTIVE_PROTECT_S 25 128562306a36Sopenharmony_ci#define AR_BTCOEX_WL_LNADIV_BT_INACTIVE_THRESHOLD 0xFC000000 128662306a36Sopenharmony_ci#define AR_BTCOEX_WL_LNADIV_BT_INACTIVE_THRESHOLD_S 26 128762306a36Sopenharmony_ci 128862306a36Sopenharmony_ci/* Manual Peak detector calibration */ 128962306a36Sopenharmony_ci#define AR_PHY_65NM_BASE 0x16000 129062306a36Sopenharmony_ci#define AR_PHY_65NM_RXRF_GAINSTAGES(i) (AR_PHY_65NM_BASE + \ 129162306a36Sopenharmony_ci (i * 0x400) + 0x8) 129262306a36Sopenharmony_ci#define AR_PHY_65NM_RXRF_GAINSTAGES_RX_OVERRIDE 0x80000000 129362306a36Sopenharmony_ci#define AR_PHY_65NM_RXRF_GAINSTAGES_RX_OVERRIDE_S 31 129462306a36Sopenharmony_ci#define AR_PHY_65NM_RXRF_GAINSTAGES_LNAON_CALDC 0x00000002 129562306a36Sopenharmony_ci#define AR_PHY_65NM_RXRF_GAINSTAGES_LNAON_CALDC_S 1 129662306a36Sopenharmony_ci#define AR_PHY_65NM_RXRF_GAINSTAGES_LNA2G_GAIN_OVR 0x70000000 129762306a36Sopenharmony_ci#define AR_PHY_65NM_RXRF_GAINSTAGES_LNA2G_GAIN_OVR_S 28 129862306a36Sopenharmony_ci#define AR_PHY_65NM_RXRF_GAINSTAGES_LNA5G_GAIN_OVR 0x03800000 129962306a36Sopenharmony_ci#define AR_PHY_65NM_RXRF_GAINSTAGES_LNA5G_GAIN_OVR_S 23 130062306a36Sopenharmony_ci 130162306a36Sopenharmony_ci#define AR_PHY_65NM_RXTX2(i) (AR_PHY_65NM_BASE + \ 130262306a36Sopenharmony_ci (i * 0x400) + 0x104) 130362306a36Sopenharmony_ci#define AR_PHY_65NM_RXTX2_RXON_OVR 0x00001000 130462306a36Sopenharmony_ci#define AR_PHY_65NM_RXTX2_RXON_OVR_S 12 130562306a36Sopenharmony_ci#define AR_PHY_65NM_RXTX2_RXON 0x00000800 130662306a36Sopenharmony_ci#define AR_PHY_65NM_RXTX2_RXON_S 11 130762306a36Sopenharmony_ci 130862306a36Sopenharmony_ci#define AR_PHY_65NM_RXRF_AGC(i) (AR_PHY_65NM_BASE + \ 130962306a36Sopenharmony_ci (i * 0x400) + 0xc) 131062306a36Sopenharmony_ci#define AR_PHY_65NM_RXRF_AGC_AGC_OVERRIDE 0x80000000 131162306a36Sopenharmony_ci#define AR_PHY_65NM_RXRF_AGC_AGC_OVERRIDE_S 31 131262306a36Sopenharmony_ci#define AR_PHY_65NM_RXRF_AGC_AGC_ON_OVR 0x40000000 131362306a36Sopenharmony_ci#define AR_PHY_65NM_RXRF_AGC_AGC_ON_OVR_S 30 131462306a36Sopenharmony_ci#define AR_PHY_65NM_RXRF_AGC_AGC_CAL_OVR 0x20000000 131562306a36Sopenharmony_ci#define AR_PHY_65NM_RXRF_AGC_AGC_CAL_OVR_S 29 131662306a36Sopenharmony_ci#define AR_PHY_65NM_RXRF_AGC_AGC2G_DBDAC_OVR 0x1E000000 131762306a36Sopenharmony_ci#define AR_PHY_65NM_RXRF_AGC_AGC2G_DBDAC_OVR_S 25 131862306a36Sopenharmony_ci#define AR_PHY_65NM_RXRF_AGC_AGC5G_DBDAC_OVR 0x00078000 131962306a36Sopenharmony_ci#define AR_PHY_65NM_RXRF_AGC_AGC5G_DBDAC_OVR_S 15 132062306a36Sopenharmony_ci#define AR_PHY_65NM_RXRF_AGC_AGC2G_CALDAC_OVR 0x01F80000 132162306a36Sopenharmony_ci#define AR_PHY_65NM_RXRF_AGC_AGC2G_CALDAC_OVR_S 19 132262306a36Sopenharmony_ci#define AR_PHY_65NM_RXRF_AGC_AGC5G_CALDAC_OVR 0x00007e00 132362306a36Sopenharmony_ci#define AR_PHY_65NM_RXRF_AGC_AGC5G_CALDAC_OVR_S 9 132462306a36Sopenharmony_ci#define AR_PHY_65NM_RXRF_AGC_AGC_OUT 0x00000004 132562306a36Sopenharmony_ci#define AR_PHY_65NM_RXRF_AGC_AGC_OUT_S 2 132662306a36Sopenharmony_ci 132762306a36Sopenharmony_ci#define AR9300_DFS_FIRPWR -28 132862306a36Sopenharmony_ci 132962306a36Sopenharmony_ci#endif /* AR9003_PHY_H */ 1330