xref: /OK3568_Linux_fs/kernel/drivers/net/wireless/rockchip_wlan/rtl8723bs/hal/phydm/halrf/rtl8723b/halrf_8723b_ap.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /******************************************************************************
2  *
3  * Copyright(c) 2007 - 2017 Realtek Corporation.
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms of version 2 of the GNU General Public License as
7  * published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12  * more details.
13  *
14  *****************************************************************************/
15 
16 #ifndef __HAL_PHY_RF_8723B_H__
17 #define __HAL_PHY_RF_8723B_H__
18 
19 /*--------------------------Define Parameters-------------------------------*/
20 #define	IQK_DELAY_TIME_8723B		20
21 #define IQK_DEFERRED_TIME_8723B		4
22 #define	index_mapping_NUM_8723B		15
23 #define AVG_THERMAL_NUM_8723B		4
24 #define	RF_T_METER_8723B					0x42
25 
26 
27 void configure_txpower_track_8723b(
28 	struct _TXPWRTRACK_CFG	*p_config
29 );
30 
31 void do_iqk_8723b(
32 	void		*p_dm_void,
33 	u8		delta_thermal_index,
34 	u8		thermal_value,
35 	u8		threshold
36 );
37 
38 void
39 odm_tx_pwr_track_set_pwr_8723b(
40 	void			*p_dm_void,
41 	enum pwrtrack_method		method,
42 	u8				rf_path,
43 	u8				channel_mapped_index
44 );
45 
46 /*1 7.	IQK */
47 
48 void
49 phy_iq_calibrate_8723b(
50 	struct PHY_DM_STRUCT		*p_dm,
51 	boolean	is_recovery,
52 	boolean	is_restore,
53 	boolean	is_2ant,
54 	u8	rf_path);
55 
56 void
57 odm_set_iqc_by_rfpath(
58 	struct PHY_DM_STRUCT		*p_dm,
59 	u32 rf_path
60 );
61 
62 
63 void
64 phy_lc_calibrate_8723b(
65 	void		*p_dm_void
66 );
67 
68 
69 
70 void
71 _phy_save_adda_registers_8723b(
72 	struct PHY_DM_STRUCT		*p_dm,
73 	u32		*adda_reg,
74 	u32		*adda_backup,
75 	u32		register_num
76 );
77 
78 void
79 _phy_path_adda_on_8723b(
80 	struct PHY_DM_STRUCT		*p_dm,
81 	u32		*adda_reg,
82 	boolean		is_path_a_on,
83 	boolean		is2T
84 );
85 
86 void
87 _phy_mac_setting_calibration_8723b(
88 	struct PHY_DM_STRUCT		*p_dm,
89 	u32		*mac_reg,
90 	u32		*mac_backup
91 );
92 
93 void
94 halrf_rf_lna_setting_8723b(
95 	struct PHY_DM_STRUCT	*p_dm,
96 	enum phydm_lna_set type
97 );
98 
99 #endif	/* #ifndef __HAL_PHY_RF_8188E_H__	 */
100