mirror of
https://github.com/LiBwrt-op/ipq50xx.git
synced 2025-12-16 15:01:44 +00:00
Add QCN6122 platform support. QCN6122 is a hybrid bus type device which is enumerated as a PCIe device by Q6 and enumerates as AHB device on host. It uses qgic interrupts to notify events to host driver. Used qgic api to convert MSI interrupt to qgic interrupt. Added qmi message to learn bar address from QCN6122. The patch set is refactored and based on below downstream patch: https://git.codelinaro.org/clo/qsdk/oss/system/feeds/wlan-open/-/blob/NHSS.QSDK.12.4.5.r2/mac80211/patches/232-ath11k-qcn6122-support.patch Signed-off-by: Sowmiya Sree Elavalagan <ssreeela@codeaurora.org> Signed-off-by: Ziyang Huang <hzyitc@outlook.com> Signed-off-by: George Moussalem <george.moussalem@outlook.com
116 lines
3.8 KiB
Diff
116 lines
3.8 KiB
Diff
From: Sowmiya Sree Elavalagan <ssreeela@codeaurora.org>
|
|
Date: Tue, 22 Dec 2020 20:08:37 +0530
|
|
Subject: [PATCH 1/2] ath11k: qcn6122 bring up
|
|
|
|
Add qcn6122 platform support.
|
|
qcn6122 is a hybrid bus type device which is enumerated as
|
|
pci device by Q6 and enumerates as ahb device on host.
|
|
It uses qgic interrupts to notify events to host driver.
|
|
Used qgic api to convert MSI interrupt to qgic interrupt.
|
|
Added qmi message to learn bar address from qcn6122.
|
|
Test performed:
|
|
Ran ping test for open, ccmp and tkip modes.
|
|
Ran iperf traffic for few mins.
|
|
|
|
Signed-off-by: Sowmiya Sree Elavalagan <ssreeela@codeaurora.org>
|
|
|
|
Download from https://git.codelinaro.org/clo/qsdk/oss/system/feeds/wlan-open/-/blob/NHSS.QSDK.12.4.5.r2/mac80211/patches/232-ath11k-qcn6122-support.patch
|
|
|
|
Signed-off-by: George Moussalem <george.moussalem@outlook.com>
|
|
---
|
|
|
|
--- a/drivers/net/wireless/ath/ath11k/core.c
|
|
+++ b/drivers/net/wireless/ath/ath11k/core.c
|
|
@@ -809,6 +809,66 @@ static struct ath11k_hw_params ath11k_hw
|
|
.support_fw_mac_sequence = true,
|
|
.support_dual_stations = true,
|
|
},
|
|
+ {
|
|
+ .hw_rev = ATH11K_HW_QCN6122_HW10,
|
|
+ .name = "qcn6122 hw1.0",
|
|
+ .fw = {
|
|
+ .dir = "qcn6122/hw1.0",
|
|
+ .board_size = 256 * 1024,
|
|
+ .cal_offset = 128 * 1024,
|
|
+ },
|
|
+ .hal_params = &ath11k_hw_hal_params_ipq8074,
|
|
+ .max_radios = MAX_RADIOS_5018,
|
|
+ .bdf_addr = 0x4D200000,
|
|
+ .hal_desc_sz = sizeof(struct hal_rx_desc_qcn9074),
|
|
+ .qmi_service_ins_id = ATH11K_QMI_WLFW_SERVICE_INS_ID_V01_QCN6122,
|
|
+ .interface_modes = BIT(NL80211_IFTYPE_STATION) |
|
|
+ BIT(NL80211_IFTYPE_AP) |
|
|
+ BIT(NL80211_IFTYPE_MESH_POINT),
|
|
+ .spectral = {
|
|
+ .fft_sz = 2,
|
|
+ .fft_pad_sz = 0,
|
|
+ .summary_pad_sz = 16,
|
|
+ .fft_hdr_len = 24,
|
|
+ .max_fft_bins = 1024,
|
|
+ },
|
|
+ .credit_flow = false,
|
|
+ .max_tx_ring = 1,
|
|
+ .supports_monitor = true,
|
|
+ .supports_shadow_regs = false,
|
|
+ .idle_ps = false,
|
|
+ .supports_suspend = false,
|
|
+ .host_ce_config = ath11k_host_ce_config_qcn9074,
|
|
+ .ce_count = CE_CNT_5018,
|
|
+ .target_ce_config = ath11k_target_ce_config_wlan_ipq5018,
|
|
+ .target_ce_count = TARGET_CE_CNT_5018,
|
|
+ .svc_to_ce_map = ath11k_target_service_to_ce_map_wlan_ipq5018,
|
|
+ .svc_to_ce_map_len = SVC_CE_MAP_LEN_5018,
|
|
+ .single_pdev_only = false,
|
|
+ .rxdma1_enable = true,
|
|
+ .num_rxmda_per_pdev = RXDMA_PER_PDEV_5018,
|
|
+ .rx_mac_buf_ring = false,
|
|
+ .vdev_start_delay = false,
|
|
+ .htt_peer_map_v2 = true,
|
|
+ .coldboot_cal_mm = true,
|
|
+ .coldboot_cal_ftm = true,
|
|
+ .cbcal_restart_fw = true,
|
|
+ .fix_l1ss = true,
|
|
+ .alloc_cacheable_memory = true,
|
|
+ .m3_fw_support = false,
|
|
+ .fixed_bdf_addr = true,
|
|
+ .fixed_mem_region = true,
|
|
+ .static_window_map = true,
|
|
+ .hybrid_bus_type = false,
|
|
+ .fw_mem_mode = 1,
|
|
+ .supports_sta_ps = false,
|
|
+ .dbr_debug_support = true,
|
|
+ .bios_sar_capa = NULL,
|
|
+ .fixed_fw_mem = false,
|
|
+ .support_off_channel_tx = false,
|
|
+ .tcl_ring_retry = true,
|
|
+ .tx_ring_size = DP_TCL_DATA_RING_SIZE,
|
|
+ },
|
|
};
|
|
|
|
static inline struct ath11k_pdev *ath11k_core_get_single_pdev(struct ath11k_base *ab)
|
|
--- a/drivers/net/wireless/ath/ath11k/core.h
|
|
+++ b/drivers/net/wireless/ath/ath11k/core.h
|
|
@@ -148,6 +148,7 @@ enum ath11k_hw_rev {
|
|
ATH11K_HW_WCN6750_HW10,
|
|
ATH11K_HW_IPQ5018_HW10,
|
|
ATH11K_HW_QCA2066_HW21,
|
|
+ ATH11K_HW_QCN6122_HW10,
|
|
};
|
|
|
|
enum ath11k_firmware_mode {
|
|
--- a/drivers/net/wireless/ath/ath11k/qmi.h
|
|
+++ b/drivers/net/wireless/ath/ath11k/qmi.h
|
|
@@ -22,10 +22,11 @@
|
|
#define ATH11K_QMI_WLFW_SERVICE_INS_ID_V01_IPQ8074 0x02
|
|
#define ATH11K_QMI_WLFW_SERVICE_INS_ID_V01_QCN9074 0x07
|
|
#define ATH11K_QMI_WLFW_SERVICE_INS_ID_V01_WCN6750 0x03
|
|
+#define ATH11K_QMI_WLFW_SERVICE_INS_ID_V01_QCN6122 0x40
|
|
#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
|
|
-#define ATH11K_QMI_CALDB_SIZE 0x480000
|
|
+#define ATH11K_QMI_CALDB_SIZE 0x500000
|
|
#define ATH11K_QMI_BDF_EXT_STR_LENGTH 0x20
|
|
#define ATH11K_QMI_FW_MEM_REQ_SEGMENT_CNT 5
|
|
|