xref: /linux/drivers/net/wireless/ath/ath11k/hw.c (revision 648ab4720cb76d0b5b1e49d3c0f0bdf28e22e52a)
1d547ca4cSAnilkumar Kolli // SPDX-License-Identifier: BSD-3-Clause-Clear
2d547ca4cSAnilkumar Kolli /*
3d547ca4cSAnilkumar Kolli  * Copyright (c) 2018-2020 The Linux Foundation. All rights reserved.
4d547ca4cSAnilkumar Kolli  */
5d547ca4cSAnilkumar Kolli 
66976433cSCarl Huang #include <linux/types.h>
76976433cSCarl Huang #include <linux/bitops.h>
86976433cSCarl Huang #include <linux/bitfield.h>
96976433cSCarl Huang 
10d547ca4cSAnilkumar Kolli #include "core.h"
11e3396b8bSCarl Huang #include "ce.h"
120d55b76fSBaochen Qiang #include "hif.h"
13734223d7SBaochen Qiang #include "hal.h"
14734223d7SBaochen Qiang #include "hw.h"
15d547ca4cSAnilkumar Kolli 
16d547ca4cSAnilkumar Kolli /* Map from pdev index to hw mac index */
17d547ca4cSAnilkumar Kolli static u8 ath11k_hw_ipq8074_mac_from_pdev_id(int pdev_idx)
18d547ca4cSAnilkumar Kolli {
19d547ca4cSAnilkumar Kolli 	switch (pdev_idx) {
20d547ca4cSAnilkumar Kolli 	case 0:
21d547ca4cSAnilkumar Kolli 		return 0;
22d547ca4cSAnilkumar Kolli 	case 1:
23d547ca4cSAnilkumar Kolli 		return 2;
24d547ca4cSAnilkumar Kolli 	case 2:
25d547ca4cSAnilkumar Kolli 		return 1;
26d547ca4cSAnilkumar Kolli 	default:
27d547ca4cSAnilkumar Kolli 		return ATH11K_INVALID_HW_MAC_ID;
28d547ca4cSAnilkumar Kolli 	}
29d547ca4cSAnilkumar Kolli }
30d547ca4cSAnilkumar Kolli 
31d547ca4cSAnilkumar Kolli static u8 ath11k_hw_ipq6018_mac_from_pdev_id(int pdev_idx)
32d547ca4cSAnilkumar Kolli {
33d547ca4cSAnilkumar Kolli 	return pdev_idx;
34d547ca4cSAnilkumar Kolli }
35d547ca4cSAnilkumar Kolli 
366fe6f68fSKarthikeyan Periyasamy static void ath11k_hw_ipq8074_tx_mesh_enable(struct ath11k_base *ab,
376fe6f68fSKarthikeyan Periyasamy 					     struct hal_tcl_data_cmd *tcl_cmd)
386fe6f68fSKarthikeyan Periyasamy {
396fe6f68fSKarthikeyan Periyasamy 	tcl_cmd->info2 |= FIELD_PREP(HAL_IPQ8074_TCL_DATA_CMD_INFO2_MESH_ENABLE,
406fe6f68fSKarthikeyan Periyasamy 				     true);
416fe6f68fSKarthikeyan Periyasamy }
426fe6f68fSKarthikeyan Periyasamy 
436fe6f68fSKarthikeyan Periyasamy static void ath11k_hw_qcn9074_tx_mesh_enable(struct ath11k_base *ab,
446fe6f68fSKarthikeyan Periyasamy 					     struct hal_tcl_data_cmd *tcl_cmd)
456fe6f68fSKarthikeyan Periyasamy {
466fe6f68fSKarthikeyan Periyasamy 	tcl_cmd->info3 |= FIELD_PREP(HAL_QCN9074_TCL_DATA_CMD_INFO3_MESH_ENABLE,
476fe6f68fSKarthikeyan Periyasamy 				     true);
486fe6f68fSKarthikeyan Periyasamy }
496fe6f68fSKarthikeyan Periyasamy 
50e4073430SBaochen Qiang static void ath11k_hw_wcn6855_tx_mesh_enable(struct ath11k_base *ab,
51e4073430SBaochen Qiang 					     struct hal_tcl_data_cmd *tcl_cmd)
52e4073430SBaochen Qiang {
53e4073430SBaochen Qiang 	tcl_cmd->info3 |= FIELD_PREP(HAL_QCN9074_TCL_DATA_CMD_INFO3_MESH_ENABLE,
54e4073430SBaochen Qiang 				     true);
55e4073430SBaochen Qiang }
56e4073430SBaochen Qiang 
572d4bcbedSCarl Huang static void ath11k_init_wmi_config_qca6390(struct ath11k_base *ab,
582d4bcbedSCarl Huang 					   struct target_resource_config *config)
592d4bcbedSCarl Huang {
602d4bcbedSCarl Huang 	config->num_vdevs = 4;
612d4bcbedSCarl Huang 	config->num_peers = 16;
622d4bcbedSCarl Huang 	config->num_tids = 32;
632d4bcbedSCarl Huang 
642d4bcbedSCarl Huang 	config->num_offload_peers = 3;
652d4bcbedSCarl Huang 	config->num_offload_reorder_buffs = 3;
662d4bcbedSCarl Huang 	config->num_peer_keys = TARGET_NUM_PEER_KEYS;
672d4bcbedSCarl Huang 	config->ast_skid_limit = TARGET_AST_SKID_LIMIT;
682d4bcbedSCarl Huang 	config->tx_chain_mask = (1 << ab->target_caps.num_rf_chains) - 1;
692d4bcbedSCarl Huang 	config->rx_chain_mask = (1 << ab->target_caps.num_rf_chains) - 1;
702d4bcbedSCarl Huang 	config->rx_timeout_pri[0] = TARGET_RX_TIMEOUT_LO_PRI;
712d4bcbedSCarl Huang 	config->rx_timeout_pri[1] = TARGET_RX_TIMEOUT_LO_PRI;
722d4bcbedSCarl Huang 	config->rx_timeout_pri[2] = TARGET_RX_TIMEOUT_LO_PRI;
732d4bcbedSCarl Huang 	config->rx_timeout_pri[3] = TARGET_RX_TIMEOUT_HI_PRI;
742d4bcbedSCarl Huang 	config->rx_decap_mode = TARGET_DECAP_MODE_NATIVE_WIFI;
752d4bcbedSCarl Huang 	config->scan_max_pending_req = TARGET_SCAN_MAX_PENDING_REQS;
762d4bcbedSCarl Huang 	config->bmiss_offload_max_vdev = TARGET_BMISS_OFFLOAD_MAX_VDEV;
772d4bcbedSCarl Huang 	config->roam_offload_max_vdev = TARGET_ROAM_OFFLOAD_MAX_VDEV;
782d4bcbedSCarl Huang 	config->roam_offload_max_ap_profiles = TARGET_ROAM_OFFLOAD_MAX_AP_PROFILES;
792d4bcbedSCarl Huang 	config->num_mcast_groups = 0;
802d4bcbedSCarl Huang 	config->num_mcast_table_elems = 0;
812d4bcbedSCarl Huang 	config->mcast2ucast_mode = 0;
822d4bcbedSCarl Huang 	config->tx_dbg_log_size = TARGET_TX_DBG_LOG_SIZE;
832d4bcbedSCarl Huang 	config->num_wds_entries = 0;
842d4bcbedSCarl Huang 	config->dma_burst_size = 0;
852d4bcbedSCarl Huang 	config->rx_skip_defrag_timeout_dup_detection_check = 0;
862d4bcbedSCarl Huang 	config->vow_config = TARGET_VOW_CONFIG;
872d4bcbedSCarl Huang 	config->gtk_offload_max_vdev = 2;
882d4bcbedSCarl Huang 	config->num_msdu_desc = 0x400;
892d4bcbedSCarl Huang 	config->beacon_tx_offload_max_vdev = 2;
902d4bcbedSCarl Huang 	config->rx_batchmode = TARGET_RX_BATCHMODE;
912d4bcbedSCarl Huang 
922d4bcbedSCarl Huang 	config->peer_map_unmap_v2_support = 0;
932d4bcbedSCarl Huang 	config->use_pdev_id = 1;
942d4bcbedSCarl Huang 	config->max_frag_entries = 0xa;
952d4bcbedSCarl Huang 	config->num_tdls_vdevs = 0x1;
962d4bcbedSCarl Huang 	config->num_tdls_conn_table_entries = 8;
972d4bcbedSCarl Huang 	config->beacon_tx_offload_max_vdev = 0x2;
982d4bcbedSCarl Huang 	config->num_multicast_filter_entries = 0x20;
992d4bcbedSCarl Huang 	config->num_wow_filters = 0x16;
1002d4bcbedSCarl Huang 	config->num_keep_alive_pattern = 0;
1019b4dd38bSSeevalamuthu Mariappan 	config->flag1 |= WMI_RSRC_CFG_FLAG1_BSS_CHANNEL_INFO_64;
1022d4bcbedSCarl Huang }
1032d4bcbedSCarl Huang 
1040d55b76fSBaochen Qiang static void ath11k_hw_ipq8074_reo_setup(struct ath11k_base *ab)
1050d55b76fSBaochen Qiang {
1060d55b76fSBaochen Qiang 	u32 reo_base = HAL_SEQ_WCSS_UMAC_REO_REG;
1070d55b76fSBaochen Qiang 	u32 val;
1080d55b76fSBaochen Qiang 	/* Each hash entry uses three bits to map to a particular ring. */
1090d55b76fSBaochen Qiang 	u32 ring_hash_map = HAL_HASH_ROUTING_RING_SW1 << 0 |
1100d55b76fSBaochen Qiang 		HAL_HASH_ROUTING_RING_SW2 << 3 |
1110d55b76fSBaochen Qiang 		HAL_HASH_ROUTING_RING_SW3 << 6 |
1120d55b76fSBaochen Qiang 		HAL_HASH_ROUTING_RING_SW4 << 9 |
1130d55b76fSBaochen Qiang 		HAL_HASH_ROUTING_RING_SW1 << 12 |
1140d55b76fSBaochen Qiang 		HAL_HASH_ROUTING_RING_SW2 << 15 |
1150d55b76fSBaochen Qiang 		HAL_HASH_ROUTING_RING_SW3 << 18 |
1160d55b76fSBaochen Qiang 		HAL_HASH_ROUTING_RING_SW4 << 21;
1170d55b76fSBaochen Qiang 
1180d55b76fSBaochen Qiang 	val = ath11k_hif_read32(ab, reo_base + HAL_REO1_GEN_ENABLE);
1190d55b76fSBaochen Qiang 
1200d55b76fSBaochen Qiang 	val &= ~HAL_REO1_GEN_ENABLE_FRAG_DST_RING;
1210d55b76fSBaochen Qiang 	val |= FIELD_PREP(HAL_REO1_GEN_ENABLE_FRAG_DST_RING,
1220d55b76fSBaochen Qiang 			HAL_SRNG_RING_ID_REO2SW1) |
1230d55b76fSBaochen Qiang 		FIELD_PREP(HAL_REO1_GEN_ENABLE_AGING_LIST_ENABLE, 1) |
1240d55b76fSBaochen Qiang 		FIELD_PREP(HAL_REO1_GEN_ENABLE_AGING_FLUSH_ENABLE, 1);
1250d55b76fSBaochen Qiang 	ath11k_hif_write32(ab, reo_base + HAL_REO1_GEN_ENABLE, val);
1260d55b76fSBaochen Qiang 
1270d55b76fSBaochen Qiang 	ath11k_hif_write32(ab, reo_base + HAL_REO1_AGING_THRESH_IX_0(ab),
1280d55b76fSBaochen Qiang 			   HAL_DEFAULT_REO_TIMEOUT_USEC);
1290d55b76fSBaochen Qiang 	ath11k_hif_write32(ab, reo_base + HAL_REO1_AGING_THRESH_IX_1(ab),
1300d55b76fSBaochen Qiang 			   HAL_DEFAULT_REO_TIMEOUT_USEC);
1310d55b76fSBaochen Qiang 	ath11k_hif_write32(ab, reo_base + HAL_REO1_AGING_THRESH_IX_2(ab),
1320d55b76fSBaochen Qiang 			   HAL_DEFAULT_REO_TIMEOUT_USEC);
1330d55b76fSBaochen Qiang 	ath11k_hif_write32(ab, reo_base + HAL_REO1_AGING_THRESH_IX_3(ab),
1340d55b76fSBaochen Qiang 			   HAL_DEFAULT_REO_TIMEOUT_USEC);
1350d55b76fSBaochen Qiang 
1360d55b76fSBaochen Qiang 	ath11k_hif_write32(ab, reo_base + HAL_REO1_DEST_RING_CTRL_IX_0,
1370d55b76fSBaochen Qiang 			   FIELD_PREP(HAL_REO_DEST_RING_CTRL_HASH_RING_MAP,
1380d55b76fSBaochen Qiang 				      ring_hash_map));
1390d55b76fSBaochen Qiang 	ath11k_hif_write32(ab, reo_base + HAL_REO1_DEST_RING_CTRL_IX_1,
1400d55b76fSBaochen Qiang 			   FIELD_PREP(HAL_REO_DEST_RING_CTRL_HASH_RING_MAP,
1410d55b76fSBaochen Qiang 				      ring_hash_map));
1420d55b76fSBaochen Qiang 	ath11k_hif_write32(ab, reo_base + HAL_REO1_DEST_RING_CTRL_IX_2,
1430d55b76fSBaochen Qiang 			   FIELD_PREP(HAL_REO_DEST_RING_CTRL_HASH_RING_MAP,
1440d55b76fSBaochen Qiang 				      ring_hash_map));
1450d55b76fSBaochen Qiang 	ath11k_hif_write32(ab, reo_base + HAL_REO1_DEST_RING_CTRL_IX_3,
1460d55b76fSBaochen Qiang 			   FIELD_PREP(HAL_REO_DEST_RING_CTRL_HASH_RING_MAP,
1470d55b76fSBaochen Qiang 				      ring_hash_map));
1480d55b76fSBaochen Qiang }
1490d55b76fSBaochen Qiang 
1502d4bcbedSCarl Huang static void ath11k_init_wmi_config_ipq8074(struct ath11k_base *ab,
1512d4bcbedSCarl Huang 					   struct target_resource_config *config)
1522d4bcbedSCarl Huang {
153523aafd0SKalle Valo 	config->num_vdevs = ab->num_radios * TARGET_NUM_VDEVS(ab);
1542d4bcbedSCarl Huang 
1552d4bcbedSCarl Huang 	if (ab->num_radios == 2) {
156523aafd0SKalle Valo 		config->num_peers = TARGET_NUM_PEERS(ab, DBS);
157523aafd0SKalle Valo 		config->num_tids = TARGET_NUM_TIDS(ab, DBS);
1582d4bcbedSCarl Huang 	} else if (ab->num_radios == 3) {
159523aafd0SKalle Valo 		config->num_peers = TARGET_NUM_PEERS(ab, DBS_SBS);
160523aafd0SKalle Valo 		config->num_tids = TARGET_NUM_TIDS(ab, DBS_SBS);
1612d4bcbedSCarl Huang 	} else {
1622d4bcbedSCarl Huang 		/* Control should not reach here */
163523aafd0SKalle Valo 		config->num_peers = TARGET_NUM_PEERS(ab, SINGLE);
164523aafd0SKalle Valo 		config->num_tids = TARGET_NUM_TIDS(ab, SINGLE);
1652d4bcbedSCarl Huang 	}
1662d4bcbedSCarl Huang 	config->num_offload_peers = TARGET_NUM_OFFLD_PEERS;
1672d4bcbedSCarl Huang 	config->num_offload_reorder_buffs = TARGET_NUM_OFFLD_REORDER_BUFFS;
1682d4bcbedSCarl Huang 	config->num_peer_keys = TARGET_NUM_PEER_KEYS;
1692d4bcbedSCarl Huang 	config->ast_skid_limit = TARGET_AST_SKID_LIMIT;
1702d4bcbedSCarl Huang 	config->tx_chain_mask = (1 << ab->target_caps.num_rf_chains) - 1;
1712d4bcbedSCarl Huang 	config->rx_chain_mask = (1 << ab->target_caps.num_rf_chains) - 1;
1722d4bcbedSCarl Huang 	config->rx_timeout_pri[0] = TARGET_RX_TIMEOUT_LO_PRI;
1732d4bcbedSCarl Huang 	config->rx_timeout_pri[1] = TARGET_RX_TIMEOUT_LO_PRI;
1742d4bcbedSCarl Huang 	config->rx_timeout_pri[2] = TARGET_RX_TIMEOUT_LO_PRI;
1752d4bcbedSCarl Huang 	config->rx_timeout_pri[3] = TARGET_RX_TIMEOUT_HI_PRI;
176c695faf7SKalle Valo 
177c695faf7SKalle Valo 	if (test_bit(ATH11K_FLAG_RAW_MODE, &ab->dev_flags))
178c695faf7SKalle Valo 		config->rx_decap_mode = TARGET_DECAP_MODE_RAW;
179c695faf7SKalle Valo 	else
1802d4bcbedSCarl Huang 		config->rx_decap_mode = TARGET_DECAP_MODE_NATIVE_WIFI;
181c695faf7SKalle Valo 
1822d4bcbedSCarl Huang 	config->scan_max_pending_req = TARGET_SCAN_MAX_PENDING_REQS;
1832d4bcbedSCarl Huang 	config->bmiss_offload_max_vdev = TARGET_BMISS_OFFLOAD_MAX_VDEV;
1842d4bcbedSCarl Huang 	config->roam_offload_max_vdev = TARGET_ROAM_OFFLOAD_MAX_VDEV;
1852d4bcbedSCarl Huang 	config->roam_offload_max_ap_profiles = TARGET_ROAM_OFFLOAD_MAX_AP_PROFILES;
1862d4bcbedSCarl Huang 	config->num_mcast_groups = TARGET_NUM_MCAST_GROUPS;
1872d4bcbedSCarl Huang 	config->num_mcast_table_elems = TARGET_NUM_MCAST_TABLE_ELEMS;
1882d4bcbedSCarl Huang 	config->mcast2ucast_mode = TARGET_MCAST2UCAST_MODE;
1892d4bcbedSCarl Huang 	config->tx_dbg_log_size = TARGET_TX_DBG_LOG_SIZE;
1902d4bcbedSCarl Huang 	config->num_wds_entries = TARGET_NUM_WDS_ENTRIES;
1912d4bcbedSCarl Huang 	config->dma_burst_size = TARGET_DMA_BURST_SIZE;
1922d4bcbedSCarl Huang 	config->rx_skip_defrag_timeout_dup_detection_check =
1932d4bcbedSCarl Huang 		TARGET_RX_SKIP_DEFRAG_TIMEOUT_DUP_DETECTION_CHECK;
1942d4bcbedSCarl Huang 	config->vow_config = TARGET_VOW_CONFIG;
1952d4bcbedSCarl Huang 	config->gtk_offload_max_vdev = TARGET_GTK_OFFLOAD_MAX_VDEV;
1962d4bcbedSCarl Huang 	config->num_msdu_desc = TARGET_NUM_MSDU_DESC;
1972d4bcbedSCarl Huang 	config->beacon_tx_offload_max_vdev = ab->num_radios * TARGET_MAX_BCN_OFFLD;
1982d4bcbedSCarl Huang 	config->rx_batchmode = TARGET_RX_BATCHMODE;
1992d4bcbedSCarl Huang 	config->peer_map_unmap_v2_support = 1;
20036c7c640SKarthikeyan Periyasamy 	config->twt_ap_pdev_count = ab->num_radios;
2012d4bcbedSCarl Huang 	config->twt_ap_sta_count = 1000;
2029b4dd38bSSeevalamuthu Mariappan 	config->flag1 |= WMI_RSRC_CFG_FLAG1_BSS_CHANNEL_INFO_64;
2032d4bcbedSCarl Huang }
2042d4bcbedSCarl Huang 
2054152e420SCarl Huang static int ath11k_hw_mac_id_to_pdev_id_ipq8074(struct ath11k_hw_params *hw,
2064152e420SCarl Huang 					       int mac_id)
2074152e420SCarl Huang {
2084152e420SCarl Huang 	return mac_id;
2094152e420SCarl Huang }
2104152e420SCarl Huang 
2114152e420SCarl Huang static int ath11k_hw_mac_id_to_srng_id_ipq8074(struct ath11k_hw_params *hw,
2124152e420SCarl Huang 					       int mac_id)
2134152e420SCarl Huang {
2144152e420SCarl Huang 	return 0;
2154152e420SCarl Huang }
2164152e420SCarl Huang 
2174152e420SCarl Huang static int ath11k_hw_mac_id_to_pdev_id_qca6390(struct ath11k_hw_params *hw,
2184152e420SCarl Huang 					       int mac_id)
2194152e420SCarl Huang {
2204152e420SCarl Huang 	return 0;
2214152e420SCarl Huang }
2224152e420SCarl Huang 
2234152e420SCarl Huang static int ath11k_hw_mac_id_to_srng_id_qca6390(struct ath11k_hw_params *hw,
2244152e420SCarl Huang 					       int mac_id)
2254152e420SCarl Huang {
2264152e420SCarl Huang 	return mac_id;
2274152e420SCarl Huang }
2284152e420SCarl Huang 
229e678fbd4SKarthikeyan Periyasamy static bool ath11k_hw_ipq8074_rx_desc_get_first_msdu(struct hal_rx_desc *desc)
230e678fbd4SKarthikeyan Periyasamy {
231e678fbd4SKarthikeyan Periyasamy 	return !!FIELD_GET(RX_MSDU_END_INFO2_FIRST_MSDU,
232e678fbd4SKarthikeyan Periyasamy 			   __le32_to_cpu(desc->u.ipq8074.msdu_end.info2));
233e678fbd4SKarthikeyan Periyasamy }
234e678fbd4SKarthikeyan Periyasamy 
235e678fbd4SKarthikeyan Periyasamy static bool ath11k_hw_ipq8074_rx_desc_get_last_msdu(struct hal_rx_desc *desc)
236e678fbd4SKarthikeyan Periyasamy {
237e678fbd4SKarthikeyan Periyasamy 	return !!FIELD_GET(RX_MSDU_END_INFO2_LAST_MSDU,
238e678fbd4SKarthikeyan Periyasamy 			   __le32_to_cpu(desc->u.ipq8074.msdu_end.info2));
239e678fbd4SKarthikeyan Periyasamy }
240e678fbd4SKarthikeyan Periyasamy 
241e678fbd4SKarthikeyan Periyasamy static u8 ath11k_hw_ipq8074_rx_desc_get_l3_pad_bytes(struct hal_rx_desc *desc)
242e678fbd4SKarthikeyan Periyasamy {
243e678fbd4SKarthikeyan Periyasamy 	return FIELD_GET(RX_MSDU_END_INFO2_L3_HDR_PADDING,
244e678fbd4SKarthikeyan Periyasamy 			 __le32_to_cpu(desc->u.ipq8074.msdu_end.info2));
245e678fbd4SKarthikeyan Periyasamy }
246e678fbd4SKarthikeyan Periyasamy 
247e678fbd4SKarthikeyan Periyasamy static u8 *ath11k_hw_ipq8074_rx_desc_get_hdr_status(struct hal_rx_desc *desc)
248e678fbd4SKarthikeyan Periyasamy {
249e678fbd4SKarthikeyan Periyasamy 	return desc->u.ipq8074.hdr_status;
250e678fbd4SKarthikeyan Periyasamy }
251e678fbd4SKarthikeyan Periyasamy 
252e678fbd4SKarthikeyan Periyasamy static bool ath11k_hw_ipq8074_rx_desc_encrypt_valid(struct hal_rx_desc *desc)
253e678fbd4SKarthikeyan Periyasamy {
254e678fbd4SKarthikeyan Periyasamy 	return __le32_to_cpu(desc->u.ipq8074.mpdu_start.info1) &
255e678fbd4SKarthikeyan Periyasamy 	       RX_MPDU_START_INFO1_ENCRYPT_INFO_VALID;
256e678fbd4SKarthikeyan Periyasamy }
257e678fbd4SKarthikeyan Periyasamy 
258e678fbd4SKarthikeyan Periyasamy static u32 ath11k_hw_ipq8074_rx_desc_get_encrypt_type(struct hal_rx_desc *desc)
259e678fbd4SKarthikeyan Periyasamy {
260e678fbd4SKarthikeyan Periyasamy 	return FIELD_GET(RX_MPDU_START_INFO2_ENC_TYPE,
261e678fbd4SKarthikeyan Periyasamy 			 __le32_to_cpu(desc->u.ipq8074.mpdu_start.info2));
262e678fbd4SKarthikeyan Periyasamy }
263e678fbd4SKarthikeyan Periyasamy 
264e678fbd4SKarthikeyan Periyasamy static u8 ath11k_hw_ipq8074_rx_desc_get_decap_type(struct hal_rx_desc *desc)
265e678fbd4SKarthikeyan Periyasamy {
266e678fbd4SKarthikeyan Periyasamy 	return FIELD_GET(RX_MSDU_START_INFO2_DECAP_FORMAT,
267e678fbd4SKarthikeyan Periyasamy 			 __le32_to_cpu(desc->u.ipq8074.msdu_start.info2));
268e678fbd4SKarthikeyan Periyasamy }
269e678fbd4SKarthikeyan Periyasamy 
270e678fbd4SKarthikeyan Periyasamy static u8 ath11k_hw_ipq8074_rx_desc_get_mesh_ctl(struct hal_rx_desc *desc)
271e678fbd4SKarthikeyan Periyasamy {
272e678fbd4SKarthikeyan Periyasamy 	return FIELD_GET(RX_MSDU_START_INFO2_MESH_CTRL_PRESENT,
273e678fbd4SKarthikeyan Periyasamy 			 __le32_to_cpu(desc->u.ipq8074.msdu_start.info2));
274e678fbd4SKarthikeyan Periyasamy }
275e678fbd4SKarthikeyan Periyasamy 
276b3febdccSP Praneesh static bool ath11k_hw_ipq8074_rx_desc_get_ldpc_support(struct hal_rx_desc *desc)
277b3febdccSP Praneesh {
278b3febdccSP Praneesh 	return FIELD_GET(RX_MSDU_START_INFO2_LDPC,
279b3febdccSP Praneesh 			 __le32_to_cpu(desc->u.ipq8074.msdu_start.info2));
280b3febdccSP Praneesh }
281b3febdccSP Praneesh 
282e678fbd4SKarthikeyan Periyasamy static bool ath11k_hw_ipq8074_rx_desc_get_mpdu_seq_ctl_vld(struct hal_rx_desc *desc)
283e678fbd4SKarthikeyan Periyasamy {
284e678fbd4SKarthikeyan Periyasamy 	return !!FIELD_GET(RX_MPDU_START_INFO1_MPDU_SEQ_CTRL_VALID,
285e678fbd4SKarthikeyan Periyasamy 			   __le32_to_cpu(desc->u.ipq8074.mpdu_start.info1));
286e678fbd4SKarthikeyan Periyasamy }
287e678fbd4SKarthikeyan Periyasamy 
288e678fbd4SKarthikeyan Periyasamy static bool ath11k_hw_ipq8074_rx_desc_get_mpdu_fc_valid(struct hal_rx_desc *desc)
289e678fbd4SKarthikeyan Periyasamy {
290e678fbd4SKarthikeyan Periyasamy 	return !!FIELD_GET(RX_MPDU_START_INFO1_MPDU_FCTRL_VALID,
291e678fbd4SKarthikeyan Periyasamy 			   __le32_to_cpu(desc->u.ipq8074.mpdu_start.info1));
292e678fbd4SKarthikeyan Periyasamy }
293e678fbd4SKarthikeyan Periyasamy 
294e678fbd4SKarthikeyan Periyasamy static u16 ath11k_hw_ipq8074_rx_desc_get_mpdu_start_seq_no(struct hal_rx_desc *desc)
295e678fbd4SKarthikeyan Periyasamy {
296e678fbd4SKarthikeyan Periyasamy 	return FIELD_GET(RX_MPDU_START_INFO1_MPDU_SEQ_NUM,
297e678fbd4SKarthikeyan Periyasamy 			 __le32_to_cpu(desc->u.ipq8074.mpdu_start.info1));
298e678fbd4SKarthikeyan Periyasamy }
299e678fbd4SKarthikeyan Periyasamy 
300e678fbd4SKarthikeyan Periyasamy static u16 ath11k_hw_ipq8074_rx_desc_get_msdu_len(struct hal_rx_desc *desc)
301e678fbd4SKarthikeyan Periyasamy {
302e678fbd4SKarthikeyan Periyasamy 	return FIELD_GET(RX_MSDU_START_INFO1_MSDU_LENGTH,
303e678fbd4SKarthikeyan Periyasamy 			 __le32_to_cpu(desc->u.ipq8074.msdu_start.info1));
304e678fbd4SKarthikeyan Periyasamy }
305e678fbd4SKarthikeyan Periyasamy 
306e678fbd4SKarthikeyan Periyasamy static u8 ath11k_hw_ipq8074_rx_desc_get_msdu_sgi(struct hal_rx_desc *desc)
307e678fbd4SKarthikeyan Periyasamy {
308e678fbd4SKarthikeyan Periyasamy 	return FIELD_GET(RX_MSDU_START_INFO3_SGI,
309e678fbd4SKarthikeyan Periyasamy 			 __le32_to_cpu(desc->u.ipq8074.msdu_start.info3));
310e678fbd4SKarthikeyan Periyasamy }
311e678fbd4SKarthikeyan Periyasamy 
312e678fbd4SKarthikeyan Periyasamy static u8 ath11k_hw_ipq8074_rx_desc_get_msdu_rate_mcs(struct hal_rx_desc *desc)
313e678fbd4SKarthikeyan Periyasamy {
314e678fbd4SKarthikeyan Periyasamy 	return FIELD_GET(RX_MSDU_START_INFO3_RATE_MCS,
315e678fbd4SKarthikeyan Periyasamy 			 __le32_to_cpu(desc->u.ipq8074.msdu_start.info3));
316e678fbd4SKarthikeyan Periyasamy }
317e678fbd4SKarthikeyan Periyasamy 
318e678fbd4SKarthikeyan Periyasamy static u8 ath11k_hw_ipq8074_rx_desc_get_msdu_rx_bw(struct hal_rx_desc *desc)
319e678fbd4SKarthikeyan Periyasamy {
320e678fbd4SKarthikeyan Periyasamy 	return FIELD_GET(RX_MSDU_START_INFO3_RECV_BW,
321e678fbd4SKarthikeyan Periyasamy 			 __le32_to_cpu(desc->u.ipq8074.msdu_start.info3));
322e678fbd4SKarthikeyan Periyasamy }
323e678fbd4SKarthikeyan Periyasamy 
324e678fbd4SKarthikeyan Periyasamy static u32 ath11k_hw_ipq8074_rx_desc_get_msdu_freq(struct hal_rx_desc *desc)
325e678fbd4SKarthikeyan Periyasamy {
326e678fbd4SKarthikeyan Periyasamy 	return __le32_to_cpu(desc->u.ipq8074.msdu_start.phy_meta_data);
327e678fbd4SKarthikeyan Periyasamy }
328e678fbd4SKarthikeyan Periyasamy 
329e678fbd4SKarthikeyan Periyasamy static u8 ath11k_hw_ipq8074_rx_desc_get_msdu_pkt_type(struct hal_rx_desc *desc)
330e678fbd4SKarthikeyan Periyasamy {
331e678fbd4SKarthikeyan Periyasamy 	return FIELD_GET(RX_MSDU_START_INFO3_PKT_TYPE,
332e678fbd4SKarthikeyan Periyasamy 			 __le32_to_cpu(desc->u.ipq8074.msdu_start.info3));
333e678fbd4SKarthikeyan Periyasamy }
334e678fbd4SKarthikeyan Periyasamy 
335e678fbd4SKarthikeyan Periyasamy static u8 ath11k_hw_ipq8074_rx_desc_get_msdu_nss(struct hal_rx_desc *desc)
336e678fbd4SKarthikeyan Periyasamy {
337e678fbd4SKarthikeyan Periyasamy 	return FIELD_GET(RX_MSDU_START_INFO3_MIMO_SS_BITMAP,
338e678fbd4SKarthikeyan Periyasamy 			 __le32_to_cpu(desc->u.ipq8074.msdu_start.info3));
339e678fbd4SKarthikeyan Periyasamy }
340e678fbd4SKarthikeyan Periyasamy 
341e678fbd4SKarthikeyan Periyasamy static u8 ath11k_hw_ipq8074_rx_desc_get_mpdu_tid(struct hal_rx_desc *desc)
342e678fbd4SKarthikeyan Periyasamy {
343e678fbd4SKarthikeyan Periyasamy 	return FIELD_GET(RX_MPDU_START_INFO2_TID,
344e678fbd4SKarthikeyan Periyasamy 			 __le32_to_cpu(desc->u.ipq8074.mpdu_start.info2));
345e678fbd4SKarthikeyan Periyasamy }
346e678fbd4SKarthikeyan Periyasamy 
347e678fbd4SKarthikeyan Periyasamy static u16 ath11k_hw_ipq8074_rx_desc_get_mpdu_peer_id(struct hal_rx_desc *desc)
348e678fbd4SKarthikeyan Periyasamy {
349e678fbd4SKarthikeyan Periyasamy 	return __le16_to_cpu(desc->u.ipq8074.mpdu_start.sw_peer_id);
350e678fbd4SKarthikeyan Periyasamy }
351e678fbd4SKarthikeyan Periyasamy 
352e678fbd4SKarthikeyan Periyasamy static void ath11k_hw_ipq8074_rx_desc_copy_attn_end(struct hal_rx_desc *fdesc,
353e678fbd4SKarthikeyan Periyasamy 						    struct hal_rx_desc *ldesc)
354e678fbd4SKarthikeyan Periyasamy {
355e678fbd4SKarthikeyan Periyasamy 	memcpy((u8 *)&fdesc->u.ipq8074.msdu_end, (u8 *)&ldesc->u.ipq8074.msdu_end,
356e678fbd4SKarthikeyan Periyasamy 	       sizeof(struct rx_msdu_end_ipq8074));
357e678fbd4SKarthikeyan Periyasamy 	memcpy((u8 *)&fdesc->u.ipq8074.attention, (u8 *)&ldesc->u.ipq8074.attention,
358e678fbd4SKarthikeyan Periyasamy 	       sizeof(struct rx_attention));
359e678fbd4SKarthikeyan Periyasamy 	memcpy((u8 *)&fdesc->u.ipq8074.mpdu_end, (u8 *)&ldesc->u.ipq8074.mpdu_end,
360e678fbd4SKarthikeyan Periyasamy 	       sizeof(struct rx_mpdu_end));
361e678fbd4SKarthikeyan Periyasamy }
362e678fbd4SKarthikeyan Periyasamy 
363e678fbd4SKarthikeyan Periyasamy static u32 ath11k_hw_ipq8074_rx_desc_get_mpdu_start_tag(struct hal_rx_desc *desc)
364e678fbd4SKarthikeyan Periyasamy {
365e678fbd4SKarthikeyan Periyasamy 	return FIELD_GET(HAL_TLV_HDR_TAG,
366e678fbd4SKarthikeyan Periyasamy 			 __le32_to_cpu(desc->u.ipq8074.mpdu_start_tag));
367e678fbd4SKarthikeyan Periyasamy }
368e678fbd4SKarthikeyan Periyasamy 
369e678fbd4SKarthikeyan Periyasamy static u32 ath11k_hw_ipq8074_rx_desc_get_mpdu_ppdu_id(struct hal_rx_desc *desc)
370e678fbd4SKarthikeyan Periyasamy {
371e678fbd4SKarthikeyan Periyasamy 	return __le16_to_cpu(desc->u.ipq8074.mpdu_start.phy_ppdu_id);
372e678fbd4SKarthikeyan Periyasamy }
373e678fbd4SKarthikeyan Periyasamy 
374e678fbd4SKarthikeyan Periyasamy static void ath11k_hw_ipq8074_rx_desc_set_msdu_len(struct hal_rx_desc *desc, u16 len)
375e678fbd4SKarthikeyan Periyasamy {
376e678fbd4SKarthikeyan Periyasamy 	u32 info = __le32_to_cpu(desc->u.ipq8074.msdu_start.info1);
377e678fbd4SKarthikeyan Periyasamy 
378e678fbd4SKarthikeyan Periyasamy 	info &= ~RX_MSDU_START_INFO1_MSDU_LENGTH;
379e678fbd4SKarthikeyan Periyasamy 	info |= FIELD_PREP(RX_MSDU_START_INFO1_MSDU_LENGTH, len);
380e678fbd4SKarthikeyan Periyasamy 
381e678fbd4SKarthikeyan Periyasamy 	desc->u.ipq8074.msdu_start.info1 = __cpu_to_le32(info);
382e678fbd4SKarthikeyan Periyasamy }
383e678fbd4SKarthikeyan Periyasamy 
3842167fa60SSriram R static bool ath11k_hw_ipq8074_rx_desc_mac_addr2_valid(struct hal_rx_desc *desc)
3852167fa60SSriram R {
3862167fa60SSriram R 	return __le32_to_cpu(desc->u.ipq8074.mpdu_start.info1) &
3872167fa60SSriram R 	       RX_MPDU_START_INFO1_MAC_ADDR2_VALID;
3882167fa60SSriram R }
3892167fa60SSriram R 
3902167fa60SSriram R static u8 *ath11k_hw_ipq8074_rx_desc_mpdu_start_addr2(struct hal_rx_desc *desc)
3912167fa60SSriram R {
3922167fa60SSriram R 	return desc->u.ipq8074.mpdu_start.addr2;
3932167fa60SSriram R }
3942167fa60SSriram R 
395e678fbd4SKarthikeyan Periyasamy static
396e678fbd4SKarthikeyan Periyasamy struct rx_attention *ath11k_hw_ipq8074_rx_desc_get_attention(struct hal_rx_desc *desc)
397e678fbd4SKarthikeyan Periyasamy {
398e678fbd4SKarthikeyan Periyasamy 	return &desc->u.ipq8074.attention;
399e678fbd4SKarthikeyan Periyasamy }
400e678fbd4SKarthikeyan Periyasamy 
401e678fbd4SKarthikeyan Periyasamy static u8 *ath11k_hw_ipq8074_rx_desc_get_msdu_payload(struct hal_rx_desc *desc)
402e678fbd4SKarthikeyan Periyasamy {
403e678fbd4SKarthikeyan Periyasamy 	return &desc->u.ipq8074.msdu_payload[0];
404e678fbd4SKarthikeyan Periyasamy }
405e678fbd4SKarthikeyan Periyasamy 
406e678fbd4SKarthikeyan Periyasamy static bool ath11k_hw_qcn9074_rx_desc_get_first_msdu(struct hal_rx_desc *desc)
407e678fbd4SKarthikeyan Periyasamy {
408e678fbd4SKarthikeyan Periyasamy 	return !!FIELD_GET(RX_MSDU_END_INFO4_FIRST_MSDU,
409e678fbd4SKarthikeyan Periyasamy 			   __le16_to_cpu(desc->u.qcn9074.msdu_end.info4));
410e678fbd4SKarthikeyan Periyasamy }
411e678fbd4SKarthikeyan Periyasamy 
412e678fbd4SKarthikeyan Periyasamy static bool ath11k_hw_qcn9074_rx_desc_get_last_msdu(struct hal_rx_desc *desc)
413e678fbd4SKarthikeyan Periyasamy {
414e678fbd4SKarthikeyan Periyasamy 	return !!FIELD_GET(RX_MSDU_END_INFO4_LAST_MSDU,
415e678fbd4SKarthikeyan Periyasamy 			   __le16_to_cpu(desc->u.qcn9074.msdu_end.info4));
416e678fbd4SKarthikeyan Periyasamy }
417e678fbd4SKarthikeyan Periyasamy 
418e678fbd4SKarthikeyan Periyasamy static u8 ath11k_hw_qcn9074_rx_desc_get_l3_pad_bytes(struct hal_rx_desc *desc)
419e678fbd4SKarthikeyan Periyasamy {
420e678fbd4SKarthikeyan Periyasamy 	return FIELD_GET(RX_MSDU_END_INFO4_L3_HDR_PADDING,
421e678fbd4SKarthikeyan Periyasamy 			 __le16_to_cpu(desc->u.qcn9074.msdu_end.info4));
422e678fbd4SKarthikeyan Periyasamy }
423e678fbd4SKarthikeyan Periyasamy 
424e678fbd4SKarthikeyan Periyasamy static u8 *ath11k_hw_qcn9074_rx_desc_get_hdr_status(struct hal_rx_desc *desc)
425e678fbd4SKarthikeyan Periyasamy {
426e678fbd4SKarthikeyan Periyasamy 	return desc->u.qcn9074.hdr_status;
427e678fbd4SKarthikeyan Periyasamy }
428e678fbd4SKarthikeyan Periyasamy 
429e678fbd4SKarthikeyan Periyasamy static bool ath11k_hw_qcn9074_rx_desc_encrypt_valid(struct hal_rx_desc *desc)
430e678fbd4SKarthikeyan Periyasamy {
431e678fbd4SKarthikeyan Periyasamy 	return __le32_to_cpu(desc->u.qcn9074.mpdu_start.info11) &
432e678fbd4SKarthikeyan Periyasamy 	       RX_MPDU_START_INFO11_ENCRYPT_INFO_VALID;
433e678fbd4SKarthikeyan Periyasamy }
434e678fbd4SKarthikeyan Periyasamy 
435e678fbd4SKarthikeyan Periyasamy static u32 ath11k_hw_qcn9074_rx_desc_get_encrypt_type(struct hal_rx_desc *desc)
436e678fbd4SKarthikeyan Periyasamy {
437e678fbd4SKarthikeyan Periyasamy 	return FIELD_GET(RX_MPDU_START_INFO9_ENC_TYPE,
438e678fbd4SKarthikeyan Periyasamy 			 __le32_to_cpu(desc->u.qcn9074.mpdu_start.info9));
439e678fbd4SKarthikeyan Periyasamy }
440e678fbd4SKarthikeyan Periyasamy 
441e678fbd4SKarthikeyan Periyasamy static u8 ath11k_hw_qcn9074_rx_desc_get_decap_type(struct hal_rx_desc *desc)
442e678fbd4SKarthikeyan Periyasamy {
443e678fbd4SKarthikeyan Periyasamy 	return FIELD_GET(RX_MSDU_START_INFO2_DECAP_FORMAT,
444e678fbd4SKarthikeyan Periyasamy 			 __le32_to_cpu(desc->u.qcn9074.msdu_start.info2));
445e678fbd4SKarthikeyan Periyasamy }
446e678fbd4SKarthikeyan Periyasamy 
447e678fbd4SKarthikeyan Periyasamy static u8 ath11k_hw_qcn9074_rx_desc_get_mesh_ctl(struct hal_rx_desc *desc)
448e678fbd4SKarthikeyan Periyasamy {
449e678fbd4SKarthikeyan Periyasamy 	return FIELD_GET(RX_MSDU_START_INFO2_MESH_CTRL_PRESENT,
450e678fbd4SKarthikeyan Periyasamy 			 __le32_to_cpu(desc->u.qcn9074.msdu_start.info2));
451e678fbd4SKarthikeyan Periyasamy }
452e678fbd4SKarthikeyan Periyasamy 
453b3febdccSP Praneesh static bool ath11k_hw_qcn9074_rx_desc_get_ldpc_support(struct hal_rx_desc *desc)
454b3febdccSP Praneesh {
455b3febdccSP Praneesh 	return FIELD_GET(RX_MSDU_START_INFO2_LDPC,
456b3febdccSP Praneesh 			 __le32_to_cpu(desc->u.qcn9074.msdu_start.info2));
457b3febdccSP Praneesh }
458b3febdccSP Praneesh 
459e678fbd4SKarthikeyan Periyasamy static bool ath11k_hw_qcn9074_rx_desc_get_mpdu_seq_ctl_vld(struct hal_rx_desc *desc)
460e678fbd4SKarthikeyan Periyasamy {
461e678fbd4SKarthikeyan Periyasamy 	return !!FIELD_GET(RX_MPDU_START_INFO11_MPDU_SEQ_CTRL_VALID,
462e678fbd4SKarthikeyan Periyasamy 			   __le32_to_cpu(desc->u.qcn9074.mpdu_start.info11));
463e678fbd4SKarthikeyan Periyasamy }
464e678fbd4SKarthikeyan Periyasamy 
465e678fbd4SKarthikeyan Periyasamy static bool ath11k_hw_qcn9074_rx_desc_get_mpdu_fc_valid(struct hal_rx_desc *desc)
466e678fbd4SKarthikeyan Periyasamy {
467e678fbd4SKarthikeyan Periyasamy 	return !!FIELD_GET(RX_MPDU_START_INFO11_MPDU_FCTRL_VALID,
468e678fbd4SKarthikeyan Periyasamy 			   __le32_to_cpu(desc->u.qcn9074.mpdu_start.info11));
469e678fbd4SKarthikeyan Periyasamy }
470e678fbd4SKarthikeyan Periyasamy 
471e678fbd4SKarthikeyan Periyasamy static u16 ath11k_hw_qcn9074_rx_desc_get_mpdu_start_seq_no(struct hal_rx_desc *desc)
472e678fbd4SKarthikeyan Periyasamy {
473e678fbd4SKarthikeyan Periyasamy 	return FIELD_GET(RX_MPDU_START_INFO11_MPDU_SEQ_NUM,
474e678fbd4SKarthikeyan Periyasamy 			 __le32_to_cpu(desc->u.qcn9074.mpdu_start.info11));
475e678fbd4SKarthikeyan Periyasamy }
476e678fbd4SKarthikeyan Periyasamy 
477e678fbd4SKarthikeyan Periyasamy static u16 ath11k_hw_qcn9074_rx_desc_get_msdu_len(struct hal_rx_desc *desc)
478e678fbd4SKarthikeyan Periyasamy {
479e678fbd4SKarthikeyan Periyasamy 	return FIELD_GET(RX_MSDU_START_INFO1_MSDU_LENGTH,
480e678fbd4SKarthikeyan Periyasamy 			 __le32_to_cpu(desc->u.qcn9074.msdu_start.info1));
481e678fbd4SKarthikeyan Periyasamy }
482e678fbd4SKarthikeyan Periyasamy 
483e678fbd4SKarthikeyan Periyasamy static u8 ath11k_hw_qcn9074_rx_desc_get_msdu_sgi(struct hal_rx_desc *desc)
484e678fbd4SKarthikeyan Periyasamy {
485e678fbd4SKarthikeyan Periyasamy 	return FIELD_GET(RX_MSDU_START_INFO3_SGI,
486e678fbd4SKarthikeyan Periyasamy 			 __le32_to_cpu(desc->u.qcn9074.msdu_start.info3));
487e678fbd4SKarthikeyan Periyasamy }
488e678fbd4SKarthikeyan Periyasamy 
489e678fbd4SKarthikeyan Periyasamy static u8 ath11k_hw_qcn9074_rx_desc_get_msdu_rate_mcs(struct hal_rx_desc *desc)
490e678fbd4SKarthikeyan Periyasamy {
491e678fbd4SKarthikeyan Periyasamy 	return FIELD_GET(RX_MSDU_START_INFO3_RATE_MCS,
492e678fbd4SKarthikeyan Periyasamy 			 __le32_to_cpu(desc->u.qcn9074.msdu_start.info3));
493e678fbd4SKarthikeyan Periyasamy }
494e678fbd4SKarthikeyan Periyasamy 
495e678fbd4SKarthikeyan Periyasamy static u8 ath11k_hw_qcn9074_rx_desc_get_msdu_rx_bw(struct hal_rx_desc *desc)
496e678fbd4SKarthikeyan Periyasamy {
497e678fbd4SKarthikeyan Periyasamy 	return FIELD_GET(RX_MSDU_START_INFO3_RECV_BW,
498e678fbd4SKarthikeyan Periyasamy 			 __le32_to_cpu(desc->u.qcn9074.msdu_start.info3));
499e678fbd4SKarthikeyan Periyasamy }
500e678fbd4SKarthikeyan Periyasamy 
501e678fbd4SKarthikeyan Periyasamy static u32 ath11k_hw_qcn9074_rx_desc_get_msdu_freq(struct hal_rx_desc *desc)
502e678fbd4SKarthikeyan Periyasamy {
503e678fbd4SKarthikeyan Periyasamy 	return __le32_to_cpu(desc->u.qcn9074.msdu_start.phy_meta_data);
504e678fbd4SKarthikeyan Periyasamy }
505e678fbd4SKarthikeyan Periyasamy 
506e678fbd4SKarthikeyan Periyasamy static u8 ath11k_hw_qcn9074_rx_desc_get_msdu_pkt_type(struct hal_rx_desc *desc)
507e678fbd4SKarthikeyan Periyasamy {
508e678fbd4SKarthikeyan Periyasamy 	return FIELD_GET(RX_MSDU_START_INFO3_PKT_TYPE,
509e678fbd4SKarthikeyan Periyasamy 			 __le32_to_cpu(desc->u.qcn9074.msdu_start.info3));
510e678fbd4SKarthikeyan Periyasamy }
511e678fbd4SKarthikeyan Periyasamy 
512e678fbd4SKarthikeyan Periyasamy static u8 ath11k_hw_qcn9074_rx_desc_get_msdu_nss(struct hal_rx_desc *desc)
513e678fbd4SKarthikeyan Periyasamy {
514e678fbd4SKarthikeyan Periyasamy 	return FIELD_GET(RX_MSDU_START_INFO3_MIMO_SS_BITMAP,
515e678fbd4SKarthikeyan Periyasamy 			 __le32_to_cpu(desc->u.qcn9074.msdu_start.info3));
516e678fbd4SKarthikeyan Periyasamy }
517e678fbd4SKarthikeyan Periyasamy 
518e678fbd4SKarthikeyan Periyasamy static u8 ath11k_hw_qcn9074_rx_desc_get_mpdu_tid(struct hal_rx_desc *desc)
519e678fbd4SKarthikeyan Periyasamy {
520e678fbd4SKarthikeyan Periyasamy 	return FIELD_GET(RX_MPDU_START_INFO9_TID,
521e678fbd4SKarthikeyan Periyasamy 			 __le32_to_cpu(desc->u.qcn9074.mpdu_start.info9));
522e678fbd4SKarthikeyan Periyasamy }
523e678fbd4SKarthikeyan Periyasamy 
524e678fbd4SKarthikeyan Periyasamy static u16 ath11k_hw_qcn9074_rx_desc_get_mpdu_peer_id(struct hal_rx_desc *desc)
525e678fbd4SKarthikeyan Periyasamy {
526e678fbd4SKarthikeyan Periyasamy 	return __le16_to_cpu(desc->u.qcn9074.mpdu_start.sw_peer_id);
527e678fbd4SKarthikeyan Periyasamy }
528e678fbd4SKarthikeyan Periyasamy 
529e678fbd4SKarthikeyan Periyasamy static void ath11k_hw_qcn9074_rx_desc_copy_attn_end(struct hal_rx_desc *fdesc,
530e678fbd4SKarthikeyan Periyasamy 						    struct hal_rx_desc *ldesc)
531e678fbd4SKarthikeyan Periyasamy {
532e678fbd4SKarthikeyan Periyasamy 	memcpy((u8 *)&fdesc->u.qcn9074.msdu_end, (u8 *)&ldesc->u.qcn9074.msdu_end,
533e678fbd4SKarthikeyan Periyasamy 	       sizeof(struct rx_msdu_end_qcn9074));
534e678fbd4SKarthikeyan Periyasamy 	memcpy((u8 *)&fdesc->u.qcn9074.attention, (u8 *)&ldesc->u.qcn9074.attention,
535e678fbd4SKarthikeyan Periyasamy 	       sizeof(struct rx_attention));
536e678fbd4SKarthikeyan Periyasamy 	memcpy((u8 *)&fdesc->u.qcn9074.mpdu_end, (u8 *)&ldesc->u.qcn9074.mpdu_end,
537e678fbd4SKarthikeyan Periyasamy 	       sizeof(struct rx_mpdu_end));
538e678fbd4SKarthikeyan Periyasamy }
539e678fbd4SKarthikeyan Periyasamy 
540e678fbd4SKarthikeyan Periyasamy static u32 ath11k_hw_qcn9074_rx_desc_get_mpdu_start_tag(struct hal_rx_desc *desc)
541e678fbd4SKarthikeyan Periyasamy {
542e678fbd4SKarthikeyan Periyasamy 	return FIELD_GET(HAL_TLV_HDR_TAG,
543e678fbd4SKarthikeyan Periyasamy 			 __le32_to_cpu(desc->u.qcn9074.mpdu_start_tag));
544e678fbd4SKarthikeyan Periyasamy }
545e678fbd4SKarthikeyan Periyasamy 
546e678fbd4SKarthikeyan Periyasamy static u32 ath11k_hw_qcn9074_rx_desc_get_mpdu_ppdu_id(struct hal_rx_desc *desc)
547e678fbd4SKarthikeyan Periyasamy {
548e678fbd4SKarthikeyan Periyasamy 	return __le16_to_cpu(desc->u.qcn9074.mpdu_start.phy_ppdu_id);
549e678fbd4SKarthikeyan Periyasamy }
550e678fbd4SKarthikeyan Periyasamy 
551e678fbd4SKarthikeyan Periyasamy static void ath11k_hw_qcn9074_rx_desc_set_msdu_len(struct hal_rx_desc *desc, u16 len)
552e678fbd4SKarthikeyan Periyasamy {
553e678fbd4SKarthikeyan Periyasamy 	u32 info = __le32_to_cpu(desc->u.qcn9074.msdu_start.info1);
554e678fbd4SKarthikeyan Periyasamy 
555e678fbd4SKarthikeyan Periyasamy 	info &= ~RX_MSDU_START_INFO1_MSDU_LENGTH;
556e678fbd4SKarthikeyan Periyasamy 	info |= FIELD_PREP(RX_MSDU_START_INFO1_MSDU_LENGTH, len);
557e678fbd4SKarthikeyan Periyasamy 
558e678fbd4SKarthikeyan Periyasamy 	desc->u.qcn9074.msdu_start.info1 = __cpu_to_le32(info);
559e678fbd4SKarthikeyan Periyasamy }
560e678fbd4SKarthikeyan Periyasamy 
561e678fbd4SKarthikeyan Periyasamy static
562e678fbd4SKarthikeyan Periyasamy struct rx_attention *ath11k_hw_qcn9074_rx_desc_get_attention(struct hal_rx_desc *desc)
563e678fbd4SKarthikeyan Periyasamy {
564e678fbd4SKarthikeyan Periyasamy 	return &desc->u.qcn9074.attention;
565e678fbd4SKarthikeyan Periyasamy }
566e678fbd4SKarthikeyan Periyasamy 
567e678fbd4SKarthikeyan Periyasamy static u8 *ath11k_hw_qcn9074_rx_desc_get_msdu_payload(struct hal_rx_desc *desc)
568e678fbd4SKarthikeyan Periyasamy {
569e678fbd4SKarthikeyan Periyasamy 	return &desc->u.qcn9074.msdu_payload[0];
570e678fbd4SKarthikeyan Periyasamy }
571e678fbd4SKarthikeyan Periyasamy 
5722167fa60SSriram R static bool ath11k_hw_ipq9074_rx_desc_mac_addr2_valid(struct hal_rx_desc *desc)
5732167fa60SSriram R {
5742167fa60SSriram R 	return __le32_to_cpu(desc->u.qcn9074.mpdu_start.info11) &
5752167fa60SSriram R 	       RX_MPDU_START_INFO11_MAC_ADDR2_VALID;
5762167fa60SSriram R }
5772167fa60SSriram R 
5782167fa60SSriram R static u8 *ath11k_hw_ipq9074_rx_desc_mpdu_start_addr2(struct hal_rx_desc *desc)
5792167fa60SSriram R {
5802167fa60SSriram R 	return desc->u.qcn9074.mpdu_start.addr2;
5812167fa60SSriram R }
5822167fa60SSriram R 
583e4073430SBaochen Qiang static bool ath11k_hw_wcn6855_rx_desc_get_first_msdu(struct hal_rx_desc *desc)
584e4073430SBaochen Qiang {
585e4073430SBaochen Qiang 	return !!FIELD_GET(RX_MSDU_END_INFO2_FIRST_MSDU_WCN6855,
586e4073430SBaochen Qiang 			   __le32_to_cpu(desc->u.wcn6855.msdu_end.info2));
587e4073430SBaochen Qiang }
588e4073430SBaochen Qiang 
589e4073430SBaochen Qiang static bool ath11k_hw_wcn6855_rx_desc_get_last_msdu(struct hal_rx_desc *desc)
590e4073430SBaochen Qiang {
591e4073430SBaochen Qiang 	return !!FIELD_GET(RX_MSDU_END_INFO2_LAST_MSDU_WCN6855,
592e4073430SBaochen Qiang 			   __le32_to_cpu(desc->u.wcn6855.msdu_end.info2));
593e4073430SBaochen Qiang }
594e4073430SBaochen Qiang 
595e4073430SBaochen Qiang static u8 ath11k_hw_wcn6855_rx_desc_get_l3_pad_bytes(struct hal_rx_desc *desc)
596e4073430SBaochen Qiang {
597e4073430SBaochen Qiang 	return FIELD_GET(RX_MSDU_END_INFO2_L3_HDR_PADDING,
598e4073430SBaochen Qiang 			 __le32_to_cpu(desc->u.wcn6855.msdu_end.info2));
599e4073430SBaochen Qiang }
600e4073430SBaochen Qiang 
601e4073430SBaochen Qiang static u8 *ath11k_hw_wcn6855_rx_desc_get_hdr_status(struct hal_rx_desc *desc)
602e4073430SBaochen Qiang {
603e4073430SBaochen Qiang 	return desc->u.wcn6855.hdr_status;
604e4073430SBaochen Qiang }
605e4073430SBaochen Qiang 
606e4073430SBaochen Qiang static bool ath11k_hw_wcn6855_rx_desc_encrypt_valid(struct hal_rx_desc *desc)
607e4073430SBaochen Qiang {
608e4073430SBaochen Qiang 	return __le32_to_cpu(desc->u.wcn6855.mpdu_start.info1) &
609e4073430SBaochen Qiang 	       RX_MPDU_START_INFO1_ENCRYPT_INFO_VALID;
610e4073430SBaochen Qiang }
611e4073430SBaochen Qiang 
612e4073430SBaochen Qiang static u32 ath11k_hw_wcn6855_rx_desc_get_encrypt_type(struct hal_rx_desc *desc)
613e4073430SBaochen Qiang {
614e4073430SBaochen Qiang 	return FIELD_GET(RX_MPDU_START_INFO2_ENC_TYPE,
615e4073430SBaochen Qiang 			 __le32_to_cpu(desc->u.wcn6855.mpdu_start.info2));
616e4073430SBaochen Qiang }
617e4073430SBaochen Qiang 
618e4073430SBaochen Qiang static u8 ath11k_hw_wcn6855_rx_desc_get_decap_type(struct hal_rx_desc *desc)
619e4073430SBaochen Qiang {
620e4073430SBaochen Qiang 	return FIELD_GET(RX_MSDU_START_INFO2_DECAP_FORMAT,
621e4073430SBaochen Qiang 			 __le32_to_cpu(desc->u.wcn6855.msdu_start.info2));
622e4073430SBaochen Qiang }
623e4073430SBaochen Qiang 
624e4073430SBaochen Qiang static u8 ath11k_hw_wcn6855_rx_desc_get_mesh_ctl(struct hal_rx_desc *desc)
625e4073430SBaochen Qiang {
626e4073430SBaochen Qiang 	return FIELD_GET(RX_MSDU_START_INFO2_MESH_CTRL_PRESENT,
627e4073430SBaochen Qiang 			 __le32_to_cpu(desc->u.wcn6855.msdu_start.info2));
628e4073430SBaochen Qiang }
629e4073430SBaochen Qiang 
630e4073430SBaochen Qiang static bool ath11k_hw_wcn6855_rx_desc_get_mpdu_seq_ctl_vld(struct hal_rx_desc *desc)
631e4073430SBaochen Qiang {
632e4073430SBaochen Qiang 	return !!FIELD_GET(RX_MPDU_START_INFO1_MPDU_SEQ_CTRL_VALID,
633e4073430SBaochen Qiang 			   __le32_to_cpu(desc->u.wcn6855.mpdu_start.info1));
634e4073430SBaochen Qiang }
635e4073430SBaochen Qiang 
636e4073430SBaochen Qiang static bool ath11k_hw_wcn6855_rx_desc_get_mpdu_fc_valid(struct hal_rx_desc *desc)
637e4073430SBaochen Qiang {
638e4073430SBaochen Qiang 	return !!FIELD_GET(RX_MPDU_START_INFO1_MPDU_FCTRL_VALID,
639e4073430SBaochen Qiang 			   __le32_to_cpu(desc->u.wcn6855.mpdu_start.info1));
640e4073430SBaochen Qiang }
641e4073430SBaochen Qiang 
642e4073430SBaochen Qiang static u16 ath11k_hw_wcn6855_rx_desc_get_mpdu_start_seq_no(struct hal_rx_desc *desc)
643e4073430SBaochen Qiang {
644e4073430SBaochen Qiang 	return FIELD_GET(RX_MPDU_START_INFO1_MPDU_SEQ_NUM,
645e4073430SBaochen Qiang 			 __le32_to_cpu(desc->u.wcn6855.mpdu_start.info1));
646e4073430SBaochen Qiang }
647e4073430SBaochen Qiang 
648e4073430SBaochen Qiang static u16 ath11k_hw_wcn6855_rx_desc_get_msdu_len(struct hal_rx_desc *desc)
649e4073430SBaochen Qiang {
650e4073430SBaochen Qiang 	return FIELD_GET(RX_MSDU_START_INFO1_MSDU_LENGTH,
651e4073430SBaochen Qiang 			 __le32_to_cpu(desc->u.wcn6855.msdu_start.info1));
652e4073430SBaochen Qiang }
653e4073430SBaochen Qiang 
654e4073430SBaochen Qiang static u8 ath11k_hw_wcn6855_rx_desc_get_msdu_sgi(struct hal_rx_desc *desc)
655e4073430SBaochen Qiang {
656e4073430SBaochen Qiang 	return FIELD_GET(RX_MSDU_START_INFO3_SGI,
657e4073430SBaochen Qiang 			 __le32_to_cpu(desc->u.wcn6855.msdu_start.info3));
658e4073430SBaochen Qiang }
659e4073430SBaochen Qiang 
660e4073430SBaochen Qiang static u8 ath11k_hw_wcn6855_rx_desc_get_msdu_rate_mcs(struct hal_rx_desc *desc)
661e4073430SBaochen Qiang {
662e4073430SBaochen Qiang 	return FIELD_GET(RX_MSDU_START_INFO3_RATE_MCS,
663e4073430SBaochen Qiang 			 __le32_to_cpu(desc->u.wcn6855.msdu_start.info3));
664e4073430SBaochen Qiang }
665e4073430SBaochen Qiang 
666e4073430SBaochen Qiang static u8 ath11k_hw_wcn6855_rx_desc_get_msdu_rx_bw(struct hal_rx_desc *desc)
667e4073430SBaochen Qiang {
668e4073430SBaochen Qiang 	return FIELD_GET(RX_MSDU_START_INFO3_RECV_BW,
669e4073430SBaochen Qiang 			 __le32_to_cpu(desc->u.wcn6855.msdu_start.info3));
670e4073430SBaochen Qiang }
671e4073430SBaochen Qiang 
672e4073430SBaochen Qiang static u32 ath11k_hw_wcn6855_rx_desc_get_msdu_freq(struct hal_rx_desc *desc)
673e4073430SBaochen Qiang {
674e4073430SBaochen Qiang 	return __le32_to_cpu(desc->u.wcn6855.msdu_start.phy_meta_data);
675e4073430SBaochen Qiang }
676e4073430SBaochen Qiang 
677e4073430SBaochen Qiang static u8 ath11k_hw_wcn6855_rx_desc_get_msdu_pkt_type(struct hal_rx_desc *desc)
678e4073430SBaochen Qiang {
679e4073430SBaochen Qiang 	return FIELD_GET(RX_MSDU_START_INFO3_PKT_TYPE,
680e4073430SBaochen Qiang 			 __le32_to_cpu(desc->u.wcn6855.msdu_start.info3));
681e4073430SBaochen Qiang }
682e4073430SBaochen Qiang 
683e4073430SBaochen Qiang static u8 ath11k_hw_wcn6855_rx_desc_get_msdu_nss(struct hal_rx_desc *desc)
684e4073430SBaochen Qiang {
685e4073430SBaochen Qiang 	return FIELD_GET(RX_MSDU_START_INFO3_MIMO_SS_BITMAP,
686e4073430SBaochen Qiang 			 __le32_to_cpu(desc->u.wcn6855.msdu_start.info3));
687e4073430SBaochen Qiang }
688e4073430SBaochen Qiang 
689e4073430SBaochen Qiang static u8 ath11k_hw_wcn6855_rx_desc_get_mpdu_tid(struct hal_rx_desc *desc)
690e4073430SBaochen Qiang {
691e4073430SBaochen Qiang 	return FIELD_GET(RX_MPDU_START_INFO2_TID_WCN6855,
692e4073430SBaochen Qiang 			 __le32_to_cpu(desc->u.wcn6855.mpdu_start.info2));
693e4073430SBaochen Qiang }
694e4073430SBaochen Qiang 
695e4073430SBaochen Qiang static u16 ath11k_hw_wcn6855_rx_desc_get_mpdu_peer_id(struct hal_rx_desc *desc)
696e4073430SBaochen Qiang {
697e4073430SBaochen Qiang 	return __le16_to_cpu(desc->u.wcn6855.mpdu_start.sw_peer_id);
698e4073430SBaochen Qiang }
699e4073430SBaochen Qiang 
700e4073430SBaochen Qiang static void ath11k_hw_wcn6855_rx_desc_copy_attn_end(struct hal_rx_desc *fdesc,
701e4073430SBaochen Qiang 						    struct hal_rx_desc *ldesc)
702e4073430SBaochen Qiang {
703e4073430SBaochen Qiang 	memcpy((u8 *)&fdesc->u.wcn6855.msdu_end, (u8 *)&ldesc->u.wcn6855.msdu_end,
704e4073430SBaochen Qiang 	       sizeof(struct rx_msdu_end_wcn6855));
705e4073430SBaochen Qiang 	memcpy((u8 *)&fdesc->u.wcn6855.attention, (u8 *)&ldesc->u.wcn6855.attention,
706e4073430SBaochen Qiang 	       sizeof(struct rx_attention));
707e4073430SBaochen Qiang 	memcpy((u8 *)&fdesc->u.wcn6855.mpdu_end, (u8 *)&ldesc->u.wcn6855.mpdu_end,
708e4073430SBaochen Qiang 	       sizeof(struct rx_mpdu_end));
709e4073430SBaochen Qiang }
710e4073430SBaochen Qiang 
711e4073430SBaochen Qiang static u32 ath11k_hw_wcn6855_rx_desc_get_mpdu_start_tag(struct hal_rx_desc *desc)
712e4073430SBaochen Qiang {
713e4073430SBaochen Qiang 	return FIELD_GET(HAL_TLV_HDR_TAG,
714e4073430SBaochen Qiang 			 __le32_to_cpu(desc->u.wcn6855.mpdu_start_tag));
715e4073430SBaochen Qiang }
716e4073430SBaochen Qiang 
717e4073430SBaochen Qiang static u32 ath11k_hw_wcn6855_rx_desc_get_mpdu_ppdu_id(struct hal_rx_desc *desc)
718e4073430SBaochen Qiang {
719e4073430SBaochen Qiang 	return __le16_to_cpu(desc->u.wcn6855.mpdu_start.phy_ppdu_id);
720e4073430SBaochen Qiang }
721e4073430SBaochen Qiang 
722e4073430SBaochen Qiang static void ath11k_hw_wcn6855_rx_desc_set_msdu_len(struct hal_rx_desc *desc, u16 len)
723e4073430SBaochen Qiang {
724e4073430SBaochen Qiang 	u32 info = __le32_to_cpu(desc->u.wcn6855.msdu_start.info1);
725e4073430SBaochen Qiang 
726e4073430SBaochen Qiang 	info &= ~RX_MSDU_START_INFO1_MSDU_LENGTH;
727e4073430SBaochen Qiang 	info |= FIELD_PREP(RX_MSDU_START_INFO1_MSDU_LENGTH, len);
728e4073430SBaochen Qiang 
729e4073430SBaochen Qiang 	desc->u.wcn6855.msdu_start.info1 = __cpu_to_le32(info);
730e4073430SBaochen Qiang }
731e4073430SBaochen Qiang 
732e4073430SBaochen Qiang static
733e4073430SBaochen Qiang struct rx_attention *ath11k_hw_wcn6855_rx_desc_get_attention(struct hal_rx_desc *desc)
734e4073430SBaochen Qiang {
735e4073430SBaochen Qiang 	return &desc->u.wcn6855.attention;
736e4073430SBaochen Qiang }
737e4073430SBaochen Qiang 
738e4073430SBaochen Qiang static u8 *ath11k_hw_wcn6855_rx_desc_get_msdu_payload(struct hal_rx_desc *desc)
739e4073430SBaochen Qiang {
740e4073430SBaochen Qiang 	return &desc->u.wcn6855.msdu_payload[0];
741e4073430SBaochen Qiang }
742e4073430SBaochen Qiang 
7432167fa60SSriram R static bool ath11k_hw_wcn6855_rx_desc_mac_addr2_valid(struct hal_rx_desc *desc)
7442167fa60SSriram R {
7452167fa60SSriram R 	return __le32_to_cpu(desc->u.wcn6855.mpdu_start.info1) &
7462167fa60SSriram R 	       RX_MPDU_START_INFO1_MAC_ADDR2_VALID;
7472167fa60SSriram R }
7482167fa60SSriram R 
7492167fa60SSriram R static u8 *ath11k_hw_wcn6855_rx_desc_mpdu_start_addr2(struct hal_rx_desc *desc)
7502167fa60SSriram R {
7512167fa60SSriram R 	return desc->u.wcn6855.mpdu_start.addr2;
7522167fa60SSriram R }
7532167fa60SSriram R 
7540d55b76fSBaochen Qiang static void ath11k_hw_wcn6855_reo_setup(struct ath11k_base *ab)
7550d55b76fSBaochen Qiang {
7560d55b76fSBaochen Qiang 	u32 reo_base = HAL_SEQ_WCSS_UMAC_REO_REG;
7570d55b76fSBaochen Qiang 	u32 val;
7580d55b76fSBaochen Qiang 	/* Each hash entry uses four bits to map to a particular ring. */
7590d55b76fSBaochen Qiang 	u32 ring_hash_map = HAL_HASH_ROUTING_RING_SW1 << 0 |
7600d55b76fSBaochen Qiang 		HAL_HASH_ROUTING_RING_SW2 << 4 |
7610d55b76fSBaochen Qiang 		HAL_HASH_ROUTING_RING_SW3 << 8 |
7620d55b76fSBaochen Qiang 		HAL_HASH_ROUTING_RING_SW4 << 12 |
7630d55b76fSBaochen Qiang 		HAL_HASH_ROUTING_RING_SW1 << 16 |
7640d55b76fSBaochen Qiang 		HAL_HASH_ROUTING_RING_SW2 << 20 |
7650d55b76fSBaochen Qiang 		HAL_HASH_ROUTING_RING_SW3 << 24 |
7660d55b76fSBaochen Qiang 		HAL_HASH_ROUTING_RING_SW4 << 28;
7670d55b76fSBaochen Qiang 
7680d55b76fSBaochen Qiang 	val = ath11k_hif_read32(ab, reo_base + HAL_REO1_GEN_ENABLE);
7690d55b76fSBaochen Qiang 	val |= FIELD_PREP(HAL_REO1_GEN_ENABLE_AGING_LIST_ENABLE, 1) |
7700d55b76fSBaochen Qiang 		FIELD_PREP(HAL_REO1_GEN_ENABLE_AGING_FLUSH_ENABLE, 1);
7710d55b76fSBaochen Qiang 	ath11k_hif_write32(ab, reo_base + HAL_REO1_GEN_ENABLE, val);
7720d55b76fSBaochen Qiang 
7730d55b76fSBaochen Qiang 	val = ath11k_hif_read32(ab, reo_base + HAL_REO1_MISC_CTL);
7740d55b76fSBaochen Qiang 	val &= ~HAL_REO1_MISC_CTL_FRAGMENT_DST_RING;
7750d55b76fSBaochen Qiang 	val |= FIELD_PREP(HAL_REO1_MISC_CTL_FRAGMENT_DST_RING, HAL_SRNG_RING_ID_REO2SW1);
7760d55b76fSBaochen Qiang 	ath11k_hif_write32(ab, reo_base + HAL_REO1_MISC_CTL, val);
7770d55b76fSBaochen Qiang 
7780d55b76fSBaochen Qiang 	ath11k_hif_write32(ab, reo_base + HAL_REO1_AGING_THRESH_IX_0(ab),
7790d55b76fSBaochen Qiang 			   HAL_DEFAULT_REO_TIMEOUT_USEC);
7800d55b76fSBaochen Qiang 	ath11k_hif_write32(ab, reo_base + HAL_REO1_AGING_THRESH_IX_1(ab),
7810d55b76fSBaochen Qiang 			   HAL_DEFAULT_REO_TIMEOUT_USEC);
7820d55b76fSBaochen Qiang 	ath11k_hif_write32(ab, reo_base + HAL_REO1_AGING_THRESH_IX_2(ab),
7830d55b76fSBaochen Qiang 			   HAL_DEFAULT_REO_TIMEOUT_USEC);
7840d55b76fSBaochen Qiang 	ath11k_hif_write32(ab, reo_base + HAL_REO1_AGING_THRESH_IX_3(ab),
7850d55b76fSBaochen Qiang 			   HAL_DEFAULT_REO_TIMEOUT_USEC);
7860d55b76fSBaochen Qiang 
7870d55b76fSBaochen Qiang 	ath11k_hif_write32(ab, reo_base + HAL_REO1_DEST_RING_CTRL_IX_2,
7880d55b76fSBaochen Qiang 			   ring_hash_map);
7890d55b76fSBaochen Qiang 	ath11k_hif_write32(ab, reo_base + HAL_REO1_DEST_RING_CTRL_IX_3,
7900d55b76fSBaochen Qiang 			   ring_hash_map);
7910d55b76fSBaochen Qiang }
7920d55b76fSBaochen Qiang 
7938845fed1SBaochen Qiang static u16 ath11k_hw_ipq8074_mpdu_info_get_peerid(u8 *tlv_data)
7948845fed1SBaochen Qiang {
7958845fed1SBaochen Qiang 	u16 peer_id = 0;
7968845fed1SBaochen Qiang 	struct hal_rx_mpdu_info *mpdu_info =
7978845fed1SBaochen Qiang 		(struct hal_rx_mpdu_info *)tlv_data;
7988845fed1SBaochen Qiang 
7998845fed1SBaochen Qiang 	peer_id = FIELD_GET(HAL_RX_MPDU_INFO_INFO0_PEERID,
8008845fed1SBaochen Qiang 			    __le32_to_cpu(mpdu_info->info0));
8018845fed1SBaochen Qiang 
8028845fed1SBaochen Qiang 	return peer_id;
8038845fed1SBaochen Qiang }
8048845fed1SBaochen Qiang 
8058845fed1SBaochen Qiang static u16 ath11k_hw_wcn6855_mpdu_info_get_peerid(u8 *tlv_data)
8068845fed1SBaochen Qiang {
8078845fed1SBaochen Qiang 	u16 peer_id = 0;
8088845fed1SBaochen Qiang 	struct hal_rx_mpdu_info_wcn6855 *mpdu_info =
8098845fed1SBaochen Qiang 		(struct hal_rx_mpdu_info_wcn6855 *)tlv_data;
8108845fed1SBaochen Qiang 
8118845fed1SBaochen Qiang 	peer_id = FIELD_GET(HAL_RX_MPDU_INFO_INFO0_PEERID_WCN6855,
8128845fed1SBaochen Qiang 			    __le32_to_cpu(mpdu_info->info0));
8138845fed1SBaochen Qiang 	return peer_id;
8148845fed1SBaochen Qiang }
8158845fed1SBaochen Qiang 
816*648ab472SBaochen Qiang static bool ath11k_hw_wcn6855_rx_desc_get_ldpc_support(struct hal_rx_desc *desc)
817*648ab472SBaochen Qiang {
818*648ab472SBaochen Qiang 	return FIELD_GET(RX_MSDU_START_INFO2_LDPC,
819*648ab472SBaochen Qiang 			 __le32_to_cpu(desc->u.wcn6855.msdu_start.info2));
820*648ab472SBaochen Qiang }
821*648ab472SBaochen Qiang 
822d547ca4cSAnilkumar Kolli const struct ath11k_hw_ops ipq8074_ops = {
823d547ca4cSAnilkumar Kolli 	.get_hw_mac_from_pdev_id = ath11k_hw_ipq8074_mac_from_pdev_id,
82436c7c640SKarthikeyan Periyasamy 	.wmi_init_config = ath11k_init_wmi_config_ipq8074,
8254152e420SCarl Huang 	.mac_id_to_pdev_id = ath11k_hw_mac_id_to_pdev_id_ipq8074,
8264152e420SCarl Huang 	.mac_id_to_srng_id = ath11k_hw_mac_id_to_srng_id_ipq8074,
8276fe6f68fSKarthikeyan Periyasamy 	.tx_mesh_enable = ath11k_hw_ipq8074_tx_mesh_enable,
828e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_first_msdu = ath11k_hw_ipq8074_rx_desc_get_first_msdu,
829e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_last_msdu = ath11k_hw_ipq8074_rx_desc_get_last_msdu,
830e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_l3_pad_bytes = ath11k_hw_ipq8074_rx_desc_get_l3_pad_bytes,
831e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_hdr_status = ath11k_hw_ipq8074_rx_desc_get_hdr_status,
832e678fbd4SKarthikeyan Periyasamy 	.rx_desc_encrypt_valid = ath11k_hw_ipq8074_rx_desc_encrypt_valid,
833e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_encrypt_type = ath11k_hw_ipq8074_rx_desc_get_encrypt_type,
834e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_decap_type = ath11k_hw_ipq8074_rx_desc_get_decap_type,
835e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_mesh_ctl = ath11k_hw_ipq8074_rx_desc_get_mesh_ctl,
836b3febdccSP Praneesh 	.rx_desc_get_ldpc_support = ath11k_hw_ipq8074_rx_desc_get_ldpc_support,
837e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_mpdu_seq_ctl_vld = ath11k_hw_ipq8074_rx_desc_get_mpdu_seq_ctl_vld,
838e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_mpdu_fc_valid = ath11k_hw_ipq8074_rx_desc_get_mpdu_fc_valid,
839e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_mpdu_start_seq_no = ath11k_hw_ipq8074_rx_desc_get_mpdu_start_seq_no,
840e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_msdu_len = ath11k_hw_ipq8074_rx_desc_get_msdu_len,
841e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_msdu_sgi = ath11k_hw_ipq8074_rx_desc_get_msdu_sgi,
842e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_msdu_rate_mcs = ath11k_hw_ipq8074_rx_desc_get_msdu_rate_mcs,
843e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_msdu_rx_bw = ath11k_hw_ipq8074_rx_desc_get_msdu_rx_bw,
844e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_msdu_freq = ath11k_hw_ipq8074_rx_desc_get_msdu_freq,
845e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_msdu_pkt_type = ath11k_hw_ipq8074_rx_desc_get_msdu_pkt_type,
846e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_msdu_nss = ath11k_hw_ipq8074_rx_desc_get_msdu_nss,
847e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_mpdu_tid = ath11k_hw_ipq8074_rx_desc_get_mpdu_tid,
848e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_mpdu_peer_id = ath11k_hw_ipq8074_rx_desc_get_mpdu_peer_id,
849e678fbd4SKarthikeyan Periyasamy 	.rx_desc_copy_attn_end_tlv = ath11k_hw_ipq8074_rx_desc_copy_attn_end,
850e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_mpdu_start_tag = ath11k_hw_ipq8074_rx_desc_get_mpdu_start_tag,
851e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_mpdu_ppdu_id = ath11k_hw_ipq8074_rx_desc_get_mpdu_ppdu_id,
852e678fbd4SKarthikeyan Periyasamy 	.rx_desc_set_msdu_len = ath11k_hw_ipq8074_rx_desc_set_msdu_len,
853e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_attention = ath11k_hw_ipq8074_rx_desc_get_attention,
854e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_msdu_payload = ath11k_hw_ipq8074_rx_desc_get_msdu_payload,
8550d55b76fSBaochen Qiang 	.reo_setup = ath11k_hw_ipq8074_reo_setup,
8568845fed1SBaochen Qiang 	.mpdu_info_get_peerid = ath11k_hw_ipq8074_mpdu_info_get_peerid,
8572167fa60SSriram R 	.rx_desc_mac_addr2_valid = ath11k_hw_ipq8074_rx_desc_mac_addr2_valid,
8582167fa60SSriram R 	.rx_desc_mpdu_start_addr2 = ath11k_hw_ipq8074_rx_desc_mpdu_start_addr2,
859d547ca4cSAnilkumar Kolli };
860d547ca4cSAnilkumar Kolli 
861d547ca4cSAnilkumar Kolli const struct ath11k_hw_ops ipq6018_ops = {
862d547ca4cSAnilkumar Kolli 	.get_hw_mac_from_pdev_id = ath11k_hw_ipq6018_mac_from_pdev_id,
8632d4bcbedSCarl Huang 	.wmi_init_config = ath11k_init_wmi_config_ipq8074,
8644152e420SCarl Huang 	.mac_id_to_pdev_id = ath11k_hw_mac_id_to_pdev_id_ipq8074,
8654152e420SCarl Huang 	.mac_id_to_srng_id = ath11k_hw_mac_id_to_srng_id_ipq8074,
8666fe6f68fSKarthikeyan Periyasamy 	.tx_mesh_enable = ath11k_hw_ipq8074_tx_mesh_enable,
867e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_first_msdu = ath11k_hw_ipq8074_rx_desc_get_first_msdu,
868e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_last_msdu = ath11k_hw_ipq8074_rx_desc_get_last_msdu,
869e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_l3_pad_bytes = ath11k_hw_ipq8074_rx_desc_get_l3_pad_bytes,
870e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_hdr_status = ath11k_hw_ipq8074_rx_desc_get_hdr_status,
871e678fbd4SKarthikeyan Periyasamy 	.rx_desc_encrypt_valid = ath11k_hw_ipq8074_rx_desc_encrypt_valid,
872e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_encrypt_type = ath11k_hw_ipq8074_rx_desc_get_encrypt_type,
873e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_decap_type = ath11k_hw_ipq8074_rx_desc_get_decap_type,
874e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_mesh_ctl = ath11k_hw_ipq8074_rx_desc_get_mesh_ctl,
875b3febdccSP Praneesh 	.rx_desc_get_ldpc_support = ath11k_hw_ipq8074_rx_desc_get_ldpc_support,
876e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_mpdu_seq_ctl_vld = ath11k_hw_ipq8074_rx_desc_get_mpdu_seq_ctl_vld,
877e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_mpdu_fc_valid = ath11k_hw_ipq8074_rx_desc_get_mpdu_fc_valid,
878e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_mpdu_start_seq_no = ath11k_hw_ipq8074_rx_desc_get_mpdu_start_seq_no,
879e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_msdu_len = ath11k_hw_ipq8074_rx_desc_get_msdu_len,
880e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_msdu_sgi = ath11k_hw_ipq8074_rx_desc_get_msdu_sgi,
881e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_msdu_rate_mcs = ath11k_hw_ipq8074_rx_desc_get_msdu_rate_mcs,
882e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_msdu_rx_bw = ath11k_hw_ipq8074_rx_desc_get_msdu_rx_bw,
883e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_msdu_freq = ath11k_hw_ipq8074_rx_desc_get_msdu_freq,
884e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_msdu_pkt_type = ath11k_hw_ipq8074_rx_desc_get_msdu_pkt_type,
885e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_msdu_nss = ath11k_hw_ipq8074_rx_desc_get_msdu_nss,
886e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_mpdu_tid = ath11k_hw_ipq8074_rx_desc_get_mpdu_tid,
887e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_mpdu_peer_id = ath11k_hw_ipq8074_rx_desc_get_mpdu_peer_id,
888e678fbd4SKarthikeyan Periyasamy 	.rx_desc_copy_attn_end_tlv = ath11k_hw_ipq8074_rx_desc_copy_attn_end,
889e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_mpdu_start_tag = ath11k_hw_ipq8074_rx_desc_get_mpdu_start_tag,
890e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_mpdu_ppdu_id = ath11k_hw_ipq8074_rx_desc_get_mpdu_ppdu_id,
891e678fbd4SKarthikeyan Periyasamy 	.rx_desc_set_msdu_len = ath11k_hw_ipq8074_rx_desc_set_msdu_len,
892e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_attention = ath11k_hw_ipq8074_rx_desc_get_attention,
893e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_msdu_payload = ath11k_hw_ipq8074_rx_desc_get_msdu_payload,
8940d55b76fSBaochen Qiang 	.reo_setup = ath11k_hw_ipq8074_reo_setup,
8958845fed1SBaochen Qiang 	.mpdu_info_get_peerid = ath11k_hw_ipq8074_mpdu_info_get_peerid,
8962167fa60SSriram R 	.rx_desc_mac_addr2_valid = ath11k_hw_ipq8074_rx_desc_mac_addr2_valid,
8972167fa60SSriram R 	.rx_desc_mpdu_start_addr2 = ath11k_hw_ipq8074_rx_desc_mpdu_start_addr2,
898d547ca4cSAnilkumar Kolli };
8999de2ad43SCarl Huang 
9009de2ad43SCarl Huang const struct ath11k_hw_ops qca6390_ops = {
9019de2ad43SCarl Huang 	.get_hw_mac_from_pdev_id = ath11k_hw_ipq8074_mac_from_pdev_id,
9024152e420SCarl Huang 	.wmi_init_config = ath11k_init_wmi_config_qca6390,
9034152e420SCarl Huang 	.mac_id_to_pdev_id = ath11k_hw_mac_id_to_pdev_id_qca6390,
9044152e420SCarl Huang 	.mac_id_to_srng_id = ath11k_hw_mac_id_to_srng_id_qca6390,
9056fe6f68fSKarthikeyan Periyasamy 	.tx_mesh_enable = ath11k_hw_ipq8074_tx_mesh_enable,
906e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_first_msdu = ath11k_hw_ipq8074_rx_desc_get_first_msdu,
907e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_last_msdu = ath11k_hw_ipq8074_rx_desc_get_last_msdu,
908e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_l3_pad_bytes = ath11k_hw_ipq8074_rx_desc_get_l3_pad_bytes,
909e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_hdr_status = ath11k_hw_ipq8074_rx_desc_get_hdr_status,
910e678fbd4SKarthikeyan Periyasamy 	.rx_desc_encrypt_valid = ath11k_hw_ipq8074_rx_desc_encrypt_valid,
911e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_encrypt_type = ath11k_hw_ipq8074_rx_desc_get_encrypt_type,
912e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_decap_type = ath11k_hw_ipq8074_rx_desc_get_decap_type,
913e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_mesh_ctl = ath11k_hw_ipq8074_rx_desc_get_mesh_ctl,
914b3febdccSP Praneesh 	.rx_desc_get_ldpc_support = ath11k_hw_ipq8074_rx_desc_get_ldpc_support,
915e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_mpdu_seq_ctl_vld = ath11k_hw_ipq8074_rx_desc_get_mpdu_seq_ctl_vld,
916e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_mpdu_fc_valid = ath11k_hw_ipq8074_rx_desc_get_mpdu_fc_valid,
917e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_mpdu_start_seq_no = ath11k_hw_ipq8074_rx_desc_get_mpdu_start_seq_no,
918e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_msdu_len = ath11k_hw_ipq8074_rx_desc_get_msdu_len,
919e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_msdu_sgi = ath11k_hw_ipq8074_rx_desc_get_msdu_sgi,
920e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_msdu_rate_mcs = ath11k_hw_ipq8074_rx_desc_get_msdu_rate_mcs,
921e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_msdu_rx_bw = ath11k_hw_ipq8074_rx_desc_get_msdu_rx_bw,
922e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_msdu_freq = ath11k_hw_ipq8074_rx_desc_get_msdu_freq,
923e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_msdu_pkt_type = ath11k_hw_ipq8074_rx_desc_get_msdu_pkt_type,
924e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_msdu_nss = ath11k_hw_ipq8074_rx_desc_get_msdu_nss,
925e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_mpdu_tid = ath11k_hw_ipq8074_rx_desc_get_mpdu_tid,
926e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_mpdu_peer_id = ath11k_hw_ipq8074_rx_desc_get_mpdu_peer_id,
927e678fbd4SKarthikeyan Periyasamy 	.rx_desc_copy_attn_end_tlv = ath11k_hw_ipq8074_rx_desc_copy_attn_end,
928e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_mpdu_start_tag = ath11k_hw_ipq8074_rx_desc_get_mpdu_start_tag,
929e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_mpdu_ppdu_id = ath11k_hw_ipq8074_rx_desc_get_mpdu_ppdu_id,
930e678fbd4SKarthikeyan Periyasamy 	.rx_desc_set_msdu_len = ath11k_hw_ipq8074_rx_desc_set_msdu_len,
931e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_attention = ath11k_hw_ipq8074_rx_desc_get_attention,
932e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_msdu_payload = ath11k_hw_ipq8074_rx_desc_get_msdu_payload,
9330d55b76fSBaochen Qiang 	.reo_setup = ath11k_hw_ipq8074_reo_setup,
9348845fed1SBaochen Qiang 	.mpdu_info_get_peerid = ath11k_hw_ipq8074_mpdu_info_get_peerid,
9352167fa60SSriram R 	.rx_desc_mac_addr2_valid = ath11k_hw_ipq8074_rx_desc_mac_addr2_valid,
9362167fa60SSriram R 	.rx_desc_mpdu_start_addr2 = ath11k_hw_ipq8074_rx_desc_mpdu_start_addr2,
9376fe6f68fSKarthikeyan Periyasamy };
9386fe6f68fSKarthikeyan Periyasamy 
9396fe6f68fSKarthikeyan Periyasamy const struct ath11k_hw_ops qcn9074_ops = {
9406fe6f68fSKarthikeyan Periyasamy 	.get_hw_mac_from_pdev_id = ath11k_hw_ipq6018_mac_from_pdev_id,
9416fe6f68fSKarthikeyan Periyasamy 	.wmi_init_config = ath11k_init_wmi_config_ipq8074,
9426fe6f68fSKarthikeyan Periyasamy 	.mac_id_to_pdev_id = ath11k_hw_mac_id_to_pdev_id_ipq8074,
9436fe6f68fSKarthikeyan Periyasamy 	.mac_id_to_srng_id = ath11k_hw_mac_id_to_srng_id_ipq8074,
9446fe6f68fSKarthikeyan Periyasamy 	.tx_mesh_enable = ath11k_hw_qcn9074_tx_mesh_enable,
945e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_first_msdu = ath11k_hw_qcn9074_rx_desc_get_first_msdu,
946e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_last_msdu = ath11k_hw_qcn9074_rx_desc_get_last_msdu,
947e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_l3_pad_bytes = ath11k_hw_qcn9074_rx_desc_get_l3_pad_bytes,
948e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_hdr_status = ath11k_hw_qcn9074_rx_desc_get_hdr_status,
949e678fbd4SKarthikeyan Periyasamy 	.rx_desc_encrypt_valid = ath11k_hw_qcn9074_rx_desc_encrypt_valid,
950e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_encrypt_type = ath11k_hw_qcn9074_rx_desc_get_encrypt_type,
951e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_decap_type = ath11k_hw_qcn9074_rx_desc_get_decap_type,
952e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_mesh_ctl = ath11k_hw_qcn9074_rx_desc_get_mesh_ctl,
953b3febdccSP Praneesh 	.rx_desc_get_ldpc_support = ath11k_hw_qcn9074_rx_desc_get_ldpc_support,
954e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_mpdu_seq_ctl_vld = ath11k_hw_qcn9074_rx_desc_get_mpdu_seq_ctl_vld,
955e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_mpdu_fc_valid = ath11k_hw_qcn9074_rx_desc_get_mpdu_fc_valid,
956e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_mpdu_start_seq_no = ath11k_hw_qcn9074_rx_desc_get_mpdu_start_seq_no,
957e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_msdu_len = ath11k_hw_qcn9074_rx_desc_get_msdu_len,
958e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_msdu_sgi = ath11k_hw_qcn9074_rx_desc_get_msdu_sgi,
959e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_msdu_rate_mcs = ath11k_hw_qcn9074_rx_desc_get_msdu_rate_mcs,
960e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_msdu_rx_bw = ath11k_hw_qcn9074_rx_desc_get_msdu_rx_bw,
961e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_msdu_freq = ath11k_hw_qcn9074_rx_desc_get_msdu_freq,
962e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_msdu_pkt_type = ath11k_hw_qcn9074_rx_desc_get_msdu_pkt_type,
963e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_msdu_nss = ath11k_hw_qcn9074_rx_desc_get_msdu_nss,
964e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_mpdu_tid = ath11k_hw_qcn9074_rx_desc_get_mpdu_tid,
965e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_mpdu_peer_id = ath11k_hw_qcn9074_rx_desc_get_mpdu_peer_id,
966e678fbd4SKarthikeyan Periyasamy 	.rx_desc_copy_attn_end_tlv = ath11k_hw_qcn9074_rx_desc_copy_attn_end,
967e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_mpdu_start_tag = ath11k_hw_qcn9074_rx_desc_get_mpdu_start_tag,
968e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_mpdu_ppdu_id = ath11k_hw_qcn9074_rx_desc_get_mpdu_ppdu_id,
969e678fbd4SKarthikeyan Periyasamy 	.rx_desc_set_msdu_len = ath11k_hw_qcn9074_rx_desc_set_msdu_len,
970e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_attention = ath11k_hw_qcn9074_rx_desc_get_attention,
971e678fbd4SKarthikeyan Periyasamy 	.rx_desc_get_msdu_payload = ath11k_hw_qcn9074_rx_desc_get_msdu_payload,
9720d55b76fSBaochen Qiang 	.reo_setup = ath11k_hw_ipq8074_reo_setup,
9738845fed1SBaochen Qiang 	.mpdu_info_get_peerid = ath11k_hw_ipq8074_mpdu_info_get_peerid,
9742167fa60SSriram R 	.rx_desc_mac_addr2_valid = ath11k_hw_ipq9074_rx_desc_mac_addr2_valid,
9752167fa60SSriram R 	.rx_desc_mpdu_start_addr2 = ath11k_hw_ipq9074_rx_desc_mpdu_start_addr2,
9769de2ad43SCarl Huang };
97734d5a3a8SKalle Valo 
978e4073430SBaochen Qiang const struct ath11k_hw_ops wcn6855_ops = {
979e4073430SBaochen Qiang 	.get_hw_mac_from_pdev_id = ath11k_hw_ipq8074_mac_from_pdev_id,
980e4073430SBaochen Qiang 	.wmi_init_config = ath11k_init_wmi_config_qca6390,
981e4073430SBaochen Qiang 	.mac_id_to_pdev_id = ath11k_hw_mac_id_to_pdev_id_qca6390,
982e4073430SBaochen Qiang 	.mac_id_to_srng_id = ath11k_hw_mac_id_to_srng_id_qca6390,
983e4073430SBaochen Qiang 	.tx_mesh_enable = ath11k_hw_wcn6855_tx_mesh_enable,
984e4073430SBaochen Qiang 	.rx_desc_get_first_msdu = ath11k_hw_wcn6855_rx_desc_get_first_msdu,
985e4073430SBaochen Qiang 	.rx_desc_get_last_msdu = ath11k_hw_wcn6855_rx_desc_get_last_msdu,
986e4073430SBaochen Qiang 	.rx_desc_get_l3_pad_bytes = ath11k_hw_wcn6855_rx_desc_get_l3_pad_bytes,
987e4073430SBaochen Qiang 	.rx_desc_get_hdr_status = ath11k_hw_wcn6855_rx_desc_get_hdr_status,
988e4073430SBaochen Qiang 	.rx_desc_encrypt_valid = ath11k_hw_wcn6855_rx_desc_encrypt_valid,
989e4073430SBaochen Qiang 	.rx_desc_get_encrypt_type = ath11k_hw_wcn6855_rx_desc_get_encrypt_type,
990e4073430SBaochen Qiang 	.rx_desc_get_decap_type = ath11k_hw_wcn6855_rx_desc_get_decap_type,
991e4073430SBaochen Qiang 	.rx_desc_get_mesh_ctl = ath11k_hw_wcn6855_rx_desc_get_mesh_ctl,
992*648ab472SBaochen Qiang 	.rx_desc_get_ldpc_support = ath11k_hw_wcn6855_rx_desc_get_ldpc_support,
993e4073430SBaochen Qiang 	.rx_desc_get_mpdu_seq_ctl_vld = ath11k_hw_wcn6855_rx_desc_get_mpdu_seq_ctl_vld,
994e4073430SBaochen Qiang 	.rx_desc_get_mpdu_fc_valid = ath11k_hw_wcn6855_rx_desc_get_mpdu_fc_valid,
995e4073430SBaochen Qiang 	.rx_desc_get_mpdu_start_seq_no = ath11k_hw_wcn6855_rx_desc_get_mpdu_start_seq_no,
996e4073430SBaochen Qiang 	.rx_desc_get_msdu_len = ath11k_hw_wcn6855_rx_desc_get_msdu_len,
997e4073430SBaochen Qiang 	.rx_desc_get_msdu_sgi = ath11k_hw_wcn6855_rx_desc_get_msdu_sgi,
998e4073430SBaochen Qiang 	.rx_desc_get_msdu_rate_mcs = ath11k_hw_wcn6855_rx_desc_get_msdu_rate_mcs,
999e4073430SBaochen Qiang 	.rx_desc_get_msdu_rx_bw = ath11k_hw_wcn6855_rx_desc_get_msdu_rx_bw,
1000e4073430SBaochen Qiang 	.rx_desc_get_msdu_freq = ath11k_hw_wcn6855_rx_desc_get_msdu_freq,
1001e4073430SBaochen Qiang 	.rx_desc_get_msdu_pkt_type = ath11k_hw_wcn6855_rx_desc_get_msdu_pkt_type,
1002e4073430SBaochen Qiang 	.rx_desc_get_msdu_nss = ath11k_hw_wcn6855_rx_desc_get_msdu_nss,
1003e4073430SBaochen Qiang 	.rx_desc_get_mpdu_tid = ath11k_hw_wcn6855_rx_desc_get_mpdu_tid,
1004e4073430SBaochen Qiang 	.rx_desc_get_mpdu_peer_id = ath11k_hw_wcn6855_rx_desc_get_mpdu_peer_id,
1005e4073430SBaochen Qiang 	.rx_desc_copy_attn_end_tlv = ath11k_hw_wcn6855_rx_desc_copy_attn_end,
1006e4073430SBaochen Qiang 	.rx_desc_get_mpdu_start_tag = ath11k_hw_wcn6855_rx_desc_get_mpdu_start_tag,
1007e4073430SBaochen Qiang 	.rx_desc_get_mpdu_ppdu_id = ath11k_hw_wcn6855_rx_desc_get_mpdu_ppdu_id,
1008e4073430SBaochen Qiang 	.rx_desc_set_msdu_len = ath11k_hw_wcn6855_rx_desc_set_msdu_len,
1009e4073430SBaochen Qiang 	.rx_desc_get_attention = ath11k_hw_wcn6855_rx_desc_get_attention,
1010e4073430SBaochen Qiang 	.rx_desc_get_msdu_payload = ath11k_hw_wcn6855_rx_desc_get_msdu_payload,
10110d55b76fSBaochen Qiang 	.reo_setup = ath11k_hw_wcn6855_reo_setup,
10128845fed1SBaochen Qiang 	.mpdu_info_get_peerid = ath11k_hw_wcn6855_mpdu_info_get_peerid,
10132167fa60SSriram R 	.rx_desc_mac_addr2_valid = ath11k_hw_wcn6855_rx_desc_mac_addr2_valid,
10142167fa60SSriram R 	.rx_desc_mpdu_start_addr2 = ath11k_hw_wcn6855_rx_desc_mpdu_start_addr2,
1015e4073430SBaochen Qiang };
1016e4073430SBaochen Qiang 
101734d5a3a8SKalle Valo #define ATH11K_TX_RING_MASK_0 0x1
101834d5a3a8SKalle Valo #define ATH11K_TX_RING_MASK_1 0x2
101934d5a3a8SKalle Valo #define ATH11K_TX_RING_MASK_2 0x4
102034d5a3a8SKalle Valo 
102134d5a3a8SKalle Valo #define ATH11K_RX_RING_MASK_0 0x1
102234d5a3a8SKalle Valo #define ATH11K_RX_RING_MASK_1 0x2
102334d5a3a8SKalle Valo #define ATH11K_RX_RING_MASK_2 0x4
102434d5a3a8SKalle Valo #define ATH11K_RX_RING_MASK_3 0x8
102534d5a3a8SKalle Valo 
102634d5a3a8SKalle Valo #define ATH11K_RX_ERR_RING_MASK_0 0x1
102734d5a3a8SKalle Valo 
102834d5a3a8SKalle Valo #define ATH11K_RX_WBM_REL_RING_MASK_0 0x1
102934d5a3a8SKalle Valo 
103034d5a3a8SKalle Valo #define ATH11K_REO_STATUS_RING_MASK_0 0x1
103134d5a3a8SKalle Valo 
103234d5a3a8SKalle Valo #define ATH11K_RXDMA2HOST_RING_MASK_0 0x1
103334d5a3a8SKalle Valo #define ATH11K_RXDMA2HOST_RING_MASK_1 0x2
103434d5a3a8SKalle Valo #define ATH11K_RXDMA2HOST_RING_MASK_2 0x4
103534d5a3a8SKalle Valo 
103634d5a3a8SKalle Valo #define ATH11K_HOST2RXDMA_RING_MASK_0 0x1
103734d5a3a8SKalle Valo #define ATH11K_HOST2RXDMA_RING_MASK_1 0x2
103834d5a3a8SKalle Valo #define ATH11K_HOST2RXDMA_RING_MASK_2 0x4
103934d5a3a8SKalle Valo 
104034d5a3a8SKalle Valo #define ATH11K_RX_MON_STATUS_RING_MASK_0 0x1
104134d5a3a8SKalle Valo #define ATH11K_RX_MON_STATUS_RING_MASK_1 0x2
104234d5a3a8SKalle Valo #define ATH11K_RX_MON_STATUS_RING_MASK_2 0x4
104334d5a3a8SKalle Valo 
104434d5a3a8SKalle Valo const struct ath11k_hw_ring_mask ath11k_hw_ring_mask_ipq8074 = {
104534d5a3a8SKalle Valo 	.tx  = {
104634d5a3a8SKalle Valo 		ATH11K_TX_RING_MASK_0,
104734d5a3a8SKalle Valo 		ATH11K_TX_RING_MASK_1,
104834d5a3a8SKalle Valo 		ATH11K_TX_RING_MASK_2,
104934d5a3a8SKalle Valo 	},
105034d5a3a8SKalle Valo 	.rx_mon_status = {
105134d5a3a8SKalle Valo 		0, 0, 0, 0,
105234d5a3a8SKalle Valo 		ATH11K_RX_MON_STATUS_RING_MASK_0,
105334d5a3a8SKalle Valo 		ATH11K_RX_MON_STATUS_RING_MASK_1,
105434d5a3a8SKalle Valo 		ATH11K_RX_MON_STATUS_RING_MASK_2,
105534d5a3a8SKalle Valo 	},
105634d5a3a8SKalle Valo 	.rx = {
105734d5a3a8SKalle Valo 		0, 0, 0, 0, 0, 0, 0,
105834d5a3a8SKalle Valo 		ATH11K_RX_RING_MASK_0,
105934d5a3a8SKalle Valo 		ATH11K_RX_RING_MASK_1,
106034d5a3a8SKalle Valo 		ATH11K_RX_RING_MASK_2,
106134d5a3a8SKalle Valo 		ATH11K_RX_RING_MASK_3,
106234d5a3a8SKalle Valo 	},
106334d5a3a8SKalle Valo 	.rx_err = {
106434d5a3a8SKalle Valo 		ATH11K_RX_ERR_RING_MASK_0,
106534d5a3a8SKalle Valo 	},
106634d5a3a8SKalle Valo 	.rx_wbm_rel = {
106734d5a3a8SKalle Valo 		ATH11K_RX_WBM_REL_RING_MASK_0,
106834d5a3a8SKalle Valo 	},
106934d5a3a8SKalle Valo 	.reo_status = {
107034d5a3a8SKalle Valo 		ATH11K_REO_STATUS_RING_MASK_0,
107134d5a3a8SKalle Valo 	},
107234d5a3a8SKalle Valo 	.rxdma2host = {
107334d5a3a8SKalle Valo 		ATH11K_RXDMA2HOST_RING_MASK_0,
107434d5a3a8SKalle Valo 		ATH11K_RXDMA2HOST_RING_MASK_1,
107534d5a3a8SKalle Valo 		ATH11K_RXDMA2HOST_RING_MASK_2,
107634d5a3a8SKalle Valo 	},
107734d5a3a8SKalle Valo 	.host2rxdma = {
107834d5a3a8SKalle Valo 		ATH11K_HOST2RXDMA_RING_MASK_0,
107934d5a3a8SKalle Valo 		ATH11K_HOST2RXDMA_RING_MASK_1,
108034d5a3a8SKalle Valo 		ATH11K_HOST2RXDMA_RING_MASK_2,
108134d5a3a8SKalle Valo 	},
108234d5a3a8SKalle Valo };
108334d5a3a8SKalle Valo 
1084d4ecb90bSCarl Huang const struct ath11k_hw_ring_mask ath11k_hw_ring_mask_qca6390 = {
1085d4ecb90bSCarl Huang 	.tx  = {
1086d4ecb90bSCarl Huang 		ATH11K_TX_RING_MASK_0,
1087d4ecb90bSCarl Huang 	},
1088d4ecb90bSCarl Huang 	.rx_mon_status = {
1089d4ecb90bSCarl Huang 		0, 0, 0, 0,
1090d4ecb90bSCarl Huang 		ATH11K_RX_MON_STATUS_RING_MASK_0,
1091d4ecb90bSCarl Huang 		ATH11K_RX_MON_STATUS_RING_MASK_1,
1092d4ecb90bSCarl Huang 		ATH11K_RX_MON_STATUS_RING_MASK_2,
1093d4ecb90bSCarl Huang 	},
1094d4ecb90bSCarl Huang 	.rx = {
1095d4ecb90bSCarl Huang 		0, 0, 0, 0, 0, 0, 0,
1096d4ecb90bSCarl Huang 		ATH11K_RX_RING_MASK_0,
1097d4ecb90bSCarl Huang 		ATH11K_RX_RING_MASK_1,
1098d4ecb90bSCarl Huang 		ATH11K_RX_RING_MASK_2,
1099d4ecb90bSCarl Huang 		ATH11K_RX_RING_MASK_3,
1100d4ecb90bSCarl Huang 	},
1101d4ecb90bSCarl Huang 	.rx_err = {
1102d4ecb90bSCarl Huang 		ATH11K_RX_ERR_RING_MASK_0,
1103d4ecb90bSCarl Huang 	},
1104d4ecb90bSCarl Huang 	.rx_wbm_rel = {
1105d4ecb90bSCarl Huang 		ATH11K_RX_WBM_REL_RING_MASK_0,
1106d4ecb90bSCarl Huang 	},
1107d4ecb90bSCarl Huang 	.reo_status = {
1108d4ecb90bSCarl Huang 		ATH11K_REO_STATUS_RING_MASK_0,
1109d4ecb90bSCarl Huang 	},
1110d4ecb90bSCarl Huang 	.rxdma2host = {
1111d4ecb90bSCarl Huang 		ATH11K_RXDMA2HOST_RING_MASK_0,
1112d4ecb90bSCarl Huang 		ATH11K_RXDMA2HOST_RING_MASK_1,
1113d4ecb90bSCarl Huang 		ATH11K_RXDMA2HOST_RING_MASK_2,
1114d4ecb90bSCarl Huang 	},
1115d4ecb90bSCarl Huang 	.host2rxdma = {
1116d4ecb90bSCarl Huang 	},
1117d4ecb90bSCarl Huang };
1118d4ecb90bSCarl Huang 
1119967c1d11SAnilkumar Kolli /* Target firmware's Copy Engine configuration. */
1120967c1d11SAnilkumar Kolli const struct ce_pipe_config ath11k_target_ce_config_wlan_ipq8074[] = {
1121967c1d11SAnilkumar Kolli 	/* CE0: host->target HTC control and raw streams */
1122967c1d11SAnilkumar Kolli 	{
1123967c1d11SAnilkumar Kolli 		.pipenum = __cpu_to_le32(0),
1124967c1d11SAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_OUT),
1125967c1d11SAnilkumar Kolli 		.nentries = __cpu_to_le32(32),
1126967c1d11SAnilkumar Kolli 		.nbytes_max = __cpu_to_le32(2048),
1127967c1d11SAnilkumar Kolli 		.flags = __cpu_to_le32(CE_ATTR_FLAGS),
1128967c1d11SAnilkumar Kolli 		.reserved = __cpu_to_le32(0),
1129967c1d11SAnilkumar Kolli 	},
1130967c1d11SAnilkumar Kolli 
1131967c1d11SAnilkumar Kolli 	/* CE1: target->host HTT + HTC control */
1132967c1d11SAnilkumar Kolli 	{
1133967c1d11SAnilkumar Kolli 		.pipenum = __cpu_to_le32(1),
1134967c1d11SAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_IN),
1135967c1d11SAnilkumar Kolli 		.nentries = __cpu_to_le32(32),
1136967c1d11SAnilkumar Kolli 		.nbytes_max = __cpu_to_le32(2048),
1137967c1d11SAnilkumar Kolli 		.flags = __cpu_to_le32(CE_ATTR_FLAGS),
1138967c1d11SAnilkumar Kolli 		.reserved = __cpu_to_le32(0),
1139967c1d11SAnilkumar Kolli 	},
1140967c1d11SAnilkumar Kolli 
1141967c1d11SAnilkumar Kolli 	/* CE2: target->host WMI */
1142967c1d11SAnilkumar Kolli 	{
1143967c1d11SAnilkumar Kolli 		.pipenum = __cpu_to_le32(2),
1144967c1d11SAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_IN),
1145967c1d11SAnilkumar Kolli 		.nentries = __cpu_to_le32(32),
1146967c1d11SAnilkumar Kolli 		.nbytes_max = __cpu_to_le32(2048),
1147967c1d11SAnilkumar Kolli 		.flags = __cpu_to_le32(CE_ATTR_FLAGS),
1148967c1d11SAnilkumar Kolli 		.reserved = __cpu_to_le32(0),
1149967c1d11SAnilkumar Kolli 	},
1150967c1d11SAnilkumar Kolli 
1151967c1d11SAnilkumar Kolli 	/* CE3: host->target WMI */
1152967c1d11SAnilkumar Kolli 	{
1153967c1d11SAnilkumar Kolli 		.pipenum = __cpu_to_le32(3),
1154967c1d11SAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_OUT),
1155967c1d11SAnilkumar Kolli 		.nentries = __cpu_to_le32(32),
1156967c1d11SAnilkumar Kolli 		.nbytes_max = __cpu_to_le32(2048),
1157967c1d11SAnilkumar Kolli 		.flags = __cpu_to_le32(CE_ATTR_FLAGS),
1158967c1d11SAnilkumar Kolli 		.reserved = __cpu_to_le32(0),
1159967c1d11SAnilkumar Kolli 	},
1160967c1d11SAnilkumar Kolli 
1161967c1d11SAnilkumar Kolli 	/* CE4: host->target HTT */
1162967c1d11SAnilkumar Kolli 	{
1163967c1d11SAnilkumar Kolli 		.pipenum = __cpu_to_le32(4),
1164967c1d11SAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_OUT),
1165967c1d11SAnilkumar Kolli 		.nentries = __cpu_to_le32(256),
1166967c1d11SAnilkumar Kolli 		.nbytes_max = __cpu_to_le32(256),
1167967c1d11SAnilkumar Kolli 		.flags = __cpu_to_le32(CE_ATTR_FLAGS | CE_ATTR_DIS_INTR),
1168967c1d11SAnilkumar Kolli 		.reserved = __cpu_to_le32(0),
1169967c1d11SAnilkumar Kolli 	},
1170967c1d11SAnilkumar Kolli 
1171967c1d11SAnilkumar Kolli 	/* CE5: target->host Pktlog */
1172967c1d11SAnilkumar Kolli 	{
1173967c1d11SAnilkumar Kolli 		.pipenum = __cpu_to_le32(5),
1174967c1d11SAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_IN),
1175967c1d11SAnilkumar Kolli 		.nentries = __cpu_to_le32(32),
1176967c1d11SAnilkumar Kolli 		.nbytes_max = __cpu_to_le32(2048),
1177967c1d11SAnilkumar Kolli 		.flags = __cpu_to_le32(0),
1178967c1d11SAnilkumar Kolli 		.reserved = __cpu_to_le32(0),
1179967c1d11SAnilkumar Kolli 	},
1180967c1d11SAnilkumar Kolli 
1181967c1d11SAnilkumar Kolli 	/* CE6: Reserved for target autonomous hif_memcpy */
1182967c1d11SAnilkumar Kolli 	{
1183967c1d11SAnilkumar Kolli 		.pipenum = __cpu_to_le32(6),
1184967c1d11SAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_INOUT),
1185967c1d11SAnilkumar Kolli 		.nentries = __cpu_to_le32(32),
1186967c1d11SAnilkumar Kolli 		.nbytes_max = __cpu_to_le32(65535),
1187967c1d11SAnilkumar Kolli 		.flags = __cpu_to_le32(CE_ATTR_FLAGS),
1188967c1d11SAnilkumar Kolli 		.reserved = __cpu_to_le32(0),
1189967c1d11SAnilkumar Kolli 	},
1190967c1d11SAnilkumar Kolli 
1191967c1d11SAnilkumar Kolli 	/* CE7 used only by Host */
1192967c1d11SAnilkumar Kolli 	{
1193967c1d11SAnilkumar Kolli 		.pipenum = __cpu_to_le32(7),
1194967c1d11SAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_OUT),
1195967c1d11SAnilkumar Kolli 		.nentries = __cpu_to_le32(32),
1196967c1d11SAnilkumar Kolli 		.nbytes_max = __cpu_to_le32(2048),
1197967c1d11SAnilkumar Kolli 		.flags = __cpu_to_le32(CE_ATTR_FLAGS),
1198967c1d11SAnilkumar Kolli 		.reserved = __cpu_to_le32(0),
1199967c1d11SAnilkumar Kolli 	},
1200967c1d11SAnilkumar Kolli 
1201967c1d11SAnilkumar Kolli 	/* CE8 target->host used only by IPA */
1202967c1d11SAnilkumar Kolli 	{
1203967c1d11SAnilkumar Kolli 		.pipenum = __cpu_to_le32(8),
1204967c1d11SAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_INOUT),
1205967c1d11SAnilkumar Kolli 		.nentries = __cpu_to_le32(32),
1206967c1d11SAnilkumar Kolli 		.nbytes_max = __cpu_to_le32(65535),
1207967c1d11SAnilkumar Kolli 		.flags = __cpu_to_le32(CE_ATTR_FLAGS),
1208967c1d11SAnilkumar Kolli 		.reserved = __cpu_to_le32(0),
1209967c1d11SAnilkumar Kolli 	},
1210967c1d11SAnilkumar Kolli 
1211967c1d11SAnilkumar Kolli 	/* CE9 host->target HTT */
1212967c1d11SAnilkumar Kolli 	{
1213967c1d11SAnilkumar Kolli 		.pipenum = __cpu_to_le32(9),
1214967c1d11SAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_OUT),
1215967c1d11SAnilkumar Kolli 		.nentries = __cpu_to_le32(32),
1216967c1d11SAnilkumar Kolli 		.nbytes_max = __cpu_to_le32(2048),
1217967c1d11SAnilkumar Kolli 		.flags = __cpu_to_le32(CE_ATTR_FLAGS),
1218967c1d11SAnilkumar Kolli 		.reserved = __cpu_to_le32(0),
1219967c1d11SAnilkumar Kolli 	},
1220967c1d11SAnilkumar Kolli 
1221967c1d11SAnilkumar Kolli 	/* CE10 target->host HTT */
1222967c1d11SAnilkumar Kolli 	{
1223967c1d11SAnilkumar Kolli 		.pipenum = __cpu_to_le32(10),
1224967c1d11SAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_INOUT_H2H),
1225967c1d11SAnilkumar Kolli 		.nentries = __cpu_to_le32(0),
1226967c1d11SAnilkumar Kolli 		.nbytes_max = __cpu_to_le32(0),
1227967c1d11SAnilkumar Kolli 		.flags = __cpu_to_le32(CE_ATTR_FLAGS),
1228967c1d11SAnilkumar Kolli 		.reserved = __cpu_to_le32(0),
1229967c1d11SAnilkumar Kolli 	},
1230967c1d11SAnilkumar Kolli 
1231967c1d11SAnilkumar Kolli 	/* CE11 Not used */
1232967c1d11SAnilkumar Kolli };
1233967c1d11SAnilkumar Kolli 
1234967c1d11SAnilkumar Kolli /* Map from service/endpoint to Copy Engine.
1235967c1d11SAnilkumar Kolli  * This table is derived from the CE_PCI TABLE, above.
1236967c1d11SAnilkumar Kolli  * It is passed to the Target at startup for use by firmware.
1237967c1d11SAnilkumar Kolli  */
1238967c1d11SAnilkumar Kolli const struct service_to_pipe ath11k_target_service_to_ce_map_wlan_ipq8074[] = {
1239967c1d11SAnilkumar Kolli 	{
1240967c1d11SAnilkumar Kolli 		.service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_VO),
1241967c1d11SAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_OUT),	/* out = UL = host -> target */
1242967c1d11SAnilkumar Kolli 		.pipenum = __cpu_to_le32(3),
1243967c1d11SAnilkumar Kolli 	},
1244967c1d11SAnilkumar Kolli 	{
1245967c1d11SAnilkumar Kolli 		.service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_VO),
1246967c1d11SAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_IN),	/* in = DL = target -> host */
1247967c1d11SAnilkumar Kolli 		.pipenum = __cpu_to_le32(2),
1248967c1d11SAnilkumar Kolli 	},
1249967c1d11SAnilkumar Kolli 	{
1250967c1d11SAnilkumar Kolli 		.service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_BK),
1251967c1d11SAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_OUT),	/* out = UL = host -> target */
1252967c1d11SAnilkumar Kolli 		.pipenum = __cpu_to_le32(3),
1253967c1d11SAnilkumar Kolli 	},
1254967c1d11SAnilkumar Kolli 	{
1255967c1d11SAnilkumar Kolli 		.service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_BK),
1256967c1d11SAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_IN),	/* in = DL = target -> host */
1257967c1d11SAnilkumar Kolli 		.pipenum = __cpu_to_le32(2),
1258967c1d11SAnilkumar Kolli 	},
1259967c1d11SAnilkumar Kolli 	{
1260967c1d11SAnilkumar Kolli 		.service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_BE),
1261967c1d11SAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_OUT),	/* out = UL = host -> target */
1262967c1d11SAnilkumar Kolli 		.pipenum = __cpu_to_le32(3),
1263967c1d11SAnilkumar Kolli 	},
1264967c1d11SAnilkumar Kolli 	{
1265967c1d11SAnilkumar Kolli 		.service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_BE),
1266967c1d11SAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_IN),	/* in = DL = target -> host */
1267967c1d11SAnilkumar Kolli 		.pipenum = __cpu_to_le32(2),
1268967c1d11SAnilkumar Kolli 	},
1269967c1d11SAnilkumar Kolli 	{
1270967c1d11SAnilkumar Kolli 		.service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_VI),
1271967c1d11SAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_OUT),	/* out = UL = host -> target */
1272967c1d11SAnilkumar Kolli 		.pipenum = __cpu_to_le32(3),
1273967c1d11SAnilkumar Kolli 	},
1274967c1d11SAnilkumar Kolli 	{
1275967c1d11SAnilkumar Kolli 		.service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_VI),
1276967c1d11SAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_IN),	/* in = DL = target -> host */
1277967c1d11SAnilkumar Kolli 		.pipenum = __cpu_to_le32(2),
1278967c1d11SAnilkumar Kolli 	},
1279967c1d11SAnilkumar Kolli 	{
1280967c1d11SAnilkumar Kolli 		.service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_CONTROL),
1281967c1d11SAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_OUT),	/* out = UL = host -> target */
1282967c1d11SAnilkumar Kolli 		.pipenum = __cpu_to_le32(3),
1283967c1d11SAnilkumar Kolli 	},
1284967c1d11SAnilkumar Kolli 	{
1285967c1d11SAnilkumar Kolli 		.service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_CONTROL),
1286967c1d11SAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_IN),	/* in = DL = target -> host */
1287967c1d11SAnilkumar Kolli 		.pipenum = __cpu_to_le32(2),
1288967c1d11SAnilkumar Kolli 	},
1289967c1d11SAnilkumar Kolli 	{
1290967c1d11SAnilkumar Kolli 		.service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_CONTROL_MAC1),
1291967c1d11SAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_OUT),	/* out = UL = host -> target */
1292967c1d11SAnilkumar Kolli 		.pipenum = __cpu_to_le32(7),
1293967c1d11SAnilkumar Kolli 	},
1294967c1d11SAnilkumar Kolli 	{
1295967c1d11SAnilkumar Kolli 		.service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_CONTROL_MAC1),
1296967c1d11SAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_IN),	/* in = DL = target -> host */
1297967c1d11SAnilkumar Kolli 		.pipenum = __cpu_to_le32(2),
1298967c1d11SAnilkumar Kolli 	},
1299967c1d11SAnilkumar Kolli 	{
1300967c1d11SAnilkumar Kolli 		.service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_CONTROL_MAC2),
1301967c1d11SAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_OUT),	/* out = UL = host -> target */
1302967c1d11SAnilkumar Kolli 		.pipenum = __cpu_to_le32(9),
1303967c1d11SAnilkumar Kolli 	},
1304967c1d11SAnilkumar Kolli 	{
1305967c1d11SAnilkumar Kolli 		.service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_CONTROL_MAC2),
1306967c1d11SAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_IN),	/* in = DL = target -> host */
1307967c1d11SAnilkumar Kolli 		.pipenum = __cpu_to_le32(2),
1308967c1d11SAnilkumar Kolli 	},
1309967c1d11SAnilkumar Kolli 	{
1310967c1d11SAnilkumar Kolli 		.service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_RSVD_CTRL),
1311967c1d11SAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_OUT),	/* out = UL = host -> target */
1312967c1d11SAnilkumar Kolli 		.pipenum = __cpu_to_le32(0),
1313967c1d11SAnilkumar Kolli 	},
1314967c1d11SAnilkumar Kolli 	{
1315967c1d11SAnilkumar Kolli 		.service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_RSVD_CTRL),
1316967c1d11SAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_IN),	/* in = DL = target -> host */
1317967c1d11SAnilkumar Kolli 		.pipenum = __cpu_to_le32(1),
1318967c1d11SAnilkumar Kolli 	},
1319967c1d11SAnilkumar Kolli 	{ /* not used */
1320967c1d11SAnilkumar Kolli 		.service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_TEST_RAW_STREAMS),
1321967c1d11SAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_OUT),	/* out = UL = host -> target */
1322967c1d11SAnilkumar Kolli 		.pipenum = __cpu_to_le32(0),
1323967c1d11SAnilkumar Kolli 	},
1324967c1d11SAnilkumar Kolli 	{ /* not used */
1325967c1d11SAnilkumar Kolli 		.service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_TEST_RAW_STREAMS),
1326967c1d11SAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_IN),	/* in = DL = target -> host */
1327967c1d11SAnilkumar Kolli 		.pipenum = __cpu_to_le32(1),
1328967c1d11SAnilkumar Kolli 	},
1329967c1d11SAnilkumar Kolli 	{
1330967c1d11SAnilkumar Kolli 		.service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_HTT_DATA_MSG),
1331967c1d11SAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_OUT),	/* out = UL = host -> target */
1332967c1d11SAnilkumar Kolli 		.pipenum = __cpu_to_le32(4),
1333967c1d11SAnilkumar Kolli 	},
1334967c1d11SAnilkumar Kolli 	{
1335967c1d11SAnilkumar Kolli 		.service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_HTT_DATA_MSG),
1336967c1d11SAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_IN),	/* in = DL = target -> host */
1337967c1d11SAnilkumar Kolli 		.pipenum = __cpu_to_le32(1),
1338967c1d11SAnilkumar Kolli 	},
1339967c1d11SAnilkumar Kolli 	{
1340967c1d11SAnilkumar Kolli 		.service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_PKT_LOG),
1341967c1d11SAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_IN),	/* in = DL = target -> host */
1342967c1d11SAnilkumar Kolli 		.pipenum = __cpu_to_le32(5),
1343967c1d11SAnilkumar Kolli 	},
1344967c1d11SAnilkumar Kolli 
1345967c1d11SAnilkumar Kolli 	/* (Additions here) */
1346967c1d11SAnilkumar Kolli 
1347967c1d11SAnilkumar Kolli 	{ /* terminator entry */ }
1348967c1d11SAnilkumar Kolli };
1349967c1d11SAnilkumar Kolli 
1350b129699aSAnilkumar Kolli const struct service_to_pipe ath11k_target_service_to_ce_map_wlan_ipq6018[] = {
1351b129699aSAnilkumar Kolli 	{
1352b129699aSAnilkumar Kolli 		.service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_VO),
1353b129699aSAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_OUT),	/* out = UL = host -> target */
1354b129699aSAnilkumar Kolli 		.pipenum = __cpu_to_le32(3),
1355b129699aSAnilkumar Kolli 	},
1356b129699aSAnilkumar Kolli 	{
1357b129699aSAnilkumar Kolli 		.service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_VO),
1358b129699aSAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_IN),	/* in = DL = target -> host */
1359b129699aSAnilkumar Kolli 		.pipenum = __cpu_to_le32(2),
1360b129699aSAnilkumar Kolli 	},
1361b129699aSAnilkumar Kolli 	{
1362b129699aSAnilkumar Kolli 		.service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_BK),
1363b129699aSAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_OUT),	/* out = UL = host -> target */
1364b129699aSAnilkumar Kolli 		.pipenum = __cpu_to_le32(3),
1365b129699aSAnilkumar Kolli 	},
1366b129699aSAnilkumar Kolli 	{
1367b129699aSAnilkumar Kolli 		.service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_BK),
1368b129699aSAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_IN),	/* in = DL = target -> host */
1369b129699aSAnilkumar Kolli 		.pipenum = __cpu_to_le32(2),
1370b129699aSAnilkumar Kolli 	},
1371b129699aSAnilkumar Kolli 	{
1372b129699aSAnilkumar Kolli 		.service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_BE),
1373b129699aSAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_OUT),	/* out = UL = host -> target */
1374b129699aSAnilkumar Kolli 		.pipenum = __cpu_to_le32(3),
1375b129699aSAnilkumar Kolli 	},
1376b129699aSAnilkumar Kolli 	{
1377b129699aSAnilkumar Kolli 		.service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_BE),
1378b129699aSAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_IN),	/* in = DL = target -> host */
1379b129699aSAnilkumar Kolli 		.pipenum = __cpu_to_le32(2),
1380b129699aSAnilkumar Kolli 	},
1381b129699aSAnilkumar Kolli 	{
1382b129699aSAnilkumar Kolli 		.service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_VI),
1383b129699aSAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_OUT),	/* out = UL = host -> target */
1384b129699aSAnilkumar Kolli 		.pipenum = __cpu_to_le32(3),
1385b129699aSAnilkumar Kolli 	},
1386b129699aSAnilkumar Kolli 	{
1387b129699aSAnilkumar Kolli 		.service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_VI),
1388b129699aSAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_IN),	/* in = DL = target -> host */
1389b129699aSAnilkumar Kolli 		.pipenum = __cpu_to_le32(2),
1390b129699aSAnilkumar Kolli 	},
1391b129699aSAnilkumar Kolli 	{
1392b129699aSAnilkumar Kolli 		.service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_CONTROL),
1393b129699aSAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_OUT),	/* out = UL = host -> target */
1394b129699aSAnilkumar Kolli 		.pipenum = __cpu_to_le32(3),
1395b129699aSAnilkumar Kolli 	},
1396b129699aSAnilkumar Kolli 	{
1397b129699aSAnilkumar Kolli 		.service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_CONTROL),
1398b129699aSAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_IN),	/* in = DL = target -> host */
1399b129699aSAnilkumar Kolli 		.pipenum = __cpu_to_le32(2),
1400b129699aSAnilkumar Kolli 	},
1401b129699aSAnilkumar Kolli 	{
1402b129699aSAnilkumar Kolli 		.service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_CONTROL_MAC1),
1403b129699aSAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_OUT),	/* out = UL = host -> target */
1404b129699aSAnilkumar Kolli 		.pipenum = __cpu_to_le32(7),
1405b129699aSAnilkumar Kolli 	},
1406b129699aSAnilkumar Kolli 	{
1407b129699aSAnilkumar Kolli 		.service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_CONTROL_MAC1),
1408b129699aSAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_IN),	/* in = DL = target -> host */
1409b129699aSAnilkumar Kolli 		.pipenum = __cpu_to_le32(2),
1410b129699aSAnilkumar Kolli 	},
1411b129699aSAnilkumar Kolli 	{
1412b129699aSAnilkumar Kolli 		.service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_RSVD_CTRL),
1413b129699aSAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_OUT),	/* out = UL = host -> target */
1414b129699aSAnilkumar Kolli 		.pipenum = __cpu_to_le32(0),
1415b129699aSAnilkumar Kolli 	},
1416b129699aSAnilkumar Kolli 	{
1417b129699aSAnilkumar Kolli 		.service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_RSVD_CTRL),
1418b129699aSAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_IN),	/* in = DL = target -> host */
1419b129699aSAnilkumar Kolli 		.pipenum = __cpu_to_le32(1),
1420b129699aSAnilkumar Kolli 	},
1421b129699aSAnilkumar Kolli 	{ /* not used */
1422b129699aSAnilkumar Kolli 		.service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_TEST_RAW_STREAMS),
1423b129699aSAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_OUT),	/* out = UL = host -> target */
1424b129699aSAnilkumar Kolli 		.pipenum = __cpu_to_le32(0),
1425b129699aSAnilkumar Kolli 	},
1426b129699aSAnilkumar Kolli 	{ /* not used */
1427b129699aSAnilkumar Kolli 		.service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_TEST_RAW_STREAMS),
1428b129699aSAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_IN),	/* in = DL = target -> host */
1429b129699aSAnilkumar Kolli 		.pipenum = __cpu_to_le32(1),
1430b129699aSAnilkumar Kolli 	},
1431b129699aSAnilkumar Kolli 	{
1432b129699aSAnilkumar Kolli 		.service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_HTT_DATA_MSG),
1433b129699aSAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_OUT),	/* out = UL = host -> target */
1434b129699aSAnilkumar Kolli 		.pipenum = __cpu_to_le32(4),
1435b129699aSAnilkumar Kolli 	},
1436b129699aSAnilkumar Kolli 	{
1437b129699aSAnilkumar Kolli 		.service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_HTT_DATA_MSG),
1438b129699aSAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_IN),	/* in = DL = target -> host */
1439b129699aSAnilkumar Kolli 		.pipenum = __cpu_to_le32(1),
1440b129699aSAnilkumar Kolli 	},
1441b129699aSAnilkumar Kolli 	{
1442b129699aSAnilkumar Kolli 		.service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_PKT_LOG),
1443b129699aSAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_IN),	/* in = DL = target -> host */
1444b129699aSAnilkumar Kolli 		.pipenum = __cpu_to_le32(5),
1445b129699aSAnilkumar Kolli 	},
1446b129699aSAnilkumar Kolli 
1447b129699aSAnilkumar Kolli 	/* (Additions here) */
1448b129699aSAnilkumar Kolli 
1449b129699aSAnilkumar Kolli 	{ /* terminator entry */ }
1450b129699aSAnilkumar Kolli };
1451b129699aSAnilkumar Kolli 
1452967c1d11SAnilkumar Kolli /* Target firmware's Copy Engine configuration. */
1453967c1d11SAnilkumar Kolli const struct ce_pipe_config ath11k_target_ce_config_wlan_qca6390[] = {
1454967c1d11SAnilkumar Kolli 	/* CE0: host->target HTC control and raw streams */
1455967c1d11SAnilkumar Kolli 	{
1456967c1d11SAnilkumar Kolli 		.pipenum = __cpu_to_le32(0),
1457967c1d11SAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_OUT),
1458967c1d11SAnilkumar Kolli 		.nentries = __cpu_to_le32(32),
1459967c1d11SAnilkumar Kolli 		.nbytes_max = __cpu_to_le32(2048),
1460967c1d11SAnilkumar Kolli 		.flags = __cpu_to_le32(CE_ATTR_FLAGS),
1461967c1d11SAnilkumar Kolli 		.reserved = __cpu_to_le32(0),
1462967c1d11SAnilkumar Kolli 	},
1463967c1d11SAnilkumar Kolli 
1464967c1d11SAnilkumar Kolli 	/* CE1: target->host HTT + HTC control */
1465967c1d11SAnilkumar Kolli 	{
1466967c1d11SAnilkumar Kolli 		.pipenum = __cpu_to_le32(1),
1467967c1d11SAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_IN),
1468967c1d11SAnilkumar Kolli 		.nentries = __cpu_to_le32(32),
1469967c1d11SAnilkumar Kolli 		.nbytes_max = __cpu_to_le32(2048),
1470967c1d11SAnilkumar Kolli 		.flags = __cpu_to_le32(CE_ATTR_FLAGS),
1471967c1d11SAnilkumar Kolli 		.reserved = __cpu_to_le32(0),
1472967c1d11SAnilkumar Kolli 	},
1473967c1d11SAnilkumar Kolli 
1474967c1d11SAnilkumar Kolli 	/* CE2: target->host WMI */
1475967c1d11SAnilkumar Kolli 	{
1476967c1d11SAnilkumar Kolli 		.pipenum = __cpu_to_le32(2),
1477967c1d11SAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_IN),
1478967c1d11SAnilkumar Kolli 		.nentries = __cpu_to_le32(32),
1479967c1d11SAnilkumar Kolli 		.nbytes_max = __cpu_to_le32(2048),
1480967c1d11SAnilkumar Kolli 		.flags = __cpu_to_le32(CE_ATTR_FLAGS),
1481967c1d11SAnilkumar Kolli 		.reserved = __cpu_to_le32(0),
1482967c1d11SAnilkumar Kolli 	},
1483967c1d11SAnilkumar Kolli 
1484967c1d11SAnilkumar Kolli 	/* CE3: host->target WMI */
1485967c1d11SAnilkumar Kolli 	{
1486967c1d11SAnilkumar Kolli 		.pipenum = __cpu_to_le32(3),
1487967c1d11SAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_OUT),
1488967c1d11SAnilkumar Kolli 		.nentries = __cpu_to_le32(32),
1489967c1d11SAnilkumar Kolli 		.nbytes_max = __cpu_to_le32(2048),
1490967c1d11SAnilkumar Kolli 		.flags = __cpu_to_le32(CE_ATTR_FLAGS),
1491967c1d11SAnilkumar Kolli 		.reserved = __cpu_to_le32(0),
1492967c1d11SAnilkumar Kolli 	},
1493967c1d11SAnilkumar Kolli 
1494967c1d11SAnilkumar Kolli 	/* CE4: host->target HTT */
1495967c1d11SAnilkumar Kolli 	{
1496967c1d11SAnilkumar Kolli 		.pipenum = __cpu_to_le32(4),
1497967c1d11SAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_OUT),
1498967c1d11SAnilkumar Kolli 		.nentries = __cpu_to_le32(256),
1499967c1d11SAnilkumar Kolli 		.nbytes_max = __cpu_to_le32(256),
1500967c1d11SAnilkumar Kolli 		.flags = __cpu_to_le32(CE_ATTR_FLAGS | CE_ATTR_DIS_INTR),
1501967c1d11SAnilkumar Kolli 		.reserved = __cpu_to_le32(0),
1502967c1d11SAnilkumar Kolli 	},
1503967c1d11SAnilkumar Kolli 
1504967c1d11SAnilkumar Kolli 	/* CE5: target->host Pktlog */
1505967c1d11SAnilkumar Kolli 	{
1506967c1d11SAnilkumar Kolli 		.pipenum = __cpu_to_le32(5),
1507967c1d11SAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_IN),
1508967c1d11SAnilkumar Kolli 		.nentries = __cpu_to_le32(32),
1509967c1d11SAnilkumar Kolli 		.nbytes_max = __cpu_to_le32(2048),
1510967c1d11SAnilkumar Kolli 		.flags = __cpu_to_le32(CE_ATTR_FLAGS),
1511967c1d11SAnilkumar Kolli 		.reserved = __cpu_to_le32(0),
1512967c1d11SAnilkumar Kolli 	},
1513967c1d11SAnilkumar Kolli 
1514967c1d11SAnilkumar Kolli 	/* CE6: Reserved for target autonomous hif_memcpy */
1515967c1d11SAnilkumar Kolli 	{
1516967c1d11SAnilkumar Kolli 		.pipenum = __cpu_to_le32(6),
1517967c1d11SAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_INOUT),
1518967c1d11SAnilkumar Kolli 		.nentries = __cpu_to_le32(32),
1519967c1d11SAnilkumar Kolli 		.nbytes_max = __cpu_to_le32(16384),
1520967c1d11SAnilkumar Kolli 		.flags = __cpu_to_le32(CE_ATTR_FLAGS),
1521967c1d11SAnilkumar Kolli 		.reserved = __cpu_to_le32(0),
1522967c1d11SAnilkumar Kolli 	},
1523967c1d11SAnilkumar Kolli 
1524967c1d11SAnilkumar Kolli 	/* CE7 used only by Host */
1525967c1d11SAnilkumar Kolli 	{
1526967c1d11SAnilkumar Kolli 		.pipenum = __cpu_to_le32(7),
1527967c1d11SAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_INOUT_H2H),
1528967c1d11SAnilkumar Kolli 		.nentries = __cpu_to_le32(0),
1529967c1d11SAnilkumar Kolli 		.nbytes_max = __cpu_to_le32(0),
1530967c1d11SAnilkumar Kolli 		.flags = __cpu_to_le32(CE_ATTR_FLAGS | CE_ATTR_DIS_INTR),
1531967c1d11SAnilkumar Kolli 		.reserved = __cpu_to_le32(0),
1532967c1d11SAnilkumar Kolli 	},
1533967c1d11SAnilkumar Kolli 
1534967c1d11SAnilkumar Kolli 	/* CE8 target->host used only by IPA */
1535967c1d11SAnilkumar Kolli 	{
1536967c1d11SAnilkumar Kolli 		.pipenum = __cpu_to_le32(8),
1537967c1d11SAnilkumar Kolli 		.pipedir = __cpu_to_le32(PIPEDIR_INOUT),
1538967c1d11SAnilkumar Kolli 		.nentries = __cpu_to_le32(32),
1539967c1d11SAnilkumar Kolli 		.nbytes_max = __cpu_to_le32(16384),
1540967c1d11SAnilkumar Kolli 		.flags = __cpu_to_le32(CE_ATTR_FLAGS),
1541967c1d11SAnilkumar Kolli 		.reserved = __cpu_to_le32(0),
1542967c1d11SAnilkumar Kolli 	},
1543967c1d11SAnilkumar Kolli 	/* CE 9, 10, 11 are used by MHI driver */
1544967c1d11SAnilkumar Kolli };
1545967c1d11SAnilkumar Kolli 
1546967c1d11SAnilkumar Kolli /* Map from service/endpoint to Copy Engine.
1547967c1d11SAnilkumar Kolli  * This table is derived from the CE_PCI TABLE, above.
1548967c1d11SAnilkumar Kolli  * It is passed to the Target at startup for use by firmware.
1549967c1d11SAnilkumar Kolli  */
1550967c1d11SAnilkumar Kolli const struct service_to_pipe ath11k_target_service_to_ce_map_wlan_qca6390[] = {
1551967c1d11SAnilkumar Kolli 	{
1552967c1d11SAnilkumar Kolli 		__cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_VO),
1553967c1d11SAnilkumar Kolli 		__cpu_to_le32(PIPEDIR_OUT),	/* out = UL = host -> target */
1554967c1d11SAnilkumar Kolli 		__cpu_to_le32(3),
1555967c1d11SAnilkumar Kolli 	},
1556967c1d11SAnilkumar Kolli 	{
1557967c1d11SAnilkumar Kolli 		__cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_VO),
1558967c1d11SAnilkumar Kolli 		__cpu_to_le32(PIPEDIR_IN),	/* in = DL = target -> host */
1559967c1d11SAnilkumar Kolli 		__cpu_to_le32(2),
1560967c1d11SAnilkumar Kolli 	},
1561967c1d11SAnilkumar Kolli 	{
1562967c1d11SAnilkumar Kolli 		__cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_BK),
1563967c1d11SAnilkumar Kolli 		__cpu_to_le32(PIPEDIR_OUT),	/* out = UL = host -> target */
1564967c1d11SAnilkumar Kolli 		__cpu_to_le32(3),
1565967c1d11SAnilkumar Kolli 	},
1566967c1d11SAnilkumar Kolli 	{
1567967c1d11SAnilkumar Kolli 		__cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_BK),
1568967c1d11SAnilkumar Kolli 		__cpu_to_le32(PIPEDIR_IN),	/* in = DL = target -> host */
1569967c1d11SAnilkumar Kolli 		__cpu_to_le32(2),
1570967c1d11SAnilkumar Kolli 	},
1571967c1d11SAnilkumar Kolli 	{
1572967c1d11SAnilkumar Kolli 		__cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_BE),
1573967c1d11SAnilkumar Kolli 		__cpu_to_le32(PIPEDIR_OUT),	/* out = UL = host -> target */
1574967c1d11SAnilkumar Kolli 		__cpu_to_le32(3),
1575967c1d11SAnilkumar Kolli 	},
1576967c1d11SAnilkumar Kolli 	{
1577967c1d11SAnilkumar Kolli 		__cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_BE),
1578967c1d11SAnilkumar Kolli 		__cpu_to_le32(PIPEDIR_IN),	/* in = DL = target -> host */
1579967c1d11SAnilkumar Kolli 		__cpu_to_le32(2),
1580967c1d11SAnilkumar Kolli 	},
1581967c1d11SAnilkumar Kolli 	{
1582967c1d11SAnilkumar Kolli 		__cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_VI),
1583967c1d11SAnilkumar Kolli 		__cpu_to_le32(PIPEDIR_OUT),	/* out = UL = host -> target */
1584967c1d11SAnilkumar Kolli 		__cpu_to_le32(3),
1585967c1d11SAnilkumar Kolli 	},
1586967c1d11SAnilkumar Kolli 	{
1587967c1d11SAnilkumar Kolli 		__cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_VI),
1588967c1d11SAnilkumar Kolli 		__cpu_to_le32(PIPEDIR_IN),	/* in = DL = target -> host */
1589967c1d11SAnilkumar Kolli 		__cpu_to_le32(2),
1590967c1d11SAnilkumar Kolli 	},
1591967c1d11SAnilkumar Kolli 	{
1592967c1d11SAnilkumar Kolli 		__cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_CONTROL),
1593967c1d11SAnilkumar Kolli 		__cpu_to_le32(PIPEDIR_OUT),	/* out = UL = host -> target */
1594967c1d11SAnilkumar Kolli 		__cpu_to_le32(3),
1595967c1d11SAnilkumar Kolli 	},
1596967c1d11SAnilkumar Kolli 	{
1597967c1d11SAnilkumar Kolli 		__cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_CONTROL),
1598967c1d11SAnilkumar Kolli 		__cpu_to_le32(PIPEDIR_IN),	/* in = DL = target -> host */
1599967c1d11SAnilkumar Kolli 		__cpu_to_le32(2),
1600967c1d11SAnilkumar Kolli 	},
1601967c1d11SAnilkumar Kolli 	{
1602967c1d11SAnilkumar Kolli 		__cpu_to_le32(ATH11K_HTC_SVC_ID_RSVD_CTRL),
1603967c1d11SAnilkumar Kolli 		__cpu_to_le32(PIPEDIR_OUT),	/* out = UL = host -> target */
1604967c1d11SAnilkumar Kolli 		__cpu_to_le32(0),
1605967c1d11SAnilkumar Kolli 	},
1606967c1d11SAnilkumar Kolli 	{
1607967c1d11SAnilkumar Kolli 		__cpu_to_le32(ATH11K_HTC_SVC_ID_RSVD_CTRL),
1608967c1d11SAnilkumar Kolli 		__cpu_to_le32(PIPEDIR_IN),	/* in = DL = target -> host */
1609967c1d11SAnilkumar Kolli 		__cpu_to_le32(2),
1610967c1d11SAnilkumar Kolli 	},
1611967c1d11SAnilkumar Kolli 	{
1612967c1d11SAnilkumar Kolli 		__cpu_to_le32(ATH11K_HTC_SVC_ID_HTT_DATA_MSG),
1613967c1d11SAnilkumar Kolli 		__cpu_to_le32(PIPEDIR_OUT),	/* out = UL = host -> target */
1614967c1d11SAnilkumar Kolli 		__cpu_to_le32(4),
1615967c1d11SAnilkumar Kolli 	},
1616967c1d11SAnilkumar Kolli 	{
1617967c1d11SAnilkumar Kolli 		__cpu_to_le32(ATH11K_HTC_SVC_ID_HTT_DATA_MSG),
1618967c1d11SAnilkumar Kolli 		__cpu_to_le32(PIPEDIR_IN),	/* in = DL = target -> host */
1619967c1d11SAnilkumar Kolli 		__cpu_to_le32(1),
1620967c1d11SAnilkumar Kolli 	},
1621967c1d11SAnilkumar Kolli 
1622967c1d11SAnilkumar Kolli 	/* (Additions here) */
1623967c1d11SAnilkumar Kolli 
1624967c1d11SAnilkumar Kolli 	{ /* must be last */
1625967c1d11SAnilkumar Kolli 		__cpu_to_le32(0),
1626967c1d11SAnilkumar Kolli 		__cpu_to_le32(0),
1627967c1d11SAnilkumar Kolli 		__cpu_to_le32(0),
1628967c1d11SAnilkumar Kolli 	},
1629967c1d11SAnilkumar Kolli };
1630967c1d11SAnilkumar Kolli 
16316289ac2bSKarthikeyan Periyasamy /* Target firmware's Copy Engine configuration. */
16326289ac2bSKarthikeyan Periyasamy const struct ce_pipe_config ath11k_target_ce_config_wlan_qcn9074[] = {
16336289ac2bSKarthikeyan Periyasamy 	/* CE0: host->target HTC control and raw streams */
16346289ac2bSKarthikeyan Periyasamy 	{
16356289ac2bSKarthikeyan Periyasamy 		.pipenum = __cpu_to_le32(0),
16366289ac2bSKarthikeyan Periyasamy 		.pipedir = __cpu_to_le32(PIPEDIR_OUT),
16376289ac2bSKarthikeyan Periyasamy 		.nentries = __cpu_to_le32(32),
16386289ac2bSKarthikeyan Periyasamy 		.nbytes_max = __cpu_to_le32(2048),
16396289ac2bSKarthikeyan Periyasamy 		.flags = __cpu_to_le32(CE_ATTR_FLAGS),
16406289ac2bSKarthikeyan Periyasamy 		.reserved = __cpu_to_le32(0),
16416289ac2bSKarthikeyan Periyasamy 	},
16426289ac2bSKarthikeyan Periyasamy 
16436289ac2bSKarthikeyan Periyasamy 	/* CE1: target->host HTT + HTC control */
16446289ac2bSKarthikeyan Periyasamy 	{
16456289ac2bSKarthikeyan Periyasamy 		.pipenum = __cpu_to_le32(1),
16466289ac2bSKarthikeyan Periyasamy 		.pipedir = __cpu_to_le32(PIPEDIR_IN),
16476289ac2bSKarthikeyan Periyasamy 		.nentries = __cpu_to_le32(32),
16486289ac2bSKarthikeyan Periyasamy 		.nbytes_max = __cpu_to_le32(2048),
16496289ac2bSKarthikeyan Periyasamy 		.flags = __cpu_to_le32(CE_ATTR_FLAGS),
16506289ac2bSKarthikeyan Periyasamy 		.reserved = __cpu_to_le32(0),
16516289ac2bSKarthikeyan Periyasamy 	},
16526289ac2bSKarthikeyan Periyasamy 
16536289ac2bSKarthikeyan Periyasamy 	/* CE2: target->host WMI */
16546289ac2bSKarthikeyan Periyasamy 	{
16556289ac2bSKarthikeyan Periyasamy 		.pipenum = __cpu_to_le32(2),
16566289ac2bSKarthikeyan Periyasamy 		.pipedir = __cpu_to_le32(PIPEDIR_IN),
16576289ac2bSKarthikeyan Periyasamy 		.nentries = __cpu_to_le32(32),
16586289ac2bSKarthikeyan Periyasamy 		.nbytes_max = __cpu_to_le32(2048),
16596289ac2bSKarthikeyan Periyasamy 		.flags = __cpu_to_le32(CE_ATTR_FLAGS),
16606289ac2bSKarthikeyan Periyasamy 		.reserved = __cpu_to_le32(0),
16616289ac2bSKarthikeyan Periyasamy 	},
16626289ac2bSKarthikeyan Periyasamy 
16636289ac2bSKarthikeyan Periyasamy 	/* CE3: host->target WMI */
16646289ac2bSKarthikeyan Periyasamy 	{
16656289ac2bSKarthikeyan Periyasamy 		.pipenum = __cpu_to_le32(3),
16666289ac2bSKarthikeyan Periyasamy 		.pipedir = __cpu_to_le32(PIPEDIR_OUT),
16676289ac2bSKarthikeyan Periyasamy 		.nentries = __cpu_to_le32(32),
16686289ac2bSKarthikeyan Periyasamy 		.nbytes_max = __cpu_to_le32(2048),
16696289ac2bSKarthikeyan Periyasamy 		.flags = __cpu_to_le32(CE_ATTR_FLAGS),
16706289ac2bSKarthikeyan Periyasamy 		.reserved = __cpu_to_le32(0),
16716289ac2bSKarthikeyan Periyasamy 	},
16726289ac2bSKarthikeyan Periyasamy 
16736289ac2bSKarthikeyan Periyasamy 	/* CE4: host->target HTT */
16746289ac2bSKarthikeyan Periyasamy 	{
16756289ac2bSKarthikeyan Periyasamy 		.pipenum = __cpu_to_le32(4),
16766289ac2bSKarthikeyan Periyasamy 		.pipedir = __cpu_to_le32(PIPEDIR_OUT),
16776289ac2bSKarthikeyan Periyasamy 		.nentries = __cpu_to_le32(256),
16786289ac2bSKarthikeyan Periyasamy 		.nbytes_max = __cpu_to_le32(256),
16796289ac2bSKarthikeyan Periyasamy 		.flags = __cpu_to_le32(CE_ATTR_FLAGS | CE_ATTR_DIS_INTR),
16806289ac2bSKarthikeyan Periyasamy 		.reserved = __cpu_to_le32(0),
16816289ac2bSKarthikeyan Periyasamy 	},
16826289ac2bSKarthikeyan Periyasamy 
16836289ac2bSKarthikeyan Periyasamy 	/* CE5: target->host Pktlog */
16846289ac2bSKarthikeyan Periyasamy 	{
16856289ac2bSKarthikeyan Periyasamy 		.pipenum = __cpu_to_le32(5),
16866289ac2bSKarthikeyan Periyasamy 		.pipedir = __cpu_to_le32(PIPEDIR_IN),
16876289ac2bSKarthikeyan Periyasamy 		.nentries = __cpu_to_le32(32),
16886289ac2bSKarthikeyan Periyasamy 		.nbytes_max = __cpu_to_le32(2048),
16896289ac2bSKarthikeyan Periyasamy 		.flags = __cpu_to_le32(CE_ATTR_FLAGS),
16906289ac2bSKarthikeyan Periyasamy 		.reserved = __cpu_to_le32(0),
16916289ac2bSKarthikeyan Periyasamy 	},
16926289ac2bSKarthikeyan Periyasamy 
16936289ac2bSKarthikeyan Periyasamy 	/* CE6: Reserved for target autonomous hif_memcpy */
16946289ac2bSKarthikeyan Periyasamy 	{
16956289ac2bSKarthikeyan Periyasamy 		.pipenum = __cpu_to_le32(6),
16966289ac2bSKarthikeyan Periyasamy 		.pipedir = __cpu_to_le32(PIPEDIR_INOUT),
16976289ac2bSKarthikeyan Periyasamy 		.nentries = __cpu_to_le32(32),
16986289ac2bSKarthikeyan Periyasamy 		.nbytes_max = __cpu_to_le32(16384),
16996289ac2bSKarthikeyan Periyasamy 		.flags = __cpu_to_le32(CE_ATTR_FLAGS),
17006289ac2bSKarthikeyan Periyasamy 		.reserved = __cpu_to_le32(0),
17016289ac2bSKarthikeyan Periyasamy 	},
17026289ac2bSKarthikeyan Periyasamy 
17036289ac2bSKarthikeyan Periyasamy 	/* CE7 used only by Host */
17046289ac2bSKarthikeyan Periyasamy 	{
17056289ac2bSKarthikeyan Periyasamy 		.pipenum = __cpu_to_le32(7),
17066289ac2bSKarthikeyan Periyasamy 		.pipedir = __cpu_to_le32(PIPEDIR_INOUT_H2H),
17076289ac2bSKarthikeyan Periyasamy 		.nentries = __cpu_to_le32(0),
17086289ac2bSKarthikeyan Periyasamy 		.nbytes_max = __cpu_to_le32(0),
17096289ac2bSKarthikeyan Periyasamy 		.flags = __cpu_to_le32(CE_ATTR_FLAGS | CE_ATTR_DIS_INTR),
17106289ac2bSKarthikeyan Periyasamy 		.reserved = __cpu_to_le32(0),
17116289ac2bSKarthikeyan Periyasamy 	},
17126289ac2bSKarthikeyan Periyasamy 
17136289ac2bSKarthikeyan Periyasamy 	/* CE8 target->host used only by IPA */
17146289ac2bSKarthikeyan Periyasamy 	{
17156289ac2bSKarthikeyan Periyasamy 		.pipenum = __cpu_to_le32(8),
17166289ac2bSKarthikeyan Periyasamy 		.pipedir = __cpu_to_le32(PIPEDIR_INOUT),
17176289ac2bSKarthikeyan Periyasamy 		.nentries = __cpu_to_le32(32),
17186289ac2bSKarthikeyan Periyasamy 		.nbytes_max = __cpu_to_le32(16384),
17196289ac2bSKarthikeyan Periyasamy 		.flags = __cpu_to_le32(CE_ATTR_FLAGS),
17206289ac2bSKarthikeyan Periyasamy 		.reserved = __cpu_to_le32(0),
17216289ac2bSKarthikeyan Periyasamy 	},
17226289ac2bSKarthikeyan Periyasamy 	/* CE 9, 10, 11 are used by MHI driver */
17236289ac2bSKarthikeyan Periyasamy };
17246289ac2bSKarthikeyan Periyasamy 
17256289ac2bSKarthikeyan Periyasamy /* Map from service/endpoint to Copy Engine.
17266289ac2bSKarthikeyan Periyasamy  * This table is derived from the CE_PCI TABLE, above.
17276289ac2bSKarthikeyan Periyasamy  * It is passed to the Target at startup for use by firmware.
17286289ac2bSKarthikeyan Periyasamy  */
17296289ac2bSKarthikeyan Periyasamy const struct service_to_pipe ath11k_target_service_to_ce_map_wlan_qcn9074[] = {
17306289ac2bSKarthikeyan Periyasamy 	{
17316289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_VO),
17326289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(PIPEDIR_OUT),	/* out = UL = host -> target */
17336289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(3),
17346289ac2bSKarthikeyan Periyasamy 	},
17356289ac2bSKarthikeyan Periyasamy 	{
17366289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_VO),
17376289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(PIPEDIR_IN),	/* in = DL = target -> host */
17386289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(2),
17396289ac2bSKarthikeyan Periyasamy 	},
17406289ac2bSKarthikeyan Periyasamy 	{
17416289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_BK),
17426289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(PIPEDIR_OUT),	/* out = UL = host -> target */
17436289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(3),
17446289ac2bSKarthikeyan Periyasamy 	},
17456289ac2bSKarthikeyan Periyasamy 	{
17466289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_BK),
17476289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(PIPEDIR_IN),	/* in = DL = target -> host */
17486289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(2),
17496289ac2bSKarthikeyan Periyasamy 	},
17506289ac2bSKarthikeyan Periyasamy 	{
17516289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_BE),
17526289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(PIPEDIR_OUT),	/* out = UL = host -> target */
17536289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(3),
17546289ac2bSKarthikeyan Periyasamy 	},
17556289ac2bSKarthikeyan Periyasamy 	{
17566289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_BE),
17576289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(PIPEDIR_IN),	/* in = DL = target -> host */
17586289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(2),
17596289ac2bSKarthikeyan Periyasamy 	},
17606289ac2bSKarthikeyan Periyasamy 	{
17616289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_VI),
17626289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(PIPEDIR_OUT),	/* out = UL = host -> target */
17636289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(3),
17646289ac2bSKarthikeyan Periyasamy 	},
17656289ac2bSKarthikeyan Periyasamy 	{
17666289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_VI),
17676289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(PIPEDIR_IN),	/* in = DL = target -> host */
17686289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(2),
17696289ac2bSKarthikeyan Periyasamy 	},
17706289ac2bSKarthikeyan Periyasamy 	{
17716289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_CONTROL),
17726289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(PIPEDIR_OUT),	/* out = UL = host -> target */
17736289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(3),
17746289ac2bSKarthikeyan Periyasamy 	},
17756289ac2bSKarthikeyan Periyasamy 	{
17766289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_CONTROL),
17776289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(PIPEDIR_IN),	/* in = DL = target -> host */
17786289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(2),
17796289ac2bSKarthikeyan Periyasamy 	},
17806289ac2bSKarthikeyan Periyasamy 	{
17816289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(ATH11K_HTC_SVC_ID_RSVD_CTRL),
17826289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(PIPEDIR_OUT),	/* out = UL = host -> target */
17836289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(0),
17846289ac2bSKarthikeyan Periyasamy 	},
17856289ac2bSKarthikeyan Periyasamy 	{
17866289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(ATH11K_HTC_SVC_ID_RSVD_CTRL),
17876289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(PIPEDIR_IN),	/* in = DL = target -> host */
17886289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(1),
17896289ac2bSKarthikeyan Periyasamy 	},
17906289ac2bSKarthikeyan Periyasamy 	{
17916289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(ATH11K_HTC_SVC_ID_TEST_RAW_STREAMS),
17926289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(PIPEDIR_OUT),	/* out = UL = host -> target */
17936289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(0),
17946289ac2bSKarthikeyan Periyasamy 	},
17956289ac2bSKarthikeyan Periyasamy 	{
17966289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(ATH11K_HTC_SVC_ID_TEST_RAW_STREAMS),
17976289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(PIPEDIR_IN),	/* in = DL = target -> host */
17986289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(1),
17996289ac2bSKarthikeyan Periyasamy 	},
18006289ac2bSKarthikeyan Periyasamy 	{
18016289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(ATH11K_HTC_SVC_ID_HTT_DATA_MSG),
18026289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(PIPEDIR_OUT),	/* out = UL = host -> target */
18036289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(4),
18046289ac2bSKarthikeyan Periyasamy 	},
18056289ac2bSKarthikeyan Periyasamy 	{
18066289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(ATH11K_HTC_SVC_ID_HTT_DATA_MSG),
18076289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(PIPEDIR_IN),	/* in = DL = target -> host */
18086289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(1),
18096289ac2bSKarthikeyan Periyasamy 	},
18106289ac2bSKarthikeyan Periyasamy 	{
18116289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(ATH11K_HTC_SVC_ID_PKT_LOG),
18126289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(PIPEDIR_IN),	/* in = DL = target -> host */
18136289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(5),
18146289ac2bSKarthikeyan Periyasamy 	},
18156289ac2bSKarthikeyan Periyasamy 
18166289ac2bSKarthikeyan Periyasamy 	/* (Additions here) */
18176289ac2bSKarthikeyan Periyasamy 
18186289ac2bSKarthikeyan Periyasamy 	{ /* must be last */
18196289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(0),
18206289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(0),
18216289ac2bSKarthikeyan Periyasamy 		__cpu_to_le32(0),
18226289ac2bSKarthikeyan Periyasamy 	},
18236289ac2bSKarthikeyan Periyasamy };
18246289ac2bSKarthikeyan Periyasamy 
18257dc67af0SKarthikeyan Periyasamy const struct ath11k_hw_ring_mask ath11k_hw_ring_mask_qcn9074 = {
18267dc67af0SKarthikeyan Periyasamy 	.tx  = {
18277dc67af0SKarthikeyan Periyasamy 		ATH11K_TX_RING_MASK_0,
18287dc67af0SKarthikeyan Periyasamy 		ATH11K_TX_RING_MASK_1,
18297dc67af0SKarthikeyan Periyasamy 		ATH11K_TX_RING_MASK_2,
18307dc67af0SKarthikeyan Periyasamy 	},
18317dc67af0SKarthikeyan Periyasamy 	.rx_mon_status = {
18327dc67af0SKarthikeyan Periyasamy 		0, 0, 0,
18337dc67af0SKarthikeyan Periyasamy 		ATH11K_RX_MON_STATUS_RING_MASK_0,
18347dc67af0SKarthikeyan Periyasamy 		ATH11K_RX_MON_STATUS_RING_MASK_1,
18357dc67af0SKarthikeyan Periyasamy 		ATH11K_RX_MON_STATUS_RING_MASK_2,
18367dc67af0SKarthikeyan Periyasamy 	},
18377dc67af0SKarthikeyan Periyasamy 	.rx = {
18387dc67af0SKarthikeyan Periyasamy 		0, 0, 0, 0,
18397dc67af0SKarthikeyan Periyasamy 		ATH11K_RX_RING_MASK_0,
18407dc67af0SKarthikeyan Periyasamy 		ATH11K_RX_RING_MASK_1,
18417dc67af0SKarthikeyan Periyasamy 		ATH11K_RX_RING_MASK_2,
18427dc67af0SKarthikeyan Periyasamy 		ATH11K_RX_RING_MASK_3,
18437dc67af0SKarthikeyan Periyasamy 	},
18447dc67af0SKarthikeyan Periyasamy 	.rx_err = {
18457dc67af0SKarthikeyan Periyasamy 		0, 0, 0,
18467dc67af0SKarthikeyan Periyasamy 		ATH11K_RX_ERR_RING_MASK_0,
18477dc67af0SKarthikeyan Periyasamy 	},
18487dc67af0SKarthikeyan Periyasamy 	.rx_wbm_rel = {
18497dc67af0SKarthikeyan Periyasamy 		0, 0, 0,
18507dc67af0SKarthikeyan Periyasamy 		ATH11K_RX_WBM_REL_RING_MASK_0,
18517dc67af0SKarthikeyan Periyasamy 	},
18527dc67af0SKarthikeyan Periyasamy 	.reo_status = {
18537dc67af0SKarthikeyan Periyasamy 		0, 0, 0,
18547dc67af0SKarthikeyan Periyasamy 		ATH11K_REO_STATUS_RING_MASK_0,
18557dc67af0SKarthikeyan Periyasamy 	},
18567dc67af0SKarthikeyan Periyasamy 	.rxdma2host = {
18577dc67af0SKarthikeyan Periyasamy 		0, 0, 0,
18587dc67af0SKarthikeyan Periyasamy 		ATH11K_RXDMA2HOST_RING_MASK_0,
18597dc67af0SKarthikeyan Periyasamy 	},
18607dc67af0SKarthikeyan Periyasamy 	.host2rxdma = {
18617dc67af0SKarthikeyan Periyasamy 		0, 0, 0,
18627dc67af0SKarthikeyan Periyasamy 		ATH11K_HOST2RXDMA_RING_MASK_0,
18637dc67af0SKarthikeyan Periyasamy 	},
18647dc67af0SKarthikeyan Periyasamy };
18657dc67af0SKarthikeyan Periyasamy 
18666976433cSCarl Huang const struct ath11k_hw_regs ipq8074_regs = {
18676976433cSCarl Huang 	/* SW2TCL(x) R0 ring configuration address */
18686976433cSCarl Huang 	.hal_tcl1_ring_base_lsb = 0x00000510,
18696976433cSCarl Huang 	.hal_tcl1_ring_base_msb = 0x00000514,
18706976433cSCarl Huang 	.hal_tcl1_ring_id = 0x00000518,
18716976433cSCarl Huang 	.hal_tcl1_ring_misc = 0x00000520,
18726976433cSCarl Huang 	.hal_tcl1_ring_tp_addr_lsb = 0x0000052c,
18736976433cSCarl Huang 	.hal_tcl1_ring_tp_addr_msb = 0x00000530,
18746976433cSCarl Huang 	.hal_tcl1_ring_consumer_int_setup_ix0 = 0x00000540,
18756976433cSCarl Huang 	.hal_tcl1_ring_consumer_int_setup_ix1 = 0x00000544,
18766976433cSCarl Huang 	.hal_tcl1_ring_msi1_base_lsb = 0x00000558,
18776976433cSCarl Huang 	.hal_tcl1_ring_msi1_base_msb = 0x0000055c,
18786976433cSCarl Huang 	.hal_tcl1_ring_msi1_data = 0x00000560,
18796976433cSCarl Huang 	.hal_tcl2_ring_base_lsb = 0x00000568,
18806976433cSCarl Huang 	.hal_tcl_ring_base_lsb = 0x00000618,
18816976433cSCarl Huang 
18826976433cSCarl Huang 	/* TCL STATUS ring address */
18836976433cSCarl Huang 	.hal_tcl_status_ring_base_lsb = 0x00000720,
18846976433cSCarl Huang 
18856976433cSCarl Huang 	/* REO2SW(x) R0 ring configuration address */
18866976433cSCarl Huang 	.hal_reo1_ring_base_lsb = 0x0000029c,
18876976433cSCarl Huang 	.hal_reo1_ring_base_msb = 0x000002a0,
18886976433cSCarl Huang 	.hal_reo1_ring_id = 0x000002a4,
18896976433cSCarl Huang 	.hal_reo1_ring_misc = 0x000002ac,
18906976433cSCarl Huang 	.hal_reo1_ring_hp_addr_lsb = 0x000002b0,
18916976433cSCarl Huang 	.hal_reo1_ring_hp_addr_msb = 0x000002b4,
18926976433cSCarl Huang 	.hal_reo1_ring_producer_int_setup = 0x000002c0,
18936976433cSCarl Huang 	.hal_reo1_ring_msi1_base_lsb = 0x000002e4,
18946976433cSCarl Huang 	.hal_reo1_ring_msi1_base_msb = 0x000002e8,
18956976433cSCarl Huang 	.hal_reo1_ring_msi1_data = 0x000002ec,
18966976433cSCarl Huang 	.hal_reo2_ring_base_lsb = 0x000002f4,
18976976433cSCarl Huang 	.hal_reo1_aging_thresh_ix_0 = 0x00000564,
18986976433cSCarl Huang 	.hal_reo1_aging_thresh_ix_1 = 0x00000568,
18996976433cSCarl Huang 	.hal_reo1_aging_thresh_ix_2 = 0x0000056c,
19006976433cSCarl Huang 	.hal_reo1_aging_thresh_ix_3 = 0x00000570,
19016976433cSCarl Huang 
19026976433cSCarl Huang 	/* REO2SW(x) R2 ring pointers (head/tail) address */
19036976433cSCarl Huang 	.hal_reo1_ring_hp = 0x00003038,
19046976433cSCarl Huang 	.hal_reo1_ring_tp = 0x0000303c,
19056976433cSCarl Huang 	.hal_reo2_ring_hp = 0x00003040,
19066976433cSCarl Huang 
19076976433cSCarl Huang 	/* REO2TCL R0 ring configuration address */
19086976433cSCarl Huang 	.hal_reo_tcl_ring_base_lsb = 0x000003fc,
19096976433cSCarl Huang 	.hal_reo_tcl_ring_hp = 0x00003058,
19106976433cSCarl Huang 
19116976433cSCarl Huang 	/* REO status address */
19126976433cSCarl Huang 	.hal_reo_status_ring_base_lsb = 0x00000504,
19136976433cSCarl Huang 	.hal_reo_status_hp = 0x00003070,
19146976433cSCarl Huang 
19156fe6f68fSKarthikeyan Periyasamy 	/* WCSS relative address */
19166fe6f68fSKarthikeyan Periyasamy 	.hal_seq_wcss_umac_ce0_src_reg = 0x00a00000,
19176fe6f68fSKarthikeyan Periyasamy 	.hal_seq_wcss_umac_ce0_dst_reg = 0x00a01000,
19186fe6f68fSKarthikeyan Periyasamy 	.hal_seq_wcss_umac_ce1_src_reg = 0x00a02000,
19196fe6f68fSKarthikeyan Periyasamy 	.hal_seq_wcss_umac_ce1_dst_reg = 0x00a03000,
19206fe6f68fSKarthikeyan Periyasamy 
19216fe6f68fSKarthikeyan Periyasamy 	/* WBM Idle address */
19226fe6f68fSKarthikeyan Periyasamy 	.hal_wbm_idle_link_ring_base_lsb = 0x00000860,
19236fe6f68fSKarthikeyan Periyasamy 	.hal_wbm_idle_link_ring_misc = 0x00000870,
19246fe6f68fSKarthikeyan Periyasamy 
19256fe6f68fSKarthikeyan Periyasamy 	/* SW2WBM release address */
19266fe6f68fSKarthikeyan Periyasamy 	.hal_wbm_release_ring_base_lsb = 0x000001d8,
19276fe6f68fSKarthikeyan Periyasamy 
19286fe6f68fSKarthikeyan Periyasamy 	/* WBM2SW release address */
19296fe6f68fSKarthikeyan Periyasamy 	.hal_wbm0_release_ring_base_lsb = 0x00000910,
19306fe6f68fSKarthikeyan Periyasamy 	.hal_wbm1_release_ring_base_lsb = 0x00000968,
19316fe6f68fSKarthikeyan Periyasamy 
19326fe6f68fSKarthikeyan Periyasamy 	/* PCIe base address */
19336fe6f68fSKarthikeyan Periyasamy 	.pcie_qserdes_sysclk_en_sel = 0x0,
19346fe6f68fSKarthikeyan Periyasamy 	.pcie_pcs_osc_dtct_config_base = 0x0,
19356976433cSCarl Huang };
19366976433cSCarl Huang 
19376976433cSCarl Huang const struct ath11k_hw_regs qca6390_regs = {
19386976433cSCarl Huang 	/* SW2TCL(x) R0 ring configuration address */
19396976433cSCarl Huang 	.hal_tcl1_ring_base_lsb = 0x00000684,
19406976433cSCarl Huang 	.hal_tcl1_ring_base_msb = 0x00000688,
19416976433cSCarl Huang 	.hal_tcl1_ring_id = 0x0000068c,
19426976433cSCarl Huang 	.hal_tcl1_ring_misc = 0x00000694,
19436976433cSCarl Huang 	.hal_tcl1_ring_tp_addr_lsb = 0x000006a0,
19446976433cSCarl Huang 	.hal_tcl1_ring_tp_addr_msb = 0x000006a4,
19456976433cSCarl Huang 	.hal_tcl1_ring_consumer_int_setup_ix0 = 0x000006b4,
19466976433cSCarl Huang 	.hal_tcl1_ring_consumer_int_setup_ix1 = 0x000006b8,
19476976433cSCarl Huang 	.hal_tcl1_ring_msi1_base_lsb = 0x000006cc,
19486976433cSCarl Huang 	.hal_tcl1_ring_msi1_base_msb = 0x000006d0,
19496976433cSCarl Huang 	.hal_tcl1_ring_msi1_data = 0x000006d4,
19506976433cSCarl Huang 	.hal_tcl2_ring_base_lsb = 0x000006dc,
19516976433cSCarl Huang 	.hal_tcl_ring_base_lsb = 0x0000078c,
19526976433cSCarl Huang 
19536976433cSCarl Huang 	/* TCL STATUS ring address */
19546976433cSCarl Huang 	.hal_tcl_status_ring_base_lsb = 0x00000894,
19556976433cSCarl Huang 
19566976433cSCarl Huang 	/* REO2SW(x) R0 ring configuration address */
19576976433cSCarl Huang 	.hal_reo1_ring_base_lsb = 0x00000244,
19586976433cSCarl Huang 	.hal_reo1_ring_base_msb = 0x00000248,
19596976433cSCarl Huang 	.hal_reo1_ring_id = 0x0000024c,
19606976433cSCarl Huang 	.hal_reo1_ring_misc = 0x00000254,
19616976433cSCarl Huang 	.hal_reo1_ring_hp_addr_lsb = 0x00000258,
19626976433cSCarl Huang 	.hal_reo1_ring_hp_addr_msb = 0x0000025c,
19636976433cSCarl Huang 	.hal_reo1_ring_producer_int_setup = 0x00000268,
19646976433cSCarl Huang 	.hal_reo1_ring_msi1_base_lsb = 0x0000028c,
19656976433cSCarl Huang 	.hal_reo1_ring_msi1_base_msb = 0x00000290,
19666976433cSCarl Huang 	.hal_reo1_ring_msi1_data = 0x00000294,
19676976433cSCarl Huang 	.hal_reo2_ring_base_lsb = 0x0000029c,
19686976433cSCarl Huang 	.hal_reo1_aging_thresh_ix_0 = 0x0000050c,
19696976433cSCarl Huang 	.hal_reo1_aging_thresh_ix_1 = 0x00000510,
19706976433cSCarl Huang 	.hal_reo1_aging_thresh_ix_2 = 0x00000514,
19716976433cSCarl Huang 	.hal_reo1_aging_thresh_ix_3 = 0x00000518,
19726976433cSCarl Huang 
19736976433cSCarl Huang 	/* REO2SW(x) R2 ring pointers (head/tail) address */
19746976433cSCarl Huang 	.hal_reo1_ring_hp = 0x00003030,
19756976433cSCarl Huang 	.hal_reo1_ring_tp = 0x00003034,
19766976433cSCarl Huang 	.hal_reo2_ring_hp = 0x00003038,
19776976433cSCarl Huang 
19786976433cSCarl Huang 	/* REO2TCL R0 ring configuration address */
19796976433cSCarl Huang 	.hal_reo_tcl_ring_base_lsb = 0x000003a4,
19806976433cSCarl Huang 	.hal_reo_tcl_ring_hp = 0x00003050,
19816976433cSCarl Huang 
19826976433cSCarl Huang 	/* REO status address */
19836976433cSCarl Huang 	.hal_reo_status_ring_base_lsb = 0x000004ac,
19846976433cSCarl Huang 	.hal_reo_status_hp = 0x00003068,
19856fe6f68fSKarthikeyan Periyasamy 
19866fe6f68fSKarthikeyan Periyasamy 	/* WCSS relative address */
19876fe6f68fSKarthikeyan Periyasamy 	.hal_seq_wcss_umac_ce0_src_reg = 0x00a00000,
19886fe6f68fSKarthikeyan Periyasamy 	.hal_seq_wcss_umac_ce0_dst_reg = 0x00a01000,
19896fe6f68fSKarthikeyan Periyasamy 	.hal_seq_wcss_umac_ce1_src_reg = 0x00a02000,
19906fe6f68fSKarthikeyan Periyasamy 	.hal_seq_wcss_umac_ce1_dst_reg = 0x00a03000,
19916fe6f68fSKarthikeyan Periyasamy 
19926fe6f68fSKarthikeyan Periyasamy 	/* WBM Idle address */
19936fe6f68fSKarthikeyan Periyasamy 	.hal_wbm_idle_link_ring_base_lsb = 0x00000860,
19946fe6f68fSKarthikeyan Periyasamy 	.hal_wbm_idle_link_ring_misc = 0x00000870,
19956fe6f68fSKarthikeyan Periyasamy 
19966fe6f68fSKarthikeyan Periyasamy 	/* SW2WBM release address */
19976fe6f68fSKarthikeyan Periyasamy 	.hal_wbm_release_ring_base_lsb = 0x000001d8,
19986fe6f68fSKarthikeyan Periyasamy 
19996fe6f68fSKarthikeyan Periyasamy 	/* WBM2SW release address */
20006fe6f68fSKarthikeyan Periyasamy 	.hal_wbm0_release_ring_base_lsb = 0x00000910,
20016fe6f68fSKarthikeyan Periyasamy 	.hal_wbm1_release_ring_base_lsb = 0x00000968,
20026fe6f68fSKarthikeyan Periyasamy 
20036fe6f68fSKarthikeyan Periyasamy 	/* PCIe base address */
20046fe6f68fSKarthikeyan Periyasamy 	.pcie_qserdes_sysclk_en_sel = 0x01e0c0ac,
20056fe6f68fSKarthikeyan Periyasamy 	.pcie_pcs_osc_dtct_config_base = 0x01e0c628,
20066fe6f68fSKarthikeyan Periyasamy };
20076fe6f68fSKarthikeyan Periyasamy 
20086fe6f68fSKarthikeyan Periyasamy const struct ath11k_hw_regs qcn9074_regs = {
20096fe6f68fSKarthikeyan Periyasamy 	/* SW2TCL(x) R0 ring configuration address */
20106fe6f68fSKarthikeyan Periyasamy 	.hal_tcl1_ring_base_lsb = 0x000004f0,
20116fe6f68fSKarthikeyan Periyasamy 	.hal_tcl1_ring_base_msb = 0x000004f4,
20126fe6f68fSKarthikeyan Periyasamy 	.hal_tcl1_ring_id = 0x000004f8,
20136fe6f68fSKarthikeyan Periyasamy 	.hal_tcl1_ring_misc = 0x00000500,
20146fe6f68fSKarthikeyan Periyasamy 	.hal_tcl1_ring_tp_addr_lsb = 0x0000050c,
20156fe6f68fSKarthikeyan Periyasamy 	.hal_tcl1_ring_tp_addr_msb = 0x00000510,
20166fe6f68fSKarthikeyan Periyasamy 	.hal_tcl1_ring_consumer_int_setup_ix0 = 0x00000520,
20176fe6f68fSKarthikeyan Periyasamy 	.hal_tcl1_ring_consumer_int_setup_ix1 = 0x00000524,
20186fe6f68fSKarthikeyan Periyasamy 	.hal_tcl1_ring_msi1_base_lsb = 0x00000538,
20196fe6f68fSKarthikeyan Periyasamy 	.hal_tcl1_ring_msi1_base_msb = 0x0000053c,
20206fe6f68fSKarthikeyan Periyasamy 	.hal_tcl1_ring_msi1_data = 0x00000540,
20216fe6f68fSKarthikeyan Periyasamy 	.hal_tcl2_ring_base_lsb = 0x00000548,
20226fe6f68fSKarthikeyan Periyasamy 	.hal_tcl_ring_base_lsb = 0x000005f8,
20236fe6f68fSKarthikeyan Periyasamy 
20246fe6f68fSKarthikeyan Periyasamy 	/* TCL STATUS ring address */
20256fe6f68fSKarthikeyan Periyasamy 	.hal_tcl_status_ring_base_lsb = 0x00000700,
20266fe6f68fSKarthikeyan Periyasamy 
20276fe6f68fSKarthikeyan Periyasamy 	/* REO2SW(x) R0 ring configuration address */
20286fe6f68fSKarthikeyan Periyasamy 	.hal_reo1_ring_base_lsb = 0x0000029c,
20296fe6f68fSKarthikeyan Periyasamy 	.hal_reo1_ring_base_msb = 0x000002a0,
20306fe6f68fSKarthikeyan Periyasamy 	.hal_reo1_ring_id = 0x000002a4,
20316fe6f68fSKarthikeyan Periyasamy 	.hal_reo1_ring_misc = 0x000002ac,
20326fe6f68fSKarthikeyan Periyasamy 	.hal_reo1_ring_hp_addr_lsb = 0x000002b0,
20336fe6f68fSKarthikeyan Periyasamy 	.hal_reo1_ring_hp_addr_msb = 0x000002b4,
20346fe6f68fSKarthikeyan Periyasamy 	.hal_reo1_ring_producer_int_setup = 0x000002c0,
20356fe6f68fSKarthikeyan Periyasamy 	.hal_reo1_ring_msi1_base_lsb = 0x000002e4,
20366fe6f68fSKarthikeyan Periyasamy 	.hal_reo1_ring_msi1_base_msb = 0x000002e8,
20376fe6f68fSKarthikeyan Periyasamy 	.hal_reo1_ring_msi1_data = 0x000002ec,
20386fe6f68fSKarthikeyan Periyasamy 	.hal_reo2_ring_base_lsb = 0x000002f4,
20396fe6f68fSKarthikeyan Periyasamy 	.hal_reo1_aging_thresh_ix_0 = 0x00000564,
20406fe6f68fSKarthikeyan Periyasamy 	.hal_reo1_aging_thresh_ix_1 = 0x00000568,
20416fe6f68fSKarthikeyan Periyasamy 	.hal_reo1_aging_thresh_ix_2 = 0x0000056c,
20426fe6f68fSKarthikeyan Periyasamy 	.hal_reo1_aging_thresh_ix_3 = 0x00000570,
20436fe6f68fSKarthikeyan Periyasamy 
20446fe6f68fSKarthikeyan Periyasamy 	/* REO2SW(x) R2 ring pointers (head/tail) address */
20456fe6f68fSKarthikeyan Periyasamy 	.hal_reo1_ring_hp = 0x00003038,
20466fe6f68fSKarthikeyan Periyasamy 	.hal_reo1_ring_tp = 0x0000303c,
20476fe6f68fSKarthikeyan Periyasamy 	.hal_reo2_ring_hp = 0x00003040,
20486fe6f68fSKarthikeyan Periyasamy 
20496fe6f68fSKarthikeyan Periyasamy 	/* REO2TCL R0 ring configuration address */
20506fe6f68fSKarthikeyan Periyasamy 	.hal_reo_tcl_ring_base_lsb = 0x000003fc,
20516fe6f68fSKarthikeyan Periyasamy 	.hal_reo_tcl_ring_hp = 0x00003058,
20526fe6f68fSKarthikeyan Periyasamy 
20536fe6f68fSKarthikeyan Periyasamy 	/* REO status address */
20546fe6f68fSKarthikeyan Periyasamy 	.hal_reo_status_ring_base_lsb = 0x00000504,
20556fe6f68fSKarthikeyan Periyasamy 	.hal_reo_status_hp = 0x00003070,
20566fe6f68fSKarthikeyan Periyasamy 
20576fe6f68fSKarthikeyan Periyasamy 	/* WCSS relative address */
20586fe6f68fSKarthikeyan Periyasamy 	.hal_seq_wcss_umac_ce0_src_reg = 0x01b80000,
20596fe6f68fSKarthikeyan Periyasamy 	.hal_seq_wcss_umac_ce0_dst_reg = 0x01b81000,
20606fe6f68fSKarthikeyan Periyasamy 	.hal_seq_wcss_umac_ce1_src_reg = 0x01b82000,
20616fe6f68fSKarthikeyan Periyasamy 	.hal_seq_wcss_umac_ce1_dst_reg = 0x01b83000,
20626fe6f68fSKarthikeyan Periyasamy 
20636fe6f68fSKarthikeyan Periyasamy 	/* WBM Idle address */
20646fe6f68fSKarthikeyan Periyasamy 	.hal_wbm_idle_link_ring_base_lsb = 0x00000874,
20656fe6f68fSKarthikeyan Periyasamy 	.hal_wbm_idle_link_ring_misc = 0x00000884,
20666fe6f68fSKarthikeyan Periyasamy 
20676fe6f68fSKarthikeyan Periyasamy 	/* SW2WBM release address */
20686fe6f68fSKarthikeyan Periyasamy 	.hal_wbm_release_ring_base_lsb = 0x000001ec,
20696fe6f68fSKarthikeyan Periyasamy 
20706fe6f68fSKarthikeyan Periyasamy 	/* WBM2SW release address */
20716fe6f68fSKarthikeyan Periyasamy 	.hal_wbm0_release_ring_base_lsb = 0x00000924,
20726fe6f68fSKarthikeyan Periyasamy 	.hal_wbm1_release_ring_base_lsb = 0x0000097c,
20736fe6f68fSKarthikeyan Periyasamy 
20746fe6f68fSKarthikeyan Periyasamy 	/* PCIe base address */
20756fe6f68fSKarthikeyan Periyasamy 	.pcie_qserdes_sysclk_en_sel = 0x01e0e0a8,
20766fe6f68fSKarthikeyan Periyasamy 	.pcie_pcs_osc_dtct_config_base = 0x01e0f45c,
20776976433cSCarl Huang };
2078755b1f73SBaochen Qiang 
2079755b1f73SBaochen Qiang const struct ath11k_hw_regs wcn6855_regs = {
2080755b1f73SBaochen Qiang 	/* SW2TCL(x) R0 ring configuration address */
2081755b1f73SBaochen Qiang 	.hal_tcl1_ring_base_lsb = 0x00000690,
2082755b1f73SBaochen Qiang 	.hal_tcl1_ring_base_msb = 0x00000694,
2083755b1f73SBaochen Qiang 	.hal_tcl1_ring_id = 0x00000698,
2084755b1f73SBaochen Qiang 	.hal_tcl1_ring_misc = 0x000006a0,
2085755b1f73SBaochen Qiang 	.hal_tcl1_ring_tp_addr_lsb = 0x000006ac,
2086755b1f73SBaochen Qiang 	.hal_tcl1_ring_tp_addr_msb = 0x000006b0,
2087755b1f73SBaochen Qiang 	.hal_tcl1_ring_consumer_int_setup_ix0 = 0x000006c0,
2088755b1f73SBaochen Qiang 	.hal_tcl1_ring_consumer_int_setup_ix1 = 0x000006c4,
2089755b1f73SBaochen Qiang 	.hal_tcl1_ring_msi1_base_lsb = 0x000006d8,
2090755b1f73SBaochen Qiang 	.hal_tcl1_ring_msi1_base_msb = 0x000006dc,
2091755b1f73SBaochen Qiang 	.hal_tcl1_ring_msi1_data = 0x000006e0,
2092755b1f73SBaochen Qiang 	.hal_tcl2_ring_base_lsb = 0x000006e8,
2093755b1f73SBaochen Qiang 	.hal_tcl_ring_base_lsb = 0x00000798,
2094755b1f73SBaochen Qiang 
2095755b1f73SBaochen Qiang 	/* TCL STATUS ring address */
2096755b1f73SBaochen Qiang 	.hal_tcl_status_ring_base_lsb = 0x000008a0,
2097755b1f73SBaochen Qiang 
2098755b1f73SBaochen Qiang 	/* REO2SW(x) R0 ring configuration address */
2099755b1f73SBaochen Qiang 	.hal_reo1_ring_base_lsb = 0x00000244,
2100755b1f73SBaochen Qiang 	.hal_reo1_ring_base_msb = 0x00000248,
2101755b1f73SBaochen Qiang 	.hal_reo1_ring_id = 0x0000024c,
2102755b1f73SBaochen Qiang 	.hal_reo1_ring_misc = 0x00000254,
2103755b1f73SBaochen Qiang 	.hal_reo1_ring_hp_addr_lsb = 0x00000258,
2104755b1f73SBaochen Qiang 	.hal_reo1_ring_hp_addr_msb = 0x0000025c,
2105755b1f73SBaochen Qiang 	.hal_reo1_ring_producer_int_setup = 0x00000268,
2106755b1f73SBaochen Qiang 	.hal_reo1_ring_msi1_base_lsb = 0x0000028c,
2107755b1f73SBaochen Qiang 	.hal_reo1_ring_msi1_base_msb = 0x00000290,
2108755b1f73SBaochen Qiang 	.hal_reo1_ring_msi1_data = 0x00000294,
2109755b1f73SBaochen Qiang 	.hal_reo2_ring_base_lsb = 0x0000029c,
2110755b1f73SBaochen Qiang 	.hal_reo1_aging_thresh_ix_0 = 0x000005bc,
2111755b1f73SBaochen Qiang 	.hal_reo1_aging_thresh_ix_1 = 0x000005c0,
2112755b1f73SBaochen Qiang 	.hal_reo1_aging_thresh_ix_2 = 0x000005c4,
2113755b1f73SBaochen Qiang 	.hal_reo1_aging_thresh_ix_3 = 0x000005c8,
2114755b1f73SBaochen Qiang 
2115755b1f73SBaochen Qiang 	/* REO2SW(x) R2 ring pointers (head/tail) address */
2116755b1f73SBaochen Qiang 	.hal_reo1_ring_hp = 0x00003030,
2117755b1f73SBaochen Qiang 	.hal_reo1_ring_tp = 0x00003034,
2118755b1f73SBaochen Qiang 	.hal_reo2_ring_hp = 0x00003038,
2119755b1f73SBaochen Qiang 
2120755b1f73SBaochen Qiang 	/* REO2TCL R0 ring configuration address */
2121755b1f73SBaochen Qiang 	.hal_reo_tcl_ring_base_lsb = 0x00000454,
2122755b1f73SBaochen Qiang 	.hal_reo_tcl_ring_hp = 0x00003060,
2123755b1f73SBaochen Qiang 
2124755b1f73SBaochen Qiang 	/* REO status address */
2125755b1f73SBaochen Qiang 	.hal_reo_status_ring_base_lsb = 0x0000055c,
2126755b1f73SBaochen Qiang 	.hal_reo_status_hp = 0x00003078,
2127755b1f73SBaochen Qiang 
2128755b1f73SBaochen Qiang 	/* WCSS relative address */
2129755b1f73SBaochen Qiang 	.hal_seq_wcss_umac_ce0_src_reg = 0x1b80000,
2130755b1f73SBaochen Qiang 	.hal_seq_wcss_umac_ce0_dst_reg = 0x1b81000,
2131755b1f73SBaochen Qiang 	.hal_seq_wcss_umac_ce1_src_reg = 0x1b82000,
2132755b1f73SBaochen Qiang 	.hal_seq_wcss_umac_ce1_dst_reg = 0x1b83000,
2133755b1f73SBaochen Qiang 
2134755b1f73SBaochen Qiang 	/* WBM Idle address */
2135755b1f73SBaochen Qiang 	.hal_wbm_idle_link_ring_base_lsb = 0x00000870,
2136755b1f73SBaochen Qiang 	.hal_wbm_idle_link_ring_misc = 0x00000880,
2137755b1f73SBaochen Qiang 
2138755b1f73SBaochen Qiang 	/* SW2WBM release address */
2139755b1f73SBaochen Qiang 	.hal_wbm_release_ring_base_lsb = 0x000001e8,
2140755b1f73SBaochen Qiang 
2141755b1f73SBaochen Qiang 	/* WBM2SW release address */
2142755b1f73SBaochen Qiang 	.hal_wbm0_release_ring_base_lsb = 0x00000920,
2143755b1f73SBaochen Qiang 	.hal_wbm1_release_ring_base_lsb = 0x00000978,
2144755b1f73SBaochen Qiang 
2145755b1f73SBaochen Qiang 	/* PCIe base address */
2146755b1f73SBaochen Qiang 	.pcie_qserdes_sysclk_en_sel = 0x01e0c0ac,
2147755b1f73SBaochen Qiang 	.pcie_pcs_osc_dtct_config_base = 0x01e0c628,
2148755b1f73SBaochen Qiang };
2149734223d7SBaochen Qiang 
2150734223d7SBaochen Qiang const struct ath11k_hw_hal_params ath11k_hw_hal_params_ipq8074 = {
2151734223d7SBaochen Qiang 	.rx_buf_rbm = HAL_RX_BUF_RBM_SW3_BM,
2152734223d7SBaochen Qiang };
2153734223d7SBaochen Qiang 
2154734223d7SBaochen Qiang const struct ath11k_hw_hal_params ath11k_hw_hal_params_qca6390 = {
2155734223d7SBaochen Qiang 	.rx_buf_rbm = HAL_RX_BUF_RBM_SW1_BM,
2156734223d7SBaochen Qiang };
2157