15#include "fe_hal_rf_reg_if.h"
25#define THIS_FILE_ID OAM_FILE_ID_HAL_RF_H
29#define HH503_SOC_BUCK_RO 0x400032B4
32#define RF_CALI_DATA_BUF_LEN (0x6cd8)
33#define RF_SINGLE_CHAN_CALI_DATA_BUF_LEN (RF_CALI_DATA_BUF_LEN >> 1)
34#define HH503_TEMPERATURE_THRESH 50
36#ifdef _PRE_WLAN_03_MPW_RF
37#define HH503_TOP_TST_SW2 30
40#ifdef _PRE_WLAN_03_MPW_RF
41#define HH503_PLL_LD_REG34 34
44#define HH503_RF_TCXO_25MHZ 1
45#define HH503_RF_TCXO_40MHZ 2
46#define HH503_RF_TCXO_384MHZ 3
48#define HH503_RF_LPF_GAIN_DEFAULT_VAL 0x4688
49#define HH503_RF_DAC_GAIN_DEFAULT_VAL 0x24
52#ifdef _PRE_WLAN_03_MPW_RF
53#define HH503_WL_PLL1_RFLDO789_ENABLE 0xFF00
56#define HH503_RF_2G_CHANNEL_NUM 13
57#define HH503_RF_5G_CHANNEL_NUM 7
59#define HH503_RF_FREQ_2_CHANNEL_NUM 14
60#define HH503_RF_FREQ_5_CHANNEL_NUM 29
62#define HH503_CALI_CHN_INDEX_2422 0
63#define HH503_CALI_CHN_INDEX_2447 1
64#define HH503_CALI_CHN_INDEX_2472 2
66#define CHANNEL_NUM5_IDX 4
67#define CHANNEL_NUM10_IDX 9
69#define HH503_CALI_CHN_INDEX_4950 0
70#define HH503_CALI_CHN_INDEX_5210 1
71#define HH503_CALI_CHN_INDEX_5290 2
72#define HH503_CALI_CHN_INDEX_5530 3
73#define HH503_CALI_CHN_INDEX_5610 4
74#define HH503_CALI_CHN_INDEX_5690 5
75#define HH503_CALI_CHN_INDEX_5775 6
77#define HH503_RF_TEMP_STS_RSV 0x7
79#define HH503_RF_TEMP_INVALID (-100)
81#ifdef _PRE_PLAT_FEATURE_CUSTOMIZE
83#define HH503_TX2G_PA_GATE_VCTL_REG_NUM (9)
84#define HH503_TX2G_PA_VRECT_GATE_THIN_REG_NUM (32)
85#define HH503_TX2G_REG_280_BAND2_3_NUM (2)
86#define HH503_TX2G_PA_GATE_REG_NUM (HH503_TX2G_PA_GATE_VCTL_REG_NUM + HH503_TX2G_PA_VRECT_GATE_THIN_REG_NUM + \
87 HH503_TX2G_REG_280_BAND2_3_NUM)
135#ifdef _PRE_PLAT_FEATURE_CUSTOMIZE
139#ifdef _PRE_WLAN_SUPPORT_5G
143} hh503_cfg_custom_gain_db_rf_stru;
147#ifdef _PRE_WLAN_SUPPORT_5G
150} hh503_cfg_custom_delta_pwr_ref_stru;
158 osal_u8 far_dist_pow_gain_switch;
161 osal_u8 far_dist_dsss_scale_promote_switch;
172 osal_u16 recovery_temp_protect_thread;
173} hh503_rf_custom_stru;
182} hh503_adjust_tx_power_stru;
188} hh503_adjust_tx_power_level_stru;
195} hh503_band_num_for_loss;
198static const hh503_band_num_for_loss g_band_num_for_loss[] = {
199 {0, 1, 4, 0}, {1, 6, 11, 0}, {2, 13, 14, 0},
200 {0, 184, 196, 0}, {1, 36, 48, 0}, {2, 52, 64, 0},
201 {3, 100, 112, 0}, {4, 116, 128, 0}, {5, 132, 140, 0},
229#ifdef _PRE_WLAN_FEATURE_TEMP_PROTECT
240#ifdef _PRE_PLAT_FEATURE_CUSTOMIZE
241typedef osal_u32 (*hh503_config_custom_dts_cali_cb)(
const osal_u8 *param);
249#ifdef _PRE_WLAN_FEATURE_ALWAYS_TX
hal_rf_trx_type_enum
Definition hal_common_ops_device_rom.h:1605
#define HAL_DEVICE_5G_DELTA_RSSI_NUM
Definition hal_device.h:27
#define HAL_DEVICE_2G_DELTA_RSSI_NUM
Definition hal_device.h:26
#define HAL_DEVICE_5G_BAND_NUM_FOR_LOSS
Definition hal_device.h:25
#define HAL_DEVICE_2G_BAND_NUM_FOR_LOSS
Definition hal_device.h:24
osal_void(* hh503_adjust_tx_power_cb)(osal_u8 ch, osal_s8 power)
Definition hal_rf.h:244
osal_void hh503_pow_set_rf_regctl_enable_ext(const hal_to_dmac_device_stru *hal_device, oal_bool_enum_uint8 rf_linectl)
osal_void(* hh503_config_rssi_for_loss_cb)(osal_u8 channel_num, osal_s8 *rssi)
Definition hal_rf.h:237
osal_void(* hh503_restore_tx_power_cb)(osal_u8 ch)
Definition hal_rf.h:245
osal_void hh503_set_rf_bw(wlan_bw_cap_enum_uint8 bw)
osal_u8 hh503_get_tpc_code_ext(osal_void)
osal_void hh503_cali_send_func_ext(hal_to_dmac_device_stru *hal_device, osal_u8 *cali_data, osal_u16 frame_len, osal_u16 remain)
osal_void(* hh503_set_rf_custom_reg_cb)(hal_to_dmac_device_stru *hal_device)
Definition hal_rf.h:238
osal_u8 hh503_rf_bandwidth_enum_uint8
Definition hal_rf.h:99
osal_void hh503_initialize_rf_sys_ext(hal_to_dmac_device_stru *hal_device)
osal_u8(* hh503_get_rx_chain_cb)(osal_void)
Definition hal_rf.h:226
osal_void hal_radar_sensing_switch_abb_lo_tx_top_test_reg12(osal_bool is_on)
osal_u8 rf_off_flag_enum_uint8
Definition hal_rf.h:106
rf_off_flag_enum
Definition hal_rf.h:101
@ RF_EN_OFF
Definition hal_rf.h:103
@ RF_OFF_BUTT
Definition hal_rf.h:104
@ RFLDO_EN_OFF
Definition hal_rf.h:102
osal_void hh503_adjust_tx_power_level_ext(osal_u8 ch, osal_s8 power)
osal_void(* hh503_pow_set_rf_regctl_enable_cb)(hal_to_dmac_device_stru *hal_device, oal_bool_enum_uint8 rf_linectl)
Definition hal_rf.h:247
osal_void(* hh503_cali_send_func_cb)(hal_to_dmac_device_stru *hal_device, osal_u8 *cali_data, osal_u16 frame_len, osal_u16 remain)
Definition hal_rf.h:234
#define HH503_RF_FREQ_5_CHANNEL_NUM
Definition hal_rf.h:60
osal_void(* hh503_initialize_rf_sys_cb)(hal_to_dmac_device_stru *hal_device)
Definition hal_rf.h:243
#define HH503_RF_FREQ_2_CHANNEL_NUM
Definition hal_rf.h:59
osal_void(* hh503_dpd_cfr_set_11b_cb)(hal_to_dmac_device_stru *hal_device, osal_u8 is_11b)
Definition hal_rf.h:233
osal_void hh503_set_rf_custom_reg_ext(const hal_to_dmac_device_stru *hal_device)
osal_u32 hh503_config_custom_rf_ext(const osal_u8 *param)
osal_void(* hh503_rf_set_trx_type_cb)(hal_rf_trx_type_enum trx_type)
Definition hal_rf.h:232
osal_u8(* hh503_rf_get_subband_idx_cb)(wlan_channel_band_enum_uint8 band, osal_u8 channel_idx)
Definition hal_rf.h:246
osal_void(* hh503_set_rf_bw_cb)(wlan_bw_cap_enum_uint8 bw)
Definition hal_rf.h:227
osal_void hh503_config_rssi_for_loss_ext(osal_u8 channel_num, osal_s8 *rssi)
osal_void hh503_rf_set_trx_type_ext(hal_rf_trx_type_enum trx_type)
osal_void hh503_dpd_cfr_set_11b_ext(const hal_to_dmac_device_stru *hal_device, osal_u8 is_11b)
osal_u32(* hh503_config_custom_rf_cb)(const osal_u8 *param)
Definition hal_rf.h:236
hh503_rf_bandwidth_enum
Definition hal_rf.h:91
@ HH503_RF_BAND_CTRL_20M
Definition hal_rf.h:93
@ HH503_RF_BAND_CTRL_40M
Definition hal_rf.h:94
@ HH503_RF_BAND_CTRL_BUTT
Definition hal_rf.h:97
@ HH503_RF_BAND_CTRL_10M
Definition hal_rf.h:92
@ HH503_RF_BAND_CTRL_80M
Definition hal_rf.h:95
osal_void hal_set_cal_tone(osal_u32 tone_cfg)
osal_u8 rsv[3]
Definition oal_net.h:2
osal_u8 oal_bool_enum_uint8
Definition oal_types_device_rom.h:45
int osal_s32
Definition osal_types.h:19
unsigned char osal_u8
Definition osal_types.h:11
osal_u8 osal_bool
Definition osal_types.h:27
signed char osal_s8
Definition osal_types.h:17
short osal_s16
Definition osal_types.h:18
void osal_void
Definition osal_types.h:29
unsigned int osal_u32
Definition osal_types.h:13
unsigned short osal_u16
Definition osal_types.h:12
#define ch(x, y, z)
Definition sha256.c:18
Definition hal_common_ops_device_rom.h:542
Definition fe_extern_if_device.h:34
osal_u8 rf_enabled
Definition hal_rf.h:120
osal_u8 resv
Definition hal_rf.h:125
hal_rf_chn_param chn_para
Definition hal_rf.h:126
hal_rf_trx_type_enum trx_type
Definition hal_rf.h:117
osal_u8 ldo_5g_wf0_on
Definition hal_rf.h:123
osal_u8 ldo_2g_wf0_on
Definition hal_rf.h:121
hal_rf_trx_type_enum trx_type_hist
Definition hal_rf.h:118
osal_u8 ldo_2g_wf1_on
Definition hal_rf.h:122
osal_bool trx_type_change
Definition hal_rf.h:119
osal_u8 ldo_5g_wf1_on
Definition hal_rf.h:124
osal_u8 other_dpa_idx_2g
Definition hal_rf.h:112
osal_u8 other_dpa_idx_5g
Definition hal_rf.h:113
Definition hal_ops_common_rom.h:529
#define WLAN_RF_CHANNEL_NUMS
Definition wlan_spec_rom.h:214
osal_u8 wlan_bw_cap_enum_uint8
Definition wlan_types.h:455
@ WLAN_BAND_BUTT
Definition wlan_types_base_rom.h:95
osal_u8 wlan_channel_band_enum_uint8
Definition wlan_types_base_rom.h:97