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