linux/drivers/staging/rtl8192e/rtl8192e/r8192E_phyreg.h

/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Copyright(c) 2008 - 2010 Realtek Corporation. All rights reserved.
 *
 * Contact Information: wlanfae <[email protected]>
 */
#ifndef _R819XU_PHYREG_H
#define _R819XU_PHYREG_H

#define RF_DATA

#define rPMAC_Reset
#define rPMAC_TxStart
#define rPMAC_TxLegacySIG
#define rPMAC_TxHTSIG1
#define rPMAC_TxHTSIG2
#define rPMAC_PHYDebug
#define rPMAC_TxPacketNum
#define rPMAC_TxIdle
#define rPMAC_TxMACHeader0
#define rPMAC_TxMACHeader1
#define rPMAC_TxMACHeader2
#define rPMAC_TxMACHeader3
#define rPMAC_TxMACHeader4
#define rPMAC_TxMACHeader5
#define rPMAC_TxDataType
#define rPMAC_TxRandomSeed
#define rPMAC_CCKPLCPPreamble
#define rPMAC_CCKPLCPHeader
#define rPMAC_CCKCRC16
#define rPMAC_OFDMRxCRC32OK
#define rPMAC_OFDMRxCRC32Er
#define rPMAC_OFDMRxParityEr
#define rPMAC_OFDMRxCRC8Er
#define rPMAC_CCKCRxRC16Er
#define rPMAC_CCKCRxRC32Er
#define rPMAC_CCKCRxRC32OK
#define rPMAC_TxStatus

#define MCS_TXAGC
#define CCK_TXAGC

/* Mac block on/off control register */
#define rFPGA0_RFMOD
#define rFPGA0_TxInfo
#define rFPGA0_PSDFunction
#define rFPGA0_TxGainStage
#define rFPGA0_RFTiming1
#define rFPGA0_RFTiming2
#define rFPGA0_XA_HSSIParameter2
#define rFPGA0_XB_HSSIParameter2
#define rFPGA0_XA_LSSIParameter
#define rFPGA0_XB_LSSIParameter
#define rFPGA0_RFWakeUpParameter
#define rFPGA0_RFSleepUpParameter
#define rFPGA0_XA_RFInterfaceOE
#define rFPGA0_XB_RFInterfaceOE
#define rFPGA0_XAB_RFInterfaceSW
#define rFPGA0_AnalogParameter1
#define rFPGA0_AnalogParameter2
#define rFPGA0_AnalogParameter3
#define rFPGA0_AnalogParameter4
#define rFPGA0_XA_LSSIReadBack
#define rFPGA0_XB_LSSIReadBack
#define rFPGA0_PSDReport

/* Page 9 - RF mode & OFDM TxSC */
#define rFPGA1_RFMOD
#define rFPGA1_TxBlock
#define rFPGA1_DebugSelect
#define rFPGA1_TxInfo

#define rCCK0_System
#define rCCK0_AFESetting
#define rCCK0_CCA
/* AGC default value, saturation level */
#define rCCK0_RxAGC1
#define rCCK0_RxAGC2
#define rCCK0_RxHP
/* Timing recovery & channel estimation threshold */
#define rCCK0_DSPParameter1
#define rCCK0_DSPParameter2
#define rCCK0_TxFilter1
#define rCCK0_TxFilter2
#define rCCK0_DebugPort
#define rCCK0_FalseAlarmReport
#define rCCK0_TRSSIReport
#define rCCK0_RxReport
#define rCCK0_FACounterLower
#define rCCK0_FACounterUpper

