Path: blob/master/ALFA-W1F1/RTL8814AU/hal/phydm/halrf/halrf_kfree.h
1308 views
/******************************************************************************1*2* Copyright(c) 2007 - 2017 Realtek Corporation.3*4* This program is free software; you can redistribute it and/or modify it5* under the terms of version 2 of the GNU General Public License as6* published by the Free Software Foundation.7*8* This program is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for11* more details.12*13* The full GNU General Public License is included in this distribution in the14* file called LICENSE.15*16* Contact Information:17* wlanfae <[email protected]>18* Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park,19* Hsinchu 300, Taiwan.20*21* Larry Finger <[email protected]>22*23*****************************************************************************/2425#ifndef __HALRF_KFREE_H__26#define __HALRF_KFREE_H__2728#define KFREE_VERSION "1.0"2930#define KFREE_BAND_NUM 831#define KFREE_CH_NUM 33233#if (DM_ODM_SUPPORT_TYPE & (ODM_WIN | ODM_AP))3435#define BB_GAIN_NUM 63637#endif3839#define KFREE_FLAG_ON BIT(0)40#define KFREE_FLAG_THERMAL_K_ON BIT(1)4142#define KFREE_FLAG_ON_2G BIT(2)43#define KFREE_FLAG_ON_5G BIT(3)4445#define PA_BIAS_FLAG_ON BIT(4)4647#define TSSI_TRIM_FLAG_ON BIT(5)4849#define LNA_FLAG_ON BIT(6)505152#define PPG_THERMAL_OFFSET_98F 0x5053#define PPG_2GM_TXAB_98F 0x5154#define PPG_2GM_TXCD_98F 0x5255#define PPG_2GL_TXAB_98F 0x5356#define PPG_2GL_TXCD_98F 0x5457#define PPG_2GH_TXAB_98F 0x5558#define PPG_2GH_TXCD_98F 0x565960#define PPG_PABIAS_2GAB_98F 0x5761#define PPG_PABIAS_2GCD_98F 0x586263#define PPG_LNA_2GA_98F 0x5964#define PPG_LNA_2GB_98F 0x5a65#define PPG_LNA_2GC_98F 0x5b66#define PPG_LNA_2GD_98F 0x5c6768#define PPG_THERMAL_OFFSET_21C 0x1EF69#define PPG_2G_TXAB_21C 0x1EE70#define PPG_5GL1_TXA_21C 0x1EC71#define PPG_5GL2_TXA_21C 0x1E872#define PPG_5GM1_TXA_21C 0x1E473#define PPG_5GM2_TXA_21C 0x1E074#define PPG_5GH1_TXA_21C 0x1DC7576#define PPG_THERMAL_OFFSET_22B 0x3EF77#define PPG_2G_TXAB_22B 0x3EE78#define PPG_2G_TXCD_22B 0x3ED79#define PPG_5GL1_TXA_22B 0x3EC80#define PPG_5GL1_TXB_22B 0x3EB81#define PPG_5GL1_TXC_22B 0x3EA82#define PPG_5GL1_TXD_22B 0x3E983#define PPG_5GL2_TXA_22B 0x3E884#define PPG_5GL2_TXB_22B 0x3E785#define PPG_5GL2_TXC_22B 0x3E686#define PPG_5GL2_TXD_22B 0x3E587#define PPG_5GM1_TXA_22B 0x3E488#define PPG_5GM1_TXB_22B 0x3E389#define PPG_5GM1_TXC_22B 0x3E290#define PPG_5GM1_TXD_22B 0x3E191#define PPG_5GM2_TXA_22B 0x3E092#define PPG_5GM2_TXB_22B 0x3DF93#define PPG_5GM2_TXC_22B 0x3DE94#define PPG_5GM2_TXD_22B 0x3DD95#define PPG_5GH1_TXA_22B 0x3DC96#define PPG_5GH1_TXB_22B 0x3DB97#define PPG_5GH1_TXC_22B 0x3DA98#define PPG_5GH1_TXD_22B 0x3D999100#define PPG_PABIAS_2GA_22B 0x3D5101#define PPG_PABIAS_2GB_22B 0x3D6102103#define PPG_THERMAL_A_OFFSET_22C 0x1ef104#define PPG_THERMAL_B_OFFSET_22C 0x1b0105#define PPG_2GL_TXAB_22C 0x1d4106#define PPG_2GM_TXAB_22C 0x1ee107#define PPG_2GH_TXAB_22C 0x1d2108#define PPG_5GL1_TXA_22C 0x1ec109#define PPG_5GL1_TXB_22C 0x1eb110#define PPG_5GL2_TXA_22C 0x1e8111#define PPG_5GL2_TXB_22C 0x1e7112#define PPG_5GM1_TXA_22C 0x1e4113#define PPG_5GM1_TXB_22C 0x1e3114#define PPG_5GM2_TXA_22C 0x1e0115#define PPG_5GM2_TXB_22C 0x1df116#define PPG_5GH1_TXA_22C 0x1dc117#define PPG_5GH1_TXB_22C 0x1db118119#define PPG_PABIAS_2GA_22C 0x1d6120#define PPG_PABIAS_2GB_22C 0x1d5121#define PPG_PABIAS_5GA_22C 0x1d8122#define PPG_PABIAS_5GB_22C 0x1d7123124#define TSSI_2GM_TXA_22C 0x1c0125#define TSSI_2GM_TXB_22C 0x1bf126#define TSSI_2GH_TXA_22C 0x1be127#define TSSI_2GH_TXB_22C 0x1bd128#define TSSI_5GL1_TXA_22C 0x1bc129#define TSSI_5GL1_TXB_22C 0x1bb130#define TSSI_5GL2_TXA_22C 0x1ba131#define TSSI_5GL2_TXB_22C 0x1b9132#define TSSI_5GM1_TXA_22C 0x1b8133#define TSSI_5GM1_TXB_22C 0x1b7134#define TSSI_5GM2_TXA_22C 0x1b6135#define TSSI_5GM2_TXB_22C 0x1b5136#define TSSI_5GH1_TXA_22C 0x1b4137#define TSSI_5GH1_TXB_22C 0x1b3138#define TSSI_5GH2_TXA_22C 0x1b2139#define TSSI_5GH2_TXB_22C 0x1b1140141/*8195B*/142#define PPG_THERMAL_OFFSET_95B 0x1ef143#define PPG_2GL_TXA_95B 0x1d4144#define PPG_2GM_TXA_95B 0x1ee145#define PPG_2GH_TXA_95B 0x1d2146#define PPG_5GL1_TXA_95B 0x1ec147#define PPG_5GL2_TXA_95B 0x1e8148#define PPG_5GM1_TXA_95B 0x1e4149#define PPG_5GM2_TXA_95B 0x1e0150#define PPG_5GH1_TXA_95B 0x1dc151152#define PPG_PABIAS_2GA_95B 0x1d6153#define PPG_PABIAS_5GA_95B 0x1d8154155/*8721D*/156/*#define KFREE_BAND_NUM_8721D 6*/157#define PPG_THERMAL_OFFSET_8721D 0x1EF158#define PPG_2G_TXA_8721D 0x1EE159#define PPG_5GL1_TXA_8721D 0x1ED160#define PPG_5GL2_TXA_8721D 0x1EC161#define PPG_5GM1_TXA_8721D 0x1EB162#define PPG_5GM2_TXA_8721D 0x1EA163#define PPG_5GH1_TXA_8721D 0x1E9164165#define PPG_THERMAL_OFFSET_97G 0x50166#define PPG_2GM_TXAB_97G 0x51167#define PPG_2GL_TXAB_97G 0x53168#define PPG_2GH_TXAB_97G 0x55169#define PPG_PABIAS_2GAB_97G 0x57170#define PPG_LNA_2GA_97G 0x21171#define PPG_LNA_2GB_97G 0x22172173174struct odm_power_trim_data {175u8 flag;176u8 pa_bias_flag;177u8 lna_flag;178s8 bb_gain[KFREE_BAND_NUM][MAX_RF_PATH];179s8 tssi_trim[KFREE_BAND_NUM][MAX_RF_PATH];180s8 thermal;181};182183enum phydm_kfree_channeltosw {184PHYDM_2G = 0,185PHYDM_5GLB1 = 1,186PHYDM_5GLB2 = 2,187PHYDM_5GMB1 = 3,188PHYDM_5GMB2 = 4,189PHYDM_5GHB = 5,190};191192void phydm_get_thermal_trim_offset(void *dm_void);193194void phydm_get_power_trim_offset(void *dm_void);195196void phydm_get_pa_bias_offset(void *dm_void);197198s8 phydm_get_thermal_offset(void *dm_void);199200void phydm_clear_kfree_to_rf(void *dm_void, u8 e_rf_path, u8 data);201202void phydm_config_new_kfree(void *dm_void);203204s8 phydm_get_tssi_trim_de(void *dm_void, u8 path);205206void phydm_config_kfree(void *dm_void, u8 channel_to_sw);207208#endif /*__HALRF_KFREE_H__*/209210211