1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /****************************************************************************** 3 * 4 * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. 5 * 6 ******************************************************************************/ 7 8 #ifndef __HAL_PG_H__ 9 #define __HAL_PG_H__ 10 11 #define MAX_RF_PATH 4 12 /* MAX_TX_COUNT must always be set to 4, otherwise the read efuse table 13 * sequence will be wrong. 14 */ 15 #define MAX_TX_COUNT 4 16 17 /* For VHT series TX power by rate table. */ 18 /* VHT TX power by rate off setArray = */ 19 /* RF: at most 4*4 = ABCD = 0/1/2/3 */ 20 /* CCK = 0 OFDM = 1/2 HT-MCS 0-15 =3/4/56 VHT =7/8/9/10/11 */ 21 #define TX_PWR_BY_RATE_NUM_RF 4 22 #define TX_PWR_BY_RATE_NUM_RATE 84 23 #define MAX_RF_PATH_NUM 2 24 #define MAX_CHNL_GROUP_24G 6 25 #define EEPROM_DEFAULT_BOARD_OPTION 0x00 26 27 /* EEPROM/Efuse PG Offset for 8723BE/8723BU/8723BS */ 28 /* 0x10 ~ 0x63 = TX power area. */ 29 #define EEPROM_TX_PWR_INX_8723B 0x10 30 /* New EFUSE default value */ 31 #define EEPROM_DEFAULT_24G_INDEX 0x2D 32 #define EEPROM_DEFAULT_24G_HT20_DIFF 0X02 33 #define EEPROM_DEFAULT_24G_OFDM_DIFF 0X04 34 #define EEPROM_Default_ThermalMeter_8723B 0x18 35 #define EEPROM_Default_CrystalCap_8723B 0x20 36 37 #define EEPROM_ChannelPlan_8723B 0xB8 38 #define EEPROM_XTAL_8723B 0xB9 39 #define EEPROM_THERMAL_METER_8723B 0xBA 40 41 #define EEPROM_RF_BOARD_OPTION_8723B 0xC1 42 #define EEPROM_RF_BT_SETTING_8723B 0xC3 43 #define EEPROM_VERSION_8723B 0xC4 44 #define EEPROM_CustomID_8723B 0xC5 45 #define EEPROM_DEFAULT_DIFF 0XFE 46 47 /* RTL8723BS */ 48 #define EEPROM_MAC_ADDR_8723BS 0x11A 49 #define EEPROM_Voltage_ADDR_8723B 0x8 50 #define RTL_EEPROM_ID 0x8129 51 52 struct TxPowerInfo24G { 53 u8 IndexCCK_Base[MAX_RF_PATH][MAX_CHNL_GROUP_24G]; 54 u8 IndexBW40_Base[MAX_RF_PATH][MAX_CHNL_GROUP_24G]; 55 /* If only one tx, only BW20 and OFDM are used. */ 56 s8 CCK_Diff[MAX_RF_PATH][MAX_TX_COUNT]; 57 s8 OFDM_Diff[MAX_RF_PATH][MAX_TX_COUNT]; 58 s8 BW20_Diff[MAX_RF_PATH][MAX_TX_COUNT]; 59 s8 BW40_Diff[MAX_RF_PATH][MAX_TX_COUNT]; 60 }; 61 62 enum { 63 Ant_x2 = 0, 64 Ant_x1 = 1 65 }; 66 67 enum { 68 BT_RTL8723B = 8, 69 }; 70 71 #endif 72