#define rOFDM0_LSTF
#define rOFDM0_TRxPathEnable
#define rOFDM0_TRMuxPar
#define rOFDM0_TRSWIsolation
#define rOFDM0_RxDetector1
#define rOFDM0_RxDetector2
#define rOFDM0_RxDetector3
/* PD, SBD, Frame Sync & Short-GI */
#define rOFDM0_RxDetector4
#define rOFDM0_RxDSP
#define rOFDM0_CFOandDAGC
#define rOFDM0_CCADropThreshold
#define rOFDM0_ECCAThreshold
#define rOFDM0_XAAGCCore1
#define rOFDM0_XBAGCCore1
#define rOFDM0_XCAGCCore1
#define rOFDM0_XDAGCCore1
#define rOFDM0_AGCParameter1
#define rOFDM0_AGCParameter2
#define rOFDM0_AGCRSSITable
#define rOFDM0_HTSTFAGC
#define rOFDM0_XATxIQImbalance
#define rOFDM0_XATxAFE
#define rOFDM0_XCTxIQImbalance
#define rOFDM0_RxHPParameter
#define rOFDM0_TxPseudoNoiseWgt
#define rOFDM0_FrameSync
#define rOFDM0_DFSReport
#define rOFDM0_TxCoeff1
#define rOFDM0_TxCoeff2
#define rOFDM0_TxCoeff3
#define rOFDM0_TxCoeff4
#define rOFDM0_TxCoeff5
#define rOFDM0_TxCoeff6

#define rOFDM1_LSTF
#define rOFDM1_TRxPathEnable
#define rOFDM1_CFO
#define rOFDM1_CSI1
#define rOFDM1_SBD
#define rOFDM1_CSI2
#define rOFDM1_CFOTracking
#define rOFDM1_TRxMesaure1
#define rOFDM1_IntfDet
#define rOFDM1_PseudoNoiseStateAB
#define rOFDM1_PseudoNoiseStateCD
#define rOFDM1_RxPseudoNoiseWgt
#define rOFDM_PHYCounter1
#define rOFDM_PHYCounter2
#define rOFDM_PHYCounter3
#define rOFDM_ShortCFOAB
#define rOFDM_ShortCFOCD
#define rOFDM_LongCFOAB
#define rOFDM_LongCFOCD
#define rOFDM_TailCFOAB
#define rOFDM_TailCFOCD
#define rOFDM_PWMeasure1
#define rOFDM_PWMeasure2
#define rOFDM_BWReport
#define rOFDM_AGCReport
#define rOFDM_RxSNR
#define rOFDM_RxEVMCSI
#define rOFDM_SIGReport

#define rTxAGC_Rate18_06
#define rTxAGC_Rate54_24
#define rTxAGC_CCK_Mcs32
#define rTxAGC_Mcs03_Mcs00
#define rTxAGC_Mcs07_Mcs04
#define rTxAGC_Mcs11_Mcs08
#define rTxAGC_Mcs15_Mcs12

#define rZebra1_HSSIEnable
#define rZebra1_TRxEnable1
#define rZebra1_TRxEnable2
#define rZebra1_AGC
#define rZebra1_ChargePump
#define rZebra1_Channel
#define rZebra1_TxGain
#define rZebra1_TxLPF
#define rZebra1_RxLPF
#define rZebra1_RxHPFCorner

/* Zebra 4 */
#define rGlobalCtrl
#define rRTL8256_TxLPF
#define rRTL8256_RxLPF

/* RTL8258 */
#define rRTL8258_TxLPF
#define rRTL8258_RxLPF
#define rRTL8258_RSSILPF

