xref: /OK3568_Linux_fs/external/rkwifibt/drivers/rtl8188fu/hal/phydm/phydm_features_ap.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	__PHYDM_FEATURES_AP_H__
17 #define __PHYDM_FEATURES_AP_H__
18 
19 #if (RTL8814A_SUPPORT || RTL8821C_SUPPORT || RTL8822B_SUPPORT ||\
20 	RTL8197F_SUPPORT || RTL8192F_SUPPORT || RTL8198F_SUPPORT ||\
21 	RTL8822C_SUPPORT || RTL8812F_SUPPORT || RTL8814B_SUPPORT ||\
22 	RTL8197G_SUPPORT)
23 	#define PHYDM_LA_MODE_SUPPORT			1
24 #else
25 	#define PHYDM_LA_MODE_SUPPORT			0
26 #endif
27 
28 #if (RTL8822B_SUPPORT || RTL8812A_SUPPORT || RTL8197F_SUPPORT ||\
29 	RTL8192F_SUPPORT)
30 	#define DYN_ANT_WEIGHTING_SUPPORT
31 #endif
32 
33 #if (RTL8822B_SUPPORT || RTL8821C_SUPPORT)
34 	#define FAHM_SUPPORT
35 #endif
36 
37 #if (RTL8197G_SUPPORT || RTL8812F_SUPPORT)
38 	#define IFS_CLM_SUPPORT
39 #endif
40 	#define NHM_SUPPORT
41 	#define CLM_SUPPORT
42 
43 #if (RTL8812F_SUPPORT)
44 	/*#define PHYDM_PHYSTAUS_AUTO_SWITCH*/
45 #endif
46 
47 #if (RTL8197F_SUPPORT)
48 	/*#define PHYDM_TDMA_DIG_SUPPORT*/
49 #endif
50 
51 #if (RTL8198F_SUPPORT || RTL8814B_SUPPORT || RTL8812F_SUPPORT ||\
52 	RTL8197G_SUPPORT)
53 	#define PHYDM_TDMA_DIG_SUPPORT 1
54 	#ifdef PHYDM_TDMA_DIG_SUPPORT
55 	#define IS_USE_NEW_TDMA /*new tdma dig test*/
56 	#endif
57 #endif
58 
59 #if (RTL8197F_SUPPORT || RTL8822B_SUPPORT ||\
60 	RTL8198F_SUPPORT || RTL8814B_SUPPORT || RTL8812F_SUPPORT)
61 	#define PHYDM_LNA_SAT_CHK_SUPPORT
62 	#ifdef PHYDM_LNA_SAT_CHK_SUPPORT
63 
64 		#if (RTL8197F_SUPPORT)
65 		/*#define PHYDM_LNA_SAT_CHK_SUPPORT_TYPE1*/
66 		#endif
67 
68 		#if (RTL8822B_SUPPORT)
69 		/*#define PHYDM_LNA_SAT_CHK_TYPE2*/
70 		#endif
71 
72 		#if (RTL8198F_SUPPORT || RTL8814B_SUPPORT || RTL8812F_SUPPORT)
73 		#define PHYDM_LNA_SAT_CHK_TYPE1
74 		#endif
75 	#endif
76 #endif
77 
78 #if (RTL8822B_SUPPORT)
79 	/*#define PHYDM_POWER_TRAINING_SUPPORT*/
80 #endif
81 
82 #if (RTL8814B_SUPPORT || RTL8198F_SUPPORT || RTL8822C_SUPPORT ||\
83 	RTL8812F_SUPPORT || RTL8197G_SUPPORT)
84 	#define PHYDM_PMAC_TX_SETTING_SUPPORT
85 #endif
86 
87 #if (RTL8814B_SUPPORT || RTL8198F_SUPPORT || RTL8822C_SUPPORT ||\
88 	RTL8812F_SUPPORT || RTL8197G_SUPPORT)
89 	#define PHYDM_MP_SUPPORT
90 #endif
91 
92 #if (RTL8822B_SUPPORT)
93 	#define PHYDM_TXA_CALIBRATION
94 #endif
95 
96 #if (RTL8188E_SUPPORT || RTL8197F_SUPPORT || RTL8192F_SUPPORT)
97 	#define	PHYDM_PRIMARY_CCA
98 #endif
99 
100 #if (RTL8188F_SUPPORT || RTL8710B_SUPPORT || RTL8821C_SUPPORT ||\
101 	RTL8822B_SUPPORT || RTL8192F_SUPPORT)
102 	#define	PHYDM_DC_CANCELLATION
103 #endif
104 
105 #if (RTL8822B_SUPPORT || RTL8197F_SUPPORT || RTL8192F_SUPPORT)
106 	#define	CONFIG_ADAPTIVE_SOML
107 #endif
108 
109 #if (RTL8812A_SUPPORT || RTL8821A_SUPPORT || RTL8881A_SUPPORT ||\
110 	RTL8192E_SUPPORT || RTL8723B_SUPPORT)
111 	/*#define	CONFIG_RA_FW_DBG_CODE*/
112 #endif
113 
114 #if (RTL8192F_SUPPORT == 1)
115 	/*#define	CONFIG_8912F_SPUR_CALIBRATION*/
116 #endif
117 
118 #if (RTL8822B_SUPPORT == 1)
119 	/* #define	CONFIG_8822B_SPUR_CALIBRATION */
120 #endif
121 
122 #if (RTL8197G_SUPPORT)
123 	#define CONFIG_DIRECTIONAL_BF
124 #endif
125 
126 #if (RTL8197G_SUPPORT || RTL8812F_SUPPORT || RTL8814B_SUPPORT)
127 	#define CONFIG_DYNAMIC_TX_TWR
128 #endif
129 
130 #if (RTL8197G_SUPPORT || RTL8812F_SUPPORT)
131 	#define CONFIG_DYNAMIC_TXCOLLISION_TH
132 #endif
133 
134 /*#define	CONFIG_PSD_TOOL*/
135 #define PHYDM_SUPPORT_CCKPD
136 #define PHYDM_SUPPORT_ADAPTIVITY
137 /*#define	CONFIG_PATH_DIVERSITY*/
138 /*#define	CONFIG_RA_DYNAMIC_RTY_LIMIT*/
139 /*#define	CONFIG_RA_DYNAMIC_RATE_ID*/
140 #define	CONFIG_BB_TXBF_API
141 /*#define	ODM_CONFIG_BT_COEXIST*/
142 #define	PHYDM_SUPPORT_RSSI_MONITOR
143 #if !defined(CONFIG_DISABLE_PHYDM_DEBUG_FUNCTION)
144 	#define CONFIG_PHYDM_DEBUG_FUNCTION
145 #endif
146 
147 /* [ Configure Antenna Diversity ] */
148 #if (RTL8188F_SUPPORT)
149 	#ifdef CONFIG_ANTENNA_DIVERSITY
150 		#define CONFIG_PHYDM_ANTENNA_DIVERSITY
151 		#define CONFIG_S0S1_SW_ANTENNA_DIVERSITY
152 	#endif
153 #endif
154 
155 #if defined(CONFIG_RTL_8881A_ANT_SWITCH) || defined(CONFIG_SLOT_0_ANT_SWITCH) || defined(CONFIG_SLOT_1_ANT_SWITCH) || defined(CONFIG_RTL_8197F_ANT_SWITCH) || defined(CONFIG_RTL_8197G_ANT_SWITCH)
156 	#define CONFIG_PHYDM_ANTENNA_DIVERSITY
157 	#define ODM_EVM_ENHANCE_ANTDIV
158 	/*#define SKIP_EVM_ANTDIV_TRAINING_PATCH*/
159 
160 	/*----------*/
161 	#ifdef CONFIG_NO_2G_DIVERSITY_8197F
162 		#define CONFIG_NO_2G_DIVERSITY
163 	#elif defined(CONFIG_2G_CGCS_RX_DIVERSITY_8197F)
164 		#define CONFIG_2G_CGCS_RX_DIVERSITY
165 	#elif defined(CONFIG_2G_CG_TRX_DIVERSITY_8197F)
166 		#define CONFIG_2G_CG_TRX_DIVERSITY
167 	#endif
168 
169 	/*----------*/
170 	#ifdef CONFIG_NO_2G_DIVERSITY_8197G
171 		#define CONFIG_NO_2G_DIVERSITY
172 	#elif defined(CONFIG_2G_CGCS_RX_DIVERSITY_8197G)
173 		#define CONFIG_2G_CGCS_RX_DIVERSITY
174 	#elif defined(CONFIG_2G_CG_TRX_DIVERSITY_8197G)
175 		#define CONFIG_2G_CG_TRX_DIVERSITY
176 	#endif
177 
178 	#if (!defined(CONFIG_NO_2G_DIVERSITY) && !defined(CONFIG_2G5G_CG_TRX_DIVERSITY_8881A) && !defined(CONFIG_2G_CGCS_RX_DIVERSITY) && !defined(CONFIG_2G_CG_TRX_DIVERSITY) && !defined(CONFIG_2G_CG_SMART_ANT_DIVERSITY))
179 		#define CONFIG_NO_2G_DIVERSITY
180 	#endif
181 
182 	#ifdef CONFIG_NO_5G_DIVERSITY_8881A
183 		#define CONFIG_NO_5G_DIVERSITY
184 	#elif defined(CONFIG_5G_CGCS_RX_DIVERSITY_8881A)
185 		#define CONFIG_5G_CGCS_RX_DIVERSITY
186 	#elif defined(CONFIG_5G_CG_TRX_DIVERSITY_8881A)
187 		#define CONFIG_5G_CG_TRX_DIVERSITY
188 	#elif defined(CONFIG_2G5G_CG_TRX_DIVERSITY_8881A)
189 		#define CONFIG_2G5G_CG_TRX_DIVERSITY
190 	#endif
191 	#if (!defined(CONFIG_NO_5G_DIVERSITY) && !defined(CONFIG_5G_CGCS_RX_DIVERSITY) && !defined(CONFIG_5G_CG_TRX_DIVERSITY) && !defined(CONFIG_2G5G_CG_TRX_DIVERSITY) && !defined(CONFIG_5G_CG_SMART_ANT_DIVERSITY))
192 		#define CONFIG_NO_5G_DIVERSITY
193 	#endif
194 	/*----------*/
195 	#if (defined(CONFIG_NO_2G_DIVERSITY) && defined(CONFIG_NO_5G_DIVERSITY))
196 		#define CONFIG_NOT_SUPPORT_ANTDIV
197 	#elif (!defined(CONFIG_NO_2G_DIVERSITY) && defined(CONFIG_NO_5G_DIVERSITY))
198 		#define CONFIG_2G_SUPPORT_ANTDIV
199 	#elif (defined(CONFIG_NO_2G_DIVERSITY) && !defined(CONFIG_NO_5G_DIVERSITY))
200 		#define CONFIG_5G_SUPPORT_ANTDIV
201 	#elif ((!defined(CONFIG_NO_2G_DIVERSITY) && !defined(CONFIG_NO_5G_DIVERSITY)) || defined(CONFIG_2G5G_CG_TRX_DIVERSITY))
202 			#define CONFIG_2G5G_SUPPORT_ANTDIV
203 	#endif
204 		/*----------*/
205 #endif /*Antenna Diveristy*/
206 
207 /*[SmartAntenna]*/
208 /*#define	CONFIG_SMART_ANTENNA*/
209 #ifdef CONFIG_SMART_ANTENNA
210 	/*#define	CONFIG_CUMITEK_SMART_ANTENNA*/
211 #endif
212 #define CFG_DIG_DAMPING_CHK
213 /* --------------------------------------------------*/
214 #ifdef PHYDM_BEAMFORMING_SUPPORT
215 	#if (RTL8192F_SUPPORT || RTL8195B_SUPPORT || RTL8821C_SUPPORT ||\
216 	     RTL8822B_SUPPORT || RTL8197F_SUPPORT || RTL8198F_SUPPORT ||\
217 	     RTL8814B_SUPPORT || RTL8812F_SUPPORT)
218 		#define	DRIVER_BEAMFORMING_VERSION2
219 	#endif
220 #endif
221 
222 #endif
223