|
| 1 | +// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause |
| 2 | +/* Copyright(c) 2023 Realtek Corporation |
| 3 | + */ |
| 4 | + |
| 5 | +#include "debug.h" |
| 6 | +#include "fw.h" |
| 7 | +#include "mac.h" |
| 8 | +#include "phy.h" |
| 9 | +#include "reg.h" |
| 10 | +#include "rtw8922a.h" |
| 11 | + |
| 12 | +#define RTW8922A_FW_FORMAT_MAX 0 |
| 13 | +#define RTW8922A_FW_BASENAME "rtw89/rtw8922a_fw" |
| 14 | +#define RTW8922A_MODULE_FIRMWARE \ |
| 15 | + RTW8922A_FW_BASENAME ".bin" |
| 16 | + |
| 17 | +#ifdef CONFIG_PM |
| 18 | +static const struct wiphy_wowlan_support rtw_wowlan_stub_8922a = { |
| 19 | + .flags = WIPHY_WOWLAN_MAGIC_PKT | WIPHY_WOWLAN_DISCONNECT, |
| 20 | + .n_patterns = RTW89_MAX_PATTERN_NUM, |
| 21 | + .pattern_max_len = RTW89_MAX_PATTERN_SIZE, |
| 22 | + .pattern_min_len = 1, |
| 23 | +}; |
| 24 | +#endif |
| 25 | + |
| 26 | +static const struct rtw89_chip_ops rtw8922a_chip_ops = { |
| 27 | +}; |
| 28 | + |
| 29 | +const struct rtw89_chip_info rtw8922a_chip_info = { |
| 30 | + .chip_id = RTL8922A, |
| 31 | + .chip_gen = RTW89_CHIP_BE, |
| 32 | + .ops = &rtw8922a_chip_ops, |
| 33 | + .mac_def = &rtw89_mac_gen_be, |
| 34 | + .phy_def = &rtw89_phy_gen_be, |
| 35 | + .fw_basename = RTW8922A_FW_BASENAME, |
| 36 | + .fw_format_max = RTW8922A_FW_FORMAT_MAX, |
| 37 | + .try_ce_fw = false, |
| 38 | + .bbmcu_nr = 1, |
| 39 | + .needed_fw_elms = RTW89_BE_GEN_DEF_NEEDED_FW_ELEMENTS, |
| 40 | + .fifo_size = 589824, |
| 41 | + .small_fifo_size = false, |
| 42 | + .dle_scc_rsvd_size = 0, |
| 43 | + .max_amsdu_limit = 8000, |
| 44 | + .dis_2g_40m_ul_ofdma = false, |
| 45 | + .rsvd_ple_ofst = 0x8f800, |
| 46 | + .rf_base_addr = {0xe000, 0xf000}, |
| 47 | + .pwr_on_seq = NULL, |
| 48 | + .pwr_off_seq = NULL, |
| 49 | + .bb_table = NULL, |
| 50 | + .bb_gain_table = NULL, |
| 51 | + .rf_table = {}, |
| 52 | + .nctl_table = NULL, |
| 53 | + .nctl_post_table = NULL, |
| 54 | + .dflt_parms = NULL, /* load parm from fw */ |
| 55 | + .rfe_parms_conf = NULL, /* load parm from fw */ |
| 56 | + .txpwr_factor_rf = 2, |
| 57 | + .txpwr_factor_mac = 1, |
| 58 | + .dig_table = NULL, |
| 59 | + .tssi_dbw_table = NULL, |
| 60 | + .support_chanctx_num = 1, |
| 61 | + .support_bands = BIT(NL80211_BAND_2GHZ) | |
| 62 | + BIT(NL80211_BAND_5GHZ) | |
| 63 | + BIT(NL80211_BAND_6GHZ), |
| 64 | + .support_unii4 = true, |
| 65 | + .ul_tb_waveform_ctrl = false, |
| 66 | + .ul_tb_pwr_diff = false, |
| 67 | + .hw_sec_hdr = true, |
| 68 | + .rf_path_num = 2, |
| 69 | + .tx_nss = 2, |
| 70 | + .rx_nss = 2, |
| 71 | + .acam_num = 128, |
| 72 | + .bcam_num = 20, |
| 73 | + .scam_num = 32, |
| 74 | + .bacam_num = 8, |
| 75 | + .bacam_dynamic_num = 8, |
| 76 | + .bacam_ver = RTW89_BACAM_V1, |
| 77 | + .ppdu_max_usr = 16, |
| 78 | + .sec_ctrl_efuse_size = 4, |
| 79 | + .physical_efuse_size = 0x1300, |
| 80 | + .logical_efuse_size = 0x70000, |
| 81 | + .limit_efuse_size = 0x40000, |
| 82 | + .dav_phy_efuse_size = 0, |
| 83 | + .dav_log_efuse_size = 0, |
| 84 | + .phycap_addr = 0x1700, |
| 85 | + .phycap_size = 0x38, |
| 86 | + |
| 87 | + .ps_mode_supported = BIT(RTW89_PS_MODE_RFOFF) | |
| 88 | + BIT(RTW89_PS_MODE_CLK_GATED) | |
| 89 | + BIT(RTW89_PS_MODE_PWR_GATED), |
| 90 | + .low_power_hci_modes = 0, |
| 91 | + .hci_func_en_addr = R_BE_HCI_FUNC_EN, |
| 92 | + .h2c_desc_size = sizeof(struct rtw89_rxdesc_short_v2), |
| 93 | + .txwd_body_size = sizeof(struct rtw89_txwd_body_v2), |
| 94 | + .txwd_info_size = sizeof(struct rtw89_txwd_info_v2), |
| 95 | + .cfo_src_fd = true, |
| 96 | + .cfo_hw_comp = true, |
| 97 | + .dcfo_comp = NULL, |
| 98 | + .dcfo_comp_sft = 0, |
| 99 | + .imr_info = NULL, |
| 100 | + .bss_clr_vld = {R_BSS_CLR_VLD_V2, B_BSS_CLR_VLD0_V2}, |
| 101 | + .bss_clr_map_reg = R_BSS_CLR_MAP_V2, |
| 102 | + .dma_ch_mask = 0, |
| 103 | +#ifdef CONFIG_PM |
| 104 | + .wowlan_stub = &rtw_wowlan_stub_8922a, |
| 105 | +#endif |
| 106 | + .xtal_info = NULL, |
| 107 | +}; |
| 108 | +EXPORT_SYMBOL(rtw8922a_chip_info); |
| 109 | + |
| 110 | +MODULE_FIRMWARE(RTW8922A_MODULE_FIRMWARE); |
| 111 | +MODULE_AUTHOR("Realtek Corporation"); |
| 112 | +MODULE_DESCRIPTION("Realtek 802.11be wireless 8922A driver"); |
| 113 | +MODULE_LICENSE("Dual BSD/GPL"); |
0 commit comments