]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: ath12k: fix PCIE_LOCAL_REG_QRTR_NODE_ID definition for QCC2072
authorMiaoqing Pan <miaoqing.pan@oss.qualcomm.com>
Mon, 12 Jan 2026 07:36:37 +0000 (15:36 +0800)
committerJeff Johnson <jeff.johnson@oss.qualcomm.com>
Fri, 16 Jan 2026 01:19:42 +0000 (17:19 -0800)
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>
drivers/net/wireless/ath/ath12k/hal.h
drivers/net/wireless/ath/ath12k/pci.c
drivers/net/wireless/ath/ath12k/pci.h
drivers/net/wireless/ath/ath12k/wifi7/hal_qcc2072.c
drivers/net/wireless/ath/ath12k/wifi7/hal_qcn9274.c
drivers/net/wireless/ath/ath12k/wifi7/hal_wcn7850.c

index 520587305dfa628b5c40c093a33f60b5a6a675ee..43e3880f8257986534d879376ffcab3fbb59cfd4 100644 (file)
@@ -1201,6 +1201,8 @@ struct ath12k_hw_regs {
        u32 reo_status_ring_base;
 
        u32 gcc_gcc_pcie_hot_rst;
+
+       u32 qrtr_node_id;
 };
 
 /* HAL context to be used to access SRNG APIs (currently used by data path
index 69579e59b5563a8aed0b8f92dafca9bbf6430656..375277ca2b89214fae0bae30c913ed6bdeb4114b 100644 (file)
  */
 #define ACCESS_ALWAYS_OFF 0xFE0
 
-#define PCIE_LOCAL_REG_QRTR_NODE_ID    0x1E03164
-#define DOMAIN_NUMBER_MASK             GENMASK(7, 4)
-#define BUS_NUMBER_MASK                        GENMASK(3, 0)
-
 static struct ath12k_pci_driver *ath12k_pci_family_drivers[ATH12K_DEVICE_FAMILY_MAX];
 static const struct ath12k_msi_config msi_config_one_msi = {
        .total_vectors = 1,
@@ -918,7 +914,7 @@ static void ath12k_pci_update_qrtr_node_id(struct ath12k_base *ab)
         * writes to the given register, it is available for firmware when the QMI service
         * is spawned.
         */
-       reg = PCIE_LOCAL_REG_QRTR_NODE_ID & WINDOW_RANGE_MASK;
+       reg = PCIE_LOCAL_REG_QRTR_NODE_ID(ab) & WINDOW_RANGE_MASK;
        ath12k_pci_write32(ab, reg, ab_pci->qmi_instance);
 
        ath12k_dbg(ab, ATH12K_DBG_PCI, "pci reg 0x%x instance 0x%x read val 0x%x\n",
index a74b09d23a6a10343e88224774a563ec9082fdd0..0e0e2020c6ae58fef4386d56fc0b71c7ec406a59 100644 (file)
 #define QCN9274_QFPROM_RAW_RFA_PDET_ROW13_LSB  0x1E20338
 #define OTP_BOARD_ID_MASK                      GENMASK(15, 0)
 
+#define PCIE_LOCAL_REG_QRTR_NODE_ID(ab) \
+       ((ab)->hal.regs->qrtr_node_id)
+#define DOMAIN_NUMBER_MASK                     GENMASK(7, 4)
+#define BUS_NUMBER_MASK                                GENMASK(3, 0)
+
 #define PCI_BAR_WINDOW0_BASE   0x1E00000
 #define PCI_BAR_WINDOW0_END    0x1E7FFFC
 #define PCI_SOC_RANGE_MASK     0x3FFF
index ee2427fadfc141c328d733443e63b5e8112105e2..1eefb931a853ee3f934a9d96eb01264ec19363f0 100644 (file)
@@ -92,6 +92,8 @@ const struct ath12k_hw_regs qcc2072_regs = {
        .umac_ce1_dest_reg_base = 0x01b83000,
 
        .gcc_gcc_pcie_hot_rst = 0x1e65304,
+
+       .qrtr_node_id = 0x1e03300,
 };
 
 static void ath12k_hal_rx_desc_set_msdu_len_qcc2072(struct hal_rx_desc *desc, u16 len)
index 95850e6dc6c7214bedd979a655c0cf5eb220e8ac..41c918eb17673ed64e62dc272f10a7441aa9bbc5 100644 (file)
@@ -297,6 +297,8 @@ const struct ath12k_hw_regs qcn9274_v1_regs = {
        .umac_ce1_dest_reg_base = 0x01b83000,
 
        .gcc_gcc_pcie_hot_rst = 0x1e38338,
+
+       .qrtr_node_id = 0x1e03164,
 };
 
 const struct ath12k_hw_regs qcn9274_v2_regs = {
@@ -390,6 +392,8 @@ const struct ath12k_hw_regs qcn9274_v2_regs = {
        .umac_ce1_dest_reg_base = 0x01b83000,
 
        .gcc_gcc_pcie_hot_rst = 0x1e38338,
+
+       .qrtr_node_id = 0x1e03164,
 };
 
 const struct ath12k_hw_regs ipq5332_regs = {
index 88f51a3828aac64550ec8f0c60f651f084adbca9..e64e512cac7df4bbcae1626a3fe9e8c5529d5991 100644 (file)
@@ -256,6 +256,8 @@ const struct ath12k_hw_regs wcn7850_regs = {
        .umac_ce1_dest_reg_base = 0x01b83000,
 
        .gcc_gcc_pcie_hot_rst = 0x1e40304,
+
+       .qrtr_node_id = 0x1e03164,
 };
 
 static inline