xref: /linux/drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.h (revision 8be98d2f2a0a262f8bf8a0bc1fdf522b3c7aab17)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /******************************************************************************
3  *
4  * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
5  *
6  ******************************************************************************/
7 
8 #ifndef __HAL_PHY_RF_8723B_H__
9 #define __HAL_PHY_RF_8723B_H__
10 
11 /*--------------------------Define Parameters-------------------------------*/
12 #define	IQK_DELAY_TIME_8723B		20		/* ms */
13 #define IQK_DEFERRED_TIME_8723B		4
14 #define	index_mapping_NUM_8723B		15
15 #define AVG_THERMAL_NUM_8723B		4
16 #define	RF_T_METER_8723B					0x42	/*  */
17 
18 
19 void ConfigureTxpowerTrack_8723B(struct txpwrtrack_cfg *pConfig);
20 
21 void DoIQK_8723B(
22 	struct dm_odm_t *pDM_Odm,
23 	u8 DeltaThermalIndex,
24 	u8 ThermalValue,
25 	u8 Threshold
26 );
27 
28 void ODM_TxPwrTrackSetPwr_8723B(
29 	struct dm_odm_t *pDM_Odm,
30 	enum pwrtrack_method Method,
31 	u8 RFPath,
32 	u8 ChannelMappedIndex
33 );
34 
35 /* 1 7. IQK */
36 void PHY_IQCalibrate_8723B(
37 	struct adapter *Adapter,
38 	bool bReCovery,
39 	bool bRestore,
40 	bool Is2ant,
41 	u8 RF_Path
42 );
43 
44 void ODM_SetIQCbyRFpath(struct dm_odm_t *pDM_Odm, u32 RFpath);
45 
46 /*  */
47 /*  LC calibrate */
48 /*  */
49 void PHY_LCCalibrate_8723B(struct dm_odm_t *pDM_Odm);
50 
51 /*  */
52 /*  AP calibrate */
53 /*  */
54 void PHY_DigitalPredistortion_8723B(struct adapter *padapter);
55 
56 
57 void _PHY_SaveADDARegisters_8723B(
58 	struct adapter *padapter,
59 	u32 *ADDAReg,
60 	u32 *ADDABackup,
61 	u32 RegisterNum
62 );
63 
64 void _PHY_PathADDAOn_8723B(
65 	struct adapter *padapter,
66 	u32 *ADDAReg,
67 	bool isPathAOn,
68 	bool is2T
69 );
70 
71 void _PHY_MACSettingCalibration_8723B(
72 	struct adapter *padapter, u32 *MACReg, u32 *MACBackup
73 );
74 
75 #endif /*  #ifndef __HAL_PHY_RF_8188E_H__ */
76