/* Bit Mask - Page 1*/
#define bBBResetB
#define bGlobalResetB
#define bOFDMTxStart
#define bCCKTxStart
#define bCRC32Debug
#define bPMACLoopback
#define bTxLSIG
#define bOFDMTxRate
#define bOFDMTxReserved
#define bOFDMTxLength
#define bOFDMTxParity
#define bTxHTSIG1
#define bTxHTMCSRate
#define bTxHTBW
#define bTxHTLength
#define bTxHTSIG2
#define bTxHTSmoothing
#define bTxHTSounding
#define bTxHTReserved
#define bTxHTAggreation
#define bTxHTSTBC
#define bTxHTAdvanceCoding
#define bTxHTShortGI
#define bTxHTNumberHT_LTF
#define bTxHTCRC8
#define bCounterReset
#define bNumOfOFDMTx
#define bNumOfCCKTx
#define bTxIdleInterval
#define bOFDMService
#define bTxMACHeader
#define bTxDataInit
#define bTxHTMode
#define bTxDataType
#define bTxRandomSeed
#define bCCKTxPreamble
#define bCCKTxSFD
#define bCCKTxSIG
#define bCCKTxService
#define bCCKLengthExt
#define bCCKTxLength
#define bCCKTxCRC16
#define bCCKTxStatus
#define bOFDMTxStatus
/* Bit Mask - Page 8 */
#define bRFMOD
#define bJapanMode
#define bCCKTxSC
#define bCCKEn
#define bOFDMEn
#define bOFDMRxADCPhase
#define bOFDMTxDACPhase
#define bXATxAGC
#define bXBTxAGC
#define bXCTxAGC
#define bXDTxAGC
#define bPAStart
#define bTRStart
#define bRFStart
#define bBBStart
#define bBBCCKStart
/* Bit Mask - rFPGA0_RFTiming2 */
#define bPAEnd
#define bTREnd
#define bRFEnd
/* Channel gain at continue TX. */
#define b3WireDataLength
#define b3WireAddressLength
/* 3-wire total control */
#define bRFSI_RFENV
#define bLSSIReadAddress
#define bLSSIReadEdge
#define bLSSIReadBackData

#define bDA6Swing
#define bADClkPhase
#define b80MClkDelay
#define bAFEWatchDogEnable
#define bXtalCap
#define bXtalCap01
#define bXtalCap23
#define bXtalCap92x
#define bIntDifClkEnable
#define bExtSigClkEnable
#define bBandgapMbiasPowerUp
#define bAD11SHGain
#define bAD11InputRange
#define bAD11OPCurrent
#define bIPathLoopback
#define bQPathLoopback
#define bAFELoopback
#define bDA10Swing
#define bDA10Reverse
#define bDAClkSource
#define bAD7InputRange
#define bAD7Gain
#define bAD7OutputCMMode
#define bAD7InputCMMode
#define bAD7Current
#define bRegulatorAdjust
#define bAD11PowerUpAtTx
#define bDA10PSAtTx
#define bAD11PowerUpAtRx
#define bDA10PSAtRx

#define bCCKRxAGCFormat

#define bPSDFFTSamplepPoint
#define bPSDAverageNum
#define bIQPathControl
#define bPSDFreq
#define bPSDAntennaPath
#define bPSDIQSwitch
#define bPSDRxTrigger
#define bPSDTxTrigger
#define bPSDSineToneScale
#define bPSDReport

/* Page 8 */
#define bOFDMTxSC
#define bCCKTxOn
#define bOFDMTxOn
/* Reset debug page and also HWord, LWord */
#define bDebugPage
/* Reset debug page and LWord */
#define bDebugItem
#define bAntL
#define bAntNonHT
#define bAntHT1
#define bAntHT2
#define bAntHT1S1
#define bAntNonHTS1

