1 /******************************************************************************
3 * Copyright(c) 2007 - 2017 Realtek Corporation.
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.
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
14 * The full GNU General Public License is included in this distribution in the
15 * file called LICENSE.
17 * Contact Information:
18 * wlanfae <wlanfae@realtek.com>
19 * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park,
20 * Hsinchu 300, Taiwan.
22 * Larry Finger <Larry.Finger@lwfinger.net>
24 *****************************************************************************/
26 #ifndef __HALRF_KFREE_H__
27 #define __HALRF_KFREE_H__
29 #define KFREE_VERSION "1.0"
31 #define KFREE_BAND_NUM 6
32 #define KFREE_CH_NUM 3
34 #if (DM_ODM_SUPPORT_TYPE & (ODM_WIN | ODM_AP))
40 #define KFREE_FLAG_ON BIT(0)
41 #define KFREE_FLAG_THERMAL_K_ON BIT(1)
43 #define KFREE_FLAG_ON_2G BIT(2)
44 #define KFREE_FLAG_ON_5G BIT(3)
46 #define PA_BIAS_FLAG_ON BIT(4)
48 #define PPG_THERMAL_OFFSET_21C 0x1EF
49 #define PPG_2G_TXAB_21C 0x1EE
50 #define PPG_5GL1_TXA_21C 0x1EC
51 #define PPG_5GL2_TXA_21C 0x1E8
52 #define PPG_5GM1_TXA_21C 0x1E4
53 #define PPG_5GM2_TXA_21C 0x1E0
54 #define PPG_5GH1_TXA_21C 0x1DC
56 #define PPG_THERMAL_OFFSET_22B 0x3EF
57 #define PPG_2G_TXAB_22B 0x3EE
58 #define PPG_2G_TXCD_22B 0x3ED
59 #define PPG_5GL1_TXA_22B 0x3EC
60 #define PPG_5GL1_TXB_22B 0x3EB
61 #define PPG_5GL1_TXC_22B 0x3EA
62 #define PPG_5GL1_TXD_22B 0x3E9
63 #define PPG_5GL2_TXA_22B 0x3E8
64 #define PPG_5GL2_TXB_22B 0x3E7
65 #define PPG_5GL2_TXC_22B 0x3E6
66 #define PPG_5GL2_TXD_22B 0x3E5
67 #define PPG_5GM1_TXA_22B 0x3E4
68 #define PPG_5GM1_TXB_22B 0x3E3
69 #define PPG_5GM1_TXC_22B 0x3E2
70 #define PPG_5GM1_TXD_22B 0x3E1
71 #define PPG_5GM2_TXA_22B 0x3E0
72 #define PPG_5GM2_TXB_22B 0x3DF
73 #define PPG_5GM2_TXC_22B 0x3DE
74 #define PPG_5GM2_TXD_22B 0x3DD
75 #define PPG_5GH1_TXA_22B 0x3DC
76 #define PPG_5GH1_TXB_22B 0x3DB
77 #define PPG_5GH1_TXC_22B 0x3DA
78 #define PPG_5GH1_TXD_22B 0x3D9
80 #define PPG_PABIAS_2GA_22B 0x3D5
81 #define PPG_PABIAS_2GB_22B 0x3D6
83 struct odm_power_trim_data {
86 s8 bb_gain[KFREE_BAND_NUM][MAX_RF_PATH];
90 enum phydm_kfree_channeltosw {
99 void phydm_get_thermal_trim_offset(void *dm_void);
101 void phydm_get_power_trim_offset(void *dm_void);
103 void phydm_get_pa_bias_offset(void *dm_void);
105 s8 phydm_get_thermal_offset(void *dm_void);
107 void phydm_clear_kfree_to_rf(void *dm_void, u8 e_rf_path, u8 data);
109 void phydm_config_kfree(void *dm_void, u8 channel_to_sw);
111 #endif /*#ifndef __HALRF_KFREE_H__*/