hw.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489
  1. /*
  2. * Copyright (c) 2005-2011 Atheros Communications Inc.
  3. * Copyright (c) 2011-2013 Qualcomm Atheros, Inc.
  4. *
  5. * Permission to use, copy, modify, and/or distribute this software for any
  6. * purpose with or without fee is hereby granted, provided that the above
  7. * copyright notice and this permission notice appear in all copies.
  8. *
  9. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  10. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  11. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  12. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  13. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  14. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  15. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  16. */
  17. #ifndef _HW_H_
  18. #define _HW_H_
  19. #include "targaddrs.h"
  20. #define ATH10K_FW_DIR "ath10k"
  21. /* QCA988X 1.0 definitions (unsupported) */
  22. #define QCA988X_HW_1_0_CHIP_ID_REV 0x0
  23. /* QCA988X 2.0 definitions */
  24. #define QCA988X_HW_2_0_VERSION 0x4100016c
  25. #define QCA988X_HW_2_0_CHIP_ID_REV 0x2
  26. #define QCA988X_HW_2_0_FW_DIR ATH10K_FW_DIR "/QCA988X/hw2.0"
  27. #define QCA988X_HW_2_0_FW_FILE "firmware.bin"
  28. #define QCA988X_HW_2_0_OTP_FILE "otp.bin"
  29. #define QCA988X_HW_2_0_BOARD_DATA_FILE "board.bin"
  30. #define QCA988X_HW_2_0_PATCH_LOAD_ADDR 0x1234
  31. /* QCA6174 target BMI version signatures */
  32. #define QCA6174_HW_1_0_VERSION 0x05000000
  33. #define QCA6174_HW_1_1_VERSION 0x05000001
  34. #define QCA6174_HW_1_3_VERSION 0x05000003
  35. #define QCA6174_HW_2_1_VERSION 0x05010000
  36. #define QCA6174_HW_3_0_VERSION 0x05020000
  37. #define QCA6174_HW_3_2_VERSION 0x05030000
  38. enum qca6174_pci_rev {
  39. QCA6174_PCI_REV_1_1 = 0x11,
  40. QCA6174_PCI_REV_1_3 = 0x13,
  41. QCA6174_PCI_REV_2_0 = 0x20,
  42. QCA6174_PCI_REV_3_0 = 0x30,
  43. };
  44. enum qca6174_chip_id_rev {
  45. QCA6174_HW_1_0_CHIP_ID_REV = 0,
  46. QCA6174_HW_1_1_CHIP_ID_REV = 1,
  47. QCA6174_HW_1_3_CHIP_ID_REV = 2,
  48. QCA6174_HW_2_1_CHIP_ID_REV = 4,
  49. QCA6174_HW_2_2_CHIP_ID_REV = 5,
  50. QCA6174_HW_3_0_CHIP_ID_REV = 8,
  51. QCA6174_HW_3_1_CHIP_ID_REV = 9,
  52. QCA6174_HW_3_2_CHIP_ID_REV = 10,
  53. };
  54. #define QCA6174_HW_2_1_FW_DIR "ath10k/QCA6174/hw2.1"
  55. #define QCA6174_HW_2_1_FW_FILE "firmware.bin"
  56. #define QCA6174_HW_2_1_OTP_FILE "otp.bin"
  57. #define QCA6174_HW_2_1_BOARD_DATA_FILE "board.bin"
  58. #define QCA6174_HW_2_1_PATCH_LOAD_ADDR 0x1234
  59. #define QCA6174_HW_3_0_FW_DIR "ath10k/QCA6174/hw3.0"
  60. #define QCA6174_HW_3_0_FW_FILE "firmware.bin"
  61. #define QCA6174_HW_3_0_OTP_FILE "otp.bin"
  62. #define QCA6174_HW_3_0_BOARD_DATA_FILE "board.bin"
  63. #define QCA6174_HW_3_0_PATCH_LOAD_ADDR 0x1234
  64. #define ATH10K_FW_API2_FILE "firmware-2.bin"
  65. #define ATH10K_FW_API3_FILE "firmware-3.bin"
  66. /* added support for ATH10K_FW_IE_WMI_OP_VERSION */
  67. #define ATH10K_FW_API4_FILE "firmware-4.bin"
  68. #define ATH10K_FW_UTF_FILE "utf.bin"
  69. /* includes also the null byte */
  70. #define ATH10K_FIRMWARE_MAGIC "QCA-ATH10K"
  71. #define REG_DUMP_COUNT_QCA988X 60
  72. #define QCA988X_CAL_DATA_LEN 2116
  73. struct ath10k_fw_ie {
  74. __le32 id;
  75. __le32 len;
  76. u8 data[0];
  77. };
  78. enum ath10k_fw_ie_type {
  79. ATH10K_FW_IE_FW_VERSION = 0,
  80. ATH10K_FW_IE_TIMESTAMP = 1,
  81. ATH10K_FW_IE_FEATURES = 2,
  82. ATH10K_FW_IE_FW_IMAGE = 3,
  83. ATH10K_FW_IE_OTP_IMAGE = 4,
  84. /* WMI "operations" interface version, 32 bit value. Supported from
  85. * FW API 4 and above.
  86. */
  87. ATH10K_FW_IE_WMI_OP_VERSION = 5,
  88. };
  89. enum ath10k_fw_wmi_op_version {
  90. ATH10K_FW_WMI_OP_VERSION_UNSET = 0,
  91. ATH10K_FW_WMI_OP_VERSION_MAIN = 1,
  92. ATH10K_FW_WMI_OP_VERSION_10_1 = 2,
  93. ATH10K_FW_WMI_OP_VERSION_10_2 = 3,
  94. ATH10K_FW_WMI_OP_VERSION_TLV = 4,
  95. ATH10K_FW_WMI_OP_VERSION_10_2_4 = 5,
  96. /* keep last */
  97. ATH10K_FW_WMI_OP_VERSION_MAX,
  98. };
  99. enum ath10k_hw_rev {
  100. ATH10K_HW_QCA988X,
  101. ATH10K_HW_QCA6174,
  102. };
  103. struct ath10k_hw_regs {
  104. u32 rtc_state_cold_reset_mask;
  105. u32 rtc_soc_base_address;
  106. u32 rtc_wmac_base_address;
  107. u32 soc_core_base_address;
  108. u32 ce_wrapper_base_address;
  109. u32 ce0_base_address;
  110. u32 ce1_base_address;
  111. u32 ce2_base_address;
  112. u32 ce3_base_address;
  113. u32 ce4_base_address;
  114. u32 ce5_base_address;
  115. u32 ce6_base_address;
  116. u32 ce7_base_address;
  117. u32 soc_reset_control_si0_rst_mask;
  118. u32 soc_reset_control_ce_rst_mask;
  119. u32 soc_chip_id_address;
  120. u32 scratch_3_address;
  121. };
  122. extern const struct ath10k_hw_regs qca988x_regs;
  123. extern const struct ath10k_hw_regs qca6174_regs;
  124. #define QCA_REV_988X(ar) ((ar)->hw_rev == ATH10K_HW_QCA988X)
  125. #define QCA_REV_6174(ar) ((ar)->hw_rev == ATH10K_HW_QCA6174)
  126. /* Known pecularities:
  127. * - current FW doesn't support raw rx mode (last tested v599)
  128. * - current FW dumps upon raw tx mode (last tested v599)
  129. * - raw appears in nwifi decap, raw and nwifi appear in ethernet decap
  130. * - raw have FCS, nwifi doesn't
  131. * - ethernet frames have 802.11 header decapped and parts (base hdr, cipher
  132. * param, llc/snap) are aligned to 4byte boundaries each */
  133. enum ath10k_hw_txrx_mode {
  134. ATH10K_HW_TXRX_RAW = 0,
  135. ATH10K_HW_TXRX_NATIVE_WIFI = 1,
  136. ATH10K_HW_TXRX_ETHERNET = 2,
  137. /* Valid for HTT >= 3.0. Used for management frames in TX_FRM. */
  138. ATH10K_HW_TXRX_MGMT = 3,
  139. };
  140. enum ath10k_mcast2ucast_mode {
  141. ATH10K_MCAST2UCAST_DISABLED = 0,
  142. ATH10K_MCAST2UCAST_ENABLED = 1,
  143. };
  144. struct ath10k_pktlog_hdr {
  145. __le16 flags;
  146. __le16 missed_cnt;
  147. __le16 log_type;
  148. __le16 size;
  149. __le32 timestamp;
  150. u8 payload[0];
  151. } __packed;
  152. /* Target specific defines for MAIN firmware */
  153. #define TARGET_NUM_VDEVS 8
  154. #define TARGET_NUM_PEER_AST 2
  155. #define TARGET_NUM_WDS_ENTRIES 32
  156. #define TARGET_DMA_BURST_SIZE 0
  157. #define TARGET_MAC_AGGR_DELIM 0
  158. #define TARGET_AST_SKID_LIMIT 16
  159. #define TARGET_NUM_STATIONS 16
  160. #define TARGET_NUM_PEERS ((TARGET_NUM_STATIONS) + \
  161. (TARGET_NUM_VDEVS))
  162. #define TARGET_NUM_OFFLOAD_PEERS 0
  163. #define TARGET_NUM_OFFLOAD_REORDER_BUFS 0
  164. #define TARGET_NUM_PEER_KEYS 2
  165. #define TARGET_NUM_TIDS ((TARGET_NUM_PEERS) * 2)
  166. #define TARGET_TX_CHAIN_MASK (BIT(0) | BIT(1) | BIT(2))
  167. #define TARGET_RX_CHAIN_MASK (BIT(0) | BIT(1) | BIT(2))
  168. #define TARGET_RX_TIMEOUT_LO_PRI 100
  169. #define TARGET_RX_TIMEOUT_HI_PRI 40
  170. /* Native Wifi decap mode is used to align IP frames to 4-byte boundaries and
  171. * avoid a very expensive re-alignment in mac80211. */
  172. #define TARGET_RX_DECAP_MODE ATH10K_HW_TXRX_NATIVE_WIFI
  173. #define TARGET_SCAN_MAX_PENDING_REQS 4
  174. #define TARGET_BMISS_OFFLOAD_MAX_VDEV 3
  175. #define TARGET_ROAM_OFFLOAD_MAX_VDEV 3
  176. #define TARGET_ROAM_OFFLOAD_MAX_AP_PROFILES 8
  177. #define TARGET_GTK_OFFLOAD_MAX_VDEV 3
  178. #define TARGET_NUM_MCAST_GROUPS 0
  179. #define TARGET_NUM_MCAST_TABLE_ELEMS 0
  180. #define TARGET_MCAST2UCAST_MODE ATH10K_MCAST2UCAST_DISABLED
  181. #define TARGET_TX_DBG_LOG_SIZE 1024
  182. #define TARGET_RX_SKIP_DEFRAG_TIMEOUT_DUP_DETECTION_CHECK 0
  183. #define TARGET_VOW_CONFIG 0
  184. #define TARGET_NUM_MSDU_DESC (1024 + 400)
  185. #define TARGET_MAX_FRAG_ENTRIES 0
  186. /* Target specific defines for 10.X firmware */
  187. #define TARGET_10X_NUM_VDEVS 16
  188. #define TARGET_10X_NUM_PEER_AST 2
  189. #define TARGET_10X_NUM_WDS_ENTRIES 32
  190. #define TARGET_10X_DMA_BURST_SIZE 0
  191. #define TARGET_10X_MAC_AGGR_DELIM 0
  192. #define TARGET_10X_AST_SKID_LIMIT 16
  193. #define TARGET_10X_NUM_STATIONS 128
  194. #define TARGET_10X_NUM_PEERS ((TARGET_10X_NUM_STATIONS) + \
  195. (TARGET_10X_NUM_VDEVS))
  196. #define TARGET_10X_NUM_OFFLOAD_PEERS 0
  197. #define TARGET_10X_NUM_OFFLOAD_REORDER_BUFS 0
  198. #define TARGET_10X_NUM_PEER_KEYS 2
  199. #define TARGET_10X_NUM_TIDS_MAX 256
  200. #define TARGET_10X_NUM_TIDS min((TARGET_10X_NUM_TIDS_MAX), \
  201. (TARGET_10X_NUM_PEERS) * 2)
  202. #define TARGET_10X_TX_CHAIN_MASK (BIT(0) | BIT(1) | BIT(2))
  203. #define TARGET_10X_RX_CHAIN_MASK (BIT(0) | BIT(1) | BIT(2))
  204. #define TARGET_10X_RX_TIMEOUT_LO_PRI 100
  205. #define TARGET_10X_RX_TIMEOUT_HI_PRI 40
  206. #define TARGET_10X_RX_DECAP_MODE ATH10K_HW_TXRX_NATIVE_WIFI
  207. #define TARGET_10X_SCAN_MAX_PENDING_REQS 4
  208. #define TARGET_10X_BMISS_OFFLOAD_MAX_VDEV 2
  209. #define TARGET_10X_ROAM_OFFLOAD_MAX_VDEV 2
  210. #define TARGET_10X_ROAM_OFFLOAD_MAX_AP_PROFILES 8
  211. #define TARGET_10X_GTK_OFFLOAD_MAX_VDEV 3
  212. #define TARGET_10X_NUM_MCAST_GROUPS 0
  213. #define TARGET_10X_NUM_MCAST_TABLE_ELEMS 0
  214. #define TARGET_10X_MCAST2UCAST_MODE ATH10K_MCAST2UCAST_DISABLED
  215. #define TARGET_10X_TX_DBG_LOG_SIZE 1024
  216. #define TARGET_10X_RX_SKIP_DEFRAG_TIMEOUT_DUP_DETECTION_CHECK 1
  217. #define TARGET_10X_VOW_CONFIG 0
  218. #define TARGET_10X_NUM_MSDU_DESC (1024 + 400)
  219. #define TARGET_10X_MAX_FRAG_ENTRIES 0
  220. /* 10.2 parameters */
  221. #define TARGET_10_2_DMA_BURST_SIZE 1
  222. /* Target specific defines for WMI-TLV firmware */
  223. #define TARGET_TLV_NUM_VDEVS 3
  224. #define TARGET_TLV_NUM_STATIONS 32
  225. #define TARGET_TLV_NUM_PEERS ((TARGET_TLV_NUM_STATIONS) + \
  226. (TARGET_TLV_NUM_VDEVS) + \
  227. 2)
  228. #define TARGET_TLV_NUM_TIDS ((TARGET_TLV_NUM_PEERS) * 2)
  229. #define TARGET_TLV_NUM_MSDU_DESC (1024 + 32)
  230. /* Number of Copy Engines supported */
  231. #define CE_COUNT 8
  232. /*
  233. * Total number of PCIe MSI interrupts requested for all interrupt sources.
  234. * PCIe standard forces this to be a power of 2.
  235. * Some Host OS's limit MSI requests that can be granted to 8
  236. * so for now we abide by this limit and avoid requesting more
  237. * than that.
  238. */
  239. #define MSI_NUM_REQUEST_LOG2 3
  240. #define MSI_NUM_REQUEST (1<<MSI_NUM_REQUEST_LOG2)
  241. /*
  242. * Granted MSIs are assigned as follows:
  243. * Firmware uses the first
  244. * Remaining MSIs, if any, are used by Copy Engines
  245. * This mapping is known to both Target firmware and Host software.
  246. * It may be changed as long as Host and Target are kept in sync.
  247. */
  248. /* MSI for firmware (errors, etc.) */
  249. #define MSI_ASSIGN_FW 0
  250. /* MSIs for Copy Engines */
  251. #define MSI_ASSIGN_CE_INITIAL 1
  252. #define MSI_ASSIGN_CE_MAX 7
  253. /* as of IP3.7.1 */
  254. #define RTC_STATE_V_ON 3
  255. #define RTC_STATE_COLD_RESET_MASK ar->regs->rtc_state_cold_reset_mask
  256. #define RTC_STATE_V_LSB 0
  257. #define RTC_STATE_V_MASK 0x00000007
  258. #define RTC_STATE_ADDRESS 0x0000
  259. #define PCIE_SOC_WAKE_V_MASK 0x00000001
  260. #define PCIE_SOC_WAKE_ADDRESS 0x0004
  261. #define PCIE_SOC_WAKE_RESET 0x00000000
  262. #define SOC_GLOBAL_RESET_ADDRESS 0x0008
  263. #define RTC_SOC_BASE_ADDRESS ar->regs->rtc_soc_base_address
  264. #define RTC_WMAC_BASE_ADDRESS ar->regs->rtc_wmac_base_address
  265. #define MAC_COEX_BASE_ADDRESS 0x00006000
  266. #define BT_COEX_BASE_ADDRESS 0x00007000
  267. #define SOC_PCIE_BASE_ADDRESS 0x00008000
  268. #define SOC_CORE_BASE_ADDRESS ar->regs->soc_core_base_address
  269. #define WLAN_UART_BASE_ADDRESS 0x0000c000
  270. #define WLAN_SI_BASE_ADDRESS 0x00010000
  271. #define WLAN_GPIO_BASE_ADDRESS 0x00014000
  272. #define WLAN_ANALOG_INTF_BASE_ADDRESS 0x0001c000
  273. #define WLAN_MAC_BASE_ADDRESS 0x00020000
  274. #define EFUSE_BASE_ADDRESS 0x00030000
  275. #define FPGA_REG_BASE_ADDRESS 0x00039000
  276. #define WLAN_UART2_BASE_ADDRESS 0x00054c00
  277. #define CE_WRAPPER_BASE_ADDRESS ar->regs->ce_wrapper_base_address
  278. #define CE0_BASE_ADDRESS ar->regs->ce0_base_address
  279. #define CE1_BASE_ADDRESS ar->regs->ce1_base_address
  280. #define CE2_BASE_ADDRESS ar->regs->ce2_base_address
  281. #define CE3_BASE_ADDRESS ar->regs->ce3_base_address
  282. #define CE4_BASE_ADDRESS ar->regs->ce4_base_address
  283. #define CE5_BASE_ADDRESS ar->regs->ce5_base_address
  284. #define CE6_BASE_ADDRESS ar->regs->ce6_base_address
  285. #define CE7_BASE_ADDRESS ar->regs->ce7_base_address
  286. #define DBI_BASE_ADDRESS 0x00060000
  287. #define WLAN_ANALOG_INTF_PCIE_BASE_ADDRESS 0x0006c000
  288. #define PCIE_LOCAL_BASE_ADDRESS 0x00080000
  289. #define SOC_RESET_CONTROL_ADDRESS 0x00000000
  290. #define SOC_RESET_CONTROL_OFFSET 0x00000000
  291. #define SOC_RESET_CONTROL_SI0_RST_MASK ar->regs->soc_reset_control_si0_rst_mask
  292. #define SOC_RESET_CONTROL_CE_RST_MASK ar->regs->soc_reset_control_ce_rst_mask
  293. #define SOC_RESET_CONTROL_CPU_WARM_RST_MASK 0x00000040
  294. #define SOC_CPU_CLOCK_OFFSET 0x00000020
  295. #define SOC_CPU_CLOCK_STANDARD_LSB 0
  296. #define SOC_CPU_CLOCK_STANDARD_MASK 0x00000003
  297. #define SOC_CLOCK_CONTROL_OFFSET 0x00000028
  298. #define SOC_CLOCK_CONTROL_SI0_CLK_MASK 0x00000001
  299. #define SOC_SYSTEM_SLEEP_OFFSET 0x000000c4
  300. #define SOC_LPO_CAL_OFFSET 0x000000e0
  301. #define SOC_LPO_CAL_ENABLE_LSB 20
  302. #define SOC_LPO_CAL_ENABLE_MASK 0x00100000
  303. #define SOC_LF_TIMER_CONTROL0_ADDRESS 0x00000050
  304. #define SOC_LF_TIMER_CONTROL0_ENABLE_MASK 0x00000004
  305. #define SOC_CHIP_ID_ADDRESS ar->regs->soc_chip_id_address
  306. #define SOC_CHIP_ID_REV_LSB 8
  307. #define SOC_CHIP_ID_REV_MASK 0x00000f00
  308. #define WLAN_RESET_CONTROL_COLD_RST_MASK 0x00000008
  309. #define WLAN_RESET_CONTROL_WARM_RST_MASK 0x00000004
  310. #define WLAN_SYSTEM_SLEEP_DISABLE_LSB 0
  311. #define WLAN_SYSTEM_SLEEP_DISABLE_MASK 0x00000001
  312. #define WLAN_GPIO_PIN0_ADDRESS 0x00000028
  313. #define WLAN_GPIO_PIN0_CONFIG_MASK 0x00007800
  314. #define WLAN_GPIO_PIN1_ADDRESS 0x0000002c
  315. #define WLAN_GPIO_PIN1_CONFIG_MASK 0x00007800
  316. #define WLAN_GPIO_PIN10_ADDRESS 0x00000050
  317. #define WLAN_GPIO_PIN11_ADDRESS 0x00000054
  318. #define WLAN_GPIO_PIN12_ADDRESS 0x00000058
  319. #define WLAN_GPIO_PIN13_ADDRESS 0x0000005c
  320. #define CLOCK_GPIO_OFFSET 0xffffffff
  321. #define CLOCK_GPIO_BT_CLK_OUT_EN_LSB 0
  322. #define CLOCK_GPIO_BT_CLK_OUT_EN_MASK 0
  323. #define SI_CONFIG_OFFSET 0x00000000
  324. #define SI_CONFIG_BIDIR_OD_DATA_LSB 18
  325. #define SI_CONFIG_BIDIR_OD_DATA_MASK 0x00040000
  326. #define SI_CONFIG_I2C_LSB 16
  327. #define SI_CONFIG_I2C_MASK 0x00010000
  328. #define SI_CONFIG_POS_SAMPLE_LSB 7
  329. #define SI_CONFIG_POS_SAMPLE_MASK 0x00000080
  330. #define SI_CONFIG_INACTIVE_DATA_LSB 5
  331. #define SI_CONFIG_INACTIVE_DATA_MASK 0x00000020
  332. #define SI_CONFIG_INACTIVE_CLK_LSB 4
  333. #define SI_CONFIG_INACTIVE_CLK_MASK 0x00000010
  334. #define SI_CONFIG_DIVIDER_LSB 0
  335. #define SI_CONFIG_DIVIDER_MASK 0x0000000f
  336. #define SI_CS_OFFSET 0x00000004
  337. #define SI_CS_DONE_ERR_MASK 0x00000400
  338. #define SI_CS_DONE_INT_MASK 0x00000200
  339. #define SI_CS_START_LSB 8
  340. #define SI_CS_START_MASK 0x00000100
  341. #define SI_CS_RX_CNT_LSB 4
  342. #define SI_CS_RX_CNT_MASK 0x000000f0
  343. #define SI_CS_TX_CNT_LSB 0
  344. #define SI_CS_TX_CNT_MASK 0x0000000f
  345. #define SI_TX_DATA0_OFFSET 0x00000008
  346. #define SI_TX_DATA1_OFFSET 0x0000000c
  347. #define SI_RX_DATA0_OFFSET 0x00000010
  348. #define SI_RX_DATA1_OFFSET 0x00000014
  349. #define CORE_CTRL_CPU_INTR_MASK 0x00002000
  350. #define CORE_CTRL_PCIE_REG_31_MASK 0x00000800
  351. #define CORE_CTRL_ADDRESS 0x0000
  352. #define PCIE_INTR_ENABLE_ADDRESS 0x0008
  353. #define PCIE_INTR_CAUSE_ADDRESS 0x000c
  354. #define PCIE_INTR_CLR_ADDRESS 0x0014
  355. #define SCRATCH_3_ADDRESS ar->regs->scratch_3_address
  356. #define CPU_INTR_ADDRESS 0x0010
  357. /* Firmware indications to the Host via SCRATCH_3 register. */
  358. #define FW_INDICATOR_ADDRESS (SOC_CORE_BASE_ADDRESS + SCRATCH_3_ADDRESS)
  359. #define FW_IND_EVENT_PENDING 1
  360. #define FW_IND_INITIALIZED 2
  361. /* HOST_REG interrupt from firmware */
  362. #define PCIE_INTR_FIRMWARE_MASK 0x00000400
  363. #define PCIE_INTR_CE_MASK_ALL 0x0007f800
  364. #define DRAM_BASE_ADDRESS 0x00400000
  365. #define MISSING 0
  366. #define SYSTEM_SLEEP_OFFSET SOC_SYSTEM_SLEEP_OFFSET
  367. #define WLAN_SYSTEM_SLEEP_OFFSET SOC_SYSTEM_SLEEP_OFFSET
  368. #define WLAN_RESET_CONTROL_OFFSET SOC_RESET_CONTROL_OFFSET
  369. #define CLOCK_CONTROL_OFFSET SOC_CLOCK_CONTROL_OFFSET
  370. #define CLOCK_CONTROL_SI0_CLK_MASK SOC_CLOCK_CONTROL_SI0_CLK_MASK
  371. #define RESET_CONTROL_MBOX_RST_MASK MISSING
  372. #define RESET_CONTROL_SI0_RST_MASK SOC_RESET_CONTROL_SI0_RST_MASK
  373. #define GPIO_BASE_ADDRESS WLAN_GPIO_BASE_ADDRESS
  374. #define GPIO_PIN0_OFFSET WLAN_GPIO_PIN0_ADDRESS
  375. #define GPIO_PIN1_OFFSET WLAN_GPIO_PIN1_ADDRESS
  376. #define GPIO_PIN0_CONFIG_MASK WLAN_GPIO_PIN0_CONFIG_MASK
  377. #define GPIO_PIN1_CONFIG_MASK WLAN_GPIO_PIN1_CONFIG_MASK
  378. #define SI_BASE_ADDRESS WLAN_SI_BASE_ADDRESS
  379. #define SCRATCH_BASE_ADDRESS SOC_CORE_BASE_ADDRESS
  380. #define LOCAL_SCRATCH_OFFSET 0x18
  381. #define CPU_CLOCK_OFFSET SOC_CPU_CLOCK_OFFSET
  382. #define LPO_CAL_OFFSET SOC_LPO_CAL_OFFSET
  383. #define GPIO_PIN10_OFFSET WLAN_GPIO_PIN10_ADDRESS
  384. #define GPIO_PIN11_OFFSET WLAN_GPIO_PIN11_ADDRESS
  385. #define GPIO_PIN12_OFFSET WLAN_GPIO_PIN12_ADDRESS
  386. #define GPIO_PIN13_OFFSET WLAN_GPIO_PIN13_ADDRESS
  387. #define CPU_CLOCK_STANDARD_LSB SOC_CPU_CLOCK_STANDARD_LSB
  388. #define CPU_CLOCK_STANDARD_MASK SOC_CPU_CLOCK_STANDARD_MASK
  389. #define LPO_CAL_ENABLE_LSB SOC_LPO_CAL_ENABLE_LSB
  390. #define LPO_CAL_ENABLE_MASK SOC_LPO_CAL_ENABLE_MASK
  391. #define ANALOG_INTF_BASE_ADDRESS WLAN_ANALOG_INTF_BASE_ADDRESS
  392. #define MBOX_BASE_ADDRESS MISSING
  393. #define INT_STATUS_ENABLE_ERROR_LSB MISSING
  394. #define INT_STATUS_ENABLE_ERROR_MASK MISSING
  395. #define INT_STATUS_ENABLE_CPU_LSB MISSING
  396. #define INT_STATUS_ENABLE_CPU_MASK MISSING
  397. #define INT_STATUS_ENABLE_COUNTER_LSB MISSING
  398. #define INT_STATUS_ENABLE_COUNTER_MASK MISSING
  399. #define INT_STATUS_ENABLE_MBOX_DATA_LSB MISSING
  400. #define INT_STATUS_ENABLE_MBOX_DATA_MASK MISSING
  401. #define ERROR_STATUS_ENABLE_RX_UNDERFLOW_LSB MISSING
  402. #define ERROR_STATUS_ENABLE_RX_UNDERFLOW_MASK MISSING
  403. #define ERROR_STATUS_ENABLE_TX_OVERFLOW_LSB MISSING
  404. #define ERROR_STATUS_ENABLE_TX_OVERFLOW_MASK MISSING
  405. #define COUNTER_INT_STATUS_ENABLE_BIT_LSB MISSING
  406. #define COUNTER_INT_STATUS_ENABLE_BIT_MASK MISSING
  407. #define INT_STATUS_ENABLE_ADDRESS MISSING
  408. #define CPU_INT_STATUS_ENABLE_BIT_LSB MISSING
  409. #define CPU_INT_STATUS_ENABLE_BIT_MASK MISSING
  410. #define HOST_INT_STATUS_ADDRESS MISSING
  411. #define CPU_INT_STATUS_ADDRESS MISSING
  412. #define ERROR_INT_STATUS_ADDRESS MISSING
  413. #define ERROR_INT_STATUS_WAKEUP_MASK MISSING
  414. #define ERROR_INT_STATUS_WAKEUP_LSB MISSING
  415. #define ERROR_INT_STATUS_RX_UNDERFLOW_MASK MISSING
  416. #define ERROR_INT_STATUS_RX_UNDERFLOW_LSB MISSING
  417. #define ERROR_INT_STATUS_TX_OVERFLOW_MASK MISSING
  418. #define ERROR_INT_STATUS_TX_OVERFLOW_LSB MISSING
  419. #define COUNT_DEC_ADDRESS MISSING
  420. #define HOST_INT_STATUS_CPU_MASK MISSING
  421. #define HOST_INT_STATUS_CPU_LSB MISSING
  422. #define HOST_INT_STATUS_ERROR_MASK MISSING
  423. #define HOST_INT_STATUS_ERROR_LSB MISSING
  424. #define HOST_INT_STATUS_COUNTER_MASK MISSING
  425. #define HOST_INT_STATUS_COUNTER_LSB MISSING
  426. #define RX_LOOKAHEAD_VALID_ADDRESS MISSING
  427. #define WINDOW_DATA_ADDRESS MISSING
  428. #define WINDOW_READ_ADDR_ADDRESS MISSING
  429. #define WINDOW_WRITE_ADDR_ADDRESS MISSING
  430. #define RTC_STATE_V_GET(x) (((x) & RTC_STATE_V_MASK) >> RTC_STATE_V_LSB)
  431. #endif /* _HW_H_ */