/* Page a */
#define bCCKBBMode
#define bCCKTxPowerSaving
#define bCCKRxPowerSaving
#define bCCKSideBand
#define bCCKScramble
#define bCCKAntDiversity
#define bCCKCarrierRecovery
#define bCCKTxRate
#define bCCKDCCancel
#define bCCKISICancel
#define bCCKMatchFilter
#define bCCKEqualizer
#define bCCKPreambleDetect
#define bCCKFastFalseCCA
#define bCCKChEstStart
#define bCCKCCACount
#define bCCKcs_lim
#define bCCKBistMode
#define bCCKCCAMask
#define bCCKTxDACPhase
#define bCCKRxADCPhase
#define bCCKr_cp_mode0
#define bCCKTxDCOffset
#define bCCKRxDCOffset
#define bCCKCCAMode
#define bCCKFalseCS_lim
#define bCCKCS_ratio
#define bCCKCorgBit_sel
#define bCCKPD_lim
#define bCCKNewCCA
#define bCCKRxHPofIG
#define bCCKRxIG
#define bCCKLNAPolarity
#define bCCKRx1stGain
/* CCK Rx Initial gain polarity */
#define bCCKRFExtend
#define bCCKRxAGCSatLevel
#define bCCKRxAGCSatCount
/* AGCSAmp_dly */
#define bCCKRxRFSettle
#define bCCKFixedRxAGC
/*#define bCCKRxAGCFormat		0x4000  remove to HSSI register 0x824 */
#define bCCKAntennaPolarity
#define bCCKTxFilterType
#define bCCKRxAGCReportType
#define bCCKRxDAGCEn
#define bCCKRxDAGCPeriod
#define bCCKRxDAGCSatLevel
#define bCCKTimingRecovery
#define bCCKTxC0
#define bCCKTxC1
#define bCCKTxC2
#define bCCKTxC3
#define bCCKTxC4
#define bCCKTxC5
#define bCCKTxC6
#define bCCKTxC7
#define bCCKDebugPort
#define bCCKDACDebug
#define bCCKFalseAlarmEnable
#define bCCKFalseAlarmRead
#define bCCKTRSSI
#define bCCKRxAGCReport
#define bCCKRxReport_AntSel
#define bCCKRxReport_MFOff
#define bCCKRxRxReport_SQLoss
#define bCCKRxReport_Pktloss
#define bCCKRxReport_Lockedbit
#define bCCKRxReport_RateError
#define bCCKRxReport_RxRate
#define bCCKRxFACounterLower
#define bCCKRxFACounterUpper
#define bCCKRxHPAGCStart
#define bCCKRxHPAGCFinal

#define bCCKRxFalseAlarmEnable
#define bCCKFACounterFreeze

#define bCCKTxPathSel
#define bCCKDefaultRxPath
#define bCCKOptionRxPath

/* Page c */
#define bNumOfSTF
#define bShift_L
#define bGI_TH
#define bRxPathA
#define bRxPathB
#define bRxPathC
#define bRxPathD
#define bTxPathA
#define bTxPathB
#define bTxPathC
#define bTxPathD
#define bTRSSIFreq
#define bADCBackoff
#define bDFIRBackoff
#define bTRSSILatchPhase
#define bRxIDCOffset
#define bRxQDCOffset
#define bRxDFIRMode
#define bRxDCNFType
#define bRXIQImb_A
#define bRXIQImb_B
#define bRXIQImb_C
#define bRXIQImb_D
#define bDC_dc_Notch
#define bRxNBINotch
#define bPD_TH
#define bPD_TH_Opt2
#define bPWED_TH
#define bIfMF_Win_L
#define bPD_Option
#define bMF_Win_L
#define bBW_Search_L
#define bwin_enh_L
#define bBW_TH
#define bED_TH2
#define bBW_option
#define bRatio_TH
#define bWindow_L
#define bSBD_Option
#define bFrame_TH
#define bFS_Option
#define bDC_Slope_check
#define bFGuard_Counter_DC_L
#define bFrame_Weight_Short
#define bSub_Tune
#define bFrame_DC_Length
#define bSBD_start_offset
#define bFrame_TH_2
#define bFrame_GI2_TH
#define bGI2_Sync_en
#define bSarch_Short_Early
#define bSarch_Short_Late
#define bSarch_GI2_Late
#define bCFOAntSum
#define bCFOAcc
#define bCFOStartOffset
#define bCFOLookBack
#define bCFOSumWeight
#define bDAGCEnable
#define bTXIQImb_A
#define bTXIQImb_B
#define bTXIQImb_C
#define bTXIQImb_D
#define bTxIDCOffset
#define bTxQDCOffset
#define bTxDFIRMode
#define bTxPesudoNoiseOn
#define bTxPesudoNoise_A
#define bTxPesudoNoise_B
#define bTxPesudoNoise_C
#define bTxPesudoNoise_D
#define bCCADropOption
#define bCCADropThres
#define bEDCCA_H
#define bEDCCA_L
#define bLambda_ED
#define bRxInitialGain
#define bRxAntDivEn
#define bRxAGCAddressForLNA
#define bRxHighPowerFlow
#define bRxAGCFreezeThres
#define bRxFreezeStep_AGC1
#define bRxFreezeStep_AGC2
#define bRxFreezeStep_AGC3
#define bRxFreezeStep_AGC0
#define bRxRssi_Cmp_En
#define bRxQuickAGCEn
#define bRxAGCFreezeThresMode
#define bRxOverFlowCheckType
#define bRxAGCShift
#define bTRSW_Tri_Only
#define bPowerThres
#define bRxAGCEn
#define bRxAGCTogetherEn
#define bRxAGCMin
#define bRxHP_Ini
#define bRxHP_TRLNA
#define bRxHP_RSSI
#define bRxHP_BBP1
#define bRxHP_BBP2
#define bRxHP_BBP3
/* The threshold for high power */
#define bRSSI_H
/* The threshold for ant diversity */
#define bRSSI_Gen
#define bRxSettle_TRSW
#define bRxSettle_LNA
#define bRxSettle_RSSI
#define bRxSettle_BBP
#define bRxSettle_RxHP
#define bRxSettle_AntSW_RSSI
#define bRxSettle_AntSW
#define bRxProcessTime_DAGC
#define bRxSettle_HSSI
#define bRxProcessTime_BBPPW
#define bRxAntennaPowerShift
#define bRSSITableSelect
#define bRxHP_Final
#define bRxHTSettle_BBP
#define bRxHTSettle_HSSI
#define bRxHTSettle_RxHP
#define bRxHTSettle_BBPPW
#define bRxHTSettle_Idle
#define bRxHTSettle_Reserved
#define bRxHTRxHPEn
#define bRxHTAGCFreezeThres
#define bRxHTAGCTogetherEn
#define bRxHTAGCMin
#define bRxHTAGCEn
#define bRxHTDAGCEn
#define bRxHTRxHP_BBP
#define bRxHTRxHP_Final
#define bRxPWRatioTH
#define bRxPWRatioEn
#define bRxMFHold
#define bRxPD_Delay_TH1
#define bRxPD_Delay_TH2
#define bRxPD_DC_COUNT_MAX
/*#define bRxMF_Hold			0x3800*/
#define bRxPD_Delay_TH
#define bRxProcess_Delay
#define bRxSearchrange_GI2_Early
#define bRxFrame_Guard_Counter_L
#define bRxSGI_Guard_L
#define bRxSGI_Search_L
#define bRxSGI_TH
#define bDFSCnt0
#define bDFSCnt1
#define bDFSFlag

