Commit 75fd91aa authored by Ping-Ke Shih's avatar Ping-Ke Shih Committed by Kalle Valo

rtw89: update TMAC parameters

TMAC is short for TX MAC, and this patch is to configure FIFO thresholds.
Signed-off-by: default avatarPing-Ke Shih <pkshih@realtek.com>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220325060055.58482-16-pkshih@realtek.com
parent 19cb9427
......@@ -1919,6 +1919,13 @@ static int tmac_init(struct rtw89_dev *rtwdev, u8 mac_idx)
reg = rtw89_mac_reg_by_idx(R_AX_MAC_LOOPBACK, mac_idx);
rtw89_write32_clr(rtwdev, reg, B_AX_MACLBK_EN);
reg = rtw89_mac_reg_by_idx(R_AX_TCR0, mac_idx);
rtw89_write32_mask(rtwdev, reg, B_AX_TCR_UDF_THSD_MASK, TCR_UDF_THSD);
reg = rtw89_mac_reg_by_idx(R_AX_TXD_FIFO_CTRL, mac_idx);
rtw89_write32_mask(rtwdev, reg, B_AX_TXDFIFO_HIGH_MCS_THRE_MASK, TXDFIFO_HIGH_MCS_THRE);
rtw89_write32_mask(rtwdev, reg, B_AX_TXDFIFO_LOW_MCS_THRE_MASK, TXDFIFO_LOW_MCS_THRE);
return 0;
}
......
......@@ -1351,6 +1351,24 @@
#define R_AX_RXDMA_PKT_INFO_1 0xC818
#define R_AX_RXDMA_PKT_INFO_2 0xC81C
#define R_AX_TCR0 0xCA00
#define R_AX_TCR0_C1 0xEA00
#define B_AX_TCR_ZLD_NUM_MASK GENMASK(31, 24)
#define B_AX_TCR_UDF_EN BIT(23)
#define B_AX_TCR_UDF_THSD_MASK GENMASK(22, 16)
#define TCR_UDF_THSD 0x6
#define B_AX_TCR_ERRSTEN_MASK GENMASK(15, 10)
#define B_AX_TCR_VHTSIGA1_TXPS BIT(9)
#define B_AX_TCR_PLCP_ERRHDL_EN BIT(8)
#define B_AX_TCR_PADSEL BIT(7)
#define B_AX_TCR_MASK_SIGBCRC BIT(6)
#define B_AX_TCR_SR_VAL15_ALLOW BIT(5)
#define B_AX_TCR_EN_EOF BIT(4)
#define B_AX_TCR_EN_SCRAM_INC BIT(3)
#define B_AX_TCR_EN_20MST BIT(2)
#define B_AX_TCR_CRC BIT(1)
#define B_AX_TCR_DISGCLK BIT(0)
#define R_AX_TCR1 0xCA04
#define R_AX_TCR1_C1 0xEA04
#define B_AX_TXDFIFO_THRESHOLD GENMASK(31, 28)
......@@ -1374,6 +1392,17 @@
#define R_AX_PPWRBIT_SETTING 0xCA0C
#define R_AX_PPWRBIT_SETTING_C1 0xEA0C
#define R_AX_TXD_FIFO_CTRL 0xCA1C
#define R_AX_TXD_FIFO_CTRL_C1 0xEA1C
#define B_AX_NON_LEGACY_PPDU_ZLD_USTIMER_MASK GENMASK(28, 24)
#define B_AX_LEGACY_PPDU_ZLD_USTIMER_MASK GENMASK(20, 16)
#define B_AX_TXDFIFO_HIGH_MCS_THRE_MASK GENMASK(15, 12)
#define TXDFIFO_HIGH_MCS_THRE 0x7
#define B_AX_TXDFIFO_LOW_MCS_THRE_MASK GENMASK(11, 8)
#define TXDFIFO_LOW_MCS_THRE 0x7
#define B_AX_HIGH_MCS_PHY_RATE_MASK GENMASK(7, 4)
#define B_AX_BW_PHY_RATE_MASK GENMASK(1, 0)
#define R_AX_MACTX_DBG_SEL_CNT 0xCA20
#define R_AX_MACTX_DBG_SEL_CNT_C1 0xEA20
#define B_AX_MACTX_MPDU_CNT GENMASK(31, 24)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment