rtl8710b_spec.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481
  1. /******************************************************************************
  2. *
  3. * Copyright(c) 2007 - 2017 Realtek Corporation.
  4. *
  5. * This program is free software; you can redistribute it and/or modify it
  6. * under the terms of version 2 of the GNU General Public License as
  7. * published by the Free Software Foundation.
  8. *
  9. * This program is distributed in the hope that it will be useful, but WITHOUT
  10. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  12. * more details.
  13. *
  14. *****************************************************************************/
  15. #ifndef __RTL8710B_SPEC_H__
  16. #define __RTL8710B_SPEC_H__
  17. #include <drv_conf.h>
  18. #define HAL_NAV_UPPER_UNIT_8710B 128 /* micro-second */
  19. /* -----------------------------------------------------
  20. *
  21. * 0x0000h ~ 0x00FFh System Configuration
  22. *
  23. * ----------------------------------------------------- */
  24. #define REG_SYS_ISO_CTRL_8710B 0x0000 /* 2 Byte */
  25. #define REG_APS_FSMCO_8710B 0x0004 /* 4 Byte */
  26. #define REG_SYS_CLKR_8710B 0x0008 /* 2 Byte */
  27. #define REG_9346CR_8710B 0x000A /* 2 Byte */
  28. #define REG_EE_VPD_8710B 0x000C /* 2 Byte */
  29. #define REG_AFE_MISC_8710B 0x0010 /* 1 Byte */
  30. #define REG_SPS0_CTRL_8710B 0x0011 /* 7 Byte */
  31. #define REG_SPS_OCP_CFG_8710B 0x0018 /* 4 Byte */
  32. #define REG_RSV_CTRL_8710B 0x001C /* 3 Byte */
  33. #define REG_RF_CTRL_8710B 0x001F /* 1 Byte */
  34. #define REG_LPLDO_CTRL_8710B 0x0023 /* 1 Byte */
  35. #define REG_AFE_XTAL_CTRL_8710B 0x0024 /* 4 Byte */
  36. #define REG_AFE_PLL_CTRL_8710B 0x0028 /* 4 Byte */
  37. #define REG_MAC_PLL_CTRL_EXT_8710B 0x002c /* 4 Byte */
  38. #define REG_EFUSE_CTRL_8710B 0x0030
  39. #define REG_EFUSE_TEST_8710B 0x0034
  40. #define REG_PWR_DATA_8710B 0x0038
  41. #define REG_CAL_TIMER_8710B 0x003C
  42. #define REG_ACLK_MON_8710B 0x003E
  43. #define REG_GPIO_MUXCFG_8710B 0x0040
  44. #define REG_GPIO_IO_SEL_8710B 0x0042
  45. #define REG_MAC_PINMUX_CFG_8710B 0x0043
  46. #define REG_GPIO_PIN_CTRL_8710B 0x0044
  47. #define REG_GPIO_INTM_8710B 0x0048
  48. #define REG_LEDCFG0_8710B 0x004C
  49. #define REG_LEDCFG1_8710B 0x004D
  50. #define REG_LEDCFG2_8710B 0x004E
  51. #define REG_LEDCFG3_8710B 0x004F
  52. #define REG_FSIMR_8710B 0x0050
  53. #define REG_FSISR_8710B 0x0054
  54. #define REG_HSIMR_8710B 0x0058
  55. #define REG_HSISR_8710B 0x005c
  56. #define REG_GPIO_EXT_CTRL 0x0060
  57. #define REG_PAD_CTRL1_8710B 0x0064
  58. #define REG_MULTI_FUNC_CTRL_8710B 0x0068
  59. #define REG_GPIO_STATUS_8710B 0x006C
  60. #define REG_SDIO_CTRL_8710B 0x0070
  61. #define REG_OPT_CTRL_8710B 0x0074
  62. #define REG_AFE_CTRL_4_8710B 0x0078
  63. #define REG_MCUFWDL_8710B 0x0080
  64. #define REG_8051FW_CTRL_8710B 0x0080
  65. #define REG_HMEBOX_DBG_0_8710B 0x0088
  66. #define REG_HMEBOX_DBG_1_8710B 0x008A
  67. #define REG_HMEBOX_DBG_2_8710B 0x008C
  68. #define REG_HMEBOX_DBG_3_8710B 0x008E
  69. #define REG_WLLPS_CTRL 0x0090
  70. #define REG_PMC_DBG_CTRL2_8710B 0x00CC
  71. #define REG_EFUSE_BURN_GNT_8710B 0x00CF
  72. #define REG_HPON_FSM_8710B 0x00EC
  73. #define REG_SYS_CFG1_8710B 0x00F0
  74. #define REG_SYS_CFG_8710B 0x00FC
  75. #define REG_ROM_VERSION 0x00FD
  76. /* -----------------------------------------------------
  77. *
  78. * 0x0100h ~ 0x01FFh MACTOP General Configuration
  79. *
  80. * ----------------------------------------------------- */
  81. #define REG_C2HEVT_CMD_ID_8710B 0x01A0
  82. #define REG_C2HEVT_CMD_SEQ_88XX 0x01A1
  83. #define REG_C2hEVT_CMD_CONTENT_88XX 0x01A2
  84. #define REG_C2HEVT_CMD_LEN_8710B 0x01AE
  85. #define REG_C2HEVT_CLEAR_8710B 0x01AF
  86. #define REG_MCUTST_1_8710B 0x01C0
  87. #define REG_WOWLAN_WAKE_REASON 0x01C7
  88. #define REG_FMETHR_8710B 0x01C8
  89. #define REG_HMETFR_8710B 0x01CC
  90. #define REG_HMEBOX_0_8710B 0x01D0
  91. #define REG_HMEBOX_1_8710B 0x01D4
  92. #define REG_HMEBOX_2_8710B 0x01D8
  93. #define REG_HMEBOX_3_8710B 0x01DC
  94. #define REG_LLT_INIT_8710B 0x01E0
  95. #define REG_HMEBOX_EXT0_8710B 0x01F0
  96. #define REG_HMEBOX_EXT1_8710B 0x01F4
  97. #define REG_HMEBOX_EXT2_8710B 0x01F8
  98. #define REG_HMEBOX_EXT3_8710B 0x01FC
  99. /* -----------------------------------------------------
  100. *
  101. * 0x0200h ~ 0x027Fh TXDMA Configuration
  102. *
  103. * ----------------------------------------------------- */
  104. #define REG_RQPN_8710B 0x0200
  105. #define REG_FIFOPAGE_8710B 0x0204
  106. #define REG_DWBCN0_CTRL_8710B REG_TDECTRL
  107. #define REG_TXDMA_OFFSET_CHK_8710B 0x020C
  108. #define REG_TXDMA_STATUS_8710B 0x0210
  109. #define REG_RQPN_NPQ_8710B 0x0214
  110. #define REG_DWBCN1_CTRL_8710B 0x0228
  111. /* -----------------------------------------------------
  112. *
  113. * 0x0280h ~ 0x02FFh RXDMA Configuration
  114. *
  115. * ----------------------------------------------------- */
  116. #define REG_RXDMA_AGG_PG_TH_8710B 0x0280
  117. #define REG_FW_UPD_RDPTR_8710B 0x0284 /* FW shall update this register before FW write RXPKT_RELEASE_POLL to 1 */
  118. #define REG_RXDMA_CONTROL_8710B 0x0286 /* Control the RX DMA. */
  119. #define REG_RXDMA_STATUS_8710B 0x0288
  120. #define REG_RXDMA_MODE_CTRL_8710B 0x0290
  121. #define REG_EARLY_MODE_CONTROL_8710B 0x02BC
  122. #define REG_RSVD5_8710B 0x02F0
  123. #define REG_RSVD6_8710B 0x02F4
  124. /* -----------------------------------------------------
  125. *
  126. * 0x0300h ~ 0x03FFh PCIe
  127. *
  128. * ----------------------------------------------------- */
  129. #define REG_PCIE_CTRL_REG_8710B 0x0300
  130. #define REG_INT_MIG_8710B 0x0304 /* Interrupt Migration */
  131. #define REG_BCNQ_TXBD_DESA_8710B 0x0308 /* TX Beacon Descriptor Address */
  132. #define REG_MGQ_TXBD_DESA_8710B 0x0310 /* TX Manage Queue Descriptor Address */
  133. #define REG_VOQ_TXBD_DESA_8710B 0x0318 /* TX VO Queue Descriptor Address */
  134. #define REG_VIQ_TXBD_DESA_8710B 0x0320 /* TX VI Queue Descriptor Address */
  135. #define REG_BEQ_TXBD_DESA_8710B 0x0328 /* TX BE Queue Descriptor Address */
  136. #define REG_BKQ_TXBD_DESA_8710B 0x0330 /* TX BK Queue Descriptor Address */
  137. #define REG_RXQ_RXBD_DESA_8710B 0x0338 /* RX Queue Descriptor Address */
  138. #define REG_HI0Q_TXBD_DESA_8710B 0x0340
  139. #define REG_HI1Q_TXBD_DESA_8710B 0x0348
  140. #define REG_HI2Q_TXBD_DESA_8710B 0x0350
  141. #define REG_HI3Q_TXBD_DESA_8710B 0x0358
  142. #define REG_HI4Q_TXBD_DESA_8710B 0x0360
  143. #define REG_HI5Q_TXBD_DESA_8710B 0x0368
  144. #define REG_HI6Q_TXBD_DESA_8710B 0x0370
  145. #define REG_HI7Q_TXBD_DESA_8710B 0x0378
  146. #define REG_MGQ_TXBD_NUM_8710B 0x0380
  147. #define REG_RX_RXBD_NUM_8710B 0x0382
  148. #define REG_VOQ_TXBD_NUM_8710B 0x0384
  149. #define REG_VIQ_TXBD_NUM_8710B 0x0386
  150. #define REG_BEQ_TXBD_NUM_8710B 0x0388
  151. #define REG_BKQ_TXBD_NUM_8710B 0x038A
  152. #define REG_HI0Q_TXBD_NUM_8710B 0x038C
  153. #define REG_HI1Q_TXBD_NUM_8710B 0x038E
  154. #define REG_HI2Q_TXBD_NUM_8710B 0x0390
  155. #define REG_HI3Q_TXBD_NUM_8710B 0x0392
  156. #define REG_HI4Q_TXBD_NUM_8710B 0x0394
  157. #define REG_HI5Q_TXBD_NUM_8710B 0x0396
  158. #define REG_HI6Q_TXBD_NUM_8710B 0x0398
  159. #define REG_HI7Q_TXBD_NUM_8710B 0x039A
  160. #define REG_TSFTIMER_HCI_8710B 0x039C
  161. #define REG_BD_RW_PTR_CLR_8710B 0x039C
  162. /* Read Write Point */
  163. #define REG_VOQ_TXBD_IDX_8710B 0x03A0
  164. #define REG_VIQ_TXBD_IDX_8710B 0x03A4
  165. #define REG_BEQ_TXBD_IDX_8710B 0x03A8
  166. #define REG_BKQ_TXBD_IDX_8710B 0x03AC
  167. #define REG_MGQ_TXBD_IDX_8710B 0x03B0
  168. #define REG_RXQ_TXBD_IDX_8710B 0x03B4
  169. #define REG_HI0Q_TXBD_IDX_8710B 0x03B8
  170. #define REG_HI1Q_TXBD_IDX_8710B 0x03BC
  171. #define REG_HI2Q_TXBD_IDX_8710B 0x03C0
  172. #define REG_HI3Q_TXBD_IDX_8710B 0x03C4
  173. #define REG_HI4Q_TXBD_IDX_8710B 0x03C8
  174. #define REG_HI5Q_TXBD_IDX_8710B 0x03CC
  175. #define REG_HI6Q_TXBD_IDX_8710B 0x03D0
  176. #define REG_HI7Q_TXBD_IDX_8710B 0x03D4
  177. #define REG_PCIE_HCPWM_8710BE 0x03D8 /* ?????? */
  178. #define REG_PCIE_HRPWM_8710BE 0x03DC /* PCIe RPWM ?????? */
  179. #define REG_DBI_WDATA_V1_8710B 0x03E8
  180. #define REG_DBI_RDATA_V1_8710B 0x03EC
  181. #define REG_DBI_FLAG_V1_8710B 0x03F0
  182. #define REG_MDIO_V1_8710B 0x03F4
  183. #define REG_PCIE_MIX_CFG_8710B 0x03F8
  184. #define REG_HCI_MIX_CFG_8710B 0x03FC
  185. /* -----------------------------------------------------
  186. *
  187. * 0x0400h ~ 0x047Fh Protocol Configuration
  188. *
  189. * ----------------------------------------------------- */
  190. #define REG_VOQ_INFORMATION_8710B 0x0400
  191. #define REG_VIQ_INFORMATION_8710B 0x0404
  192. #define REG_BEQ_INFORMATION_8710B 0x0408
  193. #define REG_BKQ_INFORMATION_8710B 0x040C
  194. #define REG_MGQ_INFORMATION_8710B 0x0410
  195. #define REG_HGQ_INFORMATION_8710B 0x0414
  196. #define REG_BCNQ_INFORMATION_8710B 0x0418
  197. #define REG_TXPKT_EMPTY_8710B 0x041A
  198. #define REG_FWHW_TXQ_CTRL_8710B 0x0420
  199. #define REG_HWSEQ_CTRL_8710B 0x0423
  200. #define REG_TXPKTBUF_BCNQ_BDNY_8710B 0x0424
  201. #define REG_TXPKTBUF_MGQ_BDNY_8710B 0x0425
  202. #define REG_LIFECTRL_CTRL_8710B 0x0426
  203. #define REG_MULTI_BCNQ_OFFSET_8710B 0x0427
  204. #define REG_SPEC_SIFS_8710B 0x0428
  205. #define REG_RL_8710B 0x042A
  206. #define REG_TXBF_CTRL_8710B 0x042C
  207. #define REG_DARFRC_8710B 0x0430
  208. #define REG_RARFRC_8710B 0x0438
  209. #define REG_RRSR_8710B 0x0440
  210. #define REG_ARFR0_8710B 0x0444
  211. #define REG_ARFR1_8710B 0x044C
  212. #define REG_CCK_CHECK_8710B 0x0454
  213. #define REG_AMPDU_MAX_TIME_8710B 0x0456
  214. #define REG_TXPKTBUF_BCNQ_BDNY1_8710B 0x0457
  215. #define REG_AMPDU_MAX_LENGTH_8710B 0x0458
  216. #define REG_TXPKTBUF_WMAC_LBK_BF_HD_8710B 0x045D
  217. #define REG_NDPA_OPT_CTRL_8710B 0x045F
  218. #define REG_FAST_EDCA_CTRL_8710B 0x0460
  219. #define REG_RD_RESP_PKT_TH_8710B 0x0463
  220. #define REG_DATA_SC_8710B 0x0483
  221. #ifdef CONFIG_WOWLAN
  222. #define REG_TXPKTBUF_IV_LOW 0x0484
  223. #define REG_TXPKTBUF_IV_HIGH 0x0488
  224. #endif
  225. #define REG_TXRPT_START_OFFSET 0x04AC
  226. #define REG_POWER_STAGE1_8710B 0x04B4
  227. #define REG_POWER_STAGE2_8710B 0x04B8
  228. #define REG_AMPDU_BURST_MODE_8710B 0x04BC
  229. #define REG_PKT_VO_VI_LIFE_TIME_8710B 0x04C0
  230. #define REG_PKT_BE_BK_LIFE_TIME_8710B 0x04C2
  231. #define REG_STBC_SETTING_8710B 0x04C4
  232. #define REG_HT_SINGLE_AMPDU_8710B 0x04C7
  233. #define REG_PROT_MODE_CTRL_8710B 0x04C8
  234. #define REG_MAX_AGGR_NUM_8710B 0x04CA
  235. #define REG_RTS_MAX_AGGR_NUM_8710B 0x04CB
  236. #define REG_BAR_MODE_CTRL_8710B 0x04CC
  237. #define REG_RA_TRY_RATE_AGG_LMT_8710B 0x04CF
  238. #define REG_MACID_PKT_DROP0_8710B 0x04D0
  239. #define REG_MACID_PKT_SLEEP_8710B 0x04D4
  240. /* -----------------------------------------------------
  241. *
  242. * 0x0500h ~ 0x05FFh EDCA Configuration
  243. *
  244. * ----------------------------------------------------- */
  245. #define REG_EDCA_VO_PARAM_8710B 0x0500
  246. #define REG_EDCA_VI_PARAM_8710B 0x0504
  247. #define REG_EDCA_BE_PARAM_8710B 0x0508
  248. #define REG_EDCA_BK_PARAM_8710B 0x050C
  249. #define REG_BCNTCFG_8710B 0x0510
  250. #define REG_PIFS_8710B 0x0512
  251. #define REG_RDG_PIFS_8710B 0x0513
  252. #define REG_SIFS_CTX_8710B 0x0514
  253. #define REG_SIFS_TRX_8710B 0x0516
  254. #define REG_AGGR_BREAK_TIME_8710B 0x051A
  255. #define REG_SLOT_8710B 0x051B
  256. #define REG_TX_PTCL_CTRL_8710B 0x0520
  257. #define REG_TXPAUSE_8710B 0x0522
  258. #define REG_DIS_TXREQ_CLR_8710B 0x0523
  259. #define REG_RD_CTRL_8710B 0x0524
  260. /*
  261. * Format for offset 540h-542h:
  262. * [3:0]: TBTT prohibit setup in unit of 32us. The time for HW getting beacon content before TBTT.
  263. * [7:4]: Reserved.
  264. * [19:8]: TBTT prohibit hold in unit of 32us. The time for HW holding to send the beacon packet.
  265. * [23:20]: Reserved
  266. * Description:
  267. * |
  268. * |<--Setup--|--Hold------------>|
  269. * --------------|----------------------
  270. * |
  271. * TBTT
  272. * Note: We cannot update beacon content to HW or send any AC packets during the time between Setup and Hold.
  273. * Described by Designer Tim and Bruce, 2011-01-14.
  274. * */
  275. #define REG_TBTT_PROHIBIT_8710B 0x0540
  276. #define REG_RD_NAV_NXT_8710B 0x0544
  277. #define REG_NAV_PROT_LEN_8710B 0x0546
  278. #define REG_BCN_CTRL_8710B 0x0550
  279. #define REG_BCN_CTRL_1_8710B 0x0551
  280. #define REG_MBID_NUM_8710B 0x0552
  281. #define REG_DUAL_TSF_RST_8710B 0x0553
  282. #define REG_BCN_INTERVAL_8710B 0x0554
  283. #define REG_DRVERLYINT_8710B 0x0558
  284. #define REG_BCNDMATIM_8710B 0x0559
  285. #define REG_ATIMWND_8710B 0x055A
  286. #define REG_USTIME_TSF_8710B 0x055C
  287. #define REG_BCN_MAX_ERR_8710B 0x055D
  288. #define REG_RXTSF_OFFSET_CCK_8710B 0x055E
  289. #define REG_RXTSF_OFFSET_OFDM_8710B 0x055F
  290. #define REG_TSFTR_8710B 0x0560
  291. #define REG_CTWND_8710B 0x0572
  292. #define REG_SECONDARY_CCA_CTRL_8710B 0x0577
  293. #define REG_PSTIMER_8710B 0x0580
  294. #define REG_TIMER0_8710B 0x0584
  295. #define REG_TIMER1_8710B 0x0588
  296. #define REG_ACMHWCTRL_8710B 0x05C0
  297. #define REG_SCH_TXCMD_8710B 0x05F8
  298. /* -----------------------------------------------------
  299. *
  300. * 0x0600h ~ 0x07FFh WMAC Configuration
  301. *
  302. * ----------------------------------------------------- */
  303. #define REG_MAC_CR_8710B 0x0600
  304. #define REG_TCR_8710B 0x0604
  305. #define REG_RCR_8710B 0x0608
  306. #define REG_RX_PKT_LIMIT_8710B 0x060C
  307. #define REG_RX_DLK_TIME_8710B 0x060D
  308. #define REG_RX_DRVINFO_SZ_8710B 0x060F
  309. #define REG_MACID_8710B 0x0610
  310. #define REG_BSSID_8710B 0x0618
  311. #define REG_MAR_8710B 0x0620
  312. #define REG_MBIDCAMCFG_8710B 0x0628
  313. #define REG_WOWLAN_GTK_DBG1 0x630
  314. #define REG_WOWLAN_GTK_DBG2 0x634
  315. #define REG_USTIME_EDCA_8710B 0x0638
  316. #define REG_MAC_SPEC_SIFS_8710B 0x063A
  317. #define REG_RESP_SIFP_CCK_8710B 0x063C
  318. #define REG_RESP_SIFS_OFDM_8710B 0x063E
  319. #define REG_ACKTO_8710B 0x0640
  320. #define REG_CTS2TO_8710B 0x0641
  321. #define REG_EIFS_8710B 0x0642
  322. #define REG_NAV_UPPER_8710B 0x0652 /* unit of 128 */
  323. #define REG_TRXPTCL_CTL_8710B 0x0668
  324. /* Security */
  325. #define REG_CAMCMD_8710B 0x0670
  326. #define REG_CAMWRITE_8710B 0x0674
  327. #define REG_CAMREAD_8710B 0x0678
  328. #define REG_CAMDBG_8710B 0x067C
  329. #define REG_SECCFG_8710B 0x0680
  330. /* Power */
  331. #define REG_WOW_CTRL_8710B 0x0690
  332. #define REG_PS_RX_INFO_8710B 0x0692
  333. #define REG_UAPSD_TID_8710B 0x0693
  334. #define REG_WKFMCAM_CMD_8710B 0x0698
  335. #define REG_WKFMCAM_NUM_8710B 0x0698
  336. #define REG_WKFMCAM_RWD_8710B 0x069C
  337. #define REG_RXFLTMAP0_8710B 0x06A0
  338. #define REG_RXFLTMAP1_8710B 0x06A2
  339. #define REG_RXFLTMAP2_8710B 0x06A4
  340. #define REG_BCN_PSR_RPT_8710B 0x06A8
  341. #define REG_BT_COEX_TABLE_8710B 0x06C0
  342. #define REG_BFMER0_INFO_8710B 0x06E4
  343. #define REG_BFMER1_INFO_8710B 0x06EC
  344. #define REG_CSI_RPT_PARAM_BW20_8710B 0x06F4
  345. #define REG_CSI_RPT_PARAM_BW40_8710B 0x06F8
  346. #define REG_CSI_RPT_PARAM_BW80_8710B 0x06FC
  347. /* Hardware Port 2 */
  348. #define REG_MACID1_8710B 0x0700
  349. #define REG_BSSID1_8710B 0x0708
  350. #define REG_BFMEE_SEL_8710B 0x0714
  351. #define REG_SND_PTCL_CTRL_8710B 0x0718
  352. /* LTR */
  353. #define REG_LTR_CTRL_BASIC_8710B 0x07A4
  354. #define REG_LTR_IDLE_LATENCY_V1_8710B 0x0798
  355. #define REG_LTR_ACTIVE_LATENCY_V1_8710B 0x079C
  356. /* LTE_COEX */
  357. #define REG_LTECOEX_CTRL 0x07C0
  358. #define REG_LTECOEX_WRITE_DATA 0x07C4
  359. #define REG_LTECOEX_READ_DATA 0x07C8
  360. #define REG_LTECOEX_PATH_CONTROL 0x70
  361. /* Other */
  362. #define REG_USB_ACCESS_TIMEOUT 0xFE4C
  363. /* -----------------------------------------------------
  364. * SYSON_REG_SPEC
  365. * ----------------------------------------------------- */
  366. #define SYSON_REG_BASE_ADDR_8710B 0x40000000
  367. #define REG_SYS_XTAL_CTRL0 0x0060
  368. #define REG_SYS_SYSTEM_CFG0 0x1F0
  369. #define REG_SYS_SYSTEM_CFG1 0x1F4
  370. #define REG_SYS_SYSTEM_CFG2 0x1F8
  371. #define REG_SYS_EEPROM_CTRL0 0x0E0
  372. /* -----------------------------------------------------
  373. * Indirect_R/W_SPEC
  374. * ----------------------------------------------------- */
  375. #define NORMAL_REG_READ_OFFSET 0x83000000
  376. #define NORMAL_REG_WRITE_OFFSET 0x84000000
  377. #define EFUSE_READ_OFFSET 0x85000000
  378. #define EFUSE_WRITE_OFFSET 0x86000000
  379. /* -----------------------------------------------------
  380. * PAGE0_WLANON_REG_SPEC
  381. * ----------------------------------------------------- */
  382. #define PAGE0_OFFSET 0x0 // WLANON_PAGE0_REG needs to add an offset.
  383. /* ****************************************************************************
  384. * 8723 Regsiter Bit and Content definition
  385. * **************************************************************************** */
  386. /* -----------------------------------------------------
  387. * REG_SYS_SYSTEM_CFG0
  388. * ----------------------------------------------------- */
  389. #define BIT_RTL_ID_8710B BIT(16)
  390. #define BIT_MASK_CHIP_VER_8710B 0xf
  391. #define BIT_GET_CHIP_VER_8710B(x) ((x) & BIT_MASK_CHIP_VER_8710B)
  392. #define BIT_SHIFT_VENDOR_ID_8710B 4
  393. #define BIT_MASK_VENDOR_ID_8710B 0xf
  394. #define BIT_GET_VENDOR_ID_8710B(x) (((x) >> BIT_SHIFT_VENDOR_ID_8710B) & BIT_MASK_VENDOR_ID_8710B)
  395. /* -----------------------------------------------------
  396. * REG_SYS_SYSTEM_CFG1
  397. * ----------------------------------------------------- */
  398. #define BIT_SPSLDO_SEL_8710B BIT(25)
  399. /* -----------------------------------------------------
  400. * REG_SYS_SYSTEM_CFG2
  401. * ----------------------------------------------------- */
  402. #define BIT_MASK_RF_RL_ID_8710B 0xf
  403. #define BIT_GET_RF_RL_ID_8710B(x) ((x) & BIT_MASK_RF_RL_ID_8710B)
  404. /* -----------------------------------------------------
  405. * REG_SYS_SYSTEM_CFG2
  406. * ----------------------------------------------------- */
  407. #define BIT_EERPOMSEL_8710B BIT(4)
  408. #define BIT_AUTOLOAD_SUS_8710B BIT(5)
  409. /* -----------------------------------------------------
  410. * Other
  411. * ----------------------------------------------------- */
  412. #define BIT_USB_RXDMA_AGG_EN BIT(31)
  413. #define RXDMA_AGG_MODE_EN BIT(1)
  414. #ifdef CONFIG_WOWLAN
  415. #define RXPKT_RELEASE_POLL BIT(16)
  416. #define RXDMA_IDLE BIT(17)
  417. #define RW_RELEASE_EN BIT(18)
  418. #endif
  419. /* 2 HSISR
  420. * interrupt mask which needs to clear */
  421. #define MASK_HSISR_CLEAR (HSISR_GPIO12_0_INT |\
  422. HSISR_SPS_OCP_INT |\
  423. HSISR_RON_INT |\
  424. HSISR_PDNINT |\
  425. HSISR_GPIO9_INT)
  426. #ifdef CONFIG_RF_POWER_TRIM
  427. #ifdef CONFIG_RTL8710B
  428. #define EEPROM_RF_GAIN_OFFSET 0xC1
  429. #endif
  430. #define EEPROM_RF_GAIN_VAL 0x1F6
  431. #endif /*CONFIG_RF_POWER_TRIM*/
  432. #endif /* __RTL8710B_SPEC_H__ */