xref: /OK3568_Linux_fs/external/rkwifibt/drivers/rtl8822cs/hal/phydm/halrf/rtl8822c/halrf_8822c.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  * The full GNU General Public License is included in this distribution in the
15  * file called LICENSE.
16  *
17  * Contact Information:
18  * wlanfae <wlanfae@realtek.com>
19  * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park,
20  * Hsinchu 300, Taiwan.
21  *
22  * Larry Finger <Larry.Finger@lwfinger.net>
23  *
24  *****************************************************************************/
25 
26 #ifndef __HALRF_8822C_H__
27 #define __HALRF_8822C_H__
28 
29 #define AVG_THERMAL_NUM_8822C 4
30 #define RF_T_METER_8822C 0x42
31 #define DACK_REG_8822C 16
32 #define DACK_RF_8822C 1
33 void halrf_rf_lna_setting_8822c(
34 	struct dm_struct *p_dm_void,
35 	enum halrf_lna_set type);
36 
37 void configure_txpower_track_8822c(
38 	struct txpwrtrack_cfg *config);
39 
40 void odm_tx_pwr_track_set_pwr8822c(
41 	void *dm_void,
42 	enum pwrtrack_method method,
43 	u8 rf_path,
44 	u8 channel_mapped_index);
45 
46 void get_delta_swing_table_8198f(
47 	void *dm_void,
48 	u8 **temperature_up_a,
49 	u8 **temperature_down_a,
50 	u8 **temperature_up_b,
51 	u8 **temperature_down_b,
52 	u8 **temperature_up_cck_a,
53 	u8 **temperature_down_cck_a,
54 	u8 **temperature_up_cck_b,
55 	u8 **temperature_down_cck_b
56 	);
57 
58 void get_delta_swing_table_8822c_ex(
59 	void *p_dm_void,
60 	u8 **temperature_up_c,
61 	u8 **temperature_down_c,
62 	u8 **temperature_up_d,
63 	u8 **temperature_down_d,
64 	u8 **temperature_up_cck_c,
65 	u8 **temperature_down_cck_c,
66 	u8 **temperature_up_cck_d,
67 	u8 **temperature_down_cck_d
68 	);
69 
70 void halrf_dac_cal_all_8822c(void *dm_void);
71 
72 void halrf_dac_cal_8822c(void *dm_void, boolean force);
73 
74 void halrf_dack_dbg_8822c(void *dm_void);
75 
76 void phy_lc_calibrate_8822c(
77 	void *dm_void);
78 
79 void halrf_rxdck_8822c(void *dm_void);
80 
81 void phy_x2_check_8822c(void *dm_void);
82 
83 void phy_set_rf_path_switch_8822c(
84 #if ((DM_ODM_SUPPORT_TYPE & ODM_AP) || (DM_ODM_SUPPORT_TYPE == ODM_CE))
85 	struct dm_struct *dm,
86 #else
87 	void *adapter,
88 #endif
89 	boolean is_main);
90 
91 void halrf_rxbb_dc_cal_8822c(void *dm_void);
92 
93 void halrf_rfk_handshake_8822c(void *dm_void, boolean is_before_k);
94 
95 void halrf_dack_restore_8822c(void *dm_void);
96 
97 void halrf_rfk_power_save_8822c(void *dm_void, boolean is_power_save);
98 
99 #endif /*__HALRF_8822C_H__*/
100