xref: /OK3568_Linux_fs/kernel/drivers/net/wireless/rockchip_wlan/rtl8723cs/hal/phydm/halrf/rtl8703b/halrf_8703b.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 __HALRF_8703B_H__
17 #define __HALRF_8703B_H__
18 
19 /*--------------------------Define Parameters-------------------------------*/
20 #define index_mapping_NUM_8703B 15
21 #define AVG_THERMAL_NUM_8703B 4
22 #define RF_T_METER_8703B 0x42
23 
24 #if (DM_ODM_SUPPORT_TYPE & (ODM_WIN))
25 #if RT_PLATFORM == PLATFORM_MACOSX
26 #include "halphyrf_win.h"
27 #else
28 #include "../halrf/halphyrf_win.h"
29 #endif
30 #elif (DM_ODM_SUPPORT_TYPE & (ODM_CE))
31 #include "../halphyrf_ce.h"
32 #endif
33 
34 void configure_txpower_track_8703b(struct txpwrtrack_cfg *config);
35 
36 void do_iqk_8703b(void *dm_void, u8 delta_thermal_index, u8 thermal_value,
37 		  u8 threshold);
38 
39 void odm_tx_pwr_track_set_pwr_8703b(void *dm_void, enum pwrtrack_method method,
40 				    u8 rf_path, u8 channel_mapped_index);
41 
42 void odm_txxtaltrack_set_xtal_8703b(void *dm_void);
43 
44 /* 1 7.	IQK */
45 
46 void phy_iq_calibrate_8703b(void *dm_void, boolean is_recovery);
47 
48 boolean
49 odm_set_iqc_by_rfpath_8703b(struct dm_struct *dm);
50 
51 /*
52  * LC calibrate
53  */
54 void phy_lc_calibrate_8703b(void *dm_void);
55 
56 #if 0
57 /*
58  * AP calibrate
59  *   */
60 void
61 phy_ap_calibrate_8703b(
62 #if (DM_ODM_SUPPORT_TYPE & ODM_AP)
63 	struct dm_struct		*dm,
64 #else
65 	void	*adapter,
66 #endif
67 	s8		delta);
68 void
69 phy_digital_predistortion_8703b(void	*adapter);
70 #endif
71 
72 void _phy_save_adda_registers_8703b(
73 	struct dm_struct *dm,
74 	u32 *adda_reg,
75 	u32 *adda_backup,
76 	u32 register_num);
77 
78 void _phy_path_adda_on_8703b(
79 	struct dm_struct *dm,
80 	u32 *adda_reg,
81 	boolean is_path_a_on,
82 	boolean is2T);
83 
84 void _phy_mac_setting_calibration_8703b(
85 	struct dm_struct *dm,
86 	u32 *mac_reg,
87 	u32 *mac_backup);
88 
89 #endif /*#ifndef __HALRF_8703B_H__*/
90