Skip to content

Commit 753d743

Browse files
miaoqing-quicHangtian Zhu
authored andcommitted
UPSTREAM: wifi: ath12k: fix PCIE_LOCAL_REG_QRTR_NODE_ID definition for QCC2072
The definition of PCIE_LOCAL_REG_QRTR_NODE_ID in QCC2072 is incorrect, which causes the QMI connection to fail when ATH12K_FW_FEATURE_MULTI_QRTR_ID is enabled. To resolve this issue, move it to the hardware register table. Note IPQ5332 is not affected as it is not PCIe based device. Tested-on: QCC2072 hw1.0 PCI CI_WLAN.COL.1.0-01668.1-QCACOLSWPL_V1_TO_SILICONZ-9 Signed-off-by: Miaoqing Pan <miaoqing.pan@oss.qualcomm.com> Signed-off-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com> Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com> Link: https://patch.msgid.link/20260112-ath12k-support-qcc2072-v2-17-fc8ce1e43969@oss.qualcomm.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
1 parent 78deb27 commit 753d743

6 files changed

Lines changed: 16 additions & 5 deletions

File tree

drivers/net/wireless/ath/ath12k/hal.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1201,6 +1201,8 @@ struct ath12k_hw_regs {
12011201
u32 reo_status_ring_base;
12021202

12031203
u32 gcc_gcc_pcie_hot_rst;
1204+
1205+
u32 qrtr_node_id;
12041206
};
12051207

12061208
/* HAL context to be used to access SRNG APIs (currently used by data path

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,6 @@
3434
*/
3535
#define ACCESS_ALWAYS_OFF 0xFE0
3636

37-
#define PCIE_LOCAL_REG_QRTR_NODE_ID 0x1E03164
38-
#define DOMAIN_NUMBER_MASK GENMASK(7, 4)
39-
#define BUS_NUMBER_MASK GENMASK(3, 0)
40-
4137
static struct ath12k_pci_driver *ath12k_pci_family_drivers[ATH12K_DEVICE_FAMILY_MAX];
4238
static const struct ath12k_msi_config msi_config_one_msi = {
4339
.total_vectors = 1,
@@ -918,7 +914,7 @@ static void ath12k_pci_update_qrtr_node_id(struct ath12k_base *ab)
918914
* writes to the given register, it is available for firmware when the QMI service
919915
* is spawned.
920916
*/
921-
reg = PCIE_LOCAL_REG_QRTR_NODE_ID & WINDOW_RANGE_MASK;
917+
reg = PCIE_LOCAL_REG_QRTR_NODE_ID(ab) & WINDOW_RANGE_MASK;
922918
ath12k_pci_write32(ab, reg, ab_pci->qmi_instance);
923919

924920
ath12k_dbg(ab, ATH12K_DBG_PCI, "pci reg 0x%x instance 0x%x read val 0x%x\n",

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@
5959
#define QCN9274_QFPROM_RAW_RFA_PDET_ROW13_LSB 0x1E20338
6060
#define OTP_BOARD_ID_MASK GENMASK(15, 0)
6161

62+
#define PCIE_LOCAL_REG_QRTR_NODE_ID(ab) \
63+
((ab)->hal.regs->qrtr_node_id)
64+
#define DOMAIN_NUMBER_MASK GENMASK(7, 4)
65+
#define BUS_NUMBER_MASK GENMASK(3, 0)
66+
6267
#define PCI_BAR_WINDOW0_BASE 0x1E00000
6368
#define PCI_BAR_WINDOW0_END 0x1E7FFFC
6469
#define PCI_SOC_RANGE_MASK 0x3FFF

drivers/net/wireless/ath/ath12k/wifi7/hal_qcc2072.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ const struct ath12k_hw_regs qcc2072_regs = {
9292
.umac_ce1_dest_reg_base = 0x01b83000,
9393

9494
.gcc_gcc_pcie_hot_rst = 0x1e65304,
95+
96+
.qrtr_node_id = 0x1e03300,
9597
};
9698

9799
static void ath12k_hal_rx_desc_set_msdu_len_qcc2072(struct hal_rx_desc *desc, u16 len)

drivers/net/wireless/ath/ath12k/wifi7/hal_qcn9274.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,8 @@ const struct ath12k_hw_regs qcn9274_v1_regs = {
297297
.umac_ce1_dest_reg_base = 0x01b83000,
298298

299299
.gcc_gcc_pcie_hot_rst = 0x1e38338,
300+
301+
.qrtr_node_id = 0x1e03164,
300302
};
301303

302304
const struct ath12k_hw_regs qcn9274_v2_regs = {
@@ -390,6 +392,8 @@ const struct ath12k_hw_regs qcn9274_v2_regs = {
390392
.umac_ce1_dest_reg_base = 0x01b83000,
391393

392394
.gcc_gcc_pcie_hot_rst = 0x1e38338,
395+
396+
.qrtr_node_id = 0x1e03164,
393397
};
394398

395399
const struct ath12k_hw_regs ipq5332_regs = {

drivers/net/wireless/ath/ath12k/wifi7/hal_wcn7850.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,8 @@ const struct ath12k_hw_regs wcn7850_regs = {
256256
.umac_ce1_dest_reg_base = 0x01b83000,
257257

258258
.gcc_gcc_pcie_hot_rst = 0x1e40304,
259+
260+
.qrtr_node_id = 0x1e03164,
259261
};
260262

261263
static inline

0 commit comments

Comments
 (0)