xref: /OK3568_Linux_fs/kernel/drivers/net/wireless/rockchip_wlan/rtl8188eu/hal/phydm/halrf/rtl8188e/halrf_8188e_ce.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /******************************************************************************
3  *
4  * Copyright(c) 2007 - 2017 Realtek Corporation.
5  *
6  * This program is free software; you can redistribute it and/or modify it
7  * under the terms of version 2 of the GNU General Public License as
8  * published by the Free Software Foundation.
9  *
10  * This program is distributed in the hope that it will be useful, but WITHOUT
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13  * more details.
14  *
15  *****************************************************************************/
16 
17 #ifndef __HALRF_8188E_H__
18 #define __HALRF_8188E_H__
19 
20 /*--------------------------Define Parameters-------------------------------*/
21 #define IQK_DELAY_TIME_88E 10 /* ms */
22 #define index_mapping_NUM_88E 15
23 #define AVG_THERMAL_NUM_88E 4
24 
25 #include "../halphyrf_ce.h"
26 
27 void configure_txpower_track_8188e(struct txpwrtrack_cfg *config);
28 
29 void get_delta_swing_table_8188e(void *dm_void, u8 **temperature_up_a,
30 				 u8 **temperature_down_a, u8 **temperature_up_b,
31 				 u8 **temperature_down_b);
32 
33 void do_iqk_8188e(void *dm_void, u8 delta_thermal_index, u8 thermal_value,
34 		  u8 threshold);
35 
36 void odm_tx_pwr_track_set_pwr88_e(void *dm_void, enum pwrtrack_method method,
37 				  u8 rf_path, u8 channel_mapped_index);
38 
39 /* 1 7.	IQK */
40 
41 void phy_iq_calibrate_8188e(void *dm_void, boolean is_recovery);
42 
43 /*
44  * LC calibrate
45  *   */
46 void phy_lc_calibrate_8188e(void *dm_void);
47 
48 void _phy_save_adda_registers(struct dm_struct *dm, u32 *adda_reg,
49 			      u32 *adda_backup, u32 register_num);
50 
51 void _phy_path_adda_on(struct dm_struct *dm, u32 *adda_reg,
52 		       boolean is_path_a_on, boolean is2T);
53 
54 void _phy_mac_setting_calibration(struct dm_struct *dm, u32 *mac_reg,
55 				  u32 *mac_backup);
56 
57 void _phy_path_a_stand_by(struct dm_struct *dm);
58 void halrf_rf_lna_setting_8188e(struct dm_struct *dm, enum halrf_lna_set type);
59 
60 #endif /*#ifndef __HALRF_8188E_H__*/
61