Path: blob/master/ALFA-W1F1/RTL8814AU/include/Hal8188EPhyReg.h
1307 views
/******************************************************************************1*2* Copyright(c) 2007 - 2017 Realtek Corporation.3*4* This program is free software; you can redistribute it and/or modify it5* under the terms of version 2 of the GNU General Public License as6* published by the Free Software Foundation.7*8* This program is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for11* more details.12*13*****************************************************************************/14#ifndef __INC_HAL8188EPHYREG_H__15#define __INC_HAL8188EPHYREG_H__16/*--------------------------Define Parameters-------------------------------*/17/*18* BB-PHY register PMAC 0x100 PHY 0x800 - 0xEFF19* 1. PMAC duplicate register due to connection: RF_Mode, TRxRN, NumOf L-STF20* 2. 0x800/0x900/0xA00/0xC00/0xD00/0xE0021* 3. RF register 0x00-2E22* 4. Bit Mask for BB/RF register23* 5. Other defintion for BB/RF R/W24* */252627/*28* 1. PMAC duplicate register due to connection: RF_Mode, TRxRN, NumOf L-STF29* 1. Page1(0x100)30* */31#define rPMAC_Reset 0x10032#define rPMAC_TxStart 0x10433#define rPMAC_TxLegacySIG 0x10834#define rPMAC_TxHTSIG1 0x10c35#define rPMAC_TxHTSIG2 0x11036#define rPMAC_PHYDebug 0x11437#define rPMAC_TxPacketNum 0x11838#define rPMAC_TxIdle 0x11c39#define rPMAC_TxMACHeader0 0x12040#define rPMAC_TxMACHeader1 0x12441#define rPMAC_TxMACHeader2 0x12842#define rPMAC_TxMACHeader3 0x12c43#define rPMAC_TxMACHeader4 0x13044#define rPMAC_TxMACHeader5 0x13445#define rPMAC_TxDataType 0x13846#define rPMAC_TxRandomSeed 0x13c47#define rPMAC_CCKPLCPPreamble 0x14048#define rPMAC_CCKPLCPHeader 0x14449#define rPMAC_CCKCRC16 0x14850#define rPMAC_OFDMRxCRC32OK 0x17051#define rPMAC_OFDMRxCRC32Er 0x17452#define rPMAC_OFDMRxParityEr 0x17853#define rPMAC_OFDMRxCRC8Er 0x17c54#define rPMAC_CCKCRxRC16Er 0x18055#define rPMAC_CCKCRxRC32Er 0x18456#define rPMAC_CCKCRxRC32OK 0x18857#define rPMAC_TxStatus 0x18c5859/*60* 2. Page2(0x200)61*62* The following two definition are only used for USB interface. */63#define RF_BB_CMD_ADDR 0x02c0 /* RF/BB read/write command address. */64#define RF_BB_CMD_DATA 0x02c4 /* RF/BB read/write command data. */6566/*67* 3. Page8(0x800)68* */69#define rFPGA0_RFMOD 0x800 /* RF mode & CCK TxSC */ /* RF BW Setting?? */7071#define rFPGA0_TxInfo 0x804 /* Status report?? */72#define rFPGA0_PSDFunction 0x8087374#define rFPGA0_TxGainStage 0x80c /* Set TX PWR init gain? */7576#define rFPGA0_RFTiming1 0x810 /* Useless now */77#define rFPGA0_RFTiming2 0x8147879#define rFPGA0_XA_HSSIParameter1 0x820 /* RF 3 wire register */80#define rFPGA0_XA_HSSIParameter2 0x82481#define rFPGA0_XB_HSSIParameter1 0x82882#define rFPGA0_XB_HSSIParameter2 0x82c8384#define rFPGA0_XA_LSSIParameter 0x84085#define rFPGA0_XB_LSSIParameter 0x8448687#define rFPGA0_RFWakeUpParameter 0x850 /* Useless now */88#define rFPGA0_RFSleepUpParameter 0x8548990#define rFPGA0_XAB_SwitchControl 0x858 /* RF Channel switch */91#define rFPGA0_XCD_SwitchControl 0x85c9293#define rFPGA0_XA_RFInterfaceOE 0x860 /* RF Channel switch */94#define rFPGA0_XB_RFInterfaceOE 0x86495#define rFPGA0_XAB_RFInterfaceSW 0x870 /* RF Interface Software Control */96#define rFPGA0_XCD_RFInterfaceSW 0x8749798#define rFPGA0_XAB_RFParameter 0x878 /* RF Parameter */99#define rFPGA0_XCD_RFParameter 0x87c100101#define rFPGA0_AnalogParameter1 0x880 /* Crystal cap setting RF-R/W protection for parameter4?? */102#define rFPGA0_AnalogParameter2 0x884103#define rFPGA0_AnalogParameter3 0x888104#define rFPGA0_AdDaClockEn 0x888 /* enable ad/da clock1 for dual-phy */105#define rFPGA0_AnalogParameter4 0x88c106107#define rFPGA0_XA_LSSIReadBack 0x8a0 /* Tranceiver LSSI Readback */108#define rFPGA0_XB_LSSIReadBack 0x8a4109#define rFPGA0_XC_LSSIReadBack 0x8a8110#define rFPGA0_XD_LSSIReadBack 0x8ac111112#define rFPGA0_PSDReport 0x8b4 /* Useless now */113#define TransceiverA_HSPI_Readback 0x8b8 /* Transceiver A HSPI Readback */114#define TransceiverB_HSPI_Readback 0x8bc /* Transceiver B HSPI Readback */115#define rFPGA0_XAB_RFInterfaceRB 0x8e0 /* Useless now */ /* RF Interface Readback Value */116#define rFPGA0_XCD_RFInterfaceRB 0x8e4 /* Useless now */117118/*119* 4. Page9(0x900)120* */121#define rFPGA1_RFMOD 0x900 /* RF mode & OFDM TxSC */ /* RF BW Setting?? */122123#define rFPGA1_TxBlock 0x904 /* Useless now */124#define rFPGA1_DebugSelect 0x908 /* Useless now */125#define rFPGA1_TxInfo 0x90c /* Useless now */ /* Status report?? */126127/*128* 5. PageA(0xA00)129*130* Set Control channel to upper or lower. These settings are required only for 40MHz */131#define rCCK0_System 0xa00132133#define rCCK0_AFESetting 0xa04 /* Disable init gain now */ /* Select RX path by RSSI */134#define rCCK0_CCA 0xa08 /* Disable init gain now */ /* Init gain */135136#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 */137#define rCCK0_RxAGC2 0xa10 /* AGC & DAGC */138139#define rCCK0_RxHP 0xa14140141#define rCCK0_DSPParameter1 0xa18 /* Timing recovery & Channel estimation threshold */142#define rCCK0_DSPParameter2 0xa1c /* SQ threshold */143144#define rCCK0_TxFilter1 0xa20145#define rCCK0_TxFilter2 0xa24146#define rCCK0_DebugPort 0xa28 /* debug port and Tx filter3 */147#define rCCK0_FalseAlarmReport 0xa2c /* 0xa2d useless now 0xa30-a4f channel report */148#define rCCK0_TRSSIReport 0xa50149#define rCCK0_RxReport 0xa54 /* 0xa57 */150#define rCCK0_FACounterLower 0xa5c /* 0xa5b */151#define rCCK0_FACounterUpper 0xa58 /* 0xa5c */152153/*154* PageB(0xB00)155* */156#define rPdp_AntA 0xb00157#define rPdp_AntA_4 0xb04158#define rConfig_Pmpd_AntA 0xb28159#define rConfig_ram64x16 0xb2c160#define rConfig_AntA 0xb68161#define rConfig_AntB 0xb6c162#define rPdp_AntB 0xb70163#define rPdp_AntB_4 0xb74164#define rConfig_Pmpd_AntB 0xb98165#define rAPK 0xbd8166167168169/*170* 6. PageC(0xC00)171* */172#define rOFDM0_LSTF 0xc00173174#define rOFDM0_TRxPathEnable 0xc04175#define rOFDM0_TRMuxPar 0xc08176#define rOFDM0_TRSWIsolation 0xc0c177178#define rOFDM0_XARxAFE 0xc10 /* RxIQ DC offset, Rx digital filter, DC notch filter */179#define rOFDM0_XARxIQImbalance 0xc14 /* RxIQ imblance matrix */180#define rOFDM0_XBRxAFE 0xc18181#define rOFDM0_XBRxIQImbalance 0xc1c182#define rOFDM0_XCRxAFE 0xc20183#define rOFDM0_XCRxIQImbalance 0xc24184#define rOFDM0_XDRxAFE 0xc28185#define rOFDM0_XDRxIQImbalance 0xc2c186187#define rOFDM0_RxDetector1 0xc30 /* PD, BW & SBD */ /* DM tune init gain */188#define rOFDM0_RxDetector2 0xc34 /* SBD & Fame Sync. */189#define rOFDM0_RxDetector3 0xc38 /* Frame Sync. */190#define rOFDM0_RxDetector4 0xc3c /* PD, SBD, Frame Sync & Short-GI */191192#define rOFDM0_RxDSP 0xc40 /* Rx Sync Path */193#define rOFDM0_CFOandDAGC 0xc44 /* CFO & DAGC */194#define rOFDM0_CCADropThreshold 0xc48 /* CCA Drop threshold */195#define rOFDM0_ECCAThreshold 0xc4c /* energy CCA */196197#define rOFDM0_XAAGCCore1 0xc50 /* DIG */198#define rOFDM0_XAAGCCore2 0xc54199#define rOFDM0_XBAGCCore1 0xc58200#define rOFDM0_XBAGCCore2 0xc5c201#define rOFDM0_XCAGCCore1 0xc60202#define rOFDM0_XCAGCCore2 0xc64203#define rOFDM0_XDAGCCore1 0xc68204#define rOFDM0_XDAGCCore2 0xc6c205206#define rOFDM0_AGCParameter1 0xc70207#define rOFDM0_AGCParameter2 0xc74208#define rOFDM0_AGCRSSITable 0xc78209#define rOFDM0_HTSTFAGC 0xc7c210211#define rOFDM0_XATxIQImbalance 0xc80 /* TX PWR TRACK and DIG */212#define rOFDM0_XATxAFE 0xc84213#define rOFDM0_XBTxIQImbalance 0xc88214#define rOFDM0_XBTxAFE 0xc8c215#define rOFDM0_XCTxIQImbalance 0xc90216#define rOFDM0_XCTxAFE 0xc94217#define rOFDM0_XDTxIQImbalance 0xc98218#define rOFDM0_XDTxAFE 0xc9c219220#define rOFDM0_RxIQExtAnta 0xca0221#define rOFDM0_TxCoeff1 0xca4222#define rOFDM0_TxCoeff2 0xca8223#define rOFDM0_TxCoeff3 0xcac224#define rOFDM0_TxCoeff4 0xcb0225#define rOFDM0_TxCoeff5 0xcb4226#define rOFDM0_TxCoeff6 0xcb8227#define rOFDM0_RxHPParameter 0xce0228#define rOFDM0_TxPseudoNoiseWgt 0xce4229#define rOFDM0_FrameSync 0xcf0230#define rOFDM0_DFSReport 0xcf4231232233/*234* 7. PageD(0xD00)235* */236#define rOFDM1_LSTF 0xd00237#define rOFDM1_TRxPathEnable 0xd04238239#define rOFDM1_CFO 0xd08 /* No setting now */240#define rOFDM1_CSI1 0xd10241#define rOFDM1_SBD 0xd14242#define rOFDM1_CSI2 0xd18243#define rOFDM1_CFOTracking 0xd2c244#define rOFDM1_TRxMesaure1 0xd34245#define rOFDM1_IntfDet 0xd3c246#define rOFDM1_csi_fix_mask1 0xd40247#define rOFDM1_csi_fix_mask2 0xd44248#define rOFDM1_PseudoNoiseStateAB 0xd50249#define rOFDM1_PseudoNoiseStateCD 0xd54250#define rOFDM1_RxPseudoNoiseWgt 0xd58251252#define rOFDM_PHYCounter1 0xda0 /* cca, parity fail */253#define rOFDM_PHYCounter2 0xda4 /* rate illegal, crc8 fail */254#define rOFDM_PHYCounter3 0xda8 /* MCS not support */255256#define rOFDM_ShortCFOAB 0xdac /* No setting now */257#define rOFDM_ShortCFOCD 0xdb0258#define rOFDM_LongCFOAB 0xdb4259#define rOFDM_LongCFOCD 0xdb8260#define rOFDM_TailCFOAB 0xdbc261#define rOFDM_TailCFOCD 0xdc0262#define rOFDM_PWMeasure1 0xdc4263#define rOFDM_PWMeasure2 0xdc8264#define rOFDM_BWReport 0xdcc265#define rOFDM_AGCReport 0xdd0266#define rOFDM_RxSNR 0xdd4267#define rOFDM_RxEVMCSI 0xdd8268#define rOFDM_SIGReport 0xddc269270271/*272* 8. PageE(0xE00)273* */274#define rTxAGC_A_Rate18_06 0xe00275#define rTxAGC_A_Rate54_24 0xe04276#define rTxAGC_A_CCK1_Mcs32 0xe08277#define rTxAGC_A_Mcs03_Mcs00 0xe10278#define rTxAGC_A_Mcs07_Mcs04 0xe14279#define rTxAGC_A_Mcs11_Mcs08 0xe18280#define rTxAGC_A_Mcs15_Mcs12 0xe1c281282#define rTxAGC_B_Rate18_06 0x830283#define rTxAGC_B_Rate54_24 0x834284#define rTxAGC_B_CCK1_55_Mcs32 0x838285#define rTxAGC_B_Mcs03_Mcs00 0x83c286#define rTxAGC_B_Mcs07_Mcs04 0x848287#define rTxAGC_B_Mcs11_Mcs08 0x84c288#define rTxAGC_B_Mcs15_Mcs12 0x868289#define rTxAGC_B_CCK11_A_CCK2_11 0x86c290291#define rFPGA0_IQK 0xe28292#define rTx_IQK_Tone_A 0xe30293#define rRx_IQK_Tone_A 0xe34294#define rTx_IQK_PI_A 0xe38295#define rRx_IQK_PI_A 0xe3c296297#define rTx_IQK 0xe40298#define rRx_IQK 0xe44299#define rIQK_AGC_Pts 0xe48300#define rIQK_AGC_Rsp 0xe4c301#define rTx_IQK_Tone_B 0xe50302#define rRx_IQK_Tone_B 0xe54303#define rTx_IQK_PI_B 0xe58304#define rRx_IQK_PI_B 0xe5c305#define rIQK_AGC_Cont 0xe60306307#define rBlue_Tooth 0xe6c308#define rRx_Wait_CCA 0xe70309#define rTx_CCK_RFON 0xe74310#define rTx_CCK_BBON 0xe78311#define rTx_OFDM_RFON 0xe7c312#define rTx_OFDM_BBON 0xe80313#define rTx_To_Rx 0xe84314#define rTx_To_Tx 0xe88315#define rRx_CCK 0xe8c316317#define rTx_Power_Before_IQK_A 0xe94318#define rTx_Power_After_IQK_A 0xe9c319320#define rRx_Power_Before_IQK_A 0xea0321#define rRx_Power_Before_IQK_A_2 0xea4322#define rRx_Power_After_IQK_A 0xea8323#define rRx_Power_After_IQK_A_2 0xeac324325#define rTx_Power_Before_IQK_B 0xeb4326#define rTx_Power_After_IQK_B 0xebc327328#define rRx_Power_Before_IQK_B 0xec0329#define rRx_Power_Before_IQK_B_2 0xec4330#define rRx_Power_After_IQK_B 0xec8331#define rRx_Power_After_IQK_B_2 0xecc332333#define rRx_OFDM 0xed0334#define rRx_Wait_RIFS 0xed4335#define rRx_TO_Rx 0xed8336#define rStandby 0xedc337#define rSleep 0xee0338#define rPMPD_ANAEN 0xeec339340/*341* 7. RF Register 0x00-0x2E (RF 8256)342* RF-0222D 0x00-3F343*344* Zebra1 */345#define rZebra1_HSSIEnable 0x0 /* Useless now */346#define rZebra1_TRxEnable1 0x1347#define rZebra1_TRxEnable2 0x2348#define rZebra1_AGC 0x4349#define rZebra1_ChargePump 0x5350#define rZebra1_Channel 0x7 /* RF channel switch */351352/* #endif */353#define rZebra1_TxGain 0x8 /* Useless now */354#define rZebra1_TxLPF 0x9355#define rZebra1_RxLPF 0xb356#define rZebra1_RxHPFCorner 0xc357358/* Zebra4 */359#define rGlobalCtrl 0 /* Useless now */360#define rRTL8256_TxLPF 19361#define rRTL8256_RxLPF 11362363/* RTL8258 */364#define rRTL8258_TxLPF 0x11 /* Useless now */365#define rRTL8258_RxLPF 0x13366#define rRTL8258_RSSILPF 0xa367368/*369* RL6052 Register definition370* */371#define RF_AC 0x00 /* */372373#define RF_IQADJ_G1 0x01 /* */374#define RF_IQADJ_G2 0x02 /* */375376#define RF_POW_TRSW 0x05 /* */377378#define RF_GAIN_RX 0x06 /* */379#define RF_GAIN_TX 0x07 /* */380381#define RF_TXM_IDAC 0x08 /* */382#define RF_IPA_G 0x09 /* */383#define RF_TXBIAS_G 0x0A384#define RF_TXPA_AG 0x0B385#define RF_IPA_A 0x0C /* */386#define RF_TXBIAS_A 0x0D387#define RF_BS_PA_APSET_G9_G11 0x0E388#define RF_BS_IQGEN 0x0F /* */389390#define RF_MODE1 0x10 /* */391#define RF_MODE2 0x11 /* */392393#define RF_RX_AGC_HP 0x12 /* */394#define RF_TX_AGC 0x13 /* */395#define RF_BIAS 0x14 /* */396#define RF_IPA 0x15 /* */397#define RF_TXBIAS 0x16398#define RF_POW_ABILITY 0x17 /* */399#define RF_CHNLBW 0x18 /* RF channel and BW switch */400#define RF_TOP 0x19 /* */401402#define RF_RX_G1 0x1A /* */403#define RF_RX_G2 0x1B /* */404405#define RF_RX_BB2 0x1C /* */406#define RF_RX_BB1 0x1D /* */407408#define RF_RCK1 0x1E /* */409#define RF_RCK2 0x1F /* */410411#define RF_TX_G1 0x20 /* */412#define RF_TX_G2 0x21 /* */413#define RF_TX_G3 0x22 /* */414415#define RF_TX_BB1 0x23 /* */416417#define RF_T_METER_88E 0x42 /* */418#define RF_T_METER 0x24 /* */419420#define RF_SYN_G1 0x25 /* RF TX Power control */421#define RF_SYN_G2 0x26 /* RF TX Power control */422#define RF_SYN_G3 0x27 /* RF TX Power control */423#define RF_SYN_G4 0x28 /* RF TX Power control */424#define RF_SYN_G5 0x29 /* RF TX Power control */425#define RF_SYN_G6 0x2A /* RF TX Power control */426#define RF_SYN_G7 0x2B /* RF TX Power control */427#define RF_SYN_G8 0x2C /* RF TX Power control */428429#define RF_RCK_OS 0x30 /* RF TX PA control */430#define RF_TXPA_G1 0x31 /* RF TX PA control */431#define RF_TXPA_G2 0x32 /* RF TX PA control */432#define RF_TXPA_G3 0x33 /* RF TX PA control */433#define RF_TX_BIAS_A 0x35434#define RF_TX_BIAS_D 0x36435#define RF_LOBF_9 0x38436#define RF_RXRF_A3 0x3C /* */437#define RF_TRSW 0x3F438439#define RF_TXRF_A2 0x41440#define RF_TXPA_G4 0x46441#define RF_TXPA_A4 0x4B442#define RF_0x52 0x52443#define RF_WE_LUT 0xEF444445446/*447* Bit Mask448*449* 1. Page1(0x100) */450#define bBBResetB 0x100 /* Useless now? */451#define bGlobalResetB 0x200452#define bOFDMTxStart 0x4453#define bCCKTxStart 0x8454#define bCRC32Debug 0x100455#define bPMACLoopback 0x10456#define bTxLSIG 0xffffff457#define bOFDMTxRate 0xf458#define bOFDMTxReserved 0x10459#define bOFDMTxLength 0x1ffe0460#define bOFDMTxParity 0x20000461#define bTxHTSIG1 0xffffff462#define bTxHTMCSRate 0x7f463#define bTxHTBW 0x80464#define bTxHTLength 0xffff00465#define bTxHTSIG2 0xffffff466#define bTxHTSmoothing 0x1467#define bTxHTSounding 0x2468#define bTxHTReserved 0x4469#define bTxHTAggreation 0x8470#define bTxHTSTBC 0x30471#define bTxHTAdvanceCoding 0x40472#define bTxHTShortGI 0x80473#define bTxHTNumberHT_LTF 0x300474#define bTxHTCRC8 0x3fc00475#define bCounterReset 0x10000476#define bNumOfOFDMTx 0xffff477#define bNumOfCCKTx 0xffff0000478#define bTxIdleInterval 0xffff479#define bOFDMService 0xffff0000480#define bTxMACHeader 0xffffffff481#define bTxDataInit 0xff482#define bTxHTMode 0x100483#define bTxDataType 0x30000484#define bTxRandomSeed 0xffffffff485#define bCCKTxPreamble 0x1486#define bCCKTxSFD 0xffff0000487#define bCCKTxSIG 0xff488#define bCCKTxService 0xff00489#define bCCKLengthExt 0x8000490#define bCCKTxLength 0xffff0000491#define bCCKTxCRC16 0xffff492#define bCCKTxStatus 0x1493#define bOFDMTxStatus 0x2494495#define IS_BB_REG_OFFSET_92S(_Offset) ((_Offset >= 0x800) && (_Offset <= 0xfff))496497/* 2. Page8(0x800) */498#define bRFMOD 0x1 /* Reg 0x800 rFPGA0_RFMOD */499#define bJapanMode 0x2500#define bCCKTxSC 0x30501#define bCCKEn 0x1000000502#define bOFDMEn 0x2000000503504#define bOFDMRxADCPhase 0x10000 /* Useless now */505#define bOFDMTxDACPhase 0x40000506#define bXATxAGC 0x3f507508#define bAntennaSelect 0x0300509510#define bXBTxAGC 0xf00 /* Reg 80c rFPGA0_TxGainStage */511#define bXCTxAGC 0xf000512#define bXDTxAGC 0xf0000513514#define bPAStart 0xf0000000 /* Useless now */515#define bTRStart 0x00f00000516#define bRFStart 0x0000f000517#define bBBStart 0x000000f0518#define bBBCCKStart 0x0000000f519#define bPAEnd 0xf /* Reg0x814 */520#define bTREnd 0x0f000000521#define bRFEnd 0x000f0000522#define bCCAMask 0x000000f0 /* T2R */523#define bR2RCCAMask 0x00000f00524#define bHSSI_R2TDelay 0xf8000000525#define bHSSI_T2RDelay 0xf80000526#define bContTxHSSI 0x400 /* chane gain at continue Tx */527#define bIGFromCCK 0x200528#define bAGCAddress 0x3f529#define bRxHPTx 0x7000530#define bRxHPT2R 0x38000531#define bRxHPCCKIni 0xc0000532#define bAGCTxCode 0xc00000533#define bAGCRxCode 0x300000534535#define b3WireDataLength 0x800 /* Reg 0x820~84f rFPGA0_XA_HSSIParameter1 */536#define b3WireAddressLength 0x400537538#define b3WireRFPowerDown 0x1 /* Useless now539* #define bHWSISelect 0x8 */540#define b5GPAPEPolarity 0x40000000541#define b2GPAPEPolarity 0x80000000542#define bRFSW_TxDefaultAnt 0x3543#define bRFSW_TxOptionAnt 0x30544#define bRFSW_RxDefaultAnt 0x300545#define bRFSW_RxOptionAnt 0x3000546#define bRFSI_3WireData 0x1547#define bRFSI_3WireClock 0x2548#define bRFSI_3WireLoad 0x4549#define bRFSI_3WireRW 0x8550#define bRFSI_3Wire 0xf551552#define bRFSI_RFENV 0x10 /* Reg 0x870 rFPGA0_XAB_RFInterfaceSW */553554#define bRFSI_TRSW 0x20 /* Useless now */555#define bRFSI_TRSWB 0x40556#define bRFSI_ANTSW 0x100557#define bRFSI_ANTSWB 0x200558#define bRFSI_PAPE 0x400559#define bRFSI_PAPE5G 0x800560#define bBandSelect 0x1561#define bHTSIG2_GI 0x80562#define bHTSIG2_Smoothing 0x01563#define bHTSIG2_Sounding 0x02564#define bHTSIG2_Aggreaton 0x08565#define bHTSIG2_STBC 0x30566#define bHTSIG2_AdvCoding 0x40567#define bHTSIG2_NumOfHTLTF 0x300568#define bHTSIG2_CRC8 0x3fc569#define bHTSIG1_MCS 0x7f570#define bHTSIG1_BandWidth 0x80571#define bHTSIG1_HTLength 0xffff572#define bLSIG_Rate 0xf573#define bLSIG_Reserved 0x10574#define bLSIG_Length 0x1fffe575#define bLSIG_Parity 0x20576#define bCCKRxPhase 0x4577578#define bLSSIReadAddress 0x7f800000 /* T65 RF */579580#define bLSSIReadEdge 0x80000000 /* LSSI "Read" edge signal */581582#define bLSSIReadBackData 0xfffff /* T65 RF */583584#define bLSSIReadOKFlag 0x1000 /* Useless now */585#define bCCKSampleRate 0x8 /* 0: 44MHz, 1:88MHz */586#define bRegulator0Standby 0x1587#define bRegulatorPLLStandby 0x2588#define bRegulator1Standby 0x4589#define bPLLPowerUp 0x8590#define bDPLLPowerUp 0x10591#define bDA10PowerUp 0x20592#define bAD7PowerUp 0x200593#define bDA6PowerUp 0x2000594#define bXtalPowerUp 0x4000595#define b40MDClkPowerUP 0x8000596#define bDA6DebugMode 0x20000597#define bDA6Swing 0x380000598599#define bADClkPhase 0x4000000 /* Reg 0x880 rFPGA0_AnalogParameter1 20/40 CCK support switch 40/80 BB MHZ */600601#define b80MClkDelay 0x18000000 /* Useless */602#define bAFEWatchDogEnable 0x20000000603604#define bXtalCap01 0xc0000000 /* Reg 0x884 rFPGA0_AnalogParameter2 Crystal cap */605#define bXtalCap23 0x3606#define bXtalCap92x 0x0f000000607#define bXtalCap 0x0f000000608609#define bIntDifClkEnable 0x400 /* Useless */610#define bExtSigClkEnable 0x800611#define bBandgapMbiasPowerUp 0x10000612#define bAD11SHGain 0xc0000613#define bAD11InputRange 0x700000614#define bAD11OPCurrent 0x3800000615#define bIPathLoopback 0x4000000616#define bQPathLoopback 0x8000000617#define bAFELoopback 0x10000000618#define bDA10Swing 0x7e0619#define bDA10Reverse 0x800620#define bDAClkSource 0x1000621#define bAD7InputRange 0x6000622#define bAD7Gain 0x38000623#define bAD7OutputCMMode 0x40000624#define bAD7InputCMMode 0x380000625#define bAD7Current 0xc00000626#define bRegulatorAdjust 0x7000000627#define bAD11PowerUpAtTx 0x1628#define bDA10PSAtTx 0x10629#define bAD11PowerUpAtRx 0x100630#define bDA10PSAtRx 0x1000631#define bCCKRxAGCFormat 0x200632#define bPSDFFTSamplepPoint 0xc000633#define bPSDAverageNum 0x3000634#define bIQPathControl 0xc00635#define bPSDFreq 0x3ff636#define bPSDAntennaPath 0x30637#define bPSDIQSwitch 0x40638#define bPSDRxTrigger 0x400000639#define bPSDTxTrigger 0x80000000640#define bPSDSineToneScale 0x7f000000641#define bPSDReport 0xffff642643/* 3. Page9(0x900) */644#define bOFDMTxSC 0x30000000 /* Useless */645#define bCCKTxOn 0x1646#define bOFDMTxOn 0x2647#define bDebugPage 0xfff /* reset debug page and also HWord, LWord */648#define bDebugItem 0xff /* reset debug page and LWord */649#define bAntL 0x10650#define bAntNonHT 0x100651#define bAntHT1 0x1000652#define bAntHT2 0x10000653#define bAntHT1S1 0x100000654#define bAntNonHTS1 0x1000000655656/* 4. PageA(0xA00) */657#define bCCKBBMode 0x3 /* Useless */658#define bCCKTxPowerSaving 0x80659#define bCCKRxPowerSaving 0x40660661#define bCCKSideBand 0x10 /* Reg 0xa00 rCCK0_System 20/40 switch */662663#define bCCKScramble 0x8 /* Useless */664#define bCCKAntDiversity 0x8000665#define bCCKCarrierRecovery 0x4000666#define bCCKTxRate 0x3000667#define bCCKDCCancel 0x0800668#define bCCKISICancel 0x0400669#define bCCKMatchFilter 0x0200670#define bCCKEqualizer 0x0100671#define bCCKPreambleDetect 0x800000672#define bCCKFastFalseCCA 0x400000673#define bCCKChEstStart 0x300000674#define bCCKCCACount 0x080000675#define bCCKcs_lim 0x070000676#define bCCKBistMode 0x80000000677#define bCCKCCAMask 0x40000000678#define bCCKTxDACPhase 0x4679#define bCCKRxADCPhase 0x20000000 /* r_rx_clk */680#define bCCKr_cp_mode0 0x0100681#define bCCKTxDCOffset 0xf0682#define bCCKRxDCOffset 0xf683#define bCCKCCAMode 0xc000684#define bCCKFalseCS_lim 0x3f00685#define bCCKCS_ratio 0xc00000686#define bCCKCorgBit_sel 0x300000687#define bCCKPD_lim 0x0f0000688#define bCCKNewCCA 0x80000000689#define bCCKRxHPofIG 0x8000690#define bCCKRxIG 0x7f00691#define bCCKLNAPolarity 0x800000692#define bCCKRx1stGain 0x7f0000693#define bCCKRFExtend 0x20000000 /* CCK Rx Iinital gain polarity */694#define bCCKRxAGCSatLevel 0x1f000000695#define bCCKRxAGCSatCount 0xe0696#define bCCKRxRFSettle 0x1f /* AGCsamp_dly */697#define bCCKFixedRxAGC 0x8000698/* #define bCCKRxAGCFormat 0x4000 */ /* remove to HSSI register 0x824 */699#define bCCKAntennaPolarity 0x2000700#define bCCKTxFilterType 0x0c00701#define bCCKRxAGCReportType 0x0300702#define bCCKRxDAGCEn 0x80000000703#define bCCKRxDAGCPeriod 0x20000000704#define bCCKRxDAGCSatLevel 0x1f000000705#define bCCKTimingRecovery 0x800000706#define bCCKTxC0 0x3f0000707#define bCCKTxC1 0x3f000000708#define bCCKTxC2 0x3f709#define bCCKTxC3 0x3f00710#define bCCKTxC4 0x3f0000711#define bCCKTxC5 0x3f000000712#define bCCKTxC6 0x3f713#define bCCKTxC7 0x3f00714#define bCCKDebugPort 0xff0000715#define bCCKDACDebug 0x0f000000716#define bCCKFalseAlarmEnable 0x8000717#define bCCKFalseAlarmRead 0x4000718#define bCCKTRSSI 0x7f719#define bCCKRxAGCReport 0xfe720#define bCCKRxReport_AntSel 0x80000000721#define bCCKRxReport_MFOff 0x40000000722#define bCCKRxRxReport_SQLoss 0x20000000723#define bCCKRxReport_Pktloss 0x10000000724#define bCCKRxReport_Lockedbit 0x08000000725#define bCCKRxReport_RateError 0x04000000726#define bCCKRxReport_RxRate 0x03000000727#define bCCKRxFACounterLower 0xff728#define bCCKRxFACounterUpper 0xff000000729#define bCCKRxHPAGCStart 0xe000730#define bCCKRxHPAGCFinal 0x1c00731#define bCCKRxFalseAlarmEnable 0x8000732#define bCCKFACounterFreeze 0x4000733#define bCCKTxPathSel 0x10000000734#define bCCKDefaultRxPath 0xc000000735#define bCCKOptionRxPath 0x3000000736737/* 5. PageC(0xC00) */738#define bNumOfSTF 0x3 /* Useless */739#define bShift_L 0xc0740#define bGI_TH 0xc741#define bRxPathA 0x1742#define bRxPathB 0x2743#define bRxPathC 0x4744#define bRxPathD 0x8745#define bTxPathA 0x1746#define bTxPathB 0x2747#define bTxPathC 0x4748#define bTxPathD 0x8749#define bTRSSIFreq 0x200750#define bADCBackoff 0x3000751#define bDFIRBackoff 0xc000752#define bTRSSILatchPhase 0x10000753#define bRxIDCOffset 0xff754#define bRxQDCOffset 0xff00755#define bRxDFIRMode 0x1800000756#define bRxDCNFType 0xe000000757#define bRXIQImb_A 0x3ff758#define bRXIQImb_B 0xfc00759#define bRXIQImb_C 0x3f0000760#define bRXIQImb_D 0xffc00000761#define bDC_dc_Notch 0x60000762#define bRxNBINotch 0x1f000000763#define bPD_TH 0xf764#define bPD_TH_Opt2 0xc000765#define bPWED_TH 0x700766#define bIfMF_Win_L 0x800767#define bPD_Option 0x1000768#define bMF_Win_L 0xe000769#define bBW_Search_L 0x30000770#define bwin_enh_L 0xc0000771#define bBW_TH 0x700000772#define bED_TH2 0x3800000773#define bBW_option 0x4000000774#define bRatio_TH 0x18000000775#define bWindow_L 0xe0000000776#define bSBD_Option 0x1777#define bFrame_TH 0x1c778#define bFS_Option 0x60779#define bDC_Slope_check 0x80780#define bFGuard_Counter_DC_L 0xe00781#define bFrame_Weight_Short 0x7000782#define bSub_Tune 0xe00000783#define bFrame_DC_Length 0xe000000784#define bSBD_start_offset 0x30000000785#define bFrame_TH_2 0x7786#define bFrame_GI2_TH 0x38787#define bGI2_Sync_en 0x40788#define bSarch_Short_Early 0x300789#define bSarch_Short_Late 0xc00790#define bSarch_GI2_Late 0x70000791#define bCFOAntSum 0x1792#define bCFOAcc 0x2793#define bCFOStartOffset 0xc794#define bCFOLookBack 0x70795#define bCFOSumWeight 0x80796#define bDAGCEnable 0x10000797#define bTXIQImb_A 0x3ff798#define bTXIQImb_B 0xfc00799#define bTXIQImb_C 0x3f0000800#define bTXIQImb_D 0xffc00000801#define bTxIDCOffset 0xff802#define bTxQDCOffset 0xff00803#define bTxDFIRMode 0x10000804#define bTxPesudoNoiseOn 0x4000000805#define bTxPesudoNoise_A 0xff806#define bTxPesudoNoise_B 0xff00807#define bTxPesudoNoise_C 0xff0000808#define bTxPesudoNoise_D 0xff000000809#define bCCADropOption 0x20000810#define bCCADropThres 0xfff00000811#define bEDCCA_H 0xf812#define bEDCCA_L 0xf0813#define bLambda_ED 0x300814#define bRxInitialGain 0x7f815#define bRxAntDivEn 0x80816#define bRxAGCAddressForLNA 0x7f00817#define bRxHighPowerFlow 0x8000818#define bRxAGCFreezeThres 0xc0000819#define bRxFreezeStep_AGC1 0x300000820#define bRxFreezeStep_AGC2 0xc00000821#define bRxFreezeStep_AGC3 0x3000000822#define bRxFreezeStep_AGC0 0xc000000823#define bRxRssi_Cmp_En 0x10000000824#define bRxQuickAGCEn 0x20000000825#define bRxAGCFreezeThresMode 0x40000000826#define bRxOverFlowCheckType 0x80000000827#define bRxAGCShift 0x7f828#define bTRSW_Tri_Only 0x80829#define bPowerThres 0x300830#define bRxAGCEn 0x1831#define bRxAGCTogetherEn 0x2832#define bRxAGCMin 0x4833#define bRxHP_Ini 0x7834#define bRxHP_TRLNA 0x70835#define bRxHP_RSSI 0x700836#define bRxHP_BBP1 0x7000837#define bRxHP_BBP2 0x70000838#define bRxHP_BBP3 0x700000839#define bRSSI_H 0x7f0000 /* the threshold for high power */840#define bRSSI_Gen 0x7f000000 /* the threshold for ant diversity */841#define bRxSettle_TRSW 0x7842#define bRxSettle_LNA 0x38843#define bRxSettle_RSSI 0x1c0844#define bRxSettle_BBP 0xe00845#define bRxSettle_RxHP 0x7000846#define bRxSettle_AntSW_RSSI 0x38000847#define bRxSettle_AntSW 0xc0000848#define bRxProcessTime_DAGC 0x300000849#define bRxSettle_HSSI 0x400000850#define bRxProcessTime_BBPPW 0x800000851#define bRxAntennaPowerShift 0x3000000852#define bRSSITableSelect 0xc000000853#define bRxHP_Final 0x7000000854#define bRxHTSettle_BBP 0x7855#define bRxHTSettle_HSSI 0x8856#define bRxHTSettle_RxHP 0x70857#define bRxHTSettle_BBPPW 0x80858#define bRxHTSettle_Idle 0x300859#define bRxHTSettle_Reserved 0x1c00860#define bRxHTRxHPEn 0x8000861#define bRxHTAGCFreezeThres 0x30000862#define bRxHTAGCTogetherEn 0x40000863#define bRxHTAGCMin 0x80000864#define bRxHTAGCEn 0x100000865#define bRxHTDAGCEn 0x200000866#define bRxHTRxHP_BBP 0x1c00000867#define bRxHTRxHP_Final 0xe0000000868#define bRxPWRatioTH 0x3869#define bRxPWRatioEn 0x4870#define bRxMFHold 0x3800871#define bRxPD_Delay_TH1 0x38872#define bRxPD_Delay_TH2 0x1c0873#define bRxPD_DC_COUNT_MAX 0x600874/* #define bRxMF_Hold 0x3800 */875#define bRxPD_Delay_TH 0x8000876#define bRxProcess_Delay 0xf0000877#define bRxSearchrange_GI2_Early 0x700000878#define bRxFrame_Guard_Counter_L 0x3800000879#define bRxSGI_Guard_L 0xc000000880#define bRxSGI_Search_L 0x30000000881#define bRxSGI_TH 0xc0000000882#define bDFSCnt0 0xff883#define bDFSCnt1 0xff00884#define bDFSFlag 0xf0000885#define bMFWeightSum 0x300000886#define bMinIdxTH 0x7f000000887#define bDAFormat 0x40000888#define bTxChEmuEnable 0x01000000889#define bTRSWIsolation_A 0x7f890#define bTRSWIsolation_B 0x7f00891#define bTRSWIsolation_C 0x7f0000892#define bTRSWIsolation_D 0x7f000000893#define bExtLNAGain 0x7c00894895/* 6. PageE(0xE00) */896#define bSTBCEn 0x4 /* Useless */897#define bAntennaMapping 0x10898#define bNss 0x20899#define bCFOAntSumD 0x200900#define bPHYCounterReset 0x8000000901#define bCFOReportGet 0x4000000902#define bOFDMContinueTx 0x10000000903#define bOFDMSingleCarrier 0x20000000904#define bOFDMSingleTone 0x40000000905/* #define bRxPath1 0x01 */906/* #define bRxPath2 0x02 */907/* #define bRxPath3 0x04 */908/* #define bRxPath4 0x08 */909/* #define bTxPath1 0x10 */910/* #define bTxPath2 0x20 */911#define bHTDetect 0x100912#define bCFOEn 0x10000913#define bCFOValue 0xfff00000914#define bSigTone_Re 0x3f915#define bSigTone_Im 0x7f00916#define bCounter_CCA 0xffff917#define bCounter_ParityFail 0xffff0000918#define bCounter_RateIllegal 0xffff919#define bCounter_CRC8Fail 0xffff0000920#define bCounter_MCSNoSupport 0xffff921#define bCounter_FastSync 0xffff922#define bShortCFO 0xfff923#define bShortCFOTLength 12 /* total */924#define bShortCFOFLength 11 /* fraction */925#define bLongCFO 0x7ff926#define bLongCFOTLength 11927#define bLongCFOFLength 11928#define bTailCFO 0x1fff929#define bTailCFOTLength 13930#define bTailCFOFLength 12931#define bmax_en_pwdB 0xffff932#define bCC_power_dB 0xffff0000933#define bnoise_pwdB 0xffff934#define bPowerMeasTLength 10935#define bPowerMeasFLength 3936#define bRx_HT_BW 0x1937#define bRxSC 0x6938#define bRx_HT 0x8939#define bNB_intf_det_on 0x1940#define bIntf_win_len_cfg 0x30941#define bNB_Intf_TH_cfg 0x1c0942#define bRFGain 0x3f943#define bTableSel 0x40944#define bTRSW 0x80945#define bRxSNR_A 0xff946#define bRxSNR_B 0xff00947#define bRxSNR_C 0xff0000948#define bRxSNR_D 0xff000000949#define bSNREVMTLength 8950#define bSNREVMFLength 1951#define bCSI1st 0xff952#define bCSI2nd 0xff00953#define bRxEVM1st 0xff0000954#define bRxEVM2nd 0xff000000955#define bSIGEVM 0xff956#define bPWDB 0xff00957#define bSGIEN 0x10000958959#define bSFactorQAM1 0xf /* Useless */960#define bSFactorQAM2 0xf0961#define bSFactorQAM3 0xf00962#define bSFactorQAM4 0xf000963#define bSFactorQAM5 0xf0000964#define bSFactorQAM6 0xf0000965#define bSFactorQAM7 0xf00000966#define bSFactorQAM8 0xf000000967#define bSFactorQAM9 0xf0000000968#define bCSIScheme 0x100000969970#define bNoiseLvlTopSet 0x3 /* Useless */971#define bChSmooth 0x4972#define bChSmoothCfg1 0x38973#define bChSmoothCfg2 0x1c0974#define bChSmoothCfg3 0xe00975#define bChSmoothCfg4 0x7000976#define bMRCMode 0x800000977#define bTHEVMCfg 0x7000000978979#define bLoopFitType 0x1 /* Useless */980#define bUpdCFO 0x40981#define bUpdCFOOffData 0x80982#define bAdvUpdCFO 0x100983#define bAdvTimeCtrl 0x800984#define bUpdClko 0x1000985#define bFC 0x6000986#define bTrackingMode 0x8000987#define bPhCmpEnable 0x10000988#define bUpdClkoLTF 0x20000989#define bComChCFO 0x40000990#define bCSIEstiMode 0x80000991#define bAdvUpdEqz 0x100000992#define bUChCfg 0x7000000993#define bUpdEqz 0x8000000994995/* Rx Pseduo noise */996#define bRxPesudoNoiseOn 0x20000000 /* Useless */997#define bRxPesudoNoise_A 0xff998#define bRxPesudoNoise_B 0xff00999#define bRxPesudoNoise_C 0xff00001000#define bRxPesudoNoise_D 0xff0000001001#define bPesudoNoiseState_A 0xffff1002#define bPesudoNoiseState_B 0xffff00001003#define bPesudoNoiseState_C 0xffff1004#define bPesudoNoiseState_D 0xffff000010051006/* 7. RF Register1007* Zebra1 */1008#define bZebra1_HSSIEnable 0x8 /* Useless */1009#define bZebra1_TRxControl 0xc001010#define bZebra1_TRxGainSetting 0x07f1011#define bZebra1_RxCorner 0xc001012#define bZebra1_TxChargePump 0x381013#define bZebra1_RxChargePump 0x71014#define bZebra1_ChannelNum 0xf801015#define bZebra1_TxLPFBW 0x4001016#define bZebra1_RxLPFBW 0x60010171018/* Zebra4 */1019#define bRTL8256RegModeCtrl1 0x100 /* Useless */1020#define bRTL8256RegModeCtrl0 0x401021#define bRTL8256_TxLPFBW 0x181022#define bRTL8256_RxLPFBW 0x60010231024/* RTL8258 */1025#define bRTL8258_TxLPFBW 0xc /* Useless */1026#define bRTL8258_RxLPFBW 0xc001027#define bRTL8258_RSSILPFBW 0xc0102810291030/*1031* Other Definition1032* */10331034/* byte endable for sb_write */1035#define bByte0 0x1 /* Useless */1036#define bByte1 0x21037#define bByte2 0x41038#define bByte3 0x81039#define bWord0 0x31040#define bWord1 0xc1041#define bDWord 0xf10421043/* for PutRegsetting & GetRegSetting BitMask */1044#define bMaskByte0 0xff /* Reg 0xc50 rOFDM0_XAAGCCore~0xC6f */1045#define bMaskByte1 0xff001046#define bMaskByte2 0xff00001047#define bMaskByte3 0xff0000001048#define bMaskHWord 0xffff00001049#define bMaskLWord 0x0000ffff1050#define bMaskDWord 0xffffffff1051#define bMaskH3Bytes 0xffffff001052#define bMask12Bits 0xfff1053#define bMaskH4Bits 0xf00000001054#define bMaskOFDM_D 0xffc000001055#define bMaskCCK 0x3f3f3f3f1056105710581059#define bEnable 0x1 /* Useless */1060#define bDisable 0x010611062#define LeftAntenna 0x0 /* Useless */1063#define RightAntenna 0x110641065#define tCheckTxStatus 500 /* 500ms */ /* Useless */1066#define tUpdateRxCounter 100 /* 100ms */10671068#define rateCCK 0 /* Useless */1069#define rateOFDM 11070#define rateHT 210711072/* define Register-End */1073#define bPMAC_End 0x1ff /* Useless */1074#define bFPGAPHY0_End 0x8ff1075#define bFPGAPHY1_End 0x9ff1076#define bCCKPHY0_End 0xaff1077#define bOFDMPHY0_End 0xcff1078#define bOFDMPHY1_End 0xdff10791080/* define max debug item in each debug page1081* #define bMaxItem_FPGA_PHY0 0x91082* #define bMaxItem_FPGA_PHY1 0x31083* #define bMaxItem_PHY_11B 0x161084* #define bMaxItem_OFDM_PHY0 0x291085* #define bMaxItem_OFDM_PHY1 0x0 */10861087#define bPMACControl 0x0 /* Useless */1088#define bWMACControl 0x11089#define bWNICControl 0x210901091#define PathA 0x0 /* Useless */1092#define PathB 0x11093#define PathC 0x21094#define PathD 0x310951096/*--------------------------Define Parameters-------------------------------*/109710981099#endif110011011102