162306a36Sopenharmony_ci/* 262306a36Sopenharmony_ci * Copyright (c) 2008-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#ifndef AR9002_PHY_H 1762306a36Sopenharmony_ci#define AR9002_PHY_H 1862306a36Sopenharmony_ci 1962306a36Sopenharmony_ci#define AR_PHY_TEST 0x9800 2062306a36Sopenharmony_ci#define PHY_AGC_CLR 0x10000000 2162306a36Sopenharmony_ci#define RFSILENT_BB 0x00002000 2262306a36Sopenharmony_ci 2362306a36Sopenharmony_ci#define AR_PHY_TURBO 0x9804 2462306a36Sopenharmony_ci#define AR_PHY_FC_TURBO_MODE 0x00000001 2562306a36Sopenharmony_ci#define AR_PHY_FC_TURBO_SHORT 0x00000002 2662306a36Sopenharmony_ci#define AR_PHY_FC_DYN2040_EN 0x00000004 2762306a36Sopenharmony_ci#define AR_PHY_FC_DYN2040_PRI_ONLY 0x00000008 2862306a36Sopenharmony_ci#define AR_PHY_FC_DYN2040_PRI_CH 0x00000010 2962306a36Sopenharmony_ci/* For 25 MHz channel spacing -- not used but supported by hw */ 3062306a36Sopenharmony_ci#define AR_PHY_FC_DYN2040_EXT_CH 0x00000020 3162306a36Sopenharmony_ci#define AR_PHY_FC_HT_EN 0x00000040 3262306a36Sopenharmony_ci#define AR_PHY_FC_SHORT_GI_40 0x00000080 3362306a36Sopenharmony_ci#define AR_PHY_FC_WALSH 0x00000100 3462306a36Sopenharmony_ci#define AR_PHY_FC_SINGLE_HT_LTF1 0x00000200 3562306a36Sopenharmony_ci#define AR_PHY_FC_ENABLE_DAC_FIFO 0x00000800 3662306a36Sopenharmony_ci 3762306a36Sopenharmony_ci#define AR_PHY_TEST2 0x9808 3862306a36Sopenharmony_ci 3962306a36Sopenharmony_ci#define AR_PHY_TIMING2 0x9810 4062306a36Sopenharmony_ci#define AR_PHY_TIMING3 0x9814 4162306a36Sopenharmony_ci#define AR_PHY_TIMING3_DSC_MAN 0xFFFE0000 4262306a36Sopenharmony_ci#define AR_PHY_TIMING3_DSC_MAN_S 17 4362306a36Sopenharmony_ci#define AR_PHY_TIMING3_DSC_EXP 0x0001E000 4462306a36Sopenharmony_ci#define AR_PHY_TIMING3_DSC_EXP_S 13 4562306a36Sopenharmony_ci 4662306a36Sopenharmony_ci#define AR_PHY_CHIP_ID_REV_0 0x80 4762306a36Sopenharmony_ci#define AR_PHY_CHIP_ID_REV_1 0x81 4862306a36Sopenharmony_ci#define AR_PHY_CHIP_ID_9160_REV_0 0xb0 4962306a36Sopenharmony_ci 5062306a36Sopenharmony_ci#define AR_PHY_ACTIVE 0x981C 5162306a36Sopenharmony_ci#define AR_PHY_ACTIVE_EN 0x00000001 5262306a36Sopenharmony_ci#define AR_PHY_ACTIVE_DIS 0x00000000 5362306a36Sopenharmony_ci 5462306a36Sopenharmony_ci#define AR_PHY_RF_CTL2 0x9824 5562306a36Sopenharmony_ci#define AR_PHY_TX_END_DATA_START 0x000000FF 5662306a36Sopenharmony_ci#define AR_PHY_TX_END_DATA_START_S 0 5762306a36Sopenharmony_ci#define AR_PHY_TX_END_PA_ON 0x0000FF00 5862306a36Sopenharmony_ci#define AR_PHY_TX_END_PA_ON_S 8 5962306a36Sopenharmony_ci 6062306a36Sopenharmony_ci#define AR_PHY_RF_CTL3 0x9828 6162306a36Sopenharmony_ci#define AR_PHY_TX_END_TO_A2_RX_ON 0x00FF0000 6262306a36Sopenharmony_ci#define AR_PHY_TX_END_TO_A2_RX_ON_S 16 6362306a36Sopenharmony_ci#define AR_PHY_TX_END_TO_ADC_ON 0xFF000000 6462306a36Sopenharmony_ci#define AR_PHY_TX_END_TO_ADC_ON_S 24 6562306a36Sopenharmony_ci 6662306a36Sopenharmony_ci#define AR_PHY_ADC_CTL 0x982C 6762306a36Sopenharmony_ci#define AR_PHY_ADC_CTL_OFF_INBUFGAIN 0x00000003 6862306a36Sopenharmony_ci#define AR_PHY_ADC_CTL_OFF_INBUFGAIN_S 0 6962306a36Sopenharmony_ci#define AR_PHY_ADC_CTL_OFF_PWDDAC 0x00002000 7062306a36Sopenharmony_ci#define AR_PHY_ADC_CTL_OFF_PWDBANDGAP 0x00004000 7162306a36Sopenharmony_ci#define AR_PHY_ADC_CTL_OFF_PWDADC 0x00008000 7262306a36Sopenharmony_ci#define AR_PHY_ADC_CTL_ON_INBUFGAIN 0x00030000 7362306a36Sopenharmony_ci#define AR_PHY_ADC_CTL_ON_INBUFGAIN_S 16 7462306a36Sopenharmony_ci 7562306a36Sopenharmony_ci#define AR_PHY_ADC_SERIAL_CTL 0x9830 7662306a36Sopenharmony_ci#define AR_PHY_SEL_INTERNAL_ADDAC 0x00000000 7762306a36Sopenharmony_ci#define AR_PHY_SEL_EXTERNAL_RADIO 0x00000001 7862306a36Sopenharmony_ci 7962306a36Sopenharmony_ci#define AR_PHY_RF_CTL4 0x9834 8062306a36Sopenharmony_ci#define AR_PHY_RF_CTL4_TX_END_XPAB_OFF 0xFF000000 8162306a36Sopenharmony_ci#define AR_PHY_RF_CTL4_TX_END_XPAB_OFF_S 24 8262306a36Sopenharmony_ci#define AR_PHY_RF_CTL4_TX_END_XPAA_OFF 0x00FF0000 8362306a36Sopenharmony_ci#define AR_PHY_RF_CTL4_TX_END_XPAA_OFF_S 16 8462306a36Sopenharmony_ci#define AR_PHY_RF_CTL4_FRAME_XPAB_ON 0x0000FF00 8562306a36Sopenharmony_ci#define AR_PHY_RF_CTL4_FRAME_XPAB_ON_S 8 8662306a36Sopenharmony_ci#define AR_PHY_RF_CTL4_FRAME_XPAA_ON 0x000000FF 8762306a36Sopenharmony_ci#define AR_PHY_RF_CTL4_FRAME_XPAA_ON_S 0 8862306a36Sopenharmony_ci 8962306a36Sopenharmony_ci#define AR_PHY_TSTDAC_CONST 0x983c 9062306a36Sopenharmony_ci 9162306a36Sopenharmony_ci#define AR_PHY_SETTLING 0x9844 9262306a36Sopenharmony_ci#define AR_PHY_SETTLING_SWITCH 0x00003F80 9362306a36Sopenharmony_ci#define AR_PHY_SETTLING_SWITCH_S 7 9462306a36Sopenharmony_ci 9562306a36Sopenharmony_ci#define AR_PHY_RXGAIN 0x9848 9662306a36Sopenharmony_ci#define AR_PHY_RXGAIN_TXRX_ATTEN 0x0003F000 9762306a36Sopenharmony_ci#define AR_PHY_RXGAIN_TXRX_ATTEN_S 12 9862306a36Sopenharmony_ci#define AR_PHY_RXGAIN_TXRX_RF_MAX 0x007C0000 9962306a36Sopenharmony_ci#define AR_PHY_RXGAIN_TXRX_RF_MAX_S 18 10062306a36Sopenharmony_ci#define AR9280_PHY_RXGAIN_TXRX_ATTEN 0x00003F80 10162306a36Sopenharmony_ci#define AR9280_PHY_RXGAIN_TXRX_ATTEN_S 7 10262306a36Sopenharmony_ci#define AR9280_PHY_RXGAIN_TXRX_MARGIN 0x001FC000 10362306a36Sopenharmony_ci#define AR9280_PHY_RXGAIN_TXRX_MARGIN_S 14 10462306a36Sopenharmony_ci 10562306a36Sopenharmony_ci#define AR_PHY_DESIRED_SZ 0x9850 10662306a36Sopenharmony_ci#define AR_PHY_DESIRED_SZ_ADC 0x000000FF 10762306a36Sopenharmony_ci#define AR_PHY_DESIRED_SZ_ADC_S 0 10862306a36Sopenharmony_ci#define AR_PHY_DESIRED_SZ_PGA 0x0000FF00 10962306a36Sopenharmony_ci#define AR_PHY_DESIRED_SZ_PGA_S 8 11062306a36Sopenharmony_ci#define AR_PHY_DESIRED_SZ_TOT_DES 0x0FF00000 11162306a36Sopenharmony_ci#define AR_PHY_DESIRED_SZ_TOT_DES_S 20 11262306a36Sopenharmony_ci 11362306a36Sopenharmony_ci#define AR_PHY_FIND_SIG 0x9858 11462306a36Sopenharmony_ci#define AR_PHY_FIND_SIG_FIRSTEP 0x0003F000 11562306a36Sopenharmony_ci#define AR_PHY_FIND_SIG_FIRSTEP_S 12 11662306a36Sopenharmony_ci#define AR_PHY_FIND_SIG_FIRPWR 0x03FC0000 11762306a36Sopenharmony_ci#define AR_PHY_FIND_SIG_FIRPWR_S 18 11862306a36Sopenharmony_ci 11962306a36Sopenharmony_ci#define AR_PHY_FIND_SIG_LOW 0x9840 12062306a36Sopenharmony_ci#define AR_PHY_FIND_SIG_FIRSTEP_LOW 0x00000FC0L 12162306a36Sopenharmony_ci#define AR_PHY_FIND_SIG_FIRSTEP_LOW_S 6 12262306a36Sopenharmony_ci 12362306a36Sopenharmony_ci#define AR_PHY_AGC_CTL1 0x985C 12462306a36Sopenharmony_ci#define AR_PHY_AGC_CTL1_COARSE_LOW 0x00007F80 12562306a36Sopenharmony_ci#define AR_PHY_AGC_CTL1_COARSE_LOW_S 7 12662306a36Sopenharmony_ci#define AR_PHY_AGC_CTL1_COARSE_HIGH 0x003F8000 12762306a36Sopenharmony_ci#define AR_PHY_AGC_CTL1_COARSE_HIGH_S 15 12862306a36Sopenharmony_ci 12962306a36Sopenharmony_ci#define AR_PHY_CCA 0x9864 13062306a36Sopenharmony_ci#define AR_PHY_MINCCA_PWR 0x0FF80000 13162306a36Sopenharmony_ci#define AR_PHY_MINCCA_PWR_S 19 13262306a36Sopenharmony_ci#define AR_PHY_CCA_THRESH62 0x0007F000 13362306a36Sopenharmony_ci#define AR_PHY_CCA_THRESH62_S 12 13462306a36Sopenharmony_ci#define AR9280_PHY_MINCCA_PWR 0x1FF00000 13562306a36Sopenharmony_ci#define AR9280_PHY_MINCCA_PWR_S 20 13662306a36Sopenharmony_ci#define AR9280_PHY_CCA_THRESH62 0x000FF000 13762306a36Sopenharmony_ci#define AR9280_PHY_CCA_THRESH62_S 12 13862306a36Sopenharmony_ci 13962306a36Sopenharmony_ci#define AR_PHY_SFCORR_LOW 0x986C 14062306a36Sopenharmony_ci#define AR_PHY_SFCORR_LOW_USE_SELF_CORR_LOW 0x00000001 14162306a36Sopenharmony_ci#define AR_PHY_SFCORR_LOW_M2COUNT_THR_LOW 0x00003F00 14262306a36Sopenharmony_ci#define AR_PHY_SFCORR_LOW_M2COUNT_THR_LOW_S 8 14362306a36Sopenharmony_ci#define AR_PHY_SFCORR_LOW_M1_THRESH_LOW 0x001FC000 14462306a36Sopenharmony_ci#define AR_PHY_SFCORR_LOW_M1_THRESH_LOW_S 14 14562306a36Sopenharmony_ci#define AR_PHY_SFCORR_LOW_M2_THRESH_LOW 0x0FE00000 14662306a36Sopenharmony_ci#define AR_PHY_SFCORR_LOW_M2_THRESH_LOW_S 21 14762306a36Sopenharmony_ci 14862306a36Sopenharmony_ci#define AR_PHY_SFCORR 0x9868 14962306a36Sopenharmony_ci#define AR_PHY_SFCORR_M2COUNT_THR 0x0000001F 15062306a36Sopenharmony_ci#define AR_PHY_SFCORR_M2COUNT_THR_S 0 15162306a36Sopenharmony_ci#define AR_PHY_SFCORR_M1_THRESH 0x00FE0000 15262306a36Sopenharmony_ci#define AR_PHY_SFCORR_M1_THRESH_S 17 15362306a36Sopenharmony_ci#define AR_PHY_SFCORR_M2_THRESH 0x7F000000 15462306a36Sopenharmony_ci#define AR_PHY_SFCORR_M2_THRESH_S 24 15562306a36Sopenharmony_ci 15662306a36Sopenharmony_ci#define AR_PHY_SLEEP_CTR_CONTROL 0x9870 15762306a36Sopenharmony_ci#define AR_PHY_SLEEP_CTR_LIMIT 0x9874 15862306a36Sopenharmony_ci#define AR_PHY_SYNTH_CONTROL 0x9874 15962306a36Sopenharmony_ci#define AR_PHY_SLEEP_SCAL 0x9878 16062306a36Sopenharmony_ci 16162306a36Sopenharmony_ci#define AR_PHY_PLL_CTL 0x987c 16262306a36Sopenharmony_ci#define AR_PHY_PLL_CTL_40 0xaa 16362306a36Sopenharmony_ci#define AR_PHY_PLL_CTL_40_5413 0x04 16462306a36Sopenharmony_ci#define AR_PHY_PLL_CTL_44 0xab 16562306a36Sopenharmony_ci#define AR_PHY_PLL_CTL_44_2133 0xeb 16662306a36Sopenharmony_ci#define AR_PHY_PLL_CTL_40_2133 0xea 16762306a36Sopenharmony_ci 16862306a36Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN 0x9910 /* AR9280 spectral scan configuration register */ 16962306a36Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_ENABLE 0x1 17062306a36Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_ENA 0x00000001 /* Enable spectral scan, reg 68, bit 0 */ 17162306a36Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_ENA_S 0 /* Enable spectral scan, reg 68, bit 0 */ 17262306a36Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_ACTIVE 0x00000002 /* Activate spectral scan reg 68, bit 1*/ 17362306a36Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_ACTIVE_S 1 /* Activate spectral scan reg 68, bit 1*/ 17462306a36Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_FFT_PERIOD 0x000000F0 /* Interval for FFT reports, reg 68, bits 4-7*/ 17562306a36Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_FFT_PERIOD_S 4 17662306a36Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_PERIOD 0x0000FF00 /* Interval for FFT reports, reg 68, bits 8-15*/ 17762306a36Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_PERIOD_S 8 17862306a36Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_COUNT 0x00FF0000 /* Number of reports, reg 68, bits 16-23*/ 17962306a36Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_COUNT_S 16 18062306a36Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_COUNT_KIWI 0x0FFF0000 /* Number of reports, reg 68, bits 16-27*/ 18162306a36Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_COUNT_KIWI_S 16 18262306a36Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_SHORT_REPEAT 0x01000000 /* Short repeat, reg 68, bit 24*/ 18362306a36Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_SHORT_REPEAT_KIWI 0x10000000 /* Short repeat, reg 68, bit 28*/ 18462306a36Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_PHYERR_MASK_SELECT 0x40000000 18562306a36Sopenharmony_ci 18662306a36Sopenharmony_ci#define AR_PHY_RX_DELAY 0x9914 18762306a36Sopenharmony_ci#define AR_PHY_SEARCH_START_DELAY 0x9918 18862306a36Sopenharmony_ci#define AR_PHY_RX_DELAY_DELAY 0x00003FFF 18962306a36Sopenharmony_ci 19062306a36Sopenharmony_ci#define AR_PHY_TIMING_CTRL4(_i) (0x9920 + ((_i) << 12)) 19162306a36Sopenharmony_ci#define AR_PHY_TIMING_CTRL4_IQCORR_Q_Q_COFF 0x01F 19262306a36Sopenharmony_ci#define AR_PHY_TIMING_CTRL4_IQCORR_Q_Q_COFF_S 0 19362306a36Sopenharmony_ci#define AR_PHY_TIMING_CTRL4_IQCORR_Q_I_COFF 0x7E0 19462306a36Sopenharmony_ci#define AR_PHY_TIMING_CTRL4_IQCORR_Q_I_COFF_S 5 19562306a36Sopenharmony_ci#define AR_PHY_TIMING_CTRL4_IQCORR_ENABLE 0x800 19662306a36Sopenharmony_ci#define AR_PHY_TIMING_CTRL4_IQCAL_LOG_COUNT_MAX 0xF000 19762306a36Sopenharmony_ci#define AR_PHY_TIMING_CTRL4_IQCAL_LOG_COUNT_MAX_S 12 19862306a36Sopenharmony_ci#define AR_PHY_TIMING_CTRL4_DO_CAL 0x10000 19962306a36Sopenharmony_ci 20062306a36Sopenharmony_ci#define AR_PHY_TIMING_CTRL4_ENABLE_SPUR_RSSI 0x80000000 20162306a36Sopenharmony_ci#define AR_PHY_TIMING_CTRL4_ENABLE_SPUR_FILTER 0x40000000 20262306a36Sopenharmony_ci#define AR_PHY_TIMING_CTRL4_ENABLE_CHAN_MASK 0x20000000 20362306a36Sopenharmony_ci#define AR_PHY_TIMING_CTRL4_ENABLE_PILOT_MASK 0x10000000 20462306a36Sopenharmony_ci 20562306a36Sopenharmony_ci#define AR_PHY_TIMING5 0x9924 20662306a36Sopenharmony_ci#define AR_PHY_TIMING5_CYCPWR_THR1 0x000000FE 20762306a36Sopenharmony_ci#define AR_PHY_TIMING5_CYCPWR_THR1_S 1 20862306a36Sopenharmony_ci 20962306a36Sopenharmony_ci#define AR_PHY_POWER_TX_RATE1 0x9934 21062306a36Sopenharmony_ci#define AR_PHY_POWER_TX_RATE2 0x9938 21162306a36Sopenharmony_ci#define AR_PHY_POWER_TX_RATE_MAX 0x993c 21262306a36Sopenharmony_ci#define AR_PHY_POWER_TX_RATE_MAX_TPC_ENABLE 0x00000040 21362306a36Sopenharmony_ci 21462306a36Sopenharmony_ci#define AR_PHY_FRAME_CTL 0x9944 21562306a36Sopenharmony_ci#define AR_PHY_FRAME_CTL_TX_CLIP 0x00000038 21662306a36Sopenharmony_ci#define AR_PHY_FRAME_CTL_TX_CLIP_S 3 21762306a36Sopenharmony_ci 21862306a36Sopenharmony_ci#define AR_PHY_TXPWRADJ 0x994C 21962306a36Sopenharmony_ci#define AR_PHY_TXPWRADJ_CCK_GAIN_DELTA 0x00000FC0 22062306a36Sopenharmony_ci#define AR_PHY_TXPWRADJ_CCK_GAIN_DELTA_S 6 22162306a36Sopenharmony_ci#define AR_PHY_TXPWRADJ_CCK_PCDAC_INDEX 0x00FC0000 22262306a36Sopenharmony_ci#define AR_PHY_TXPWRADJ_CCK_PCDAC_INDEX_S 18 22362306a36Sopenharmony_ci 22462306a36Sopenharmony_ci#define AR_PHY_RADAR_EXT 0x9940 22562306a36Sopenharmony_ci#define AR_PHY_RADAR_EXT_ENA 0x00004000 22662306a36Sopenharmony_ci 22762306a36Sopenharmony_ci#define AR_PHY_RADAR_0 0x9954 22862306a36Sopenharmony_ci#define AR_PHY_RADAR_0_ENA 0x00000001 22962306a36Sopenharmony_ci#define AR_PHY_RADAR_0_FFT_ENA 0x80000000 23062306a36Sopenharmony_ci#define AR_PHY_RADAR_0_INBAND 0x0000003e 23162306a36Sopenharmony_ci#define AR_PHY_RADAR_0_INBAND_S 1 23262306a36Sopenharmony_ci#define AR_PHY_RADAR_0_PRSSI 0x00000FC0 23362306a36Sopenharmony_ci#define AR_PHY_RADAR_0_PRSSI_S 6 23462306a36Sopenharmony_ci#define AR_PHY_RADAR_0_HEIGHT 0x0003F000 23562306a36Sopenharmony_ci#define AR_PHY_RADAR_0_HEIGHT_S 12 23662306a36Sopenharmony_ci#define AR_PHY_RADAR_0_RRSSI 0x00FC0000 23762306a36Sopenharmony_ci#define AR_PHY_RADAR_0_RRSSI_S 18 23862306a36Sopenharmony_ci#define AR_PHY_RADAR_0_FIRPWR 0x7F000000 23962306a36Sopenharmony_ci#define AR_PHY_RADAR_0_FIRPWR_S 24 24062306a36Sopenharmony_ci 24162306a36Sopenharmony_ci#define AR_PHY_RADAR_1 0x9958 24262306a36Sopenharmony_ci#define AR_PHY_RADAR_1_RELPWR_ENA 0x00800000 24362306a36Sopenharmony_ci#define AR_PHY_RADAR_1_USE_FIR128 0x00400000 24462306a36Sopenharmony_ci#define AR_PHY_RADAR_1_RELPWR_THRESH 0x003F0000 24562306a36Sopenharmony_ci#define AR_PHY_RADAR_1_RELPWR_THRESH_S 16 24662306a36Sopenharmony_ci#define AR_PHY_RADAR_1_BLOCK_CHECK 0x00008000 24762306a36Sopenharmony_ci#define AR_PHY_RADAR_1_MAX_RRSSI 0x00004000 24862306a36Sopenharmony_ci#define AR_PHY_RADAR_1_RELSTEP_CHECK 0x00002000 24962306a36Sopenharmony_ci#define AR_PHY_RADAR_1_RELSTEP_THRESH 0x00001F00 25062306a36Sopenharmony_ci#define AR_PHY_RADAR_1_RELSTEP_THRESH_S 8 25162306a36Sopenharmony_ci#define AR_PHY_RADAR_1_MAXLEN 0x000000FF 25262306a36Sopenharmony_ci#define AR_PHY_RADAR_1_MAXLEN_S 0 25362306a36Sopenharmony_ci 25462306a36Sopenharmony_ci#define AR_PHY_SWITCH_CHAIN_0 0x9960 25562306a36Sopenharmony_ci#define AR_PHY_SWITCH_COM 0x9964 25662306a36Sopenharmony_ci 25762306a36Sopenharmony_ci#define AR_PHY_SIGMA_DELTA 0x996C 25862306a36Sopenharmony_ci#define AR_PHY_SIGMA_DELTA_ADC_SEL 0x00000003 25962306a36Sopenharmony_ci#define AR_PHY_SIGMA_DELTA_ADC_SEL_S 0 26062306a36Sopenharmony_ci#define AR_PHY_SIGMA_DELTA_FILT2 0x000000F8 26162306a36Sopenharmony_ci#define AR_PHY_SIGMA_DELTA_FILT2_S 3 26262306a36Sopenharmony_ci#define AR_PHY_SIGMA_DELTA_FILT1 0x00001F00 26362306a36Sopenharmony_ci#define AR_PHY_SIGMA_DELTA_FILT1_S 8 26462306a36Sopenharmony_ci#define AR_PHY_SIGMA_DELTA_ADC_CLIP 0x01FFE000 26562306a36Sopenharmony_ci#define AR_PHY_SIGMA_DELTA_ADC_CLIP_S 13 26662306a36Sopenharmony_ci 26762306a36Sopenharmony_ci#define AR_PHY_RESTART 0x9970 26862306a36Sopenharmony_ci#define AR_PHY_RESTART_DIV_GC 0x001C0000 26962306a36Sopenharmony_ci#define AR_PHY_RESTART_DIV_GC_S 18 27062306a36Sopenharmony_ci 27162306a36Sopenharmony_ci#define AR_PHY_RFBUS_REQ 0x997C 27262306a36Sopenharmony_ci#define AR_PHY_RFBUS_REQ_EN 0x00000001 27362306a36Sopenharmony_ci 27462306a36Sopenharmony_ci#define AR_PHY_TIMING7 0x9980 27562306a36Sopenharmony_ci#define AR_PHY_TIMING8 0x9984 27662306a36Sopenharmony_ci#define AR_PHY_TIMING8_PILOT_MASK_2 0x000FFFFF 27762306a36Sopenharmony_ci#define AR_PHY_TIMING8_PILOT_MASK_2_S 0 27862306a36Sopenharmony_ci 27962306a36Sopenharmony_ci#define AR_PHY_BIN_MASK2_1 0x9988 28062306a36Sopenharmony_ci#define AR_PHY_BIN_MASK2_2 0x998c 28162306a36Sopenharmony_ci#define AR_PHY_BIN_MASK2_3 0x9990 28262306a36Sopenharmony_ci#define AR_PHY_BIN_MASK2_4 0x9994 28362306a36Sopenharmony_ci 28462306a36Sopenharmony_ci#define AR_PHY_BIN_MASK_1 0x9900 28562306a36Sopenharmony_ci#define AR_PHY_BIN_MASK_2 0x9904 28662306a36Sopenharmony_ci#define AR_PHY_BIN_MASK_3 0x9908 28762306a36Sopenharmony_ci 28862306a36Sopenharmony_ci#define AR_PHY_MASK_CTL 0x990c 28962306a36Sopenharmony_ci 29062306a36Sopenharmony_ci#define AR_PHY_BIN_MASK2_4_MASK_4 0x00003FFF 29162306a36Sopenharmony_ci#define AR_PHY_BIN_MASK2_4_MASK_4_S 0 29262306a36Sopenharmony_ci 29362306a36Sopenharmony_ci#define AR_PHY_TIMING9 0x9998 29462306a36Sopenharmony_ci#define AR_PHY_TIMING10 0x999c 29562306a36Sopenharmony_ci#define AR_PHY_TIMING10_PILOT_MASK_2 0x000FFFFF 29662306a36Sopenharmony_ci#define AR_PHY_TIMING10_PILOT_MASK_2_S 0 29762306a36Sopenharmony_ci 29862306a36Sopenharmony_ci#define AR_PHY_TIMING11 0x99a0 29962306a36Sopenharmony_ci#define AR_PHY_TIMING11_SPUR_DELTA_PHASE 0x000FFFFF 30062306a36Sopenharmony_ci#define AR_PHY_TIMING11_SPUR_DELTA_PHASE_S 0 30162306a36Sopenharmony_ci#define AR_PHY_TIMING11_USE_SPUR_IN_AGC 0x40000000 30262306a36Sopenharmony_ci#define AR_PHY_TIMING11_USE_SPUR_IN_SELFCOR 0x80000000 30362306a36Sopenharmony_ci 30462306a36Sopenharmony_ci#define AR_PHY_RX_CHAINMASK 0x99a4 30562306a36Sopenharmony_ci#define AR_PHY_NEW_ADC_DC_GAIN_CORR(_i) (0x99b4 + ((_i) << 12)) 30662306a36Sopenharmony_ci#define AR_PHY_NEW_ADC_GAIN_CORR_ENABLE 0x40000000 30762306a36Sopenharmony_ci#define AR_PHY_NEW_ADC_DC_OFFSET_CORR_ENABLE 0x80000000 30862306a36Sopenharmony_ci 30962306a36Sopenharmony_ci#define AR_PHY_MULTICHAIN_GAIN_CTL 0x99ac 31062306a36Sopenharmony_ci#define AR_PHY_9285_FAST_DIV_BIAS 0x00007E00 31162306a36Sopenharmony_ci#define AR_PHY_9285_FAST_DIV_BIAS_S 9 31262306a36Sopenharmony_ci#define AR_PHY_9285_ANT_DIV_CTL_ALL 0x7f000000 31362306a36Sopenharmony_ci#define AR_PHY_9285_ANT_DIV_CTL 0x01000000 31462306a36Sopenharmony_ci#define AR_PHY_9285_ANT_DIV_CTL_S 24 31562306a36Sopenharmony_ci#define AR_PHY_9285_ANT_DIV_ALT_LNACONF 0x06000000 31662306a36Sopenharmony_ci#define AR_PHY_9285_ANT_DIV_ALT_LNACONF_S 25 31762306a36Sopenharmony_ci#define AR_PHY_9285_ANT_DIV_MAIN_LNACONF 0x18000000 31862306a36Sopenharmony_ci#define AR_PHY_9285_ANT_DIV_MAIN_LNACONF_S 27 31962306a36Sopenharmony_ci#define AR_PHY_9285_ANT_DIV_ALT_GAINTB 0x20000000 32062306a36Sopenharmony_ci#define AR_PHY_9285_ANT_DIV_ALT_GAINTB_S 29 32162306a36Sopenharmony_ci#define AR_PHY_9285_ANT_DIV_MAIN_GAINTB 0x40000000 32262306a36Sopenharmony_ci#define AR_PHY_9285_ANT_DIV_MAIN_GAINTB_S 30 32362306a36Sopenharmony_ci#define AR_PHY_9285_ANT_DIV_GAINTB_0 0 32462306a36Sopenharmony_ci#define AR_PHY_9285_ANT_DIV_GAINTB_1 1 32562306a36Sopenharmony_ci 32662306a36Sopenharmony_ci#define ATH_BT_COEX_ANTDIV_CONTROL1_ENABLE 0x0b 32762306a36Sopenharmony_ci#define ATH_BT_COEX_ANTDIV_CONTROL2_ENABLE 0x09 32862306a36Sopenharmony_ci#define ATH_BT_COEX_ANTDIV_CONTROL1_FIXED_A 0x04 32962306a36Sopenharmony_ci#define ATH_BT_COEX_ANTDIV_CONTROL2_FIXED_A 0x09 33062306a36Sopenharmony_ci#define ATH_BT_COEX_ANT_DIV_SWITCH_COM 0x66666666 33162306a36Sopenharmony_ci 33262306a36Sopenharmony_ci#define AR_PHY_EXT_CCA0 0x99b8 33362306a36Sopenharmony_ci#define AR_PHY_EXT_CCA0_THRESH62 0x000000FF 33462306a36Sopenharmony_ci#define AR_PHY_EXT_CCA0_THRESH62_S 0 33562306a36Sopenharmony_ci 33662306a36Sopenharmony_ci#define AR_PHY_EXT_CCA 0x99bc 33762306a36Sopenharmony_ci#define AR_PHY_EXT_CCA_CYCPWR_THR1 0x0000FE00 33862306a36Sopenharmony_ci#define AR_PHY_EXT_CCA_CYCPWR_THR1_S 9 33962306a36Sopenharmony_ci#define AR_PHY_EXT_CCA_THRESH62 0x007F0000 34062306a36Sopenharmony_ci#define AR_PHY_EXT_CCA_THRESH62_S 16 34162306a36Sopenharmony_ci#define AR_PHY_EXT_TIMING5_CYCPWR_THR1 0x0000FE00L 34262306a36Sopenharmony_ci#define AR_PHY_EXT_TIMING5_CYCPWR_THR1_S 9 34362306a36Sopenharmony_ci 34462306a36Sopenharmony_ci#define AR_PHY_EXT_MINCCA_PWR 0xFF800000 34562306a36Sopenharmony_ci#define AR_PHY_EXT_MINCCA_PWR_S 23 34662306a36Sopenharmony_ci#define AR9280_PHY_EXT_MINCCA_PWR 0x01FF0000 34762306a36Sopenharmony_ci#define AR9280_PHY_EXT_MINCCA_PWR_S 16 34862306a36Sopenharmony_ci 34962306a36Sopenharmony_ci#define AR_PHY_SFCORR_EXT 0x99c0 35062306a36Sopenharmony_ci#define AR_PHY_SFCORR_EXT_M1_THRESH 0x0000007F 35162306a36Sopenharmony_ci#define AR_PHY_SFCORR_EXT_M1_THRESH_S 0 35262306a36Sopenharmony_ci#define AR_PHY_SFCORR_EXT_M2_THRESH 0x00003F80 35362306a36Sopenharmony_ci#define AR_PHY_SFCORR_EXT_M2_THRESH_S 7 35462306a36Sopenharmony_ci#define AR_PHY_SFCORR_EXT_M1_THRESH_LOW 0x001FC000 35562306a36Sopenharmony_ci#define AR_PHY_SFCORR_EXT_M1_THRESH_LOW_S 14 35662306a36Sopenharmony_ci#define AR_PHY_SFCORR_EXT_M2_THRESH_LOW 0x0FE00000 35762306a36Sopenharmony_ci#define AR_PHY_SFCORR_EXT_M2_THRESH_LOW_S 21 35862306a36Sopenharmony_ci#define AR_PHY_SFCORR_SPUR_SUBCHNL_SD_S 28 35962306a36Sopenharmony_ci 36062306a36Sopenharmony_ci#define AR_PHY_HALFGI 0x99D0 36162306a36Sopenharmony_ci#define AR_PHY_HALFGI_DSC_MAN 0x0007FFF0 36262306a36Sopenharmony_ci#define AR_PHY_HALFGI_DSC_MAN_S 4 36362306a36Sopenharmony_ci#define AR_PHY_HALFGI_DSC_EXP 0x0000000F 36462306a36Sopenharmony_ci#define AR_PHY_HALFGI_DSC_EXP_S 0 36562306a36Sopenharmony_ci 36662306a36Sopenharmony_ci#define AR_PHY_CHAN_INFO_MEMORY 0x99DC 36762306a36Sopenharmony_ci#define AR_PHY_CHAN_INFO_MEMORY_CAPTURE_MASK 0x0001 36862306a36Sopenharmony_ci 36962306a36Sopenharmony_ci#define AR_PHY_HEAVY_CLIP_ENABLE 0x99E0 37062306a36Sopenharmony_ci 37162306a36Sopenharmony_ci#define AR_PHY_HEAVY_CLIP_FACTOR_RIFS 0x99EC 37262306a36Sopenharmony_ci#define AR_PHY_RIFS_INIT_DELAY 0x03ff0000 37362306a36Sopenharmony_ci 37462306a36Sopenharmony_ci#define AR_PHY_M_SLEEP 0x99f0 37562306a36Sopenharmony_ci#define AR_PHY_REFCLKDLY 0x99f4 37662306a36Sopenharmony_ci#define AR_PHY_REFCLKPD 0x99f8 37762306a36Sopenharmony_ci 37862306a36Sopenharmony_ci#define AR_PHY_CALMODE 0x99f0 37962306a36Sopenharmony_ci 38062306a36Sopenharmony_ci#define AR_PHY_CALMODE_IQ 0x00000000 38162306a36Sopenharmony_ci#define AR_PHY_CALMODE_ADC_GAIN 0x00000001 38262306a36Sopenharmony_ci#define AR_PHY_CALMODE_ADC_DC_PER 0x00000002 38362306a36Sopenharmony_ci#define AR_PHY_CALMODE_ADC_DC_INIT 0x00000003 38462306a36Sopenharmony_ci 38562306a36Sopenharmony_ci#define AR_PHY_CAL_MEAS_0(_i) (0x9c10 + ((_i) << 12)) 38662306a36Sopenharmony_ci#define AR_PHY_CAL_MEAS_1(_i) (0x9c14 + ((_i) << 12)) 38762306a36Sopenharmony_ci#define AR_PHY_CAL_MEAS_2(_i) (0x9c18 + ((_i) << 12)) 38862306a36Sopenharmony_ci#define AR_PHY_CAL_MEAS_3(_i) (0x9c1c + ((_i) << 12)) 38962306a36Sopenharmony_ci 39062306a36Sopenharmony_ci#define AR_PHY_CURRENT_RSSI 0x9c1c 39162306a36Sopenharmony_ci#define AR9280_PHY_CURRENT_RSSI 0x9c3c 39262306a36Sopenharmony_ci 39362306a36Sopenharmony_ci#define AR_PHY_RFBUS_GRANT 0x9C20 39462306a36Sopenharmony_ci#define AR_PHY_RFBUS_GRANT_EN 0x00000001 39562306a36Sopenharmony_ci 39662306a36Sopenharmony_ci#define AR_PHY_CHAN_INFO_GAIN_DIFF 0x9CF4 39762306a36Sopenharmony_ci#define AR_PHY_CHAN_INFO_GAIN_DIFF_UPPER_LIMIT 320 39862306a36Sopenharmony_ci 39962306a36Sopenharmony_ci#define AR_PHY_CHAN_INFO_GAIN 0x9CFC 40062306a36Sopenharmony_ci 40162306a36Sopenharmony_ci#define AR_PHY_MODE 0xA200 40262306a36Sopenharmony_ci#define AR_PHY_MODE_ASYNCFIFO 0x80 40362306a36Sopenharmony_ci#define AR_PHY_MODE_AR2133 0x08 40462306a36Sopenharmony_ci#define AR_PHY_MODE_AR5111 0x00 40562306a36Sopenharmony_ci#define AR_PHY_MODE_AR5112 0x08 40662306a36Sopenharmony_ci#define AR_PHY_MODE_DYNAMIC 0x04 40762306a36Sopenharmony_ci#define AR_PHY_MODE_RF2GHZ 0x02 40862306a36Sopenharmony_ci#define AR_PHY_MODE_RF5GHZ 0x00 40962306a36Sopenharmony_ci#define AR_PHY_MODE_CCK 0x01 41062306a36Sopenharmony_ci#define AR_PHY_MODE_OFDM 0x00 41162306a36Sopenharmony_ci#define AR_PHY_MODE_DYN_CCK_DISABLE 0x100 41262306a36Sopenharmony_ci 41362306a36Sopenharmony_ci#define AR_PHY_CCK_TX_CTRL 0xA204 41462306a36Sopenharmony_ci#define AR_PHY_CCK_TX_CTRL_JAPAN 0x00000010 41562306a36Sopenharmony_ci#define AR_PHY_CCK_TX_CTRL_TX_DAC_SCALE_CCK 0x0000000C 41662306a36Sopenharmony_ci#define AR_PHY_CCK_TX_CTRL_TX_DAC_SCALE_CCK_S 2 41762306a36Sopenharmony_ci 41862306a36Sopenharmony_ci#define AR_PHY_CCK_DETECT 0xA208 41962306a36Sopenharmony_ci#define AR_PHY_CCK_DETECT_WEAK_SIG_THR_CCK 0x0000003F 42062306a36Sopenharmony_ci#define AR_PHY_CCK_DETECT_WEAK_SIG_THR_CCK_S 0 42162306a36Sopenharmony_ci/* [12:6] settling time for antenna switch */ 42262306a36Sopenharmony_ci#define AR_PHY_CCK_DETECT_ANT_SWITCH_TIME 0x00001FC0 42362306a36Sopenharmony_ci#define AR_PHY_CCK_DETECT_ANT_SWITCH_TIME_S 6 42462306a36Sopenharmony_ci#define AR_PHY_CCK_DETECT_BB_ENABLE_ANT_FAST_DIV 0x2000 42562306a36Sopenharmony_ci#define AR_PHY_CCK_DETECT_BB_ENABLE_ANT_FAST_DIV_S 13 42662306a36Sopenharmony_ci 42762306a36Sopenharmony_ci#define AR_PHY_GAIN_2GHZ 0xA20C 42862306a36Sopenharmony_ci#define AR_PHY_GAIN_2GHZ_RXTX_MARGIN 0x00FC0000 42962306a36Sopenharmony_ci#define AR_PHY_GAIN_2GHZ_RXTX_MARGIN_S 18 43062306a36Sopenharmony_ci#define AR_PHY_GAIN_2GHZ_BSW_MARGIN 0x00003C00 43162306a36Sopenharmony_ci#define AR_PHY_GAIN_2GHZ_BSW_MARGIN_S 10 43262306a36Sopenharmony_ci#define AR_PHY_GAIN_2GHZ_BSW_ATTEN 0x0000001F 43362306a36Sopenharmony_ci#define AR_PHY_GAIN_2GHZ_BSW_ATTEN_S 0 43462306a36Sopenharmony_ci 43562306a36Sopenharmony_ci#define AR_PHY_GAIN_2GHZ_XATTEN2_MARGIN 0x003E0000 43662306a36Sopenharmony_ci#define AR_PHY_GAIN_2GHZ_XATTEN2_MARGIN_S 17 43762306a36Sopenharmony_ci#define AR_PHY_GAIN_2GHZ_XATTEN1_MARGIN 0x0001F000 43862306a36Sopenharmony_ci#define AR_PHY_GAIN_2GHZ_XATTEN1_MARGIN_S 12 43962306a36Sopenharmony_ci#define AR_PHY_GAIN_2GHZ_XATTEN2_DB 0x00000FC0 44062306a36Sopenharmony_ci#define AR_PHY_GAIN_2GHZ_XATTEN2_DB_S 6 44162306a36Sopenharmony_ci#define AR_PHY_GAIN_2GHZ_XATTEN1_DB 0x0000003F 44262306a36Sopenharmony_ci#define AR_PHY_GAIN_2GHZ_XATTEN1_DB_S 0 44362306a36Sopenharmony_ci 44462306a36Sopenharmony_ci#define AR_PHY_CCK_RXCTRL4 0xA21C 44562306a36Sopenharmony_ci#define AR_PHY_CCK_RXCTRL4_FREQ_EST_SHORT 0x01F80000 44662306a36Sopenharmony_ci#define AR_PHY_CCK_RXCTRL4_FREQ_EST_SHORT_S 19 44762306a36Sopenharmony_ci 44862306a36Sopenharmony_ci#define AR_PHY_DAG_CTRLCCK 0xA228 44962306a36Sopenharmony_ci#define AR_PHY_DAG_CTRLCCK_EN_RSSI_THR 0x00000200 45062306a36Sopenharmony_ci#define AR_PHY_DAG_CTRLCCK_RSSI_THR 0x0001FC00 45162306a36Sopenharmony_ci#define AR_PHY_DAG_CTRLCCK_RSSI_THR_S 10 45262306a36Sopenharmony_ci 45362306a36Sopenharmony_ci#define AR_PHY_FORCE_CLKEN_CCK 0xA22C 45462306a36Sopenharmony_ci#define AR_PHY_FORCE_CLKEN_CCK_MRC_MUX 0x00000040 45562306a36Sopenharmony_ci 45662306a36Sopenharmony_ci#define AR_PHY_POWER_TX_RATE3 0xA234 45762306a36Sopenharmony_ci#define AR_PHY_POWER_TX_RATE4 0xA238 45862306a36Sopenharmony_ci 45962306a36Sopenharmony_ci#define AR_PHY_SCRM_SEQ_XR 0xA23C 46062306a36Sopenharmony_ci#define AR_PHY_HEADER_DETECT_XR 0xA240 46162306a36Sopenharmony_ci#define AR_PHY_CHIRP_DETECTED_XR 0xA244 46262306a36Sopenharmony_ci#define AR_PHY_BLUETOOTH 0xA254 46362306a36Sopenharmony_ci 46462306a36Sopenharmony_ci#define AR_PHY_TPCRG1 0xA258 46562306a36Sopenharmony_ci#define AR_PHY_TPCRG1_NUM_PD_GAIN 0x0000c000 46662306a36Sopenharmony_ci#define AR_PHY_TPCRG1_NUM_PD_GAIN_S 14 46762306a36Sopenharmony_ci 46862306a36Sopenharmony_ci#define AR_PHY_TPCRG1_PD_GAIN_1 0x00030000 46962306a36Sopenharmony_ci#define AR_PHY_TPCRG1_PD_GAIN_1_S 16 47062306a36Sopenharmony_ci#define AR_PHY_TPCRG1_PD_GAIN_2 0x000C0000 47162306a36Sopenharmony_ci#define AR_PHY_TPCRG1_PD_GAIN_2_S 18 47262306a36Sopenharmony_ci#define AR_PHY_TPCRG1_PD_GAIN_3 0x00300000 47362306a36Sopenharmony_ci#define AR_PHY_TPCRG1_PD_GAIN_3_S 20 47462306a36Sopenharmony_ci 47562306a36Sopenharmony_ci#define AR_PHY_TPCRG1_PD_CAL_ENABLE 0x00400000 47662306a36Sopenharmony_ci#define AR_PHY_TPCRG1_PD_CAL_ENABLE_S 22 47762306a36Sopenharmony_ci 47862306a36Sopenharmony_ci#define AR_PHY_TX_PWRCTRL4 0xa264 47962306a36Sopenharmony_ci#define AR_PHY_TX_PWRCTRL_PD_AVG_VALID 0x00000001 48062306a36Sopenharmony_ci#define AR_PHY_TX_PWRCTRL_PD_AVG_VALID_S 0 48162306a36Sopenharmony_ci#define AR_PHY_TX_PWRCTRL_PD_AVG_OUT 0x000001FE 48262306a36Sopenharmony_ci#define AR_PHY_TX_PWRCTRL_PD_AVG_OUT_S 1 48362306a36Sopenharmony_ci 48462306a36Sopenharmony_ci#define AR_PHY_TX_PWRCTRL6_0 0xa270 48562306a36Sopenharmony_ci#define AR_PHY_TX_PWRCTRL6_1 0xb270 48662306a36Sopenharmony_ci#define AR_PHY_TX_PWRCTRL_ERR_EST_MODE 0x03000000 48762306a36Sopenharmony_ci#define AR_PHY_TX_PWRCTRL_ERR_EST_MODE_S 24 48862306a36Sopenharmony_ci 48962306a36Sopenharmony_ci#define AR_PHY_TX_PWRCTRL7 0xa274 49062306a36Sopenharmony_ci#define AR_PHY_TX_PWRCTRL_INIT_TX_GAIN 0x01F80000 49162306a36Sopenharmony_ci#define AR_PHY_TX_PWRCTRL_INIT_TX_GAIN_S 19 49262306a36Sopenharmony_ci 49362306a36Sopenharmony_ci#define AR_PHY_TX_PWRCTRL8 0xa278 49462306a36Sopenharmony_ci 49562306a36Sopenharmony_ci#define AR_PHY_TX_PWRCTRL9 0xa27C 49662306a36Sopenharmony_ci 49762306a36Sopenharmony_ci#define AR_PHY_TX_PWRCTRL10 0xa394 49862306a36Sopenharmony_ci#define AR_PHY_TX_DESIRED_SCALE_CCK 0x00007C00 49962306a36Sopenharmony_ci#define AR_PHY_TX_DESIRED_SCALE_CCK_S 10 50062306a36Sopenharmony_ci#define AR_PHY_TX_PWRCTRL9_RES_DC_REMOVAL 0x80000000 50162306a36Sopenharmony_ci#define AR_PHY_TX_PWRCTRL9_RES_DC_REMOVAL_S 31 50262306a36Sopenharmony_ci 50362306a36Sopenharmony_ci#define AR_PHY_TX_GAIN_TBL1 0xa300 50462306a36Sopenharmony_ci#define AR_PHY_TX_GAIN 0x0007F000 50562306a36Sopenharmony_ci#define AR_PHY_TX_GAIN_S 12 50662306a36Sopenharmony_ci 50762306a36Sopenharmony_ci#define AR_PHY_CH0_TX_PWRCTRL11 0xa398 50862306a36Sopenharmony_ci#define AR_PHY_CH1_TX_PWRCTRL11 0xb398 50962306a36Sopenharmony_ci#define AR_PHY_CH0_TX_PWRCTRL12 0xa3dc 51062306a36Sopenharmony_ci#define AR_PHY_CH0_TX_PWRCTRL13 0xa3e0 51162306a36Sopenharmony_ci#define AR_PHY_TX_PWRCTRL_OLPC_TEMP_COMP 0x0000FC00 51262306a36Sopenharmony_ci#define AR_PHY_TX_PWRCTRL_OLPC_TEMP_COMP_S 10 51362306a36Sopenharmony_ci 51462306a36Sopenharmony_ci#define AR_PHY_VIT_MASK2_M_46_61 0xa3a0 51562306a36Sopenharmony_ci#define AR_PHY_MASK2_M_31_45 0xa3a4 51662306a36Sopenharmony_ci#define AR_PHY_MASK2_M_16_30 0xa3a8 51762306a36Sopenharmony_ci#define AR_PHY_MASK2_M_00_15 0xa3ac 51862306a36Sopenharmony_ci#define AR_PHY_MASK2_P_15_01 0xa3b8 51962306a36Sopenharmony_ci#define AR_PHY_MASK2_P_30_16 0xa3bc 52062306a36Sopenharmony_ci#define AR_PHY_MASK2_P_45_31 0xa3c0 52162306a36Sopenharmony_ci#define AR_PHY_MASK2_P_61_45 0xa3c4 52262306a36Sopenharmony_ci#define AR_PHY_SPUR_REG 0x994c 52362306a36Sopenharmony_ci 52462306a36Sopenharmony_ci#define AR_PHY_SPUR_REG_MASK_RATE_CNTL (0xFF << 18) 52562306a36Sopenharmony_ci#define AR_PHY_SPUR_REG_MASK_RATE_CNTL_S 18 52662306a36Sopenharmony_ci 52762306a36Sopenharmony_ci#define AR_PHY_SPUR_REG_ENABLE_MASK_PPM 0x20000 52862306a36Sopenharmony_ci#define AR_PHY_SPUR_REG_MASK_RATE_SELECT (0xFF << 9) 52962306a36Sopenharmony_ci#define AR_PHY_SPUR_REG_MASK_RATE_SELECT_S 9 53062306a36Sopenharmony_ci#define AR_PHY_SPUR_REG_ENABLE_VIT_SPUR_RSSI 0x100 53162306a36Sopenharmony_ci#define AR_PHY_SPUR_REG_SPUR_RSSI_THRESH 0x7F 53262306a36Sopenharmony_ci#define AR_PHY_SPUR_REG_SPUR_RSSI_THRESH_S 0 53362306a36Sopenharmony_ci 53462306a36Sopenharmony_ci#define AR_PHY_PILOT_MASK_01_30 0xa3b0 53562306a36Sopenharmony_ci#define AR_PHY_PILOT_MASK_31_60 0xa3b4 53662306a36Sopenharmony_ci 53762306a36Sopenharmony_ci#define AR_PHY_CHANNEL_MASK_01_30 0x99d4 53862306a36Sopenharmony_ci#define AR_PHY_CHANNEL_MASK_31_60 0x99d8 53962306a36Sopenharmony_ci 54062306a36Sopenharmony_ci#define AR_PHY_ANALOG_SWAP 0xa268 54162306a36Sopenharmony_ci#define AR_PHY_SWAP_ALT_CHAIN 0x00000040 54262306a36Sopenharmony_ci 54362306a36Sopenharmony_ci#define AR_PHY_TPCRG5 0xA26C 54462306a36Sopenharmony_ci#define AR_PHY_TPCRG5_PD_GAIN_OVERLAP 0x0000000F 54562306a36Sopenharmony_ci#define AR_PHY_TPCRG5_PD_GAIN_OVERLAP_S 0 54662306a36Sopenharmony_ci#define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_1 0x000003F0 54762306a36Sopenharmony_ci#define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_1_S 4 54862306a36Sopenharmony_ci#define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_2 0x0000FC00 54962306a36Sopenharmony_ci#define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_2_S 10 55062306a36Sopenharmony_ci#define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_3 0x003F0000 55162306a36Sopenharmony_ci#define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_3_S 16 55262306a36Sopenharmony_ci#define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_4 0x0FC00000 55362306a36Sopenharmony_ci#define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_4_S 22 55462306a36Sopenharmony_ci 55562306a36Sopenharmony_ci/* Carrier leak calibration control, do it after AGC calibration */ 55662306a36Sopenharmony_ci#define AR_PHY_CL_CAL_CTL 0xA358 55762306a36Sopenharmony_ci#define AR_PHY_CL_CAL_ENABLE 0x00000002 55862306a36Sopenharmony_ci#define AR_PHY_PARALLEL_CAL_ENABLE 0x00000001 55962306a36Sopenharmony_ci 56062306a36Sopenharmony_ci#define AR_PHY_POWER_TX_RATE5 0xA38C 56162306a36Sopenharmony_ci#define AR_PHY_POWER_TX_RATE6 0xA390 56262306a36Sopenharmony_ci 56362306a36Sopenharmony_ci#define AR_PHY_CAL_CHAINMASK 0xA39C 56462306a36Sopenharmony_ci 56562306a36Sopenharmony_ci#define AR_PHY_POWER_TX_SUB 0xA3C8 56662306a36Sopenharmony_ci#define AR_PHY_POWER_TX_RATE7 0xA3CC 56762306a36Sopenharmony_ci#define AR_PHY_POWER_TX_RATE8 0xA3D0 56862306a36Sopenharmony_ci#define AR_PHY_POWER_TX_RATE9 0xA3D4 56962306a36Sopenharmony_ci 57062306a36Sopenharmony_ci#define AR_PHY_XPA_CFG 0xA3D8 57162306a36Sopenharmony_ci#define AR_PHY_FORCE_XPA_CFG 0x000000001 57262306a36Sopenharmony_ci#define AR_PHY_FORCE_XPA_CFG_S 0 57362306a36Sopenharmony_ci 57462306a36Sopenharmony_ci#define AR_PHY_CH1_CCA 0xa864 57562306a36Sopenharmony_ci#define AR_PHY_CH1_MINCCA_PWR 0x0FF80000 57662306a36Sopenharmony_ci#define AR_PHY_CH1_MINCCA_PWR_S 19 57762306a36Sopenharmony_ci#define AR9280_PHY_CH1_MINCCA_PWR 0x1FF00000 57862306a36Sopenharmony_ci#define AR9280_PHY_CH1_MINCCA_PWR_S 20 57962306a36Sopenharmony_ci 58062306a36Sopenharmony_ci#define AR_PHY_CH2_CCA 0xb864 58162306a36Sopenharmony_ci#define AR_PHY_CH2_MINCCA_PWR 0x0FF80000 58262306a36Sopenharmony_ci#define AR_PHY_CH2_MINCCA_PWR_S 19 58362306a36Sopenharmony_ci 58462306a36Sopenharmony_ci#define AR_PHY_CH1_EXT_CCA 0xa9bc 58562306a36Sopenharmony_ci#define AR_PHY_CH1_EXT_MINCCA_PWR 0xFF800000 58662306a36Sopenharmony_ci#define AR_PHY_CH1_EXT_MINCCA_PWR_S 23 58762306a36Sopenharmony_ci#define AR9280_PHY_CH1_EXT_MINCCA_PWR 0x01FF0000 58862306a36Sopenharmony_ci#define AR9280_PHY_CH1_EXT_MINCCA_PWR_S 16 58962306a36Sopenharmony_ci 59062306a36Sopenharmony_ci#define AR_PHY_CH2_EXT_CCA 0xb9bc 59162306a36Sopenharmony_ci#define AR_PHY_CH2_EXT_MINCCA_PWR 0xFF800000 59262306a36Sopenharmony_ci#define AR_PHY_CH2_EXT_MINCCA_PWR_S 23 59362306a36Sopenharmony_ci 59462306a36Sopenharmony_ci#define AR_PHY_CCA_NOM_VAL_5416_2GHZ -90 59562306a36Sopenharmony_ci#define AR_PHY_CCA_NOM_VAL_5416_5GHZ -100 59662306a36Sopenharmony_ci#define AR_PHY_CCA_MIN_GOOD_VAL_5416_2GHZ -100 59762306a36Sopenharmony_ci#define AR_PHY_CCA_MIN_GOOD_VAL_5416_5GHZ -110 59862306a36Sopenharmony_ci#define AR_PHY_CCA_MAX_GOOD_VAL_5416_2GHZ -80 59962306a36Sopenharmony_ci#define AR_PHY_CCA_MAX_GOOD_VAL_5416_5GHZ -90 60062306a36Sopenharmony_ci 60162306a36Sopenharmony_ci#define AR_PHY_CCA_NOM_VAL_9280_2GHZ -112 60262306a36Sopenharmony_ci#define AR_PHY_CCA_NOM_VAL_9280_5GHZ -112 60362306a36Sopenharmony_ci#define AR_PHY_CCA_MIN_GOOD_VAL_9280_2GHZ -127 60462306a36Sopenharmony_ci#define AR_PHY_CCA_MIN_GOOD_VAL_9280_5GHZ -122 60562306a36Sopenharmony_ci#define AR_PHY_CCA_MAX_GOOD_VAL_9280_2GHZ -97 60662306a36Sopenharmony_ci#define AR_PHY_CCA_MAX_GOOD_VAL_9280_5GHZ -102 60762306a36Sopenharmony_ci 60862306a36Sopenharmony_ci#define AR_PHY_CCA_NOM_VAL_9285_2GHZ -118 60962306a36Sopenharmony_ci#define AR_PHY_CCA_MIN_GOOD_VAL_9285_2GHZ -127 61062306a36Sopenharmony_ci#define AR_PHY_CCA_MAX_GOOD_VAL_9285_2GHZ -108 61162306a36Sopenharmony_ci 61262306a36Sopenharmony_ci#define AR_PHY_CCA_NOM_VAL_9271_2GHZ -118 61362306a36Sopenharmony_ci#define AR_PHY_CCA_MIN_GOOD_VAL_9271_2GHZ -127 61462306a36Sopenharmony_ci#define AR_PHY_CCA_MAX_GOOD_VAL_9271_2GHZ -116 61562306a36Sopenharmony_ci 61662306a36Sopenharmony_ci#define AR_PHY_CCA_NOM_VAL_9287_2GHZ -112 61762306a36Sopenharmony_ci#define AR_PHY_CCA_MIN_GOOD_VAL_9287_2GHZ -127 61862306a36Sopenharmony_ci#define AR_PHY_CCA_MAX_GOOD_VAL_9287_2GHZ -97 61962306a36Sopenharmony_ci 62062306a36Sopenharmony_ci#endif 621