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_IQK_8822B_H__
27 #define __HALRF_IQK_8822B_H__
28 
29 #if (RTL8822B_SUPPORT == 1)
30 /*@--------------------------Define Parameters-------------------------------*/
31 #define MAC_REG_NUM_8822B 2
32 #define BB_REG_NUM_8822B 21
33 #define RF_REG_NUM_8822B 5
34 #define LOK_delay_8822B 2
35 #define GS_delay_8822B 2
36 #define WBIQK_delay_8822B 2
37 
38 #define TXIQK 0
39 #define RXIQK 1
40 #define SS_8822B 2
41 /*@-------------------------End Define Parameters-------------------------*/
42 #if !(DM_ODM_SUPPORT_TYPE & ODM_AP)
43 void do_iqk_8822b(void *dm_void, u8 delta_thermal_index, u8 thermal_value,
44 		  u8 threshold);
45 #else
46 void do_iqk_8822b(void *dm_void, u8 delta_thermal_index, u8 thermal_value,
47 		  u8 threshold);
48 #endif
49 
50 void phy_iq_calibrate_8822b(void *dm_void, boolean clear, boolean segment_iqk);
51 
52 void do_imr_test_8822b(void *dm_void);
53 
54 void phy_get_iqk_cfir_8822b(void *dm_void, u8 idx, u8 path, boolean debug);
55 
56 void phy_iqk_dbg_cfir_backup_8822b(void *dm_void);
57 
58 void phy_iqk_dbg_cfir_backup_update_8822b(void *dm_void);
59 
60 void phy_iqk_dbg_cfir_reload_8822b(void *dm_void);
61 
62 void phy_iqk_dbg_cfir_write_8822b(void *dm_void, u8 type, u32 path, u32 idx, u32 i, u32 data);
63 
64 void phy_iqk_dbg_cfir_backup_show_8822b(void *dm_void);
65 
66 
67 
68 
69 #else /* (RTL8822B_SUPPORT == 0)*/
70 
71 #define phy_iq_calibrate_8822b(_pdm_void, clear, segment_iqk)
72 
73 #endif /* RTL8822B_SUPPORT */
74 
75 #endif /*__HALRF_IQK_8822B_H__*/
76