You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
131 lines
4.3 KiB
131 lines
4.3 KiB
From 3d7faabd92cfdd785c6591608614bf2663147ee4 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?=C3=8D=C3=B1igo=20Huguet?= <ihuguet@redhat.com>
|
|
Date: Wed, 24 May 2023 15:00:22 +0200
|
|
Subject: [PATCH 009/142] wifi: rtw89: 8852be: add 8852BE PCI entry
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
Bugzilla: https://bugzilla.redhat.com/2207499
|
|
|
|
commit 9695dc2e4be90315471ea4c672836929f5c403fe
|
|
Author: Ping-Ke Shih <pkshih@realtek.com>
|
|
Date: Wed Sep 28 16:43:36 2022 +0800
|
|
|
|
wifi: rtw89: 8852be: add 8852BE PCI entry
|
|
|
|
8852BE has two variants with different ID. One is 10ec:b852 that is a main
|
|
model with 2x2 antenna, and the other is 10ec:b85b that is a 1x1 model.
|
|
|
|
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
|
Signed-off-by: Kalle Valo <kvalo@kernel.org>
|
|
Link: https://lore.kernel.org/r/20220928084336.34981-10-pkshih@realtek.com
|
|
|
|
Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
|
|
---
|
|
drivers/net/wireless/realtek/rtw89/rtw8852b.h | 2 +
|
|
drivers/net/wireless/realtek/rtw89/rtw8852be.c | 64 ++++++++++++++++++++++++++
|
|
2 files changed, 66 insertions(+)
|
|
|
|
diff --git a/drivers/net/wireless/realtek/rtw89/rtw8852b.h b/drivers/net/wireless/realtek/rtw89/rtw8852b.h
|
|
index 578fe55b66957..bc0a383c4a390 100644
|
|
--- a/drivers/net/wireless/realtek/rtw89/rtw8852b.h
|
|
+++ b/drivers/net/wireless/realtek/rtw89/rtw8852b.h
|
|
@@ -85,4 +85,6 @@ struct rtw8852b_efuse {
|
|
};
|
|
} __packed;
|
|
|
|
+extern const struct rtw89_chip_info rtw8852b_chip_info;
|
|
+
|
|
#endif
|
|
diff --git a/drivers/net/wireless/realtek/rtw89/rtw8852be.c b/drivers/net/wireless/realtek/rtw89/rtw8852be.c
|
|
index 7bf95c38d3eb2..0ef2ca8efeb0e 100644
|
|
--- a/drivers/net/wireless/realtek/rtw89/rtw8852be.c
|
|
+++ b/drivers/net/wireless/realtek/rtw89/rtw8852be.c
|
|
@@ -7,18 +7,82 @@
|
|
|
|
#include "pci.h"
|
|
#include "reg.h"
|
|
+#include "rtw8852b.h"
|
|
|
|
static const struct rtw89_pci_info rtw8852b_pci_info = {
|
|
+ .txbd_trunc_mode = MAC_AX_BD_TRUNC,
|
|
+ .rxbd_trunc_mode = MAC_AX_BD_TRUNC,
|
|
+ .rxbd_mode = MAC_AX_RXBD_PKT,
|
|
+ .tag_mode = MAC_AX_TAG_MULTI,
|
|
+ .tx_burst = MAC_AX_TX_BURST_2048B,
|
|
+ .rx_burst = MAC_AX_RX_BURST_128B,
|
|
+ .wd_dma_idle_intvl = MAC_AX_WD_DMA_INTVL_256NS,
|
|
+ .wd_dma_act_intvl = MAC_AX_WD_DMA_INTVL_256NS,
|
|
+ .multi_tag_num = MAC_AX_TAG_NUM_8,
|
|
+ .lbc_en = MAC_AX_PCIE_ENABLE,
|
|
+ .lbc_tmr = MAC_AX_LBC_TMR_2MS,
|
|
+ .autok_en = MAC_AX_PCIE_DISABLE,
|
|
+ .io_rcy_en = MAC_AX_PCIE_DISABLE,
|
|
+ .io_rcy_tmr = MAC_AX_IO_RCY_ANA_TMR_6MS,
|
|
+
|
|
+ .init_cfg_reg = R_AX_PCIE_INIT_CFG1,
|
|
+ .txhci_en_bit = B_AX_TXHCI_EN,
|
|
+ .rxhci_en_bit = B_AX_RXHCI_EN,
|
|
+ .rxbd_mode_bit = B_AX_RXBD_MODE,
|
|
+ .exp_ctrl_reg = R_AX_PCIE_EXP_CTRL,
|
|
+ .max_tag_num_mask = B_AX_MAX_TAG_NUM,
|
|
+ .rxbd_rwptr_clr_reg = R_AX_RXBD_RWPTR_CLR,
|
|
+ .txbd_rwptr_clr2_reg = 0,
|
|
.dma_stop1 = {R_AX_PCIE_DMA_STOP1, B_AX_TX_STOP1_MASK_V1},
|
|
.dma_stop2 = {0},
|
|
.dma_busy1 = {R_AX_PCIE_DMA_BUSY1, DMA_BUSY1_CHECK_V1},
|
|
.dma_busy2_reg = 0,
|
|
.dma_busy3_reg = R_AX_PCIE_DMA_BUSY1,
|
|
|
|
+ .rpwm_addr = R_AX_PCIE_HRPWM,
|
|
+ .cpwm_addr = R_AX_CPWM,
|
|
.tx_dma_ch_mask = BIT(RTW89_TXCH_ACH4) | BIT(RTW89_TXCH_ACH5) |
|
|
BIT(RTW89_TXCH_ACH6) | BIT(RTW89_TXCH_ACH7) |
|
|
BIT(RTW89_TXCH_CH10) | BIT(RTW89_TXCH_CH11),
|
|
+ .bd_idx_addr_low_power = NULL,
|
|
+ .dma_addr_set = &rtw89_pci_ch_dma_addr_set,
|
|
+
|
|
+ .ltr_set = rtw89_pci_ltr_set,
|
|
+ .fill_txaddr_info = rtw89_pci_fill_txaddr_info,
|
|
+ .config_intr_mask = rtw89_pci_config_intr_mask,
|
|
+ .enable_intr = rtw89_pci_enable_intr,
|
|
+ .disable_intr = rtw89_pci_disable_intr,
|
|
+ .recognize_intrs = rtw89_pci_recognize_intrs,
|
|
+};
|
|
+
|
|
+static const struct rtw89_driver_info rtw89_8852be_info = {
|
|
+ .chip = &rtw8852b_chip_info,
|
|
+ .bus = {
|
|
+ .pci = &rtw8852b_pci_info,
|
|
+ },
|
|
+};
|
|
+
|
|
+static const struct pci_device_id rtw89_8852be_id_table[] = {
|
|
+ {
|
|
+ PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0xb852),
|
|
+ .driver_data = (kernel_ulong_t)&rtw89_8852be_info,
|
|
+ },
|
|
+ {
|
|
+ PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0xb85b),
|
|
+ .driver_data = (kernel_ulong_t)&rtw89_8852be_info,
|
|
+ },
|
|
+ {},
|
|
+};
|
|
+MODULE_DEVICE_TABLE(pci, rtw89_8852be_id_table);
|
|
+
|
|
+static struct pci_driver rtw89_8852be_driver = {
|
|
+ .name = "rtw89_8852be",
|
|
+ .id_table = rtw89_8852be_id_table,
|
|
+ .probe = rtw89_pci_probe,
|
|
+ .remove = rtw89_pci_remove,
|
|
+ .driver.pm = &rtw89_pm_ops,
|
|
};
|
|
+module_pci_driver(rtw89_8852be_driver);
|
|
|
|
MODULE_AUTHOR("Realtek Corporation");
|
|
MODULE_DESCRIPTION("Realtek 802.11ax wireless 8852BE driver");
|
|
--
|
|
2.13.6
|
|
|