xref: /OK3568_Linux_fs/external/rkwifibt/drivers/rtl8822cs/hal/phydm/rtl8822c/phydm_regconfig8822c.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  * The full GNU General Public License is included in this distribution in the
15  * file called LICENSE.
16  *
17  * Contact Information:
18  * wlanfae <wlanfae@realtek.com>
19  * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park,
20  * Hsinchu 300, Taiwan.
21  *
22  * Larry Finger <Larry.Finger@lwfinger.net>
23  *
24  *****************************************************************************/
25 #ifndef __INC_ODM_REGCONFIG_H_8822C
26 #define __INC_ODM_REGCONFIG_H_8822C
27 
28 #if (RTL8822C_SUPPORT)
29 /* 2019.12.18: Remove rf direct write protection mechanism*/
30 #define REG_CONFIG_VERSION_8822C "1.5"
31 
32 #define RXBB_MAX_GAIN_8822C 0x14
33 
34 void odm_config_rf_reg_8822c(struct dm_struct *dm, u32 addr, u32 data,
35 			     enum rf_path rf_path, u32 reg_addr);
36 
37 void odm_config_rf_radio_a_8822c(struct dm_struct *dm, u32 addr, u32 data);
38 
39 void odm_config_rf_radio_b_8822c(struct dm_struct *dm, u32 addr, u32 data);
40 
41 void odm_config_bb_agc_8822c(struct dm_struct *dm, u32 addr, u32 bitmask,
42 			     u32 data);
43 
44 void odm_config_bb_phy_reg_pg_8822c(struct dm_struct *dm, u32 band, u32 rf_path,
45 				    u32 tx_num, u32 addr, u32 bitmask,
46 				    u32 data);
47 
48 void odm_config_bb_phy_8822c(struct dm_struct *dm, u32 addr, u32 bitmask,
49 			     u32 data);
50 void odm_config_bb_txpwr_lmt_8822c_ex(struct dm_struct *dm, u8 regulation,
51 				      u8 band, u8 bandwidth, u8 rate_section,
52 				      u8 rf_path, u8 channel, s8 power_limit);
53 
54 void odm_config_bb_txpwr_lmt_8822c(struct dm_struct *dm, u8 *regulation,
55 				   u8 *band, u8 *bandwidth, u8 *rate_section,
56 				   u8 *rf_path, u8 *channel, u8 *power_limit);
57 
58 #endif
59 #endif /* RTL8822C_SUPPORT*/
60