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
105 lines
3.7 KiB
Diff
105 lines
3.7 KiB
Diff
--- a/drivers/net/wireless/ath/ath11k/core.c
|
|
+++ b/drivers/net/wireless/ath/ath11k/core.c
|
|
@@ -821,6 +821,7 @@ static struct ath11k_hw_params ath11k_hw
|
|
.max_radios = MAX_RADIOS_5018,
|
|
.bdf_addr = 0x4D200000,
|
|
.hal_desc_sz = sizeof(struct hal_rx_desc_qcn9074),
|
|
+ .regs = &qcn6122_regs,
|
|
.qmi_service_ins_id = ATH11K_QMI_WLFW_SERVICE_INS_ID_V01_QCN6122,
|
|
.interface_modes = BIT(NL80211_IFTYPE_STATION) |
|
|
BIT(NL80211_IFTYPE_AP) |
|
|
--- a/drivers/net/wireless/ath/ath11k/hw.c
|
|
+++ b/drivers/net/wireless/ath/ath11k/hw.c
|
|
@@ -2822,6 +2822,81 @@ const struct ath11k_hw_regs ipq5018_regs
|
|
.hal_wbm1_release_ring_base_lsb = 0x0000097c,
|
|
};
|
|
|
|
+const struct ath11k_hw_regs qcn6122_regs = {
|
|
+ /* SW2TCL(x) R0 ring configuration address */
|
|
+ .hal_tcl1_ring_base_lsb = 0x00000694,
|
|
+ .hal_tcl1_ring_base_msb = 0x00000698,
|
|
+ .hal_tcl1_ring_id = 0x0000069c,
|
|
+ .hal_tcl1_ring_misc = 0x000006a4,
|
|
+ .hal_tcl1_ring_tp_addr_lsb = 0x000006b0,
|
|
+ .hal_tcl1_ring_tp_addr_msb = 0x000006b4,
|
|
+ .hal_tcl1_ring_consumer_int_setup_ix0 = 0x000006c4,
|
|
+ .hal_tcl1_ring_consumer_int_setup_ix1 = 0x000006c8,
|
|
+ .hal_tcl1_ring_msi1_base_lsb = 0x000006dc,
|
|
+ .hal_tcl1_ring_msi1_base_msb = 0x000006e0,
|
|
+ .hal_tcl1_ring_msi1_data = 0x000006e4,
|
|
+ .hal_tcl2_ring_base_lsb = 0x000006ec,
|
|
+ .hal_tcl_ring_base_lsb = 0x0000079c,
|
|
+
|
|
+ /* TCL STATUS ring address */
|
|
+ .hal_tcl_status_ring_base_lsb = 0x000008a4,
|
|
+
|
|
+ /* REO2SW(x) R0 ring configuration address */
|
|
+ .hal_reo1_ring_base_lsb = 0x000001ec,
|
|
+ .hal_reo1_ring_base_msb = 0x000001f0,
|
|
+ .hal_reo1_ring_id = 0x000001f4,
|
|
+ .hal_reo1_ring_misc = 0x000001fc,
|
|
+ .hal_reo1_ring_hp_addr_lsb = 0x00000200,
|
|
+ .hal_reo1_ring_hp_addr_msb = 0x00000204,
|
|
+ .hal_reo1_ring_producer_int_setup = 0x00000210,
|
|
+ .hal_reo1_ring_msi1_base_lsb = 0x00000234,
|
|
+ .hal_reo1_ring_msi1_base_msb = 0x00000238,
|
|
+ .hal_reo1_ring_msi1_data = 0x0000023c,
|
|
+ .hal_reo2_ring_base_lsb = 0x00000244,
|
|
+ .hal_reo1_aging_thresh_ix_0 = 0x00000564,
|
|
+ .hal_reo1_aging_thresh_ix_1 = 0x00000568,
|
|
+ .hal_reo1_aging_thresh_ix_2 = 0x0000056c,
|
|
+ .hal_reo1_aging_thresh_ix_3 = 0x00000570,
|
|
+
|
|
+ /* REO2SW(x) R2 ring pointers (head/tail) address */
|
|
+ .hal_reo1_ring_hp = 0x00003028,
|
|
+ .hal_reo1_ring_tp = 0x0000302c,
|
|
+ .hal_reo2_ring_hp = 0x00003030,
|
|
+
|
|
+ /* REO2TCL R0 ring configuration address */
|
|
+ .hal_reo_tcl_ring_base_lsb = 0x000003fc,
|
|
+ .hal_reo_tcl_ring_hp = 0x00003058,
|
|
+
|
|
+ /* SW2REO ring address */
|
|
+ .hal_sw2reo_ring_base_lsb = 0x0000013c,
|
|
+ .hal_sw2reo_ring_hp = 0x00003018,
|
|
+
|
|
+ /* REO CMD ring address */
|
|
+ .hal_reo_cmd_ring_base_lsb = 0x000000e4,
|
|
+ .hal_reo_cmd_ring_hp = 0x00003010,
|
|
+
|
|
+ /* REO status address */
|
|
+ .hal_reo_status_ring_base_lsb = 0x00000504,
|
|
+ .hal_reo_status_hp = 0x00003070,
|
|
+
|
|
+ /* WCSS relative address */
|
|
+ .hal_seq_wcss_umac_ce0_src_reg = 0x03B80000,
|
|
+ .hal_seq_wcss_umac_ce0_dst_reg = 0x03b81000,
|
|
+ .hal_seq_wcss_umac_ce1_src_reg = 0x03b82000,
|
|
+ .hal_seq_wcss_umac_ce1_dst_reg = 0x03b83000,
|
|
+
|
|
+ /* WBM Idle address */
|
|
+ .hal_wbm_idle_link_ring_base_lsb = 0x00000874,
|
|
+ .hal_wbm_idle_link_ring_misc = 0x00000884,
|
|
+
|
|
+ /* SW2WBM release address */
|
|
+ .hal_wbm_release_ring_base_lsb = 0x000001ec,
|
|
+
|
|
+ /* WBM2SW release address */
|
|
+ .hal_wbm0_release_ring_base_lsb = 0x00000924,
|
|
+ .hal_wbm1_release_ring_base_lsb = 0x0000097c,
|
|
+};
|
|
+
|
|
const struct ath11k_hw_hal_params ath11k_hw_hal_params_ipq8074 = {
|
|
.rx_buf_rbm = HAL_RX_BUF_RBM_SW3_BM,
|
|
.tcl2wbm_rbm_map = ath11k_hw_tcl2wbm_rbm_map_ipq8074,
|
|
--- a/drivers/net/wireless/ath/ath11k/hw.h
|
|
+++ b/drivers/net/wireless/ath/ath11k/hw.h
|
|
@@ -425,6 +425,7 @@ extern const struct ath11k_hw_regs qcn90
|
|
extern const struct ath11k_hw_regs wcn6855_regs;
|
|
extern const struct ath11k_hw_regs wcn6750_regs;
|
|
extern const struct ath11k_hw_regs ipq5018_regs;
|
|
+extern const struct ath11k_hw_regs qcn6122_regs;
|
|
|
|
static inline const char *ath11k_bd_ie_type_str(enum ath11k_bd_ie_type type)
|
|
{
|