reg_aic.h 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. /*
  2. * Copyright (c) 2015 Qualcomm Atheros Inc.
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for any
  5. * purpose with or without fee is hereby granted, provided that the above
  6. * copyright notice and this permission notice appear in all copies.
  7. *
  8. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  9. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  10. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  11. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  12. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  13. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  14. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  15. */
  16. #ifndef REG_AIC_H
  17. #define REG_AIC_H
  18. #define AR_SM_BASE 0xa200
  19. #define AR_SM1_BASE 0xb200
  20. #define AR_AGC_BASE 0x9e00
  21. #define AR_PHY_AIC_CTRL_0_B0 (AR_SM_BASE + 0x4b0)
  22. #define AR_PHY_AIC_CTRL_1_B0 (AR_SM_BASE + 0x4b4)
  23. #define AR_PHY_AIC_CTRL_2_B0 (AR_SM_BASE + 0x4b8)
  24. #define AR_PHY_AIC_CTRL_3_B0 (AR_SM_BASE + 0x4bc)
  25. #define AR_PHY_AIC_CTRL_4_B0 (AR_SM_BASE + 0x4c0)
  26. #define AR_PHY_AIC_STAT_0_B0 (AR_SM_BASE + 0x4c4)
  27. #define AR_PHY_AIC_STAT_1_B0 (AR_SM_BASE + 0x4c8)
  28. #define AR_PHY_AIC_STAT_2_B0 (AR_SM_BASE + 0x4cc)
  29. #define AR_PHY_AIC_CTRL_0_B1 (AR_SM1_BASE + 0x4b0)
  30. #define AR_PHY_AIC_CTRL_1_B1 (AR_SM1_BASE + 0x4b4)
  31. #define AR_PHY_AIC_CTRL_4_B1 (AR_SM1_BASE + 0x4c0)
  32. #define AR_PHY_AIC_STAT_0_B1 (AR_SM1_BASE + 0x4c4)
  33. #define AR_PHY_AIC_STAT_1_B1 (AR_SM1_BASE + 0x4c8)
  34. #define AR_PHY_AIC_STAT_2_B1 (AR_SM1_BASE + 0x4cc)
  35. #define AR_PHY_AIC_SRAM_ADDR_B0 (AR_SM_BASE + 0x5f0)
  36. #define AR_PHY_AIC_SRAM_DATA_B0 (AR_SM_BASE + 0x5f4)
  37. #define AR_PHY_AIC_SRAM_ADDR_B1 (AR_SM1_BASE + 0x5f0)
  38. #define AR_PHY_AIC_SRAM_DATA_B1 (AR_SM1_BASE + 0x5f4)
  39. #define AR_PHY_BT_COEX_4 (AR_AGC_BASE + 0x60)
  40. #define AR_PHY_BT_COEX_5 (AR_AGC_BASE + 0x64)
  41. /* AIC fields */
  42. #define AR_PHY_AIC_MON_ENABLE 0x80000000
  43. #define AR_PHY_AIC_MON_ENABLE_S 31
  44. #define AR_PHY_AIC_CAL_MAX_HOP_COUNT 0x7F000000
  45. #define AR_PHY_AIC_CAL_MAX_HOP_COUNT_S 24
  46. #define AR_PHY_AIC_CAL_MIN_VALID_COUNT 0x00FE0000
  47. #define AR_PHY_AIC_CAL_MIN_VALID_COUNT_S 17
  48. #define AR_PHY_AIC_F_WLAN 0x0001FC00
  49. #define AR_PHY_AIC_F_WLAN_S 10
  50. #define AR_PHY_AIC_CAL_CH_VALID_RESET 0x00000200
  51. #define AR_PHY_AIC_CAL_CH_VALID_RESET_S 9
  52. #define AR_PHY_AIC_CAL_ENABLE 0x00000100
  53. #define AR_PHY_AIC_CAL_ENABLE_S 8
  54. #define AR_PHY_AIC_BTTX_PWR_THR 0x000000FE
  55. #define AR_PHY_AIC_BTTX_PWR_THR_S 1
  56. #define AR_PHY_AIC_ENABLE 0x00000001
  57. #define AR_PHY_AIC_ENABLE_S 0
  58. #define AR_PHY_AIC_CAL_BT_REF_DELAY 0x00F00000
  59. #define AR_PHY_AIC_CAL_BT_REF_DELAY_S 20
  60. #define AR_PHY_AIC_BT_IDLE_CFG 0x00080000
  61. #define AR_PHY_AIC_BT_IDLE_CFG_S 19
  62. #define AR_PHY_AIC_STDBY_COND 0x00060000
  63. #define AR_PHY_AIC_STDBY_COND_S 17
  64. #define AR_PHY_AIC_STDBY_ROT_ATT_DB 0x0001F800
  65. #define AR_PHY_AIC_STDBY_ROT_ATT_DB_S 11
  66. #define AR_PHY_AIC_STDBY_COM_ATT_DB 0x00000700
  67. #define AR_PHY_AIC_STDBY_COM_ATT_DB_S 8
  68. #define AR_PHY_AIC_RSSI_MAX 0x000000F0
  69. #define AR_PHY_AIC_RSSI_MAX_S 4
  70. #define AR_PHY_AIC_RSSI_MIN 0x0000000F
  71. #define AR_PHY_AIC_RSSI_MIN_S 0
  72. #define AR_PHY_AIC_RADIO_DELAY 0x7F000000
  73. #define AR_PHY_AIC_RADIO_DELAY_S 24
  74. #define AR_PHY_AIC_CAL_STEP_SIZE_CORR 0x00F00000
  75. #define AR_PHY_AIC_CAL_STEP_SIZE_CORR_S 20
  76. #define AR_PHY_AIC_CAL_ROT_IDX_CORR 0x000F8000
  77. #define AR_PHY_AIC_CAL_ROT_IDX_CORR_S 15
  78. #define AR_PHY_AIC_CAL_CONV_CHECK_FACTOR 0x00006000
  79. #define AR_PHY_AIC_CAL_CONV_CHECK_FACTOR_S 13
  80. #define AR_PHY_AIC_ROT_IDX_COUNT_MAX 0x00001C00
  81. #define AR_PHY_AIC_ROT_IDX_COUNT_MAX_S 10
  82. #define AR_PHY_AIC_CAL_SYNTH_TOGGLE 0x00000200
  83. #define AR_PHY_AIC_CAL_SYNTH_TOGGLE_S 9
  84. #define AR_PHY_AIC_CAL_SYNTH_AFTER_BTRX 0x00000100
  85. #define AR_PHY_AIC_CAL_SYNTH_AFTER_BTRX_S 8
  86. #define AR_PHY_AIC_CAL_SYNTH_SETTLING 0x000000FF
  87. #define AR_PHY_AIC_CAL_SYNTH_SETTLING_S 0
  88. #define AR_PHY_AIC_MON_MAX_HOP_COUNT 0x07F00000
  89. #define AR_PHY_AIC_MON_MAX_HOP_COUNT_S 20
  90. #define AR_PHY_AIC_MON_MIN_STALE_COUNT 0x000FE000
  91. #define AR_PHY_AIC_MON_MIN_STALE_COUNT_S 13
  92. #define AR_PHY_AIC_MON_PWR_EST_LONG 0x00001000
  93. #define AR_PHY_AIC_MON_PWR_EST_LONG_S 12
  94. #define AR_PHY_AIC_MON_PD_TALLY_SCALING 0x00000C00
  95. #define AR_PHY_AIC_MON_PD_TALLY_SCALING_S 10
  96. #define AR_PHY_AIC_MON_PERF_THR 0x000003E0
  97. #define AR_PHY_AIC_MON_PERF_THR_S 5
  98. #define AR_PHY_AIC_CAL_TARGET_MAG_SETTING 0x00000018
  99. #define AR_PHY_AIC_CAL_TARGET_MAG_SETTING_S 3
  100. #define AR_PHY_AIC_CAL_PERF_CHECK_FACTOR 0x00000006
  101. #define AR_PHY_AIC_CAL_PERF_CHECK_FACTOR_S 1
  102. #define AR_PHY_AIC_CAL_PWR_EST_LONG 0x00000001
  103. #define AR_PHY_AIC_CAL_PWR_EST_LONG_S 0
  104. #define AR_PHY_AIC_MON_DONE 0x80000000
  105. #define AR_PHY_AIC_MON_DONE_S 31
  106. #define AR_PHY_AIC_MON_ACTIVE 0x40000000
  107. #define AR_PHY_AIC_MON_ACTIVE_S 30
  108. #define AR_PHY_AIC_MEAS_COUNT 0x3F000000
  109. #define AR_PHY_AIC_MEAS_COUNT_S 24
  110. #define AR_PHY_AIC_CAL_ANT_ISO_EST 0x00FC0000
  111. #define AR_PHY_AIC_CAL_ANT_ISO_EST_S 18
  112. #define AR_PHY_AIC_CAL_HOP_COUNT 0x0003F800
  113. #define AR_PHY_AIC_CAL_HOP_COUNT_S 11
  114. #define AR_PHY_AIC_CAL_VALID_COUNT 0x000007F0
  115. #define AR_PHY_AIC_CAL_VALID_COUNT_S 4
  116. #define AR_PHY_AIC_CAL_BT_TOO_WEAK_ERR 0x00000008
  117. #define AR_PHY_AIC_CAL_BT_TOO_WEAK_ERR_S 3
  118. #define AR_PHY_AIC_CAL_BT_TOO_STRONG_ERR 0x00000004
  119. #define AR_PHY_AIC_CAL_BT_TOO_STRONG_ERR_S 2
  120. #define AR_PHY_AIC_CAL_DONE 0x00000002
  121. #define AR_PHY_AIC_CAL_DONE_S 1
  122. #define AR_PHY_AIC_CAL_ACTIVE 0x00000001
  123. #define AR_PHY_AIC_CAL_ACTIVE_S 0
  124. #define AR_PHY_AIC_MEAS_MAG_MIN 0xFFC00000
  125. #define AR_PHY_AIC_MEAS_MAG_MIN_S 22
  126. #define AR_PHY_AIC_MON_STALE_COUNT 0x003F8000
  127. #define AR_PHY_AIC_MON_STALE_COUNT_S 15
  128. #define AR_PHY_AIC_MON_HOP_COUNT 0x00007F00
  129. #define AR_PHY_AIC_MON_HOP_COUNT_S 8
  130. #define AR_PHY_AIC_CAL_AIC_SM 0x000000F8
  131. #define AR_PHY_AIC_CAL_AIC_SM_S 3
  132. #define AR_PHY_AIC_SM 0x00000007
  133. #define AR_PHY_AIC_SM_S 0
  134. #define AR_PHY_AIC_SRAM_VALID 0x00000001
  135. #define AR_PHY_AIC_SRAM_VALID_S 0
  136. #define AR_PHY_AIC_SRAM_ROT_QUAD_ATT_DB 0x0000007E
  137. #define AR_PHY_AIC_SRAM_ROT_QUAD_ATT_DB_S 1
  138. #define AR_PHY_AIC_SRAM_VGA_QUAD_SIGN 0x00000080
  139. #define AR_PHY_AIC_SRAM_VGA_QUAD_SIGN_S 7
  140. #define AR_PHY_AIC_SRAM_ROT_DIR_ATT_DB 0x00003F00
  141. #define AR_PHY_AIC_SRAM_ROT_DIR_ATT_DB_S 8
  142. #define AR_PHY_AIC_SRAM_VGA_DIR_SIGN 0x00004000
  143. #define AR_PHY_AIC_SRAM_VGA_DIR_SIGN_S 14
  144. #define AR_PHY_AIC_SRAM_COM_ATT_6DB 0x00038000
  145. #define AR_PHY_AIC_SRAM_COM_ATT_6DB_S 15
  146. #define AR_PHY_AIC_CAL_ROT_ATT_DB_EST_ISO 0x0000E000
  147. #define AR_PHY_AIC_CAL_ROT_ATT_DB_EST_ISO_S 13
  148. #define AR_PHY_AIC_CAL_COM_ATT_DB_EST_ISO 0x00001E00
  149. #define AR_PHY_AIC_CAL_COM_ATT_DB_EST_ISO_S 9
  150. #define AR_PHY_AIC_CAL_ISO_EST_INIT_SETTING 0x000001F8
  151. #define AR_PHY_AIC_CAL_ISO_EST_INIT_SETTING_S 3
  152. #define AR_PHY_AIC_CAL_COM_ATT_DB_BACKOFF 0x00000006
  153. #define AR_PHY_AIC_CAL_COM_ATT_DB_BACKOFF_S 1
  154. #define AR_PHY_AIC_CAL_COM_ATT_DB_FIXED 0x00000001
  155. #define AR_PHY_AIC_CAL_COM_ATT_DB_FIXED_S 0
  156. #endif /* REG_AIC_H */