reg.h 58 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054
  1. /******************************************************************************
  2. *
  3. * Copyright(c) 2009-2012 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. * The full GNU General Public License is included in this distribution in the
  15. * file called LICENSE.
  16. *
  17. * Contact Information:
  18. * wlanfae <wlanfae@realtek.com>
  19. * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park,
  20. * Hsinchu 300, Taiwan.
  21. *
  22. * Larry Finger <Larry.Finger@lwfinger.net>
  23. *
  24. *****************************************************************************/
  25. #ifndef __RTL92C_REG_H__
  26. #define __RTL92C_REG_H__
  27. #define REG_SYS_ISO_CTRL 0x0000
  28. #define REG_SYS_FUNC_EN 0x0002
  29. #define REG_APS_FSMCO 0x0004
  30. #define REG_SYS_CLKR 0x0008
  31. #define REG_9346CR 0x000A
  32. #define REG_EE_VPD 0x000C
  33. #define REG_AFE_MISC 0x0010
  34. #define REG_SPS0_CTRL 0x0011
  35. #define REG_SPS_OCP_CFG 0x0018
  36. #define REG_RSV_CTRL 0x001C
  37. #define REG_RF_CTRL 0x001F
  38. #define REG_LDOA15_CTRL 0x0020
  39. #define REG_LDOV12D_CTRL 0x0021
  40. #define REG_LDOHCI12_CTRL 0x0022
  41. #define REG_LPLDO_CTRL 0x0023
  42. #define REG_AFE_XTAL_CTRL 0x0024
  43. #define REG_AFE_PLL_CTRL 0x0028
  44. #define REG_EFUSE_CTRL 0x0030
  45. #define REG_EFUSE_TEST 0x0034
  46. #define REG_PWR_DATA 0x0038
  47. #define REG_CAL_TIMER 0x003C
  48. #define REG_ACLK_MON 0x003E
  49. #define REG_GPIO_MUXCFG 0x0040
  50. #define REG_GPIO_IO_SEL 0x0042
  51. #define REG_MAC_PINMUX_CFG 0x0043
  52. #define REG_GPIO_PIN_CTRL 0x0044
  53. #define REG_GPIO_INTM 0x0048
  54. #define REG_LEDCFG0 0x004C
  55. #define REG_LEDCFG1 0x004D
  56. #define REG_LEDCFG2 0x004E
  57. #define REG_LEDCFG3 0x004F
  58. #define REG_FSIMR 0x0050
  59. #define REG_FSISR 0x0054
  60. #define REG_HSIMR 0x0058
  61. #define REG_HSISR 0x005c
  62. /* RTL8723 WIFI/BT/GPS Multi-Function GPIO Pin Control. */
  63. #define REG_GPIO_PIN_CTRL_2 0x0060
  64. /* RTL8723 WIFI/BT/GPS Multi-Function GPIO Select. */
  65. #define REG_GPIO_IO_SEL_2 0x0062
  66. /* RTL8723 WIFI/BT/GPS Multi-Function control source. */
  67. #define REG_MULTI_FUNC_CTRL 0x0068
  68. #define REG_MCUFWDL 0x0080
  69. #define REG_HMEBOX_EXT_0 0x0088
  70. #define REG_HMEBOX_EXT_1 0x008A
  71. #define REG_HMEBOX_EXT_2 0x008C
  72. #define REG_HMEBOX_EXT_3 0x008E
  73. #define REG_BIST_SCAN 0x00D0
  74. #define REG_BIST_RPT 0x00D4
  75. #define REG_BIST_ROM_RPT 0x00D8
  76. #define REG_USB_SIE_INTF 0x00E0
  77. #define REG_PCIE_MIO_INTF 0x00E4
  78. #define REG_PCIE_MIO_INTD 0x00E8
  79. #define REG_HPON_FSM 0x00EC
  80. #define REG_SYS_CFG 0x00F0
  81. #define REG_GPIO_OUTSTS 0x00F4 /* For RTL8723 only.*/
  82. #define REG_CR 0x0100
  83. #define REG_PBP 0x0104
  84. #define REG_TRXDMA_CTRL 0x010C
  85. #define REG_TRXFF_BNDY 0x0114
  86. #define REG_TRXFF_STATUS 0x0118
  87. #define REG_RXFF_PTR 0x011C
  88. #define REG_HIMR 0x0120
  89. #define REG_HISR 0x0124
  90. #define REG_HIMRE 0x0128
  91. #define REG_HISRE 0x012C
  92. #define REG_CPWM 0x012F
  93. #define REG_FWIMR 0x0130
  94. #define REG_FWISR 0x0134
  95. #define REG_PKTBUF_DBG_CTRL 0x0140
  96. #define REG_PKTBUF_DBG_DATA_L 0x0144
  97. #define REG_PKTBUF_DBG_DATA_H 0x0148
  98. #define REG_TC0_CTRL 0x0150
  99. #define REG_TC1_CTRL 0x0154
  100. #define REG_TC2_CTRL 0x0158
  101. #define REG_TC3_CTRL 0x015C
  102. #define REG_TC4_CTRL 0x0160
  103. #define REG_TCUNIT_BASE 0x0164
  104. #define REG_MBIST_START 0x0174
  105. #define REG_MBIST_DONE 0x0178
  106. #define REG_MBIST_FAIL 0x017C
  107. #define REG_C2HEVT_MSG_NORMAL 0x01A0
  108. #define REG_C2HEVT_MSG_TEST 0x01B8
  109. #define REG_C2HEVT_CLEAR 0x01BF
  110. #define REG_MCUTST_1 0x01c0
  111. #define REG_FMETHR 0x01C8
  112. #define REG_HMETFR 0x01CC
  113. #define REG_HMEBOX_0 0x01D0
  114. #define REG_HMEBOX_1 0x01D4
  115. #define REG_HMEBOX_2 0x01D8
  116. #define REG_HMEBOX_3 0x01DC
  117. #define REG_LLT_INIT 0x01E0
  118. #define REG_BB_ACCEESS_CTRL 0x01E8
  119. #define REG_BB_ACCESS_DATA 0x01EC
  120. #define REG_RQPN 0x0200
  121. #define REG_FIFOPAGE 0x0204
  122. #define REG_TDECTRL 0x0208
  123. #define REG_TXDMA_OFFSET_CHK 0x020C
  124. #define REG_TXDMA_STATUS 0x0210
  125. #define REG_RQPN_NPQ 0x0214
  126. #define REG_RXDMA_AGG_PG_TH 0x0280
  127. #define REG_RXPKT_NUM 0x0284
  128. #define REG_RXDMA_STATUS 0x0288
  129. #define REG_PCIE_CTRL_REG 0x0300
  130. #define REG_INT_MIG 0x0304
  131. #define REG_BCNQ_DESA 0x0308
  132. #define REG_HQ_DESA 0x0310
  133. #define REG_MGQ_DESA 0x0318
  134. #define REG_VOQ_DESA 0x0320
  135. #define REG_VIQ_DESA 0x0328
  136. #define REG_BEQ_DESA 0x0330
  137. #define REG_BKQ_DESA 0x0338
  138. #define REG_RX_DESA 0x0340
  139. #define REG_DBI 0x0348
  140. #define REG_MDIO 0x0354
  141. #define REG_DBG_SEL 0x0360
  142. #define REG_PCIE_HRPWM 0x0361
  143. #define REG_PCIE_HCPWM 0x0363
  144. #define REG_UART_CTRL 0x0364
  145. #define REG_UART_TX_DESA 0x0370
  146. #define REG_UART_RX_DESA 0x0378
  147. #define REG_HDAQ_DESA_NODEF 0x0000
  148. #define REG_CMDQ_DESA_NODEF 0x0000
  149. #define REG_VOQ_INFORMATION 0x0400
  150. #define REG_VIQ_INFORMATION 0x0404
  151. #define REG_BEQ_INFORMATION 0x0408
  152. #define REG_BKQ_INFORMATION 0x040C
  153. #define REG_MGQ_INFORMATION 0x0410
  154. #define REG_HGQ_INFORMATION 0x0414
  155. #define REG_BCNQ_INFORMATION 0x0418
  156. #define REG_CPU_MGQ_INFORMATION 0x041C
  157. #define REG_FWHW_TXQ_CTRL 0x0420
  158. #define REG_HWSEQ_CTRL 0x0423
  159. #define REG_TXPKTBUF_BCNQ_BDNY 0x0424
  160. #define REG_TXPKTBUF_MGQ_BDNY 0x0425
  161. #define REG_MULTI_BCNQ_EN 0x0426
  162. #define REG_MULTI_BCNQ_OFFSET 0x0427
  163. #define REG_SPEC_SIFS 0x0428
  164. #define REG_RL 0x042A
  165. #define REG_DARFRC 0x0430
  166. #define REG_RARFRC 0x0438
  167. #define REG_RRSR 0x0440
  168. #define REG_ARFR0 0x0444
  169. #define REG_ARFR1 0x0448
  170. #define REG_ARFR2 0x044C
  171. #define REG_ARFR3 0x0450
  172. #define REG_AGGLEN_LMT 0x0458
  173. #define REG_AMPDU_MIN_SPACE 0x045C
  174. #define REG_TXPKTBUF_WMAC_LBK_BF_HD 0x045D
  175. #define REG_FAST_EDCA_CTRL 0x0460
  176. #define REG_RD_RESP_PKT_TH 0x0463
  177. #define REG_INIRTS_RATE_SEL 0x0480
  178. #define REG_INIDATA_RATE_SEL 0x0484
  179. #define REG_POWER_STATUS 0x04A4
  180. #define REG_POWER_STAGE1 0x04B4
  181. #define REG_POWER_STAGE2 0x04B8
  182. #define REG_PKT_LIFE_TIME 0x04C0
  183. #define REG_STBC_SETTING 0x04C4
  184. #define REG_PROT_MODE_CTRL 0x04C8
  185. #define REG_BAR_MODE_CTRL 0x04CC
  186. #define REG_RA_TRY_RATE_AGG_LMT 0x04CF
  187. #define REG_NQOS_SEQ 0x04DC
  188. #define REG_QOS_SEQ 0x04DE
  189. #define REG_NEED_CPU_HANDLE 0x04E0
  190. #define REG_PKT_LOSE_RPT 0x04E1
  191. #define REG_PTCL_ERR_STATUS 0x04E2
  192. #define REG_DUMMY 0x04FC
  193. #define REG_EDCA_VO_PARAM 0x0500
  194. #define REG_EDCA_VI_PARAM 0x0504
  195. #define REG_EDCA_BE_PARAM 0x0508
  196. #define REG_EDCA_BK_PARAM 0x050C
  197. #define REG_BCNTCFG 0x0510
  198. #define REG_PIFS 0x0512
  199. #define REG_RDG_PIFS 0x0513
  200. #define REG_SIFS_CTX 0x0514
  201. #define REG_SIFS_TRX 0x0516
  202. #define REG_SIFS_CCK 0x0514
  203. #define REG_SIFS_OFDM 0x0516
  204. #define REG_AGGR_BREAK_TIME 0x051A
  205. #define REG_SLOT 0x051B
  206. #define REG_TX_PTCL_CTRL 0x0520
  207. #define REG_TXPAUSE 0x0522
  208. #define REG_DIS_TXREQ_CLR 0x0523
  209. #define REG_RD_CTRL 0x0524
  210. #define REG_TBTT_PROHIBIT 0x0540
  211. #define REG_RD_NAV_NXT 0x0544
  212. #define REG_NAV_PROT_LEN 0x0546
  213. #define REG_BCN_CTRL 0x0550
  214. #define REG_MBID_NUM 0x0552
  215. #define REG_DUAL_TSF_RST 0x0553
  216. #define REG_BCN_INTERVAL 0x0554
  217. #define REG_MBSSID_BCN_SPACE 0x0554
  218. #define REG_DRVERLYINT 0x0558
  219. #define REG_BCNDMATIM 0x0559
  220. #define REG_ATIMWND 0x055A
  221. #define REG_USTIME_TSF 0x055C
  222. #define REG_BCN_MAX_ERR 0x055D
  223. #define REG_RXTSF_OFFSET_CCK 0x055E
  224. #define REG_RXTSF_OFFSET_OFDM 0x055F
  225. #define REG_TSFTR 0x0560
  226. #define REG_INIT_TSFTR 0x0564
  227. #define REG_PSTIMER 0x0580
  228. #define REG_TIMER0 0x0584
  229. #define REG_TIMER1 0x0588
  230. #define REG_ACMHWCTRL 0x05C0
  231. #define REG_ACMRSTCTRL 0x05C1
  232. #define REG_ACMAVG 0x05C2
  233. #define REG_VO_ADMTIME 0x05C4
  234. #define REG_VI_ADMTIME 0x05C6
  235. #define REG_BE_ADMTIME 0x05C8
  236. #define REG_EDCA_RANDOM_GEN 0x05CC
  237. #define REG_SCH_TXCMD 0x05D0
  238. #define REG_APSD_CTRL 0x0600
  239. #define REG_BWOPMODE 0x0603
  240. #define REG_TCR 0x0604
  241. #define REG_RCR 0x0608
  242. #define REG_RX_PKT_LIMIT 0x060C
  243. #define REG_RX_DLK_TIME 0x060D
  244. #define REG_RX_DRVINFO_SZ 0x060F
  245. #define REG_MACID 0x0610
  246. #define REG_BSSID 0x0618
  247. #define REG_MAR 0x0620
  248. #define REG_MBIDCAMCFG 0x0628
  249. #define REG_USTIME_EDCA 0x0638
  250. #define REG_MAC_SPEC_SIFS 0x063A
  251. #define REG_RESP_SIFS_CCK 0x063C
  252. #define REG_RESP_SIFS_OFDM 0x063E
  253. /* [15:8]SIFS_R2T_OFDM, [7:0]SIFS_R2T_CCK */
  254. #define REG_R2T_SIFS 0x063C
  255. /* [15:8]SIFS_T2T_OFDM, [7:0]SIFS_T2T_CCK */
  256. #define REG_T2T_SIFS 0x063E
  257. #define REG_ACKTO 0x0640
  258. #define REG_CTS2TO 0x0641
  259. #define REG_EIFS 0x0642
  260. #define REG_NAV_CTRL 0x0650
  261. #define REG_BACAMCMD 0x0654
  262. #define REG_BACAMCONTENT 0x0658
  263. #define REG_LBDLY 0x0660
  264. #define REG_FWDLY 0x0661
  265. #define REG_RXERR_RPT 0x0664
  266. #define REG_WMAC_TRXPTCL_CTL 0x0668
  267. #define REG_CAMCMD 0x0670
  268. #define REG_CAMWRITE 0x0674
  269. #define REG_CAMREAD 0x0678
  270. #define REG_CAMDBG 0x067C
  271. #define REG_SECCFG 0x0680
  272. #define REG_WOW_CTRL 0x0690
  273. #define REG_PSSTATUS 0x0691
  274. #define REG_PS_RX_INFO 0x0692
  275. #define REG_LPNAV_CTRL 0x0694
  276. #define REG_WKFMCAM_CMD 0x0698
  277. #define REG_WKFMCAM_RWD 0x069C
  278. #define REG_RXFLTMAP0 0x06A0
  279. #define REG_RXFLTMAP1 0x06A2
  280. #define REG_RXFLTMAP2 0x06A4
  281. #define REG_BCN_PSR_RPT 0x06A8
  282. #define REG_CALB32K_CTRL 0x06AC
  283. #define REG_PKT_MON_CTRL 0x06B4
  284. #define REG_BT_COEX_TABLE 0x06C0
  285. #define REG_WMAC_RESP_TXINFO 0x06D8
  286. #define REG_USB_INFO 0xFE17
  287. #define REG_USB_SPECIAL_OPTION 0xFE55
  288. #define REG_USB_DMA_AGG_TO 0xFE5B
  289. #define REG_USB_AGG_TO 0xFE5C
  290. #define REG_USB_AGG_TH 0xFE5D
  291. #define REG_TEST_USB_TXQS 0xFE48
  292. #define REG_TEST_SIE_VID 0xFE60
  293. #define REG_TEST_SIE_PID 0xFE62
  294. #define REG_TEST_SIE_OPTIONAL 0xFE64
  295. #define REG_TEST_SIE_CHIRP_K 0xFE65
  296. #define REG_TEST_SIE_PHY 0xFE66
  297. #define REG_TEST_SIE_MAC_ADDR 0xFE70
  298. #define REG_TEST_SIE_STRING 0xFE80
  299. #define REG_NORMAL_SIE_VID 0xFE60
  300. #define REG_NORMAL_SIE_PID 0xFE62
  301. #define REG_NORMAL_SIE_OPTIONAL 0xFE64
  302. #define REG_NORMAL_SIE_EP 0xFE65
  303. #define REG_NORMAL_SIE_PHY 0xFE68
  304. #define REG_NORMAL_SIE_MAC_ADDR 0xFE70
  305. #define REG_NORMAL_SIE_STRING 0xFE80
  306. #define CR9346 REG_9346CR
  307. #define MSR (REG_CR + 2)
  308. #define ISR REG_HISR
  309. #define TSFR REG_TSFTR
  310. #define MACIDR0 REG_MACID
  311. #define MACIDR4 (REG_MACID + 4)
  312. #define PBP REG_PBP
  313. #define IDR0 MACIDR0
  314. #define IDR4 MACIDR4
  315. #define UNUSED_REGISTER 0x1BF
  316. #define DCAM UNUSED_REGISTER
  317. #define PSR UNUSED_REGISTER
  318. #define BBADDR UNUSED_REGISTER
  319. #define PHYDATAR UNUSED_REGISTER
  320. #define INVALID_BBRF_VALUE 0x12345678
  321. #define MAX_MSS_DENSITY_2T 0x13
  322. #define MAX_MSS_DENSITY_1T 0x0A
  323. #define CMDEEPROM_EN BIT(5)
  324. #define CMDEEPROM_SEL BIT(4)
  325. #define CMD9346CR_9356SEL BIT(4)
  326. #define AUTOLOAD_EEPROM (CMDEEPROM_EN|CMDEEPROM_SEL)
  327. #define AUTOLOAD_EFUSE CMDEEPROM_EN
  328. #define GPIOSEL_GPIO 0
  329. #define GPIOSEL_ENBT BIT(5)
  330. #define GPIO_IN REG_GPIO_PIN_CTRL
  331. #define GPIO_OUT (REG_GPIO_PIN_CTRL+1)
  332. #define GPIO_IO_SEL (REG_GPIO_PIN_CTRL+2)
  333. #define GPIO_MOD (REG_GPIO_PIN_CTRL+3)
  334. #define MSR_NOLINK 0x00
  335. #define MSR_ADHOC 0x01
  336. #define MSR_INFRA 0x02
  337. #define MSR_AP 0x03
  338. #define MSR_MASK 0x03
  339. #define RRSR_RSC_OFFSET 21
  340. #define RRSR_SHORT_OFFSET 23
  341. #define RRSR_RSC_BW_40M 0x600000
  342. #define RRSR_RSC_UPSUBCHNL 0x400000
  343. #define RRSR_RSC_LOWSUBCHNL 0x200000
  344. #define RRSR_SHORT 0x800000
  345. #define RRSR_1M BIT(0)
  346. #define RRSR_2M BIT(1)
  347. #define RRSR_5_5M BIT(2)
  348. #define RRSR_11M BIT(3)
  349. #define RRSR_6M BIT(4)
  350. #define RRSR_9M BIT(5)
  351. #define RRSR_12M BIT(6)
  352. #define RRSR_18M BIT(7)
  353. #define RRSR_24M BIT(8)
  354. #define RRSR_36M BIT(9)
  355. #define RRSR_48M BIT(10)
  356. #define RRSR_54M BIT(11)
  357. #define RRSR_MCS0 BIT(12)
  358. #define RRSR_MCS1 BIT(13)
  359. #define RRSR_MCS2 BIT(14)
  360. #define RRSR_MCS3 BIT(15)
  361. #define RRSR_MCS4 BIT(16)
  362. #define RRSR_MCS5 BIT(17)
  363. #define RRSR_MCS6 BIT(18)
  364. #define RRSR_MCS7 BIT(19)
  365. #define BRSR_ACKSHORTPMB BIT(23)
  366. #define RATR_1M 0x00000001
  367. #define RATR_2M 0x00000002
  368. #define RATR_55M 0x00000004
  369. #define RATR_11M 0x00000008
  370. #define RATR_6M 0x00000010
  371. #define RATR_9M 0x00000020
  372. #define RATR_12M 0x00000040
  373. #define RATR_18M 0x00000080
  374. #define RATR_24M 0x00000100
  375. #define RATR_36M 0x00000200
  376. #define RATR_48M 0x00000400
  377. #define RATR_54M 0x00000800
  378. #define RATR_MCS0 0x00001000
  379. #define RATR_MCS1 0x00002000
  380. #define RATR_MCS2 0x00004000
  381. #define RATR_MCS3 0x00008000
  382. #define RATR_MCS4 0x00010000
  383. #define RATR_MCS5 0x00020000
  384. #define RATR_MCS6 0x00040000
  385. #define RATR_MCS7 0x00080000
  386. #define RATR_MCS8 0x00100000
  387. #define RATR_MCS9 0x00200000
  388. #define RATR_MCS10 0x00400000
  389. #define RATR_MCS11 0x00800000
  390. #define RATR_MCS12 0x01000000
  391. #define RATR_MCS13 0x02000000
  392. #define RATR_MCS14 0x04000000
  393. #define RATR_MCS15 0x08000000
  394. #define RATE_1M BIT(0)
  395. #define RATE_2M BIT(1)
  396. #define RATE_5_5M BIT(2)
  397. #define RATE_11M BIT(3)
  398. #define RATE_6M BIT(4)
  399. #define RATE_9M BIT(5)
  400. #define RATE_12M BIT(6)
  401. #define RATE_18M BIT(7)
  402. #define RATE_24M BIT(8)
  403. #define RATE_36M BIT(9)
  404. #define RATE_48M BIT(10)
  405. #define RATE_54M BIT(11)
  406. #define RATE_MCS0 BIT(12)
  407. #define RATE_MCS1 BIT(13)
  408. #define RATE_MCS2 BIT(14)
  409. #define RATE_MCS3 BIT(15)
  410. #define RATE_MCS4 BIT(16)
  411. #define RATE_MCS5 BIT(17)
  412. #define RATE_MCS6 BIT(18)
  413. #define RATE_MCS7 BIT(19)
  414. #define RATE_MCS8 BIT(20)
  415. #define RATE_MCS9 BIT(21)
  416. #define RATE_MCS10 BIT(22)
  417. #define RATE_MCS11 BIT(23)
  418. #define RATE_MCS12 BIT(24)
  419. #define RATE_MCS13 BIT(25)
  420. #define RATE_MCS14 BIT(26)
  421. #define RATE_MCS15 BIT(27)
  422. #define RATE_ALL_CCK (RATR_1M | RATR_2M | RATR_55M | RATR_11M)
  423. #define RATE_ALL_OFDM_AG (RATR_6M | RATR_9M | RATR_12M | RATR_18M \
  424. | RATR_24M | RATR_36M | RATR_48M | RATR_54M)
  425. #define RATE_ALL_OFDM_1SS (RATR_MCS0 | RATR_MCS1 | RATR_MCS2 | \
  426. RATR_MCS3 | RATR_MCS4 | RATR_MCS5 | \
  427. RATR_MCS6 | RATR_MCS7)
  428. #define RATE_ALL_OFDM_2SS (RATR_MCS8 | RATR_MCS9 | RATR_MCS10 | \
  429. RATR_MCS11 | RATR_MCS12 | RATR_MCS13 | \
  430. RATR_MCS14 | RATR_MCS15)
  431. #define BW_OPMODE_20MHZ BIT(2)
  432. #define BW_OPMODE_5G BIT(1)
  433. #define BW_OPMODE_11J BIT(0)
  434. #define CAM_VALID BIT(15)
  435. #define CAM_NOTVALID 0x0000
  436. #define CAM_USEDK BIT(5)
  437. #define CAM_NONE 0x0
  438. #define CAM_WEP40 0x01
  439. #define CAM_TKIP 0x02
  440. #define CAM_AES 0x04
  441. #define CAM_WEP104 0x05
  442. #define TOTAL_CAM_ENTRY 32
  443. #define HALF_CAM_ENTRY 16
  444. #define CAM_WRITE BIT(16)
  445. #define CAM_READ 0x00000000
  446. #define CAM_POLLINIG BIT(31)
  447. #define SCR_USEDK 0x01
  448. #define SCR_TXSEC_ENABLE 0x02
  449. #define SCR_RXSEC_ENABLE 0x04
  450. #define WOW_PMEN BIT(0)
  451. #define WOW_WOMEN BIT(1)
  452. #define WOW_MAGIC BIT(2)
  453. #define WOW_UWF BIT(3)
  454. #define IMR8190_DISABLED 0x0
  455. #define IMR_BCNDMAINT6 BIT(31)
  456. #define IMR_BCNDMAINT5 BIT(30)
  457. #define IMR_BCNDMAINT4 BIT(29)
  458. #define IMR_BCNDMAINT3 BIT(28)
  459. #define IMR_BCNDMAINT2 BIT(27)
  460. #define IMR_BCNDMAINT1 BIT(26)
  461. #define IMR_BCNDOK8 BIT(25)
  462. #define IMR_BCNDOK7 BIT(24)
  463. #define IMR_BCNDOK6 BIT(23)
  464. #define IMR_BCNDOK5 BIT(22)
  465. #define IMR_BCNDOK4 BIT(21)
  466. #define IMR_BCNDOK3 BIT(20)
  467. #define IMR_BCNDOK2 BIT(19)
  468. #define IMR_BCNDOK1 BIT(18)
  469. #define IMR_TIMEOUT2 BIT(17)
  470. #define IMR_TIMEOUT1 BIT(16)
  471. #define IMR_TXFOVW BIT(15)
  472. #define IMR_PSTIMEOUT BIT(14)
  473. #define IMR_BCNINT BIT(13)
  474. #define IMR_RXFOVW BIT(12)
  475. #define IMR_RDU BIT(11)
  476. #define IMR_ATIMEND BIT(10)
  477. #define IMR_BDOK BIT(9)
  478. #define IMR_HIGHDOK BIT(8)
  479. #define IMR_TBDOK BIT(7)
  480. #define IMR_MGNTDOK BIT(6)
  481. #define IMR_TBDER BIT(5)
  482. #define IMR_BKDOK BIT(4)
  483. #define IMR_BEDOK BIT(3)
  484. #define IMR_VIDOK BIT(2)
  485. #define IMR_VODOK BIT(1)
  486. #define IMR_ROK BIT(0)
  487. #define IMR_TXERR BIT(11)
  488. #define IMR_RXERR BIT(10)
  489. #define IMR_C2HCMD BIT(9)
  490. #define IMR_CPWM BIT(8)
  491. #define IMR_OCPINT BIT(1)
  492. #define IMR_WLANOFF BIT(0)
  493. #define EFUSE_REAL_CONTENT_LEN 512
  494. #define EFUSE_OOB_PROTECT_BYTES 15
  495. #define EEPROM_DEFAULT_TSSI 0x0
  496. #define EEPROM_DEFAULT_TXPOWERDIFF 0x0
  497. #define EEPROM_DEFAULT_CRYSTALCAP 0x5
  498. #define EEPROM_DEFAULT_BOARDTYPE 0x02
  499. #define EEPROM_DEFAULT_TXPOWER 0x1010
  500. #define EEPROM_DEFAULT_HT2T_TXPWR 0x10
  501. #define EEPROM_DEFAULT_LEGACYHTTXPOWERDIFF 0x3
  502. #define EEPROM_DEFAULT_THERMALMETER 0x12
  503. #define EEPROM_DEFAULT_ANTTXPOWERDIFF 0x0
  504. #define EEPROM_DEFAULT_TXPWDIFF_CRYSTALCAP 0x5
  505. #define EEPROM_DEFAULT_TXPOWERLEVEL 0x22
  506. #define EEPROM_DEFAULT_HT40_2SDIFF 0x0
  507. #define EEPROM_DEFAULT_HT20_DIFF 2
  508. #define EEPROM_DEFAULT_HT40_PWRMAXOFFSET 0
  509. #define EEPROM_DEFAULT_HT20_PWRMAXOFFSET 0
  510. #define RF_OPTION1 0x79
  511. #define RF_OPTION2 0x7A
  512. #define RF_OPTION3 0x7B
  513. #define RF_OPTION4 0x7C
  514. #define EEPROM_DEFAULT_PID 0x1234
  515. #define EEPROM_DEFAULT_VID 0x5678
  516. #define EEPROM_DEFAULT_CUSTOMERID 0xAB
  517. #define EEPROM_DEFAULT_SUBCUSTOMERID 0xCD
  518. #define EEPROM_DEFAULT_VERSION 0
  519. #define EEPROM_CHANNEL_PLAN_FCC 0x0
  520. #define EEPROM_CHANNEL_PLAN_IC 0x1
  521. #define EEPROM_CHANNEL_PLAN_ETSI 0x2
  522. #define EEPROM_CHANNEL_PLAN_SPAIN 0x3
  523. #define EEPROM_CHANNEL_PLAN_FRANCE 0x4
  524. #define EEPROM_CHANNEL_PLAN_MKK 0x5
  525. #define EEPROM_CHANNEL_PLAN_MKK1 0x6
  526. #define EEPROM_CHANNEL_PLAN_ISRAEL 0x7
  527. #define EEPROM_CHANNEL_PLAN_TELEC 0x8
  528. #define EEPROM_CHANNEL_PLAN_GLOBAL_DOMAIN 0x9
  529. #define EEPROM_CHANNEL_PLAN_WORLD_WIDE_13 0xA
  530. #define EEPROM_CHANNEL_PLAN_NCC 0xB
  531. #define EEPROM_CHANNEL_PLAN_BY_HW_MASK 0x80
  532. #define EEPROM_CID_DEFAULT 0x0
  533. #define EEPROM_CID_TOSHIBA 0x4
  534. #define EEPROM_CID_CCX 0x10
  535. #define EEPROM_CID_QMI 0x0D
  536. #define EEPROM_CID_WHQL 0xFE
  537. #define RTL8192_EEPROM_ID 0x8129
  538. #define RTL8190_EEPROM_ID 0x8129
  539. #define EEPROM_HPON 0x02
  540. #define EEPROM_CLK 0x06
  541. #define EEPROM_TESTR 0x08
  542. #define EEPROM_VID 0x0A
  543. #define EEPROM_DID 0x0C
  544. #define EEPROM_SVID 0x0E
  545. #define EEPROM_SMID 0x10
  546. #define EEPROM_MAC_ADDR 0x16
  547. #define EEPROM_CCK_TX_PWR_INX 0x5A
  548. #define EEPROM_HT40_1S_TX_PWR_INX 0x60
  549. #define EEPROM_HT40_2S_TX_PWR_INX_DIFF 0x66
  550. #define EEPROM_HT20_TX_PWR_INX_DIFF 0x69
  551. #define EEPROM_OFDM_TX_PWR_INX_DIFF 0x6C
  552. #define EEPROM_HT40_MAX_PWR_OFFSET 0x6F
  553. #define EEPROM_HT20_MAX_PWR_OFFSET 0x72
  554. #define EEPROM_TSSI_A 0x76
  555. #define EEPROM_TSSI_B 0x77
  556. #define EEPROM_THERMAL_METER 0x78
  557. #define EEPROM_XTAL_K 0x78
  558. #define EEPROM_RF_OPT1 0x79
  559. #define EEPROM_RF_OPT2 0x7A
  560. #define EEPROM_RF_OPT3 0x7B
  561. #define EEPROM_RF_OPT4 0x7C
  562. #define EEPROM_CHANNEL_PLAN 0x7D
  563. #define EEPROM_VERSION 0x7E
  564. #define EEPROM_CUSTOMER_ID 0x7F
  565. #define EEPROM_PWRDIFF 0x54
  566. #define EEPROM_TXPOWERCCK 0x5A
  567. #define EEPROM_TXPOWERHT40_1S 0x60
  568. #define EEPROM_TXPOWERHT40_2SDIFF 0x66
  569. #define EEPROM_TXPOWERHT20DIFF 0x69
  570. #define EEPROM_TXPOWER_OFDMDIFF 0x6C
  571. #define EEPROM_TXPWR_GROUP 0x6F
  572. #define EEPROM_CHANNELPLAN 0x75
  573. #define STOPBECON BIT(6)
  574. #define STOPHIGHT BIT(5)
  575. #define STOPMGT BIT(4)
  576. #define STOPVO BIT(3)
  577. #define STOPVI BIT(2)
  578. #define STOPBE BIT(1)
  579. #define STOPBK BIT(0)
  580. #define RCR_APPFCS BIT(31)
  581. #define RCR_APP_FCS BIT(31)
  582. #define RCR_APP_MIC BIT(30)
  583. #define RCR_APP_ICV BIT(29)
  584. #define RCR_APP_PHYSTS BIT(28)
  585. #define RCR_APP_PHYST_RXFF BIT(28)
  586. #define RCR_APP_BA_SSN BIT(27)
  587. #define RCR_ENMBID BIT(24)
  588. #define RCR_LSIGEN BIT(23)
  589. #define RCR_MFBEN BIT(22)
  590. #define RCR_HTC_LOC_CTRL BIT(14)
  591. #define RCR_AMF BIT(13)
  592. #define RCR_ACF BIT(12)
  593. #define RCR_ADF BIT(11)
  594. #define RCR_AICV BIT(9)
  595. #define RCR_ACRC32 BIT(8)
  596. #define RCR_CBSSID_BCN BIT(7)
  597. #define RCR_CBSSID_DATA BIT(6)
  598. #define RCR_CBSSID RCR_CBSSID_DATA
  599. #define RCR_APWRMGT BIT(5)
  600. #define RCR_ADD3 BIT(4)
  601. #define RCR_AB BIT(3)
  602. #define RCR_AM BIT(2)
  603. #define RCR_APM BIT(1)
  604. #define RCR_AAP BIT(0)
  605. #define RCR_MXDMA_OFFSET 8
  606. #define RCR_FIFO_OFFSET 13
  607. #define RSV_CTRL 0x001C
  608. #define RD_CTRL 0x0524
  609. #define REG_USB_VID 0xFE60
  610. #define REG_USB_PID 0xFE62
  611. #define REG_USB_OPTIONAL 0xFE64
  612. #define REG_USB_CHIRP_K 0xFE65
  613. #define REG_USB_PHY 0xFE66
  614. #define REG_USB_MAC_ADDR 0xFE70
  615. #define REG_USB_HRPWM 0xFE58
  616. #define REG_USB_HCPWM 0xFE57
  617. #define SW18_FPWM BIT(3)
  618. #define ISO_MD2PP BIT(0)
  619. #define ISO_UA2USB BIT(1)
  620. #define ISO_UD2CORE BIT(2)
  621. #define ISO_PA2PCIE BIT(3)
  622. #define ISO_PD2CORE BIT(4)
  623. #define ISO_IP2MAC BIT(5)
  624. #define ISO_DIOP BIT(6)
  625. #define ISO_DIOE BIT(7)
  626. #define ISO_EB2CORE BIT(8)
  627. #define ISO_DIOR BIT(9)
  628. #define PWC_EV25V BIT(14)
  629. #define PWC_EV12V BIT(15)
  630. #define FEN_BBRSTB BIT(0)
  631. #define FEN_BB_GLB_RSTn BIT(1)
  632. #define FEN_USBA BIT(2)
  633. #define FEN_UPLL BIT(3)
  634. #define FEN_USBD BIT(4)
  635. #define FEN_DIO_PCIE BIT(5)
  636. #define FEN_PCIEA BIT(6)
  637. #define FEN_PPLL BIT(7)
  638. #define FEN_PCIED BIT(8)
  639. #define FEN_DIOE BIT(9)
  640. #define FEN_CPUEN BIT(10)
  641. #define FEN_DCORE BIT(11)
  642. #define FEN_ELDR BIT(12)
  643. #define FEN_DIO_RF BIT(13)
  644. #define FEN_HWPDN BIT(14)
  645. #define FEN_MREGEN BIT(15)
  646. #define PFM_LDALL BIT(0)
  647. #define PFM_ALDN BIT(1)
  648. #define PFM_LDKP BIT(2)
  649. #define PFM_WOWL BIT(3)
  650. #define EnPDN BIT(4)
  651. #define PDN_PL BIT(5)
  652. #define APFM_ONMAC BIT(8)
  653. #define APFM_OFF BIT(9)
  654. #define APFM_RSM BIT(10)
  655. #define AFSM_HSUS BIT(11)
  656. #define AFSM_PCIE BIT(12)
  657. #define APDM_MAC BIT(13)
  658. #define APDM_HOST BIT(14)
  659. #define APDM_HPDN BIT(15)
  660. #define RDY_MACON BIT(16)
  661. #define SUS_HOST BIT(17)
  662. #define ROP_ALD BIT(20)
  663. #define ROP_PWR BIT(21)
  664. #define ROP_SPS BIT(22)
  665. #define SOP_MRST BIT(25)
  666. #define SOP_FUSE BIT(26)
  667. #define SOP_ABG BIT(27)
  668. #define SOP_AMB BIT(28)
  669. #define SOP_RCK BIT(29)
  670. #define SOP_A8M BIT(30)
  671. #define XOP_BTCK BIT(31)
  672. #define ANAD16V_EN BIT(0)
  673. #define ANA8M BIT(1)
  674. #define MACSLP BIT(4)
  675. #define LOADER_CLK_EN BIT(5)
  676. #define _80M_SSC_DIS BIT(7)
  677. #define _80M_SSC_EN_HO BIT(8)
  678. #define PHY_SSC_RSTB BIT(9)
  679. #define SEC_CLK_EN BIT(10)
  680. #define MAC_CLK_EN BIT(11)
  681. #define SYS_CLK_EN BIT(12)
  682. #define RING_CLK_EN BIT(13)
  683. #define BOOT_FROM_EEPROM BIT(4)
  684. #define EEPROM_EN BIT(5)
  685. #define AFE_BGEN BIT(0)
  686. #define AFE_MBEN BIT(1)
  687. #define MAC_ID_EN BIT(7)
  688. #define WLOCK_ALL BIT(0)
  689. #define WLOCK_00 BIT(1)
  690. #define WLOCK_04 BIT(2)
  691. #define WLOCK_08 BIT(3)
  692. #define WLOCK_40 BIT(4)
  693. #define R_DIS_PRST_0 BIT(5)
  694. #define R_DIS_PRST_1 BIT(6)
  695. #define LOCK_ALL_EN BIT(7)
  696. #define RF_EN BIT(0)
  697. #define RF_RSTB BIT(1)
  698. #define RF_SDMRSTB BIT(2)
  699. #define LDA15_EN BIT(0)
  700. #define LDA15_STBY BIT(1)
  701. #define LDA15_OBUF BIT(2)
  702. #define LDA15_REG_VOS BIT(3)
  703. #define _LDA15_VOADJ(x) (((x) & 0x7) << 4)
  704. #define LDV12_EN BIT(0)
  705. #define LDV12_SDBY BIT(1)
  706. #define LPLDO_HSM BIT(2)
  707. #define LPLDO_LSM_DIS BIT(3)
  708. #define _LDV12_VADJ(x) (((x) & 0xF) << 4)
  709. #define XTAL_EN BIT(0)
  710. #define XTAL_BSEL BIT(1)
  711. #define _XTAL_BOSC(x) (((x) & 0x3) << 2)
  712. #define _XTAL_CADJ(x) (((x) & 0xF) << 4)
  713. #define XTAL_GATE_USB BIT(8)
  714. #define _XTAL_USB_DRV(x) (((x) & 0x3) << 9)
  715. #define XTAL_GATE_AFE BIT(11)
  716. #define _XTAL_AFE_DRV(x) (((x) & 0x3) << 12)
  717. #define XTAL_RF_GATE BIT(14)
  718. #define _XTAL_RF_DRV(x) (((x) & 0x3) << 15)
  719. #define XTAL_GATE_DIG BIT(17)
  720. #define _XTAL_DIG_DRV(x) (((x) & 0x3) << 18)
  721. #define XTAL_BT_GATE BIT(20)
  722. #define _XTAL_BT_DRV(x) (((x) & 0x3) << 21)
  723. #define _XTAL_GPIO(x) (((x) & 0x7) << 23)
  724. #define CKDLY_AFE BIT(26)
  725. #define CKDLY_USB BIT(27)
  726. #define CKDLY_DIG BIT(28)
  727. #define CKDLY_BT BIT(29)
  728. #define APLL_EN BIT(0)
  729. #define APLL_320_EN BIT(1)
  730. #define APLL_FREF_SEL BIT(2)
  731. #define APLL_EDGE_SEL BIT(3)
  732. #define APLL_WDOGB BIT(4)
  733. #define APLL_LPFEN BIT(5)
  734. #define APLL_REF_CLK_13MHZ 0x1
  735. #define APLL_REF_CLK_19_2MHZ 0x2
  736. #define APLL_REF_CLK_20MHZ 0x3
  737. #define APLL_REF_CLK_25MHZ 0x4
  738. #define APLL_REF_CLK_26MHZ 0x5
  739. #define APLL_REF_CLK_38_4MHZ 0x6
  740. #define APLL_REF_CLK_40MHZ 0x7
  741. #define APLL_320EN BIT(14)
  742. #define APLL_80EN BIT(15)
  743. #define APLL_1MEN BIT(24)
  744. #define ALD_EN BIT(18)
  745. #define EF_PD BIT(19)
  746. #define EF_FLAG BIT(31)
  747. #define EF_TRPT BIT(7)
  748. #define LDOE25_EN BIT(31)
  749. #define RSM_EN BIT(0)
  750. #define Timer_EN BIT(4)
  751. #define TRSW0EN BIT(2)
  752. #define TRSW1EN BIT(3)
  753. #define EROM_EN BIT(4)
  754. #define EnBT BIT(5)
  755. #define EnUart BIT(8)
  756. #define Uart_910 BIT(9)
  757. #define EnPMAC BIT(10)
  758. #define SIC_SWRST BIT(11)
  759. #define EnSIC BIT(12)
  760. #define SIC_23 BIT(13)
  761. #define EnHDP BIT(14)
  762. #define SIC_LBK BIT(15)
  763. #define LED0PL BIT(4)
  764. #define LED1PL BIT(12)
  765. #define LED0DIS BIT(7)
  766. #define MCUFWDL_EN BIT(0)
  767. #define MCUFWDL_RDY BIT(1)
  768. #define FWDL_ChkSum_rpt BIT(2)
  769. #define MACINI_RDY BIT(3)
  770. #define BBINI_RDY BIT(4)
  771. #define RFINI_RDY BIT(5)
  772. #define WINTINI_RDY BIT(6)
  773. #define CPRST BIT(23)
  774. #define XCLK_VLD BIT(0)
  775. #define ACLK_VLD BIT(1)
  776. #define UCLK_VLD BIT(2)
  777. #define PCLK_VLD BIT(3)
  778. #define PCIRSTB BIT(4)
  779. #define V15_VLD BIT(5)
  780. #define TRP_B15V_EN BIT(7)
  781. #define SIC_IDLE BIT(8)
  782. #define BD_MAC2 BIT(9)
  783. #define BD_MAC1 BIT(10)
  784. #define IC_MACPHY_MODE BIT(11)
  785. #define BT_FUNC BIT(16)
  786. #define VENDOR_ID BIT(19)
  787. #define PAD_HWPD_IDN BIT(22)
  788. #define TRP_VAUX_EN BIT(23)
  789. #define TRP_BT_EN BIT(24)
  790. #define BD_PKG_SEL BIT(25)
  791. #define BD_HCI_SEL BIT(26)
  792. #define TYPE_ID BIT(27)
  793. #define RF_RL_ID (BIT(31) | BIT(30) | BIT(29) | BIT(28))
  794. #define CHIP_VER_RTL_MASK 0xF000
  795. #define CHIP_VER_RTL_SHIFT 12
  796. #define REG_LBMODE (REG_CR + 3)
  797. #define HCI_TXDMA_EN BIT(0)
  798. #define HCI_RXDMA_EN BIT(1)
  799. #define TXDMA_EN BIT(2)
  800. #define RXDMA_EN BIT(3)
  801. #define PROTOCOL_EN BIT(4)
  802. #define SCHEDULE_EN BIT(5)
  803. #define MACTXEN BIT(6)
  804. #define MACRXEN BIT(7)
  805. #define ENSWBCN BIT(8)
  806. #define ENSEC BIT(9)
  807. #define _NETTYPE(x) (((x) & 0x3) << 16)
  808. #define MASK_NETTYPE 0x30000
  809. #define NT_NO_LINK 0x0
  810. #define NT_LINK_AD_HOC 0x1
  811. #define NT_LINK_AP 0x2
  812. #define NT_AS_AP 0x3
  813. #define _LBMODE(x) (((x) & 0xF) << 24)
  814. #define MASK_LBMODE 0xF000000
  815. #define LOOPBACK_NORMAL 0x0
  816. #define LOOPBACK_IMMEDIATELY 0xB
  817. #define LOOPBACK_MAC_DELAY 0x3
  818. #define LOOPBACK_PHY 0x1
  819. #define LOOPBACK_DMA 0x7
  820. #define GET_RX_PAGE_SIZE(value) ((value) & 0xF)
  821. #define GET_TX_PAGE_SIZE(value) (((value) & 0xF0) >> 4)
  822. #define _PSRX_MASK 0xF
  823. #define _PSTX_MASK 0xF0
  824. #define _PSRX(x) (x)
  825. #define _PSTX(x) ((x) << 4)
  826. #define PBP_64 0x0
  827. #define PBP_128 0x1
  828. #define PBP_256 0x2
  829. #define PBP_512 0x3
  830. #define PBP_1024 0x4
  831. #define RXDMA_ARBBW_EN BIT(0)
  832. #define RXSHFT_EN BIT(1)
  833. #define RXDMA_AGG_EN BIT(2)
  834. #define QS_VO_QUEUE BIT(8)
  835. #define QS_VI_QUEUE BIT(9)
  836. #define QS_BE_QUEUE BIT(10)
  837. #define QS_BK_QUEUE BIT(11)
  838. #define QS_MANAGER_QUEUE BIT(12)
  839. #define QS_HIGH_QUEUE BIT(13)
  840. #define HQSEL_VOQ BIT(0)
  841. #define HQSEL_VIQ BIT(1)
  842. #define HQSEL_BEQ BIT(2)
  843. #define HQSEL_BKQ BIT(3)
  844. #define HQSEL_MGTQ BIT(4)
  845. #define HQSEL_HIQ BIT(5)
  846. #define _TXDMA_HIQ_MAP(x) (((x)&0x3) << 14)
  847. #define _TXDMA_MGQ_MAP(x) (((x)&0x3) << 12)
  848. #define _TXDMA_BKQ_MAP(x) (((x)&0x3) << 10)
  849. #define _TXDMA_BEQ_MAP(x) (((x)&0x3) << 8)
  850. #define _TXDMA_VIQ_MAP(x) (((x)&0x3) << 6)
  851. #define _TXDMA_VOQ_MAP(x) (((x)&0x3) << 4)
  852. #define QUEUE_LOW 1
  853. #define QUEUE_NORMAL 2
  854. #define QUEUE_HIGH 3
  855. #define _LLT_NO_ACTIVE 0x0
  856. #define _LLT_WRITE_ACCESS 0x1
  857. #define _LLT_READ_ACCESS 0x2
  858. #define _LLT_INIT_DATA(x) ((x) & 0xFF)
  859. #define _LLT_INIT_ADDR(x) (((x) & 0xFF) << 8)
  860. #define _LLT_OP(x) (((x) & 0x3) << 30)
  861. #define _LLT_OP_VALUE(x) (((x) >> 30) & 0x3)
  862. #define BB_WRITE_READ_MASK (BIT(31) | BIT(30))
  863. #define BB_WRITE_EN BIT(30)
  864. #define BB_READ_EN BIT(31)
  865. #define _HPQ(x) ((x) & 0xFF)
  866. #define _LPQ(x) (((x) & 0xFF) << 8)
  867. #define _PUBQ(x) (((x) & 0xFF) << 16)
  868. #define _NPQ(x) ((x) & 0xFF)
  869. #define HPQ_PUBLIC_DIS BIT(24)
  870. #define LPQ_PUBLIC_DIS BIT(25)
  871. #define LD_RQPN BIT(31)
  872. #define BCN_VALID BIT(16)
  873. #define BCN_HEAD(x) (((x) & 0xFF) << 8)
  874. #define BCN_HEAD_MASK 0xFF00
  875. #define BLK_DESC_NUM_SHIFT 4
  876. #define BLK_DESC_NUM_MASK 0xF
  877. #define DROP_DATA_EN BIT(9)
  878. #define EN_AMPDU_RTY_NEW BIT(7)
  879. #define _INIRTSMCS_SEL(x) ((x) & 0x3F)
  880. #define _SPEC_SIFS_CCK(x) ((x) & 0xFF)
  881. #define _SPEC_SIFS_OFDM(x) (((x) & 0xFF) << 8)
  882. #define RATE_REG_BITMAP_ALL 0xFFFFF
  883. #define _RRSC_BITMAP(x) ((x) & 0xFFFFF)
  884. #define _RRSR_RSC(x) (((x) & 0x3) << 21)
  885. #define RRSR_RSC_RESERVED 0x0
  886. #define RRSR_RSC_UPPER_SUBCHANNEL 0x1
  887. #define RRSR_RSC_LOWER_SUBCHANNEL 0x2
  888. #define RRSR_RSC_DUPLICATE_MODE 0x3
  889. #define USE_SHORT_G1 BIT(20)
  890. #define _AGGLMT_MCS0(x) ((x) & 0xF)
  891. #define _AGGLMT_MCS1(x) (((x) & 0xF) << 4)
  892. #define _AGGLMT_MCS2(x) (((x) & 0xF) << 8)
  893. #define _AGGLMT_MCS3(x) (((x) & 0xF) << 12)
  894. #define _AGGLMT_MCS4(x) (((x) & 0xF) << 16)
  895. #define _AGGLMT_MCS5(x) (((x) & 0xF) << 20)
  896. #define _AGGLMT_MCS6(x) (((x) & 0xF) << 24)
  897. #define _AGGLMT_MCS7(x) (((x) & 0xF) << 28)
  898. #define RETRY_LIMIT_SHORT_SHIFT 8
  899. #define RETRY_LIMIT_LONG_SHIFT 0
  900. #define _DARF_RC1(x) ((x) & 0x1F)
  901. #define _DARF_RC2(x) (((x) & 0x1F) << 8)
  902. #define _DARF_RC3(x) (((x) & 0x1F) << 16)
  903. #define _DARF_RC4(x) (((x) & 0x1F) << 24)
  904. #define _DARF_RC5(x) ((x) & 0x1F)
  905. #define _DARF_RC6(x) (((x) & 0x1F) << 8)
  906. #define _DARF_RC7(x) (((x) & 0x1F) << 16)
  907. #define _DARF_RC8(x) (((x) & 0x1F) << 24)
  908. #define _RARF_RC1(x) ((x) & 0x1F)
  909. #define _RARF_RC2(x) (((x) & 0x1F) << 8)
  910. #define _RARF_RC3(x) (((x) & 0x1F) << 16)
  911. #define _RARF_RC4(x) (((x) & 0x1F) << 24)
  912. #define _RARF_RC5(x) ((x) & 0x1F)
  913. #define _RARF_RC6(x) (((x) & 0x1F) << 8)
  914. #define _RARF_RC7(x) (((x) & 0x1F) << 16)
  915. #define _RARF_RC8(x) (((x) & 0x1F) << 24)
  916. #define AC_PARAM_TXOP_OFFSET 16
  917. #define AC_PARAM_TXOP_LIMIT_OFFSET 16
  918. #define AC_PARAM_ECW_MAX_OFFSET 12
  919. #define AC_PARAM_ECW_MIN_OFFSET 8
  920. #define AC_PARAM_AIFS_OFFSET 0
  921. #define _AIFS(x) (x)
  922. #define _ECW_MAX_MIN(x) ((x) << 8)
  923. #define _TXOP_LIMIT(x) ((x) << 16)
  924. #define _BCNIFS(x) ((x) & 0xFF)
  925. #define _BCNECW(x) ((((x) & 0xF)) << 8)
  926. #define _LRL(x) ((x) & 0x3F)
  927. #define _SRL(x) (((x) & 0x3F) << 8)
  928. #define _SIFS_CCK_CTX(x) ((x) & 0xFF)
  929. #define _SIFS_CCK_TRX(x) (((x) & 0xFF) << 8)
  930. #define _SIFS_OFDM_CTX(x) ((x) & 0xFF)
  931. #define _SIFS_OFDM_TRX(x) (((x) & 0xFF) << 8)
  932. #define _TBTT_PROHIBIT_HOLD(x) (((x) & 0xFF) << 8)
  933. #define DIS_EDCA_CNT_DWN BIT(11)
  934. #define EN_MBSSID BIT(1)
  935. #define EN_TXBCN_RPT BIT(2)
  936. #define EN_BCN_FUNCTION BIT(3)
  937. #define TSFTR_RST BIT(0)
  938. #define TSFTR1_RST BIT(1)
  939. #define STOP_BCNQ BIT(6)
  940. #define DIS_TSF_UDT0_NORMAL_CHIP BIT(4)
  941. #define DIS_TSF_UDT0_TEST_CHIP BIT(5)
  942. #define AcmHw_HwEn BIT(0)
  943. #define AcmHw_BeqEn BIT(1)
  944. #define AcmHw_ViqEn BIT(2)
  945. #define AcmHw_VoqEn BIT(3)
  946. #define AcmHw_BeqStatus BIT(4)
  947. #define AcmHw_ViqStatus BIT(5)
  948. #define AcmHw_VoqStatus BIT(6)
  949. #define APSDOFF BIT(6)
  950. #define APSDOFF_STATUS BIT(7)
  951. #define BW_20MHZ BIT(2)
  952. #define RATE_BITMAP_ALL 0xFFFFF
  953. #define RATE_RRSR_CCK_ONLY_1M 0xFFFF1
  954. #define TSFRST BIT(0)
  955. #define DIS_GCLK BIT(1)
  956. #define PAD_SEL BIT(2)
  957. #define PWR_ST BIT(6)
  958. #define PWRBIT_OW_EN BIT(7)
  959. #define ACRC BIT(8)
  960. #define CFENDFORM BIT(9)
  961. #define ICV BIT(10)
  962. #define AAP BIT(0)
  963. #define APM BIT(1)
  964. #define AM BIT(2)
  965. #define AB BIT(3)
  966. #define ADD3 BIT(4)
  967. #define APWRMGT BIT(5)
  968. #define CBSSID BIT(6)
  969. #define CBSSID_DATA BIT(6)
  970. #define CBSSID_BCN BIT(7)
  971. #define ACRC32 BIT(8)
  972. #define AICV BIT(9)
  973. #define ADF BIT(11)
  974. #define ACF BIT(12)
  975. #define AMF BIT(13)
  976. #define HTC_LOC_CTRL BIT(14)
  977. #define UC_DATA_EN BIT(16)
  978. #define BM_DATA_EN BIT(17)
  979. #define MFBEN BIT(22)
  980. #define LSIGEN BIT(23)
  981. #define EnMBID BIT(24)
  982. #define APP_BASSN BIT(27)
  983. #define APP_PHYSTS BIT(28)
  984. #define APP_ICV BIT(29)
  985. #define APP_MIC BIT(30)
  986. #define APP_FCS BIT(31)
  987. #define _MIN_SPACE(x) ((x) & 0x7)
  988. #define _SHORT_GI_PADDING(x) (((x) & 0x1F) << 3)
  989. #define RXERR_TYPE_OFDM_PPDU 0
  990. #define RXERR_TYPE_OFDM_FALSE_ALARM 1
  991. #define RXERR_TYPE_OFDM_MPDU_OK 2
  992. #define RXERR_TYPE_OFDM_MPDU_FAIL 3
  993. #define RXERR_TYPE_CCK_PPDU 4
  994. #define RXERR_TYPE_CCK_FALSE_ALARM 5
  995. #define RXERR_TYPE_CCK_MPDU_OK 6
  996. #define RXERR_TYPE_CCK_MPDU_FAIL 7
  997. #define RXERR_TYPE_HT_PPDU 8
  998. #define RXERR_TYPE_HT_FALSE_ALARM 9
  999. #define RXERR_TYPE_HT_MPDU_TOTAL 10
  1000. #define RXERR_TYPE_HT_MPDU_OK 11
  1001. #define RXERR_TYPE_HT_MPDU_FAIL 12
  1002. #define RXERR_TYPE_RX_FULL_DROP 15
  1003. #define RXERR_COUNTER_MASK 0xFFFFF
  1004. #define RXERR_RPT_RST BIT(27)
  1005. #define _RXERR_RPT_SEL(type) ((type) << 28)
  1006. #define SCR_TxUseDK BIT(0)
  1007. #define SCR_RxUseDK BIT(1)
  1008. #define SCR_TxEncEnable BIT(2)
  1009. #define SCR_RxDecEnable BIT(3)
  1010. #define SCR_SKByA2 BIT(4)
  1011. #define SCR_NoSKMC BIT(5)
  1012. #define SCR_TXBCUSEDK BIT(6)
  1013. #define SCR_RXBCUSEDK BIT(7)
  1014. #define USB_IS_HIGH_SPEED 0
  1015. #define USB_IS_FULL_SPEED 1
  1016. #define USB_SPEED_MASK BIT(5)
  1017. #define USB_NORMAL_SIE_EP_MASK 0xF
  1018. #define USB_NORMAL_SIE_EP_SHIFT 4
  1019. #define USB_TEST_EP_MASK 0x30
  1020. #define USB_TEST_EP_SHIFT 4
  1021. #define USB_AGG_EN BIT(3)
  1022. #define LAST_ENTRY_OF_TX_PKT_BUFFER 255
  1023. #define POLLING_LLT_THRESHOLD 20
  1024. #define POLLING_READY_TIMEOUT_COUNT 1000
  1025. #define EPROM_CMD_OPERATING_MODE_MASK ((1<<7)|(1<<6))
  1026. #define EPROM_CMD_CONFIG 0x3
  1027. #define EPROM_CMD_LOAD 1
  1028. #define HWSET_MAX_SIZE 128
  1029. #define HWSET_MAX_SIZE_92S HWSET_MAX_SIZE
  1030. #define EFUSE_MAX_SECTION 16
  1031. #define WL_HWPDN_EN BIT(0)
  1032. #define HAL_8192C_HW_GPIO_WPS_BIT BIT(2)
  1033. #define RPMAC_RESET 0x100
  1034. #define RPMAC_TXSTART 0x104
  1035. #define RPMAC_TXLEGACYSIG 0x108
  1036. #define RPMAC_TXHTSIG1 0x10c
  1037. #define RPMAC_TXHTSIG2 0x110
  1038. #define RPMAC_PHYDEBUG 0x114
  1039. #define RPMAC_TXPACKETNUM 0x118
  1040. #define RPMAC_TXIDLE 0x11c
  1041. #define RPMAC_TXMACHEADER0 0x120
  1042. #define RPMAC_TXMACHEADER1 0x124
  1043. #define RPMAC_TXMACHEADER2 0x128
  1044. #define RPMAC_TXMACHEADER3 0x12c
  1045. #define RPMAC_TXMACHEADER4 0x130
  1046. #define RPMAC_TXMACHEADER5 0x134
  1047. #define RPMAC_TXDADATYPE 0x138
  1048. #define RPMAC_TXRANDOMSEED 0x13c
  1049. #define RPMAC_CCKPLCPPREAMBLE 0x140
  1050. #define RPMAC_CCKPLCPHEADER 0x144
  1051. #define RPMAC_CCKCRC16 0x148
  1052. #define RPMAC_OFDMRXCRC32OK 0x170
  1053. #define RPMAC_OFDMRXCRC32Er 0x174
  1054. #define RPMAC_OFDMRXPARITYER 0x178
  1055. #define RPMAC_OFDMRXCRC8ER 0x17c
  1056. #define RPMAC_CCKCRXRC16ER 0x180
  1057. #define RPMAC_CCKCRXRC32ER 0x184
  1058. #define RPMAC_CCKCRXRC32OK 0x188
  1059. #define RPMAC_TXSTATUS 0x18c
  1060. #define RFPGA0_RFMOD 0x800
  1061. #define RFPGA0_TXINFO 0x804
  1062. #define RFPGA0_PSDFUNCTION 0x808
  1063. #define RFPGA0_TXGAINSTAGE 0x80c
  1064. #define RFPGA0_RFTIMING1 0x810
  1065. #define RFPGA0_RFTIMING2 0x814
  1066. #define RFPGA0_XA_HSSIPARAMETER1 0x820
  1067. #define RFPGA0_XA_HSSIPARAMETER2 0x824
  1068. #define RFPGA0_XB_HSSIPARAMETER1 0x828
  1069. #define RFPGA0_XB_HSSIPARAMETER2 0x82c
  1070. #define RFPGA0_XA_LSSIPARAMETER 0x840
  1071. #define RFPGA0_XB_LSSIPARAMETER 0x844
  1072. #define RFPGA0_RFWAKEUPPARAMETER 0x850
  1073. #define RFPGA0_RFSLEEPUPPARAMETER 0x854
  1074. #define RFPGA0_XAB_SWITCHCONTROL 0x858
  1075. #define RFPGA0_XCD_SWITCHCONTROL 0x85c
  1076. #define RFPGA0_XA_RFINTERFACEOE 0x860
  1077. #define RFPGA0_XB_RFINTERFACEOE 0x864
  1078. #define RFPGA0_XAB_RFINTERFACESW 0x870
  1079. #define RFPGA0_XCD_RFINTERFACESW 0x874
  1080. #define rFPGA0_XAB_RFPARAMETER 0x878
  1081. #define rFPGA0_XCD_RFPARAMETER 0x87c
  1082. #define RFPGA0_ANALOGPARAMETER1 0x880
  1083. #define RFPGA0_ANALOGPARAMETER2 0x884
  1084. #define RFPGA0_ANALOGPARAMETER3 0x888
  1085. #define RFPGA0_ANALOGPARAMETER4 0x88c
  1086. #define RFPGA0_XA_LSSIREADBACK 0x8a0
  1087. #define RFPGA0_XB_LSSIREADBACK 0x8a4
  1088. #define RFPGA0_XC_LSSIREADBACK 0x8a8
  1089. #define RFPGA0_XD_LSSIREADBACK 0x8ac
  1090. #define RFPGA0_PSDREPORT 0x8b4
  1091. #define TRANSCEIVEA_HSPI_READBACK 0x8b8
  1092. #define TRANSCEIVEB_HSPI_READBACK 0x8bc
  1093. #define RFPGA0_XAB_RFINTERFACERB 0x8e0
  1094. #define RFPGA0_XCD_RFINTERFACERB 0x8e4
  1095. #define RFPGA1_RFMOD 0x900
  1096. #define RFPGA1_TXBLOCK 0x904
  1097. #define RFPGA1_DEBUGSELECT 0x908
  1098. #define RFPGA1_TXINFO 0x90c
  1099. #define RCCK0_SYSTEM 0xa00
  1100. #define RCCK0_AFESETTING 0xa04
  1101. #define RCCK0_CCA 0xa08
  1102. #define RCCK0_RXAGC1 0xa0c
  1103. #define RCCK0_RXAGC2 0xa10
  1104. #define RCCK0_RXHP 0xa14
  1105. #define RCCK0_DSPPARAMETER1 0xa18
  1106. #define RCCK0_DSPPARAMETER2 0xa1c
  1107. #define RCCK0_TXFILTER1 0xa20
  1108. #define RCCK0_TXFILTER2 0xa24
  1109. #define RCCK0_DEBUGPORT 0xa28
  1110. #define RCCK0_FALSEALARMREPORT 0xa2c
  1111. #define RCCK0_TRSSIREPORT 0xa50
  1112. #define RCCK0_RXREPORT 0xa54
  1113. #define RCCK0_FACOUNTERLOWER 0xa5c
  1114. #define RCCK0_FACOUNTERUPPER 0xa58
  1115. #define ROFDM0_LSTF 0xc00
  1116. #define ROFDM0_TRXPATHENABLE 0xc04
  1117. #define ROFDM0_TRMUXPAR 0xc08
  1118. #define ROFDM0_TRSWISOLATION 0xc0c
  1119. #define ROFDM0_XARXAFE 0xc10
  1120. #define ROFDM0_XARXIQIMBALANCE 0xc14
  1121. #define ROFDM0_XBRXAFE 0xc18
  1122. #define ROFDM0_XBRXIQIMBALANCE 0xc1c
  1123. #define ROFDM0_XCRXAFE 0xc20
  1124. #define ROFDM0_XCRXIQIMBANLANCE 0xc24
  1125. #define ROFDM0_XDRXAFE 0xc28
  1126. #define ROFDM0_XDRXIQIMBALANCE 0xc2c
  1127. #define ROFDM0_RXDETECTOR1 0xc30
  1128. #define ROFDM0_RXDETECTOR2 0xc34
  1129. #define ROFDM0_RXDETECTOR3 0xc38
  1130. #define ROFDM0_RXDETECTOR4 0xc3c
  1131. #define ROFDM0_RXDSP 0xc40
  1132. #define ROFDM0_CFOANDDAGC 0xc44
  1133. #define ROFDM0_CCADROPTHRESHOLD 0xc48
  1134. #define ROFDM0_ECCATHRESHOLD 0xc4c
  1135. #define ROFDM0_XAAGCCORE1 0xc50
  1136. #define ROFDM0_XAAGCCORE2 0xc54
  1137. #define ROFDM0_XBAGCCORE1 0xc58
  1138. #define ROFDM0_XBAGCCORE2 0xc5c
  1139. #define ROFDM0_XCAGCCORE1 0xc60
  1140. #define ROFDM0_XCAGCCORE2 0xc64
  1141. #define ROFDM0_XDAGCCORE1 0xc68
  1142. #define ROFDM0_XDAGCCORE2 0xc6c
  1143. #define ROFDM0_AGCPARAMETER1 0xc70
  1144. #define ROFDM0_AGCPARAMETER2 0xc74
  1145. #define ROFDM0_AGCRSSITABLE 0xc78
  1146. #define ROFDM0_HTSTFAGC 0xc7c
  1147. #define ROFDM0_XATXIQIMBALANCE 0xc80
  1148. #define ROFDM0_XATXAFE 0xc84
  1149. #define ROFDM0_XBTXIQIMBALANCE 0xc88
  1150. #define ROFDM0_XBTXAFE 0xc8c
  1151. #define ROFDM0_XCTXIQIMBALANCE 0xc90
  1152. #define ROFDM0_XCTXAFE 0xc94
  1153. #define ROFDM0_XDTXIQIMBALANCE 0xc98
  1154. #define ROFDM0_XDTXAFE 0xc9c
  1155. #define ROFDM0_RXIQEXTANTA 0xca0
  1156. #define ROFDM0_RXHPPARAMETER 0xce0
  1157. #define ROFDM0_TXPSEUDONOISEWGT 0xce4
  1158. #define ROFDM0_FRAMESYNC 0xcf0
  1159. #define ROFDM0_DFSREPORT 0xcf4
  1160. #define ROFDM0_TXCOEFF1 0xca4
  1161. #define ROFDM0_TXCOEFF2 0xca8
  1162. #define ROFDM0_TXCOEFF3 0xcac
  1163. #define ROFDM0_TXCOEFF4 0xcb0
  1164. #define ROFDM0_TXCOEFF5 0xcb4
  1165. #define ROFDM0_TXCOEFF6 0xcb8
  1166. #define ROFDM1_LSTF 0xd00
  1167. #define ROFDM1_TRXPATHENABLE 0xd04
  1168. #define ROFDM1_CF0 0xd08
  1169. #define ROFDM1_CSI1 0xd10
  1170. #define ROFDM1_SBD 0xd14
  1171. #define ROFDM1_CSI2 0xd18
  1172. #define ROFDM1_CFOTRACKING 0xd2c
  1173. #define ROFDM1_TRXMESAURE1 0xd34
  1174. #define ROFDM1_INTFDET 0xd3c
  1175. #define ROFDM1_PSEUDONOISESTATEAB 0xd50
  1176. #define ROFDM1_PSEUDONOISESTATECD 0xd54
  1177. #define ROFDM1_RXPSEUDONOISEWGT 0xd58
  1178. #define ROFDM_PHYCOUNTER1 0xda0
  1179. #define ROFDM_PHYCOUNTER2 0xda4
  1180. #define ROFDM_PHYCOUNTER3 0xda8
  1181. #define ROFDM_SHORTCFOAB 0xdac
  1182. #define ROFDM_SHORTCFOCD 0xdb0
  1183. #define ROFDM_LONGCFOAB 0xdb4
  1184. #define ROFDM_LONGCFOCD 0xdb8
  1185. #define ROFDM_TAILCF0AB 0xdbc
  1186. #define ROFDM_TAILCF0CD 0xdc0
  1187. #define ROFDM_PWMEASURE1 0xdc4
  1188. #define ROFDM_PWMEASURE2 0xdc8
  1189. #define ROFDM_BWREPORT 0xdcc
  1190. #define ROFDM_AGCREPORT 0xdd0
  1191. #define ROFDM_RXSNR 0xdd4
  1192. #define ROFDM_RXEVMCSI 0xdd8
  1193. #define ROFDM_SIGREPORT 0xddc
  1194. #define RTXAGC_A_RATE18_06 0xe00
  1195. #define RTXAGC_A_RATE54_24 0xe04
  1196. #define RTXAGC_A_CCK1_MCS32 0xe08
  1197. #define RTXAGC_A_MCS03_MCS00 0xe10
  1198. #define RTXAGC_A_MCS07_MCS04 0xe14
  1199. #define RTXAGC_A_MCS11_MCS08 0xe18
  1200. #define RTXAGC_A_MCS15_MCS12 0xe1c
  1201. #define RTXAGC_B_RATE18_06 0x830
  1202. #define RTXAGC_B_RATE54_24 0x834
  1203. #define RTXAGC_B_CCK1_55_MCS32 0x838
  1204. #define RTXAGC_B_MCS03_MCS00 0x83c
  1205. #define RTXAGC_B_MCS07_MCS04 0x848
  1206. #define RTXAGC_B_MCS11_MCS08 0x84c
  1207. #define RTXAGC_B_MCS15_MCS12 0x868
  1208. #define RTXAGC_B_CCK11_A_CCK2_11 0x86c
  1209. #define RZEBRA1_HSSIENABLE 0x0
  1210. #define RZEBRA1_TRXENABLE1 0x1
  1211. #define RZEBRA1_TRXENABLE2 0x2
  1212. #define RZEBRA1_AGC 0x4
  1213. #define RZEBRA1_CHARGEPUMP 0x5
  1214. #define RZEBRA1_CHANNEL 0x7
  1215. #define RZEBRA1_TXGAIN 0x8
  1216. #define RZEBRA1_TXLPF 0x9
  1217. #define RZEBRA1_RXLPF 0xb
  1218. #define RZEBRA1_RXHPFCORNER 0xc
  1219. #define RGLOBALCTRL 0
  1220. #define RRTL8256_TXLPF 19
  1221. #define RRTL8256_RXLPF 11
  1222. #define RRTL8258_TXLPF 0x11
  1223. #define RRTL8258_RXLPF 0x13
  1224. #define RRTL8258_RSSILPF 0xa
  1225. #define RF_AC 0x00
  1226. #define RF_IQADJ_G1 0x01
  1227. #define RF_IQADJ_G2 0x02
  1228. #define RF_POW_TRSW 0x05
  1229. #define RF_GAIN_RX 0x06
  1230. #define RF_GAIN_TX 0x07
  1231. #define RF_TXM_IDAC 0x08
  1232. #define RF_BS_IQGEN 0x0F
  1233. #define RF_MODE1 0x10
  1234. #define RF_MODE2 0x11
  1235. #define RF_RX_AGC_HP 0x12
  1236. #define RF_TX_AGC 0x13
  1237. #define RF_BIAS 0x14
  1238. #define RF_IPA 0x15
  1239. #define RF_POW_ABILITY 0x17
  1240. #define RF_MODE_AG 0x18
  1241. #define RRFCHANNEL 0x18
  1242. #define RF_CHNLBW 0x18
  1243. #define RF_TOP 0x19
  1244. #define RF_RX_G1 0x1A
  1245. #define RF_RX_G2 0x1B
  1246. #define RF_RX_BB2 0x1C
  1247. #define RF_RX_BB1 0x1D
  1248. #define RF_RCK1 0x1E
  1249. #define RF_RCK2 0x1F
  1250. #define RF_TX_G1 0x20
  1251. #define RF_TX_G2 0x21
  1252. #define RF_TX_G3 0x22
  1253. #define RF_TX_BB1 0x23
  1254. #define RF_T_METER 0x24
  1255. #define RF_SYN_G1 0x25
  1256. #define RF_SYN_G2 0x26
  1257. #define RF_SYN_G3 0x27
  1258. #define RF_SYN_G4 0x28
  1259. #define RF_SYN_G5 0x29
  1260. #define RF_SYN_G6 0x2A
  1261. #define RF_SYN_G7 0x2B
  1262. #define RF_SYN_G8 0x2C
  1263. #define RF_RCK_OS 0x30
  1264. #define RF_TXPA_G1 0x31
  1265. #define RF_TXPA_G2 0x32
  1266. #define RF_TXPA_G3 0x33
  1267. #define BBBRESETB 0x100
  1268. #define BGLOBALRESETB 0x200
  1269. #define BOFDMTXSTART 0x4
  1270. #define BCCKTXSTART 0x8
  1271. #define BCRC32DEBUG 0x100
  1272. #define BPMACLOOPBACK 0x10
  1273. #define BTXLSIG 0xffffff
  1274. #define BOFDMTXRATE 0xf
  1275. #define BOFDMTXRESERVED 0x10
  1276. #define BOFDMTXLENGTH 0x1ffe0
  1277. #define BOFDMTXPARITY 0x20000
  1278. #define BTXHTSIG1 0xffffff
  1279. #define BTXHTMCSRATE 0x7f
  1280. #define BTXHTBW 0x80
  1281. #define BTXHTLENGTH 0xffff00
  1282. #define BTXHTSIG2 0xffffff
  1283. #define BTXHTSMOOTHING 0x1
  1284. #define BTXHTSOUNDING 0x2
  1285. #define BTXHTRESERVED 0x4
  1286. #define BTXHTAGGREATION 0x8
  1287. #define BTXHTSTBC 0x30
  1288. #define BTXHTADVANCECODING 0x40
  1289. #define BTXHTSHORTGI 0x80
  1290. #define BTXHTNUMBERHT_LTF 0x300
  1291. #define BTXHTCRC8 0x3fc00
  1292. #define BCOUNTERRESET 0x10000
  1293. #define BNUMOFOFDMTX 0xffff
  1294. #define BNUMOFCCKTX 0xffff0000
  1295. #define BTXIDLEINTERVAL 0xffff
  1296. #define BOFDMSERVICE 0xffff0000
  1297. #define BTXMACHEADER 0xffffffff
  1298. #define BTXDATAINIT 0xff
  1299. #define BTXHTMODE 0x100
  1300. #define BTXDATATYPE 0x30000
  1301. #define BTXRANDOMSEED 0xffffffff
  1302. #define BCCKTXPREAMBLE 0x1
  1303. #define BCCKTXSFD 0xffff0000
  1304. #define BCCKTXSIG 0xff
  1305. #define BCCKTXSERVICE 0xff00
  1306. #define BCCKLENGTHEXT 0x8000
  1307. #define BCCKTXLENGHT 0xffff0000
  1308. #define BCCKTXCRC16 0xffff
  1309. #define BCCKTXSTATUS 0x1
  1310. #define BOFDMTXSTATUS 0x2
  1311. #define IS_BB_REG_OFFSET_92S(_Offset) \
  1312. ((_Offset >= 0x800) && (_Offset <= 0xfff))
  1313. #define BRFMOD 0x1
  1314. #define BJAPANMODE 0x2
  1315. #define BCCKTXSC 0x30
  1316. #define BCCKEN 0x1000000
  1317. #define BOFDMEN 0x2000000
  1318. #define BOFDMRXADCPHASE 0x10000
  1319. #define BOFDMTXDACPHASE 0x40000
  1320. #define BXATXAGC 0x3f
  1321. #define BXBTXAGC 0xf00
  1322. #define BXCTXAGC 0xf000
  1323. #define BXDTXAGC 0xf0000
  1324. #define BPASTART 0xf0000000
  1325. #define BTRSTART 0x00f00000
  1326. #define BRFSTART 0x0000f000
  1327. #define BBBSTART 0x000000f0
  1328. #define BBBCCKSTART 0x0000000f
  1329. #define BPAEND 0xf
  1330. #define BTREND 0x0f000000
  1331. #define BRFEND 0x000f0000
  1332. #define BCCAMASK 0x000000f0
  1333. #define BR2RCCAMASK 0x00000f00
  1334. #define BHSSI_R2TDELAY 0xf8000000
  1335. #define BHSSI_T2RDELAY 0xf80000
  1336. #define BCONTXHSSI 0x400
  1337. #define BIGFROMCCK 0x200
  1338. #define BAGCADDRESS 0x3f
  1339. #define BRXHPTX 0x7000
  1340. #define BRXHP2RX 0x38000
  1341. #define BRXHPCCKINI 0xc0000
  1342. #define BAGCTXCODE 0xc00000
  1343. #define BAGCRXCODE 0x300000
  1344. #define B3WIREDATALENGTH 0x800
  1345. #define B3WIREADDREAALENGTH 0x400
  1346. #define B3WIRERFPOWERDOWN 0x1
  1347. #define B5GPAPEPOLARITY 0x40000000
  1348. #define B2GPAPEPOLARITY 0x80000000
  1349. #define BRFSW_TXDEFAULTANT 0x3
  1350. #define BRFSW_TXOPTIONANT 0x30
  1351. #define BRFSW_RXDEFAULTANT 0x300
  1352. #define BRFSW_RXOPTIONANT 0x3000
  1353. #define BRFSI_3WIREDATA 0x1
  1354. #define BRFSI_3WIRECLOCK 0x2
  1355. #define BRFSI_3WIRELOAD 0x4
  1356. #define BRFSI_3WIRERW 0x8
  1357. #define BRFSI_3WIRE 0xf
  1358. #define BRFSI_RFENV 0x10
  1359. #define BRFSI_TRSW 0x20
  1360. #define BRFSI_TRSWB 0x40
  1361. #define BRFSI_ANTSW 0x100
  1362. #define BRFSI_ANTSWB 0x200
  1363. #define BRFSI_PAPE 0x400
  1364. #define BRFSI_PAPE5G 0x800
  1365. #define BBANDSELECT 0x1
  1366. #define BHTSIG2_GI 0x80
  1367. #define BHTSIG2_SMOOTHING 0x01
  1368. #define BHTSIG2_SOUNDING 0x02
  1369. #define BHTSIG2_AGGREATON 0x08
  1370. #define BHTSIG2_STBC 0x30
  1371. #define BHTSIG2_ADVCODING 0x40
  1372. #define BHTSIG2_NUMOFHTLTF 0x300
  1373. #define BHTSIG2_CRC8 0x3fc
  1374. #define BHTSIG1_MCS 0x7f
  1375. #define BHTSIG1_BANDWIDTH 0x80
  1376. #define BHTSIG1_HTLENGTH 0xffff
  1377. #define BLSIG_RATE 0xf
  1378. #define BLSIG_RESERVED 0x10
  1379. #define BLSIG_LENGTH 0x1fffe
  1380. #define BLSIG_PARITY 0x20
  1381. #define BCCKRXPHASE 0x4
  1382. #define BLSSIREADADDRESS 0x7f800000
  1383. #define BLSSIREADEDGE 0x80000000
  1384. #define BLSSIREADBACKDATA 0xfffff
  1385. #define BLSSIREADOKFLAG 0x1000
  1386. #define BCCKSAMPLERATE 0x8
  1387. #define BREGULATOR0STANDBY 0x1
  1388. #define BREGULATORPLLSTANDBY 0x2
  1389. #define BREGULATOR1STANDBY 0x4
  1390. #define BPLLPOWERUP 0x8
  1391. #define BDPLLPOWERUP 0x10
  1392. #define BDA10POWERUP 0x20
  1393. #define BAD7POWERUP 0x200
  1394. #define BDA6POWERUP 0x2000
  1395. #define BXTALPOWERUP 0x4000
  1396. #define B40MDCLKPOWERUP 0x8000
  1397. #define BDA6DEBUGMODE 0x20000
  1398. #define BDA6SWING 0x380000
  1399. #define BADCLKPHASE 0x4000000
  1400. #define B80MCLKDELAY 0x18000000
  1401. #define BAFEWATCHDOGENABLE 0x20000000
  1402. #define BXTALCAP01 0xc0000000
  1403. #define BXTALCAP23 0x3
  1404. #define BXTALCAP92X 0x0f000000
  1405. #define BXTALCAP 0x0f000000
  1406. #define BINTDIFCLKENABLE 0x400
  1407. #define BEXTSIGCLKENABLE 0x800
  1408. #define BBANDGAP_MBIAS_POWERUP 0x10000
  1409. #define BAD11SH_GAIN 0xc0000
  1410. #define BAD11NPUT_RANGE 0x700000
  1411. #define BAD110P_CURRENT 0x3800000
  1412. #define BLPATH_LOOPBACK 0x4000000
  1413. #define BQPATH_LOOPBACK 0x8000000
  1414. #define BAFE_LOOPBACK 0x10000000
  1415. #define BDA10_SWING 0x7e0
  1416. #define BDA10_REVERSE 0x800
  1417. #define BDA_CLK_SOURCE 0x1000
  1418. #define BDA7INPUT_RANGE 0x6000
  1419. #define BDA7_GAIN 0x38000
  1420. #define BDA7OUTPUT_CM_MODE 0x40000
  1421. #define BDA7INPUT_CM_MODE 0x380000
  1422. #define BDA7CURRENT 0xc00000
  1423. #define BREGULATOR_ADJUST 0x7000000
  1424. #define BAD11POWERUP_ATTX 0x1
  1425. #define BDA10PS_ATTX 0x10
  1426. #define BAD11POWERUP_ATRX 0x100
  1427. #define BDA10PS_ATRX 0x1000
  1428. #define BCCKRX_AGC_FORMAT 0x200
  1429. #define BPSDFFT_SAMPLE_POINT 0xc000
  1430. #define BPSD_AVERAGE_NUM 0x3000
  1431. #define BIQPATH_CONTROL 0xc00
  1432. #define BPSD_FREQ 0x3ff
  1433. #define BPSD_ANTENNA_PATH 0x30
  1434. #define BPSD_IQ_SWITCH 0x40
  1435. #define BPSD_RX_TRIGGER 0x400000
  1436. #define BPSD_TX_TRIGGER 0x80000000
  1437. #define BPSD_SINE_TONE_SCALE 0x7f000000
  1438. #define BPSD_REPORT 0xffff
  1439. #define BOFDM_TXSC 0x30000000
  1440. #define BCCK_TXON 0x1
  1441. #define BOFDM_TXON 0x2
  1442. #define BDEBUG_PAGE 0xfff
  1443. #define BDEBUG_ITEM 0xff
  1444. #define BANTL 0x10
  1445. #define BANT_NONHT 0x100
  1446. #define BANT_HT1 0x1000
  1447. #define BANT_HT2 0x10000
  1448. #define BANT_HT1S1 0x100000
  1449. #define BANT_NONHTS1 0x1000000
  1450. #define BCCK_BBMODE 0x3
  1451. #define BCCK_TXPOWERSAVING 0x80
  1452. #define BCCK_RXPOWERSAVING 0x40
  1453. #define BCCK_SIDEBAND 0x10
  1454. #define BCCK_SCRAMBLE 0x8
  1455. #define BCCK_ANTDIVERSITY 0x8000
  1456. #define BCCK_CARRIER_RECOVERY 0x4000
  1457. #define BCCK_TXRATE 0x3000
  1458. #define BCCK_DCCANCEL 0x0800
  1459. #define BCCK_ISICANCEL 0x0400
  1460. #define BCCK_MATCH_FILTER 0x0200
  1461. #define BCCK_EQUALIZER 0x0100
  1462. #define BCCK_PREAMBLE_DETECT 0x800000
  1463. #define BCCK_FAST_FALSECCA 0x400000
  1464. #define BCCK_CH_ESTSTART 0x300000
  1465. #define BCCK_CCA_COUNT 0x080000
  1466. #define BCCK_CS_LIM 0x070000
  1467. #define BCCK_BIST_MODE 0x80000000
  1468. #define BCCK_CCAMASK 0x40000000
  1469. #define BCCK_TX_DAC_PHASE 0x4
  1470. #define BCCK_RX_ADC_PHASE 0x20000000
  1471. #define BCCKR_CP_MODE 0x0100
  1472. #define BCCK_TXDC_OFFSET 0xf0
  1473. #define BCCK_RXDC_OFFSET 0xf
  1474. #define BCCK_CCA_MODE 0xc000
  1475. #define BCCK_FALSECS_LIM 0x3f00
  1476. #define BCCK_CS_RATIO 0xc00000
  1477. #define BCCK_CORGBIT_SEL 0x300000
  1478. #define BCCK_PD_LIM 0x0f0000
  1479. #define BCCK_NEWCCA 0x80000000
  1480. #define BCCK_RXHP_OF_IG 0x8000
  1481. #define BCCK_RXIG 0x7f00
  1482. #define BCCK_LNA_POLARITY 0x800000
  1483. #define BCCK_RX1ST_BAIN 0x7f0000
  1484. #define BCCK_RF_EXTEND 0x20000000
  1485. #define BCCK_RXAGC_SATLEVEL 0x1f000000
  1486. #define BCCK_RXAGC_SATCOUNT 0xe0
  1487. #define bCCKRxRFSettle 0x1f
  1488. #define BCCK_FIXED_RXAGC 0x8000
  1489. #define BCCK_ANTENNA_POLARITY 0x2000
  1490. #define BCCK_TXFILTER_TYPE 0x0c00
  1491. #define BCCK_RXAGC_REPORTTYPE 0x0300
  1492. #define BCCK_RXDAGC_EN 0x80000000
  1493. #define BCCK_RXDAGC_PERIOD 0x20000000
  1494. #define BCCK_RXDAGC_SATLEVEL 0x1f000000
  1495. #define BCCK_TIMING_RECOVERY 0x800000
  1496. #define BCCK_TXC0 0x3f0000
  1497. #define BCCK_TXC1 0x3f000000
  1498. #define BCCK_TXC2 0x3f
  1499. #define BCCK_TXC3 0x3f00
  1500. #define BCCK_TXC4 0x3f0000
  1501. #define BCCK_TXC5 0x3f000000
  1502. #define BCCK_TXC6 0x3f
  1503. #define BCCK_TXC7 0x3f00
  1504. #define BCCK_DEBUGPORT 0xff0000
  1505. #define BCCK_DAC_DEBUG 0x0f000000
  1506. #define BCCK_FALSEALARM_ENABLE 0x8000
  1507. #define BCCK_FALSEALARM_READ 0x4000
  1508. #define BCCK_TRSSI 0x7f
  1509. #define BCCK_RXAGC_REPORT 0xfe
  1510. #define BCCK_RXREPORT_ANTSEL 0x80000000
  1511. #define BCCK_RXREPORT_MFOFF 0x40000000
  1512. #define BCCK_RXREPORT_SQLOSS 0x20000000
  1513. #define BCCK_RXREPORT_PKTLOSS 0x10000000
  1514. #define BCCK_RXREPORT_LOCKEDBIT 0x08000000
  1515. #define BCCK_RXREPORT_RATEERROR 0x04000000
  1516. #define BCCK_RXREPORT_RXRATE 0x03000000
  1517. #define BCCK_RXFA_COUNTER_LOWER 0xff
  1518. #define BCCK_RXFA_COUNTER_UPPER 0xff000000
  1519. #define BCCK_RXHPAGC_START 0xe000
  1520. #define BCCK_RXHPAGC_FINAL 0x1c00
  1521. #define BCCK_RXFALSEALARM_ENABLE 0x8000
  1522. #define BCCK_FACOUNTER_FREEZE 0x4000
  1523. #define BCCK_TXPATH_SEL 0x10000000
  1524. #define BCCK_DEFAULT_RXPATH 0xc000000
  1525. #define BCCK_OPTION_RXPATH 0x3000000
  1526. #define BNUM_OFSTF 0x3
  1527. #define BSHIFT_L 0xc0
  1528. #define BGI_TH 0xc
  1529. #define BRXPATH_A 0x1
  1530. #define BRXPATH_B 0x2
  1531. #define BRXPATH_C 0x4
  1532. #define BRXPATH_D 0x8
  1533. #define BTXPATH_A 0x1
  1534. #define BTXPATH_B 0x2
  1535. #define BTXPATH_C 0x4
  1536. #define BTXPATH_D 0x8
  1537. #define BTRSSI_FREQ 0x200
  1538. #define BADC_BACKOFF 0x3000
  1539. #define BDFIR_BACKOFF 0xc000
  1540. #define BTRSSI_LATCH_PHASE 0x10000
  1541. #define BRX_LDC_OFFSET 0xff
  1542. #define BRX_QDC_OFFSET 0xff00
  1543. #define BRX_DFIR_MODE 0x1800000
  1544. #define BRX_DCNF_TYPE 0xe000000
  1545. #define BRXIQIMB_A 0x3ff
  1546. #define BRXIQIMB_B 0xfc00
  1547. #define BRXIQIMB_C 0x3f0000
  1548. #define BRXIQIMB_D 0xffc00000
  1549. #define BDC_DC_NOTCH 0x60000
  1550. #define BRXNB_NOTCH 0x1f000000
  1551. #define BPD_TH 0xf
  1552. #define BPD_TH_OPT2 0xc000
  1553. #define BPWED_TH 0x700
  1554. #define BIFMF_WIN_L 0x800
  1555. #define BPD_OPTION 0x1000
  1556. #define BMF_WIN_L 0xe000
  1557. #define BBW_SEARCH_L 0x30000
  1558. #define BWIN_ENH_L 0xc0000
  1559. #define BBW_TH 0x700000
  1560. #define BED_TH2 0x3800000
  1561. #define BBW_OPTION 0x4000000
  1562. #define BRADIO_TH 0x18000000
  1563. #define BWINDOW_L 0xe0000000
  1564. #define BSBD_OPTION 0x1
  1565. #define BFRAME_TH 0x1c
  1566. #define BFS_OPTION 0x60
  1567. #define BDC_SLOPE_CHECK 0x80
  1568. #define BFGUARD_COUNTER_DC_L 0xe00
  1569. #define BFRAME_WEIGHT_SHORT 0x7000
  1570. #define BSUB_TUNE 0xe00000
  1571. #define BFRAME_DC_LENGTH 0xe000000
  1572. #define BSBD_START_OFFSET 0x30000000
  1573. #define BFRAME_TH_2 0x7
  1574. #define BFRAME_GI2_TH 0x38
  1575. #define BGI2_SYNC_EN 0x40
  1576. #define BSARCH_SHORT_EARLY 0x300
  1577. #define BSARCH_SHORT_LATE 0xc00
  1578. #define BSARCH_GI2_LATE 0x70000
  1579. #define BCFOANTSUM 0x1
  1580. #define BCFOACC 0x2
  1581. #define BCFOSTARTOFFSET 0xc
  1582. #define BCFOLOOPBACK 0x70
  1583. #define BCFOSUMWEIGHT 0x80
  1584. #define BDAGCENABLE 0x10000
  1585. #define BTXIQIMB_A 0x3ff
  1586. #define BTXIQIMB_b 0xfc00
  1587. #define BTXIQIMB_C 0x3f0000
  1588. #define BTXIQIMB_D 0xffc00000
  1589. #define BTXIDCOFFSET 0xff
  1590. #define BTXIQDCOFFSET 0xff00
  1591. #define BTXDFIRMODE 0x10000
  1592. #define BTXPESUDO_NOISEON 0x4000000
  1593. #define BTXPESUDO_NOISE_A 0xff
  1594. #define BTXPESUDO_NOISE_B 0xff00
  1595. #define BTXPESUDO_NOISE_C 0xff0000
  1596. #define BTXPESUDO_NOISE_D 0xff000000
  1597. #define BCCA_DROPOPTION 0x20000
  1598. #define BCCA_DROPTHRES 0xfff00000
  1599. #define BEDCCA_H 0xf
  1600. #define BEDCCA_L 0xf0
  1601. #define BLAMBDA_ED 0x300
  1602. #define BRX_INITIALGAIN 0x7f
  1603. #define BRX_ANTDIV_EN 0x80
  1604. #define BRX_AGC_ADDRESS_FOR_LNA 0x7f00
  1605. #define BRX_HIGHPOWER_FLOW 0x8000
  1606. #define BRX_AGC_FREEZE_THRES 0xc0000
  1607. #define BRX_FREEZESTEP_AGC1 0x300000
  1608. #define BRX_FREEZESTEP_AGC2 0xc00000
  1609. #define BRX_FREEZESTEP_AGC3 0x3000000
  1610. #define BRX_FREEZESTEP_AGC0 0xc000000
  1611. #define BRXRSSI_CMP_EN 0x10000000
  1612. #define BRXQUICK_AGCEN 0x20000000
  1613. #define BRXAGC_FREEZE_THRES_MODE 0x40000000
  1614. #define BRX_OVERFLOW_CHECKTYPE 0x80000000
  1615. #define BRX_AGCSHIFT 0x7f
  1616. #define BTRSW_TRI_ONLY 0x80
  1617. #define BPOWER_THRES 0x300
  1618. #define BRXAGC_EN 0x1
  1619. #define BRXAGC_TOGETHER_EN 0x2
  1620. #define BRXAGC_MIN 0x4
  1621. #define BRXHP_INI 0x7
  1622. #define BRXHP_TRLNA 0x70
  1623. #define BRXHP_RSSI 0x700
  1624. #define BRXHP_BBP1 0x7000
  1625. #define BRXHP_BBP2 0x70000
  1626. #define BRXHP_BBP3 0x700000
  1627. #define BRSSI_H 0x7f0000
  1628. #define BRSSI_GEN 0x7f000000
  1629. #define BRXSETTLE_TRSW 0x7
  1630. #define BRXSETTLE_LNA 0x38
  1631. #define BRXSETTLE_RSSI 0x1c0
  1632. #define BRXSETTLE_BBP 0xe00
  1633. #define BRXSETTLE_RXHP 0x7000
  1634. #define BRXSETTLE_ANTSW_RSSI 0x38000
  1635. #define BRXSETTLE_ANTSW 0xc0000
  1636. #define BRXPROCESS_TIME_DAGC 0x300000
  1637. #define BRXSETTLE_HSSI 0x400000
  1638. #define BRXPROCESS_TIME_BBPPW 0x800000
  1639. #define BRXANTENNA_POWER_SHIFT 0x3000000
  1640. #define BRSSI_TABLE_SELECT 0xc000000
  1641. #define BRXHP_FINAL 0x7000000
  1642. #define BRXHPSETTLE_BBP 0x7
  1643. #define BRXHTSETTLE_HSSI 0x8
  1644. #define BRXHTSETTLE_RXHP 0x70
  1645. #define BRXHTSETTLE_BBPPW 0x80
  1646. #define BRXHTSETTLE_IDLE 0x300
  1647. #define BRXHTSETTLE_RESERVED 0x1c00
  1648. #define BRXHT_RXHP_EN 0x8000
  1649. #define BRXAGC_FREEZE_THRES 0x30000
  1650. #define BRXAGC_TOGETHEREN 0x40000
  1651. #define BRXHTAGC_MIN 0x80000
  1652. #define BRXHTAGC_EN 0x100000
  1653. #define BRXHTDAGC_EN 0x200000
  1654. #define BRXHT_RXHP_BBP 0x1c00000
  1655. #define BRXHT_RXHP_FINAL 0xe0000000
  1656. #define BRXPW_RADIO_TH 0x3
  1657. #define BRXPW_RADIO_EN 0x4
  1658. #define BRXMF_HOLD 0x3800
  1659. #define BRXPD_DELAY_TH1 0x38
  1660. #define BRXPD_DELAY_TH2 0x1c0
  1661. #define BRXPD_DC_COUNT_MAX 0x600
  1662. #define BRXPD_DELAY_TH 0x8000
  1663. #define BRXPROCESS_DELAY 0xf0000
  1664. #define BRXSEARCHRANGE_GI2_EARLY 0x700000
  1665. #define BRXFRAME_FUARD_COUNTER_L 0x3800000
  1666. #define BRXSGI_GUARD_L 0xc000000
  1667. #define BRXSGI_SEARCH_L 0x30000000
  1668. #define BRXSGI_TH 0xc0000000
  1669. #define BDFSCNT0 0xff
  1670. #define BDFSCNT1 0xff00
  1671. #define BDFSFLAG 0xf0000
  1672. #define BMF_WEIGHT_SUM 0x300000
  1673. #define BMINIDX_TH 0x7f000000
  1674. #define BDAFORMAT 0x40000
  1675. #define BTXCH_EMU_ENABLE 0x01000000
  1676. #define BTRSW_ISOLATION_A 0x7f
  1677. #define BTRSW_ISOLATION_B 0x7f00
  1678. #define BTRSW_ISOLATION_C 0x7f0000
  1679. #define BTRSW_ISOLATION_D 0x7f000000
  1680. #define BEXT_LNA_GAIN 0x7c00
  1681. #define BSTBC_EN 0x4
  1682. #define BANTENNA_MAPPING 0x10
  1683. #define BNSS 0x20
  1684. #define BCFO_ANTSUM_ID 0x200
  1685. #define BPHY_COUNTER_RESET 0x8000000
  1686. #define BCFO_REPORT_GET 0x4000000
  1687. #define BOFDM_CONTINUE_TX 0x10000000
  1688. #define BOFDM_SINGLE_CARRIER 0x20000000
  1689. #define BOFDM_SINGLE_TONE 0x40000000
  1690. #define BHT_DETECT 0x100
  1691. #define BCFOEN 0x10000
  1692. #define BCFOVALUE 0xfff00000
  1693. #define BSIGTONE_RE 0x3f
  1694. #define BSIGTONE_IM 0x7f00
  1695. #define BCOUNTER_CCA 0xffff
  1696. #define BCOUNTER_PARITYFAIL 0xffff0000
  1697. #define BCOUNTER_RATEILLEGAL 0xffff
  1698. #define BCOUNTER_CRC8FAIL 0xffff0000
  1699. #define BCOUNTER_MCSNOSUPPORT 0xffff
  1700. #define BCOUNTER_FASTSYNC 0xffff
  1701. #define BSHORTCFO 0xfff
  1702. #define BSHORTCFOT_LENGTH 12
  1703. #define BSHORTCFOF_LENGTH 11
  1704. #define BLONGCFO 0x7ff
  1705. #define BLONGCFOT_LENGTH 11
  1706. #define BLONGCFOF_LENGTH 11
  1707. #define BTAILCFO 0x1fff
  1708. #define BTAILCFOT_LENGTH 13
  1709. #define BTAILCFOF_LENGTH 12
  1710. #define BNOISE_EN_PWDB 0xffff
  1711. #define BCC_POWER_DB 0xffff0000
  1712. #define BMOISE_PWDB 0xffff
  1713. #define BPOWERMEAST_LENGTH 10
  1714. #define BPOWERMEASF_LENGTH 3
  1715. #define BRX_HT_BW 0x1
  1716. #define BRXSC 0x6
  1717. #define BRX_HT 0x8
  1718. #define BNB_INTF_DET_ON 0x1
  1719. #define BINTF_WIN_LEN_CFG 0x30
  1720. #define BNB_INTF_TH_CFG 0x1c0
  1721. #define BRFGAIN 0x3f
  1722. #define BTABLESEL 0x40
  1723. #define BTRSW 0x80
  1724. #define BRXSNR_A 0xff
  1725. #define BRXSNR_B 0xff00
  1726. #define BRXSNR_C 0xff0000
  1727. #define BRXSNR_D 0xff000000
  1728. #define BSNR_EVMT_LENGTH 8
  1729. #define BSNR_EVMF_LENGTH 1
  1730. #define BCSI1ST 0xff
  1731. #define BCSI2ND 0xff00
  1732. #define BRXEVM1ST 0xff0000
  1733. #define BRXEVM2ND 0xff000000
  1734. #define BSIGEVM 0xff
  1735. #define BPWDB 0xff00
  1736. #define BSGIEN 0x10000
  1737. #define BSFACTOR_QMA1 0xf
  1738. #define BSFACTOR_QMA2 0xf0
  1739. #define BSFACTOR_QMA3 0xf00
  1740. #define BSFACTOR_QMA4 0xf000
  1741. #define BSFACTOR_QMA5 0xf0000
  1742. #define BSFACTOR_QMA6 0xf0000
  1743. #define BSFACTOR_QMA7 0xf00000
  1744. #define BSFACTOR_QMA8 0xf000000
  1745. #define BSFACTOR_QMA9 0xf0000000
  1746. #define BCSI_SCHEME 0x100000
  1747. #define BNOISE_LVL_TOP_SET 0x3
  1748. #define BCHSMOOTH 0x4
  1749. #define BCHSMOOTH_CFG1 0x38
  1750. #define BCHSMOOTH_CFG2 0x1c0
  1751. #define BCHSMOOTH_CFG3 0xe00
  1752. #define BCHSMOOTH_CFG4 0x7000
  1753. #define BMRCMODE 0x800000
  1754. #define BTHEVMCFG 0x7000000
  1755. #define BLOOP_FIT_TYPE 0x1
  1756. #define BUPD_CFO 0x40
  1757. #define BUPD_CFO_OFFDATA 0x80
  1758. #define BADV_UPD_CFO 0x100
  1759. #define BADV_TIME_CTRL 0x800
  1760. #define BUPD_CLKO 0x1000
  1761. #define BFC 0x6000
  1762. #define BTRACKING_MODE 0x8000
  1763. #define BPHCMP_ENABLE 0x10000
  1764. #define BUPD_CLKO_LTF 0x20000
  1765. #define BCOM_CH_CFO 0x40000
  1766. #define BCSI_ESTI_MODE 0x80000
  1767. #define BADV_UPD_EQZ 0x100000
  1768. #define BUCHCFG 0x7000000
  1769. #define BUPDEQZ 0x8000000
  1770. #define BRX_PESUDO_NOISE_ON 0x20000000
  1771. #define BRX_PESUDO_NOISE_A 0xff
  1772. #define BRX_PESUDO_NOISE_B 0xff00
  1773. #define BRX_PESUDO_NOISE_C 0xff0000
  1774. #define BRX_PESUDO_NOISE_D 0xff000000
  1775. #define BRX_PESUDO_NOISESTATE_A 0xffff
  1776. #define BRX_PESUDO_NOISESTATE_B 0xffff0000
  1777. #define BRX_PESUDO_NOISESTATE_C 0xffff
  1778. #define BRX_PESUDO_NOISESTATE_D 0xffff0000
  1779. #define BZEBRA1_HSSIENABLE 0x8
  1780. #define BZEBRA1_TRXCONTROL 0xc00
  1781. #define BZEBRA1_TRXGAINSETTING 0x07f
  1782. #define BZEBRA1_RXCOUNTER 0xc00
  1783. #define BZEBRA1_TXCHANGEPUMP 0x38
  1784. #define BZEBRA1_RXCHANGEPUMP 0x7
  1785. #define BZEBRA1_CHANNEL_NUM 0xf80
  1786. #define BZEBRA1_TXLPFBW 0x400
  1787. #define BZEBRA1_RXLPFBW 0x600
  1788. #define BRTL8256REG_MODE_CTRL1 0x100
  1789. #define BRTL8256REG_MODE_CTRL0 0x40
  1790. #define BRTL8256REG_TXLPFBW 0x18
  1791. #define BRTL8256REG_RXLPFBW 0x600
  1792. #define BRTL8258_TXLPFBW 0xc
  1793. #define BRTL8258_RXLPFBW 0xc00
  1794. #define BRTL8258_RSSILPFBW 0xc0
  1795. #define BBYTE0 0x1
  1796. #define BBYTE1 0x2
  1797. #define BBYTE2 0x4
  1798. #define BBYTE3 0x8
  1799. #define BWORD0 0x3
  1800. #define BWORD1 0xc
  1801. #define BWORD 0xf
  1802. #define BENABLE 0x1
  1803. #define BDISABLE 0x0
  1804. #define LEFT_ANTENNA 0x0
  1805. #define RIGHT_ANTENNA 0x1
  1806. #define TCHECK_TXSTATUS 500
  1807. #define TUPDATE_RXCOUNTER 100
  1808. #endif