ath11k: Add support for QCN9074
cover ath11k: Add support for QCN9074
QCN9074 has PCI bus interface and shares QCA6390
configuration.
QCN9074 uses 45MB of host ddr memory.
FW requests the memory in segments of 2MB size and each 2MB segment should be physically contiguous.
FW boot over MHI is verified.
BDF/M3 download over QMI is verified.
Below QMI issues are seen with QCN9074,
Issue 1:
ath11k_pci 0000:06:00.0: qmi failed memory request, err = -110 ath11k_pci 0000:06:00.0: qmi failed to respond fw mem req:-110
Issue 2:
ath11k_pci 0000:06:00.0: firmware crashed: MHI_CB_SYS_ERROR ath11k_pci 0000:06:00.0: qmi failed set mode request, mode: 0, err = -110 ath11k_pci 0000:06:00.0: qmi failed to send wlan fw mode:-110
QCN9074 uses,
- 16-MSI interrupts, 3 for MHI, 5 for CE and 8 for DP
- CE count is six
- CE register address, WBM idle link ring address, WBM release ring address are different
- TCL ring descriptors, HAL Rx descriptors are different, so introduced platform specific hal rx descriptor access ops in ath11k_hw_ops
Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.4.0.1.r2-00012-QCAHKSWPL_SILICONZ-1
Anilkumar Kolli (6):
ath11k: Refactor ath11k_msi_config
ath11k: Move qmi service_ins_id to hw_params
ath11k: qmi: increase the number of fw segments
ath11k: Update memory segment count for qcn9074
ath11k: Add qcn9074 mhi controller config
ath11k: add qcn9074 pci device support
Karthikeyan Periyasamy (5):
ath11k: add static window support for register access
ath11k: add hal support for QCN9074
ath11k: add data path support for QCN9074
ath11k: add CE interrupt support for QCN9074
ath11k: add extended interrupt support for QCN9074
drivers/net/wireless/ath/ath11k/ahb.c | 2 +- drivers/net/wireless/ath/ath11k/ce.c | 58 ++- drivers/net/wireless/ath/ath11k/ce.h | 1 + drivers/net/wireless/ath/ath11k/core.c | 43 ++ drivers/net/wireless/ath/ath11k/core.h | 4 + drivers/net/wireless/ath/ath11k/dp_rx.c | 476 +++++++++-------- drivers/net/wireless/ath/ath11k/dp_tx.c | 6 +- drivers/net/wireless/ath/ath11k/hal.c | 88 ++-- drivers/net/wireless/ath/ath11k/hal.h | 33 +- drivers/net/wireless/ath/ath11k/hal_desc.h | 13 +- drivers/net/wireless/ath/ath11k/hal_tx.c | 3 + drivers/net/wireless/ath/ath11k/hal_tx.h | 1 + drivers/net/wireless/ath/ath11k/hif.h | 10 + drivers/net/wireless/ath/ath11k/hw.c | 796 +++++++++++++++++++++++++++++ drivers/net/wireless/ath/ath11k/hw.h | 53 ++ drivers/net/wireless/ath/ath11k/mhi.c | 116 ++++- drivers/net/wireless/ath/ath11k/pci.c | 196 +++++-- drivers/net/wireless/ath/ath11k/pci.h | 21 +- drivers/net/wireless/ath/ath11k/qmi.c | 2 +- drivers/net/wireless/ath/ath11k/qmi.h | 9 +- drivers/net/wireless/ath/ath11k/rx_desc.h | 212 +++++++- 21 files changed, 1765 insertions(+), 378 deletions(-)
Signature · 7 lines
2.7.4 -- ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k
PATCH 1/11 ath11k: Refactor ath11k_msi_config
Move ath11k_msi_config to array of structures to add multiple pci devices support. No functional changes.
Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.4.0.1.r2-00012-QCAHKSWPL_SILICONZ-1
--- drivers/net/wireless/ath/ath11k/pci.c | 39 ++++++++++++++++++++--------------- drivers/net/wireless/ath/ath11k/pci.h | 1 + 2 files changed, 23 insertions(+), 17 deletions(-)
drivers/net/wireless/ath/ath11k/pci.c +22 -17
@@ -50,14 +50,16 @@ static const struct ath11k_bus_params ath11k_pci_bus_params = { .fixed_mem_region = false, }; -static const struct ath11k_msi_config msi_config = { - .total_vectors =32 , - .total_users =4 , - .users = (struct ath11k_msi_user []) { - { .name ="MHI" , .num_vectors =3 , .base_vector =0 }, - { .name ="CE" , .num_vectors =10 , .base_vector =3 }, - { .name ="WAKE" , .num_vectors =1 , .base_vector =13 }, - { .name ="DP" , .num_vectors =18 , .base_vector =14 }, +static const struct ath11k_msi_config ath11k_msi_config[] = { + { + .total_vectors =32 , + .total_users =4 , + .users = (struct ath11k_msi_user []) { + { .name ="MHI" , .num_vectors =3 , .base_vector =0 }, + { .name ="CE" , .num_vectors =10 , .base_vector =3 }, + { .name ="WAKE" , .num_vectors =1 , .base_vector =13 }, + { .name ="DP" , .num_vectors =18 , .base_vector =14 }, + }, }, };
@@ -406,14 +408,15 @@ int ath11k_pci_get_user_msi_assignment(struct ath11k_pci *ab_pci, char *user_nam u32 *base_vector) {struct ath11k_base *ab = ab_pci->ab; +const struct ath11k_msi_config *msi_config = ab_pci->msi_config;int idx; -for (idx =0 ; idx < msi_config.total_users; idx++) { -if (strcmp (user_name, msi_config.users[idx].name) ==0 ) { - *num_vectors = msi_config.users[idx].num_vectors; - *user_base_data = msi_config.users[idx].base_vector +for (idx =0 ; idx < msi_config->total_users; idx++) { +if (strcmp (user_name, msi_config->users[idx].name) ==0 ) { + *num_vectors = msi_config->users[idx].num_vectors; + *user_base_data = msi_config->users[idx].base_vector + ab_pci->msi_ep_base_data; - *base_vector = msi_config.users[idx].base_vector; + *base_vector = msi_config->users[idx].base_vector; ath11k_dbg(ab, ATH11K_DBG_PCI, "Assign MSI to user: %s, num_vectors: %d, user_base_data: %u, base_vector: %u\n", user_name, *num_vectors, *user_base_data,
@@ -760,17 +763,18 @@ static void ath11k_pci_ce_irqs_enable(struct ath11k_base *ab)static int ath11k_pci_enable_msi (struct ath11k_pci *ab_pci) {struct ath11k_base *ab = ab_pci->ab; +const struct ath11k_msi_config *msi_config = ab_pci->msi_config;struct msi_desc *msi_desc;int num_vectors;int ret; num_vectors =pci_alloc_irq_vectors (ab_pci->pdev, - msi_config.total_vectors, - msi_config.total_vectors, + msi_config->total_vectors, + msi_config->total_vectors,PCI_IRQ_MSI ); -if (num_vectors != msi_config.total_vectors) { +if (num_vectors != msi_config->total_vectors) {ath11k_err (ab,"failed to get %d MSI vectors, only %d available" , - msi_config.total_vectors, num_vectors); + msi_config->total_vectors, num_vectors);if (num_vectors >=0 )return -EINVAL ;
@@ -1140,6 +1144,7 @@ static int ath11k_pci_probe(struct pci_dev *pdev, goto err_pci_free_region; } + ab_pci->msi_config = &ath11k_msi_config[0 ]; ret =ath11k_pci_enable_msi (ab_pci);if (ret) {ath11k_err (ab,"failed to enable msi: %d\n" , ret);
drivers/net/wireless/ath/ath11k/pci.h +1 -0
@@ -73,6 +73,7 @@ struct ath11k_pci {char amss_path[100 ];u32 msi_ep_base_data;struct mhi_controller *mhi_ctrl; +const struct ath11k_msi_config *msi_config;unsigned long mhi_state;u32 register_window;
Signature · 7 lines
2.7.4 -- ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k
Re: [PATCH 01/11] ath11k: Refactor ath11k_msi_config
Quoted 7 lines · Anilkumar Kolli
Move
ath11k_msi_configto array of structures to add multiple pci devices support. No functional changes.Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.4.0.1.r2-00012-QCAHKSWPL_SILICONZ-1
Signed-off-by Anilkumar Kolli <[email protected]>Signed-off-by Kalle Valo <[email protected]>
11 patches applied to ath-next branch of ath.git, thanks.
7a3aed0c3c36 ath11k: Refactor ath11k_msi_config 16001e4b2e68 ath11k: Move qmi service_ins_id to hw_params fa5f473d7643 ath11k: qmi: increase the number of fw segments 5f67d306155e ath11k: Update memory segment count for qcn9074 a233811ef600 ath11k: Add qcn9074 mhi controller config 480a73610c95 ath11k: add static window support for register access 6fe6f68fef7f ath11k: add hal support for QCN9074 e678fbd401b9 ath11k: add data path support for QCN9074 6289ac2b7182 ath11k: add CE interrupt support for QCN9074 7dc67af063e3 ath11k: add extended interrupt support for QCN9074 4e80946197a8 ath11k: add qcn9074 pci device support
Signature · 9 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches -- ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k
Re: [PATCH 01/11] ath11k: Refactor ath11k_msi_config
In reply to Anilkumar KolliQuoted 7 lines · Anilkumar Kolli
Move
ath11k_msi_configto array of structures to add multiple pci devices support. No functional changes.Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.4.0.1.r2-00012-QCAHKSWPL_SILICONZ-1
Signed-off-by Anilkumar Kolli <[email protected]>Signed-off-by Kalle Valo <[email protected]>
11 patches applied to ath-next branch of ath.git, thanks.
7a3aed0c3c36 ath11k: Refactor ath11k_msi_config 16001e4b2e68 ath11k: Move qmi service_ins_id to hw_params fa5f473d7643 ath11k: qmi: increase the number of fw segments 5f67d306155e ath11k: Update memory segment count for qcn9074 a233811ef600 ath11k: Add qcn9074 mhi controller config 480a73610c95 ath11k: add static window support for register access 6fe6f68fef7f ath11k: add hal support for QCN9074 e678fbd401b9 ath11k: add data path support for QCN9074 6289ac2b7182 ath11k: add CE interrupt support for QCN9074 7dc67af063e3 ath11k: add extended interrupt support for QCN9074 4e80946197a8 ath11k: add qcn9074 pci device support
Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
PATCH 2/11 ath11k: Move qmi service_ins_id to hw_params
In reply to Anilkumar Kolliqmi service_ins_id is unique for QCA6390 and QCN9074, this is needed for adding QCN9074 support. No functional changes.
Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.4.0.1.r2-00012-QCAHKSWPL_SILICONZ-1
--- drivers/net/wireless/ath/ath11k/ahb.c | 2 +- drivers/net/wireless/ath/ath11k/core.c | 3 +++ drivers/net/wireless/ath/ath11k/hw.h | 1 + drivers/net/wireless/ath/ath11k/pci.c | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/ath11k/ahb.c +1 -1
@@ -373,7 +373,7 @@ static void ath11k_ahb_init_qmi_ce_config(struct ath11k_base *ab) cfg->tgt_ce = ab->hw_params.target_ce_config; cfg->svc_to_ce_map_len = ab->hw_params.svc_to_ce_map_len; cfg->svc_to_ce_map = ab->hw_params.svc_to_ce_map; - ab->qmi.service_ins_id =ATH11K_QMI_WLFW_SERVICE_INS_ID_V01_IPQ8074 ; + ab->qmi.service_ins_id = ab->hw_params.qmi_service_ins_id; }static void ath11k_ahb_free_ext_irq (struct ath11k_base *ab)
drivers/net/wireless/ath/ath11k/core.c +3 -0
@@ -45,6 +45,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .ring_mask = &ath11k_hw_ring_mask_ipq8074, .internal_sleep_clock = false, .regs = &ipq8074_regs, + .qmi_service_ins_id = ATH11K_QMI_WLFW_SERVICE_INS_ID_V01_IPQ8074, .host_ce_config = ath11k_host_ce_config_ipq8074, .ce_count = 12, .target_ce_config = ath11k_target_ce_config_wlan_ipq8074,
@@ -83,6 +84,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .ring_mask = &ath11k_hw_ring_mask_ipq8074, .internal_sleep_clock = false, .regs = &ipq8074_regs, + .qmi_service_ins_id = ATH11K_QMI_WLFW_SERVICE_INS_ID_V01_IPQ8074, .host_ce_config = ath11k_host_ce_config_ipq8074, .ce_count = 12, .target_ce_config = ath11k_target_ce_config_wlan_ipq8074,
@@ -121,6 +123,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .ring_mask = &ath11k_hw_ring_mask_qca6390, .internal_sleep_clock = true, .regs = &qca6390_regs, + .qmi_service_ins_id = ATH11K_QMI_WLFW_SERVICE_INS_ID_V01_QCA6390, .host_ce_config = ath11k_host_ce_config_qca6390, .ce_count = 9, .target_ce_config = ath11k_target_ce_config_wlan_qca6390,
drivers/net/wireless/ath/ath11k/hw.h +1 -0
@@ -134,6 +134,7 @@ struct ath11k_hw_params {bool internal_sleep_clock;const struct ath11k_hw_regs *regs; +u32 qmi_service_ins_id;const struct ce_attr *host_ce_config;u32 ce_count;const struct ce_pipe_config *target_ce_config;
drivers/net/wireless/ath/ath11k/pci.c +1 -1
@@ -743,7 +743,7 @@ static void ath11k_pci_init_qmi_ce_config(struct ath11k_base *ab) cfg->svc_to_ce_map = ab->hw_params.svc_to_ce_map; cfg->svc_to_ce_map_len = ab->hw_params.svc_to_ce_map_len; - ab->qmi.service_ins_id =ATH11K_QMI_WLFW_SERVICE_INS_ID_V01_QCA6390 ; + ab->qmi.service_ins_id = ab->hw_params.qmi_service_ins_id;ath11k_ce_get_shadow_config (ab, &cfg->shadow_reg_v2, &cfg->shadow_reg_v2_len);
Signature · 7 lines
2.7.4 -- ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k
PATCH 3/11 ath11k: qmi: increase the number of fw segments
In reply to Anilkumar KolliQCN9074 firmware uses 20MB of HOST DDR memory, fw requests the memory in segmnets of size 1MB/512KB/256KB. Increase the number of fw memory segments to 52.
Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.4.0.1.r2-00012-QCAHKSWPL_SILICONZ-1
--- drivers/net/wireless/ath/ath11k/qmi.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/wireless/ath/ath11k/qmi.h +3 -3
@@ -23,7 +23,7 @@#define ATH11K_QMI_WLFW_SERVICE_INS_ID_V01_IPQ8074 0x02#define ATH11K_QMI_WLANFW_MAX_TIMESTAMP_LEN_V01 32#define ATH11K_QMI_RESP_LEN_MAX 8192 -#define ATH11K_QMI_WLANFW_MAX_NUM_MEM_SEG_V01 32 +#define ATH11K_QMI_WLANFW_MAX_NUM_MEM_SEG_V01 52#define ATH11K_QMI_CALDB_SIZE 0x480000#define ATH11K_QMI_BDF_EXT_STR_LENGTH 0x20
@@ -216,8 +216,8 @@ struct qmi_wlanfw_ind_register_resp_msg_v01 {u64 fw_status; }; -#define QMI_WLANFW_REQUEST_MEM_IND_MSG_V01_MAX_LEN 1124 -#define QMI_WLANFW_RESPOND_MEM_REQ_MSG_V01_MAX_LEN 548 +#define QMI_WLANFW_REQUEST_MEM_IND_MSG_V01_MAX_LEN 1824 +#define QMI_WLANFW_RESPOND_MEM_REQ_MSG_V01_MAX_LEN 888#define QMI_WLANFW_RESPOND_MEM_RESP_MSG_V01_MAX_LEN 7#define QMI_WLANFW_REQUEST_MEM_IND_V01 0x0035#define QMI_WLANFW_RESPOND_MEM_REQ_V01 0x0036
Signature · 7 lines
2.7.4 -- ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k
PATCH 4/11 ath11k: Update memory segment count for qcn9074
In reply to Anilkumar KolliQCN9074 FW requests three types memory segments during the boot,
qmi mem seg type 1 of size 15728640
qmi mem seg type 4 of size 3735552
qmi mem seg type 3 of size 1048576
Segment type 3 is for M3 coredump memory.
Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.4.0.1.r2-00012-QCAHKSWPL_SILICONZ-1
--- drivers/net/wireless/ath/ath11k/qmi.c | 2 +- drivers/net/wireless/ath/ath11k/qmi.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-)
drivers/net/wireless/ath/ath11k/qmi.c +1 -1
@@ -1760,7 +1760,7 @@ static int ath11k_qmi_alloc_target_mem_chunk(struct ath11k_base *ab) &chunk->paddr, GFP_KERNEL);if (!chunk->vaddr) { -if (ab->qmi.mem_seg_count <=2 ) { +if (ab->qmi.mem_seg_count <=ATH11K_QMI_FW_MEM_REQ_SEGMENT_CNT ) { ath11k_dbg(ab, ATH11K_DBG_QMI, "qmi dma allocation failed (%d B type %u), will try later with small size\n", chunk->size,
drivers/net/wireless/ath/ath11k/qmi.h +2 -0
@@ -26,6 +26,7 @@#define ATH11K_QMI_WLANFW_MAX_NUM_MEM_SEG_V01 52#define ATH11K_QMI_CALDB_SIZE 0x480000#define ATH11K_QMI_BDF_EXT_STR_LENGTH 0x20 +#define ATH11K_QMI_FW_MEM_REQ_SEGMENT_CNT 3#define QMI_WLFW_REQUEST_MEM_IND_V01 0x0035#define QMI_WLFW_FW_MEM_READY_IND_V01 0x0037
@@ -141,6 +142,7 @@ struct ath11k_qmi {#define QMI_IPQ8074_FW_MEM_MODE 0xFF#define HOST_DDR_REGION_TYPE 0x1#define BDF_MEM_REGION_TYPE 0x2 +#define M3_DUMP_REGION_TYPE 0x3#define CALDB_MEM_REGION_TYPE 0x4struct qmi_wlanfw_host_cap_req_msg_v01 {
Signature · 7 lines
2.7.4 -- ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k
PATCH 5/11 ath11k: Add qcn9074 mhi controller config
In reply to Anilkumar KolliAdd MHI config for QCN9074 also populate ath11k_hw_params for QCN9074.
Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.4.0.1.r2-00012-QCAHKSWPL_SILICONZ-1
--- drivers/net/wireless/ath/ath11k/core.c | 12 ++++ drivers/net/wireless/ath/ath11k/core.h | 1 + drivers/net/wireless/ath/ath11k/mhi.c | 116 ++++++++++++++++++++++++++++++--- drivers/net/wireless/ath/ath11k/qmi.h | 1 + 4 files changed, 122 insertions(+), 8 deletions(-)
drivers/net/wireless/ath/ath11k/core.c +12 -0
@@ -147,6 +147,18 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .cold_boot_calib = false, .supports_suspend = true, }, + { + .name = "qcn9074 hw1.0", + .hw_rev = ATH11K_HW_QCN9074_HW10, + .fw = { + .dir = "QCN9074/hw1.0", + .board_size = 256 * 1024, + .cal_size = 256 * 1024, + }, + .max_radios = 1, + .single_pdev_only = false, + .qmi_service_ins_id = ATH11K_QMI_WLFW_SERVICE_INS_ID_V01_QCN9074, + }, };int ath11k_core_suspend (struct ath11k_base *ab)
drivers/net/wireless/ath/ath11k/core.h +1 -0
@@ -105,6 +105,7 @@ enum ath11k_hw_rev {ATH11K_HW_IPQ8074 ,ATH11K_HW_QCA6390_HW20 ,ATH11K_HW_IPQ6018_HW10 , + ATH11K_HW_QCN9074_HW10, }; enum ath11k_firmware_mode {
drivers/net/wireless/ath/ath11k/mhi.c +108 -8
153 lines not on this page · raw message
drivers/net/wireless/ath/ath11k/qmi.h +1 -0
@@ -21,6 +21,7 @@#define ATH11K_QMI_WLFW_SERVICE_INS_ID_V01 0x02#define ATH11K_QMI_WLFW_SERVICE_INS_ID_V01_QCA6390 0x01#define ATH11K_QMI_WLFW_SERVICE_INS_ID_V01_IPQ8074 0x02 +#define ATH11K_QMI_WLFW_SERVICE_INS_ID_V01_QCN9074 0x07#define ATH11K_QMI_WLANFW_MAX_TIMESTAMP_LEN_V01 32#define ATH11K_QMI_RESP_LEN_MAX 8192#define ATH11K_QMI_WLANFW_MAX_NUM_MEM_SEG_V01 52
Signature · 7 lines
2.7.4 -- ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k
PATCH 6/11 ath11k: add static window support for register access
In reply to Anilkumar KolliFrom: Karthikeyan Periyasamy <[email protected]>
Three window slots can be configure. First window slot dedicate for dynamic selection and remaining two slots dedicate for static selection. To optimise the window selection, frequent registers (UMAC, CE) are configure in static window slot. so that we minimise the window selection. Other registers are configure in dynamic window slot. Get the window start address from the respective offset and access the read/write register.
Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.4.0.1.r2-00012-QCAHKSWPL_SILICONZ-1
--- drivers/net/wireless/ath/ath11k/core.h | 1 + drivers/net/wireless/ath/ath11k/hal.h | 4 ++ drivers/net/wireless/ath/ath11k/pci.c | 72 +++++++++++++++++++++++++++++----- 3 files changed, 68 insertions(+), 9 deletions(-)
drivers/net/wireless/ath/ath11k/core.h +1 -0
@@ -608,6 +608,7 @@ struct ath11k_bus_params {bool m3_fw_support;bool fixed_bdf_addr;bool fixed_mem_region; +bool static_window_map; };/* IPQ8074 HW channel counters frequency value in hertz */
drivers/net/wireless/ath/ath11k/hal.h +4 -0
@@ -39,6 +39,7 @@ struct ath11k_base;#define HAL_SHADOW_REG (x) (HAL_SHADOW_BASE_ADDR + (4 * (x)))/* WCSS Relative address */ +#define HAL_SEQ_WCSS_UMAC_OFFSET 0x00a00000#define HAL_SEQ_WCSS_UMAC_REO_REG 0x00a38000#define HAL_SEQ_WCSS_UMAC_TCL_REG 0x00a44000#define HAL_SEQ_WCSS_UMAC_CE0_SRC_REG 0x00a00000
@@ -47,6 +48,9 @@ struct ath11k_base;#define HAL_SEQ_WCSS_UMAC_CE1_DST_REG 0x00a03000#define HAL_SEQ_WCSS_UMAC_WBM_REG 0x00a34000 +#define HAL_CE_WFSS_CE_REG_BASE 0x01b80000 +#define HAL_WLAON_REG_BASE 0x01f80000 +/* SW2TCL(x) R0 ring configuration address */ #define HAL_TCL1_RING_CMN_CTRL_REG 0x00000014#define HAL_TCL1_RING_DSCP_TID_MAP 0x0000002c
drivers/net/wireless/ath/ath11k/pci.c +63 -9
105 lines not on this page · raw message
Signature · 7 lines
2.7.4 -- ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k
Re: [PATCH 06/11] ath11k: add static window support for register access
Quoted 11 lines · Anilkumar Kolli
From: Karthikeyan Periyasamy <[email protected]>
Three window slots can be configure. First window slot dedicate for dynamic selection and remaining two slots dedicate for static selection. To optimise the window selection, frequent registers (UMAC, CE) are configure in static window slot. so that we minimise the window selection. Other registers are configure in dynamic window slot. Get the window start address from the respective offset and access the read/write register.
Quoted 3 lines
Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.4.0.1.r2-00012-QCAHKSWPL_SILICONZ-1
Signed-off-by Karthikeyan Periyasamy <[email protected]>
Patches 6-10 are missing Anil's s-o-b. Anil, can I add them? If you agree, please reply to this mail and include your s-o-b in the reply.
Signature · 8 lines
https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches -- ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k
Re: [PATCH 06/11] ath11k: add static window support for register access
Quoted 13 lines · Kalle Valo
Quoted 11 lines · Anilkumar Kolli
From: Karthikeyan Periyasamy <[email protected]>
Three window slots can be configure. First window slot dedicate for dynamic selection and remaining two slots dedicate for static selection. To optimise the window selection, frequent registers (UMAC, CE) are configure in static window slot. so that we minimise the window selection. Other registers are configure in dynamic window slot. Get the window start address from the respective offset and access the read/write register.
Quoted 6 lines
Quoted 3 lines
Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.4.0.1.r2-00012-QCAHKSWPL_SILICONZ-1
Signed-off-by Karthikeyan Periyasamy <[email protected]>Patches 6-10 are missing Anil's s-o-b. Anil, can I add them? If you agree, please reply to this mail and include your s-o-b in the reply.
Sure Kalle, please add my s-o-b.
Thanks
Anil
Signature · 3 lines
ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k
Re: [PATCH 06/11] ath11k: add static window support for register access
Quoted 17 lines · [email protected] writes:
Quoted 16 lines · Kalle Valo
Quoted 14 lines · Anilkumar Kolli
From: Karthikeyan Periyasamy <[email protected]>
Three window slots can be configure. First window slot dedicate for dynamic selection and remaining two slots dedicate for static selection. To optimise the window selection, frequent registers (UMAC, CE) are configure in static window slot. so that we minimise the window selection. Other registers are configure in dynamic window slot. Get the window start address from the respective offset and access the read/write register.
Tested-on: QCN9074 hw1.0 PCI
WLAN.HK.2.4.0.1.r2-00012-QCAHKSWPL_SILICONZ-1
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
Signed-off-by Karthikeyan Periyasamy <[email protected]>Patches 6-10 are missing Anil's s-o-b. Anil, can I add them? If you agree, please reply to this mail and include your s-o-b in the reply.
Sure Kalle, please add my s-o-b.
Signed-off-by Anilkumar Kolli <[email protected]>
Thanks, added them now.
Signature · 8 lines
https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches -- ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k
Re: [PATCH 06/11] ath11k: add static window support for register access
In reply to Anilkumar KolliHello,
I was trying to read values of timers from some offsets on the QCN9074, but I get every time an invalid values (0xffffffff):
This is example of my code:
#define QCN9000_WLAON_GLOBAL_COUNTER_CTRL3 0x1F80118 #define QCN9000_WLAON_GLOBAL_COUNTER_CTRL4 0x1F8011C #define QCN9000_WLAON_GLOBAL_COUNTER_CTRL5 0x1F80120
#define QCN9000_TIME_SYNC_ENABLE 0x80000000
#define QCN9000_TIME_SYNC_CLEAR 0x0
.
.
.ath11k_pci_write32(ab, QCN9000_WLAON_GLOBAL_COUNTER_CTRL5, QCN9000_TIME_SYNC_CLEAR); ath11k_pci_write32(ab, QCN9000_WLAON_GLOBAL_COUNTER_CTRL5, QCN9000_TIME_SYNC_ENABLE); low = ath11k_pci_read32(ab, QCN9000_WLAON_GLOBAL_COUNTER_CTRL3);
high = ath11k_pci_read32(ab, QCN9000_WLAON_GLOBAL_COUNTER_CTRL4);
.
.
The low and the high parameters always equal to "0xffffffff".
When I made some debugging. I found that the issue is related to "static_window_map" developed in the commit "480a73610c95511e42fb7d0359b523f66883e51a: ath11k: add static window support for register access" and enabled for QCN9074 in this commit "4e80946197a83a6115e308334618449b77696d6a: ath11k: add qcn9074 pci device support". When I disabled the "static_window_map" (ab->bus_params.static_window_map = false;) for QCN9074, in that case I was able to get the correct values.
So it seems that there's an issue of reading some reg when static_window_map is enabled.
I need your help to solve this issue.
Regards,
Issam
RE: [PATCH 06/11] ath11k: add static window support for register access
Hi Hamdi Issam,
Timer values are falls under the first window slot (dynamic window selection). It is equivalent to the “static map false” case only. It should work since you agreed that it is working when disabled “static_window_map” in hw params.
Based on the analysis in the base patch “[PATCH 06/11] ath11k: add static window support for register access”, it should work. Latest code is modified on the pci_read/write code flow. Are you facing issue in the latest code base ?
Thanks,
Karthikeyan
Quoted 54 lines
-----Original Message-----
From: Hamdi Issam <[email protected]>
Sent: Monday, March 28, 2022 10:14 PM
To: [email protected]
Cc: [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH 06/11] ath11k: add static window support for register accessWARNING: This email originated from outside of Qualcomm. Please be wary of any links or attachments, and do not enable macros.
Hello,
I was trying to read values of timers from some offsets on the QCN9074, but I get every time an invalid values (
0xffffffff):
This is example of my code:#define QCN9000_WLAON_GLOBAL_COUNTER_CTRL3 0x1F80118 #define QCN9000_WLAON_GLOBAL_COUNTER_CTRL4 0x1F8011C #define QCN9000_WLAON_GLOBAL_COUNTER_CTRL5 0x1F80120#define
QCN9000_TIME_SYNC_ENABLE0x80000000
#defineQCN9000_TIME_SYNC_CLEAR0x0
.
.
.ath11k_pci_write32(ab, QCN9000_WLAON_GLOBAL_COUNTER_CTRL5, QCN9000_TIME_SYNC_CLEAR);ath11k_pci_write32(ab, QCN9000_WLAON_GLOBAL_COUNTER_CTRL5, QCN9000_TIME_SYNC_ENABLE);
low =ath11k_pci_read32(ab, QCN9000_WLAON_GLOBAL_COUNTER_CTRL3); high =ath11k_pci_read32(ab, QCN9000_WLAON_GLOBAL_COUNTER_CTRL4);
.
.The low and the high parameters always equal to "
0xffffffff".When I made some debugging. I found that the issue is related to "
static_window_map" developed in the commit "480a73610c95511e42fb7d0359b523f66883e51a: ath11k: add static window support for register access" and enabled for QCN9074 in this commit "4e80946197a83a6115e308334618449b77696d6a: ath11k: add qcn9074 pci device support".
When I disabled the "static_window_map" (ab->bus_params.static_window_map= false;) for QCN9074, in that case I was able to get the correct values.
So it seems that there's an issue of reading some reg whenstatic_window_mapis enabled.
I need your help to solve this issue.Regards,
Issam
PATCH 7/11 ath11k: add hal support for QCN9074
In reply to Anilkumar KolliFrom: Karthikeyan Periyasamy <[email protected]>
Define the hal ring address and ring meta descriptor mask for QCN9074. Move the platform specific address to the ath11k_hw_regs. Define tx_mesh_enable ops in ath11k_hw_ops since its accessing platform specific TCL descriptor.
Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.4.0.1.r2-00012-QCAHKSWPL_SILICONZ-1
--- drivers/net/wireless/ath/ath11k/core.c | 17 ++++ drivers/net/wireless/ath/ath11k/dp_tx.c | 2 +- drivers/net/wireless/ath/ath11k/hal.c | 88 +++++++----------- drivers/net/wireless/ath/ath11k/hal.h | 27 ++++-- drivers/net/wireless/ath/ath11k/hal_desc.h | 13 +-- drivers/net/wireless/ath/ath11k/hal_tx.c | 3 + drivers/net/wireless/ath/ath11k/hal_tx.h | 1 + drivers/net/wireless/ath/ath11k/hw.c | 137 +++++++++++++++++++++++++++++ drivers/net/wireless/ath/ath11k/hw.h | 22 +++++ drivers/net/wireless/ath/ath11k/pci.c | 20 ++--- drivers/net/wireless/ath/ath11k/pci.h | 20 +++-- 11 files changed, 261 insertions(+), 89 deletions(-)
drivers/net/wireless/ath/ath11k/core.c +17 -0
@@ -158,6 +158,23 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .max_radios = 1, .single_pdev_only = false, .qmi_service_ins_id = ATH11K_QMI_WLFW_SERVICE_INS_ID_V01_QCN9074, + .hw_ops = &qcn9074_ops, + .internal_sleep_clock = false, + .regs = &qcn9074_regs, + .rxdma1_enable = true, + .num_rxmda_per_pdev = 1, + .rx_mac_buf_ring = false, + .vdev_start_delay = false, + .htt_peer_map_v2 = true, + .tcl_0_only = false, + .interface_modes =BIT (NL80211_IFTYPE_STATION ) | +BIT (NL80211_IFTYPE_AP ) | + BIT(NL80211_IFTYPE_MESH_POINT), + .supports_monitor = true, + .supports_shadow_regs = false, + .idle_ps = false, + .cold_boot_calib = false, + .supports_suspend = false, }, };
drivers/net/wireless/ath/ath11k/dp_tx.c +1 -1
@@ -178,7 +178,7 @@ int ath11k_dp_tx(struct ath11k *ar, struct ath11k_vif *arvif, }if (ieee80211_vif_is_mesh (arvif->vif)) - ti.flags1 |=FIELD_PREP (HAL_TCL_DATA_CMD_INFO2_MESH_ENABLE ,1 ); + ti.enable_mesh = true; ti.flags1 |=FIELD_PREP (HAL_TCL_DATA_CMD_INFO2_TID_OVERWRITE ,1 );
drivers/net/wireless/ath/ath11k/hal.c +33 -55
136 lines not on this page · raw message
drivers/net/wireless/ath/ath11k/hal.h +18 -9
@@ -42,10 +42,14 @@ struct ath11k_base;#define HAL_SEQ_WCSS_UMAC_OFFSET 0x00a00000#define HAL_SEQ_WCSS_UMAC_REO_REG 0x00a38000#define HAL_SEQ_WCSS_UMAC_TCL_REG 0x00a44000 -#define HAL_SEQ_WCSS_UMAC_CE0_SRC_REG 0x00a00000 -#define HAL_SEQ_WCSS_UMAC_CE0_DST_REG 0x00a01000 -#define HAL_SEQ_WCSS_UMAC_CE1_SRC_REG 0x00a02000 -#define HAL_SEQ_WCSS_UMAC_CE1_DST_REG 0x00a03000 +#define HAL_SEQ_WCSS_UMAC_CE0_SRC_REG (x) \ + (ab->hw_params.regs->hal_seq_wcss_umac_ce0_src_reg) +#define HAL_SEQ_WCSS_UMAC_CE0_DST_REG (x) \ + (ab->hw_params.regs->hal_seq_wcss_umac_ce0_dst_reg) +#define HAL_SEQ_WCSS_UMAC_CE1_SRC_REG (x) \ + (ab->hw_params.regs->hal_seq_wcss_umac_ce1_src_reg) +#define HAL_SEQ_WCSS_UMAC_CE1_DST_REG (x) \ + (ab->hw_params.regs->hal_seq_wcss_umac_ce1_dst_reg)#define HAL_SEQ_WCSS_UMAC_WBM_REG 0x00a34000#define HAL_CE_WFSS_CE_REG_BASE 0x01b80000
@@ -201,8 +205,10 @@ struct ath11k_base;#define HAL_REO_STATUS_HP (ab) ab->hw_params.regs->hal_reo_status_hp/* WBM Idle R0 address */ -#define HAL_WBM_IDLE_LINK_RING_BASE_LSB 0x00000860 -#define HAL_WBM_IDLE_LINK_RING_MISC_ADDR 0x00000870 +#define HAL_WBM_IDLE_LINK_RING_BASE_LSB (x) \ + (ab->hw_params.regs->hal_wbm_idle_link_ring_base_lsb) +#define HAL_WBM_IDLE_LINK_RING_MISC_ADDR (x) \ + (ab->hw_params.regs->hal_wbm_idle_link_ring_misc)#define HAL_WBM_R0_IDLE_LIST_CONTROL_ADDR 0x00000048#define HAL_WBM_R0_IDLE_LIST_SIZE_ADDR 0x0000004c#define HAL_WBM_SCATTERED_RING_BASE_LSB 0x00000058
@@ -217,14 +223,17 @@ struct ath11k_base;#define HAL_WBM_IDLE_LINK_RING_HP 0x000030b0/* SW2WBM R0 release address */ -#define HAL_WBM_RELEASE_RING_BASE_LSB 0x000001d8 +#define HAL_WBM_RELEASE_RING_BASE_LSB (x) \ + (ab->hw_params.regs->hal_wbm_release_ring_base_lsb)/* SW2WBM R2 release address */ #define HAL_WBM_RELEASE_RING_HP 0x00003018/* WBM2SW R0 release address */ -#define HAL_WBM0_RELEASE_RING_BASE_LSB 0x00000910 -#define HAL_WBM1_RELEASE_RING_BASE_LSB 0x00000968 +#define HAL_WBM0_RELEASE_RING_BASE_LSB (x) \ + (ab->hw_params.regs->hal_wbm0_release_ring_base_lsb) +#define HAL_WBM1_RELEASE_RING_BASE_LSB (x) \ + (ab->hw_params.regs->hal_wbm1_release_ring_base_lsb)/* WBM2SW R2 release address */ #define HAL_WBM0_RELEASE_RING_HP 0x000030c0
drivers/net/wireless/ath/ath11k/hal_desc.h +7 -6
@@ -949,16 +949,17 @@ struct hal_reo_flush_cache {#define HAL_TCL_DATA_CMD_INFO1_TO_FW BIT(21)#define HAL_TCL_DATA_CMD_INFO1_PKT_OFFSET GENMASK(31, 23) -#define HAL_TCL_DATA_CMD_INFO2_BUF_TIMESTAMP GENMASK(18, 0) -#define HAL_TCL_DATA_CMD_INFO2_BUF_T_VALID BIT(19) -#define HAL_TCL_DATA_CMD_INFO2_MESH_ENABLE BIT(20) -#define HAL_TCL_DATA_CMD_INFO2_TID_OVERWRITE BIT(21) -#define HAL_TCL_DATA_CMD_INFO2_TID GENMASK(25, 22) -#define HAL_TCL_DATA_CMD_INFO2_LMAC_ID GENMASK(27, 26) +#define HAL_TCL_DATA_CMD_INFO2_BUF_TIMESTAMP GENMASK(18, 0) +#define HAL_TCL_DATA_CMD_INFO2_BUF_T_VALID BIT(19) +#define HAL_IPQ8074_TCL_DATA_CMD_INFO2_MESH_ENABLE BIT(20) +#define HAL_TCL_DATA_CMD_INFO2_TID_OVERWRITE BIT(21) +#define HAL_TCL_DATA_CMD_INFO2_TID GENMASK(25, 22) +#define HAL_TCL_DATA_CMD_INFO2_LMAC_ID GENMASK(27, 26)#define HAL_TCL_DATA_CMD_INFO3_DSCP_TID_TABLE_IDX GENMASK(5, 0)#define HAL_TCL_DATA_CMD_INFO3_SEARCH_INDEX GENMASK(25, 6)#define HAL_TCL_DATA_CMD_INFO3_CACHE_SET_NUM GENMASK(29, 26) +#define HAL_QCN9074_TCL_DATA_CMD_INFO3_MESH_ENABLE GENMASK(31, 30)#define HAL_TCL_DATA_CMD_INFO4_RING_ID GENMASK(27, 20)#define HAL_TCL_DATA_CMD_INFO4_LOOPING_COUNT GENMASK(31, 28)
drivers/net/wireless/ath/ath11k/hal_tx.c +3 -0
@@ -75,6 +75,9 @@ void ath11k_hal_tx_cmd_desc_setup(struct ath11k_base *ab, void *cmd,FIELD_PREP (HAL_TCL_DATA_CMD_INFO3_CACHE_SET_NUM , ti->bss_ast_hash); tcl_cmd->info4 =0 ; + +if (ti->enable_mesh && ab->hw_params.hw_ops->tx_mesh_enable) + ab->hw_params.hw_ops->tx_mesh_enable (ab, tcl_cmd); }void ath11k_hal_tx_set_dscp_tid_map (struct ath11k_base *ab,int id)
drivers/net/wireless/ath/ath11k/hal_tx.h +1 -0
@@ -34,6 +34,7 @@ struct hal_tx_info {u8 search_type;/* %HAL_TX_ADDR_SEARCH_ */ u8 lmac_id;u8 dscp_tid_tbl_idx; +bool enable_mesh; };/* TODO: Check if the actual desc macros can be used instead */
drivers/net/wireless/ath/ath11k/hw.c +137 -0
171 lines not on this page · raw message
drivers/net/wireless/ath/ath11k/hw.h +22 -0
@@ -105,6 +105,8 @@ enum ath11k_bus {#define ATH11K_EXT_IRQ_GRP_NUM_MAX 11 +struct hal_tcl_data_cmd ; +struct ath11k_hw_ring_mask {u8 tx[ATH11K_EXT_IRQ_GRP_NUM_MAX ];u8 rx_mon_status[ATH11K_EXT_IRQ_GRP_NUM_MAX ];
@@ -166,11 +168,14 @@ struct ath11k_hw_ops { struct target_resource_config *config);int (*mac_id_to_pdev_id)(struct ath11k_hw_params *hw,int mac_id);int (*mac_id_to_srng_id)(struct ath11k_hw_params *hw,int mac_id); +void (*tx_mesh_enable)(struct ath11k_base *ab, +struct hal_tcl_data_cmd *tcl_cmd); };extern const struct ath11k_hw_ops ipq8074_ops;extern const struct ath11k_hw_ops ipq6018_ops;extern const struct ath11k_hw_ops qca6390_ops; +extern const struct ath11k_hw_ops qcn9074_ops;extern const struct ath11k_hw_ring_mask ath11k_hw_ring_mask_ipq8074;extern const struct ath11k_hw_ring_mask ath11k_hw_ring_mask_qca6390;
@@ -262,9 +267,26 @@ struct ath11k_hw_regs {u32 hal_reo_status_ring_base_lsb;u32 hal_reo_status_hp; + +u32 hal_seq_wcss_umac_ce0_src_reg; +u32 hal_seq_wcss_umac_ce0_dst_reg; +u32 hal_seq_wcss_umac_ce1_src_reg; +u32 hal_seq_wcss_umac_ce1_dst_reg; + +u32 hal_wbm_idle_link_ring_base_lsb; +u32 hal_wbm_idle_link_ring_misc; + +u32 hal_wbm_release_ring_base_lsb; + +u32 hal_wbm0_release_ring_base_lsb; +u32 hal_wbm1_release_ring_base_lsb; + +u32 pcie_qserdes_sysclk_en_sel; + u32 pcie_pcs_osc_dtct_config_base; };extern const struct ath11k_hw_regs ipq8074_regs;extern const struct ath11k_hw_regs qca6390_regs; +extern const struct ath11k_hw_regs qcn9074_regs;#endif
drivers/net/wireless/ath/ath11k/pci.c +10 -10
@@ -324,7 +324,7 @@ static int ath11k_pci_fix_l1ss(struct ath11k_base *ab)int ret; ret =ath11k_pci_set_link_reg (ab, -PCIE_QSERDES_COM_SYSCLK_EN_SEL_REG , +PCIE_QSERDES_COM_SYSCLK_EN_SEL_REG (ab),PCIE_QSERDES_COM_SYSCLK_EN_SEL_VAL ,PCIE_QSERDES_COM_SYSCLK_EN_SEL_MSK );if (ret) {
@@ -333,27 +333,27 @@ static int ath11k_pci_fix_l1ss(struct ath11k_base *ab) } ret =ath11k_pci_set_link_reg (ab, -PCIE_USB3_PCS_MISC_OSC_DTCT_CONFIG1_REG , -PCIE_USB3_PCS_MISC_OSC_DTCT_CONFIG1_VAL , -PCIE_USB3_PCS_MISC_OSC_DTCT_CONFIG_MSK ); +PCIE_PCS_OSC_DTCT_CONFIG1_REG (ab), +PCIE_PCS_OSC_DTCT_CONFIG1_VAL , +PCIE_PCS_OSC_DTCT_CONFIG_MSK );if (ret) {ath11k_warn (ab,"failed to set dtct config1 error: %d\n" , ret);return ret; } ret =ath11k_pci_set_link_reg (ab, -PCIE_USB3_PCS_MISC_OSC_DTCT_CONFIG2_REG , -PCIE_USB3_PCS_MISC_OSC_DTCT_CONFIG2_VAL , -PCIE_USB3_PCS_MISC_OSC_DTCT_CONFIG_MSK ); +PCIE_PCS_OSC_DTCT_CONFIG2_REG (ab), +PCIE_PCS_OSC_DTCT_CONFIG2_VAL , +PCIE_PCS_OSC_DTCT_CONFIG_MSK );if (ret) {ath11k_warn (ab,"failed to set dtct config2: %d\n" , ret);return ret; } ret =ath11k_pci_set_link_reg (ab, -PCIE_USB3_PCS_MISC_OSC_DTCT_CONFIG4_REG , -PCIE_USB3_PCS_MISC_OSC_DTCT_CONFIG4_VAL , -PCIE_USB3_PCS_MISC_OSC_DTCT_CONFIG_MSK ); +PCIE_PCS_OSC_DTCT_CONFIG4_REG (ab), +PCIE_PCS_OSC_DTCT_CONFIG4_VAL , +PCIE_PCS_OSC_DTCT_CONFIG_MSK );if (ret) {ath11k_warn (ab,"failed to set dtct config4: %d\n" , ret);return ret;
drivers/net/wireless/ath/ath11k/pci.h +12 -8
@@ -34,16 +34,20 @@#define PCIE_SMLH_REQ_RST_LINK_DOWN 0x2#define PCIE_INT_CLEAR_ALL 0xffffffff -#define PCIE_QSERDES_COM_SYSCLK_EN_SEL_REG 0x01e0c0ac +#define PCIE_QSERDES_COM_SYSCLK_EN_SEL_REG (x) \ + (ab->hw_params.regs->pcie_qserdes_sysclk_en_sel)#define PCIE_QSERDES_COM_SYSCLK_EN_SEL_VAL 0x10#define PCIE_QSERDES_COM_SYSCLK_EN_SEL_MSK 0xffffffff -#define PCIE_USB3_PCS_MISC_OSC_DTCT_CONFIG1_REG 0x01e0c628 -#define PCIE_USB3_PCS_MISC_OSC_DTCT_CONFIG1_VAL 0x02 -#define PCIE_USB3_PCS_MISC_OSC_DTCT_CONFIG2_REG 0x01e0c62c -#define PCIE_USB3_PCS_MISC_OSC_DTCT_CONFIG2_VAL 0x52 -#define PCIE_USB3_PCS_MISC_OSC_DTCT_CONFIG4_REG 0x01e0c634 -#define PCIE_USB3_PCS_MISC_OSC_DTCT_CONFIG4_VAL 0xff -#define PCIE_USB3_PCS_MISC_OSC_DTCT_CONFIG_MSK 0x000000ff +#define PCIE_PCS_OSC_DTCT_CONFIG1_REG (x) \ + (ab->hw_params.regs->pcie_pcs_osc_dtct_config_base) +#define PCIE_PCS_OSC_DTCT_CONFIG1_VAL 0x02 +#define PCIE_PCS_OSC_DTCT_CONFIG2_REG (x) \ + (ab->hw_params.regs->pcie_pcs_osc_dtct_config_base + 0x4) +#define PCIE_PCS_OSC_DTCT_CONFIG2_VAL 0x52 +#define PCIE_PCS_OSC_DTCT_CONFIG4_REG (x) \ + (ab->hw_params.regs->pcie_pcs_osc_dtct_config_base + 0xc) +#define PCIE_PCS_OSC_DTCT_CONFIG4_VAL 0xff +#define PCIE_PCS_OSC_DTCT_CONFIG_MSK 0x000000ff#define WLAON_QFPROM_PWR_CTRL_REG 0x01f8031c#define QFPROM_PWR_CTRL_VDD4BLOW_MASK 0x4
Signature · 7 lines
2.7.4 -- ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k
PATCH 8/11 ath11k: add data path support for QCN9074
In reply to Anilkumar KolliFrom: Karthikeyan Periyasamy <[email protected]>
hal rx descriptor is different for QCN9074 target type. since rx_msdu_end, rx_msdu_start, rx_mpdu_start elements are in different placement/alignment. In order to have generic data path, introduce platform specific hal rx descriptor access ops in ath11k_hw_ops.
Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.4.0.1.r2-00012-QCAHKSWPL_SILICONZ-1
--- drivers/net/wireless/ath/ath11k/core.c | 4 + drivers/net/wireless/ath/ath11k/dp_rx.c | 476 ++++++++++++++++-------------- drivers/net/wireless/ath/ath11k/hal.h | 2 - drivers/net/wireless/ath/ath11k/hal_tx.c | 2 +- drivers/net/wireless/ath/ath11k/hw.c | 424 ++++++++++++++++++++++++++ drivers/net/wireless/ath/ath11k/hw.h | 29 ++ drivers/net/wireless/ath/ath11k/pci.c | 1 + drivers/net/wireless/ath/ath11k/rx_desc.h | 212 ++++++++++++- 8 files changed, 913 insertions(+), 237 deletions(-)
drivers/net/wireless/ath/ath11k/core.c +4 -0
@@ -69,6 +69,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .idle_ps = false, .cold_boot_calib = true, .supports_suspend = false, + .hal_desc_sz = sizeof(struct hal_rx_desc_ipq8074), }, { .hw_rev = ATH11K_HW_IPQ6018_HW10,
@@ -108,6 +109,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .idle_ps = false, .cold_boot_calib = true, .supports_suspend = false, + .hal_desc_sz = sizeof(struct hal_rx_desc_ipq8074), }, { .name = "qca6390 hw2.0",
@@ -146,6 +148,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .idle_ps = true, .cold_boot_calib = false, .supports_suspend = true, + .hal_desc_sz = sizeof(struct hal_rx_desc_ipq8074), }, { .name = "qcn9074 hw1.0",
@@ -175,6 +178,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .idle_ps = false, .cold_boot_calib = false, .supports_suspend = false, + .hal_desc_sz = sizeof(struct hal_rx_desc_qcn9074), }, };
drivers/net/wireless/ath/ath11k/dp_rx.c +249 -227
1,036 lines not on this page · raw message
drivers/net/wireless/ath/ath11k/hal.h +0 -2
@@ -316,8 +316,6 @@ struct ath11k_base;#define HAL_WBM2SW_RELEASE_RING_BASE_MSB_RING_SIZE 0x000fffff#define HAL_RXDMA_RING_MAX_SIZE 0x0000ffff -#define HAL_RX_DESC_SIZE (sizeof(struct hal_rx_desc)) -/* Add any other errors here and return them in * ath11k_hal_rx_desc_get_err(). */
drivers/net/wireless/ath/ath11k/hal_tx.c +1 -1
@@ -76,7 +76,7 @@ void ath11k_hal_tx_cmd_desc_setup(struct ath11k_base *ab, void *cmd, ti->bss_ast_hash); tcl_cmd->info4 =0 ; -if (ti->enable_mesh && ab->hw_params.hw_ops->tx_mesh_enable) +if (ti->enable_mesh) ab->hw_params.hw_ops->tx_mesh_enable (ab, tcl_cmd); }
drivers/net/wireless/ath/ath11k/hw.c +424 -0
454 lines not on this page · raw message
drivers/net/wireless/ath/ath11k/hw.h +29 -0
@@ -105,6 +105,7 @@ enum ath11k_bus {#define ATH11K_EXT_IRQ_GRP_NUM_MAX 11 +struct hal_rx_desc ;struct hal_tcl_data_cmd ;struct ath11k_hw_ring_mask {
@@ -160,6 +161,7 @@ struct ath11k_hw_params {bool idle_ps;bool cold_boot_calib;bool supports_suspend; +u32 hal_desc_sz; };struct ath11k_hw_ops {
@@ -170,6 +172,33 @@ struct ath11k_hw_ops {int (*mac_id_to_srng_id)(struct ath11k_hw_params *hw,int mac_id);void (*tx_mesh_enable)(struct ath11k_base *ab,struct hal_tcl_data_cmd *tcl_cmd); +bool (*rx_desc_get_first_msdu)(struct hal_rx_desc *desc); +bool (*rx_desc_get_last_msdu)(struct hal_rx_desc *desc); +u8 (*rx_desc_get_l3_pad_bytes)(struct hal_rx_desc *desc); +u8 *(*rx_desc_get_hdr_status)(struct hal_rx_desc *desc); +bool (*rx_desc_encrypt_valid)(struct hal_rx_desc *desc); +u32 (*rx_desc_get_encrypt_type)(struct hal_rx_desc *desc); +u8 (*rx_desc_get_decap_type)(struct hal_rx_desc *desc); +u8 (*rx_desc_get_mesh_ctl)(struct hal_rx_desc *desc); +bool (*rx_desc_get_mpdu_seq_ctl_vld)(struct hal_rx_desc *desc); +bool (*rx_desc_get_mpdu_fc_valid)(struct hal_rx_desc *desc); +u16 (*rx_desc_get_mpdu_start_seq_no)(struct hal_rx_desc *desc); +u16 (*rx_desc_get_msdu_len)(struct hal_rx_desc *desc); +u8 (*rx_desc_get_msdu_sgi)(struct hal_rx_desc *desc); +u8 (*rx_desc_get_msdu_rate_mcs)(struct hal_rx_desc *desc); +u8 (*rx_desc_get_msdu_rx_bw)(struct hal_rx_desc *desc); +u32 (*rx_desc_get_msdu_freq)(struct hal_rx_desc *desc); +u8 (*rx_desc_get_msdu_pkt_type)(struct hal_rx_desc *desc); +u8 (*rx_desc_get_msdu_nss)(struct hal_rx_desc *desc); +u8 (*rx_desc_get_mpdu_tid)(struct hal_rx_desc *desc); +u16 (*rx_desc_get_mpdu_peer_id)(struct hal_rx_desc *desc); +void (*rx_desc_copy_attn_end_tlv)(struct hal_rx_desc *fdesc, +struct hal_rx_desc *ldesc); +u32 (*rx_desc_get_mpdu_start_tag)(struct hal_rx_desc *desc); +u32 (*rx_desc_get_mpdu_ppdu_id)(struct hal_rx_desc *desc); +void (*rx_desc_set_msdu_len)(struct hal_rx_desc *desc,u16 len); +struct rx_attention *(*rx_desc_get_attention)(struct hal_rx_desc *desc); +u8 *(*rx_desc_get_msdu_payload)(struct hal_rx_desc *desc); };extern const struct ath11k_hw_ops ipq8074_ops;
drivers/net/wireless/ath/ath11k/pci.c +1 -0
@@ -775,6 +775,7 @@ static int ath11k_pci_config_irq(struct ath11k_base *ab) } ab->irq_num[irq_idx] = irq; +ath11k_pci_ce_irq_disable (ab, i); }
drivers/net/wireless/ath/ath11k/rx_desc.h +205 -7
266 lines not on this page · raw message
Signature · 7 lines
2.7.4 -- ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k
PATCH 9/11 ath11k: add CE interrupt support for QCN9074
In reply to Anilkumar KolliFrom: Karthikeyan Periyasamy <[email protected]>
Define host CE configuration for QCN9074 since the max CE count is six. Available MSI interrupt is five so cannot able to map the ce_id directly for the msi_data_idx. Added get_ce_msi_idx ops in ath11k_hif_ops to get the CE MSI idx which is used to initialize the CE ring.
Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.4.0.1.r2-00012-QCAHKSWPL_SILICONZ-1
--- drivers/net/wireless/ath/ath11k/ce.c | 58 +++++++++- drivers/net/wireless/ath/ath11k/ce.h | 1 + drivers/net/wireless/ath/ath11k/core.c | 6 + drivers/net/wireless/ath/ath11k/core.h | 2 + drivers/net/wireless/ath/ath11k/hif.h | 10 ++ drivers/net/wireless/ath/ath11k/hw.c | 194 +++++++++++++++++++++++++++++++++ drivers/net/wireless/ath/ath11k/pci.c | 31 +++++- 7 files changed, 294 insertions(+), 8 deletions(-)
drivers/net/wireless/ath/ath11k/ce.c +56 -2
@@ -187,6 +187,59 @@ const struct ce_attr ath11k_host_ce_config_qca6390[] = { }; +const struct ce_attr ath11k_host_ce_config_qcn9074[] = { +/* CE0: host->target HTC control and raw streams */ + { + .flags =CE_ATTR_FLAGS , + .src_nentries =16 , + .src_sz_max =2048 , + .dest_nentries =0 , + }, + +/* CE1: target->host HTT + HTC control */ + { + .flags =CE_ATTR_FLAGS , + .src_nentries =0 , + .src_sz_max =2048 , + .dest_nentries =512 , + .recv_cb = ath11k_htc_rx_completion_handler, + }, + +/* CE2: target->host WMI */ + { + .flags =CE_ATTR_FLAGS , + .src_nentries =0 , + .src_sz_max =2048 , + .dest_nentries =32 , + .recv_cb = ath11k_htc_rx_completion_handler, + }, + +/* CE3: host->target WMI (mac0) */ + { + .flags =CE_ATTR_FLAGS , + .src_nentries =32 , + .src_sz_max =2048 , + .dest_nentries =0 , + }, + +/* CE4: host->target HTT */ + { + .flags =CE_ATTR_FLAGS |CE_ATTR_DIS_INTR , + .src_nentries =2048 , + .src_sz_max =256 , + .dest_nentries =0 , + }, + +/* CE5: target->host pktlog */ + { + .flags =CE_ATTR_FLAGS , + .src_nentries =0 , + .src_sz_max =2048 , + .dest_nentries =512 , + .recv_cb = ath11k_dp_htt_htc_t2h_msg_handler, + }, +}; +static bool ath11k_ce_need_shadow_fix (int ce_id) {/* only ce4 needs shadow workaroud*/
@@ -455,7 +508,7 @@ static void ath11k_ce_srng_msi_ring_params_setup(struct ath11k_base *ab, u32 ce_ struct hal_srng_params *ring_params) {u32 msi_data_start; -u32 msi_data_count; +u32 msi_data_count, msi_data_idx;u32 msi_irq_start;u32 addr_lo;u32 addr_hi;
@@ -469,10 +522,11 @@ static void ath11k_ce_srng_msi_ring_params_setup(struct ath11k_base *ab, u32 ce_return ;ath11k_get_msi_address (ab, &addr_lo, &addr_hi); +ath11k_get_ce_msi_idx (ab, ce_id, &msi_data_idx); ring_params->msi_addr = addr_lo; ring_params->msi_addr |= (dma_addr_t)(((uint64_t )addr_hi) <<32 ); - ring_params->msi_data = (ce_id % msi_data_count) + msi_data_start; + ring_params->msi_data = (msi_data_idx % msi_data_count) + msi_data_start; ring_params->flags |=HAL_SRNG_FLAGS_MSI_INTR ; }
drivers/net/wireless/ath/ath11k/ce.h +1 -0
@@ -173,6 +173,7 @@ struct ath11k_ce {extern const struct ce_attr ath11k_host_ce_config_ipq8074[];extern const struct ce_attr ath11k_host_ce_config_qca6390[]; +extern const struct ce_attr ath11k_host_ce_config_qcn9074[];void ath11k_ce_cleanup_pipes (struct ath11k_base *ab);void ath11k_ce_rx_replenish_retry (struct timer_list *t);
drivers/net/wireless/ath/ath11k/core.c +6 -0
@@ -164,6 +164,12 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .hw_ops = &qcn9074_ops, .internal_sleep_clock = false, .regs = &qcn9074_regs, + .host_ce_config = ath11k_host_ce_config_qcn9074, + .ce_count = 6, + .target_ce_config = ath11k_target_ce_config_wlan_qcn9074, + .target_ce_count = 9, + .svc_to_ce_map = ath11k_target_service_to_ce_map_wlan_qcn9074, + .svc_to_ce_map_len = 18, .rxdma1_enable = true, .num_rxmda_per_pdev = 1, .rx_mac_buf_ring = false,
drivers/net/wireless/ath/ath11k/core.h +2 -0
@@ -878,6 +878,8 @@ extern const struct service_to_pipe ath11k_target_service_to_ce_map_wlan_ipq6018extern const struct ce_pipe_config ath11k_target_ce_config_wlan_qca6390[];extern const struct service_to_pipe ath11k_target_service_to_ce_map_wlan_qca6390[]; +extern const struct ce_pipe_config ath11k_target_ce_config_wlan_qcn9074[]; +extern const struct service_to_pipe ath11k_target_service_to_ce_map_wlan_qcn9074[];int ath11k_core_qmi_firmware_ready (struct ath11k_base *ab);int ath11k_core_pre_init (struct ath11k_base *ab);int ath11k_core_init (struct ath11k_base *ath11k);
drivers/net/wireless/ath/ath11k/hif.h +10 -0
@@ -28,6 +28,7 @@ struct ath11k_hif_ops { u32 *msi_addr_hi);void (*ce_irq_enable)(struct ath11k_base *ab);void (*ce_irq_disable)(struct ath11k_base *ab); +void (*get_ce_msi_idx)(struct ath11k_base *ab,u32 ce_id,u32 *msi_idx); };static inline void ath11k_hif_ce_irq_enable (struct ath11k_base *ab)
@@ -124,4 +125,13 @@ static inline void ath11k_get_msi_address(struct ath11k_base *ab, u32 *msi_addr_ ab->hif.ops->get_msi_address(ab, msi_addr_lo, msi_addr_hi); } + +static inline void ath11k_get_ce_msi_idx (struct ath11k_base *ab,u32 ce_id, +u32 *msi_data_idx) +{ +if (ab->hif.ops->get_ce_msi_idx) + ab->hif.ops->get_ce_msi_idx (ab, ce_id, msi_data_idx); +else + *msi_data_idx = ce_id; +}#endif /* _HIF_H_ */
drivers/net/wireless/ath/ath11k/hw.c +194 -0
200 lines not on this page · raw message
drivers/net/wireless/ath/ath11k/pci.c +25 -6
@@ -482,6 +482,23 @@ int ath11k_pci_get_user_msi_assignment(struct ath11k_pci *ab_pci, char *user_namreturn -EINVAL ; } +static void ath11k_pci_get_ce_msi_idx (struct ath11k_base *ab,u32 ce_id, +u32 *msi_idx) +{ +u32 i, msi_data_idx; + +for (i =0 , msi_data_idx =0 ; i < ab->hw_params.ce_count; i++) { +if (ath11k_ce_get_attr_flags (ab, i) &CE_ATTR_DIS_INTR ) +continue ; + +if (ce_id == i) +break ; + + msi_data_idx++; + } + *msi_idx = msi_data_idx; +} +static int ath11k_get_user_msi_assignment (struct ath11k_base *ab,char *user_name,int *num_vectors,u32 *user_base_data,u32 *base_vector)
@@ -741,7 +758,7 @@ static int ath11k_pci_config_irq(struct ath11k_base *ab) {struct ath11k_ce_pipe *ce_pipe;u32 msi_data_start; -u32 msi_data_count; +u32 msi_data_count, msi_data_idx;u32 msi_irq_start;unsigned int msi_data;int irq, i, ret, irq_idx;
@@ -753,14 +770,14 @@ static int ath11k_pci_config_irq(struct ath11k_base *ab)return ret;/* Configure CE irqs */ -for (i =0 ; i < ab->hw_params.ce_count; i++) { - msi_data = (i % msi_data_count) + msi_irq_start; - irq =ath11k_pci_get_msi_irq (ab->dev, msi_data); - ce_pipe = &ab->ce.ce_pipe[i]; - +for (i =0 , msi_data_idx =0 ; i < ab->hw_params.ce_count; i++) {if (ath11k_ce_get_attr_flags (ab, i) &CE_ATTR_DIS_INTR )continue ; + msi_data = (msi_data_idx % msi_data_count) + msi_irq_start; + irq =ath11k_pci_get_msi_irq (ab->dev, msi_data); + ce_pipe = &ab->ce.ce_pipe[i]; + irq_idx =ATH11K_PCI_IRQ_CE0_OFFSET + i;tasklet_setup (&ce_pipe->intr_tq, ath11k_pci_ce_tasklet);
@@ -775,6 +792,7 @@ static int ath11k_pci_config_irq(struct ath11k_base *ab) } ab->irq_num[irq_idx] = irq; + msi_data_idx++;ath11k_pci_ce_irq_disable (ab, i); }
@@ -1135,6 +1153,7 @@ static const struct ath11k_hif_ops ath11k_pci_hif_ops = { .map_service_to_pipe = ath11k_pci_map_service_to_pipe, .ce_irq_enable = ath11k_pci_hif_ce_irq_enable, .ce_irq_disable = ath11k_pci_hif_ce_irq_disable, + .get_ce_msi_idx = ath11k_pci_get_ce_msi_idx, }; static int ath11k_pci_probe(struct pci_dev *pdev,
Signature · 7 lines
2.7.4 -- ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k
PATCH 10/11 ath11k: add extended interrupt support for QCN9074
In reply to Anilkumar KolliFrom: Karthikeyan Periyasamy <[email protected]>
Update the specific hw ring mask for QCN9074. Update the timestamp information while processing DP and CE interrupts.
Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.4.0.1.r2-00012-QCAHKSWPL_SILICONZ-1
--- drivers/net/wireless/ath/ath11k/core.c | 1 + drivers/net/wireless/ath/ath11k/dp_tx.c | 4 ++-- drivers/net/wireless/ath/ath11k/hw.c | 41 +++++++++++++++++++++++++++++++++ drivers/net/wireless/ath/ath11k/hw.h | 1 + drivers/net/wireless/ath/ath11k/pci.c | 13 +++++++++-- 5 files changed, 56 insertions(+), 4 deletions(-)
drivers/net/wireless/ath/ath11k/core.c +1 -0
@@ -162,6 +162,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .single_pdev_only = false, .qmi_service_ins_id = ATH11K_QMI_WLFW_SERVICE_INS_ID_V01_QCN9074, .hw_ops = &qcn9074_ops, + .ring_mask = &ath11k_hw_ring_mask_qcn9074, .internal_sleep_clock = false, .regs = &qcn9074_regs, .host_ce_config = ath11k_host_ce_config_qcn9074,
drivers/net/wireless/ath/ath11k/dp_tx.c +2 -2
@@ -792,8 +792,8 @@ int ath11k_dp_tx_htt_srng_setup(struct ath11k_base *ab, u32 ring_id, cmd->ring_tail_off32_remote_addr_hi = (u64 )tp_addr >>HAL_ADDR_MSB_REG_SHIFT ; - cmd->ring_msi_addr_lo = params.msi_addr &0xffffffff ; - cmd->ring_msi_addr_hi = ((uint64_t )(params.msi_addr) >>32 ) &0xffffffff ; + cmd->ring_msi_addr_lo =lower_32_bits (params.msi_addr); + cmd->ring_msi_addr_hi =upper_32_bits (params.msi_addr); cmd->msi_data = params.msi_data; cmd->intr_info = FIELD_PREP(
drivers/net/wireless/ath/ath11k/hw.c +41 -0
47 lines not on this page · raw message
drivers/net/wireless/ath/ath11k/hw.h +1 -0
@@ -208,6 +208,7 @@ extern const struct ath11k_hw_ops qcn9074_ops;extern const struct ath11k_hw_ring_mask ath11k_hw_ring_mask_ipq8074;extern const struct ath11k_hw_ring_mask ath11k_hw_ring_mask_qca6390; +extern const struct ath11k_hw_ring_mask ath11k_hw_ring_mask_qcn9074; static inline int ath11k_hw_get_mac_from_pdev_id(struct ath11k_hw_params *hw,
drivers/net/wireless/ath/ath11k/pci.c +11 -2
@@ -592,6 +592,9 @@ static irqreturn_t ath11k_pci_ce_interrupt_handler(int irq, void *arg) {struct ath11k_ce_pipe *ce_pipe = arg; +/* last interrupt received for this CE */ + ce_pipe->timestamp = jiffies; +ath11k_pci_ce_irq_disable (ce_pipe->ab, ce_pipe->pipe_num);tasklet_schedule (&ce_pipe->intr_tq);
@@ -686,6 +689,9 @@ static irqreturn_t ath11k_pci_ext_interrupt_handler(int irq, void *arg)ath11k_dbg (irq_grp->ab,ATH11K_DBG_PCI ,"ext irq:%d\n" , irq); +/* last interrupt received for this group */ + irq_grp->timestamp = jiffies; +ath11k_pci_ext_grp_disable (irq_grp);napi_schedule (&irq_grp->napi);
@@ -696,8 +702,9 @@ static irqreturn_t ath11k_pci_ext_interrupt_handler(int irq, void *arg)static int ath11k_pci_ext_irq_config (struct ath11k_base *ab) {int i, j, ret, num_vectors =0 ; -u32 user_base_data =0 , base_vector =0 ; +u32 user_base_data =0 , base_vector =0 , base_idx; + base_idx =ATH11K_PCI_IRQ_CE0_OFFSET +CE_COUNT_MAX ; ret = ath11k_pci_get_user_msi_assignment(ath11k_pci_priv(ab), "DP", &num_vectors, &user_base_data,
@@ -727,7 +734,7 @@ static int ath11k_pci_ext_irq_config(struct ath11k_base *ab) } irq_grp->num_irq = num_irq; - irq_grp->irqs[0 ] = base_vector + i; + irq_grp->irqs[0 ] = base_idx + i;for (j =0 ; j < irq_grp->num_irq; j++) {int irq_idx = irq_grp->irqs[j];
@@ -738,6 +745,8 @@ static int ath11k_pci_ext_irq_config(struct ath11k_base *ab)ath11k_dbg (ab,ATH11K_DBG_PCI ,"irq:%d group:%d\n" , irq, i); + +irq_set_status_flags (irq,IRQ_DISABLE_UNLAZY ); ret =request_irq (irq, ath11k_pci_ext_interrupt_handler,IRQF_SHARED ,"DP_EXT_IRQ" , irq_grp);
Signature · 7 lines
2.7.4 -- ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k
PATCH 11/11 ath11k: add qcn9074 pci device support
In reply to Anilkumar KolliQCN9074 is PCI based 11ax radio.
- has 2G/5G/6G variants.
- has NSS 2x2 and 4x4 variants.
QCN9074 uses 45MB of HOST DDR memory, target requests host memory in segments, each segment is of 2MB size and is physcial contiguous and use static window configuration.
Below QMI issues are seen with QCN9074,
Issue 1:
ath11k_pci 0000:06:00.0: qmi failed memory request, err = -110 ath11k_pci 0000:06:00.0: qmi failed to respond fw mem req:-110
Issue 2:
ath11k_pci 0000:06:00.0: firmware crashed: MHI_CB_SYS_ERROR ath11k_pci 0000:06:00.0: qmi failed set mode request, mode: 0, err = -110 ath11k_pci 0000:06:00.0: qmi failed to send wlan fw mode:-110
Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.4.0.1.r2-00012-QCAHKSWPL_SILICONZ-1
--- drivers/net/wireless/ath/ath11k/pci.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/ath11k/pci.c +18 -2
@@ -34,10 +34,12 @@*/ #define ACCESS_ALWAYS_OFF 0xFE0 -#define QCA6390_DEVICE_ID 0x1101 +#define QCA6390_DEVICE_ID 0x1101 +#define QCN9074_DEVICE_ID 0x1104static const struct pci_device_id ath11k_pci_id_table[] = { {PCI_VDEVICE (QCOM ,QCA6390_DEVICE_ID ) }, + {PCI_VDEVICE (QCOM ,QCN9074_DEVICE_ID ) }, {0 } };
@@ -61,6 +63,15 @@ static const struct ath11k_msi_config ath11k_msi_config[] = { { .name = "DP", .num_vectors = 18, .base_vector = 14 }, }, }, + { + .total_vectors = 16, + .total_users = 3, + .users = (struct ath11k_msi_user []) { + { .name ="MHI" , .num_vectors =3 , .base_vector =0 }, + { .name ="CE" , .num_vectors =5 , .base_vector =3 }, + { .name ="DP" , .num_vectors =8 , .base_vector =8 }, + }, + }, }; static const char *irq_name[ATH11K_IRQ_NUM_MAX] = {
@@ -1219,6 +1230,12 @@ static int ath11k_pci_probe(struct pci_dev *pdev, ret = -EOPNOTSUPP ; goto err_pci_free_region; } + ab_pci->msi_config = &ath11k_msi_config[0 ]; +break ; +case QCN9074_DEVICE_ID : + ab_pci->msi_config = &ath11k_msi_config[1 ]; + ab->bus_params.static_window_map = true; + ab->hw_rev =ATH11K_HW_QCN9074_HW10 ;break ;default : dev_err(&pdev->dev, "Unknown PCI device found: 0x%x\n",
@@ -1227,7 +1244,6 @@ static int ath11k_pci_probe(struct pci_dev *pdev, goto err_pci_free_region; } - ab_pci->msi_config = &ath11k_msi_config[0 ]; ret =ath11k_pci_enable_msi (ab_pci);if (ret) {ath11k_err (ab,"failed to enable msi: %d\n" , ret);
Signature · 7 lines
2.7.4 -- ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k
Re: [PATCH 11/11] ath11k: add qcn9074 pci device support
Quoted 8 lines · Anilkumar Kolli
QCN9074 is PCI based 11ax radio.
- has 2G/5G/6G variants.
- has NSS 2x2 and 4x4 variants.QCN9074 uses 45MB of HOST DDR memory, target requests host memory in segments, each segment is of 2MB size and is physcial contiguous and use static window configuration.
Quoted 8 lines
Below QMI issues are seen with QCN9074,
Issue 1:
ath11k_pci0000:06:00.0: qmi failed memory request, err = -110ath11k_pci0000:06:00.0: qmi failed to respond fw mem req:-110
Issue 2:
ath11k_pci0000:06:00.0: firmware crashed:MHI_CB_SYS_ERRORath11k_pci0000:06:00.0: qmi failed set mode request, mode: 0, err = -110ath11k_pci0000:06:00.0: qmi failed to send wlan fw mode:-110
I clarified the commit log to mention that QCN9074 is not fully working yet.
Quoted 12 lines
Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.4.0.1.r2-00012-QCAHKSWPL_SILICONZ-1
Signed-off-by Anilkumar Kolli <[email protected]>--- drivers/net/wireless/ath/ath11k/pci.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-)drivers/net/wireless/ath/ath11k/pci.c +0
-0
drivers/net/wireless/ath/ath11k/pci.c line 37
Quoted 5 lines
drivers/net/wireless/ath/ath11k/pci.c +1
-1@@ -34,10 +34,12 @@*/ #define ACCESS_ALWAYS_OFF 0xFE0 -#define QCA6390_DEVICE_ID 0x1101 +#define QCA6390_DEVICE_ID 0x1101
Here you convert tabs to spaces, I fixed them back.
drivers/net/wireless/ath/ath11k/pci.c line 38
Quoted 1 line
drivers/net/wireless/ath/ath11k/pci.c +1
-0+#define QCN9074_DEVICE_ID 0x1104
And modified this to use tabs as well.
drivers/net/wireless/ath/ath11k/pci.c line 42
Quoted 3 lines
drivers/net/wireless/ath/ath11k/pci.c +1
-0static const struct pci_device_id ath11k_pci_id_table[] = { {PCI_VDEVICE (QCOM ,QCA6390_DEVICE_ID ) }, + {PCI_VDEVICE (QCOM ,QCN9074_DEVICE_ID ) },
I removed this and added a comment instead. Let's add the pci id once the device is fully working.
Signature · 8 lines
https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches -- ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k