Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
0002 /* Copyright(c) 2007 - 2011 Realtek Corporation. */
0003 
0004 #ifndef __INC_HAL8188EPHYREG_H__
0005 #define __INC_HAL8188EPHYREG_H__
0006 /*--------------------------Define Parameters-------------------------------*/
0007 /*  */
0008 /*  BB-PHY register PMAC 0x100 PHY 0x800 - 0xEFF */
0009 /*  1. PMAC duplicate register due to connection: RF_Mode, TRxRN, NumOf L-STF */
0010 /*  2. 0x800/0x900/0xA00/0xC00/0xD00/0xE00 */
0011 /*  3. RF register 0x00-2E */
0012 /*  4. Bit Mask for BB/RF register */
0013 /*  5. Other definition for BB/RF R/W */
0014 /*  */
0015 
0016 /*  */
0017 /*  1. PMAC duplicate register due to connection: RF_Mode, TRxRN, NumOf L-STF */
0018 /*  1. Page1(0x100) */
0019 /*  */
0020 #define rPMAC_Reset     0x100
0021 #define rPMAC_TxStart       0x104
0022 #define rPMAC_TxLegacySIG   0x108
0023 #define rPMAC_TxHTSIG1      0x10c
0024 #define rPMAC_TxHTSIG2      0x110
0025 #define rPMAC_PHYDebug      0x114
0026 #define rPMAC_TxPacketNum   0x118
0027 #define rPMAC_TxIdle        0x11c
0028 #define rPMAC_TxMACHeader0  0x120
0029 #define rPMAC_TxMACHeader1  0x124
0030 #define rPMAC_TxMACHeader2  0x128
0031 #define rPMAC_TxMACHeader3  0x12c
0032 #define rPMAC_TxMACHeader4  0x130
0033 #define rPMAC_TxMACHeader5  0x134
0034 #define rPMAC_TxDataType    0x138
0035 #define rPMAC_TxRandomSeed  0x13c
0036 #define rPMAC_CCKPLCPPreamble   0x140
0037 #define rPMAC_CCKPLCPHeader 0x144
0038 #define rPMAC_CCKCRC16      0x148
0039 #define rPMAC_OFDMRxCRC32OK 0x170
0040 #define rPMAC_OFDMRxCRC32Er 0x174
0041 #define rPMAC_OFDMRxParityEr    0x178
0042 #define rPMAC_OFDMRxCRC8Er  0x17c
0043 #define rPMAC_CCKCRxRC16Er  0x180
0044 #define rPMAC_CCKCRxRC32Er  0x184
0045 #define rPMAC_CCKCRxRC32OK  0x188
0046 #define rPMAC_TxStatus      0x18c
0047 
0048 /*  2. Page2(0x200) */
0049 /*  The following two definition are only used for USB interface. */
0050 #define RF_BB_CMD_ADDR      0x02c0  /*  RF/BB r/w cmd address. */
0051 #define RF_BB_CMD_DATA      0x02c4  /*  RF/BB r/w cmd data. */
0052 
0053 /*  3. Page8(0x800) */
0054 #define rFPGA0_RFMOD        0x800   /* RF mode & CCK TxSC RF BW Setting */
0055 
0056 #define rFPGA0_TxInfo       0x804   /*  Status report?? */
0057 #define rFPGA0_PSDFunction  0x808
0058 
0059 #define rFPGA0_TxGainStage  0x80c   /*  Set TX PWR init gain? */
0060 
0061 #define rFPGA0_RFTiming1    0x810   /*  Useless now */
0062 #define rFPGA0_RFTiming2    0x814
0063 
0064 #define rFPGA0_XA_HSSIParameter1    0x820   /*  RF 3 wire register */
0065 #define rFPGA0_XA_HSSIParameter2    0x824
0066 #define rFPGA0_XB_HSSIParameter1    0x828
0067 #define rFPGA0_XB_HSSIParameter2    0x82c
0068 
0069 #define rFPGA0_XA_LSSIParameter     0x840
0070 #define rFPGA0_XB_LSSIParameter     0x844
0071 
0072 #define rFPGA0_RFWakeUpParameter    0x850   /*  Useless now */
0073 #define rFPGA0_RFSleepUpParameter   0x854
0074 
0075 #define rFPGA0_XAB_SwitchControl    0x858   /*  RF Channel switch */
0076 #define rFPGA0_XCD_SwitchControl    0x85c
0077 
0078 #define rFPGA0_XA_RFInterfaceOE     0x860   /*  RF Channel switch */
0079 #define rFPGA0_XB_RFInterfaceOE     0x864
0080 
0081 #define rFPGA0_XAB_RFInterfaceSW    0x870   /*  RF Iface Software Control */
0082 #define rFPGA0_XCD_RFInterfaceSW    0x874
0083 
0084 #define rFPGA0_XAB_RFParameter      0x878   /*  RF Parameter */
0085 #define rFPGA0_XCD_RFParameter      0x87c
0086 
0087 /* Crystal cap setting RF-R/W protection for parameter4?? */
0088 #define rFPGA0_AnalogParameter1     0x880
0089 #define rFPGA0_AnalogParameter2     0x884
0090 #define rFPGA0_AnalogParameter3     0x888
0091 /*  enable ad/da clock1 for dual-phy */
0092 #define rFPGA0_AdDaClockEn      0x888
0093 #define rFPGA0_AnalogParameter4     0x88c
0094 
0095 #define rFPGA0_XA_LSSIReadBack      0x8a0   /*  Tranceiver LSSI Readback */
0096 #define rFPGA0_XB_LSSIReadBack      0x8a4
0097 #define rFPGA0_XC_LSSIReadBack      0x8a8
0098 #define rFPGA0_XD_LSSIReadBack      0x8ac
0099 
0100 #define rFPGA0_PSDReport        0x8b4   /*  Useless now */
0101 /*  Transceiver A HSPI Readback */
0102 #define TransceiverA_HSPI_Readback  0x8b8
0103 /*  Transceiver B HSPI Readback */
0104 #define TransceiverB_HSPI_Readback  0x8bc
0105 /*  Useless now RF Interface Readback Value */
0106 #define rFPGA0_XAB_RFInterfaceRB    0x8e0
0107 #define rFPGA0_XCD_RFInterfaceRB    0x8e4   /*  Useless now */
0108 
0109 /*  4. Page9(0x900) */
0110 /* RF mode & OFDM TxSC RF BW Setting?? */
0111 #define rFPGA1_RFMOD            0x900
0112 
0113 #define rFPGA1_TxBlock          0x904   /*  Useless now */
0114 #define rFPGA1_DebugSelect      0x908   /*  Useless now */
0115 #define rFPGA1_TxInfo           0x90c   /*  Useless now Status report */
0116 
0117 /*  5. PageA(0xA00) */
0118 /*  Set Control channel to upper or lower - required only for 40MHz */
0119 #define rCCK0_System            0xa00
0120 
0121 /*  Disable init gain now Select RX path by RSSI */
0122 #define rCCK0_AFESetting        0xa04
0123 /*  Disable init gain now Init gain */
0124 #define rCCK0_CCA           0xa08
0125 
0126 /* AGC default value, saturation level Antenna Diversity, RX AGC, LNA Threshold,
0127  * RX LNA Threshold useless now. Not the same as 90 series */
0128 #define rCCK0_RxAGC1            0xa0c
0129 #define rCCK0_RxAGC2            0xa10   /* AGC & DAGC */
0130 
0131 #define rCCK0_RxHP          0xa14
0132 
0133 /* Timing recovery & Channel estimation threshold */
0134 #define rCCK0_DSPParameter1     0xa18
0135 #define rCCK0_DSPParameter2     0xa1c   /* SQ threshold */
0136 
0137 #define rCCK0_TxFilter1         0xa20
0138 #define rCCK0_TxFilter2         0xa24
0139 #define rCCK0_DebugPort         0xa28   /* debug port and Tx filter3 */
0140 #define rCCK0_FalseAlarmReport      0xa2c   /* 0xa2d useless now */
0141 #define rCCK0_TRSSIReport       0xa50
0142 #define rCCK0_RxReport          0xa54  /* 0xa57 */
0143 #define rCCK0_FACounterLower        0xa5c  /* 0xa5b */
0144 #define rCCK0_FACounterUpper        0xa58  /* 0xa5c */
0145 
0146 /*  */
0147 /*  PageB(0xB00) */
0148 /*  */
0149 #define rPdp_AntA           0xb00
0150 #define rPdp_AntA_4         0xb04
0151 #define rConfig_Pmpd_AntA       0xb28
0152 #define rConfig_AntA            0xb68
0153 #define rConfig_AntB            0xb6c
0154 #define rPdp_AntB           0xb70
0155 #define rPdp_AntB_4         0xb74
0156 #define rConfig_Pmpd_AntB       0xb98
0157 #define rAPK                0xbd8
0158 
0159 /*  */
0160 /*  6. PageC(0xC00) */
0161 /*  */
0162 #define rOFDM0_LSTF         0xc00
0163 
0164 #define rOFDM0_TRxPathEnable        0xc04
0165 #define rOFDM0_TRMuxPar         0xc08
0166 #define rOFDM0_TRSWIsolation        0xc0c
0167 
0168 /* RxIQ DC offset, Rx digital filter, DC notch filter */
0169 #define rOFDM0_XARxAFE          0xc10
0170 #define rOFDM0_XARxIQImbalance      0xc14  /* RxIQ imblance matrix */
0171 #define rOFDM0_XBRxAFE          0xc18
0172 #define rOFDM0_XBRxIQImbalance      0xc1c
0173 #define rOFDM0_XCRxAFE          0xc20
0174 #define rOFDM0_XCRxIQImbalance      0xc24
0175 #define rOFDM0_XDRxAFE          0xc28
0176 #define rOFDM0_XDRxIQImbalance      0xc2c
0177 
0178 #define rOFDM0_RxDetector1      0xc30  /*PD,BW & SBD DM tune init gain*/
0179 #define rOFDM0_RxDetector2      0xc34  /* SBD & Fame Sync. */
0180 #define rOFDM0_RxDetector3      0xc38  /* Frame Sync. */
0181 #define rOFDM0_RxDetector4      0xc3c  /* PD, SBD, Frame Sync & Short-GI */
0182 
0183 #define rOFDM0_RxDSP            0xc40  /* Rx Sync Path */
0184 #define rOFDM0_CFOandDAGC       0xc44  /* CFO & DAGC */
0185 #define rOFDM0_CCADropThreshold     0xc48 /* CCA Drop threshold */
0186 #define rOFDM0_ECCAThreshold        0xc4c /*  energy CCA */
0187 
0188 #define rOFDM0_XAAGCCore1       0xc50   /*  DIG */
0189 #define rOFDM0_XAAGCCore2       0xc54
0190 #define rOFDM0_XBAGCCore1       0xc58
0191 #define rOFDM0_XBAGCCore2       0xc5c
0192 #define rOFDM0_XCAGCCore1       0xc60
0193 #define rOFDM0_XCAGCCore2       0xc64
0194 #define rOFDM0_XDAGCCore1       0xc68
0195 #define rOFDM0_XDAGCCore2       0xc6c
0196 
0197 #define rOFDM0_AGCParameter1        0xc70
0198 #define rOFDM0_AGCParameter2        0xc74
0199 #define rOFDM0_AGCRSSITable     0xc78
0200 #define rOFDM0_HTSTFAGC         0xc7c
0201 
0202 #define rOFDM0_XATxIQImbalance      0xc80   /*  TX PWR TRACK and DIG */
0203 #define rOFDM0_XATxAFE          0xc84
0204 #define rOFDM0_XBTxIQImbalance      0xc88
0205 #define rOFDM0_XBTxAFE          0xc8c
0206 #define rOFDM0_XCTxIQImbalance      0xc90
0207 #define rOFDM0_XCTxAFE          0xc94
0208 #define rOFDM0_XDTxIQImbalance      0xc98
0209 #define rOFDM0_XDTxAFE          0xc9c
0210 
0211 #define rOFDM0_RxIQExtAnta      0xca0
0212 #define rOFDM0_TxCoeff1         0xca4
0213 #define rOFDM0_TxCoeff2         0xca8
0214 #define rOFDM0_TxCoeff3         0xcac
0215 #define rOFDM0_TxCoeff4         0xcb0
0216 #define rOFDM0_TxCoeff5         0xcb4
0217 #define rOFDM0_TxCoeff6         0xcb8
0218 #define rOFDM0_RxHPParameter        0xce0
0219 #define rOFDM0_TxPseudoNoiseWgt     0xce4
0220 #define rOFDM0_FrameSync        0xcf0
0221 #define rOFDM0_DFSReport        0xcf4
0222 
0223 /*  */
0224 /*  7. PageD(0xD00) */
0225 /*  */
0226 #define rOFDM1_LSTF         0xd00
0227 #define rOFDM1_TRxPathEnable        0xd04
0228 
0229 #define rOFDM1_CFO          0xd08   /*  No setting now */
0230 #define rOFDM1_CSI1         0xd10
0231 #define rOFDM1_SBD          0xd14
0232 #define rOFDM1_CSI2         0xd18
0233 #define rOFDM1_CFOTracking      0xd2c
0234 #define rOFDM1_TRxMesaure1      0xd34
0235 #define rOFDM1_IntfDet          0xd3c
0236 #define rOFDM1_PseudoNoiseStateAB   0xd50
0237 #define rOFDM1_PseudoNoiseStateCD   0xd54
0238 #define rOFDM1_RxPseudoNoiseWgt     0xd58
0239 
0240 #define rOFDM_PHYCounter1       0xda0  /* cca, parity fail */
0241 #define rOFDM_PHYCounter2       0xda4  /* rate illegal, crc8 fail */
0242 #define rOFDM_PHYCounter3       0xda8  /* MCS not support */
0243 
0244 #define rOFDM_ShortCFOAB        0xdac   /*  No setting now */
0245 #define rOFDM_ShortCFOCD        0xdb0
0246 #define rOFDM_LongCFOAB         0xdb4
0247 #define rOFDM_LongCFOCD         0xdb8
0248 #define rOFDM_TailCFOAB         0xdbc
0249 #define rOFDM_TailCFOCD         0xdc0
0250 #define rOFDM_PWMeasure1        0xdc4
0251 #define rOFDM_PWMeasure2        0xdc8
0252 #define rOFDM_BWReport          0xdcc
0253 #define rOFDM_AGCReport         0xdd0
0254 #define rOFDM_RxSNR         0xdd4
0255 #define rOFDM_RxEVMCSI          0xdd8
0256 #define rOFDM_SIGReport         0xddc
0257 
0258 /*  */
0259 /*  8. PageE(0xE00) */
0260 /*  */
0261 #define rTxAGC_A_Rate18_06      0xe00
0262 #define rTxAGC_A_Rate54_24      0xe04
0263 #define rTxAGC_A_CCK1_Mcs32     0xe08
0264 #define rTxAGC_A_Mcs03_Mcs00        0xe10
0265 #define rTxAGC_A_Mcs07_Mcs04        0xe14
0266 #define rTxAGC_A_Mcs11_Mcs08        0xe18
0267 #define rTxAGC_A_Mcs15_Mcs12        0xe1c
0268 
0269 #define rTxAGC_B_Rate18_06      0x830
0270 #define rTxAGC_B_Rate54_24      0x834
0271 #define rTxAGC_B_CCK1_55_Mcs32      0x838
0272 #define rTxAGC_B_Mcs03_Mcs00        0x83c
0273 #define rTxAGC_B_Mcs07_Mcs04        0x848
0274 #define rTxAGC_B_Mcs11_Mcs08        0x84c
0275 #define rTxAGC_B_Mcs15_Mcs12        0x868
0276 #define rTxAGC_B_CCK11_A_CCK2_11    0x86c
0277 
0278 #define rFPGA0_IQK          0xe28
0279 #define rTx_IQK_Tone_A          0xe30
0280 #define rRx_IQK_Tone_A          0xe34
0281 #define rTx_IQK_PI_A            0xe38
0282 #define rRx_IQK_PI_A            0xe3c
0283 
0284 #define rTx_IQK             0xe40
0285 #define rRx_IQK             0xe44
0286 #define rIQK_AGC_Pts            0xe48
0287 #define rIQK_AGC_Rsp            0xe4c
0288 #define rTx_IQK_Tone_B          0xe50
0289 #define rRx_IQK_Tone_B          0xe54
0290 #define rTx_IQK_PI_B            0xe58
0291 #define rRx_IQK_PI_B            0xe5c
0292 #define rIQK_AGC_Cont           0xe60
0293 
0294 #define rBlue_Tooth         0xe6c
0295 #define rRx_Wait_CCA            0xe70
0296 #define rTx_CCK_RFON            0xe74
0297 #define rTx_CCK_BBON            0xe78
0298 #define rTx_OFDM_RFON           0xe7c
0299 #define rTx_OFDM_BBON           0xe80
0300 #define rTx_To_Rx           0xe84
0301 #define rTx_To_Tx           0xe88
0302 #define rRx_CCK             0xe8c
0303 
0304 #define rTx_Power_Before_IQK_A      0xe94
0305 #define rTx_Power_After_IQK_A       0xe9c
0306 
0307 #define rRx_Power_Before_IQK_A      0xea0
0308 #define rRx_Power_Before_IQK_A_2    0xea4
0309 #define rRx_Power_After_IQK_A       0xea8
0310 #define rRx_Power_After_IQK_A_2     0xeac
0311 
0312 #define rTx_Power_Before_IQK_B      0xeb4
0313 #define rTx_Power_After_IQK_B       0xebc
0314 
0315 #define rRx_Power_Before_IQK_B      0xec0
0316 #define rRx_Power_Before_IQK_B_2    0xec4
0317 #define rRx_Power_After_IQK_B       0xec8
0318 #define rRx_Power_After_IQK_B_2     0xecc
0319 
0320 #define rRx_OFDM            0xed0
0321 #define rRx_Wait_RIFS           0xed4
0322 #define rRx_TO_Rx           0xed8
0323 #define rStandby            0xedc
0324 #define rSleep              0xee0
0325 #define rPMPD_ANAEN         0xeec
0326 
0327 /*  */
0328 /*  7. RF Register 0x00-0x2E (RF 8256) */
0329 /*     RF-0222D 0x00-3F */
0330 /*  */
0331 /* Zebra1 */
0332 #define rZebra1_HSSIEnable      0x0 /*  Useless now */
0333 #define rZebra1_TRxEnable1      0x1
0334 #define rZebra1_TRxEnable2      0x2
0335 #define rZebra1_AGC         0x4
0336 #define rZebra1_ChargePump      0x5
0337 #define rZebra1_Channel         0x7 /*  RF channel switch */
0338 
0339 /* endif */
0340 #define rZebra1_TxGain          0x8 /*  Useless now */
0341 #define rZebra1_TxLPF           0x9
0342 #define rZebra1_RxLPF           0xb
0343 #define rZebra1_RxHPFCorner     0xc
0344 
0345 /* Zebra4 */
0346 #define rGlobalCtrl     0   /*  Useless now */
0347 #define rRTL8256_TxLPF      19
0348 #define rRTL8256_RxLPF      11
0349 
0350 /* RTL8258 */
0351 #define rRTL8258_TxLPF      0x11    /*  Useless now */
0352 #define rRTL8258_RxLPF      0x13
0353 #define rRTL8258_RSSILPF    0xa
0354 
0355 /*  */
0356 /*  RL6052 Register definition */
0357 /*  */
0358 #define RF_AC           0x00    /*  */
0359 
0360 #define RF_IQADJ_G1     0x01    /*  */
0361 #define RF_IQADJ_G2     0x02    /*  */
0362 
0363 #define RF_POW_TRSW     0x05    /*  */
0364 
0365 #define RF_GAIN_RX      0x06    /*  */
0366 #define RF_GAIN_TX      0x07    /*  */
0367 
0368 #define RF_TXM_IDAC     0x08    /*  */
0369 #define RF_IPA_G        0x09    /*  */
0370 #define RF_TXBIAS_G     0x0A
0371 #define RF_TXPA_AG      0x0B
0372 #define RF_IPA_A        0x0C    /*  */
0373 #define RF_TXBIAS_A     0x0D
0374 #define RF_BS_PA_APSET_G9_G11   0x0E
0375 #define RF_BS_IQGEN     0x0F    /*  */
0376 
0377 #define RF_MODE1        0x10    /*  */
0378 #define RF_MODE2        0x11    /*  */
0379 
0380 #define RF_RX_AGC_HP        0x12    /*  */
0381 #define RF_TX_AGC       0x13    /*  */
0382 #define RF_BIAS         0x14    /*  */
0383 #define RF_IPA          0x15    /*  */
0384 #define RF_TXBIAS       0x16
0385 #define RF_POW_ABILITY      0x17    /*  */
0386 #define RF_CHNLBW       0x18    /*  RF channel and BW switch */
0387 #define RF_TOP          0x19    /*  */
0388 
0389 #define RF_RX_G1        0x1A    /*  */
0390 #define RF_RX_G2        0x1B    /*  */
0391 
0392 #define RF_RX_BB2       0x1C    /*  */
0393 #define RF_RX_BB1       0x1D    /*  */
0394 
0395 #define RF_RCK1         0x1E    /*  */
0396 #define RF_RCK2         0x1F    /*  */
0397 
0398 #define RF_TX_G1        0x20    /*  */
0399 #define RF_TX_G2        0x21    /*  */
0400 #define RF_TX_G3        0x22    /*  */
0401 
0402 #define RF_TX_BB1       0x23    /*  */
0403 
0404 #define RF_T_METER_92D      0x42    /*  */
0405 #define RF_T_METER_88E      0x42    /*  */
0406 #define RF_T_METER      0x24    /*  */
0407 
0408 #define RF_SYN_G1       0x25    /*  RF TX Power control */
0409 #define RF_SYN_G2       0x26    /*  RF TX Power control */
0410 #define RF_SYN_G3       0x27    /*  RF TX Power control */
0411 #define RF_SYN_G4       0x28    /*  RF TX Power control */
0412 #define RF_SYN_G5       0x29    /*  RF TX Power control */
0413 #define RF_SYN_G6       0x2A    /*  RF TX Power control */
0414 #define RF_SYN_G7       0x2B    /*  RF TX Power control */
0415 #define RF_SYN_G8       0x2C    /*  RF TX Power control */
0416 
0417 #define RF_RCK_OS       0x30    /*  RF TX PA control */
0418 #define RF_TXPA_G1      0x31    /*  RF TX PA control */
0419 #define RF_TXPA_G2      0x32    /*  RF TX PA control */
0420 #define RF_TXPA_G3      0x33    /*  RF TX PA control */
0421 #define RF_TX_BIAS_A        0x35
0422 #define RF_TX_BIAS_D        0x36
0423 #define RF_LOBF_9       0x38
0424 #define RF_RXRF_A3      0x3C    /*  */
0425 #define RF_TRSW         0x3F
0426 
0427 #define RF_TXRF_A2      0x41
0428 #define RF_TXPA_G4      0x46
0429 #define RF_TXPA_A4      0x4B
0430 #define RF_0x52         0x52
0431 #define RF_WE_LUT       0xEF
0432 
0433 /*  */
0434 /* Bit Mask */
0435 /*  */
0436 /*  1. Page1(0x100) */
0437 #define bBBResetB       0x100   /*  Useless now? */
0438 #define bGlobalResetB       0x200
0439 #define bOFDMTxStart        0x4
0440 #define bCCKTxStart     0x8
0441 #define bCRC32Debug     0x100
0442 #define bPMACLoopback       0x10
0443 #define bTxLSIG         0xffffff
0444 #define bOFDMTxRate     0xf
0445 #define bOFDMTxReserved     0x10
0446 #define bOFDMTxLength       0x1ffe0
0447 #define bOFDMTxParity       0x20000
0448 #define bTxHTSIG1       0xffffff
0449 #define bTxHTMCSRate        0x7f
0450 #define bTxHTBW         0x80
0451 #define bTxHTLength     0xffff00
0452 #define bTxHTSIG2       0xffffff
0453 #define bTxHTSmoothing      0x1
0454 #define bTxHTSounding       0x2
0455 #define bTxHTReserved       0x4
0456 #define bTxHTAggreation     0x8
0457 #define bTxHTSTBC       0x30
0458 #define bTxHTAdvanceCoding  0x40
0459 #define bTxHTShortGI        0x80
0460 #define bTxHTNumberHT_LTF   0x300
0461 #define bTxHTCRC8       0x3fc00
0462 #define bCounterReset       0x10000
0463 #define bNumOfOFDMTx        0xffff
0464 #define bNumOfCCKTx     0xffff0000
0465 #define bTxIdleInterval     0xffff
0466 #define bOFDMService        0xffff0000
0467 #define bTxMACHeader        0xffffffff
0468 #define bTxDataInit     0xff
0469 #define bTxHTMode       0x100
0470 #define bTxDataType     0x30000
0471 #define bTxRandomSeed       0xffffffff
0472 #define bCCKTxPreamble      0x1
0473 #define bCCKTxSFD       0xffff0000
0474 #define bCCKTxSIG       0xff
0475 #define bCCKTxService       0xff00
0476 #define bCCKLengthExt       0x8000
0477 #define bCCKTxLength        0xffff0000
0478 #define bCCKTxCRC16     0xffff
0479 #define bCCKTxStatus        0x1
0480 #define bOFDMTxStatus       0x2
0481 
0482 #define IS_BB_REG_OFFSET_92S(_Offset)           \
0483     ((_Offset >= 0x800) && (_Offset <= 0xfff))
0484 
0485 /*  2. Page8(0x800) */
0486 #define bRFMOD          0x1 /*  Reg 0x800 rFPGA0_RFMOD */
0487 #define bJapanMode      0x2
0488 #define bCCKTxSC        0x30
0489 #define bCCKEn          0x1000000
0490 #define bOFDMEn         0x2000000
0491 
0492 #define bOFDMRxADCPhase     0x10000 /*  Useless now */
0493 #define bOFDMTxDACPhase     0x40000
0494 #define bXATxAGC        0x3f
0495 
0496 #define bAntennaSelect      0x0300
0497 
0498 #define bXBTxAGC        0xf00   /*  Reg 80c rFPGA0_TxGainStage */
0499 #define bXCTxAGC        0xf000
0500 #define bXDTxAGC        0xf0000
0501 
0502 #define bPAStart        0xf0000000  /*  Useless now */
0503 #define bTRStart        0x00f00000
0504 #define bRFStart        0x0000f000
0505 #define bBBStart        0x000000f0
0506 #define bBBCCKStart     0x0000000f
0507 #define bPAEnd          0xf          /* Reg0x814 */
0508 #define bTREnd          0x0f000000
0509 #define bRFEnd          0x000f0000
0510 #define bCCAMask        0x000000f0   /* T2R */
0511 #define bR2RCCAMask     0x00000f00
0512 #define bHSSI_R2TDelay      0xf8000000
0513 #define bHSSI_T2RDelay      0xf80000
0514 #define bContTxHSSI     0x400     /* change gain at continue Tx */
0515 #define bIGFromCCK      0x200
0516 #define bAGCAddress     0x3f
0517 #define bRxHPTx         0x7000
0518 #define bRxHPT2R        0x38000
0519 #define bRxHPCCKIni     0xc0000
0520 #define bAGCTxCode      0xc00000
0521 #define bAGCRxCode      0x300000
0522 
0523 /* Reg 0x820~84f rFPGA0_XA_HSSIParameter1 */
0524 #define b3WireDataLength    0x800
0525 #define b3WireAddressLength 0x400
0526 
0527 #define b3WireRFPowerDown   0x1 /*  Useless now */
0528 #define b5GPAPEPolarity     0x40000000
0529 #define b2GPAPEPolarity     0x80000000
0530 #define bRFSW_TxDefaultAnt  0x3
0531 #define bRFSW_TxOptionAnt   0x30
0532 #define bRFSW_RxDefaultAnt  0x300
0533 #define bRFSW_RxOptionAnt   0x3000
0534 #define bRFSI_3WireData     0x1
0535 #define bRFSI_3WireClock    0x2
0536 #define bRFSI_3WireLoad     0x4
0537 #define bRFSI_3WireRW       0x8
0538 #define bRFSI_3Wire     0xf
0539 
0540 #define bRFSI_RFENV     0x10    /* Reg 0x870 rFPGA0_XAB_RFInterfaceSW */
0541 
0542 #define bRFSI_TRSW      0x20    /*  Useless now */
0543 #define bRFSI_TRSWB     0x40
0544 #define bRFSI_ANTSW     0x100
0545 #define bRFSI_ANTSWB        0x200
0546 #define bRFSI_PAPE      0x400
0547 #define bRFSI_PAPE5G        0x800
0548 #define bBandSelect     0x1
0549 #define bHTSIG2_GI      0x80
0550 #define bHTSIG2_Smoothing   0x01
0551 #define bHTSIG2_Sounding    0x02
0552 #define bHTSIG2_Aggreaton   0x08
0553 #define bHTSIG2_STBC        0x30
0554 #define bHTSIG2_AdvCoding   0x40
0555 #define bHTSIG2_NumOfHTLTF  0x300
0556 #define bHTSIG2_CRC8        0x3fc
0557 #define bHTSIG1_MCS     0x7f
0558 #define bHTSIG1_BandWidth   0x80
0559 #define bHTSIG1_HTLength    0xffff
0560 #define bLSIG_Rate      0xf
0561 #define bLSIG_Reserved      0x10
0562 #define bLSIG_Length        0x1fffe
0563 #define bLSIG_Parity        0x20
0564 #define bCCKRxPhase     0x4
0565 
0566 #define bLSSIReadAddress    0x7f800000   /*  T65 RF */
0567 
0568 #define bLSSIReadEdge       0x80000000   /* LSSI "Read" edge signal */
0569 
0570 #define bLSSIReadBackData   0xfffff     /*  T65 RF */
0571 
0572 #define bLSSIReadOKFlag     0x1000  /*  Useless now */
0573 #define bCCKSampleRate      0x8       /* 0: 44MHz, 1:88MHz */
0574 #define bRegulator0Standby  0x1
0575 #define bRegulatorPLLStandby    0x2
0576 #define bRegulator1Standby  0x4
0577 #define bPLLPowerUp     0x8
0578 #define bDPLLPowerUp        0x10
0579 #define bDA10PowerUp        0x20
0580 #define bAD7PowerUp     0x200
0581 #define bDA6PowerUp     0x2000
0582 #define bXtalPowerUp        0x4000
0583 #define b40MDClkPowerUP     0x8000
0584 #define bDA6DebugMode       0x20000
0585 #define bDA6Swing       0x380000
0586 
0587 /*  Reg 0x880 rFPGA0_AnalogParameter1 20/40 CCK support switch 40/80 BB MHZ */
0588 #define bADClkPhase     0x4000000
0589 
0590 #define b80MClkDelay        0x18000000  /*  Useless */
0591 #define bAFEWatchDogEnable  0x20000000
0592 
0593 /*  Reg 0x884 rFPGA0_AnalogParameter2 Crystal cap */
0594 #define bXtalCap01      0xc0000000
0595 #define bXtalCap23      0x3
0596 #define bXtalCap92x     0x0f000000
0597 #define bXtalCap        0x0f000000
0598 
0599 #define bIntDifClkEnable    0x400   /*  Useless */
0600 #define bExtSigClkEnable    0x800
0601 #define bBandgapMbiasPowerUp    0x10000
0602 #define bAD11SHGain     0xc0000
0603 #define bAD11InputRange     0x700000
0604 #define bAD11OPCurrent      0x3800000
0605 #define bIPathLoopback      0x4000000
0606 #define bQPathLoopback      0x8000000
0607 #define bAFELoopback        0x10000000
0608 #define bDA10Swing      0x7e0
0609 #define bDA10Reverse        0x800
0610 #define bDAClkSource        0x1000
0611 #define bAD7InputRange      0x6000
0612 #define bAD7Gain        0x38000
0613 #define bAD7OutputCMMode    0x40000
0614 #define bAD7InputCMMode     0x380000
0615 #define bAD7Current     0xc00000
0616 #define bRegulatorAdjust    0x7000000
0617 #define bAD11PowerUpAtTx    0x1
0618 #define bDA10PSAtTx     0x10
0619 #define bAD11PowerUpAtRx    0x100
0620 #define bDA10PSAtRx     0x1000
0621 #define bCCKRxAGCFormat     0x200
0622 #define bPSDFFTSamplepPoint 0xc000
0623 #define bPSDAverageNum      0x3000
0624 #define bIQPathControl      0xc00
0625 #define bPSDFreq        0x3ff
0626 #define bPSDAntennaPath     0x30
0627 #define bPSDIQSwitch        0x40
0628 #define bPSDRxTrigger       0x400000
0629 #define bPSDTxTrigger       0x80000000
0630 #define bPSDSineToneScale   0x7f000000
0631 #define bPSDReport      0xffff
0632 
0633 /*  3. Page9(0x900) */
0634 #define bOFDMTxSC       0x30000000  /*  Useless */
0635 #define bCCKTxOn        0x1
0636 #define bOFDMTxOn       0x2
0637 #define bDebugPage      0xfff  /* reset debug page and HWord, LWord */
0638 #define bDebugItem      0xff   /* reset debug page and LWord */
0639 #define bAntL           0x10
0640 #define bAntNonHT       0x100
0641 #define bAntHT1         0x1000
0642 #define bAntHT2         0x10000
0643 #define bAntHT1S1       0x100000
0644 #define bAntNonHTS1     0x1000000
0645 
0646 /*  4. PageA(0xA00) */
0647 #define bCCKBBMode      0x3 /*  Useless */
0648 #define bCCKTxPowerSaving   0x80
0649 #define bCCKRxPowerSaving   0x40
0650 
0651 #define bCCKSideBand        0x10    /*  Reg 0xa00 rCCK0_System 20/40 */
0652 
0653 #define bCCKScramble        0x8 /*  Useless */
0654 #define bCCKAntDiversity    0x8000
0655 #define bCCKCarrierRecovery 0x4000
0656 #define bCCKTxRate      0x3000
0657 #define bCCKDCCancel        0x0800
0658 #define bCCKISICancel       0x0400
0659 #define bCCKMatchFilter     0x0200
0660 #define bCCKEqualizer       0x0100
0661 #define bCCKPreambleDetect  0x800000
0662 #define bCCKFastFalseCCA    0x400000
0663 #define bCCKChEstStart      0x300000
0664 #define bCCKCCACount        0x080000
0665 #define bCCKcs_lim      0x070000
0666 #define bCCKBistMode        0x80000000
0667 #define bCCKCCAMask     0x40000000
0668 #define bCCKTxDACPhase      0x4
0669 #define bCCKRxADCPhase      0x20000000   /* r_rx_clk */
0670 #define bCCKr_cp_mode0      0x0100
0671 #define bCCKTxDCOffset      0xf0
0672 #define bCCKRxDCOffset      0xf
0673 #define bCCKCCAMode     0xc000
0674 #define bCCKFalseCS_lim     0x3f00
0675 #define bCCKCS_ratio        0xc00000
0676 #define bCCKCorgBit_sel     0x300000
0677 #define bCCKPD_lim      0x0f0000
0678 #define bCCKNewCCA      0x80000000
0679 #define bCCKRxHPofIG        0x8000
0680 #define bCCKRxIG        0x7f00
0681 #define bCCKLNAPolarity     0x800000
0682 #define bCCKRx1stGain       0x7f0000
0683 #define bCCKRFExtend        0x20000000 /* CCK Rx Iinital gain polarity */
0684 #define bCCKRxAGCSatLevel   0x1f000000
0685 #define bCCKRxAGCSatCount   0xe0
0686 #define bCCKRxRFSettle      0x1f       /* AGCsamp_dly */
0687 #define bCCKFixedRxAGC      0x8000
0688 #define bCCKAntennaPolarity 0x2000
0689 #define bCCKTxFilterType    0x0c00
0690 #define bCCKRxAGCReportType 0x0300
0691 #define bCCKRxDAGCEn        0x80000000
0692 #define bCCKRxDAGCPeriod    0x20000000
0693 #define bCCKRxDAGCSatLevel  0x1f000000
0694 #define bCCKTimingRecovery  0x800000
0695 #define bCCKTxC0        0x3f0000
0696 #define bCCKTxC1        0x3f000000
0697 #define bCCKTxC2        0x3f
0698 #define bCCKTxC3        0x3f00
0699 #define bCCKTxC4        0x3f0000
0700 #define bCCKTxC5        0x3f000000
0701 #define bCCKTxC6        0x3f
0702 #define bCCKTxC7        0x3f00
0703 #define bCCKDebugPort       0xff0000
0704 #define bCCKDACDebug        0x0f000000
0705 #define bCCKFalseAlarmEnable    0x8000
0706 #define bCCKFalseAlarmRead  0x4000
0707 #define bCCKTRSSI       0x7f
0708 #define bCCKRxAGCReport     0xfe
0709 #define bCCKRxReport_AntSel 0x80000000
0710 #define bCCKRxReport_MFOff  0x40000000
0711 #define bCCKRxRxReport_SQLoss   0x20000000
0712 #define bCCKRxReport_Pktloss    0x10000000
0713 #define bCCKRxReport_Lockedbit  0x08000000
0714 #define bCCKRxReport_RateError  0x04000000
0715 #define bCCKRxReport_RxRate 0x03000000
0716 #define bCCKRxFACounterLower    0xff
0717 #define bCCKRxFACounterUpper    0xff000000
0718 #define bCCKRxHPAGCStart    0xe000
0719 #define bCCKRxHPAGCFinal    0x1c00
0720 #define bCCKRxFalseAlarmEnable  0x8000
0721 #define bCCKFACounterFreeze 0x4000
0722 #define bCCKTxPathSel       0x10000000
0723 #define bCCKDefaultRxPath   0xc000000
0724 #define bCCKOptionRxPath    0x3000000
0725 
0726 /*  5. PageC(0xC00) */
0727 #define bNumOfSTF       0x3 /*  Useless */
0728 #define bShift_L        0xc0
0729 #define bGI_TH          0xc
0730 #define bRxPathA        0x1
0731 #define bRxPathB        0x2
0732 #define bRxPathC        0x4
0733 #define bRxPathD        0x8
0734 #define bTxPathA        0x1
0735 #define bTxPathB        0x2
0736 #define bTxPathC        0x4
0737 #define bTxPathD        0x8
0738 #define bTRSSIFreq      0x200
0739 #define bADCBackoff     0x3000
0740 #define bDFIRBackoff        0xc000
0741 #define bTRSSILatchPhase    0x10000
0742 #define bRxIDCOffset        0xff
0743 #define bRxQDCOffset        0xff00
0744 #define bRxDFIRMode     0x1800000
0745 #define bRxDCNFType     0xe000000
0746 #define bRXIQImb_A      0x3ff
0747 #define bRXIQImb_B      0xfc00
0748 #define bRXIQImb_C      0x3f0000
0749 #define bRXIQImb_D      0xffc00000
0750 #define bDC_dc_Notch        0x60000
0751 #define bRxNBINotch     0x1f000000
0752 #define bPD_TH          0xf
0753 #define bPD_TH_Opt2     0xc000
0754 #define bPWED_TH        0x700
0755 #define bIfMF_Win_L     0x800
0756 #define bPD_Option      0x1000
0757 #define bMF_Win_L       0xe000
0758 #define bBW_Search_L        0x30000
0759 #define bwin_enh_L      0xc0000
0760 #define bBW_TH          0x700000
0761 #define bED_TH2         0x3800000
0762 #define bBW_option      0x4000000
0763 #define bRatio_TH       0x18000000
0764 #define bWindow_L       0xe0000000
0765 #define bSBD_Option     0x1
0766 #define bFrame_TH       0x1c
0767 #define bFS_Option      0x60
0768 #define bDC_Slope_check     0x80
0769 #define bFGuard_Counter_DC_L    0xe00
0770 #define bFrame_Weight_Short 0x7000
0771 #define bSub_Tune       0xe00000
0772 #define bFrame_DC_Length    0xe000000
0773 #define bSBD_start_offset   0x30000000
0774 #define bFrame_TH_2     0x7
0775 #define bFrame_GI2_TH       0x38
0776 #define bGI2_Sync_en        0x40
0777 #define bSarch_Short_Early  0x300
0778 #define bSarch_Short_Late   0xc00
0779 #define bSarch_GI2_Late     0x70000
0780 #define bCFOAntSum      0x1
0781 #define bCFOAcc         0x2
0782 #define bCFOStartOffset     0xc
0783 #define bCFOLookBack        0x70
0784 #define bCFOSumWeight       0x80
0785 #define bDAGCEnable     0x10000
0786 #define bTXIQImb_A      0x3ff
0787 #define bTXIQImb_B      0xfc00
0788 #define bTXIQImb_C      0x3f0000
0789 #define bTXIQImb_D      0xffc00000
0790 #define bTxIDCOffset        0xff
0791 #define bTxQDCOffset        0xff00
0792 #define bTxDFIRMode     0x10000
0793 #define bTxPesudoNoiseOn    0x4000000
0794 #define bTxPesudoNoise_A    0xff
0795 #define bTxPesudoNoise_B    0xff00
0796 #define bTxPesudoNoise_C    0xff0000
0797 #define bTxPesudoNoise_D    0xff000000
0798 #define bCCADropOption      0x20000
0799 #define bCCADropThres       0xfff00000
0800 #define bEDCCA_H        0xf
0801 #define bEDCCA_L        0xf0
0802 #define bLambda_ED      0x300
0803 #define bRxInitialGain      0x7f
0804 #define bRxAntDivEn     0x80
0805 #define bRxAGCAddressForLNA 0x7f00
0806 #define bRxHighPowerFlow    0x8000
0807 #define bRxAGCFreezeThres   0xc0000
0808 #define bRxFreezeStep_AGC1  0x300000
0809 #define bRxFreezeStep_AGC2  0xc00000
0810 #define bRxFreezeStep_AGC3  0x3000000
0811 #define bRxFreezeStep_AGC0  0xc000000
0812 #define bRxRssi_Cmp_En      0x10000000
0813 #define bRxQuickAGCEn       0x20000000
0814 #define bRxAGCFreezeThresMode   0x40000000
0815 #define bRxOverFlowCheckType    0x80000000
0816 #define bRxAGCShift     0x7f
0817 #define bTRSW_Tri_Only      0x80
0818 #define bPowerThres     0x300
0819 #define bRxAGCEn        0x1
0820 #define bRxAGCTogetherEn    0x2
0821 #define bRxAGCMin       0x4
0822 #define bRxHP_Ini       0x7
0823 #define bRxHP_TRLNA     0x70
0824 #define bRxHP_RSSI      0x700
0825 #define bRxHP_BBP1      0x7000
0826 #define bRxHP_BBP2      0x70000
0827 #define bRxHP_BBP3      0x700000
0828 #define bRSSI_H         0x7f0000     /* threshold for high power */
0829 #define bRSSI_Gen       0x7f000000   /* threshold for ant diversity */
0830 #define bRxSettle_TRSW      0x7
0831 #define bRxSettle_LNA       0x38
0832 #define bRxSettle_RSSI      0x1c0
0833 #define bRxSettle_BBP       0xe00
0834 #define bRxSettle_RxHP      0x7000
0835 #define bRxSettle_AntSW_RSSI    0x38000
0836 #define bRxSettle_AntSW     0xc0000
0837 #define bRxProcessTime_DAGC 0x300000
0838 #define bRxSettle_HSSI      0x400000
0839 #define bRxProcessTime_BBPPW    0x800000
0840 #define bRxAntennaPowerShift    0x3000000
0841 #define bRSSITableSelect    0xc000000
0842 #define bRxHP_Final     0x7000000
0843 #define bRxHTSettle_BBP     0x7
0844 #define bRxHTSettle_HSSI    0x8
0845 #define bRxHTSettle_RxHP    0x70
0846 #define bRxHTSettle_BBPPW   0x80
0847 #define bRxHTSettle_Idle    0x300
0848 #define bRxHTSettle_Reserved    0x1c00
0849 #define bRxHTRxHPEn     0x8000
0850 #define bRxHTAGCFreezeThres 0x30000
0851 #define bRxHTAGCTogetherEn  0x40000
0852 #define bRxHTAGCMin     0x80000
0853 #define bRxHTAGCEn      0x100000
0854 #define bRxHTDAGCEn     0x200000
0855 #define bRxHTRxHP_BBP       0x1c00000
0856 #define bRxHTRxHP_Final     0xe0000000
0857 #define bRxPWRatioTH        0x3
0858 #define bRxPWRatioEn        0x4
0859 #define bRxMFHold       0x3800
0860 #define bRxPD_Delay_TH1     0x38
0861 #define bRxPD_Delay_TH2     0x1c0
0862 #define bRxPD_DC_COUNT_MAX  0x600
0863 #define bRxPD_Delay_TH      0x8000
0864 #define bRxProcess_Delay    0xf0000
0865 #define bRxSearchrange_GI2_Early    0x700000
0866 #define bRxFrame_Guard_Counter_L    0x3800000
0867 #define bRxSGI_Guard_L      0xc000000
0868 #define bRxSGI_Search_L     0x30000000
0869 #define bRxSGI_TH       0xc0000000
0870 #define bDFSCnt0        0xff
0871 #define bDFSCnt1        0xff00
0872 #define bDFSFlag        0xf0000
0873 #define bMFWeightSum        0x300000
0874 #define bMinIdxTH       0x7f000000
0875 #define bDAFormat       0x40000
0876 #define bTxChEmuEnable      0x01000000
0877 #define bTRSWIsolation_A    0x7f
0878 #define bTRSWIsolation_B    0x7f00
0879 #define bTRSWIsolation_C    0x7f0000
0880 #define bTRSWIsolation_D    0x7f000000
0881 #define bExtLNAGain     0x7c00
0882 
0883 /*  6. PageE(0xE00) */
0884 #define bSTBCEn         0x4 /*  Useless */
0885 #define bAntennaMapping     0x10
0886 #define bNss            0x20
0887 #define bCFOAntSumD     0x200
0888 #define bPHYCounterReset    0x8000000
0889 #define bCFOReportGet       0x4000000
0890 #define bOFDMContinueTx     0x10000000
0891 #define bOFDMSingleCarrier  0x20000000
0892 #define bOFDMSingleTone     0x40000000
0893 #define bHTDetect       0x100
0894 #define bCFOEn          0x10000
0895 #define bCFOValue       0xfff00000
0896 #define bSigTone_Re     0x3f
0897 #define bSigTone_Im     0x7f00
0898 #define bCounter_CCA        0xffff
0899 #define bCounter_ParityFail 0xffff0000
0900 #define bCounter_RateIllegal    0xffff
0901 #define bCounter_CRC8Fail   0xffff0000
0902 #define bCounter_MCSNoSupport   0xffff
0903 #define bCounter_FastSync   0xffff
0904 #define bShortCFO       0xfff
0905 #define bShortCFOTLength    12   /* total */
0906 #define bShortCFOFLength    11   /* fraction */
0907 #define bLongCFO        0x7ff
0908 #define bLongCFOTLength     11
0909 #define bLongCFOFLength     11
0910 #define bTailCFO        0x1fff
0911 #define bTailCFOTLength     13
0912 #define bTailCFOFLength     12
0913 #define bmax_en_pwdB        0xffff
0914 #define bCC_power_dB        0xffff0000
0915 #define bnoise_pwdB     0xffff
0916 #define bPowerMeasTLength   10
0917 #define bPowerMeasFLength   3
0918 #define bRx_HT_BW       0x1
0919 #define bRxSC           0x6
0920 #define bRx_HT          0x8
0921 #define bNB_intf_det_on     0x1
0922 #define bIntf_win_len_cfg   0x30
0923 #define bNB_Intf_TH_cfg     0x1c0
0924 #define bRFGain         0x3f
0925 #define bTableSel       0x40
0926 #define bTRSW           0x80
0927 #define bRxSNR_A        0xff
0928 #define bRxSNR_B        0xff00
0929 #define bRxSNR_C        0xff0000
0930 #define bRxSNR_D        0xff000000
0931 #define bSNREVMTLength      8
0932 #define bSNREVMFLength      1
0933 #define bCSI1st         0xff
0934 #define bCSI2nd         0xff00
0935 #define bRxEVM1st       0xff0000
0936 #define bRxEVM2nd       0xff000000
0937 #define bSIGEVM         0xff
0938 #define bPWDB           0xff00
0939 #define bSGIEN          0x10000
0940 
0941 #define bSFactorQAM1        0xf /*  Useless */
0942 #define bSFactorQAM2        0xf0
0943 #define bSFactorQAM3        0xf00
0944 #define bSFactorQAM4        0xf000
0945 #define bSFactorQAM5        0xf0000
0946 #define bSFactorQAM6        0xf0000
0947 #define bSFactorQAM7        0xf00000
0948 #define bSFactorQAM8        0xf000000
0949 #define bSFactorQAM9        0xf0000000
0950 #define bCSIScheme      0x100000
0951 
0952 #define bNoiseLvlTopSet     0x3 /*  Useless */
0953 #define bChSmooth       0x4
0954 #define bChSmoothCfg1       0x38
0955 #define bChSmoothCfg2       0x1c0
0956 #define bChSmoothCfg3       0xe00
0957 #define bChSmoothCfg4       0x7000
0958 #define bMRCMode        0x800000
0959 #define bTHEVMCfg       0x7000000
0960 
0961 #define bLoopFitType        0x1 /*  Useless */
0962 #define bUpdCFO         0x40
0963 #define bUpdCFOOffData      0x80
0964 #define bAdvUpdCFO      0x100
0965 #define bAdvTimeCtrl        0x800
0966 #define bUpdClko        0x1000
0967 #define bFC         0x6000
0968 #define bTrackingMode       0x8000
0969 #define bPhCmpEnable        0x10000
0970 #define bUpdClkoLTF     0x20000
0971 #define bComChCFO       0x40000
0972 #define bCSIEstiMode        0x80000
0973 #define bAdvUpdEqz      0x100000
0974 #define bUChCfg         0x7000000
0975 #define bUpdEqz         0x8000000
0976 
0977 /* Rx Pseduo noise */
0978 #define bRxPesudoNoiseOn    0x20000000  /*  Useless */
0979 #define bRxPesudoNoise_A    0xff
0980 #define bRxPesudoNoise_B    0xff00
0981 #define bRxPesudoNoise_C    0xff0000
0982 #define bRxPesudoNoise_D    0xff000000
0983 #define bPesudoNoiseState_A 0xffff
0984 #define bPesudoNoiseState_B 0xffff0000
0985 #define bPesudoNoiseState_C 0xffff
0986 #define bPesudoNoiseState_D 0xffff0000
0987 
0988 /* 7. RF Register */
0989 /* Zebra1 */
0990 #define bZebra1_HSSIEnable  0x8     /*  Useless */
0991 #define bZebra1_TRxControl  0xc00
0992 #define bZebra1_TRxGainSetting  0x07f
0993 #define bZebra1_RxCorner    0xc00
0994 #define bZebra1_TxChargePump    0x38
0995 #define bZebra1_RxChargePump    0x7
0996 #define bZebra1_ChannelNum  0xf80
0997 #define bZebra1_TxLPFBW     0x400
0998 #define bZebra1_RxLPFBW     0x600
0999 
1000 /* Zebra4 */
1001 #define bRTL8256RegModeCtrl1    0x100   /*  Useless */
1002 #define bRTL8256RegModeCtrl0    0x40
1003 #define bRTL8256_TxLPFBW    0x18
1004 #define bRTL8256_RxLPFBW    0x600
1005 
1006 /* RTL8258 */
1007 #define bRTL8258_TxLPFBW    0xc /*  Useless */
1008 #define bRTL8258_RxLPFBW    0xc00
1009 #define bRTL8258_RSSILPFBW  0xc0
1010 
1011 /*  */
1012 /*  Other Definition */
1013 /*  */
1014 
1015 /* byte endable for sb_write */
1016 #define bByte0          0x1 /*  Useless */
1017 #define bByte1          0x2
1018 #define bByte2          0x4
1019 #define bByte3          0x8
1020 #define bWord0          0x3
1021 #define bWord1          0xc
1022 #define bDWord          0xf
1023 
1024 /* for PutRegsetting & GetRegSetting BitMask */
1025 #define bMaskByte0      0xff    /*  Reg 0xc50 rOFDM0_XAAGCCore~0xC6f */
1026 #define bMaskByte1      0xff00
1027 #define bMaskByte2      0xff0000
1028 #define bMaskByte3      0xff000000
1029 #define bMaskHWord      0xffff0000
1030 #define bMaskLWord      0x0000ffff
1031 #define bMaskDWord      0xffffffff
1032 #define bMask12Bits     0xfff
1033 #define bMaskH4Bits     0xf0000000
1034 #define bMaskOFDM_D     0xffc00000
1035 #define bMaskCCK        0x3f3f3f3f
1036 
1037 /* for PutRFRegsetting & GetRFRegSetting BitMask */
1038 #define bRFRegOffsetMask    0xfffff
1039 
1040 #define bEnable                 0x1 /*  Useless */
1041 #define bDisable                0x0
1042 
1043 #define LeftAntenna     0x0 /*  Useless */
1044 #define RightAntenna        0x1
1045 
1046 #define tCheckTxStatus      500   /* 500ms Useless */
1047 #define tUpdateRxCounter    100   /* 100ms */
1048 
1049 #define rateCCK         0   /*  Useless */
1050 #define rateOFDM        1
1051 #define rateHT          2
1052 
1053 /* define Register-End */
1054 #define bPMAC_End       0x1ff   /*  Useless */
1055 #define bFPGAPHY0_End       0x8ff
1056 #define bFPGAPHY1_End       0x9ff
1057 #define bCCKPHY0_End        0xaff
1058 #define bOFDMPHY0_End       0xcff
1059 #define bOFDMPHY1_End       0xdff
1060 
1061 #define bPMACControl        0x0 /*  Useless */
1062 #define bWMACControl        0x1
1063 #define bWNICControl        0x2
1064 
1065 #define PathA           0x0 /*  Useless */
1066 #define PathB           0x1
1067 #define PathC           0x2
1068 #define PathD           0x3
1069 
1070 /*--------------------------Define Parameters-------------------------------*/
1071 
1072 #endif