1 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ 2 /* Copyright(c) 2019-2020 Realtek Corporation 3 */ 4 5 #ifndef __RTW89_8852A_RFK_TABLE_H__ 6 #define __RTW89_8852A_RFK_TABLE_H__ 7 8 #include "core.h" 9 10 enum rtw89_rfk_flag { 11 RTW89_RFK_F_WRF = 0, 12 RTW89_RFK_F_WM = 1, 13 RTW89_RFK_F_WS = 2, 14 RTW89_RFK_F_WC = 3, 15 RTW89_RFK_F_DELAY = 4, 16 RTW89_RFK_F_NUM, 17 }; 18 19 struct rtw89_rfk_tbl { 20 const struct rtw89_reg5_def *defs; 21 u32 size; 22 }; 23 24 #define DECLARE_RFK_TBL(_name) \ 25 const struct rtw89_rfk_tbl _name ## _tbl = { \ 26 .defs = _name, \ 27 .size = ARRAY_SIZE(_name), \ 28 } 29 30 #define DECL_RFK_WRF(_path, _addr, _mask, _data) \ 31 {.flag = RTW89_RFK_F_WRF, \ 32 .path = _path, \ 33 .addr = _addr, \ 34 .mask = _mask, \ 35 .data = _data,} 36 37 #define DECL_RFK_WM(_addr, _mask, _data) \ 38 {.flag = RTW89_RFK_F_WM, \ 39 .addr = _addr, \ 40 .mask = _mask, \ 41 .data = _data,} 42 43 #define DECL_RFK_WS(_addr, _mask) \ 44 {.flag = RTW89_RFK_F_WS, \ 45 .addr = _addr, \ 46 .mask = _mask,} 47 48 #define DECL_RFK_WC(_addr, _mask) \ 49 {.flag = RTW89_RFK_F_WC, \ 50 .addr = _addr, \ 51 .mask = _mask,} 52 53 #define DECL_RFK_DELAY(_data) \ 54 {.flag = RTW89_RFK_F_DELAY, \ 55 .data = _data,} 56 57 extern const struct rtw89_rfk_tbl rtw8852a_tssi_sys_defs_tbl; 58 extern const struct rtw89_rfk_tbl rtw8852a_tssi_sys_defs_2g_tbl; 59 extern const struct rtw89_rfk_tbl rtw8852a_tssi_sys_defs_5g_tbl; 60 extern const struct rtw89_rfk_tbl rtw8852a_tssi_txpwr_ctrl_bb_defs_a_tbl; 61 extern const struct rtw89_rfk_tbl rtw8852a_tssi_txpwr_ctrl_bb_defs_b_tbl; 62 extern const struct rtw89_rfk_tbl rtw8852a_tssi_txpwr_ctrl_bb_defs_2g_tbl; 63 extern const struct rtw89_rfk_tbl rtw8852a_tssi_txpwr_ctrl_bb_defs_5g_tbl; 64 extern const struct rtw89_rfk_tbl rtw8852a_tssi_txpwr_ctrl_bb_he_tb_defs_a_tbl; 65 extern const struct rtw89_rfk_tbl rtw8852a_tssi_txpwr_ctrl_bb_he_tb_defs_b_tbl; 66 extern const struct rtw89_rfk_tbl rtw8852a_tssi_dck_defs_a_tbl; 67 extern const struct rtw89_rfk_tbl rtw8852a_tssi_dck_defs_b_tbl; 68 extern const struct rtw89_rfk_tbl rtw8852a_tssi_dac_gain_tbl_defs_a_tbl; 69 extern const struct rtw89_rfk_tbl rtw8852a_tssi_dac_gain_tbl_defs_b_tbl; 70 extern const struct rtw89_rfk_tbl rtw8852a_tssi_slope_cal_org_defs_a_tbl; 71 extern const struct rtw89_rfk_tbl rtw8852a_tssi_slope_cal_org_defs_b_tbl; 72 extern const struct rtw89_rfk_tbl rtw8852a_tssi_rf_gap_tbl_defs_a_tbl; 73 extern const struct rtw89_rfk_tbl rtw8852a_tssi_rf_gap_tbl_defs_b_tbl; 74 extern const struct rtw89_rfk_tbl rtw8852a_tssi_slope_defs_a_tbl; 75 extern const struct rtw89_rfk_tbl rtw8852a_tssi_slope_defs_b_tbl; 76 extern const struct rtw89_rfk_tbl rtw8852a_tssi_track_defs_a_tbl; 77 extern const struct rtw89_rfk_tbl rtw8852a_tssi_track_defs_b_tbl; 78 extern const struct rtw89_rfk_tbl rtw8852a_tssi_txagc_ofst_mv_avg_defs_a_tbl; 79 extern const struct rtw89_rfk_tbl rtw8852a_tssi_txagc_ofst_mv_avg_defs_b_tbl; 80 extern const struct rtw89_rfk_tbl rtw8852a_tssi_pak_defs_a_2g_tbl; 81 extern const struct rtw89_rfk_tbl rtw8852a_tssi_pak_defs_a_5g_1_tbl; 82 extern const struct rtw89_rfk_tbl rtw8852a_tssi_pak_defs_a_5g_3_tbl; 83 extern const struct rtw89_rfk_tbl rtw8852a_tssi_pak_defs_a_5g_4_tbl; 84 extern const struct rtw89_rfk_tbl rtw8852a_tssi_pak_defs_b_2g_tbl; 85 extern const struct rtw89_rfk_tbl rtw8852a_tssi_pak_defs_b_5g_1_tbl; 86 extern const struct rtw89_rfk_tbl rtw8852a_tssi_pak_defs_b_5g_3_tbl; 87 extern const struct rtw89_rfk_tbl rtw8852a_tssi_pak_defs_b_5g_4_tbl; 88 extern const struct rtw89_rfk_tbl rtw8852a_tssi_enable_defs_a_tbl; 89 extern const struct rtw89_rfk_tbl rtw8852a_tssi_enable_defs_b_tbl; 90 extern const struct rtw89_rfk_tbl rtw8852a_tssi_enable_defs_ab_tbl; 91 extern const struct rtw89_rfk_tbl rtw8852a_tssi_disable_defs_tbl; 92 extern const struct rtw89_rfk_tbl rtw8852a_tssi_tracking_defs_tbl; 93 94 extern const struct rtw89_rfk_tbl rtw8852a_rfk_afe_init_defs_tbl; 95 extern const struct rtw89_rfk_tbl rtw8852a_rfk_dack_reload_defs_a_tbl; 96 extern const struct rtw89_rfk_tbl rtw8852a_rfk_dack_reload_defs_b_tbl; 97 extern const struct rtw89_rfk_tbl rtw8852a_rfk_check_addc_defs_a_tbl; 98 extern const struct rtw89_rfk_tbl rtw8852a_rfk_check_addc_defs_b_tbl; 99 extern const struct rtw89_rfk_tbl rtw8852a_rfk_addck_reset_defs_a_tbl; 100 extern const struct rtw89_rfk_tbl rtw8852a_rfk_addck_trigger_defs_a_tbl; 101 extern const struct rtw89_rfk_tbl rtw8852a_rfk_addck_restore_defs_a_tbl; 102 extern const struct rtw89_rfk_tbl rtw8852a_rfk_addck_reset_defs_b_tbl; 103 extern const struct rtw89_rfk_tbl rtw8852a_rfk_addck_trigger_defs_b_tbl; 104 extern const struct rtw89_rfk_tbl rtw8852a_rfk_addck_restore_defs_b_tbl; 105 extern const struct rtw89_rfk_tbl rtw8852a_rfk_check_dadc_defs_f_a_tbl; 106 extern const struct rtw89_rfk_tbl rtw8852a_rfk_check_dadc_defs_f_b_tbl; 107 extern const struct rtw89_rfk_tbl rtw8852a_rfk_check_dadc_defs_r_a_tbl; 108 extern const struct rtw89_rfk_tbl rtw8852a_rfk_check_dadc_defs_r_b_tbl; 109 extern const struct rtw89_rfk_tbl rtw8852a_rfk_dack_defs_f_a_tbl; 110 extern const struct rtw89_rfk_tbl rtw8852a_rfk_dack_defs_m_a_tbl; 111 extern const struct rtw89_rfk_tbl rtw8852a_rfk_dack_defs_r_a_tbl; 112 extern const struct rtw89_rfk_tbl rtw8852a_rfk_dack_defs_f_b_tbl; 113 extern const struct rtw89_rfk_tbl rtw8852a_rfk_dack_defs_m_b_tbl; 114 extern const struct rtw89_rfk_tbl rtw8852a_rfk_dack_defs_r_b_tbl; 115 extern const struct rtw89_rfk_tbl rtw8852a_rfk_dpk_bb_afe_sf_defs_a_tbl; 116 extern const struct rtw89_rfk_tbl rtw8852a_rfk_dpk_bb_afe_sr_defs_a_tbl; 117 extern const struct rtw89_rfk_tbl rtw8852a_rfk_dpk_bb_afe_sf_defs_b_tbl; 118 extern const struct rtw89_rfk_tbl rtw8852a_rfk_dpk_bb_afe_sr_defs_b_tbl; 119 extern const struct rtw89_rfk_tbl rtw8852a_rfk_dpk_bb_afe_s_defs_ab_tbl; 120 extern const struct rtw89_rfk_tbl rtw8852a_rfk_dpk_bb_afe_r_defs_a_tbl; 121 extern const struct rtw89_rfk_tbl rtw8852a_rfk_dpk_bb_afe_r_defs_b_tbl; 122 extern const struct rtw89_rfk_tbl rtw8852a_rfk_dpk_bb_afe_r_defs_ab_tbl; 123 extern const struct rtw89_rfk_tbl rtw8852a_rfk_dpk_lbk_rxiqk_defs_f_tbl; 124 extern const struct rtw89_rfk_tbl rtw8852a_rfk_dpk_lbk_rxiqk_defs_r_tbl; 125 extern const struct rtw89_rfk_tbl rtw8852a_rfk_dpk_pas_read_defs_tbl; 126 extern const struct rtw89_rfk_tbl rtw8852a_rfk_iqk_set_defs_nondbcc_path01_tbl; 127 extern const struct rtw89_rfk_tbl rtw8852a_rfk_iqk_set_defs_dbcc_path0_tbl; 128 extern const struct rtw89_rfk_tbl rtw8852a_rfk_iqk_set_defs_dbcc_path1_tbl; 129 extern const struct rtw89_rfk_tbl rtw8852a_rfk_iqk_restore_defs_nondbcc_path01_tbl; 130 extern const struct rtw89_rfk_tbl rtw8852a_rfk_iqk_restore_defs_dbcc_path0_tbl; 131 extern const struct rtw89_rfk_tbl rtw8852a_rfk_iqk_restore_defs_dbcc_path1_tbl; 132 133 #endif 134