#define bMFWeightSum
#define bMinIdxTH

#define bDAFormat

#define bTxChEmuEnable

#define bTRSWIsolation_A
#define bTRSWIsolation_B
#define bTRSWIsolation_C
#define bTRSWIsolation_D

#define bExtLNAGain

/* Page d */
#define bSTBCEn
#define bAntennaMapping
#define bNss
#define bCFOAntSumD
#define bPHYCounterReset
#define bCFOReportGet
#define bOFDMContinueTx
#define bOFDMSingleCarrier
#define bOFDMSingleTone
/* #define bRxPath1		0x01
 * #define bRxPath2		0x02
 * #define bRxPath3		0x04
 * #define bRxPath4		0x08
 * #define bTxPath1		0x10
 * #define bTxPath2		0x20
 */
#define bHTDetect
#define bCFOEn
#define bCFOValue
#define bSigTone_Re
#define bSigTone_Im
#define bCounter_CCA
#define bCounter_ParityFail
#define bCounter_RateIllegal
#define bCounter_CRC8Fail
#define bCounter_MCSNoSupport
#define bCounter_FastSync
#define bShortCFO
#define bShortCFOTLength
#define bShortCFOFLength
#define bLongCFO
#define bLongCFOTLength
#define bLongCFOFLength
#define bTailCFO
#define bTailCFOTLength
#define bTailCFOFLength

#define bmax_en_pwdB
#define bCC_power_dB
#define bnoise_pwdB
#define bPowerMeasTLength
#define bPowerMeasFLength
#define bRx_HT_BW
#define bRxSC
#define bRx_HT

#define bNB_intf_det_on
#define bIntf_win_len_cfg
#define bNB_Intf_TH_cfg

