162306a36Sopenharmony_ci/* 262306a36Sopenharmony_ci * Copyright (c) 2015 Qualcomm Atheros 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 REG_AIC_H 1862306a36Sopenharmony_ci#define REG_AIC_H 1962306a36Sopenharmony_ci 2062306a36Sopenharmony_ci#define AR_SM_BASE 0xa200 2162306a36Sopenharmony_ci#define AR_SM1_BASE 0xb200 2262306a36Sopenharmony_ci#define AR_AGC_BASE 0x9e00 2362306a36Sopenharmony_ci 2462306a36Sopenharmony_ci#define AR_PHY_AIC_CTRL_0_B0 (AR_SM_BASE + 0x4b0) 2562306a36Sopenharmony_ci#define AR_PHY_AIC_CTRL_1_B0 (AR_SM_BASE + 0x4b4) 2662306a36Sopenharmony_ci#define AR_PHY_AIC_CTRL_2_B0 (AR_SM_BASE + 0x4b8) 2762306a36Sopenharmony_ci#define AR_PHY_AIC_CTRL_3_B0 (AR_SM_BASE + 0x4bc) 2862306a36Sopenharmony_ci#define AR_PHY_AIC_CTRL_4_B0 (AR_SM_BASE + 0x4c0) 2962306a36Sopenharmony_ci 3062306a36Sopenharmony_ci#define AR_PHY_AIC_STAT_0_B0 (AR_SM_BASE + 0x4c4) 3162306a36Sopenharmony_ci#define AR_PHY_AIC_STAT_1_B0 (AR_SM_BASE + 0x4c8) 3262306a36Sopenharmony_ci#define AR_PHY_AIC_STAT_2_B0 (AR_SM_BASE + 0x4cc) 3362306a36Sopenharmony_ci 3462306a36Sopenharmony_ci#define AR_PHY_AIC_CTRL_0_B1 (AR_SM1_BASE + 0x4b0) 3562306a36Sopenharmony_ci#define AR_PHY_AIC_CTRL_1_B1 (AR_SM1_BASE + 0x4b4) 3662306a36Sopenharmony_ci#define AR_PHY_AIC_CTRL_4_B1 (AR_SM1_BASE + 0x4c0) 3762306a36Sopenharmony_ci 3862306a36Sopenharmony_ci#define AR_PHY_AIC_STAT_0_B1 (AR_SM1_BASE + 0x4c4) 3962306a36Sopenharmony_ci#define AR_PHY_AIC_STAT_1_B1 (AR_SM1_BASE + 0x4c8) 4062306a36Sopenharmony_ci#define AR_PHY_AIC_STAT_2_B1 (AR_SM1_BASE + 0x4cc) 4162306a36Sopenharmony_ci 4262306a36Sopenharmony_ci#define AR_PHY_AIC_SRAM_ADDR_B0 (AR_SM_BASE + 0x5f0) 4362306a36Sopenharmony_ci#define AR_PHY_AIC_SRAM_DATA_B0 (AR_SM_BASE + 0x5f4) 4462306a36Sopenharmony_ci 4562306a36Sopenharmony_ci#define AR_PHY_AIC_SRAM_ADDR_B1 (AR_SM1_BASE + 0x5f0) 4662306a36Sopenharmony_ci#define AR_PHY_AIC_SRAM_DATA_B1 (AR_SM1_BASE + 0x5f4) 4762306a36Sopenharmony_ci 4862306a36Sopenharmony_ci#define AR_PHY_BT_COEX_4 (AR_AGC_BASE + 0x60) 4962306a36Sopenharmony_ci#define AR_PHY_BT_COEX_5 (AR_AGC_BASE + 0x64) 5062306a36Sopenharmony_ci 5162306a36Sopenharmony_ci/* AIC fields */ 5262306a36Sopenharmony_ci#define AR_PHY_AIC_MON_ENABLE 0x80000000 5362306a36Sopenharmony_ci#define AR_PHY_AIC_MON_ENABLE_S 31 5462306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_MAX_HOP_COUNT 0x7F000000 5562306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_MAX_HOP_COUNT_S 24 5662306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_MIN_VALID_COUNT 0x00FE0000 5762306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_MIN_VALID_COUNT_S 17 5862306a36Sopenharmony_ci#define AR_PHY_AIC_F_WLAN 0x0001FC00 5962306a36Sopenharmony_ci#define AR_PHY_AIC_F_WLAN_S 10 6062306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_CH_VALID_RESET 0x00000200 6162306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_CH_VALID_RESET_S 9 6262306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_ENABLE 0x00000100 6362306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_ENABLE_S 8 6462306a36Sopenharmony_ci#define AR_PHY_AIC_BTTX_PWR_THR 0x000000FE 6562306a36Sopenharmony_ci#define AR_PHY_AIC_BTTX_PWR_THR_S 1 6662306a36Sopenharmony_ci#define AR_PHY_AIC_ENABLE 0x00000001 6762306a36Sopenharmony_ci#define AR_PHY_AIC_ENABLE_S 0 6862306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_BT_REF_DELAY 0x00F00000 6962306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_BT_REF_DELAY_S 20 7062306a36Sopenharmony_ci#define AR_PHY_AIC_BT_IDLE_CFG 0x00080000 7162306a36Sopenharmony_ci#define AR_PHY_AIC_BT_IDLE_CFG_S 19 7262306a36Sopenharmony_ci#define AR_PHY_AIC_STDBY_COND 0x00060000 7362306a36Sopenharmony_ci#define AR_PHY_AIC_STDBY_COND_S 17 7462306a36Sopenharmony_ci#define AR_PHY_AIC_STDBY_ROT_ATT_DB 0x0001F800 7562306a36Sopenharmony_ci#define AR_PHY_AIC_STDBY_ROT_ATT_DB_S 11 7662306a36Sopenharmony_ci#define AR_PHY_AIC_STDBY_COM_ATT_DB 0x00000700 7762306a36Sopenharmony_ci#define AR_PHY_AIC_STDBY_COM_ATT_DB_S 8 7862306a36Sopenharmony_ci#define AR_PHY_AIC_RSSI_MAX 0x000000F0 7962306a36Sopenharmony_ci#define AR_PHY_AIC_RSSI_MAX_S 4 8062306a36Sopenharmony_ci#define AR_PHY_AIC_RSSI_MIN 0x0000000F 8162306a36Sopenharmony_ci#define AR_PHY_AIC_RSSI_MIN_S 0 8262306a36Sopenharmony_ci#define AR_PHY_AIC_RADIO_DELAY 0x7F000000 8362306a36Sopenharmony_ci#define AR_PHY_AIC_RADIO_DELAY_S 24 8462306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_STEP_SIZE_CORR 0x00F00000 8562306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_STEP_SIZE_CORR_S 20 8662306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_ROT_IDX_CORR 0x000F8000 8762306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_ROT_IDX_CORR_S 15 8862306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_CONV_CHECK_FACTOR 0x00006000 8962306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_CONV_CHECK_FACTOR_S 13 9062306a36Sopenharmony_ci#define AR_PHY_AIC_ROT_IDX_COUNT_MAX 0x00001C00 9162306a36Sopenharmony_ci#define AR_PHY_AIC_ROT_IDX_COUNT_MAX_S 10 9262306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_SYNTH_TOGGLE 0x00000200 9362306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_SYNTH_TOGGLE_S 9 9462306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_SYNTH_AFTER_BTRX 0x00000100 9562306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_SYNTH_AFTER_BTRX_S 8 9662306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_SYNTH_SETTLING 0x000000FF 9762306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_SYNTH_SETTLING_S 0 9862306a36Sopenharmony_ci#define AR_PHY_AIC_MON_MAX_HOP_COUNT 0x07F00000 9962306a36Sopenharmony_ci#define AR_PHY_AIC_MON_MAX_HOP_COUNT_S 20 10062306a36Sopenharmony_ci#define AR_PHY_AIC_MON_MIN_STALE_COUNT 0x000FE000 10162306a36Sopenharmony_ci#define AR_PHY_AIC_MON_MIN_STALE_COUNT_S 13 10262306a36Sopenharmony_ci#define AR_PHY_AIC_MON_PWR_EST_LONG 0x00001000 10362306a36Sopenharmony_ci#define AR_PHY_AIC_MON_PWR_EST_LONG_S 12 10462306a36Sopenharmony_ci#define AR_PHY_AIC_MON_PD_TALLY_SCALING 0x00000C00 10562306a36Sopenharmony_ci#define AR_PHY_AIC_MON_PD_TALLY_SCALING_S 10 10662306a36Sopenharmony_ci#define AR_PHY_AIC_MON_PERF_THR 0x000003E0 10762306a36Sopenharmony_ci#define AR_PHY_AIC_MON_PERF_THR_S 5 10862306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_TARGET_MAG_SETTING 0x00000018 10962306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_TARGET_MAG_SETTING_S 3 11062306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_PERF_CHECK_FACTOR 0x00000006 11162306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_PERF_CHECK_FACTOR_S 1 11262306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_PWR_EST_LONG 0x00000001 11362306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_PWR_EST_LONG_S 0 11462306a36Sopenharmony_ci#define AR_PHY_AIC_MON_DONE 0x80000000 11562306a36Sopenharmony_ci#define AR_PHY_AIC_MON_DONE_S 31 11662306a36Sopenharmony_ci#define AR_PHY_AIC_MON_ACTIVE 0x40000000 11762306a36Sopenharmony_ci#define AR_PHY_AIC_MON_ACTIVE_S 30 11862306a36Sopenharmony_ci#define AR_PHY_AIC_MEAS_COUNT 0x3F000000 11962306a36Sopenharmony_ci#define AR_PHY_AIC_MEAS_COUNT_S 24 12062306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_ANT_ISO_EST 0x00FC0000 12162306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_ANT_ISO_EST_S 18 12262306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_HOP_COUNT 0x0003F800 12362306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_HOP_COUNT_S 11 12462306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_VALID_COUNT 0x000007F0 12562306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_VALID_COUNT_S 4 12662306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_BT_TOO_WEAK_ERR 0x00000008 12762306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_BT_TOO_WEAK_ERR_S 3 12862306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_BT_TOO_STRONG_ERR 0x00000004 12962306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_BT_TOO_STRONG_ERR_S 2 13062306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_DONE 0x00000002 13162306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_DONE_S 1 13262306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_ACTIVE 0x00000001 13362306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_ACTIVE_S 0 13462306a36Sopenharmony_ci 13562306a36Sopenharmony_ci#define AR_PHY_AIC_MEAS_MAG_MIN 0xFFC00000 13662306a36Sopenharmony_ci#define AR_PHY_AIC_MEAS_MAG_MIN_S 22 13762306a36Sopenharmony_ci#define AR_PHY_AIC_MON_STALE_COUNT 0x003F8000 13862306a36Sopenharmony_ci#define AR_PHY_AIC_MON_STALE_COUNT_S 15 13962306a36Sopenharmony_ci#define AR_PHY_AIC_MON_HOP_COUNT 0x00007F00 14062306a36Sopenharmony_ci#define AR_PHY_AIC_MON_HOP_COUNT_S 8 14162306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_AIC_SM 0x000000F8 14262306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_AIC_SM_S 3 14362306a36Sopenharmony_ci#define AR_PHY_AIC_SM 0x00000007 14462306a36Sopenharmony_ci#define AR_PHY_AIC_SM_S 0 14562306a36Sopenharmony_ci#define AR_PHY_AIC_SRAM_VALID 0x00000001 14662306a36Sopenharmony_ci#define AR_PHY_AIC_SRAM_VALID_S 0 14762306a36Sopenharmony_ci#define AR_PHY_AIC_SRAM_ROT_QUAD_ATT_DB 0x0000007E 14862306a36Sopenharmony_ci#define AR_PHY_AIC_SRAM_ROT_QUAD_ATT_DB_S 1 14962306a36Sopenharmony_ci#define AR_PHY_AIC_SRAM_VGA_QUAD_SIGN 0x00000080 15062306a36Sopenharmony_ci#define AR_PHY_AIC_SRAM_VGA_QUAD_SIGN_S 7 15162306a36Sopenharmony_ci#define AR_PHY_AIC_SRAM_ROT_DIR_ATT_DB 0x00003F00 15262306a36Sopenharmony_ci#define AR_PHY_AIC_SRAM_ROT_DIR_ATT_DB_S 8 15362306a36Sopenharmony_ci#define AR_PHY_AIC_SRAM_VGA_DIR_SIGN 0x00004000 15462306a36Sopenharmony_ci#define AR_PHY_AIC_SRAM_VGA_DIR_SIGN_S 14 15562306a36Sopenharmony_ci#define AR_PHY_AIC_SRAM_COM_ATT_6DB 0x00038000 15662306a36Sopenharmony_ci#define AR_PHY_AIC_SRAM_COM_ATT_6DB_S 15 15762306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_ROT_ATT_DB_EST_ISO 0x0000E000 15862306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_ROT_ATT_DB_EST_ISO_S 13 15962306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_COM_ATT_DB_EST_ISO 0x00001E00 16062306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_COM_ATT_DB_EST_ISO_S 9 16162306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_ISO_EST_INIT_SETTING 0x000001F8 16262306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_ISO_EST_INIT_SETTING_S 3 16362306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_COM_ATT_DB_BACKOFF 0x00000006 16462306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_COM_ATT_DB_BACKOFF_S 1 16562306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_COM_ATT_DB_FIXED 0x00000001 16662306a36Sopenharmony_ci#define AR_PHY_AIC_CAL_COM_ATT_DB_FIXED_S 0 16762306a36Sopenharmony_ci 16862306a36Sopenharmony_ci#endif /* REG_AIC_H */ 169