1 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
2 /* Copyright(c) 2007 - 2011 Realtek Corporation. */
4 /*****************************************************************************
6 * Module: __RTW_MP_PHY_REGDEF_H_
9 * Note: 1. Define PMAC/BB register map
10 * 2. Define RF register map
11 * 3. PMAC/BB register bit mask.
13 * 5. Other BB/RF relative definition.
16 * Export: Constants, macro, functions(API), global variables(None).
22 * 08/07/2007 MHC 1. Porting from 9x series PHYCFG.h.
23 * 2. Reorganize code architecture.
24 * 09/25/2008 MH 1. Add RL6052 register definition
26 *****************************************************************************/
27 #ifndef __RTW_MP_PHY_REGDEF_H_
28 #define __RTW_MP_PHY_REGDEF_H_
30 /*--------------------------Define Parameters-------------------------------*/
33 /* 8192S Regsiter offset definition */
37 /* BB-PHY register PMAC 0x100 PHY 0x800 - 0xEFF */
38 /* 1. PMAC duplicate register due to connection: RF_Mode, TRxRN, NumOf L-STF */
39 /* 2. 0x800/0x900/0xA00/0xC00/0xD00/0xE00 */
40 /* 3. RF register 0x00-2E */
41 /* 4. Bit Mask for BB/RF register */
42 /* 5. Other definition for BB/RF R/W */
46 /* 1. PMAC duplicate register due to connection: RF_Mode, TRxRN, NumOf L-STF */
49 #define rPMAC_Reset 0x100
50 #define rPMAC_TxStart 0x104
51 #define rPMAC_TxLegacySIG 0x108
52 #define rPMAC_TxHTSIG1 0x10c
53 #define rPMAC_TxHTSIG2 0x110
54 #define rPMAC_PHYDebug 0x114
55 #define rPMAC_TxPacketNum 0x118
56 #define rPMAC_TxIdle 0x11c
57 #define rPMAC_TxMACHeader0 0x120
58 #define rPMAC_TxMACHeader1 0x124
59 #define rPMAC_TxMACHeader2 0x128
60 #define rPMAC_TxMACHeader3 0x12c
61 #define rPMAC_TxMACHeader4 0x130
62 #define rPMAC_TxMACHeader5 0x134
63 #define rPMAC_TxDataType 0x138
64 #define rPMAC_TxRandomSeed 0x13c
65 #define rPMAC_CCKPLCPPreamble 0x140
66 #define rPMAC_CCKPLCPHeader 0x144
67 #define rPMAC_CCKCRC16 0x148
68 #define rPMAC_OFDMRxCRC32OK 0x170
69 #define rPMAC_OFDMRxCRC32Er 0x174
70 #define rPMAC_OFDMRxParityEr 0x178
71 #define rPMAC_OFDMRxCRC8Er 0x17c
72 #define rPMAC_CCKCRxRC16Er 0x180
73 #define rPMAC_CCKCRxRC32Er 0x184
74 #define rPMAC_CCKCRxRC32OK 0x188
75 #define rPMAC_TxStatus 0x18c
80 /* The following two definition are only used for USB interface. */
81 /* define RF_BB_CMD_ADDR 0x02c0 RF/BB read/write command address. */
82 /* define RF_BB_CMD_DATA 0x02c4 RF/BB read/write command data. */
87 #define rFPGA0_RFMOD 0x800 /* RF mode & CCK TxSC RF BW Setting?? */
89 #define rFPGA0_TxInfo 0x804 /* Status report?? */
90 #define rFPGA0_PSDFunction 0x808
92 #define rFPGA0_TxGainStage 0x80c /* Set TX PWR init gain? */
94 #define rFPGA0_RFTiming1 0x810 /* Useless now */
95 #define rFPGA0_RFTiming2 0x814
96 /* define rFPGA0_XC_RFTiming 0x818 */
97 /* define rFPGA0_XD_RFTiming 0x81c */
99 #define rFPGA0_XA_HSSIParameter1 0x820 /* RF 3 wire register */
100 #define rFPGA0_XA_HSSIParameter2 0x824
101 #define rFPGA0_XB_HSSIParameter1 0x828
102 #define rFPGA0_XB_HSSIParameter2 0x82c
103 #define rFPGA0_XC_HSSIParameter1 0x830
104 #define rFPGA0_XC_HSSIParameter2 0x834
105 #define rFPGA0_XD_HSSIParameter1 0x838
106 #define rFPGA0_XD_HSSIParameter2 0x83c
107 #define rFPGA0_XA_LSSIParameter 0x840
108 #define rFPGA0_XB_LSSIParameter 0x844
109 #define rFPGA0_XC_LSSIParameter 0x848
110 #define rFPGA0_XD_LSSIParameter 0x84c
112 #define rFPGA0_RFWakeUpParameter 0x850 /* Useless now */
113 #define rFPGA0_RFSleepUpParameter 0x854
115 #define rFPGA0_XAB_SwitchControl 0x858 /* RF Channel switch */
116 #define rFPGA0_XCD_SwitchControl 0x85c
118 #define rFPGA0_XA_RFInterfaceOE 0x860 /* RF Channel switch */
119 #define rFPGA0_XB_RFInterfaceOE 0x864
120 #define rFPGA0_XC_RFInterfaceOE 0x868
121 #define rFPGA0_XD_RFInterfaceOE 0x86c
123 #define rFPGA0_XAB_RFInterfaceSW 0x870 /* RF Interface Software Control */
124 #define rFPGA0_XCD_RFInterfaceSW 0x874
126 #define rFPGA0_XAB_RFParameter 0x878 /* RF Parameter */
127 #define rFPGA0_XCD_RFParameter 0x87c
129 #define rFPGA0_AnalogParameter1 0x880 /* Crystal cap setting RF-R/W protection for parameter4?? */
130 #define rFPGA0_AnalogParameter2 0x884
131 #define rFPGA0_AnalogParameter3 0x888 /* Useless now */
132 #define rFPGA0_AnalogParameter4 0x88c
134 #define rFPGA0_XA_LSSIReadBack 0x8a0 /* Tranceiver LSSI Readback */
135 #define rFPGA0_XB_LSSIReadBack 0x8a4
136 #define rFPGA0_XC_LSSIReadBack 0x8a8
137 #define rFPGA0_XD_LSSIReadBack 0x8ac
139 #define rFPGA0_PSDReport 0x8b4 /* Useless now */
140 #define rFPGA0_XAB_RFInterfaceRB 0x8e0 /* Useless now RF Interface Readback Value */
141 #define rFPGA0_XCD_RFInterfaceRB 0x8e4 /* Useless now */
144 /* 4. Page9(0x900) */
146 #define rFPGA1_RFMOD 0x900 /* RF mode & OFDM TxSC RF BW Setting?? */
148 #define rFPGA1_TxBlock 0x904 /* Useless now */
149 #define rFPGA1_DebugSelect 0x908 /* Useless now */
150 #define rFPGA1_TxInfo 0x90c /* Useless now Status report?? */
153 /* 5. PageA(0xA00) */
155 /* Set Control channel to upper or lower. These settings are required only for 40MHz */
156 #define rCCK0_System 0xa00
158 #define rCCK0_AFESetting 0xa04 /* Disable init gain now Select RX path by RSSI */
159 #define rCCK0_CCA 0xa08 /* Disable init gain now Init gain */
161 #define rCCK0_RxAGC1 0xa0c /* AGC default value, saturation level Antenna Diversity, RX AGC, LNA Threshold, RX LNA Threshold useless now. Not the same as 90 series */
162 #define rCCK0_RxAGC2 0xa10 /* AGC & DAGC */
164 #define rCCK0_RxHP 0xa14
166 #define rCCK0_DSPParameter1 0xa18 /* Timing recovery & Channel estimation threshold */
167 #define rCCK0_DSPParameter2 0xa1c /* SQ threshold */
169 #define rCCK0_TxFilter1 0xa20
170 #define rCCK0_TxFilter2 0xa24
171 #define rCCK0_DebugPort 0xa28 /* debug port and Tx filter3 */
172 #define rCCK0_FalseAlarmReport 0xa2c /* 0xa2d useless now 0xa30-a4f channel report */
173 #define rCCK0_TRSSIReport 0xa50
174 #define rCCK0_RxReport 0xa54 /* 0xa57 */
175 #define rCCK0_FACounterLower 0xa5c /* 0xa5b */
176 #define rCCK0_FACounterUpper 0xa58 /* 0xa5c */
179 /* 6. PageC(0xC00) */
181 #define rOFDM0_LSTF 0xc00
183 #define rOFDM0_TRxPathEnable 0xc04
184 #define rOFDM0_TRMuxPar 0xc08
185 #define rOFDM0_TRSWIsolation 0xc0c
187 #define rOFDM0_XARxAFE 0xc10 /* RxIQ DC offset, Rx digital filter, DC notch filter */
188 #define rOFDM0_XARxIQImbalance 0xc14 /* RxIQ imblance matrix */
189 #define rOFDM0_XBRxAFE 0xc18
190 #define rOFDM0_XBRxIQImbalance 0xc1c
191 #define rOFDM0_XCRxAFE 0xc20
192 #define rOFDM0_XCRxIQImbalance 0xc24
193 #define rOFDM0_XDRxAFE 0xc28
194 #define rOFDM0_XDRxIQImbalance 0xc2c
196 #define rOFDM0_RxDetector1 0xc30 /* PD,BW & SBD DM tune init gain */
197 #define rOFDM0_RxDetector2 0xc34 /* SBD & Fame Sync. */
198 #define rOFDM0_RxDetector3 0xc38 /* Frame Sync. */
199 #define rOFDM0_RxDetector4 0xc3c /* PD, SBD, Frame Sync & Short-GI */
201 #define rOFDM0_RxDSP 0xc40 /* Rx Sync Path */
202 #define rOFDM0_CFOandDAGC 0xc44 /* CFO & DAGC */
203 #define rOFDM0_CCADropThreshold 0xc48 /* CCA Drop threshold */
204 #define rOFDM0_ECCAThreshold 0xc4c /* energy CCA */
206 #define rOFDM0_XAAGCCore1 0xc50 /* DIG */
207 #define rOFDM0_XAAGCCore2 0xc54
208 #define rOFDM0_XBAGCCore1 0xc58
209 #define rOFDM0_XBAGCCore2 0xc5c
210 #define rOFDM0_XCAGCCore1 0xc60
211 #define rOFDM0_XCAGCCore2 0xc64
212 #define rOFDM0_XDAGCCore1 0xc68
213 #define rOFDM0_XDAGCCore2 0xc6c
215 #define rOFDM0_AGCParameter1 0xc70
216 #define rOFDM0_AGCParameter2 0xc74
217 #define rOFDM0_AGCRSSITable 0xc78
218 #define rOFDM0_HTSTFAGC 0xc7c
220 #define rOFDM0_XATxIQImbalance 0xc80 /* TX PWR TRACK and DIG */
221 #define rOFDM0_XATxAFE 0xc84
222 #define rOFDM0_XBTxIQImbalance 0xc88
223 #define rOFDM0_XBTxAFE 0xc8c
224 #define rOFDM0_XCTxIQImbalance 0xc90
225 #define rOFDM0_XCTxAFE 0xc94
226 #define rOFDM0_XDTxIQImbalance 0xc98
227 #define rOFDM0_XDTxAFE 0xc9c
228 #define rOFDM0_RxIQExtAnta 0xca0
230 #define rOFDM0_RxHPParameter 0xce0
231 #define rOFDM0_TxPseudoNoiseWgt 0xce4
232 #define rOFDM0_FrameSync 0xcf0
233 #define rOFDM0_DFSReport 0xcf4
234 #define rOFDM0_TxCoeff1 0xca4
235 #define rOFDM0_TxCoeff2 0xca8
236 #define rOFDM0_TxCoeff3 0xcac
237 #define rOFDM0_TxCoeff4 0xcb0
238 #define rOFDM0_TxCoeff5 0xcb4
239 #define rOFDM0_TxCoeff6 0xcb8
241 /* 7. PageD(0xD00) */
242 #define rOFDM1_LSTF 0xd00
243 #define rOFDM1_TRxPathEnable 0xd04
245 #define rOFDM1_CFO 0xd08 /* No setting now */
246 #define rOFDM1_CSI1 0xd10
247 #define rOFDM1_SBD 0xd14
248 #define rOFDM1_CSI2 0xd18
249 #define rOFDM1_CFOTracking 0xd2c
250 #define rOFDM1_TRxMesaure1 0xd34
251 #define rOFDM1_IntfDet 0xd3c
252 #define rOFDM1_PseudoNoiseStateAB 0xd50
253 #define rOFDM1_PseudoNoiseStateCD 0xd54
254 #define rOFDM1_RxPseudoNoiseWgt 0xd58
256 #define rOFDM_PHYCounter1 0xda0 /* cca, parity fail */
257 #define rOFDM_PHYCounter2 0xda4 /* rate illegal, crc8 fail */
258 #define rOFDM_PHYCounter3 0xda8 /* MCS not support */
260 #define rOFDM_ShortCFOAB 0xdac /* No setting now */
261 #define rOFDM_ShortCFOCD 0xdb0
262 #define rOFDM_LongCFOAB 0xdb4
263 #define rOFDM_LongCFOCD 0xdb8
264 #define rOFDM_TailCFOAB 0xdbc
265 #define rOFDM_TailCFOCD 0xdc0
266 #define rOFDM_PWMeasure1 0xdc4
267 #define rOFDM_PWMeasure2 0xdc8
268 #define rOFDM_BWReport 0xdcc
269 #define rOFDM_AGCReport 0xdd0
270 #define rOFDM_RxSNR 0xdd4
271 #define rOFDM_RxEVMCSI 0xdd8
272 #define rOFDM_SIGReport 0xddc
275 /* 8. PageE(0xE00) */
277 #define rTxAGC_Rate18_06 0xe00
278 #define rTxAGC_Rate54_24 0xe04
279 #define rTxAGC_CCK_Mcs32 0xe08
280 #define rTxAGC_Mcs03_Mcs00 0xe10
281 #define rTxAGC_Mcs07_Mcs04 0xe14
282 #define rTxAGC_Mcs11_Mcs08 0xe18
283 #define rTxAGC_Mcs15_Mcs12 0xe1c
285 /* Analog- control in RX_WAIT_CCA : REG: EE0 [Analog- Power & Control Register] */
286 #define rRx_Wait_CCCA 0xe70
287 #define rAnapar_Ctrl_BB 0xee0
290 /* 7. RF Register 0x00-0x2E (RF 8256) */
291 /* RF-0222D 0x00-3F */
294 #define RTL92SE_FPGA_VERIFY 0
295 #define rZebra1_HSSIEnable 0x0 /* Useless now */
296 #define rZebra1_TRxEnable1 0x1
297 #define rZebra1_TRxEnable2 0x2
298 #define rZebra1_AGC 0x4
299 #define rZebra1_ChargePump 0x5
300 /* if (RTL92SE_FPGA_VERIFY == 1) */
301 #define rZebra1_Channel 0x7 /* RF channel switch */
305 #define rZebra1_TxGain 0x8 /* Useless now */
306 #define rZebra1_TxLPF 0x9
307 #define rZebra1_RxLPF 0xb
308 #define rZebra1_RxHPFCorner 0xc
311 #define rGlobalCtrl 0 /* Useless now */
312 #define rRTL8256_TxLPF 19
313 #define rRTL8256_RxLPF 11
316 #define rRTL8258_TxLPF 0x11 /* Useless now */
317 #define rRTL8258_RxLPF 0x13
318 #define rRTL8258_RSSILPF 0xa
321 /* RL6052 Register definition */
322 #define RF_AC 0x00 /* */
324 #define RF_IQADJ_G1 0x01 /* */
325 #define RF_IQADJ_G2 0x02 /* */
326 #define RF_POW_TRSW 0x05 /* */
328 #define RF_GAIN_RX 0x06 /* */
329 #define RF_GAIN_TX 0x07 /* */
331 #define RF_TXM_IDAC 0x08 /* */
332 #define RF_BS_IQGEN 0x0F /* */
334 #define RF_MODE1 0x10 /* */
335 #define RF_MODE2 0x11 /* */
337 #define RF_RX_AGC_HP 0x12 /* */
338 #define RF_TX_AGC 0x13 /* */
339 #define RF_BIAS 0x14 /* */
340 #define RF_IPA 0x15 /* */
341 #define RF_TXBIAS 0x16 /* */
342 #define RF_POW_ABILITY 0x17 /* */
343 #define RF_MODE_AG 0x18 /* */
344 #define rRfChannel 0x18 /* RF channel and BW switch */
345 #define RF_CHNLBW 0x18 /* RF channel and BW switch */
346 #define RF_TOP 0x19 /* */
348 #define RF_RX_G1 0x1A /* */
349 #define RF_RX_G2 0x1B /* */
351 #define RF_RX_BB2 0x1C /* */
352 #define RF_RX_BB1 0x1D /* */
354 #define RF_RCK1 0x1E /* */
355 #define RF_RCK2 0x1F /* */
357 #define RF_TX_G1 0x20 /* */
358 #define RF_TX_G2 0x21 /* */
359 #define RF_TX_G3 0x22 /* */
361 #define RF_TX_BB1 0x23 /* */
363 #define RF_T_METER 0x24 /* */
365 #define RF_SYN_G1 0x25 /* RF TX Power control */
366 #define RF_SYN_G2 0x26 /* RF TX Power control */
367 #define RF_SYN_G3 0x27 /* RF TX Power control */
368 #define RF_SYN_G4 0x28 /* RF TX Power control */
369 #define RF_SYN_G5 0x29 /* RF TX Power control */
370 #define RF_SYN_G6 0x2A /* RF TX Power control */
371 #define RF_SYN_G7 0x2B /* RF TX Power control */
372 #define RF_SYN_G8 0x2C /* RF TX Power control */
374 #define RF_RCK_OS 0x30 /* RF TX PA control */
375 #define RF_TXPA_G1 0x31 /* RF TX PA control */
376 #define RF_TXPA_G2 0x32 /* RF TX PA control */
377 #define RF_TXPA_G3 0x33 /* RF TX PA control */
382 /* 1. Page1(0x100) */
383 #define bBBResetB 0x100 /* Useless now? */
384 #define bGlobalResetB 0x200
385 #define bOFDMTxStart 0x4
386 #define bCCKTxStart 0x8
387 #define bCRC32Debug 0x100
388 #define bPMACLoopback 0x10
389 #define bTxLSIG 0xffffff
390 #define bOFDMTxRate 0xf
391 #define bOFDMTxReserved 0x10
392 #define bOFDMTxLength 0x1ffe0
393 #define bOFDMTxParity 0x20000
394 #define bTxHTSIG1 0xffffff
395 #define bTxHTMCSRate 0x7f
397 #define bTxHTLength 0xffff00
398 #define bTxHTSIG2 0xffffff
399 #define bTxHTSmoothing 0x1
400 #define bTxHTSounding 0x2
401 #define bTxHTReserved 0x4
402 #define bTxHTAggreation 0x8
403 #define bTxHTSTBC 0x30
404 #define bTxHTAdvanceCoding 0x40
405 #define bTxHTShortGI 0x80
406 #define bTxHTNumberHT_LTF 0x300
407 #define bTxHTCRC8 0x3fc00
408 #define bCounterReset 0x10000
409 #define bNumOfOFDMTx 0xffff
410 #define bNumOfCCKTx 0xffff0000
411 #define bTxIdleInterval 0xffff
412 #define bOFDMService 0xffff0000
413 #define bTxMACHeader 0xffffffff
414 #define bTxDataInit 0xff
415 #define bTxHTMode 0x100
416 #define bTxDataType 0x30000
417 #define bTxRandomSeed 0xffffffff
418 #define bCCKTxPreamble 0x1
419 #define bCCKTxSFD 0xffff0000
420 #define bCCKTxSIG 0xff
421 #define bCCKTxService 0xff00
422 #define bCCKLengthExt 0x8000
423 #define bCCKTxLength 0xffff0000
424 #define bCCKTxCRC16 0xffff
425 #define bCCKTxStatus 0x1
426 #define bOFDMTxStatus 0x2
428 #define IS_BB_REG_OFFSET_92S(_Offset) ((_Offset >= 0x800) && (_Offset <= 0xfff))
430 /* 2. Page8(0x800) */
431 #define bRFMOD 0x1 /* Reg 0x800 rFPGA0_RFMOD */
432 #define bJapanMode 0x2
433 #define bCCKTxSC 0x30
434 #define bCCKEn 0x1000000
435 #define bOFDMEn 0x2000000
437 #define bOFDMRxADCPhase 0x10000 /* Useless now */
438 #define bOFDMTxDACPhase 0x40000
439 #define bXATxAGC 0x3f
441 #define bXBTxAGC 0xf00 /* Reg 80c rFPGA0_TxGainStage */
442 #define bXCTxAGC 0xf000
443 #define bXDTxAGC 0xf0000
445 #define bPAStart 0xf0000000 /* Useless now */
446 #define bTRStart 0x00f00000
447 #define bRFStart 0x0000f000
448 #define bBBStart 0x000000f0
449 #define bBBCCKStart 0x0000000f
450 #define bPAEnd 0xf /* Reg0x814 */
451 #define bTREnd 0x0f000000
452 #define bRFEnd 0x000f0000
453 #define bCCAMask 0x000000f0 /* T2R */
454 #define bR2RCCAMask 0x00000f00
455 #define bHSSI_R2TDelay 0xf8000000
456 #define bHSSI_T2RDelay 0xf80000
457 #define bContTxHSSI 0x400 /* chane gain at continue Tx */
458 #define bIGFromCCK 0x200
459 #define bAGCAddress 0x3f
460 #define bRxHPTx 0x7000
461 #define bRxHPT2R 0x38000
462 #define bRxHPCCKIni 0xc0000
463 #define bAGCTxCode 0xc00000
464 #define bAGCRxCode 0x300000
466 #define b3WireDataLength 0x800 /* Reg 0x820~84f rFPGA0_XA_HSSIParameter1 */
467 #define b3WireAddressLength 0x400
469 #define b3WireRFPowerDown 0x1 /* Useless now */
470 /* define bHWSISelect 0x8 */
471 #define b5GPAPEPolarity 0x40000000
472 #define b2GPAPEPolarity 0x80000000
473 #define bRFSW_TxDefaultAnt 0x3
474 #define bRFSW_TxOptionAnt 0x30
475 #define bRFSW_RxDefaultAnt 0x300
476 #define bRFSW_RxOptionAnt 0x3000
477 #define bRFSI_3WireData 0x1
478 #define bRFSI_3WireClock 0x2
479 #define bRFSI_3WireLoad 0x4
480 #define bRFSI_3WireRW 0x8
481 #define bRFSI_3Wire 0xf
483 #define bRFSI_RFENV 0x10 /* Reg 0x870 rFPGA0_XAB_RFInterfaceSW */
485 #define bRFSI_TRSW 0x20 /* Useless now */
486 #define bRFSI_TRSWB 0x40
487 #define bRFSI_ANTSW 0x100
488 #define bRFSI_ANTSWB 0x200
489 #define bRFSI_PAPE 0x400
490 #define bRFSI_PAPE5G 0x800
491 #define bBandSelect 0x1
492 #define bHTSIG2_GI 0x80
493 #define bHTSIG2_Smoothing 0x01
494 #define bHTSIG2_Sounding 0x02
495 #define bHTSIG2_Aggreaton 0x08
496 #define bHTSIG2_STBC 0x30
497 #define bHTSIG2_AdvCoding 0x40
498 #define bHTSIG2_NumOfHTLTF 0x300
499 #define bHTSIG2_CRC8 0x3fc
500 #define bHTSIG1_MCS 0x7f
501 #define bHTSIG1_BandWidth 0x80
502 #define bHTSIG1_HTLength 0xffff
503 #define bLSIG_Rate 0xf
504 #define bLSIG_Reserved 0x10
505 #define bLSIG_Length 0x1fffe
506 #define bLSIG_Parity 0x20
507 #define bCCKRxPhase 0x4
508 #if (RTL92SE_FPGA_VERIFY == 1)
509 #define bLSSIReadAddress 0x3f000000 /* LSSI "Read" Address
510 Reg 0x824 rFPGA0_XA_HSSIParameter2 */
512 #define bLSSIReadAddress 0x7f800000 /* T65 RF */
514 #define bLSSIReadEdge 0x80000000 /* LSSI "Read" edge signal */
515 #if (RTL92SE_FPGA_VERIFY == 1)
516 #define bLSSIReadBackData 0xfff /* Reg 0x8a0
517 rFPGA0_XA_LSSIReadBack */
519 #define bLSSIReadBackData 0xfffff /* T65 RF */
521 #define bLSSIReadOKFlag 0x1000 /* Useless now */
522 #define bCCKSampleRate 0x8 /* 0: 44MHz, 1:88MHz */
523 #define bRegulator0Standby 0x1
524 #define bRegulatorPLLStandby 0x2
525 #define bRegulator1Standby 0x4
526 #define bPLLPowerUp 0x8
527 #define bDPLLPowerUp 0x10
528 #define bDA10PowerUp 0x20
529 #define bAD7PowerUp 0x200
530 #define bDA6PowerUp 0x2000
531 #define bXtalPowerUp 0x4000
532 #define b40MDClkPowerUP 0x8000
533 #define bDA6DebugMode 0x20000
534 #define bDA6Swing 0x380000
536 #define bADClkPhase 0x4000000 /* Reg 0x880
537 rFPGA0_AnalogParameter1 20/40 CCK support switch 40/80 BB MHZ */
539 #define b80MClkDelay 0x18000000 /* Useless */
540 #define bAFEWatchDogEnable 0x20000000
542 #define bXtalCap01 0xc0000000 /* Reg 0x884
543 rFPGA0_AnalogParameter2 Crystal cap */
544 #define bXtalCap23 0x3
545 #define bXtalCap92x 0x0f000000
546 #define bXtalCap 0x0f000000
548 #define bIntDifClkEnable 0x400 /* Useless */
549 #define bExtSigClkEnable 0x800
550 #define bBandgapMbiasPowerUp 0x10000
551 #define bAD11SHGain 0xc0000
552 #define bAD11InputRange 0x700000
553 #define bAD11OPCurrent 0x3800000
554 #define bIPathLoopback 0x4000000
555 #define bQPathLoopback 0x8000000
556 #define bAFELoopback 0x10000000
557 #define bDA10Swing 0x7e0
558 #define bDA10Reverse 0x800
559 #define bDAClkSource 0x1000
560 #define bAD7InputRange 0x6000
561 #define bAD7Gain 0x38000
562 #define bAD7OutputCMMode 0x40000
563 #define bAD7InputCMMode 0x380000
564 #define bAD7Current 0xc00000
565 #define bRegulatorAdjust 0x7000000
566 #define bAD11PowerUpAtTx 0x1
567 #define bDA10PSAtTx 0x10
568 #define bAD11PowerUpAtRx 0x100
569 #define bDA10PSAtRx 0x1000
570 #define bCCKRxAGCFormat 0x200
571 #define bPSDFFTSamplepPoint 0xc000
572 #define bPSDAverageNum 0x3000
573 #define bIQPathControl 0xc00
574 #define bPSDFreq 0x3ff
575 #define bPSDAntennaPath 0x30
576 #define bPSDIQSwitch 0x40
577 #define bPSDRxTrigger 0x400000
578 #define bPSDTxTrigger 0x80000000
579 #define bPSDSineToneScale 0x7f000000
580 #define bPSDReport 0xffff
582 /* 3. Page9(0x900) */
583 #define bOFDMTxSC 0x30000000 /* Useless */
585 #define bOFDMTxOn 0x2
586 #define bDebugPage 0xfff /* reset debug page and HWord,
588 #define bDebugItem 0xff /* reset debug page and LWord */
590 #define bAntNonHT 0x100
591 #define bAntHT1 0x1000
592 #define bAntHT2 0x10000
593 #define bAntHT1S1 0x100000
594 #define bAntNonHTS1 0x1000000
596 /* 4. PageA(0xA00) */
597 #define bCCKBBMode 0x3 /* Useless */
598 #define bCCKTxPowerSaving 0x80
599 #define bCCKRxPowerSaving 0x40
601 #define bCCKSideBand 0x10 /* Reg 0xa00 rCCK0 20/40 sw */
603 #define bCCKScramble 0x8 /* Useless */
604 #define bCCKAntDiversity 0x8000
605 #define bCCKCarrierRecovery 0x4000
606 #define bCCKTxRate 0x3000
607 #define bCCKDCCancel 0x0800
608 #define bCCKISICancel 0x0400
609 #define bCCKMatchFilter 0x0200
610 #define bCCKEqualizer 0x0100
611 #define bCCKPreambleDetect 0x800000
612 #define bCCKFastFalseCCA 0x400000
613 #define bCCKChEstStart 0x300000
614 #define bCCKCCACount 0x080000
615 #define bCCKcs_lim 0x070000
616 #define bCCKBistMode 0x80000000
617 #define bCCKCCAMask 0x40000000
618 #define bCCKTxDACPhase 0x4
619 #define bCCKRxADCPhase 0x20000000 /* r_rx_clk */
620 #define bCCKr_cp_mode0 0x0100
621 #define bCCKTxDCOffset 0xf0
622 #define bCCKRxDCOffset 0xf
623 #define bCCKCCAMode 0xc000
624 #define bCCKFalseCS_lim 0x3f00
625 #define bCCKCS_ratio 0xc00000
626 #define bCCKCorgBit_sel 0x300000
627 #define bCCKPD_lim 0x0f0000
628 #define bCCKNewCCA 0x80000000
629 #define bCCKRxHPofIG 0x8000
630 #define bCCKRxIG 0x7f00
631 #define bCCKLNAPolarity 0x800000
632 #define bCCKRx1stGain 0x7f0000
633 #define bCCKRFExtend 0x20000000 /* CCK Rx init gain polar */
634 #define bCCKRxAGCSatLevel 0x1f000000
635 #define bCCKRxAGCSatCount 0xe0
636 #define bCCKRxRFSettle 0x1f /* AGCsamp_dly */
637 #define bCCKFixedRxAGC 0x8000
638 #define bCCKAntennaPolarity 0x2000
639 #define bCCKTxFilterType 0x0c00
640 #define bCCKRxAGCReportType 0x0300
641 #define bCCKRxDAGCEn 0x80000000
642 #define bCCKRxDAGCPeriod 0x20000000
643 #define bCCKRxDAGCSatLevel 0x1f000000
644 #define bCCKTimingRecovery 0x800000
645 #define bCCKTxC0 0x3f0000
646 #define bCCKTxC1 0x3f000000
647 #define bCCKTxC2 0x3f
648 #define bCCKTxC3 0x3f00
649 #define bCCKTxC4 0x3f0000
650 #define bCCKTxC5 0x3f000000
651 #define bCCKTxC6 0x3f
652 #define bCCKTxC7 0x3f00
653 #define bCCKDebugPort 0xff0000
654 #define bCCKDACDebug 0x0f000000
655 #define bCCKFalseAlarmEnable 0x8000
656 #define bCCKFalseAlarmRead 0x4000
657 #define bCCKTRSSI 0x7f
658 #define bCCKRxAGCReport 0xfe
659 #define bCCKRxReport_AntSel 0x80000000
660 #define bCCKRxReport_MFOff 0x40000000
661 #define bCCKRxRxReport_SQLoss 0x20000000
662 #define bCCKRxReport_Pktloss 0x10000000
663 #define bCCKRxReport_Lockedbit 0x08000000
664 #define bCCKRxReport_RateError 0x04000000
665 #define bCCKRxReport_RxRate 0x03000000
666 #define bCCKRxFACounterLower 0xff
667 #define bCCKRxFACounterUpper 0xff000000
668 #define bCCKRxHPAGCStart 0xe000
669 #define bCCKRxHPAGCFinal 0x1c00
670 #define bCCKRxFalseAlarmEnable 0x8000
671 #define bCCKFACounterFreeze 0x4000
672 #define bCCKTxPathSel 0x10000000
673 #define bCCKDefaultRxPath 0xc000000
674 #define bCCKOptionRxPath 0x3000000
676 /* 5. PageC(0xC00) */
677 #define bNumOfSTF 0x3 /* Useless */
678 #define bShift_L 0xc0
688 #define bTRSSIFreq 0x200
689 #define bADCBackoff 0x3000
690 #define bDFIRBackoff 0xc000
691 #define bTRSSILatchPhase 0x10000
692 #define bRxIDCOffset 0xff
693 #define bRxQDCOffset 0xff00
694 #define bRxDFIRMode 0x1800000
695 #define bRxDCNFType 0xe000000
696 #define bRXIQImb_A 0x3ff
697 #define bRXIQImb_B 0xfc00
698 #define bRXIQImb_C 0x3f0000
699 #define bRXIQImb_D 0xffc00000
700 #define bDC_dc_Notch 0x60000
701 #define bRxNBINotch 0x1f000000
703 #define bPD_TH_Opt2 0xc000
704 #define bPWED_TH 0x700
705 #define bIfMF_Win_L 0x800
706 #define bPD_Option 0x1000
707 #define bMF_Win_L 0xe000
708 #define bBW_Search_L 0x30000
709 #define bwin_enh_L 0xc0000
710 #define bBW_TH 0x700000
711 #define bED_TH2 0x3800000
712 #define bBW_option 0x4000000
713 #define bRatio_TH 0x18000000
714 #define bWindow_L 0xe0000000
715 #define bSBD_Option 0x1
716 #define bFrame_TH 0x1c
717 #define bFS_Option 0x60
718 #define bDC_Slope_check 0x80
719 #define bFGuard_Counter_DC_L 0xe00
720 #define bFrame_Weight_Short 0x7000
721 #define bSub_Tune 0xe00000
722 #define bFrame_DC_Length 0xe000000
723 #define bSBD_start_offset 0x30000000
724 #define bFrame_TH_2 0x7
725 #define bFrame_GI2_TH 0x38
726 #define bGI2_Sync_en 0x40
727 #define bSarch_Short_Early 0x300
728 #define bSarch_Short_Late 0xc00
729 #define bSarch_GI2_Late 0x70000
730 #define bCFOAntSum 0x1
732 #define bCFOStartOffset 0xc
733 #define bCFOLookBack 0x70
734 #define bCFOSumWeight 0x80
735 #define bDAGCEnable 0x10000
736 #define bTXIQImb_A 0x3ff
737 #define bTXIQImb_B 0xfc00
738 #define bTXIQImb_C 0x3f0000
739 #define bTXIQImb_D 0xffc00000
740 #define bTxIDCOffset 0xff
741 #define bTxQDCOffset 0xff00
742 #define bTxDFIRMode 0x10000
743 #define bTxPesudoNoiseOn 0x4000000
744 #define bTxPesudoNoise_A 0xff
745 #define bTxPesudoNoise_B 0xff00
746 #define bTxPesudoNoise_C 0xff0000
747 #define bTxPesudoNoise_D 0xff000000
748 #define bCCADropOption 0x20000
749 #define bCCADropThres 0xfff00000
751 #define bEDCCA_L 0xf0
752 #define bLambda_ED 0x300
753 #define bRxInitialGain 0x7f
754 #define bRxAntDivEn 0x80
755 #define bRxAGCAddressForLNA 0x7f00
756 #define bRxHighPowerFlow 0x8000
757 #define bRxAGCFreezeThres 0xc0000
758 #define bRxFreezeStep_AGC1 0x300000
759 #define bRxFreezeStep_AGC2 0xc00000
760 #define bRxFreezeStep_AGC3 0x3000000
761 #define bRxFreezeStep_AGC0 0xc000000
762 #define bRxRssi_Cmp_En 0x10000000
763 #define bRxQuickAGCEn 0x20000000
764 #define bRxAGCFreezeThresMode 0x40000000
765 #define bRxOverFlowCheckType 0x80000000
766 #define bRxAGCShift 0x7f
767 #define bTRSW_Tri_Only 0x80
768 #define bPowerThres 0x300
770 #define bRxAGCTogetherEn 0x2
771 #define bRxAGCMin 0x4
772 #define bRxHP_Ini 0x7
773 #define bRxHP_TRLNA 0x70
774 #define bRxHP_RSSI 0x700
775 #define bRxHP_BBP1 0x7000
776 #define bRxHP_BBP2 0x70000
777 #define bRxHP_BBP3 0x700000
778 #define bRSSI_H 0x7f0000 /* thresh for hi power */
779 #define bRSSI_Gen 0x7f000000 /* thresh for ant div */
780 #define bRxSettle_TRSW 0x7
781 #define bRxSettle_LNA 0x38
782 #define bRxSettle_RSSI 0x1c0
783 #define bRxSettle_BBP 0xe00
784 #define bRxSettle_RxHP 0x7000
785 #define bRxSettle_AntSW_RSSI 0x38000
786 #define bRxSettle_AntSW 0xc0000
787 #define bRxProcessTime_DAGC 0x300000
788 #define bRxSettle_HSSI 0x400000
789 #define bRxProcessTime_BBPPW 0x800000
790 #define bRxAntennaPowerShift 0x3000000
791 #define bRSSITableSelect 0xc000000
792 #define bRxHP_Final 0x7000000
793 #define bRxHTSettle_BBP 0x7
794 #define bRxHTSettle_HSSI 0x8
795 #define bRxHTSettle_RxHP 0x70
796 #define bRxHTSettle_BBPPW 0x80
797 #define bRxHTSettle_Idle 0x300
798 #define bRxHTSettle_Reserved 0x1c00
799 #define bRxHTRxHPEn 0x8000
800 #define bRxHTAGCFreezeThres 0x30000
801 #define bRxHTAGCTogetherEn 0x40000
802 #define bRxHTAGCMin 0x80000
803 #define bRxHTAGCEn 0x100000
804 #define bRxHTDAGCEn 0x200000
805 #define bRxHTRxHP_BBP 0x1c00000
806 #define bRxHTRxHP_Final 0xe0000000
807 #define bRxPWRatioTH 0x3
808 #define bRxPWRatioEn 0x4
809 #define bRxMFHold 0x3800
810 #define bRxPD_Delay_TH1 0x38
811 #define bRxPD_Delay_TH2 0x1c0
812 #define bRxPD_DC_COUNT_MAX 0x600
813 /* define bRxMF_Hold 0x3800 */
814 #define bRxPD_Delay_TH 0x8000
815 #define bRxProcess_Delay 0xf0000
816 #define bRxSearchrange_GI2_Early 0x700000
817 #define bRxFrame_Guard_Counter_L 0x3800000
818 #define bRxSGI_Guard_L 0xc000000
819 #define bRxSGI_Search_L 0x30000000
820 #define bRxSGI_TH 0xc0000000
821 #define bDFSCnt0 0xff
822 #define bDFSCnt1 0xff00
823 #define bDFSFlag 0xf0000
824 #define bMFWeightSum 0x300000
825 #define bMinIdxTH 0x7f000000
826 #define bDAFormat 0x40000
827 #define bTxChEmuEnable 0x01000000
828 #define bTRSWIsolation_A 0x7f
829 #define bTRSWIsolation_B 0x7f00
830 #define bTRSWIsolation_C 0x7f0000
831 #define bTRSWIsolation_D 0x7f000000
832 #define bExtLNAGain 0x7c00
834 /* 6. PageE(0xE00) */
835 #define bSTBCEn 0x4 /* Useless */
836 #define bAntennaMapping 0x10
838 #define bCFOAntSumD 0x200
839 #define bPHYCounterReset 0x8000000
840 #define bCFOReportGet 0x4000000
841 #define bOFDMContinueTx 0x10000000
842 #define bOFDMSingleCarrier 0x20000000
843 #define bOFDMSingleTone 0x40000000
844 /* define bRxPath1 0x01 */
845 /* define bRxPath2 0x02 */
846 /* define bRxPath3 0x04 */
847 /* define bRxPath4 0x08 */
848 /* define bTxPath1 0x10 */
849 /* define bTxPath2 0x20 */
850 #define bHTDetect 0x100
851 #define bCFOEn 0x10000
852 #define bCFOValue 0xfff00000
853 #define bSigTone_Re 0x3f
854 #define bSigTone_Im 0x7f00
855 #define bCounter_CCA 0xffff
856 #define bCounter_ParityFail 0xffff0000
857 #define bCounter_RateIllegal 0xffff
858 #define bCounter_CRC8Fail 0xffff0000
859 #define bCounter_MCSNoSupport 0xffff
860 #define bCounter_FastSync 0xffff
861 #define bShortCFO 0xfff
862 #define bShortCFOTLength 12 /* total */
863 #define bShortCFOFLength 11 /* fraction */
864 #define bLongCFO 0x7ff
865 #define bLongCFOTLength 11
866 #define bLongCFOFLength 11
867 #define bTailCFO 0x1fff
868 #define bTailCFOTLength 13
869 #define bTailCFOFLength 12
870 #define bmax_en_pwdB 0xffff
871 #define bCC_power_dB 0xffff0000
872 #define bnoise_pwdB 0xffff
873 #define bPowerMeasTLength 10
874 #define bPowerMeasFLength 3
875 #define bRx_HT_BW 0x1
878 #define bNB_intf_det_on 0x1
879 #define bIntf_win_len_cfg 0x30
880 #define bNB_Intf_TH_cfg 0x1c0
882 #define bTableSel 0x40
884 #define bRxSNR_A 0xff
885 #define bRxSNR_B 0xff00
886 #define bRxSNR_C 0xff0000
887 #define bRxSNR_D 0xff000000
888 #define bSNREVMTLength 8
889 #define bSNREVMFLength 1
891 #define bCSI2nd 0xff00
892 #define bRxEVM1st 0xff0000
893 #define bRxEVM2nd 0xff000000
896 #define bSGIEN 0x10000
898 #define bSFactorQAM1 0xf /* Useless */
899 #define bSFactorQAM2 0xf0
900 #define bSFactorQAM3 0xf00
901 #define bSFactorQAM4 0xf000
902 #define bSFactorQAM5 0xf0000
903 #define bSFactorQAM6 0xf0000
904 #define bSFactorQAM7 0xf00000
905 #define bSFactorQAM8 0xf000000
906 #define bSFactorQAM9 0xf0000000
907 #define bCSIScheme 0x100000
909 #define bNoiseLvlTopSet 0x3 /* Useless */
910 #define bChSmooth 0x4
911 #define bChSmoothCfg1 0x38
912 #define bChSmoothCfg2 0x1c0
913 #define bChSmoothCfg3 0xe00
914 #define bChSmoothCfg4 0x7000
915 #define bMRCMode 0x800000
916 #define bTHEVMCfg 0x7000000
918 #define bLoopFitType 0x1 /* Useless */
920 #define bUpdCFOOffData 0x80
921 #define bAdvUpdCFO 0x100
922 #define bAdvTimeCtrl 0x800
923 #define bUpdClko 0x1000
925 #define bTrackingMode 0x8000
926 #define bPhCmpEnable 0x10000
927 #define bUpdClkoLTF 0x20000
928 #define bComChCFO 0x40000
929 #define bCSIEstiMode 0x80000
930 #define bAdvUpdEqz 0x100000
931 #define bUChCfg 0x7000000
932 #define bUpdEqz 0x8000000
934 #define bTxAGCRate18_06 0x7f7f7f7f /* Useless */
935 #define bTxAGCRate54_24 0x7f7f7f7f
936 #define bTxAGCRateMCS32 0x7f
937 #define bTxAGCRateCCK 0x7f00
938 #define bTxAGCRateMCS3_MCS0 0x7f7f7f7f
939 #define bTxAGCRateMCS7_MCS4 0x7f7f7f7f
940 #define bTxAGCRateMCS11_MCS8 0x7f7f7f7f
941 #define bTxAGCRateMCS15_MCS12 0x7f7f7f7f
943 /* Rx Pseduo noise */
944 #define bRxPesudoNoiseOn 0x20000000 /* Useless */
945 #define bRxPesudoNoise_A 0xff
946 #define bRxPesudoNoise_B 0xff00
947 #define bRxPesudoNoise_C 0xff0000
948 #define bRxPesudoNoise_D 0xff000000
949 #define bPesudoNoiseState_A 0xffff
950 #define bPesudoNoiseState_B 0xffff0000
951 #define bPesudoNoiseState_C 0xffff
952 #define bPesudoNoiseState_D 0xffff0000
956 #define bZebra1_HSSIEnable 0x8 /* Useless */
957 #define bZebra1_TRxControl 0xc00
958 #define bZebra1_TRxGainSetting 0x07f
959 #define bZebra1_RxCorner 0xc00
960 #define bZebra1_TxChargePump 0x38
961 #define bZebra1_RxChargePump 0x7
962 #define bZebra1_ChannelNum 0xf80
963 #define bZebra1_TxLPFBW 0x400
964 #define bZebra1_RxLPFBW 0x600
967 #define bRTL8256RegModeCtrl1 0x100 /* Useless */
968 #define bRTL8256RegModeCtrl0 0x40
969 #define bRTL8256_TxLPFBW 0x18
970 #define bRTL8256_RxLPFBW 0x600
973 #define bRTL8258_TxLPFBW 0xc /* Useless */
974 #define bRTL8258_RxLPFBW 0xc00
975 #define bRTL8258_RSSILPFBW 0xc0
978 /* Other Definition */
981 /* byte endable for sb_write */
982 #define bByte0 0x1 /* Useless */
990 /* for PutRegsetting & GetRegSetting BitMask */
991 #define bMaskByte0 0xff /* Reg 0xc50 rOFDM0_XAAGCCore~0xC6f */
992 #define bMaskByte1 0xff00
993 #define bMaskByte2 0xff0000
994 #define bMaskByte3 0xff000000
995 #define bMaskHWord 0xffff0000
996 #define bMaskLWord 0x0000ffff
997 #define bMaskDWord 0xffffffff
998 #define bMaskH4Bits 0xf0000000
999 #define bMaskOFDM_D 0xffc00000
1000 #define bMaskCCK 0x3f3f3f3f
1001 #define bMask12Bits 0xfff
1003 /* for PutRFRegsetting & GetRFRegSetting BitMask */
1004 #if (RTL92SE_FPGA_VERIFY == 1)
1005 #define bRFRegOffsetMask 0xfff
1007 #define bRFRegOffsetMask 0xfffff
1009 #define bEnable 0x1 /* Useless */
1012 #define LeftAntenna 0x0 /* Useless */
1013 #define RightAntenna 0x1
1015 #define tCheckTxStatus 500 /* 500ms Useless */
1016 #define tUpdateRxCounter 100 /* 100ms */
1018 #define rateCCK 0 /* Useless */
1022 /* define Register-End */
1023 #define bPMAC_End 0x1ff /* Useless */
1024 #define bFPGAPHY0_End 0x8ff
1025 #define bFPGAPHY1_End 0x9ff
1026 #define bCCKPHY0_End 0xaff
1027 #define bOFDMPHY0_End 0xcff
1028 #define bOFDMPHY1_End 0xdff
1030 /* define max debug item in each debug page */
1031 /* define bMaxItem_FPGA_PHY0 0x9 */
1032 /* define bMaxItem_FPGA_PHY1 0x3 */
1033 /* define bMaxItem_PHY_11B 0x16 */
1034 /* define bMaxItem_OFDM_PHY0 0x29 */
1035 /* define bMaxItem_OFDM_PHY1 0x0 */
1037 #define bPMACControl 0x0 /* Useless */
1038 #define bWMACControl 0x1
1039 #define bWNICControl 0x2
1041 #define RCR_AAP BIT(0) /* accept all physical address */
1042 #define RCR_APM BIT(1) /* accept physical match */
1043 #define RCR_AM BIT(2) /* accept multicast */
1044 #define RCR_AB BIT(3) /* accept broadcast */
1045 #define RCR_ACRC32 BIT(5) /* accept error packet */
1046 #define RCR_9356SEL BIT(6)
1047 #define RCR_AICV BIT(12) /* Accept ICV error packet */
1048 #define RCR_RXFTH0 (BIT(13)|BIT(14)|BIT(15)) /* Rx FIFO threshold */
1049 #define RCR_ADF BIT(18) /* Accept Data(frame type) frame */
1050 #define RCR_ACF BIT(19) /* Accept control frame */
1051 #define RCR_AMF BIT(20) /* Accept management frame */
1052 #define RCR_ADD3 BIT(21)
1053 #define RCR_APWRMGT BIT(22) /* Accept power management packet */
1054 #define RCR_CBSSID BIT(23) /* Accept BSSID match packet */
1055 #define RCR_ENMARP BIT(28) /* enable mac auto reset phy */
1056 #define RCR_EnCS1 BIT(29) /* enable carrier sense method 1 */
1057 #define RCR_EnCS2 BIT(30) /* enable carrier sense method 2 */
1058 #define RCR_OnlyErlPkt BIT(31) /* Rx Early mode is performed for
1059 * packet size greater than 1536 */
1061 /*--------------------------Define Parameters-------------------------------*/
1063 #endif /* __INC_HAL8192SPHYREG_H */