#define bRFGain
#define bTableSel
#define bTRSW

#define bRxSNR_A
#define bRxSNR_B
#define bRxSNR_C
#define bRxSNR_D
#define bSNREVMTLength
#define bSNREVMFLength

#define bCSI1st
#define bCSI2nd
#define bRxEVM1st
#define bRxEVM2nd

#define bSIGEVM
#define bPWDB
#define bSGIEN

#define bSFactorQAM1
#define bSFactorQAM2
#define bSFactorQAM3
#define bSFactorQAM4
#define bSFactorQAM5
#define bSFactorQAM6
#define bSFactorQAM7
#define bSFactorQAM8
#define bSFactorQAM9
#define bCSIScheme

#define bNoiseLvlTopSet
#define bChSmooth
#define bChSmoothCfg1
#define bChSmoothCfg2
#define bChSmoothCfg3
#define bChSmoothCfg4
#define bMRCMode
#define bTHEVMCfg

#define bLoopFitType
#define bUpdCFO
#define bUpdCFOOffData
#define bAdvUpdCFO
#define bAdvTimeCtrl
#define bUpdClko
#define bFC
#define bTrackingMode
#define bPhCmpEnable
#define bUpdClkoLTF
#define bComChCFO
#define bCSIEstiMode
#define bAdvUpdEqz
#define bUChCfg
#define bUpdEqz

/* Page e */
#define bTxAGCRate18_06
#define bTxAGCRate54_24
#define bTxAGCRateMCS32
#define bTxAGCRateCCK
#define bTxAGCRateMCS3_MCS0
#define bTxAGCRateMCS7_MCS4
#define bTxAGCRateMCS11_MCS8
#define bTxAGCRateMCS15_MCS12

#define bRxPesudoNoiseOn
#define bRxPesudoNoise_A
#define bRxPesudoNoise_B
#define bRxPesudoNoise_C
#define bRxPesudoNoise_D
#define bPesudoNoiseState_A
#define bPesudoNoiseState_B
#define bPesudoNoiseState_C
#define bPesudoNoiseState_D

/* RF Zebra 1 */
#define bZebra1_HSSIEnable
#define bZebra1_TRxControl
#define bZebra1_TRxGainSetting
#define bZebra1_RxCorner
#define bZebra1_TxChargePump
#define bZebra1_RxChargePump
#define bZebra1_ChannelNum
#define bZebra1_TxLPFBW
#define bZebra1_RxLPFBW

/* Zebra4 */
#define bRTL8256RegModeCtrl1
#define bRTL8256RegModeCtrl0
#define bRTL8256_TxLPFBW
#define bRTL8256_RxLPFBW

/* RTL8258 */
#define bRTL8258_TxLPFBW
#define bRTL8258_RxLPFBW
#define bRTL8258_RSSILPFBW

/* byte enable for sb_write */
#define bByte0
#define bByte1
#define bByte2
#define bByte3
#define bWord0
#define bWord1
#define bDWord

/* for PutRegsetting & GetRegSetting BitMask */
#define bMaskByte0
#define bMaskByte1
#define bMaskByte2
#define bMaskByte3
#define bMaskHWord
#define bMaskLWord
#define bMaskDWord

/* for PutRFRegsetting & GetRFRegSetting BitMask */
#define bMask12Bits

#define bEnable
#define bDisable

#define LeftAntenna
#define RightAntenna

#define tCheckTxStatus
#define tUpdateRxCounter

#define rateCCK
#define rateOFDM
#define rateHT

#define bPMAC_End
#define bFPGAPHY0_End
#define bFPGAPHY1_End
#define bCCKPHY0_End
#define bOFDMPHY0_End
#define bOFDMPHY1_End

#define bPMACControl
#define bWMACControl
#define bWNICControl

#define PathA
#define PathB
#define PathC
#define PathD

#define rRTL8256RxMixerPole
#define bZebraRxMixerPole
#define rRTL8256TxBBOPBias
#define bRTL8256TxBBOPBias
#define rRTL8256TxBBBW
#define bRTL8256TxBBBW

#endif