Skip to content

Commit 2b189c5

Browse files
Baochen Qiangmiaoqing-quic
authored andcommitted
BACKPORT: FROMLIST: wifi: ath12k: enable QCC2072 support
Add QCC2072's PCI device ID to the table such that it can be probed, also populate some parameters when probing. Tested-on: QCC2072 hw1.0 PCI WLAN.COL.1.0-01560-QCACOLSWPL_V1_TO_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00302-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.115823.3 Signed-off-by: Baochen Qiang <[email protected]> Link: https://lore.kernel.org/linux-wireless/20251218-ath12k-support-qcc2072-v1-19-87928cf8e547@oss.qualcomm.com/ Signed-off-by: Miaoqing Pan <[email protected]>
1 parent 2b607d8 commit 2b189c5

File tree

1 file changed

+18
-0
lines changed
  • drivers/net/wireless/ath/ath12k

1 file changed

+18
-0
lines changed

drivers/net/wireless/ath/ath12k/pci.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
#define WINDOW_ENABLE_BIT 0x40000000
2525
#define WINDOW_REG_ADDRESS 0x310c
26+
#define WINDOW_REG_ADDRESS_QCC2072 0x3278
2627
#define WINDOW_VALUE_MASK GENMASK(24, 19)
2728
#define WINDOW_START 0x80000
2829
#define WINDOW_RANGE_MASK GENMASK(18, 0)
@@ -40,13 +41,15 @@
4041

4142
#define QCN9274_DEVICE_ID 0x1109
4243
#define WCN7850_DEVICE_ID 0x1107
44+
#define QCC2072_DEVICE_ID 0x1112
4345

4446
#define DOMAIN_NUMBER_MASK GENMASK(7, 4)
4547
#define BUS_NUMBER_MASK GENMASK(3, 0)
4648

4749
static const struct pci_device_id ath12k_pci_id_table[] = {
4850
{ PCI_VDEVICE(QCOM, QCN9274_DEVICE_ID) },
4951
{ PCI_VDEVICE(QCOM, WCN7850_DEVICE_ID) },
52+
{ PCI_VDEVICE(QCOM, QCC2072_DEVICE_ID) },
5053
{}
5154
};
5255

@@ -159,6 +162,11 @@ static const struct ath12k_pci_ops ath12k_pci_ops_wcn7850 = {
159162
.release = ath12k_pci_bus_release,
160163
};
161164

165+
static const struct ath12k_pci_ops ath12k_pci_ops_qcc2027 = {
166+
.wakeup = ath12k_pci_bus_wake_up,
167+
.release = ath12k_pci_bus_release,
168+
};
169+
162170
static void ath12k_pci_select_window(struct ath12k_pci *ab_pci, u32 offset)
163171
{
164172
struct ath12k_base *ab = ab_pci->ab;
@@ -1659,6 +1667,16 @@ static int ath12k_pci_probe(struct pci_dev *pdev,
16591667
goto err_pci_free_region;
16601668
}
16611669
break;
1670+
case QCC2072_DEVICE_ID:
1671+
ab->id.bdf_search = ATH12K_BDF_SEARCH_BUS_AND_BOARD;
1672+
ab_pci->msi_config = &ath12k_msi_config[0];
1673+
ab->static_window_map = false;
1674+
ab_pci->pci_ops = &ath12k_pci_ops_qcc2027;
1675+
ab_pci->window_reg_addr = WINDOW_REG_ADDRESS_QCC2072;
1676+
ab->hal_rx_ops = &hal_rx_qcc2072_ops;
1677+
/* there is only one version till now */
1678+
ab->hw_rev = ATH12K_HW_QCC2072_HW10;
1679+
break;
16621680

16631681
default:
16641682
dev_err(&pdev->dev, "Unknown PCI device found: 0x%x\n",

0 commit comments

Comments
 (0)