rtl8xxxu_regs.h 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215
  1. /*
  2. * Copyright (c) 2014 - 2017 Jes Sorensen <Jes.Sorensen@gmail.com>
  3. *
  4. * This program is free software; you can redistribute it and/or modify it
  5. * under the terms of version 2 of the GNU General Public License as
  6. * published by the Free Software Foundation.
  7. *
  8. * This program is distributed in the hope that it will be useful, but WITHOUT
  9. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  10. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  11. * more details.
  12. *
  13. * Register definitions taken from original Realtek rtl8723au driver
  14. */
  15. /* 0x0000 ~ 0x00FF System Configuration */
  16. #define REG_SYS_ISO_CTRL 0x0000
  17. #define SYS_ISO_MD2PP BIT(0)
  18. #define SYS_ISO_ANALOG_IPS BIT(5)
  19. #define SYS_ISO_DIOR BIT(9)
  20. #define SYS_ISO_PWC_EV25V BIT(14)
  21. #define SYS_ISO_PWC_EV12V BIT(15)
  22. #define REG_SYS_FUNC 0x0002
  23. #define SYS_FUNC_BBRSTB BIT(0)
  24. #define SYS_FUNC_BB_GLB_RSTN BIT(1)
  25. #define SYS_FUNC_USBA BIT(2)
  26. #define SYS_FUNC_UPLL BIT(3)
  27. #define SYS_FUNC_USBD BIT(4)
  28. #define SYS_FUNC_DIO_PCIE BIT(5)
  29. #define SYS_FUNC_PCIEA BIT(6)
  30. #define SYS_FUNC_PPLL BIT(7)
  31. #define SYS_FUNC_PCIED BIT(8)
  32. #define SYS_FUNC_DIOE BIT(9)
  33. #define SYS_FUNC_CPU_ENABLE BIT(10)
  34. #define SYS_FUNC_DCORE BIT(11)
  35. #define SYS_FUNC_ELDR BIT(12)
  36. #define SYS_FUNC_DIO_RF BIT(13)
  37. #define SYS_FUNC_HWPDN BIT(14)
  38. #define SYS_FUNC_MREGEN BIT(15)
  39. #define REG_APS_FSMCO 0x0004
  40. #define APS_FSMCO_PFM_ALDN BIT(1)
  41. #define APS_FSMCO_PFM_WOWL BIT(3)
  42. #define APS_FSMCO_ENABLE_POWERDOWN BIT(4)
  43. #define APS_FSMCO_MAC_ENABLE BIT(8)
  44. #define APS_FSMCO_MAC_OFF BIT(9)
  45. #define APS_FSMCO_SW_LPS BIT(10)
  46. #define APS_FSMCO_HW_SUSPEND BIT(11)
  47. #define APS_FSMCO_PCIE BIT(12)
  48. #define APS_FSMCO_HW_POWERDOWN BIT(15)
  49. #define APS_FSMCO_WLON_RESET BIT(16)
  50. #define REG_SYS_CLKR 0x0008
  51. #define SYS_CLK_ANAD16V_ENABLE BIT(0)
  52. #define SYS_CLK_ANA8M BIT(1)
  53. #define SYS_CLK_MACSLP BIT(4)
  54. #define SYS_CLK_LOADER_ENABLE BIT(5)
  55. #define SYS_CLK_80M_SSC_DISABLE BIT(7)
  56. #define SYS_CLK_80M_SSC_ENABLE_HO BIT(8)
  57. #define SYS_CLK_PHY_SSC_RSTB BIT(9)
  58. #define SYS_CLK_SEC_CLK_ENABLE BIT(10)
  59. #define SYS_CLK_MAC_CLK_ENABLE BIT(11)
  60. #define SYS_CLK_ENABLE BIT(12)
  61. #define SYS_CLK_RING_CLK_ENABLE BIT(13)
  62. #define REG_9346CR 0x000a
  63. #define EEPROM_BOOT BIT(4)
  64. #define EEPROM_ENABLE BIT(5)
  65. #define REG_EE_VPD 0x000c
  66. #define REG_AFE_MISC 0x0010
  67. #define AFE_MISC_WL_XTAL_CTRL BIT(6)
  68. #define REG_SPS0_CTRL 0x0011
  69. #define REG_SPS_OCP_CFG 0x0018
  70. #define REG_8192E_LDOV12_CTRL 0x0014
  71. #define REG_RSV_CTRL 0x001c
  72. #define REG_RF_CTRL 0x001f
  73. #define RF_ENABLE BIT(0)
  74. #define RF_RSTB BIT(1)
  75. #define RF_SDMRSTB BIT(2)
  76. #define REG_LDOA15_CTRL 0x0020
  77. #define LDOA15_ENABLE BIT(0)
  78. #define LDOA15_STANDBY BIT(1)
  79. #define LDOA15_OBUF BIT(2)
  80. #define LDOA15_REG_VOS BIT(3)
  81. #define LDOA15_VOADJ_SHIFT 4
  82. #define REG_LDOV12D_CTRL 0x0021
  83. #define LDOV12D_ENABLE BIT(0)
  84. #define LDOV12D_STANDBY BIT(1)
  85. #define LDOV12D_VADJ_SHIFT 4
  86. #define REG_LDOHCI12_CTRL 0x0022
  87. #define REG_LPLDO_CTRL 0x0023
  88. #define LPLDO_HSM BIT(2)
  89. #define LPLDO_LSM_DIS BIT(3)
  90. #define REG_AFE_XTAL_CTRL 0x0024
  91. #define AFE_XTAL_ENABLE BIT(0)
  92. #define AFE_XTAL_B_SELECT BIT(1)
  93. #define AFE_XTAL_GATE_USB BIT(8)
  94. #define AFE_XTAL_GATE_AFE BIT(11)
  95. #define AFE_XTAL_RF_GATE BIT(14)
  96. #define AFE_XTAL_GATE_DIG BIT(17)
  97. #define AFE_XTAL_BT_GATE BIT(20)
  98. /*
  99. * 0x0028 is also known as REG_AFE_CTRL2 on 8723bu/8192eu
  100. */
  101. #define REG_AFE_PLL_CTRL 0x0028
  102. #define AFE_PLL_ENABLE BIT(0)
  103. #define AFE_PLL_320_ENABLE BIT(1)
  104. #define APE_PLL_FREF_SELECT BIT(2)
  105. #define AFE_PLL_EDGE_SELECT BIT(3)
  106. #define AFE_PLL_WDOGB BIT(4)
  107. #define AFE_PLL_LPF_ENABLE BIT(5)
  108. #define REG_MAC_PHY_CTRL 0x002c
  109. #define REG_EFUSE_CTRL 0x0030
  110. #define REG_EFUSE_TEST 0x0034
  111. #define EFUSE_TRPT BIT(7)
  112. /* 00: Wifi Efuse, 01: BT Efuse0, 10: BT Efuse1, 11: BT Efuse2 */
  113. #define EFUSE_CELL_SEL (BIT(8) | BIT(9))
  114. #define EFUSE_LDOE25_ENABLE BIT(31)
  115. #define EFUSE_SELECT_MASK 0x0300
  116. #define EFUSE_WIFI_SELECT 0x0000
  117. #define EFUSE_BT0_SELECT 0x0100
  118. #define EFUSE_BT1_SELECT 0x0200
  119. #define EFUSE_BT2_SELECT 0x0300
  120. #define EFUSE_ACCESS_ENABLE 0x69 /* RTL8723 only */
  121. #define EFUSE_ACCESS_DISABLE 0x00 /* RTL8723 only */
  122. #define REG_PWR_DATA 0x0038
  123. #define PWR_DATA_EEPRPAD_RFE_CTRL_EN BIT(11)
  124. #define REG_CAL_TIMER 0x003c
  125. #define REG_ACLK_MON 0x003e
  126. #define REG_GPIO_MUXCFG 0x0040
  127. #define REG_GPIO_IO_SEL 0x0042
  128. #define REG_MAC_PINMUX_CFG 0x0043
  129. #define REG_GPIO_PIN_CTRL 0x0044
  130. #define REG_GPIO_INTM 0x0048
  131. #define GPIO_INTM_EDGE_TRIG_IRQ BIT(9)
  132. #define REG_LEDCFG0 0x004c
  133. #define LEDCFG0_DPDT_SELECT BIT(23)
  134. #define REG_LEDCFG1 0x004d
  135. #define REG_LEDCFG2 0x004e
  136. #define LEDCFG2_DPDT_SELECT BIT(7)
  137. #define REG_LEDCFG3 0x004f
  138. #define REG_LEDCFG REG_LEDCFG2
  139. #define REG_FSIMR 0x0050
  140. #define REG_FSISR 0x0054
  141. #define REG_HSIMR 0x0058
  142. #define REG_HSISR 0x005c
  143. /* RTL8723 WIFI/BT/GPS Multi-Function GPIO Pin Control. */
  144. #define REG_GPIO_PIN_CTRL_2 0x0060
  145. /* RTL8723 WIFI/BT/GPS Multi-Function GPIO Select. */
  146. #define REG_GPIO_IO_SEL_2 0x0062
  147. #define GPIO_IO_SEL_2_GPIO09_INPUT BIT(1)
  148. #define GPIO_IO_SEL_2_GPIO09_IRQ BIT(9)
  149. /* RTL8723B */
  150. #define REG_PAD_CTRL1 0x0064
  151. #define PAD_CTRL1_SW_DPDT_SEL_DATA BIT(0)
  152. /* RTL8723 only WIFI/BT/GPS Multi-Function control source. */
  153. #define REG_MULTI_FUNC_CTRL 0x0068
  154. #define MULTI_FN_WIFI_HW_PWRDOWN_EN BIT(0) /* Enable GPIO[9] as WiFi HW
  155. powerdown source */
  156. #define MULTI_FN_WIFI_HW_PWRDOWN_SL BIT(1) /* WiFi HW powerdown polarity
  157. control */
  158. #define MULTI_WIFI_FUNC_EN BIT(2) /* WiFi function enable */
  159. #define MULTI_WIFI_HW_ROF_EN BIT(3) /* Enable GPIO[9] as WiFi RF HW
  160. powerdown source */
  161. #define MULTI_BT_HW_PWRDOWN_EN BIT(16) /* Enable GPIO[11] as BT HW
  162. powerdown source */
  163. #define MULTI_BT_HW_PWRDOWN_SL BIT(17) /* BT HW powerdown polarity
  164. control */
  165. #define MULTI_BT_FUNC_EN BIT(18) /* BT function enable */
  166. #define MULTI_BT_HW_ROF_EN BIT(19) /* Enable GPIO[11] as BT/GPS
  167. RF HW powerdown source */
  168. #define MULTI_GPS_HW_PWRDOWN_EN BIT(20) /* Enable GPIO[10] as GPS HW
  169. powerdown source */
  170. #define MULTI_GPS_HW_PWRDOWN_SL BIT(21) /* GPS HW powerdown polarity
  171. control */
  172. #define MULTI_GPS_FUNC_EN BIT(22) /* GPS function enable */
  173. #define REG_AFE_CTRL4 0x0078 /* 8192eu/8723bu */
  174. #define REG_LDO_SW_CTRL 0x007c /* 8192eu */
  175. #define REG_MCU_FW_DL 0x0080
  176. #define MCU_FW_DL_ENABLE BIT(0)
  177. #define MCU_FW_DL_READY BIT(1)
  178. #define MCU_FW_DL_CSUM_REPORT BIT(2)
  179. #define MCU_MAC_INIT_READY BIT(3)
  180. #define MCU_BB_INIT_READY BIT(4)
  181. #define MCU_RF_INIT_READY BIT(5)
  182. #define MCU_WINT_INIT_READY BIT(6)
  183. #define MCU_FW_RAM_SEL BIT(7) /* 1: RAM, 0:ROM */
  184. #define MCU_CP_RESET BIT(23)
  185. #define REG_HMBOX_EXT_0 0x0088
  186. #define REG_HMBOX_EXT_1 0x008a
  187. #define REG_HMBOX_EXT_2 0x008c
  188. #define REG_HMBOX_EXT_3 0x008e
  189. /* Interrupt registers for 8192e/8723bu/8812 */
  190. #define REG_HIMR0 0x00b0
  191. #define IMR0_TXCCK BIT(30) /* TXRPT interrupt when CCX bit
  192. of the packet is set */
  193. #define IMR0_PSTIMEOUT BIT(29) /* Power Save Time Out Int */
  194. #define IMR0_GTINT4 BIT(28) /* Set when GTIMER4 expires */
  195. #define IMR0_GTINT3 BIT(27) /* Set when GTIMER3 expires */
  196. #define IMR0_TBDER BIT(26) /* Transmit Beacon0 Error */
  197. #define IMR0_TBDOK BIT(25) /* Transmit Beacon0 OK */
  198. #define IMR0_TSF_BIT32_TOGGLE BIT(24) /* TSF Timer BIT32 toggle
  199. indication interrupt */
  200. #define IMR0_BCNDMAINT0 BIT(20) /* Beacon DMA Interrupt 0 */
  201. #define IMR0_BCNDERR0 BIT(16) /* Beacon Queue DMA Error 0 */
  202. #define IMR0_HSISR_IND_ON_INT BIT(15) /* HSISR Indicator (HSIMR &
  203. HSISR is true) */
  204. #define IMR0_BCNDMAINT_E BIT(14) /* Beacon DMA Interrupt
  205. Extension for Win7 */
  206. #define IMR0_ATIMEND BIT(12) /* CTWidnow End or
  207. ATIM Window End */
  208. #define IMR0_HISR1_IND_INT BIT(11) /* HISR1 Indicator
  209. (HISR1 & HIMR1 is true) */
  210. #define IMR0_C2HCMD BIT(10) /* CPU to Host Command INT
  211. Status, Write 1 to clear */
  212. #define IMR0_CPWM2 BIT(9) /* CPU power Mode exchange INT
  213. Status, Write 1 to clear */
  214. #define IMR0_CPWM BIT(8) /* CPU power Mode exchange INT
  215. Status, Write 1 to clear */
  216. #define IMR0_HIGHDOK BIT(7) /* High Queue DMA OK */
  217. #define IMR0_MGNTDOK BIT(6) /* Management Queue DMA OK */
  218. #define IMR0_BKDOK BIT(5) /* AC_BK DMA OK */
  219. #define IMR0_BEDOK BIT(4) /* AC_BE DMA OK */
  220. #define IMR0_VIDOK BIT(3) /* AC_VI DMA OK */
  221. #define IMR0_VODOK BIT(2) /* AC_VO DMA OK */
  222. #define IMR0_RDU BIT(1) /* Rx Descriptor Unavailable */
  223. #define IMR0_ROK BIT(0) /* Receive DMA OK */
  224. #define REG_HISR0 0x00b4
  225. #define REG_HIMR1 0x00b8
  226. #define IMR1_BCNDMAINT7 BIT(27) /* Beacon DMA Interrupt 7 */
  227. #define IMR1_BCNDMAINT6 BIT(26) /* Beacon DMA Interrupt 6 */
  228. #define IMR1_BCNDMAINT5 BIT(25) /* Beacon DMA Interrupt 5 */
  229. #define IMR1_BCNDMAINT4 BIT(24) /* Beacon DMA Interrupt 4 */
  230. #define IMR1_BCNDMAINT3 BIT(23) /* Beacon DMA Interrupt 3 */
  231. #define IMR1_BCNDMAINT2 BIT(22) /* Beacon DMA Interrupt 2 */
  232. #define IMR1_BCNDMAINT1 BIT(21) /* Beacon DMA Interrupt 1 */
  233. #define IMR1_BCNDERR7 BIT(20) /* Beacon Queue DMA Err Int 7 */
  234. #define IMR1_BCNDERR6 BIT(19) /* Beacon Queue DMA Err Int 6 */
  235. #define IMR1_BCNDERR5 BIT(18) /* Beacon Queue DMA Err Int 5 */
  236. #define IMR1_BCNDERR4 BIT(17) /* Beacon Queue DMA Err Int 4 */
  237. #define IMR1_BCNDERR3 BIT(16) /* Beacon Queue DMA Err Int 3 */
  238. #define IMR1_BCNDERR2 BIT(15) /* Beacon Queue DMA Err Int 2 */
  239. #define IMR1_BCNDERR1 BIT(14) /* Beacon Queue DMA Err Int 1 */
  240. #define IMR1_ATIMEND_E BIT(13) /* ATIM Window End Extension
  241. for Win7 */
  242. #define IMR1_TXERR BIT(11) /* Tx Error Flag Int Status,
  243. write 1 to clear */
  244. #define IMR1_RXERR BIT(10) /* Rx Error Flag Int Status,
  245. write 1 to clear */
  246. #define IMR1_TXFOVW BIT(9) /* Transmit FIFO Overflow */
  247. #define IMR1_RXFOVW BIT(8) /* Receive FIFO Overflow */
  248. #define REG_HISR1 0x00bc
  249. /* Host suspend counter on FPGA platform */
  250. #define REG_HOST_SUSP_CNT 0x00bc
  251. /* Efuse access protection for RTL8723 */
  252. #define REG_EFUSE_ACCESS 0x00cf
  253. #define REG_BIST_SCAN 0x00d0
  254. #define REG_BIST_RPT 0x00d4
  255. #define REG_BIST_ROM_RPT 0x00d8
  256. #define REG_USB_SIE_INTF 0x00e0
  257. #define REG_PCIE_MIO_INTF 0x00e4
  258. #define REG_PCIE_MIO_INTD 0x00e8
  259. #define REG_HPON_FSM 0x00ec
  260. #define HPON_FSM_BONDING_MASK (BIT(22) | BIT(23))
  261. #define HPON_FSM_BONDING_1T2R BIT(22)
  262. #define REG_SYS_CFG 0x00f0
  263. #define SYS_CFG_XCLK_VLD BIT(0)
  264. #define SYS_CFG_ACLK_VLD BIT(1)
  265. #define SYS_CFG_UCLK_VLD BIT(2)
  266. #define SYS_CFG_PCLK_VLD BIT(3)
  267. #define SYS_CFG_PCIRSTB BIT(4)
  268. #define SYS_CFG_V15_VLD BIT(5)
  269. #define SYS_CFG_TRP_B15V_EN BIT(7)
  270. #define SYS_CFG_SW_OFFLOAD_EN BIT(7) /* For chips with IOL support */
  271. #define SYS_CFG_SIC_IDLE BIT(8)
  272. #define SYS_CFG_BD_MAC2 BIT(9)
  273. #define SYS_CFG_BD_MAC1 BIT(10)
  274. #define SYS_CFG_IC_MACPHY_MODE BIT(11)
  275. #define SYS_CFG_CHIP_VER (BIT(12) | BIT(13) | BIT(14) | BIT(15))
  276. #define SYS_CFG_BT_FUNC BIT(16)
  277. #define SYS_CFG_VENDOR_ID BIT(19)
  278. #define SYS_CFG_VENDOR_EXT_MASK (BIT(18) | BIT(19))
  279. #define SYS_CFG_VENDOR_ID_TSMC 0
  280. #define SYS_CFG_VENDOR_ID_SMIC BIT(18)
  281. #define SYS_CFG_VENDOR_ID_UMC BIT(19)
  282. #define SYS_CFG_PAD_HWPD_IDN BIT(22)
  283. #define SYS_CFG_TRP_VAUX_EN BIT(23)
  284. #define SYS_CFG_TRP_BT_EN BIT(24)
  285. #define SYS_CFG_SPS_LDO_SEL BIT(24) /* 8192eu */
  286. #define SYS_CFG_BD_PKG_SEL BIT(25)
  287. #define SYS_CFG_BD_HCI_SEL BIT(26)
  288. #define SYS_CFG_TYPE_ID BIT(27)
  289. #define SYS_CFG_RTL_ID BIT(23) /* TestChip ID,
  290. 1:Test(RLE); 0:MP(RL) */
  291. #define SYS_CFG_SPS_SEL BIT(24) /* 1:LDO regulator mode;
  292. 0:Switching regulator mode*/
  293. #define SYS_CFG_CHIP_VERSION_MASK 0xf000 /* Bit 12 - 15 */
  294. #define SYS_CFG_CHIP_VERSION_SHIFT 12
  295. #define REG_GPIO_OUTSTS 0x00f4 /* For RTL8723 only. */
  296. #define GPIO_EFS_HCI_SEL (BIT(0) | BIT(1))
  297. #define GPIO_PAD_HCI_SEL (BIT(2) | BIT(3))
  298. #define GPIO_HCI_SEL (BIT(4) | BIT(5))
  299. #define GPIO_PKG_SEL_HCI BIT(6)
  300. #define GPIO_FEN_GPS BIT(7)
  301. #define GPIO_FEN_BT BIT(8)
  302. #define GPIO_FEN_WL BIT(9)
  303. #define GPIO_FEN_PCI BIT(10)
  304. #define GPIO_FEN_USB BIT(11)
  305. #define GPIO_BTRF_HWPDN_N BIT(12)
  306. #define GPIO_WLRF_HWPDN_N BIT(13)
  307. #define GPIO_PDN_BT_N BIT(14)
  308. #define GPIO_PDN_GPS_N BIT(15)
  309. #define GPIO_BT_CTL_HWPDN BIT(16)
  310. #define GPIO_GPS_CTL_HWPDN BIT(17)
  311. #define GPIO_PPHY_SUSB BIT(20)
  312. #define GPIO_UPHY_SUSB BIT(21)
  313. #define GPIO_PCI_SUSEN BIT(22)
  314. #define GPIO_USB_SUSEN BIT(23)
  315. #define GPIO_RF_RL_ID (BIT(31) | BIT(30) | BIT(29) | BIT(28))
  316. #define REG_SYS_CFG2 0x00fc /* 8192eu */
  317. /* 0x0100 ~ 0x01FF MACTOP General Configuration */
  318. #define REG_CR 0x0100
  319. #define CR_HCI_TXDMA_ENABLE BIT(0)
  320. #define CR_HCI_RXDMA_ENABLE BIT(1)
  321. #define CR_TXDMA_ENABLE BIT(2)
  322. #define CR_RXDMA_ENABLE BIT(3)
  323. #define CR_PROTOCOL_ENABLE BIT(4)
  324. #define CR_SCHEDULE_ENABLE BIT(5)
  325. #define CR_MAC_TX_ENABLE BIT(6)
  326. #define CR_MAC_RX_ENABLE BIT(7)
  327. #define CR_SW_BEACON_ENABLE BIT(8)
  328. #define CR_SECURITY_ENABLE BIT(9)
  329. #define CR_CALTIMER_ENABLE BIT(10)
  330. /* Media Status Register */
  331. #define REG_MSR 0x0102
  332. #define MSR_LINKTYPE_MASK 0x3
  333. #define MSR_LINKTYPE_NONE 0x0
  334. #define MSR_LINKTYPE_ADHOC 0x1
  335. #define MSR_LINKTYPE_STATION 0x2
  336. #define MSR_LINKTYPE_AP 0x3
  337. #define REG_PBP 0x0104
  338. #define PBP_PAGE_SIZE_RX_SHIFT 0
  339. #define PBP_PAGE_SIZE_TX_SHIFT 4
  340. #define PBP_PAGE_SIZE_64 0x0
  341. #define PBP_PAGE_SIZE_128 0x1
  342. #define PBP_PAGE_SIZE_256 0x2
  343. #define PBP_PAGE_SIZE_512 0x3
  344. #define PBP_PAGE_SIZE_1024 0x4
  345. #define REG_TRXDMA_CTRL 0x010c
  346. #define TRXDMA_CTRL_RXDMA_AGG_EN BIT(2)
  347. #define TRXDMA_CTRL_VOQ_SHIFT 4
  348. #define TRXDMA_CTRL_VIQ_SHIFT 6
  349. #define TRXDMA_CTRL_BEQ_SHIFT 8
  350. #define TRXDMA_CTRL_BKQ_SHIFT 10
  351. #define TRXDMA_CTRL_MGQ_SHIFT 12
  352. #define TRXDMA_CTRL_HIQ_SHIFT 14
  353. #define TRXDMA_QUEUE_LOW 1
  354. #define TRXDMA_QUEUE_NORMAL 2
  355. #define TRXDMA_QUEUE_HIGH 3
  356. #define REG_TRXFF_BNDY 0x0114
  357. #define REG_TRXFF_STATUS 0x0118
  358. #define REG_RXFF_PTR 0x011c
  359. #define REG_HIMR 0x0120
  360. #define REG_HISR 0x0124
  361. #define REG_HIMRE 0x0128
  362. #define REG_HISRE 0x012c
  363. #define REG_CPWM 0x012f
  364. #define REG_FWIMR 0x0130
  365. #define REG_FWISR 0x0134
  366. #define REG_PKTBUF_DBG_CTRL 0x0140
  367. #define REG_PKTBUF_DBG_DATA_L 0x0144
  368. #define REG_PKTBUF_DBG_DATA_H 0x0148
  369. #define REG_TC0_CTRL 0x0150
  370. #define REG_TC1_CTRL 0x0154
  371. #define REG_TC2_CTRL 0x0158
  372. #define REG_TC3_CTRL 0x015c
  373. #define REG_TC4_CTRL 0x0160
  374. #define REG_TCUNIT_BASE 0x0164
  375. #define REG_MBIST_START 0x0174
  376. #define REG_MBIST_DONE 0x0178
  377. #define REG_MBIST_FAIL 0x017c
  378. #define REG_C2HEVT_MSG_NORMAL 0x01a0
  379. /* 8192EU/8723BU/8812 */
  380. #define REG_C2HEVT_CMD_ID_8723B 0x01ae
  381. #define REG_C2HEVT_CLEAR 0x01af
  382. #define REG_C2HEVT_MSG_TEST 0x01b8
  383. #define REG_MCUTST_1 0x01c0
  384. #define REG_FMTHR 0x01c8
  385. #define REG_HMTFR 0x01cc
  386. #define REG_HMBOX_0 0x01d0
  387. #define REG_HMBOX_1 0x01d4
  388. #define REG_HMBOX_2 0x01d8
  389. #define REG_HMBOX_3 0x01dc
  390. #define REG_LLT_INIT 0x01e0
  391. #define LLT_OP_INACTIVE 0x0
  392. #define LLT_OP_WRITE (0x1 << 30)
  393. #define LLT_OP_READ (0x2 << 30)
  394. #define LLT_OP_MASK (0x3 << 30)
  395. #define REG_BB_ACCEESS_CTRL 0x01e8
  396. #define REG_BB_ACCESS_DATA 0x01ec
  397. #define REG_HMBOX_EXT0_8723B 0x01f0
  398. #define REG_HMBOX_EXT1_8723B 0x01f4
  399. #define REG_HMBOX_EXT2_8723B 0x01f8
  400. #define REG_HMBOX_EXT3_8723B 0x01fc
  401. /* 0x0200 ~ 0x027F TXDMA Configuration */
  402. #define REG_RQPN 0x0200
  403. #define RQPN_HI_PQ_SHIFT 0
  404. #define RQPN_LO_PQ_SHIFT 8
  405. #define RQPN_PUB_PQ_SHIFT 16
  406. #define RQPN_LOAD BIT(31)
  407. #define REG_FIFOPAGE 0x0204
  408. #define REG_TDECTRL 0x0208
  409. #define REG_TXDMA_OFFSET_CHK 0x020c
  410. #define TXDMA_OFFSET_DROP_DATA_EN BIT(9)
  411. #define REG_TXDMA_STATUS 0x0210
  412. #define REG_RQPN_NPQ 0x0214
  413. #define RQPN_NPQ_SHIFT 0
  414. #define RQPN_EPQ_SHIFT 16
  415. #define REG_AUTO_LLT 0x0224
  416. #define AUTO_LLT_INIT_LLT BIT(16)
  417. #define REG_DWBCN1_CTRL_8723B 0x0228
  418. /* 0x0280 ~ 0x02FF RXDMA Configuration */
  419. #define REG_RXDMA_AGG_PG_TH 0x0280 /* 0-7 : USB DMA size bits
  420. 8-14: USB DMA timeout
  421. 15 : Aggregation enable
  422. Only seems to be used
  423. on 8723bu/8192eu */
  424. #define RXDMA_USB_AGG_ENABLE BIT(31)
  425. #define REG_RXPKT_NUM 0x0284
  426. #define RXPKT_NUM_RXDMA_IDLE BIT(17)
  427. #define RXPKT_NUM_RW_RELEASE_EN BIT(18)
  428. #define REG_RXDMA_STATUS 0x0288
  429. /* Presumably only found on newer chips such as 8723bu */
  430. #define REG_RX_DMA_CTRL_8723B 0x0286
  431. #define REG_RXDMA_PRO_8723B 0x0290
  432. #define REG_RF_BB_CMD_ADDR 0x02c0
  433. #define REG_RF_BB_CMD_DATA 0x02c4
  434. /* spec version 11 */
  435. /* 0x0400 ~ 0x047F Protocol Configuration */
  436. /* 8192c, 8192d */
  437. #define REG_VOQ_INFO 0x0400
  438. #define REG_VIQ_INFO 0x0404
  439. #define REG_BEQ_INFO 0x0408
  440. #define REG_BKQ_INFO 0x040c
  441. /* 8188e, 8723a, 8812a, 8821a, 8192e, 8723b */
  442. #define REG_Q0_INFO 0x400
  443. #define REG_Q1_INFO 0x404
  444. #define REG_Q2_INFO 0x408
  445. #define REG_Q3_INFO 0x40c
  446. #define REG_MGQ_INFO 0x0410
  447. #define REG_HGQ_INFO 0x0414
  448. #define REG_BCNQ_INFO 0x0418
  449. #define REG_CPU_MGQ_INFORMATION 0x041c
  450. #define REG_FWHW_TXQ_CTRL 0x0420
  451. #define FWHW_TXQ_CTRL_AMPDU_RETRY BIT(7)
  452. #define FWHW_TXQ_CTRL_XMIT_MGMT_ACK BIT(12)
  453. #define REG_HWSEQ_CTRL 0x0423
  454. #define REG_TXPKTBUF_BCNQ_BDNY 0x0424
  455. #define REG_TXPKTBUF_MGQ_BDNY 0x0425
  456. #define REG_LIFETIME_EN 0x0426
  457. #define REG_MULTI_BCNQ_OFFSET 0x0427
  458. #define REG_SPEC_SIFS 0x0428
  459. #define SPEC_SIFS_CCK_MASK 0x00ff
  460. #define SPEC_SIFS_CCK_SHIFT 0
  461. #define SPEC_SIFS_OFDM_MASK 0xff00
  462. #define SPEC_SIFS_OFDM_SHIFT 8
  463. #define REG_RETRY_LIMIT 0x042a
  464. #define RETRY_LIMIT_LONG_SHIFT 0
  465. #define RETRY_LIMIT_LONG_MASK 0x003f
  466. #define RETRY_LIMIT_SHORT_SHIFT 8
  467. #define RETRY_LIMIT_SHORT_MASK 0x3f00
  468. #define REG_DARFRC 0x0430
  469. #define REG_RARFRC 0x0438
  470. #define REG_RESPONSE_RATE_SET 0x0440
  471. #define RESPONSE_RATE_BITMAP_ALL 0xfffff
  472. #define RESPONSE_RATE_RRSR_CCK_ONLY_1M 0xffff1
  473. #define RSR_1M BIT(0)
  474. #define RSR_2M BIT(1)
  475. #define RSR_5_5M BIT(2)
  476. #define RSR_11M BIT(3)
  477. #define RSR_6M BIT(4)
  478. #define RSR_9M BIT(5)
  479. #define RSR_12M BIT(6)
  480. #define RSR_18M BIT(7)
  481. #define RSR_24M BIT(8)
  482. #define RSR_36M BIT(9)
  483. #define RSR_48M BIT(10)
  484. #define RSR_54M BIT(11)
  485. #define RSR_MCS0 BIT(12)
  486. #define RSR_MCS1 BIT(13)
  487. #define RSR_MCS2 BIT(14)
  488. #define RSR_MCS3 BIT(15)
  489. #define RSR_MCS4 BIT(16)
  490. #define RSR_MCS5 BIT(17)
  491. #define RSR_MCS6 BIT(18)
  492. #define RSR_MCS7 BIT(19)
  493. #define RSR_RSC_LOWER_SUB_CHANNEL BIT(21) /* 0x200000 */
  494. #define RSR_RSC_UPPER_SUB_CHANNEL BIT(22) /* 0x400000 */
  495. #define RSR_RSC_BANDWIDTH_40M (RSR_RSC_UPPER_SUB_CHANNEL | \
  496. RSR_RSC_LOWER_SUB_CHANNEL)
  497. #define RSR_ACK_SHORT_PREAMBLE BIT(23)
  498. #define REG_ARFR0 0x0444
  499. #define REG_ARFR1 0x0448
  500. #define REG_ARFR2 0x044c
  501. #define REG_ARFR3 0x0450
  502. #define REG_AMPDU_MAX_TIME_8723B 0x0456
  503. #define REG_AGGLEN_LMT 0x0458
  504. #define REG_AMPDU_MIN_SPACE 0x045c
  505. #define REG_TXPKTBUF_WMAC_LBK_BF_HD 0x045d
  506. #define REG_FAST_EDCA_CTRL 0x0460
  507. #define REG_RD_RESP_PKT_TH 0x0463
  508. #define REG_INIRTS_RATE_SEL 0x0480
  509. /* 8723bu */
  510. #define REG_DATA_SUBCHANNEL 0x0483
  511. /* 8723au */
  512. #define REG_INIDATA_RATE_SEL 0x0484
  513. /* MACID_SLEEP_1/3 for 8723b, 8192e, 8812a, 8821a */
  514. #define REG_MACID_SLEEP_3_8732B 0x0484
  515. #define REG_MACID_SLEEP_1_8732B 0x0488
  516. #define REG_POWER_STATUS 0x04a4
  517. #define REG_POWER_STAGE1 0x04b4
  518. #define REG_POWER_STAGE2 0x04b8
  519. #define REG_AMPDU_BURST_MODE_8723B 0x04bc
  520. #define REG_PKT_VO_VI_LIFE_TIME 0x04c0
  521. #define REG_PKT_BE_BK_LIFE_TIME 0x04c2
  522. #define REG_STBC_SETTING 0x04c4
  523. #define REG_QUEUE_CTRL 0x04c6
  524. #define REG_HT_SINGLE_AMPDU_8723B 0x04c7
  525. #define REG_PROT_MODE_CTRL 0x04c8
  526. #define REG_MAX_AGGR_NUM 0x04ca
  527. #define REG_RTS_MAX_AGGR_NUM 0x04cb
  528. #define REG_BAR_MODE_CTRL 0x04cc
  529. #define REG_RA_TRY_RATE_AGG_LMT 0x04cf
  530. /* MACID_DROP for 8723a */
  531. #define REG_MACID_DROP_8732A 0x04d0
  532. /* EARLY_MODE_CONTROL 8188e */
  533. #define REG_EARLY_MODE_CONTROL_8188E 0x04d0
  534. /* MACID_SLEEP_2 for 8723b, 8192e, 8812a, 8821a */
  535. #define REG_MACID_SLEEP_2_8732B 0x04d0
  536. #define REG_MACID_SLEEP 0x04d4
  537. #define REG_NQOS_SEQ 0x04dc
  538. #define REG_QOS_SEQ 0x04de
  539. #define REG_NEED_CPU_HANDLE 0x04e0
  540. #define REG_PKT_LOSE_RPT 0x04e1
  541. #define REG_PTCL_ERR_STATUS 0x04e2
  542. #define REG_TX_REPORT_CTRL 0x04ec
  543. #define TX_REPORT_CTRL_TIMER_ENABLE BIT(1)
  544. #define REG_TX_REPORT_TIME 0x04f0
  545. #define REG_DUMMY 0x04fc
  546. /* 0x0500 ~ 0x05FF EDCA Configuration */
  547. #define REG_EDCA_VO_PARAM 0x0500
  548. #define REG_EDCA_VI_PARAM 0x0504
  549. #define REG_EDCA_BE_PARAM 0x0508
  550. #define REG_EDCA_BK_PARAM 0x050c
  551. #define EDCA_PARAM_ECW_MIN_SHIFT 8
  552. #define EDCA_PARAM_ECW_MAX_SHIFT 12
  553. #define EDCA_PARAM_TXOP_SHIFT 16
  554. #define REG_BEACON_TCFG 0x0510
  555. #define REG_PIFS 0x0512
  556. #define REG_RDG_PIFS 0x0513
  557. #define REG_SIFS_CCK 0x0514
  558. #define REG_SIFS_OFDM 0x0516
  559. #define REG_TSFTR_SYN_OFFSET 0x0518
  560. #define REG_AGGR_BREAK_TIME 0x051a
  561. #define REG_SLOT 0x051b
  562. #define REG_TX_PTCL_CTRL 0x0520
  563. #define REG_TXPAUSE 0x0522
  564. #define REG_DIS_TXREQ_CLR 0x0523
  565. #define REG_RD_CTRL 0x0524
  566. #define REG_TBTT_PROHIBIT 0x0540
  567. #define REG_RD_NAV_NXT 0x0544
  568. #define REG_NAV_PROT_LEN 0x0546
  569. #define REG_BEACON_CTRL 0x0550
  570. #define REG_BEACON_CTRL_1 0x0551
  571. #define BEACON_ATIM BIT(0)
  572. #define BEACON_CTRL_MBSSID BIT(1)
  573. #define BEACON_CTRL_TX_BEACON_RPT BIT(2)
  574. #define BEACON_FUNCTION_ENABLE BIT(3)
  575. #define BEACON_DISABLE_TSF_UPDATE BIT(4)
  576. #define REG_MBID_NUM 0x0552
  577. #define REG_DUAL_TSF_RST 0x0553
  578. #define DUAL_TSF_RESET_TSF0 BIT(0)
  579. #define DUAL_TSF_RESET_TSF1 BIT(1)
  580. #define DUAL_TSF_RESET_P2P BIT(4)
  581. #define DUAL_TSF_TX_OK BIT(5)
  582. /* The same as REG_MBSSID_BCN_SPACE */
  583. #define REG_BCN_INTERVAL 0x0554
  584. #define REG_MBSSID_BCN_SPACE 0x0554
  585. #define REG_DRIVER_EARLY_INT 0x0558
  586. #define DRIVER_EARLY_INT_TIME 5
  587. #define REG_BEACON_DMA_TIME 0x0559
  588. #define BEACON_DMA_ATIME_INT_TIME 2
  589. #define REG_ATIMWND 0x055a
  590. #define REG_USTIME_TSF_8723B 0x055c
  591. #define REG_BCN_MAX_ERR 0x055d
  592. #define REG_RXTSF_OFFSET_CCK 0x055e
  593. #define REG_RXTSF_OFFSET_OFDM 0x055f
  594. #define REG_TSFTR 0x0560
  595. #define REG_TSFTR1 0x0568
  596. #define REG_INIT_TSFTR 0x0564
  597. #define REG_ATIMWND_1 0x0570
  598. #define REG_PSTIMER 0x0580
  599. #define REG_TIMER0 0x0584
  600. #define REG_TIMER1 0x0588
  601. #define REG_ACM_HW_CTRL 0x05c0
  602. #define ACM_HW_CTRL_BK BIT(0)
  603. #define ACM_HW_CTRL_BE BIT(1)
  604. #define ACM_HW_CTRL_VI BIT(2)
  605. #define ACM_HW_CTRL_VO BIT(3)
  606. #define REG_ACM_RST_CTRL 0x05c1
  607. #define REG_ACMAVG 0x05c2
  608. #define REG_VO_ADMTIME 0x05c4
  609. #define REG_VI_ADMTIME 0x05c6
  610. #define REG_BE_ADMTIME 0x05c8
  611. #define REG_EDCA_RANDOM_GEN 0x05cc
  612. #define REG_SCH_TXCMD 0x05d0
  613. /* define REG_FW_TSF_SYNC_CNT 0x04a0 */
  614. #define REG_SCH_TX_CMD 0x05f8
  615. #define REG_FW_RESET_TSF_CNT_1 0x05fc
  616. #define REG_FW_RESET_TSF_CNT_0 0x05fd
  617. #define REG_FW_BCN_DIS_CNT 0x05fe
  618. /* 0x0600 ~ 0x07FF WMAC Configuration */
  619. #define REG_APSD_CTRL 0x0600
  620. #define APSD_CTRL_OFF BIT(6)
  621. #define APSD_CTRL_OFF_STATUS BIT(7)
  622. #define REG_BW_OPMODE 0x0603
  623. #define BW_OPMODE_20MHZ BIT(2)
  624. #define BW_OPMODE_5G BIT(1)
  625. #define BW_OPMODE_11J BIT(0)
  626. #define REG_TCR 0x0604
  627. /* Receive Configuration Register */
  628. #define REG_RCR 0x0608
  629. #define RCR_ACCEPT_AP BIT(0) /* Accept all unicast packet */
  630. #define RCR_ACCEPT_PHYS_MATCH BIT(1) /* Accept phys match packet */
  631. #define RCR_ACCEPT_MCAST BIT(2)
  632. #define RCR_ACCEPT_BCAST BIT(3)
  633. #define RCR_ACCEPT_ADDR3 BIT(4) /* Accept address 3 match
  634. packet */
  635. #define RCR_ACCEPT_PM BIT(5) /* Accept power management
  636. packet */
  637. #define RCR_CHECK_BSSID_MATCH BIT(6) /* Accept BSSID match packet */
  638. #define RCR_CHECK_BSSID_BEACON BIT(7) /* Accept BSSID match packet
  639. (Rx beacon, probe rsp) */
  640. #define RCR_ACCEPT_CRC32 BIT(8) /* Accept CRC32 error packet */
  641. #define RCR_ACCEPT_ICV BIT(9) /* Accept ICV error packet */
  642. #define RCR_ACCEPT_DATA_FRAME BIT(11) /* Accept all data pkt or use
  643. REG_RXFLTMAP2 */
  644. #define RCR_ACCEPT_CTRL_FRAME BIT(12) /* Accept all control pkt or use
  645. REG_RXFLTMAP1 */
  646. #define RCR_ACCEPT_MGMT_FRAME BIT(13) /* Accept all mgmt pkt or use
  647. REG_RXFLTMAP0 */
  648. #define RCR_HTC_LOC_CTRL BIT(14) /* MFC<--HTC=1 MFC-->HTC=0 */
  649. #define RCR_UC_DATA_PKT_INT_ENABLE BIT(16) /* Enable unicast data packet
  650. interrupt */
  651. #define RCR_BM_DATA_PKT_INT_ENABLE BIT(17) /* Enable broadcast data packet
  652. interrupt */
  653. #define RCR_TIM_PARSER_ENABLE BIT(18) /* Enable RX beacon TIM parser*/
  654. #define RCR_MFBEN BIT(22)
  655. #define RCR_LSIG_ENABLE BIT(23) /* Enable LSIG TXOP Protection
  656. function. Search KEYCAM for
  657. each rx packet to check if
  658. LSIGEN bit is set. */
  659. #define RCR_MULTI_BSSID_ENABLE BIT(24) /* Enable Multiple BssId */
  660. #define RCR_FORCE_ACK BIT(26)
  661. #define RCR_ACCEPT_BA_SSN BIT(27) /* Accept BA SSN */
  662. #define RCR_APPEND_PHYSTAT BIT(28)
  663. #define RCR_APPEND_ICV BIT(29)
  664. #define RCR_APPEND_MIC BIT(30)
  665. #define RCR_APPEND_FCS BIT(31) /* WMAC append FCS after */
  666. #define REG_RX_PKT_LIMIT 0x060c
  667. #define REG_RX_DLK_TIME 0x060d
  668. #define REG_RX_DRVINFO_SZ 0x060f
  669. #define REG_MACID 0x0610
  670. #define REG_BSSID 0x0618
  671. #define REG_MAR 0x0620
  672. #define REG_MBIDCAMCFG 0x0628
  673. #define REG_USTIME_EDCA 0x0638
  674. #define REG_MAC_SPEC_SIFS 0x063a
  675. /* 20100719 Joseph: Hardware register definition change. (HW datasheet v54) */
  676. /* [15:8]SIFS_R2T_OFDM, [7:0]SIFS_R2T_CCK */
  677. #define REG_R2T_SIFS 0x063c
  678. /* [15:8]SIFS_T2T_OFDM, [7:0]SIFS_T2T_CCK */
  679. #define REG_T2T_SIFS 0x063e
  680. #define REG_ACKTO 0x0640
  681. #define REG_CTS2TO 0x0641
  682. #define REG_EIFS 0x0642
  683. /* WMA, BA, CCX */
  684. #define REG_NAV_CTRL 0x0650
  685. /* In units of 128us */
  686. #define REG_NAV_UPPER 0x0652
  687. #define NAV_UPPER_UNIT 128
  688. #define REG_BACAMCMD 0x0654
  689. #define REG_BACAMCONTENT 0x0658
  690. #define REG_LBDLY 0x0660
  691. #define REG_FWDLY 0x0661
  692. #define REG_RXERR_RPT 0x0664
  693. #define REG_WMAC_TRXPTCL_CTL 0x0668
  694. #define WMAC_TRXPTCL_CTL_BW_MASK (BIT(7) | BIT(8))
  695. #define WMAC_TRXPTCL_CTL_BW_20 0
  696. #define WMAC_TRXPTCL_CTL_BW_40 BIT(7)
  697. #define WMAC_TRXPTCL_CTL_BW_80 BIT(8)
  698. /* Security */
  699. #define REG_CAM_CMD 0x0670
  700. #define CAM_CMD_POLLING BIT(31)
  701. #define CAM_CMD_WRITE BIT(16)
  702. #define CAM_CMD_KEY_SHIFT 3
  703. #define REG_CAM_WRITE 0x0674
  704. #define CAM_WRITE_VALID BIT(15)
  705. #define REG_CAM_READ 0x0678
  706. #define REG_CAM_DEBUG 0x067c
  707. #define REG_SECURITY_CFG 0x0680
  708. #define SEC_CFG_TX_USE_DEFKEY BIT(0)
  709. #define SEC_CFG_RX_USE_DEFKEY BIT(1)
  710. #define SEC_CFG_TX_SEC_ENABLE BIT(2)
  711. #define SEC_CFG_RX_SEC_ENABLE BIT(3)
  712. #define SEC_CFG_SKBYA2 BIT(4)
  713. #define SEC_CFG_NO_SKMC BIT(5)
  714. #define SEC_CFG_TXBC_USE_DEFKEY BIT(6)
  715. #define SEC_CFG_RXBC_USE_DEFKEY BIT(7)
  716. /* Power */
  717. #define REG_WOW_CTRL 0x0690
  718. #define REG_PSSTATUS 0x0691
  719. #define REG_PS_RX_INFO 0x0692
  720. #define REG_LPNAV_CTRL 0x0694
  721. #define REG_WKFMCAM_CMD 0x0698
  722. #define REG_WKFMCAM_RWD 0x069c
  723. /*
  724. * RX Filters: each bit corresponds to the numerical value of the subtype.
  725. * If it is set the subtype frame type is passed. The filter is only used when
  726. * the RCR_ACCEPT_DATA_FRAME, RCR_ACCEPT_CTRL_FRAME, RCR_ACCEPT_MGMT_FRAME bit
  727. * in the RCR are low.
  728. *
  729. * Example: Beacon subtype is binary 1000 which is decimal 8 so we have to set
  730. * bit 8 (0x100) in REG_RXFLTMAP0 to enable reception.
  731. */
  732. #define REG_RXFLTMAP0 0x06a0 /* Management frames */
  733. #define REG_RXFLTMAP1 0x06a2 /* Control frames */
  734. #define REG_RXFLTMAP2 0x06a4 /* Data frames */
  735. #define REG_BCN_PSR_RPT 0x06a8
  736. #define REG_CALB32K_CTRL 0x06ac
  737. #define REG_PKT_MON_CTRL 0x06b4
  738. #define REG_BT_COEX_TABLE1 0x06c0
  739. #define REG_BT_COEX_TABLE2 0x06c4
  740. #define REG_BT_COEX_TABLE3 0x06c8
  741. #define REG_BT_COEX_TABLE4 0x06cc
  742. #define REG_WMAC_RESP_TXINFO 0x06d8
  743. #define REG_MACID1 0x0700
  744. #define REG_BSSID1 0x0708
  745. /*
  746. * This seems to be 8723bu specific
  747. */
  748. #define REG_BT_CONTROL_8723BU 0x0764
  749. #define BT_CONTROL_BT_GRANT BIT(12)
  750. #define REG_WLAN_ACT_CONTROL_8723B 0x076e
  751. #define REG_FPGA0_RF_MODE 0x0800
  752. #define FPGA_RF_MODE BIT(0)
  753. #define FPGA_RF_MODE_JAPAN BIT(1)
  754. #define FPGA_RF_MODE_CCK BIT(24)
  755. #define FPGA_RF_MODE_OFDM BIT(25)
  756. #define REG_FPGA0_TX_INFO 0x0804
  757. #define FPGA0_TX_INFO_OFDM_PATH_A BIT(0)
  758. #define FPGA0_TX_INFO_OFDM_PATH_B BIT(1)
  759. #define FPGA0_TX_INFO_OFDM_PATH_C BIT(2)
  760. #define FPGA0_TX_INFO_OFDM_PATH_D BIT(3)
  761. #define REG_FPGA0_PSD_FUNC 0x0808
  762. #define REG_FPGA0_TX_GAIN 0x080c
  763. #define REG_FPGA0_RF_TIMING1 0x0810
  764. #define REG_FPGA0_RF_TIMING2 0x0814
  765. #define REG_FPGA0_POWER_SAVE 0x0818
  766. #define FPGA0_PS_LOWER_CHANNEL BIT(26)
  767. #define FPGA0_PS_UPPER_CHANNEL BIT(27)
  768. #define REG_FPGA0_XA_HSSI_PARM1 0x0820 /* RF 3 wire register */
  769. #define FPGA0_HSSI_PARM1_PI BIT(8)
  770. #define REG_FPGA0_XA_HSSI_PARM2 0x0824
  771. #define REG_FPGA0_XB_HSSI_PARM1 0x0828
  772. #define REG_FPGA0_XB_HSSI_PARM2 0x082c
  773. #define FPGA0_HSSI_3WIRE_DATA_LEN 0x800
  774. #define FPGA0_HSSI_3WIRE_ADDR_LEN 0x400
  775. #define FPGA0_HSSI_PARM2_ADDR_SHIFT 23
  776. #define FPGA0_HSSI_PARM2_ADDR_MASK 0x7f800000 /* 0xff << 23 */
  777. #define FPGA0_HSSI_PARM2_CCK_HIGH_PWR BIT(9)
  778. #define FPGA0_HSSI_PARM2_EDGE_READ BIT(31)
  779. #define REG_TX_AGC_B_RATE18_06 0x0830
  780. #define REG_TX_AGC_B_RATE54_24 0x0834
  781. #define REG_TX_AGC_B_CCK1_55_MCS32 0x0838
  782. #define REG_TX_AGC_B_MCS03_MCS00 0x083c
  783. #define REG_FPGA0_XA_LSSI_PARM 0x0840
  784. #define REG_FPGA0_XB_LSSI_PARM 0x0844
  785. #define FPGA0_LSSI_PARM_ADDR_SHIFT 20
  786. #define FPGA0_LSSI_PARM_ADDR_MASK 0x0ff00000
  787. #define FPGA0_LSSI_PARM_DATA_MASK 0x000fffff
  788. #define REG_TX_AGC_B_MCS07_MCS04 0x0848
  789. #define REG_TX_AGC_B_MCS11_MCS08 0x084c
  790. #define REG_FPGA0_XCD_SWITCH_CTRL 0x085c
  791. #define REG_FPGA0_XA_RF_INT_OE 0x0860 /* RF Channel switch */
  792. #define REG_FPGA0_XB_RF_INT_OE 0x0864
  793. #define FPGA0_INT_OE_ANTENNA_AB_OPEN 0x000
  794. #define FPGA0_INT_OE_ANTENNA_A BIT(8)
  795. #define FPGA0_INT_OE_ANTENNA_B BIT(9)
  796. #define FPGA0_INT_OE_ANTENNA_MASK (FPGA0_INT_OE_ANTENNA_A | \
  797. FPGA0_INT_OE_ANTENNA_B)
  798. #define REG_TX_AGC_B_MCS15_MCS12 0x0868
  799. #define REG_TX_AGC_B_CCK11_A_CCK2_11 0x086c
  800. #define REG_FPGA0_XAB_RF_SW_CTRL 0x0870
  801. #define REG_FPGA0_XA_RF_SW_CTRL 0x0870 /* 16 bit */
  802. #define REG_FPGA0_XB_RF_SW_CTRL 0x0872 /* 16 bit */
  803. #define REG_FPGA0_XCD_RF_SW_CTRL 0x0874
  804. #define REG_FPGA0_XC_RF_SW_CTRL 0x0874 /* 16 bit */
  805. #define REG_FPGA0_XD_RF_SW_CTRL 0x0876 /* 16 bit */
  806. #define FPGA0_RF_3WIRE_DATA BIT(0)
  807. #define FPGA0_RF_3WIRE_CLOC BIT(1)
  808. #define FPGA0_RF_3WIRE_LOAD BIT(2)
  809. #define FPGA0_RF_3WIRE_RW BIT(3)
  810. #define FPGA0_RF_3WIRE_MASK 0xf
  811. #define FPGA0_RF_RFENV BIT(4)
  812. #define FPGA0_RF_TRSW BIT(5) /* Useless now */
  813. #define FPGA0_RF_TRSWB BIT(6)
  814. #define FPGA0_RF_ANTSW BIT(8)
  815. #define FPGA0_RF_ANTSWB BIT(9)
  816. #define FPGA0_RF_PAPE BIT(10)
  817. #define FPGA0_RF_PAPE5G BIT(11)
  818. #define FPGA0_RF_BD_CTRL_SHIFT 16
  819. #define REG_FPGA0_XAB_RF_PARM 0x0878 /* Antenna select path in ODM */
  820. #define REG_FPGA0_XA_RF_PARM 0x0878 /* 16 bit */
  821. #define REG_FPGA0_XB_RF_PARM 0x087a /* 16 bit */
  822. #define REG_FPGA0_XCD_RF_PARM 0x087c
  823. #define REG_FPGA0_XC_RF_PARM 0x087c /* 16 bit */
  824. #define REG_FPGA0_XD_RF_PARM 0x087e /* 16 bit */
  825. #define FPGA0_RF_PARM_RFA_ENABLE BIT(1)
  826. #define FPGA0_RF_PARM_RFB_ENABLE BIT(17)
  827. #define FPGA0_RF_PARM_CLK_GATE BIT(31)
  828. #define REG_FPGA0_ANALOG1 0x0880
  829. #define REG_FPGA0_ANALOG2 0x0884
  830. #define FPGA0_ANALOG2_20MHZ BIT(10)
  831. #define REG_FPGA0_ANALOG3 0x0888
  832. #define REG_FPGA0_ANALOG4 0x088c
  833. #define REG_NHM_TH9_TH10_8723B 0x0890
  834. #define REG_NHM_TIMER_8723B 0x0894
  835. #define REG_NHM_TH3_TO_TH0_8723B 0x0898
  836. #define REG_NHM_TH7_TO_TH4_8723B 0x089c
  837. #define REG_FPGA0_XA_LSSI_READBACK 0x08a0 /* Tranceiver LSSI Readback */
  838. #define REG_FPGA0_XB_LSSI_READBACK 0x08a4
  839. #define REG_HSPI_XA_READBACK 0x08b8 /* Transceiver A HSPI read */
  840. #define REG_HSPI_XB_READBACK 0x08bc /* Transceiver B HSPI read */
  841. #define REG_FPGA1_RF_MODE 0x0900
  842. #define REG_FPGA1_TX_INFO 0x090c
  843. #define REG_DPDT_CTRL 0x092c /* 8723BU */
  844. #define REG_RFE_CTRL_ANTA_SRC 0x0930 /* 8723BU */
  845. #define REG_RFE_PATH_SELECT 0x0940 /* 8723BU */
  846. #define REG_RFE_BUFFER 0x0944 /* 8723BU */
  847. #define REG_S0S1_PATH_SWITCH 0x0948 /* 8723BU */
  848. #define REG_CCK0_SYSTEM 0x0a00
  849. #define CCK0_SIDEBAND BIT(4)
  850. #define REG_CCK0_AFE_SETTING 0x0a04
  851. #define CCK0_AFE_RX_MASK 0x0f000000
  852. #define CCK0_AFE_RX_ANT_AB BIT(24)
  853. #define CCK0_AFE_RX_ANT_A 0
  854. #define CCK0_AFE_RX_ANT_B (BIT(24) | BIT(26))
  855. #define REG_CONFIG_ANT_A 0x0b68
  856. #define REG_CONFIG_ANT_B 0x0b6c
  857. #define REG_OFDM0_TRX_PATH_ENABLE 0x0c04
  858. #define OFDM_RF_PATH_RX_MASK 0x0f
  859. #define OFDM_RF_PATH_RX_A BIT(0)
  860. #define OFDM_RF_PATH_RX_B BIT(1)
  861. #define OFDM_RF_PATH_RX_C BIT(2)
  862. #define OFDM_RF_PATH_RX_D BIT(3)
  863. #define OFDM_RF_PATH_TX_MASK 0xf0
  864. #define OFDM_RF_PATH_TX_A BIT(4)
  865. #define OFDM_RF_PATH_TX_B BIT(5)
  866. #define OFDM_RF_PATH_TX_C BIT(6)
  867. #define OFDM_RF_PATH_TX_D BIT(7)
  868. #define REG_OFDM0_TR_MUX_PAR 0x0c08
  869. #define REG_OFDM0_FA_RSTC 0x0c0c
  870. #define REG_OFDM0_XA_RX_IQ_IMBALANCE 0x0c14
  871. #define REG_OFDM0_XB_RX_IQ_IMBALANCE 0x0c1c
  872. #define REG_OFDM0_ENERGY_CCA_THRES 0x0c4c
  873. #define REG_OFDM0_RX_D_SYNC_PATH 0x0c40
  874. #define OFDM0_SYNC_PATH_NOTCH_FILTER BIT(1)
  875. #define REG_OFDM0_XA_AGC_CORE1 0x0c50
  876. #define REG_OFDM0_XA_AGC_CORE2 0x0c54
  877. #define REG_OFDM0_XB_AGC_CORE1 0x0c58
  878. #define REG_OFDM0_XB_AGC_CORE2 0x0c5c
  879. #define REG_OFDM0_XC_AGC_CORE1 0x0c60
  880. #define REG_OFDM0_XC_AGC_CORE2 0x0c64
  881. #define REG_OFDM0_XD_AGC_CORE1 0x0c68
  882. #define REG_OFDM0_XD_AGC_CORE2 0x0c6c
  883. #define OFDM0_X_AGC_CORE1_IGI_MASK 0x0000007F
  884. #define REG_OFDM0_AGC_PARM1 0x0c70
  885. #define REG_OFDM0_AGCR_SSI_TABLE 0x0c78
  886. #define REG_OFDM0_XA_TX_IQ_IMBALANCE 0x0c80
  887. #define REG_OFDM0_XB_TX_IQ_IMBALANCE 0x0c88
  888. #define REG_OFDM0_XC_TX_IQ_IMBALANCE 0x0c90
  889. #define REG_OFDM0_XD_TX_IQ_IMBALANCE 0x0c98
  890. #define REG_OFDM0_XC_TX_AFE 0x0c94
  891. #define REG_OFDM0_XD_TX_AFE 0x0c9c
  892. #define REG_OFDM0_RX_IQ_EXT_ANTA 0x0ca0
  893. /* 8723bu */
  894. #define REG_OFDM0_TX_PSDO_NOISE_WEIGHT 0x0ce4
  895. #define REG_OFDM1_LSTF 0x0d00
  896. #define OFDM_LSTF_PRIME_CH_LOW BIT(10)
  897. #define OFDM_LSTF_PRIME_CH_HIGH BIT(11)
  898. #define OFDM_LSTF_PRIME_CH_MASK (OFDM_LSTF_PRIME_CH_LOW | \
  899. OFDM_LSTF_PRIME_CH_HIGH)
  900. #define OFDM_LSTF_CONTINUE_TX BIT(28)
  901. #define OFDM_LSTF_SINGLE_CARRIER BIT(29)
  902. #define OFDM_LSTF_SINGLE_TONE BIT(30)
  903. #define OFDM_LSTF_MASK 0x70000000
  904. #define REG_OFDM1_TRX_PATH_ENABLE 0x0d04
  905. #define REG_TX_AGC_A_RATE18_06 0x0e00
  906. #define REG_TX_AGC_A_RATE54_24 0x0e04
  907. #define REG_TX_AGC_A_CCK1_MCS32 0x0e08
  908. #define REG_TX_AGC_A_MCS03_MCS00 0x0e10
  909. #define REG_TX_AGC_A_MCS07_MCS04 0x0e14
  910. #define REG_TX_AGC_A_MCS11_MCS08 0x0e18
  911. #define REG_TX_AGC_A_MCS15_MCS12 0x0e1c
  912. #define REG_FPGA0_IQK 0x0e28
  913. #define REG_TX_IQK_TONE_A 0x0e30
  914. #define REG_RX_IQK_TONE_A 0x0e34
  915. #define REG_TX_IQK_PI_A 0x0e38
  916. #define REG_RX_IQK_PI_A 0x0e3c
  917. #define REG_TX_IQK 0x0e40
  918. #define REG_RX_IQK 0x0e44
  919. #define REG_IQK_AGC_PTS 0x0e48
  920. #define REG_IQK_AGC_RSP 0x0e4c
  921. #define REG_TX_IQK_TONE_B 0x0e50
  922. #define REG_RX_IQK_TONE_B 0x0e54
  923. #define REG_TX_IQK_PI_B 0x0e58
  924. #define REG_RX_IQK_PI_B 0x0e5c
  925. #define REG_IQK_AGC_CONT 0x0e60
  926. #define REG_BLUETOOTH 0x0e6c
  927. #define REG_RX_WAIT_CCA 0x0e70
  928. #define REG_TX_CCK_RFON 0x0e74
  929. #define REG_TX_CCK_BBON 0x0e78
  930. #define REG_TX_OFDM_RFON 0x0e7c
  931. #define REG_TX_OFDM_BBON 0x0e80
  932. #define REG_TX_TO_RX 0x0e84
  933. #define REG_TX_TO_TX 0x0e88
  934. #define REG_RX_CCK 0x0e8c
  935. #define REG_TX_POWER_BEFORE_IQK_A 0x0e94
  936. #define REG_TX_POWER_AFTER_IQK_A 0x0e9c
  937. #define REG_RX_POWER_BEFORE_IQK_A 0x0ea0
  938. #define REG_RX_POWER_BEFORE_IQK_A_2 0x0ea4
  939. #define REG_RX_POWER_AFTER_IQK_A 0x0ea8
  940. #define REG_RX_POWER_AFTER_IQK_A_2 0x0eac
  941. #define REG_TX_POWER_BEFORE_IQK_B 0x0eb4
  942. #define REG_TX_POWER_AFTER_IQK_B 0x0ebc
  943. #define REG_RX_POWER_BEFORE_IQK_B 0x0ec0
  944. #define REG_RX_POWER_BEFORE_IQK_B_2 0x0ec4
  945. #define REG_RX_POWER_AFTER_IQK_B 0x0ec8
  946. #define REG_RX_POWER_AFTER_IQK_B_2 0x0ecc
  947. #define REG_RX_OFDM 0x0ed0
  948. #define REG_RX_WAIT_RIFS 0x0ed4
  949. #define REG_RX_TO_RX 0x0ed8
  950. #define REG_STANDBY 0x0edc
  951. #define REG_SLEEP 0x0ee0
  952. #define REG_PMPD_ANAEN 0x0eec
  953. #define REG_FW_START_ADDRESS 0x1000
  954. #define REG_USB_INFO 0xfe17
  955. #define REG_USB_HIMR 0xfe38
  956. #define USB_HIMR_TIMEOUT2 BIT(31)
  957. #define USB_HIMR_TIMEOUT1 BIT(30)
  958. #define USB_HIMR_PSTIMEOUT BIT(29)
  959. #define USB_HIMR_GTINT4 BIT(28)
  960. #define USB_HIMR_GTINT3 BIT(27)
  961. #define USB_HIMR_TXBCNERR BIT(26)
  962. #define USB_HIMR_TXBCNOK BIT(25)
  963. #define USB_HIMR_TSF_BIT32_TOGGLE BIT(24)
  964. #define USB_HIMR_BCNDMAINT3 BIT(23)
  965. #define USB_HIMR_BCNDMAINT2 BIT(22)
  966. #define USB_HIMR_BCNDMAINT1 BIT(21)
  967. #define USB_HIMR_BCNDMAINT0 BIT(20)
  968. #define USB_HIMR_BCNDOK3 BIT(19)
  969. #define USB_HIMR_BCNDOK2 BIT(18)
  970. #define USB_HIMR_BCNDOK1 BIT(17)
  971. #define USB_HIMR_BCNDOK0 BIT(16)
  972. #define USB_HIMR_HSISR_IND BIT(15)
  973. #define USB_HIMR_BCNDMAINT_E BIT(14)
  974. /* RSVD BIT(13) */
  975. #define USB_HIMR_CTW_END BIT(12)
  976. /* RSVD BIT(11) */
  977. #define USB_HIMR_C2HCMD BIT(10)
  978. #define USB_HIMR_CPWM2 BIT(9)
  979. #define USB_HIMR_CPWM BIT(8)
  980. #define USB_HIMR_HIGHDOK BIT(7) /* High Queue DMA OK
  981. Interrupt */
  982. #define USB_HIMR_MGNTDOK BIT(6) /* Management Queue DMA OK
  983. Interrupt */
  984. #define USB_HIMR_BKDOK BIT(5) /* AC_BK DMA OK Interrupt */
  985. #define USB_HIMR_BEDOK BIT(4) /* AC_BE DMA OK Interrupt */
  986. #define USB_HIMR_VIDOK BIT(3) /* AC_VI DMA OK Interrupt */
  987. #define USB_HIMR_VODOK BIT(2) /* AC_VO DMA Interrupt */
  988. #define USB_HIMR_RDU BIT(1) /* Receive Descriptor
  989. Unavailable */
  990. #define USB_HIMR_ROK BIT(0) /* Receive DMA OK Interrupt */
  991. #define REG_USB_SPECIAL_OPTION 0xfe55
  992. #define USB_SPEC_USB_AGG_ENABLE BIT(3) /* Enable USB aggregation */
  993. #define USB_SPEC_INT_BULK_SELECT BIT(4) /* Use interrupt endpoint to
  994. deliver interrupt packet.
  995. 0: Use int, 1: use bulk */
  996. #define REG_USB_HRPWM 0xfe58
  997. #define REG_USB_DMA_AGG_TO 0xfe5b
  998. #define REG_USB_AGG_TIMEOUT 0xfe5c
  999. #define REG_USB_AGG_THRESH 0xfe5d
  1000. #define REG_NORMAL_SIE_VID 0xfe60 /* 0xfe60 - 0xfe61 */
  1001. #define REG_NORMAL_SIE_PID 0xfe62 /* 0xfe62 - 0xfe63 */
  1002. #define REG_NORMAL_SIE_OPTIONAL 0xfe64
  1003. #define REG_NORMAL_SIE_EP 0xfe65 /* 0xfe65 - 0xfe67 */
  1004. #define REG_NORMAL_SIE_EP_TX 0xfe66
  1005. #define NORMAL_SIE_EP_TX_HIGH_MASK 0x000f
  1006. #define NORMAL_SIE_EP_TX_NORMAL_MASK 0x00f0
  1007. #define NORMAL_SIE_EP_TX_LOW_MASK 0x0f00
  1008. #define REG_NORMAL_SIE_PHY 0xfe68 /* 0xfe68 - 0xfe6b */
  1009. #define REG_NORMAL_SIE_OPTIONAL2 0xfe6c
  1010. #define REG_NORMAL_SIE_GPS_EP 0xfe6d /* RTL8723 only */
  1011. #define REG_NORMAL_SIE_MAC_ADDR 0xfe70 /* 0xfe70 - 0xfe75 */
  1012. #define REG_NORMAL_SIE_STRING 0xfe80 /* 0xfe80 - 0xfedf */
  1013. /* RF6052 registers */
  1014. #define RF6052_REG_AC 0x00
  1015. #define RF6052_REG_IQADJ_G1 0x01
  1016. #define RF6052_REG_IQADJ_G2 0x02
  1017. #define RF6052_REG_BS_PA_APSET_G1_G4 0x03
  1018. #define RF6052_REG_BS_PA_APSET_G5_G8 0x04
  1019. #define RF6052_REG_POW_TRSW 0x05
  1020. #define RF6052_REG_GAIN_RX 0x06
  1021. #define RF6052_REG_GAIN_TX 0x07
  1022. #define RF6052_REG_TXM_IDAC 0x08
  1023. #define RF6052_REG_IPA_G 0x09
  1024. #define RF6052_REG_TXBIAS_G 0x0a
  1025. #define RF6052_REG_TXPA_AG 0x0b
  1026. #define RF6052_REG_IPA_A 0x0c
  1027. #define RF6052_REG_TXBIAS_A 0x0d
  1028. #define RF6052_REG_BS_PA_APSET_G9_G11 0x0e
  1029. #define RF6052_REG_BS_IQGEN 0x0f
  1030. #define RF6052_REG_MODE1 0x10
  1031. #define RF6052_REG_MODE2 0x11
  1032. #define RF6052_REG_RX_AGC_HP 0x12
  1033. #define RF6052_REG_TX_AGC 0x13
  1034. #define RF6052_REG_BIAS 0x14
  1035. #define RF6052_REG_IPA 0x15
  1036. #define RF6052_REG_TXBIAS 0x16
  1037. #define RF6052_REG_POW_ABILITY 0x17
  1038. #define RF6052_REG_MODE_AG 0x18 /* RF channel and BW switch */
  1039. #define MODE_AG_CHANNEL_MASK 0x3ff
  1040. #define MODE_AG_CHANNEL_20MHZ BIT(10)
  1041. #define MODE_AG_BW_MASK (BIT(10) | BIT(11))
  1042. #define MODE_AG_BW_20MHZ_8723B (BIT(10) | BIT(11))
  1043. #define MODE_AG_BW_40MHZ_8723B BIT(10)
  1044. #define MODE_AG_BW_80MHZ_8723B 0
  1045. #define RF6052_REG_TOP 0x19
  1046. #define RF6052_REG_RX_G1 0x1a
  1047. #define RF6052_REG_RX_G2 0x1b
  1048. #define RF6052_REG_RX_BB2 0x1c
  1049. #define RF6052_REG_RX_BB1 0x1d
  1050. #define RF6052_REG_RCK1 0x1e
  1051. #define RF6052_REG_RCK2 0x1f
  1052. #define RF6052_REG_TX_G1 0x20
  1053. #define RF6052_REG_TX_G2 0x21
  1054. #define RF6052_REG_TX_G3 0x22
  1055. #define RF6052_REG_TX_BB1 0x23
  1056. #define RF6052_REG_T_METER 0x24
  1057. #define RF6052_REG_SYN_G1 0x25 /* RF TX Power control */
  1058. #define RF6052_REG_SYN_G2 0x26 /* RF TX Power control */
  1059. #define RF6052_REG_SYN_G3 0x27 /* RF TX Power control */
  1060. #define RF6052_REG_SYN_G4 0x28 /* RF TX Power control */
  1061. #define RF6052_REG_SYN_G5 0x29 /* RF TX Power control */
  1062. #define RF6052_REG_SYN_G6 0x2a /* RF TX Power control */
  1063. #define RF6052_REG_SYN_G7 0x2b /* RF TX Power control */
  1064. #define RF6052_REG_SYN_G8 0x2c /* RF TX Power control */
  1065. #define RF6052_REG_RCK_OS 0x30 /* RF TX PA control */
  1066. #define RF6052_REG_TXPA_G1 0x31 /* RF TX PA control */
  1067. #define RF6052_REG_TXPA_G2 0x32 /* RF TX PA control */
  1068. #define RF6052_REG_TXPA_G3 0x33 /* RF TX PA control */
  1069. /*
  1070. * NextGen regs: 8723BU
  1071. */
  1072. #define RF6052_REG_T_METER_8723B 0x42
  1073. #define RF6052_REG_UNKNOWN_43 0x43
  1074. #define RF6052_REG_UNKNOWN_55 0x55
  1075. #define RF6052_REG_UNKNOWN_56 0x56
  1076. #define RF6052_REG_S0S1 0xb0
  1077. #define RF6052_REG_UNKNOWN_DF 0xdf
  1078. #define RF6052_REG_UNKNOWN_ED 0xed
  1079. #define RF6052_REG_WE_LUT 0xef