xref: /OK3568_Linux_fs/kernel/drivers/net/wireless/rockchip_wlan/rtl8723bs/hal/phydm/halrf/rtl8723b/halrf_8723b_ce.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		/* ms */
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 	void		*p_dm_void,
51 	boolean	is_recovery
52 );
53 
54 void
55 odm_set_iqc_by_rfpath(
56 	struct PHY_DM_STRUCT		*p_dm,
57 	u32 rf_path
58 );
59 
60 /*
61  * LC calibrate
62  *   */
63 void
64 phy_lc_calibrate_8723b(
65 	void		*p_dm_void
66 );
67 
68 void
69 _phy_save_adda_registers_8723b(
70 	struct PHY_DM_STRUCT		*p_dm,
71 	u32		*adda_reg,
72 	u32		*adda_backup,
73 	u32		register_num
74 );
75 
76 void
77 _phy_path_adda_on_8723b(
78 	struct PHY_DM_STRUCT		*p_dm,
79 	u32		*adda_reg,
80 	boolean		is_path_a_on,
81 	boolean		is2T
82 );
83 
84 void
85 _phy_mac_setting_calibration_8723b(
86 	struct PHY_DM_STRUCT		*p_dm,
87 	u32		*mac_reg,
88 	u32		*mac_backup
89 );
90 
91 void
92 halrf_rf_lna_setting_8723b(
93 	struct PHY_DM_STRUCT	*p_dm,
94 	enum phydm_lna_set type
95 );
96 
97 #endif	/*  #ifndef __HAL_PHY_RF_8188E_H__ */
98