1d547ca4cSAnilkumar Kolli // SPDX-License-Identifier: BSD-3-Clause-Clear 2d547ca4cSAnilkumar Kolli /* 3d547ca4cSAnilkumar Kolli * Copyright (c) 2018-2020 The Linux Foundation. All rights reserved. 4*ea77e939SJeff Johnson * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved. 5d547ca4cSAnilkumar Kolli */ 6d547ca4cSAnilkumar Kolli 76976433cSCarl Huang #include <linux/types.h> 86976433cSCarl Huang #include <linux/bitops.h> 96976433cSCarl Huang #include <linux/bitfield.h> 106976433cSCarl Huang 11d547ca4cSAnilkumar Kolli #include "core.h" 12e3396b8bSCarl Huang #include "ce.h" 130d55b76fSBaochen Qiang #include "hif.h" 14734223d7SBaochen Qiang #include "hal.h" 15734223d7SBaochen Qiang #include "hw.h" 16d547ca4cSAnilkumar Kolli 17d547ca4cSAnilkumar Kolli /* Map from pdev index to hw mac index */ 18d547ca4cSAnilkumar Kolli static u8 ath11k_hw_ipq8074_mac_from_pdev_id(int pdev_idx) 19d547ca4cSAnilkumar Kolli { 20d547ca4cSAnilkumar Kolli switch (pdev_idx) { 21d547ca4cSAnilkumar Kolli case 0: 22d547ca4cSAnilkumar Kolli return 0; 23d547ca4cSAnilkumar Kolli case 1: 24d547ca4cSAnilkumar Kolli return 2; 25d547ca4cSAnilkumar Kolli case 2: 26d547ca4cSAnilkumar Kolli return 1; 27d547ca4cSAnilkumar Kolli default: 28d547ca4cSAnilkumar Kolli return ATH11K_INVALID_HW_MAC_ID; 29d547ca4cSAnilkumar Kolli } 30d547ca4cSAnilkumar Kolli } 31d547ca4cSAnilkumar Kolli 32d547ca4cSAnilkumar Kolli static u8 ath11k_hw_ipq6018_mac_from_pdev_id(int pdev_idx) 33d547ca4cSAnilkumar Kolli { 34d547ca4cSAnilkumar Kolli return pdev_idx; 35d547ca4cSAnilkumar Kolli } 36d547ca4cSAnilkumar Kolli 376fe6f68fSKarthikeyan Periyasamy static void ath11k_hw_ipq8074_tx_mesh_enable(struct ath11k_base *ab, 386fe6f68fSKarthikeyan Periyasamy struct hal_tcl_data_cmd *tcl_cmd) 396fe6f68fSKarthikeyan Periyasamy { 406fe6f68fSKarthikeyan Periyasamy tcl_cmd->info2 |= FIELD_PREP(HAL_IPQ8074_TCL_DATA_CMD_INFO2_MESH_ENABLE, 416fe6f68fSKarthikeyan Periyasamy true); 426fe6f68fSKarthikeyan Periyasamy } 436fe6f68fSKarthikeyan Periyasamy 446fe6f68fSKarthikeyan Periyasamy static void ath11k_hw_qcn9074_tx_mesh_enable(struct ath11k_base *ab, 456fe6f68fSKarthikeyan Periyasamy struct hal_tcl_data_cmd *tcl_cmd) 466fe6f68fSKarthikeyan Periyasamy { 476fe6f68fSKarthikeyan Periyasamy tcl_cmd->info3 |= FIELD_PREP(HAL_QCN9074_TCL_DATA_CMD_INFO3_MESH_ENABLE, 486fe6f68fSKarthikeyan Periyasamy true); 496fe6f68fSKarthikeyan Periyasamy } 506fe6f68fSKarthikeyan Periyasamy 51e4073430SBaochen Qiang static void ath11k_hw_wcn6855_tx_mesh_enable(struct ath11k_base *ab, 52e4073430SBaochen Qiang struct hal_tcl_data_cmd *tcl_cmd) 53e4073430SBaochen Qiang { 54e4073430SBaochen Qiang tcl_cmd->info3 |= FIELD_PREP(HAL_QCN9074_TCL_DATA_CMD_INFO3_MESH_ENABLE, 55e4073430SBaochen Qiang true); 56e4073430SBaochen Qiang } 57e4073430SBaochen Qiang 582d4bcbedSCarl Huang static void ath11k_init_wmi_config_qca6390(struct ath11k_base *ab, 592d4bcbedSCarl Huang struct target_resource_config *config) 602d4bcbedSCarl Huang { 612d4bcbedSCarl Huang config->num_vdevs = 4; 622d4bcbedSCarl Huang config->num_peers = 16; 632d4bcbedSCarl Huang config->num_tids = 32; 642d4bcbedSCarl Huang 652d4bcbedSCarl Huang config->num_offload_peers = 3; 662d4bcbedSCarl Huang config->num_offload_reorder_buffs = 3; 672d4bcbedSCarl Huang config->num_peer_keys = TARGET_NUM_PEER_KEYS; 682d4bcbedSCarl Huang config->ast_skid_limit = TARGET_AST_SKID_LIMIT; 692d4bcbedSCarl Huang config->tx_chain_mask = (1 << ab->target_caps.num_rf_chains) - 1; 702d4bcbedSCarl Huang config->rx_chain_mask = (1 << ab->target_caps.num_rf_chains) - 1; 712d4bcbedSCarl Huang config->rx_timeout_pri[0] = TARGET_RX_TIMEOUT_LO_PRI; 722d4bcbedSCarl Huang config->rx_timeout_pri[1] = TARGET_RX_TIMEOUT_LO_PRI; 732d4bcbedSCarl Huang config->rx_timeout_pri[2] = TARGET_RX_TIMEOUT_LO_PRI; 742d4bcbedSCarl Huang config->rx_timeout_pri[3] = TARGET_RX_TIMEOUT_HI_PRI; 752d4bcbedSCarl Huang config->rx_decap_mode = TARGET_DECAP_MODE_NATIVE_WIFI; 762d4bcbedSCarl Huang config->scan_max_pending_req = TARGET_SCAN_MAX_PENDING_REQS; 772d4bcbedSCarl Huang config->bmiss_offload_max_vdev = TARGET_BMISS_OFFLOAD_MAX_VDEV; 782d4bcbedSCarl Huang config->roam_offload_max_vdev = TARGET_ROAM_OFFLOAD_MAX_VDEV; 792d4bcbedSCarl Huang config->roam_offload_max_ap_profiles = TARGET_ROAM_OFFLOAD_MAX_AP_PROFILES; 802d4bcbedSCarl Huang config->num_mcast_groups = 0; 812d4bcbedSCarl Huang config->num_mcast_table_elems = 0; 822d4bcbedSCarl Huang config->mcast2ucast_mode = 0; 832d4bcbedSCarl Huang config->tx_dbg_log_size = TARGET_TX_DBG_LOG_SIZE; 842d4bcbedSCarl Huang config->num_wds_entries = 0; 852d4bcbedSCarl Huang config->dma_burst_size = 0; 862d4bcbedSCarl Huang config->rx_skip_defrag_timeout_dup_detection_check = 0; 872d4bcbedSCarl Huang config->vow_config = TARGET_VOW_CONFIG; 882d4bcbedSCarl Huang config->gtk_offload_max_vdev = 2; 892d4bcbedSCarl Huang config->num_msdu_desc = 0x400; 902d4bcbedSCarl Huang config->beacon_tx_offload_max_vdev = 2; 912d4bcbedSCarl Huang config->rx_batchmode = TARGET_RX_BATCHMODE; 922d4bcbedSCarl Huang 932d4bcbedSCarl Huang config->peer_map_unmap_v2_support = 0; 942d4bcbedSCarl Huang config->use_pdev_id = 1; 952d4bcbedSCarl Huang config->max_frag_entries = 0xa; 962d4bcbedSCarl Huang config->num_tdls_vdevs = 0x1; 972d4bcbedSCarl Huang config->num_tdls_conn_table_entries = 8; 982d4bcbedSCarl Huang config->beacon_tx_offload_max_vdev = 0x2; 992d4bcbedSCarl Huang config->num_multicast_filter_entries = 0x20; 1002d4bcbedSCarl Huang config->num_wow_filters = 0x16; 1012d4bcbedSCarl Huang config->num_keep_alive_pattern = 0; 1029b4dd38bSSeevalamuthu Mariappan config->flag1 |= WMI_RSRC_CFG_FLAG1_BSS_CHANNEL_INFO_64; 1032d4bcbedSCarl Huang } 1042d4bcbedSCarl Huang 1050d55b76fSBaochen Qiang static void ath11k_hw_ipq8074_reo_setup(struct ath11k_base *ab) 1060d55b76fSBaochen Qiang { 1070d55b76fSBaochen Qiang u32 reo_base = HAL_SEQ_WCSS_UMAC_REO_REG; 1080d55b76fSBaochen Qiang u32 val; 1090d55b76fSBaochen Qiang /* Each hash entry uses three bits to map to a particular ring. */ 1100d55b76fSBaochen Qiang u32 ring_hash_map = HAL_HASH_ROUTING_RING_SW1 << 0 | 1110d55b76fSBaochen Qiang HAL_HASH_ROUTING_RING_SW2 << 3 | 1120d55b76fSBaochen Qiang HAL_HASH_ROUTING_RING_SW3 << 6 | 1130d55b76fSBaochen Qiang HAL_HASH_ROUTING_RING_SW4 << 9 | 1140d55b76fSBaochen Qiang HAL_HASH_ROUTING_RING_SW1 << 12 | 1150d55b76fSBaochen Qiang HAL_HASH_ROUTING_RING_SW2 << 15 | 1160d55b76fSBaochen Qiang HAL_HASH_ROUTING_RING_SW3 << 18 | 1170d55b76fSBaochen Qiang HAL_HASH_ROUTING_RING_SW4 << 21; 1180d55b76fSBaochen Qiang 1190d55b76fSBaochen Qiang val = ath11k_hif_read32(ab, reo_base + HAL_REO1_GEN_ENABLE); 1200d55b76fSBaochen Qiang 1210d55b76fSBaochen Qiang val &= ~HAL_REO1_GEN_ENABLE_FRAG_DST_RING; 1220d55b76fSBaochen Qiang val |= FIELD_PREP(HAL_REO1_GEN_ENABLE_FRAG_DST_RING, 1230d55b76fSBaochen Qiang HAL_SRNG_RING_ID_REO2SW1) | 1240d55b76fSBaochen Qiang FIELD_PREP(HAL_REO1_GEN_ENABLE_AGING_LIST_ENABLE, 1) | 1250d55b76fSBaochen Qiang FIELD_PREP(HAL_REO1_GEN_ENABLE_AGING_FLUSH_ENABLE, 1); 1260d55b76fSBaochen Qiang ath11k_hif_write32(ab, reo_base + HAL_REO1_GEN_ENABLE, val); 1270d55b76fSBaochen Qiang 1280d55b76fSBaochen Qiang ath11k_hif_write32(ab, reo_base + HAL_REO1_AGING_THRESH_IX_0(ab), 1290d55b76fSBaochen Qiang HAL_DEFAULT_REO_TIMEOUT_USEC); 1300d55b76fSBaochen Qiang ath11k_hif_write32(ab, reo_base + HAL_REO1_AGING_THRESH_IX_1(ab), 1310d55b76fSBaochen Qiang HAL_DEFAULT_REO_TIMEOUT_USEC); 1320d55b76fSBaochen Qiang ath11k_hif_write32(ab, reo_base + HAL_REO1_AGING_THRESH_IX_2(ab), 1330d55b76fSBaochen Qiang HAL_DEFAULT_REO_TIMEOUT_USEC); 1340d55b76fSBaochen Qiang ath11k_hif_write32(ab, reo_base + HAL_REO1_AGING_THRESH_IX_3(ab), 1350d55b76fSBaochen Qiang HAL_DEFAULT_REO_TIMEOUT_USEC); 1360d55b76fSBaochen Qiang 1370d55b76fSBaochen Qiang ath11k_hif_write32(ab, reo_base + HAL_REO1_DEST_RING_CTRL_IX_0, 1380d55b76fSBaochen Qiang FIELD_PREP(HAL_REO_DEST_RING_CTRL_HASH_RING_MAP, 1390d55b76fSBaochen Qiang ring_hash_map)); 1400d55b76fSBaochen Qiang ath11k_hif_write32(ab, reo_base + HAL_REO1_DEST_RING_CTRL_IX_1, 1410d55b76fSBaochen Qiang FIELD_PREP(HAL_REO_DEST_RING_CTRL_HASH_RING_MAP, 1420d55b76fSBaochen Qiang ring_hash_map)); 1430d55b76fSBaochen Qiang ath11k_hif_write32(ab, reo_base + HAL_REO1_DEST_RING_CTRL_IX_2, 1440d55b76fSBaochen Qiang FIELD_PREP(HAL_REO_DEST_RING_CTRL_HASH_RING_MAP, 1450d55b76fSBaochen Qiang ring_hash_map)); 1460d55b76fSBaochen Qiang ath11k_hif_write32(ab, reo_base + HAL_REO1_DEST_RING_CTRL_IX_3, 1470d55b76fSBaochen Qiang FIELD_PREP(HAL_REO_DEST_RING_CTRL_HASH_RING_MAP, 1480d55b76fSBaochen Qiang ring_hash_map)); 1490d55b76fSBaochen Qiang } 1500d55b76fSBaochen Qiang 1512d4bcbedSCarl Huang static void ath11k_init_wmi_config_ipq8074(struct ath11k_base *ab, 1522d4bcbedSCarl Huang struct target_resource_config *config) 1532d4bcbedSCarl Huang { 154523aafd0SKalle Valo config->num_vdevs = ab->num_radios * TARGET_NUM_VDEVS(ab); 1552d4bcbedSCarl Huang 1562d4bcbedSCarl Huang if (ab->num_radios == 2) { 157523aafd0SKalle Valo config->num_peers = TARGET_NUM_PEERS(ab, DBS); 158523aafd0SKalle Valo config->num_tids = TARGET_NUM_TIDS(ab, DBS); 1592d4bcbedSCarl Huang } else if (ab->num_radios == 3) { 160523aafd0SKalle Valo config->num_peers = TARGET_NUM_PEERS(ab, DBS_SBS); 161523aafd0SKalle Valo config->num_tids = TARGET_NUM_TIDS(ab, DBS_SBS); 1622d4bcbedSCarl Huang } else { 1632d4bcbedSCarl Huang /* Control should not reach here */ 164523aafd0SKalle Valo config->num_peers = TARGET_NUM_PEERS(ab, SINGLE); 165523aafd0SKalle Valo config->num_tids = TARGET_NUM_TIDS(ab, SINGLE); 1662d4bcbedSCarl Huang } 1672d4bcbedSCarl Huang config->num_offload_peers = TARGET_NUM_OFFLD_PEERS; 1682d4bcbedSCarl Huang config->num_offload_reorder_buffs = TARGET_NUM_OFFLD_REORDER_BUFFS; 1692d4bcbedSCarl Huang config->num_peer_keys = TARGET_NUM_PEER_KEYS; 1702d4bcbedSCarl Huang config->ast_skid_limit = TARGET_AST_SKID_LIMIT; 1712d4bcbedSCarl Huang config->tx_chain_mask = (1 << ab->target_caps.num_rf_chains) - 1; 1722d4bcbedSCarl Huang config->rx_chain_mask = (1 << ab->target_caps.num_rf_chains) - 1; 1732d4bcbedSCarl Huang config->rx_timeout_pri[0] = TARGET_RX_TIMEOUT_LO_PRI; 1742d4bcbedSCarl Huang config->rx_timeout_pri[1] = TARGET_RX_TIMEOUT_LO_PRI; 1752d4bcbedSCarl Huang config->rx_timeout_pri[2] = TARGET_RX_TIMEOUT_LO_PRI; 1762d4bcbedSCarl Huang config->rx_timeout_pri[3] = TARGET_RX_TIMEOUT_HI_PRI; 177c695faf7SKalle Valo 178c695faf7SKalle Valo if (test_bit(ATH11K_FLAG_RAW_MODE, &ab->dev_flags)) 179c695faf7SKalle Valo config->rx_decap_mode = TARGET_DECAP_MODE_RAW; 180c695faf7SKalle Valo else 1812d4bcbedSCarl Huang config->rx_decap_mode = TARGET_DECAP_MODE_NATIVE_WIFI; 182c695faf7SKalle Valo 1832d4bcbedSCarl Huang config->scan_max_pending_req = TARGET_SCAN_MAX_PENDING_REQS; 1842d4bcbedSCarl Huang config->bmiss_offload_max_vdev = TARGET_BMISS_OFFLOAD_MAX_VDEV; 1852d4bcbedSCarl Huang config->roam_offload_max_vdev = TARGET_ROAM_OFFLOAD_MAX_VDEV; 1862d4bcbedSCarl Huang config->roam_offload_max_ap_profiles = TARGET_ROAM_OFFLOAD_MAX_AP_PROFILES; 1872d4bcbedSCarl Huang config->num_mcast_groups = TARGET_NUM_MCAST_GROUPS; 1882d4bcbedSCarl Huang config->num_mcast_table_elems = TARGET_NUM_MCAST_TABLE_ELEMS; 1892d4bcbedSCarl Huang config->mcast2ucast_mode = TARGET_MCAST2UCAST_MODE; 1902d4bcbedSCarl Huang config->tx_dbg_log_size = TARGET_TX_DBG_LOG_SIZE; 1912d4bcbedSCarl Huang config->num_wds_entries = TARGET_NUM_WDS_ENTRIES; 1922d4bcbedSCarl Huang config->dma_burst_size = TARGET_DMA_BURST_SIZE; 1932d4bcbedSCarl Huang config->rx_skip_defrag_timeout_dup_detection_check = 1942d4bcbedSCarl Huang TARGET_RX_SKIP_DEFRAG_TIMEOUT_DUP_DETECTION_CHECK; 1952d4bcbedSCarl Huang config->vow_config = TARGET_VOW_CONFIG; 1962d4bcbedSCarl Huang config->gtk_offload_max_vdev = TARGET_GTK_OFFLOAD_MAX_VDEV; 1972d4bcbedSCarl Huang config->num_msdu_desc = TARGET_NUM_MSDU_DESC; 1982d4bcbedSCarl Huang config->beacon_tx_offload_max_vdev = ab->num_radios * TARGET_MAX_BCN_OFFLD; 1992d4bcbedSCarl Huang config->rx_batchmode = TARGET_RX_BATCHMODE; 2002d4bcbedSCarl Huang config->peer_map_unmap_v2_support = 1; 20136c7c640SKarthikeyan Periyasamy config->twt_ap_pdev_count = ab->num_radios; 2022d4bcbedSCarl Huang config->twt_ap_sta_count = 1000; 2039b4dd38bSSeevalamuthu Mariappan config->flag1 |= WMI_RSRC_CFG_FLAG1_BSS_CHANNEL_INFO_64; 20401c6c9fcSAbinaya Kalaiselvan config->flag1 |= WMI_RSRC_CFG_FLAG1_ACK_RSSI; 205a08dbb04SAloka Dixit config->ema_max_vap_cnt = ab->num_radios; 206a08dbb04SAloka Dixit config->ema_max_profile_period = TARGET_EMA_MAX_PROFILE_PERIOD; 207a08dbb04SAloka Dixit config->beacon_tx_offload_max_vdev += config->ema_max_vap_cnt; 2082d4bcbedSCarl Huang } 2092d4bcbedSCarl Huang 2104152e420SCarl Huang static int ath11k_hw_mac_id_to_pdev_id_ipq8074(struct ath11k_hw_params *hw, 2114152e420SCarl Huang int mac_id) 2124152e420SCarl Huang { 2134152e420SCarl Huang return mac_id; 2144152e420SCarl Huang } 2154152e420SCarl Huang 2164152e420SCarl Huang static int ath11k_hw_mac_id_to_srng_id_ipq8074(struct ath11k_hw_params *hw, 2174152e420SCarl Huang int mac_id) 2184152e420SCarl Huang { 2194152e420SCarl Huang return 0; 2204152e420SCarl Huang } 2214152e420SCarl Huang 2224152e420SCarl Huang static int ath11k_hw_mac_id_to_pdev_id_qca6390(struct ath11k_hw_params *hw, 2234152e420SCarl Huang int mac_id) 2244152e420SCarl Huang { 2254152e420SCarl Huang return 0; 2264152e420SCarl Huang } 2274152e420SCarl Huang 2284152e420SCarl Huang static int ath11k_hw_mac_id_to_srng_id_qca6390(struct ath11k_hw_params *hw, 2294152e420SCarl Huang int mac_id) 2304152e420SCarl Huang { 2314152e420SCarl Huang return mac_id; 2324152e420SCarl Huang } 2334152e420SCarl Huang 234e678fbd4SKarthikeyan Periyasamy static bool ath11k_hw_ipq8074_rx_desc_get_first_msdu(struct hal_rx_desc *desc) 235e678fbd4SKarthikeyan Periyasamy { 236e678fbd4SKarthikeyan Periyasamy return !!FIELD_GET(RX_MSDU_END_INFO2_FIRST_MSDU, 237e678fbd4SKarthikeyan Periyasamy __le32_to_cpu(desc->u.ipq8074.msdu_end.info2)); 238e678fbd4SKarthikeyan Periyasamy } 239e678fbd4SKarthikeyan Periyasamy 240e678fbd4SKarthikeyan Periyasamy static bool ath11k_hw_ipq8074_rx_desc_get_last_msdu(struct hal_rx_desc *desc) 241e678fbd4SKarthikeyan Periyasamy { 242e678fbd4SKarthikeyan Periyasamy return !!FIELD_GET(RX_MSDU_END_INFO2_LAST_MSDU, 243e678fbd4SKarthikeyan Periyasamy __le32_to_cpu(desc->u.ipq8074.msdu_end.info2)); 244e678fbd4SKarthikeyan Periyasamy } 245e678fbd4SKarthikeyan Periyasamy 246e678fbd4SKarthikeyan Periyasamy static u8 ath11k_hw_ipq8074_rx_desc_get_l3_pad_bytes(struct hal_rx_desc *desc) 247e678fbd4SKarthikeyan Periyasamy { 248e678fbd4SKarthikeyan Periyasamy return FIELD_GET(RX_MSDU_END_INFO2_L3_HDR_PADDING, 249e678fbd4SKarthikeyan Periyasamy __le32_to_cpu(desc->u.ipq8074.msdu_end.info2)); 250e678fbd4SKarthikeyan Periyasamy } 251e678fbd4SKarthikeyan Periyasamy 252e678fbd4SKarthikeyan Periyasamy static u8 *ath11k_hw_ipq8074_rx_desc_get_hdr_status(struct hal_rx_desc *desc) 253e678fbd4SKarthikeyan Periyasamy { 254e678fbd4SKarthikeyan Periyasamy return desc->u.ipq8074.hdr_status; 255e678fbd4SKarthikeyan Periyasamy } 256e678fbd4SKarthikeyan Periyasamy 257e678fbd4SKarthikeyan Periyasamy static bool ath11k_hw_ipq8074_rx_desc_encrypt_valid(struct hal_rx_desc *desc) 258e678fbd4SKarthikeyan Periyasamy { 259e678fbd4SKarthikeyan Periyasamy return __le32_to_cpu(desc->u.ipq8074.mpdu_start.info1) & 260e678fbd4SKarthikeyan Periyasamy RX_MPDU_START_INFO1_ENCRYPT_INFO_VALID; 261e678fbd4SKarthikeyan Periyasamy } 262e678fbd4SKarthikeyan Periyasamy 263e678fbd4SKarthikeyan Periyasamy static u32 ath11k_hw_ipq8074_rx_desc_get_encrypt_type(struct hal_rx_desc *desc) 264e678fbd4SKarthikeyan Periyasamy { 265e678fbd4SKarthikeyan Periyasamy return FIELD_GET(RX_MPDU_START_INFO2_ENC_TYPE, 266e678fbd4SKarthikeyan Periyasamy __le32_to_cpu(desc->u.ipq8074.mpdu_start.info2)); 267e678fbd4SKarthikeyan Periyasamy } 268e678fbd4SKarthikeyan Periyasamy 269e678fbd4SKarthikeyan Periyasamy static u8 ath11k_hw_ipq8074_rx_desc_get_decap_type(struct hal_rx_desc *desc) 270e678fbd4SKarthikeyan Periyasamy { 271e678fbd4SKarthikeyan Periyasamy return FIELD_GET(RX_MSDU_START_INFO2_DECAP_FORMAT, 272e678fbd4SKarthikeyan Periyasamy __le32_to_cpu(desc->u.ipq8074.msdu_start.info2)); 273e678fbd4SKarthikeyan Periyasamy } 274e678fbd4SKarthikeyan Periyasamy 275e678fbd4SKarthikeyan Periyasamy static u8 ath11k_hw_ipq8074_rx_desc_get_mesh_ctl(struct hal_rx_desc *desc) 276e678fbd4SKarthikeyan Periyasamy { 277e678fbd4SKarthikeyan Periyasamy return FIELD_GET(RX_MSDU_START_INFO2_MESH_CTRL_PRESENT, 278e678fbd4SKarthikeyan Periyasamy __le32_to_cpu(desc->u.ipq8074.msdu_start.info2)); 279e678fbd4SKarthikeyan Periyasamy } 280e678fbd4SKarthikeyan Periyasamy 281b3febdccSP Praneesh static bool ath11k_hw_ipq8074_rx_desc_get_ldpc_support(struct hal_rx_desc *desc) 282b3febdccSP Praneesh { 283b3febdccSP Praneesh return FIELD_GET(RX_MSDU_START_INFO2_LDPC, 284b3febdccSP Praneesh __le32_to_cpu(desc->u.ipq8074.msdu_start.info2)); 285b3febdccSP Praneesh } 286b3febdccSP Praneesh 287e678fbd4SKarthikeyan Periyasamy static bool ath11k_hw_ipq8074_rx_desc_get_mpdu_seq_ctl_vld(struct hal_rx_desc *desc) 288e678fbd4SKarthikeyan Periyasamy { 289e678fbd4SKarthikeyan Periyasamy return !!FIELD_GET(RX_MPDU_START_INFO1_MPDU_SEQ_CTRL_VALID, 290e678fbd4SKarthikeyan Periyasamy __le32_to_cpu(desc->u.ipq8074.mpdu_start.info1)); 291e678fbd4SKarthikeyan Periyasamy } 292e678fbd4SKarthikeyan Periyasamy 293e678fbd4SKarthikeyan Periyasamy static bool ath11k_hw_ipq8074_rx_desc_get_mpdu_fc_valid(struct hal_rx_desc *desc) 294e678fbd4SKarthikeyan Periyasamy { 295e678fbd4SKarthikeyan Periyasamy return !!FIELD_GET(RX_MPDU_START_INFO1_MPDU_FCTRL_VALID, 296e678fbd4SKarthikeyan Periyasamy __le32_to_cpu(desc->u.ipq8074.mpdu_start.info1)); 297e678fbd4SKarthikeyan Periyasamy } 298e678fbd4SKarthikeyan Periyasamy 299e678fbd4SKarthikeyan Periyasamy static u16 ath11k_hw_ipq8074_rx_desc_get_mpdu_start_seq_no(struct hal_rx_desc *desc) 300e678fbd4SKarthikeyan Periyasamy { 301e678fbd4SKarthikeyan Periyasamy return FIELD_GET(RX_MPDU_START_INFO1_MPDU_SEQ_NUM, 302e678fbd4SKarthikeyan Periyasamy __le32_to_cpu(desc->u.ipq8074.mpdu_start.info1)); 303e678fbd4SKarthikeyan Periyasamy } 304e678fbd4SKarthikeyan Periyasamy 305e678fbd4SKarthikeyan Periyasamy static u16 ath11k_hw_ipq8074_rx_desc_get_msdu_len(struct hal_rx_desc *desc) 306e678fbd4SKarthikeyan Periyasamy { 307e678fbd4SKarthikeyan Periyasamy return FIELD_GET(RX_MSDU_START_INFO1_MSDU_LENGTH, 308e678fbd4SKarthikeyan Periyasamy __le32_to_cpu(desc->u.ipq8074.msdu_start.info1)); 309e678fbd4SKarthikeyan Periyasamy } 310e678fbd4SKarthikeyan Periyasamy 311e678fbd4SKarthikeyan Periyasamy static u8 ath11k_hw_ipq8074_rx_desc_get_msdu_sgi(struct hal_rx_desc *desc) 312e678fbd4SKarthikeyan Periyasamy { 313e678fbd4SKarthikeyan Periyasamy return FIELD_GET(RX_MSDU_START_INFO3_SGI, 314e678fbd4SKarthikeyan Periyasamy __le32_to_cpu(desc->u.ipq8074.msdu_start.info3)); 315e678fbd4SKarthikeyan Periyasamy } 316e678fbd4SKarthikeyan Periyasamy 317e678fbd4SKarthikeyan Periyasamy static u8 ath11k_hw_ipq8074_rx_desc_get_msdu_rate_mcs(struct hal_rx_desc *desc) 318e678fbd4SKarthikeyan Periyasamy { 319e678fbd4SKarthikeyan Periyasamy return FIELD_GET(RX_MSDU_START_INFO3_RATE_MCS, 320e678fbd4SKarthikeyan Periyasamy __le32_to_cpu(desc->u.ipq8074.msdu_start.info3)); 321e678fbd4SKarthikeyan Periyasamy } 322e678fbd4SKarthikeyan Periyasamy 323e678fbd4SKarthikeyan Periyasamy static u8 ath11k_hw_ipq8074_rx_desc_get_msdu_rx_bw(struct hal_rx_desc *desc) 324e678fbd4SKarthikeyan Periyasamy { 325e678fbd4SKarthikeyan Periyasamy return FIELD_GET(RX_MSDU_START_INFO3_RECV_BW, 326e678fbd4SKarthikeyan Periyasamy __le32_to_cpu(desc->u.ipq8074.msdu_start.info3)); 327e678fbd4SKarthikeyan Periyasamy } 328e678fbd4SKarthikeyan Periyasamy 329e678fbd4SKarthikeyan Periyasamy static u32 ath11k_hw_ipq8074_rx_desc_get_msdu_freq(struct hal_rx_desc *desc) 330e678fbd4SKarthikeyan Periyasamy { 331e678fbd4SKarthikeyan Periyasamy return __le32_to_cpu(desc->u.ipq8074.msdu_start.phy_meta_data); 332e678fbd4SKarthikeyan Periyasamy } 333e678fbd4SKarthikeyan Periyasamy 334e678fbd4SKarthikeyan Periyasamy static u8 ath11k_hw_ipq8074_rx_desc_get_msdu_pkt_type(struct hal_rx_desc *desc) 335e678fbd4SKarthikeyan Periyasamy { 336e678fbd4SKarthikeyan Periyasamy return FIELD_GET(RX_MSDU_START_INFO3_PKT_TYPE, 337e678fbd4SKarthikeyan Periyasamy __le32_to_cpu(desc->u.ipq8074.msdu_start.info3)); 338e678fbd4SKarthikeyan Periyasamy } 339e678fbd4SKarthikeyan Periyasamy 340e678fbd4SKarthikeyan Periyasamy static u8 ath11k_hw_ipq8074_rx_desc_get_msdu_nss(struct hal_rx_desc *desc) 341e678fbd4SKarthikeyan Periyasamy { 342e678fbd4SKarthikeyan Periyasamy return FIELD_GET(RX_MSDU_START_INFO3_MIMO_SS_BITMAP, 343e678fbd4SKarthikeyan Periyasamy __le32_to_cpu(desc->u.ipq8074.msdu_start.info3)); 344e678fbd4SKarthikeyan Periyasamy } 345e678fbd4SKarthikeyan Periyasamy 346e678fbd4SKarthikeyan Periyasamy static u8 ath11k_hw_ipq8074_rx_desc_get_mpdu_tid(struct hal_rx_desc *desc) 347e678fbd4SKarthikeyan Periyasamy { 348e678fbd4SKarthikeyan Periyasamy return FIELD_GET(RX_MPDU_START_INFO2_TID, 349e678fbd4SKarthikeyan Periyasamy __le32_to_cpu(desc->u.ipq8074.mpdu_start.info2)); 350e678fbd4SKarthikeyan Periyasamy } 351e678fbd4SKarthikeyan Periyasamy 352e678fbd4SKarthikeyan Periyasamy static u16 ath11k_hw_ipq8074_rx_desc_get_mpdu_peer_id(struct hal_rx_desc *desc) 353e678fbd4SKarthikeyan Periyasamy { 354e678fbd4SKarthikeyan Periyasamy return __le16_to_cpu(desc->u.ipq8074.mpdu_start.sw_peer_id); 355e678fbd4SKarthikeyan Periyasamy } 356e678fbd4SKarthikeyan Periyasamy 357e678fbd4SKarthikeyan Periyasamy static void ath11k_hw_ipq8074_rx_desc_copy_attn_end(struct hal_rx_desc *fdesc, 358e678fbd4SKarthikeyan Periyasamy struct hal_rx_desc *ldesc) 359e678fbd4SKarthikeyan Periyasamy { 360e678fbd4SKarthikeyan Periyasamy memcpy((u8 *)&fdesc->u.ipq8074.msdu_end, (u8 *)&ldesc->u.ipq8074.msdu_end, 361e678fbd4SKarthikeyan Periyasamy sizeof(struct rx_msdu_end_ipq8074)); 362e678fbd4SKarthikeyan Periyasamy memcpy((u8 *)&fdesc->u.ipq8074.attention, (u8 *)&ldesc->u.ipq8074.attention, 363e678fbd4SKarthikeyan Periyasamy sizeof(struct rx_attention)); 364e678fbd4SKarthikeyan Periyasamy memcpy((u8 *)&fdesc->u.ipq8074.mpdu_end, (u8 *)&ldesc->u.ipq8074.mpdu_end, 365e678fbd4SKarthikeyan Periyasamy sizeof(struct rx_mpdu_end)); 366e678fbd4SKarthikeyan Periyasamy } 367e678fbd4SKarthikeyan Periyasamy 368e678fbd4SKarthikeyan Periyasamy static u32 ath11k_hw_ipq8074_rx_desc_get_mpdu_start_tag(struct hal_rx_desc *desc) 369e678fbd4SKarthikeyan Periyasamy { 370e678fbd4SKarthikeyan Periyasamy return FIELD_GET(HAL_TLV_HDR_TAG, 371e678fbd4SKarthikeyan Periyasamy __le32_to_cpu(desc->u.ipq8074.mpdu_start_tag)); 372e678fbd4SKarthikeyan Periyasamy } 373e678fbd4SKarthikeyan Periyasamy 374e678fbd4SKarthikeyan Periyasamy static u32 ath11k_hw_ipq8074_rx_desc_get_mpdu_ppdu_id(struct hal_rx_desc *desc) 375e678fbd4SKarthikeyan Periyasamy { 376e678fbd4SKarthikeyan Periyasamy return __le16_to_cpu(desc->u.ipq8074.mpdu_start.phy_ppdu_id); 377e678fbd4SKarthikeyan Periyasamy } 378e678fbd4SKarthikeyan Periyasamy 379e678fbd4SKarthikeyan Periyasamy static void ath11k_hw_ipq8074_rx_desc_set_msdu_len(struct hal_rx_desc *desc, u16 len) 380e678fbd4SKarthikeyan Periyasamy { 381e678fbd4SKarthikeyan Periyasamy u32 info = __le32_to_cpu(desc->u.ipq8074.msdu_start.info1); 382e678fbd4SKarthikeyan Periyasamy 383e678fbd4SKarthikeyan Periyasamy info &= ~RX_MSDU_START_INFO1_MSDU_LENGTH; 384e678fbd4SKarthikeyan Periyasamy info |= FIELD_PREP(RX_MSDU_START_INFO1_MSDU_LENGTH, len); 385e678fbd4SKarthikeyan Periyasamy 386e678fbd4SKarthikeyan Periyasamy desc->u.ipq8074.msdu_start.info1 = __cpu_to_le32(info); 387e678fbd4SKarthikeyan Periyasamy } 388e678fbd4SKarthikeyan Periyasamy 3892167fa60SSriram R static bool ath11k_hw_ipq8074_rx_desc_mac_addr2_valid(struct hal_rx_desc *desc) 3902167fa60SSriram R { 3912167fa60SSriram R return __le32_to_cpu(desc->u.ipq8074.mpdu_start.info1) & 3922167fa60SSriram R RX_MPDU_START_INFO1_MAC_ADDR2_VALID; 3932167fa60SSriram R } 3942167fa60SSriram R 3952167fa60SSriram R static u8 *ath11k_hw_ipq8074_rx_desc_mpdu_start_addr2(struct hal_rx_desc *desc) 3962167fa60SSriram R { 3972167fa60SSriram R return desc->u.ipq8074.mpdu_start.addr2; 3982167fa60SSriram R } 3992167fa60SSriram R 400e678fbd4SKarthikeyan Periyasamy static 401e678fbd4SKarthikeyan Periyasamy struct rx_attention *ath11k_hw_ipq8074_rx_desc_get_attention(struct hal_rx_desc *desc) 402e678fbd4SKarthikeyan Periyasamy { 403e678fbd4SKarthikeyan Periyasamy return &desc->u.ipq8074.attention; 404e678fbd4SKarthikeyan Periyasamy } 405e678fbd4SKarthikeyan Periyasamy 406e678fbd4SKarthikeyan Periyasamy static u8 *ath11k_hw_ipq8074_rx_desc_get_msdu_payload(struct hal_rx_desc *desc) 407e678fbd4SKarthikeyan Periyasamy { 408e678fbd4SKarthikeyan Periyasamy return &desc->u.ipq8074.msdu_payload[0]; 409e678fbd4SKarthikeyan Periyasamy } 410e678fbd4SKarthikeyan Periyasamy 411e678fbd4SKarthikeyan Periyasamy static bool ath11k_hw_qcn9074_rx_desc_get_first_msdu(struct hal_rx_desc *desc) 412e678fbd4SKarthikeyan Periyasamy { 413e678fbd4SKarthikeyan Periyasamy return !!FIELD_GET(RX_MSDU_END_INFO4_FIRST_MSDU, 414e678fbd4SKarthikeyan Periyasamy __le16_to_cpu(desc->u.qcn9074.msdu_end.info4)); 415e678fbd4SKarthikeyan Periyasamy } 416e678fbd4SKarthikeyan Periyasamy 417e678fbd4SKarthikeyan Periyasamy static bool ath11k_hw_qcn9074_rx_desc_get_last_msdu(struct hal_rx_desc *desc) 418e678fbd4SKarthikeyan Periyasamy { 419e678fbd4SKarthikeyan Periyasamy return !!FIELD_GET(RX_MSDU_END_INFO4_LAST_MSDU, 420e678fbd4SKarthikeyan Periyasamy __le16_to_cpu(desc->u.qcn9074.msdu_end.info4)); 421e678fbd4SKarthikeyan Periyasamy } 422e678fbd4SKarthikeyan Periyasamy 423e678fbd4SKarthikeyan Periyasamy static u8 ath11k_hw_qcn9074_rx_desc_get_l3_pad_bytes(struct hal_rx_desc *desc) 424e678fbd4SKarthikeyan Periyasamy { 425e678fbd4SKarthikeyan Periyasamy return FIELD_GET(RX_MSDU_END_INFO4_L3_HDR_PADDING, 426e678fbd4SKarthikeyan Periyasamy __le16_to_cpu(desc->u.qcn9074.msdu_end.info4)); 427e678fbd4SKarthikeyan Periyasamy } 428e678fbd4SKarthikeyan Periyasamy 429e678fbd4SKarthikeyan Periyasamy static u8 *ath11k_hw_qcn9074_rx_desc_get_hdr_status(struct hal_rx_desc *desc) 430e678fbd4SKarthikeyan Periyasamy { 431e678fbd4SKarthikeyan Periyasamy return desc->u.qcn9074.hdr_status; 432e678fbd4SKarthikeyan Periyasamy } 433e678fbd4SKarthikeyan Periyasamy 434e678fbd4SKarthikeyan Periyasamy static bool ath11k_hw_qcn9074_rx_desc_encrypt_valid(struct hal_rx_desc *desc) 435e678fbd4SKarthikeyan Periyasamy { 436e678fbd4SKarthikeyan Periyasamy return __le32_to_cpu(desc->u.qcn9074.mpdu_start.info11) & 437e678fbd4SKarthikeyan Periyasamy RX_MPDU_START_INFO11_ENCRYPT_INFO_VALID; 438e678fbd4SKarthikeyan Periyasamy } 439e678fbd4SKarthikeyan Periyasamy 440e678fbd4SKarthikeyan Periyasamy static u32 ath11k_hw_qcn9074_rx_desc_get_encrypt_type(struct hal_rx_desc *desc) 441e678fbd4SKarthikeyan Periyasamy { 442e678fbd4SKarthikeyan Periyasamy return FIELD_GET(RX_MPDU_START_INFO9_ENC_TYPE, 443e678fbd4SKarthikeyan Periyasamy __le32_to_cpu(desc->u.qcn9074.mpdu_start.info9)); 444e678fbd4SKarthikeyan Periyasamy } 445e678fbd4SKarthikeyan Periyasamy 446e678fbd4SKarthikeyan Periyasamy static u8 ath11k_hw_qcn9074_rx_desc_get_decap_type(struct hal_rx_desc *desc) 447e678fbd4SKarthikeyan Periyasamy { 448e678fbd4SKarthikeyan Periyasamy return FIELD_GET(RX_MSDU_START_INFO2_DECAP_FORMAT, 449e678fbd4SKarthikeyan Periyasamy __le32_to_cpu(desc->u.qcn9074.msdu_start.info2)); 450e678fbd4SKarthikeyan Periyasamy } 451e678fbd4SKarthikeyan Periyasamy 452e678fbd4SKarthikeyan Periyasamy static u8 ath11k_hw_qcn9074_rx_desc_get_mesh_ctl(struct hal_rx_desc *desc) 453e678fbd4SKarthikeyan Periyasamy { 454e678fbd4SKarthikeyan Periyasamy return FIELD_GET(RX_MSDU_START_INFO2_MESH_CTRL_PRESENT, 455e678fbd4SKarthikeyan Periyasamy __le32_to_cpu(desc->u.qcn9074.msdu_start.info2)); 456e678fbd4SKarthikeyan Periyasamy } 457e678fbd4SKarthikeyan Periyasamy 458b3febdccSP Praneesh static bool ath11k_hw_qcn9074_rx_desc_get_ldpc_support(struct hal_rx_desc *desc) 459b3febdccSP Praneesh { 460b3febdccSP Praneesh return FIELD_GET(RX_MSDU_START_INFO2_LDPC, 461b3febdccSP Praneesh __le32_to_cpu(desc->u.qcn9074.msdu_start.info2)); 462b3febdccSP Praneesh } 463b3febdccSP Praneesh 464e678fbd4SKarthikeyan Periyasamy static bool ath11k_hw_qcn9074_rx_desc_get_mpdu_seq_ctl_vld(struct hal_rx_desc *desc) 465e678fbd4SKarthikeyan Periyasamy { 466e678fbd4SKarthikeyan Periyasamy return !!FIELD_GET(RX_MPDU_START_INFO11_MPDU_SEQ_CTRL_VALID, 467e678fbd4SKarthikeyan Periyasamy __le32_to_cpu(desc->u.qcn9074.mpdu_start.info11)); 468e678fbd4SKarthikeyan Periyasamy } 469e678fbd4SKarthikeyan Periyasamy 470e678fbd4SKarthikeyan Periyasamy static bool ath11k_hw_qcn9074_rx_desc_get_mpdu_fc_valid(struct hal_rx_desc *desc) 471e678fbd4SKarthikeyan Periyasamy { 472e678fbd4SKarthikeyan Periyasamy return !!FIELD_GET(RX_MPDU_START_INFO11_MPDU_FCTRL_VALID, 473e678fbd4SKarthikeyan Periyasamy __le32_to_cpu(desc->u.qcn9074.mpdu_start.info11)); 474e678fbd4SKarthikeyan Periyasamy } 475e678fbd4SKarthikeyan Periyasamy 476e678fbd4SKarthikeyan Periyasamy static u16 ath11k_hw_qcn9074_rx_desc_get_mpdu_start_seq_no(struct hal_rx_desc *desc) 477e678fbd4SKarthikeyan Periyasamy { 478e678fbd4SKarthikeyan Periyasamy return FIELD_GET(RX_MPDU_START_INFO11_MPDU_SEQ_NUM, 479e678fbd4SKarthikeyan Periyasamy __le32_to_cpu(desc->u.qcn9074.mpdu_start.info11)); 480e678fbd4SKarthikeyan Periyasamy } 481e678fbd4SKarthikeyan Periyasamy 482e678fbd4SKarthikeyan Periyasamy static u16 ath11k_hw_qcn9074_rx_desc_get_msdu_len(struct hal_rx_desc *desc) 483e678fbd4SKarthikeyan Periyasamy { 484e678fbd4SKarthikeyan Periyasamy return FIELD_GET(RX_MSDU_START_INFO1_MSDU_LENGTH, 485e678fbd4SKarthikeyan Periyasamy __le32_to_cpu(desc->u.qcn9074.msdu_start.info1)); 486e678fbd4SKarthikeyan Periyasamy } 487e678fbd4SKarthikeyan Periyasamy 488e678fbd4SKarthikeyan Periyasamy static u8 ath11k_hw_qcn9074_rx_desc_get_msdu_sgi(struct hal_rx_desc *desc) 489e678fbd4SKarthikeyan Periyasamy { 490e678fbd4SKarthikeyan Periyasamy return FIELD_GET(RX_MSDU_START_INFO3_SGI, 491e678fbd4SKarthikeyan Periyasamy __le32_to_cpu(desc->u.qcn9074.msdu_start.info3)); 492e678fbd4SKarthikeyan Periyasamy } 493e678fbd4SKarthikeyan Periyasamy 494e678fbd4SKarthikeyan Periyasamy static u8 ath11k_hw_qcn9074_rx_desc_get_msdu_rate_mcs(struct hal_rx_desc *desc) 495e678fbd4SKarthikeyan Periyasamy { 496e678fbd4SKarthikeyan Periyasamy return FIELD_GET(RX_MSDU_START_INFO3_RATE_MCS, 497e678fbd4SKarthikeyan Periyasamy __le32_to_cpu(desc->u.qcn9074.msdu_start.info3)); 498e678fbd4SKarthikeyan Periyasamy } 499e678fbd4SKarthikeyan Periyasamy 500e678fbd4SKarthikeyan Periyasamy static u8 ath11k_hw_qcn9074_rx_desc_get_msdu_rx_bw(struct hal_rx_desc *desc) 501e678fbd4SKarthikeyan Periyasamy { 502e678fbd4SKarthikeyan Periyasamy return FIELD_GET(RX_MSDU_START_INFO3_RECV_BW, 503e678fbd4SKarthikeyan Periyasamy __le32_to_cpu(desc->u.qcn9074.msdu_start.info3)); 504e678fbd4SKarthikeyan Periyasamy } 505e678fbd4SKarthikeyan Periyasamy 506e678fbd4SKarthikeyan Periyasamy static u32 ath11k_hw_qcn9074_rx_desc_get_msdu_freq(struct hal_rx_desc *desc) 507e678fbd4SKarthikeyan Periyasamy { 508e678fbd4SKarthikeyan Periyasamy return __le32_to_cpu(desc->u.qcn9074.msdu_start.phy_meta_data); 509e678fbd4SKarthikeyan Periyasamy } 510e678fbd4SKarthikeyan Periyasamy 511e678fbd4SKarthikeyan Periyasamy static u8 ath11k_hw_qcn9074_rx_desc_get_msdu_pkt_type(struct hal_rx_desc *desc) 512e678fbd4SKarthikeyan Periyasamy { 513e678fbd4SKarthikeyan Periyasamy return FIELD_GET(RX_MSDU_START_INFO3_PKT_TYPE, 514e678fbd4SKarthikeyan Periyasamy __le32_to_cpu(desc->u.qcn9074.msdu_start.info3)); 515e678fbd4SKarthikeyan Periyasamy } 516e678fbd4SKarthikeyan Periyasamy 517e678fbd4SKarthikeyan Periyasamy static u8 ath11k_hw_qcn9074_rx_desc_get_msdu_nss(struct hal_rx_desc *desc) 518e678fbd4SKarthikeyan Periyasamy { 519e678fbd4SKarthikeyan Periyasamy return FIELD_GET(RX_MSDU_START_INFO3_MIMO_SS_BITMAP, 520e678fbd4SKarthikeyan Periyasamy __le32_to_cpu(desc->u.qcn9074.msdu_start.info3)); 521e678fbd4SKarthikeyan Periyasamy } 522e678fbd4SKarthikeyan Periyasamy 523e678fbd4SKarthikeyan Periyasamy static u8 ath11k_hw_qcn9074_rx_desc_get_mpdu_tid(struct hal_rx_desc *desc) 524e678fbd4SKarthikeyan Periyasamy { 525e678fbd4SKarthikeyan Periyasamy return FIELD_GET(RX_MPDU_START_INFO9_TID, 526e678fbd4SKarthikeyan Periyasamy __le32_to_cpu(desc->u.qcn9074.mpdu_start.info9)); 527e678fbd4SKarthikeyan Periyasamy } 528e678fbd4SKarthikeyan Periyasamy 529e678fbd4SKarthikeyan Periyasamy static u16 ath11k_hw_qcn9074_rx_desc_get_mpdu_peer_id(struct hal_rx_desc *desc) 530e678fbd4SKarthikeyan Periyasamy { 531e678fbd4SKarthikeyan Periyasamy return __le16_to_cpu(desc->u.qcn9074.mpdu_start.sw_peer_id); 532e678fbd4SKarthikeyan Periyasamy } 533e678fbd4SKarthikeyan Periyasamy 534e678fbd4SKarthikeyan Periyasamy static void ath11k_hw_qcn9074_rx_desc_copy_attn_end(struct hal_rx_desc *fdesc, 535e678fbd4SKarthikeyan Periyasamy struct hal_rx_desc *ldesc) 536e678fbd4SKarthikeyan Periyasamy { 537e678fbd4SKarthikeyan Periyasamy memcpy((u8 *)&fdesc->u.qcn9074.msdu_end, (u8 *)&ldesc->u.qcn9074.msdu_end, 538e678fbd4SKarthikeyan Periyasamy sizeof(struct rx_msdu_end_qcn9074)); 539e678fbd4SKarthikeyan Periyasamy memcpy((u8 *)&fdesc->u.qcn9074.attention, (u8 *)&ldesc->u.qcn9074.attention, 540e678fbd4SKarthikeyan Periyasamy sizeof(struct rx_attention)); 541e678fbd4SKarthikeyan Periyasamy memcpy((u8 *)&fdesc->u.qcn9074.mpdu_end, (u8 *)&ldesc->u.qcn9074.mpdu_end, 542e678fbd4SKarthikeyan Periyasamy sizeof(struct rx_mpdu_end)); 543e678fbd4SKarthikeyan Periyasamy } 544e678fbd4SKarthikeyan Periyasamy 545e678fbd4SKarthikeyan Periyasamy static u32 ath11k_hw_qcn9074_rx_desc_get_mpdu_start_tag(struct hal_rx_desc *desc) 546e678fbd4SKarthikeyan Periyasamy { 547e678fbd4SKarthikeyan Periyasamy return FIELD_GET(HAL_TLV_HDR_TAG, 548e678fbd4SKarthikeyan Periyasamy __le32_to_cpu(desc->u.qcn9074.mpdu_start_tag)); 549e678fbd4SKarthikeyan Periyasamy } 550e678fbd4SKarthikeyan Periyasamy 551e678fbd4SKarthikeyan Periyasamy static u32 ath11k_hw_qcn9074_rx_desc_get_mpdu_ppdu_id(struct hal_rx_desc *desc) 552e678fbd4SKarthikeyan Periyasamy { 553e678fbd4SKarthikeyan Periyasamy return __le16_to_cpu(desc->u.qcn9074.mpdu_start.phy_ppdu_id); 554e678fbd4SKarthikeyan Periyasamy } 555e678fbd4SKarthikeyan Periyasamy 556e678fbd4SKarthikeyan Periyasamy static void ath11k_hw_qcn9074_rx_desc_set_msdu_len(struct hal_rx_desc *desc, u16 len) 557e678fbd4SKarthikeyan Periyasamy { 558e678fbd4SKarthikeyan Periyasamy u32 info = __le32_to_cpu(desc->u.qcn9074.msdu_start.info1); 559e678fbd4SKarthikeyan Periyasamy 560e678fbd4SKarthikeyan Periyasamy info &= ~RX_MSDU_START_INFO1_MSDU_LENGTH; 561e678fbd4SKarthikeyan Periyasamy info |= FIELD_PREP(RX_MSDU_START_INFO1_MSDU_LENGTH, len); 562e678fbd4SKarthikeyan Periyasamy 563e678fbd4SKarthikeyan Periyasamy desc->u.qcn9074.msdu_start.info1 = __cpu_to_le32(info); 564e678fbd4SKarthikeyan Periyasamy } 565e678fbd4SKarthikeyan Periyasamy 566e678fbd4SKarthikeyan Periyasamy static 567e678fbd4SKarthikeyan Periyasamy struct rx_attention *ath11k_hw_qcn9074_rx_desc_get_attention(struct hal_rx_desc *desc) 568e678fbd4SKarthikeyan Periyasamy { 569e678fbd4SKarthikeyan Periyasamy return &desc->u.qcn9074.attention; 570e678fbd4SKarthikeyan Periyasamy } 571e678fbd4SKarthikeyan Periyasamy 572e678fbd4SKarthikeyan Periyasamy static u8 *ath11k_hw_qcn9074_rx_desc_get_msdu_payload(struct hal_rx_desc *desc) 573e678fbd4SKarthikeyan Periyasamy { 574e678fbd4SKarthikeyan Periyasamy return &desc->u.qcn9074.msdu_payload[0]; 575e678fbd4SKarthikeyan Periyasamy } 576e678fbd4SKarthikeyan Periyasamy 5772167fa60SSriram R static bool ath11k_hw_ipq9074_rx_desc_mac_addr2_valid(struct hal_rx_desc *desc) 5782167fa60SSriram R { 5792167fa60SSriram R return __le32_to_cpu(desc->u.qcn9074.mpdu_start.info11) & 5802167fa60SSriram R RX_MPDU_START_INFO11_MAC_ADDR2_VALID; 5812167fa60SSriram R } 5822167fa60SSriram R 5832167fa60SSriram R static u8 *ath11k_hw_ipq9074_rx_desc_mpdu_start_addr2(struct hal_rx_desc *desc) 5842167fa60SSriram R { 5852167fa60SSriram R return desc->u.qcn9074.mpdu_start.addr2; 5862167fa60SSriram R } 5872167fa60SSriram R 588e4073430SBaochen Qiang static bool ath11k_hw_wcn6855_rx_desc_get_first_msdu(struct hal_rx_desc *desc) 589e4073430SBaochen Qiang { 590e4073430SBaochen Qiang return !!FIELD_GET(RX_MSDU_END_INFO2_FIRST_MSDU_WCN6855, 591e4073430SBaochen Qiang __le32_to_cpu(desc->u.wcn6855.msdu_end.info2)); 592e4073430SBaochen Qiang } 593e4073430SBaochen Qiang 594e4073430SBaochen Qiang static bool ath11k_hw_wcn6855_rx_desc_get_last_msdu(struct hal_rx_desc *desc) 595e4073430SBaochen Qiang { 596e4073430SBaochen Qiang return !!FIELD_GET(RX_MSDU_END_INFO2_LAST_MSDU_WCN6855, 597e4073430SBaochen Qiang __le32_to_cpu(desc->u.wcn6855.msdu_end.info2)); 598e4073430SBaochen Qiang } 599e4073430SBaochen Qiang 600e4073430SBaochen Qiang static u8 ath11k_hw_wcn6855_rx_desc_get_l3_pad_bytes(struct hal_rx_desc *desc) 601e4073430SBaochen Qiang { 602e4073430SBaochen Qiang return FIELD_GET(RX_MSDU_END_INFO2_L3_HDR_PADDING, 603e4073430SBaochen Qiang __le32_to_cpu(desc->u.wcn6855.msdu_end.info2)); 604e4073430SBaochen Qiang } 605e4073430SBaochen Qiang 606e4073430SBaochen Qiang static u8 *ath11k_hw_wcn6855_rx_desc_get_hdr_status(struct hal_rx_desc *desc) 607e4073430SBaochen Qiang { 608e4073430SBaochen Qiang return desc->u.wcn6855.hdr_status; 609e4073430SBaochen Qiang } 610e4073430SBaochen Qiang 611e4073430SBaochen Qiang static bool ath11k_hw_wcn6855_rx_desc_encrypt_valid(struct hal_rx_desc *desc) 612e4073430SBaochen Qiang { 613e4073430SBaochen Qiang return __le32_to_cpu(desc->u.wcn6855.mpdu_start.info1) & 614e4073430SBaochen Qiang RX_MPDU_START_INFO1_ENCRYPT_INFO_VALID; 615e4073430SBaochen Qiang } 616e4073430SBaochen Qiang 617e4073430SBaochen Qiang static u32 ath11k_hw_wcn6855_rx_desc_get_encrypt_type(struct hal_rx_desc *desc) 618e4073430SBaochen Qiang { 619e4073430SBaochen Qiang return FIELD_GET(RX_MPDU_START_INFO2_ENC_TYPE, 620e4073430SBaochen Qiang __le32_to_cpu(desc->u.wcn6855.mpdu_start.info2)); 621e4073430SBaochen Qiang } 622e4073430SBaochen Qiang 623e4073430SBaochen Qiang static u8 ath11k_hw_wcn6855_rx_desc_get_decap_type(struct hal_rx_desc *desc) 624e4073430SBaochen Qiang { 625e4073430SBaochen Qiang return FIELD_GET(RX_MSDU_START_INFO2_DECAP_FORMAT, 626e4073430SBaochen Qiang __le32_to_cpu(desc->u.wcn6855.msdu_start.info2)); 627e4073430SBaochen Qiang } 628e4073430SBaochen Qiang 629e4073430SBaochen Qiang static u8 ath11k_hw_wcn6855_rx_desc_get_mesh_ctl(struct hal_rx_desc *desc) 630e4073430SBaochen Qiang { 631e4073430SBaochen Qiang return FIELD_GET(RX_MSDU_START_INFO2_MESH_CTRL_PRESENT, 632e4073430SBaochen Qiang __le32_to_cpu(desc->u.wcn6855.msdu_start.info2)); 633e4073430SBaochen Qiang } 634e4073430SBaochen Qiang 635e4073430SBaochen Qiang static bool ath11k_hw_wcn6855_rx_desc_get_mpdu_seq_ctl_vld(struct hal_rx_desc *desc) 636e4073430SBaochen Qiang { 637e4073430SBaochen Qiang return !!FIELD_GET(RX_MPDU_START_INFO1_MPDU_SEQ_CTRL_VALID, 638e4073430SBaochen Qiang __le32_to_cpu(desc->u.wcn6855.mpdu_start.info1)); 639e4073430SBaochen Qiang } 640e4073430SBaochen Qiang 641e4073430SBaochen Qiang static bool ath11k_hw_wcn6855_rx_desc_get_mpdu_fc_valid(struct hal_rx_desc *desc) 642e4073430SBaochen Qiang { 643e4073430SBaochen Qiang return !!FIELD_GET(RX_MPDU_START_INFO1_MPDU_FCTRL_VALID, 644e4073430SBaochen Qiang __le32_to_cpu(desc->u.wcn6855.mpdu_start.info1)); 645e4073430SBaochen Qiang } 646e4073430SBaochen Qiang 647e4073430SBaochen Qiang static u16 ath11k_hw_wcn6855_rx_desc_get_mpdu_start_seq_no(struct hal_rx_desc *desc) 648e4073430SBaochen Qiang { 649e4073430SBaochen Qiang return FIELD_GET(RX_MPDU_START_INFO1_MPDU_SEQ_NUM, 650e4073430SBaochen Qiang __le32_to_cpu(desc->u.wcn6855.mpdu_start.info1)); 651e4073430SBaochen Qiang } 652e4073430SBaochen Qiang 653e4073430SBaochen Qiang static u16 ath11k_hw_wcn6855_rx_desc_get_msdu_len(struct hal_rx_desc *desc) 654e4073430SBaochen Qiang { 655e4073430SBaochen Qiang return FIELD_GET(RX_MSDU_START_INFO1_MSDU_LENGTH, 656e4073430SBaochen Qiang __le32_to_cpu(desc->u.wcn6855.msdu_start.info1)); 657e4073430SBaochen Qiang } 658e4073430SBaochen Qiang 659e4073430SBaochen Qiang static u8 ath11k_hw_wcn6855_rx_desc_get_msdu_sgi(struct hal_rx_desc *desc) 660e4073430SBaochen Qiang { 661e4073430SBaochen Qiang return FIELD_GET(RX_MSDU_START_INFO3_SGI, 662e4073430SBaochen Qiang __le32_to_cpu(desc->u.wcn6855.msdu_start.info3)); 663e4073430SBaochen Qiang } 664e4073430SBaochen Qiang 665e4073430SBaochen Qiang static u8 ath11k_hw_wcn6855_rx_desc_get_msdu_rate_mcs(struct hal_rx_desc *desc) 666e4073430SBaochen Qiang { 667e4073430SBaochen Qiang return FIELD_GET(RX_MSDU_START_INFO3_RATE_MCS, 668e4073430SBaochen Qiang __le32_to_cpu(desc->u.wcn6855.msdu_start.info3)); 669e4073430SBaochen Qiang } 670e4073430SBaochen Qiang 671e4073430SBaochen Qiang static u8 ath11k_hw_wcn6855_rx_desc_get_msdu_rx_bw(struct hal_rx_desc *desc) 672e4073430SBaochen Qiang { 673e4073430SBaochen Qiang return FIELD_GET(RX_MSDU_START_INFO3_RECV_BW, 674e4073430SBaochen Qiang __le32_to_cpu(desc->u.wcn6855.msdu_start.info3)); 675e4073430SBaochen Qiang } 676e4073430SBaochen Qiang 677e4073430SBaochen Qiang static u32 ath11k_hw_wcn6855_rx_desc_get_msdu_freq(struct hal_rx_desc *desc) 678e4073430SBaochen Qiang { 679e4073430SBaochen Qiang return __le32_to_cpu(desc->u.wcn6855.msdu_start.phy_meta_data); 680e4073430SBaochen Qiang } 681e4073430SBaochen Qiang 682e4073430SBaochen Qiang static u8 ath11k_hw_wcn6855_rx_desc_get_msdu_pkt_type(struct hal_rx_desc *desc) 683e4073430SBaochen Qiang { 684e4073430SBaochen Qiang return FIELD_GET(RX_MSDU_START_INFO3_PKT_TYPE, 685e4073430SBaochen Qiang __le32_to_cpu(desc->u.wcn6855.msdu_start.info3)); 686e4073430SBaochen Qiang } 687e4073430SBaochen Qiang 688e4073430SBaochen Qiang static u8 ath11k_hw_wcn6855_rx_desc_get_msdu_nss(struct hal_rx_desc *desc) 689e4073430SBaochen Qiang { 690e4073430SBaochen Qiang return FIELD_GET(RX_MSDU_START_INFO3_MIMO_SS_BITMAP, 691e4073430SBaochen Qiang __le32_to_cpu(desc->u.wcn6855.msdu_start.info3)); 692e4073430SBaochen Qiang } 693e4073430SBaochen Qiang 694e4073430SBaochen Qiang static u8 ath11k_hw_wcn6855_rx_desc_get_mpdu_tid(struct hal_rx_desc *desc) 695e4073430SBaochen Qiang { 696e4073430SBaochen Qiang return FIELD_GET(RX_MPDU_START_INFO2_TID_WCN6855, 697e4073430SBaochen Qiang __le32_to_cpu(desc->u.wcn6855.mpdu_start.info2)); 698e4073430SBaochen Qiang } 699e4073430SBaochen Qiang 700e4073430SBaochen Qiang static u16 ath11k_hw_wcn6855_rx_desc_get_mpdu_peer_id(struct hal_rx_desc *desc) 701e4073430SBaochen Qiang { 702e4073430SBaochen Qiang return __le16_to_cpu(desc->u.wcn6855.mpdu_start.sw_peer_id); 703e4073430SBaochen Qiang } 704e4073430SBaochen Qiang 705e4073430SBaochen Qiang static void ath11k_hw_wcn6855_rx_desc_copy_attn_end(struct hal_rx_desc *fdesc, 706e4073430SBaochen Qiang struct hal_rx_desc *ldesc) 707e4073430SBaochen Qiang { 708e4073430SBaochen Qiang memcpy((u8 *)&fdesc->u.wcn6855.msdu_end, (u8 *)&ldesc->u.wcn6855.msdu_end, 709e4073430SBaochen Qiang sizeof(struct rx_msdu_end_wcn6855)); 710e4073430SBaochen Qiang memcpy((u8 *)&fdesc->u.wcn6855.attention, (u8 *)&ldesc->u.wcn6855.attention, 711e4073430SBaochen Qiang sizeof(struct rx_attention)); 712e4073430SBaochen Qiang memcpy((u8 *)&fdesc->u.wcn6855.mpdu_end, (u8 *)&ldesc->u.wcn6855.mpdu_end, 713e4073430SBaochen Qiang sizeof(struct rx_mpdu_end)); 714e4073430SBaochen Qiang } 715e4073430SBaochen Qiang 716e4073430SBaochen Qiang static u32 ath11k_hw_wcn6855_rx_desc_get_mpdu_start_tag(struct hal_rx_desc *desc) 717e4073430SBaochen Qiang { 718e4073430SBaochen Qiang return FIELD_GET(HAL_TLV_HDR_TAG, 719e4073430SBaochen Qiang __le32_to_cpu(desc->u.wcn6855.mpdu_start_tag)); 720e4073430SBaochen Qiang } 721e4073430SBaochen Qiang 722e4073430SBaochen Qiang static u32 ath11k_hw_wcn6855_rx_desc_get_mpdu_ppdu_id(struct hal_rx_desc *desc) 723e4073430SBaochen Qiang { 724e4073430SBaochen Qiang return __le16_to_cpu(desc->u.wcn6855.mpdu_start.phy_ppdu_id); 725e4073430SBaochen Qiang } 726e4073430SBaochen Qiang 727e4073430SBaochen Qiang static void ath11k_hw_wcn6855_rx_desc_set_msdu_len(struct hal_rx_desc *desc, u16 len) 728e4073430SBaochen Qiang { 729e4073430SBaochen Qiang u32 info = __le32_to_cpu(desc->u.wcn6855.msdu_start.info1); 730e4073430SBaochen Qiang 731e4073430SBaochen Qiang info &= ~RX_MSDU_START_INFO1_MSDU_LENGTH; 732e4073430SBaochen Qiang info |= FIELD_PREP(RX_MSDU_START_INFO1_MSDU_LENGTH, len); 733e4073430SBaochen Qiang 734e4073430SBaochen Qiang desc->u.wcn6855.msdu_start.info1 = __cpu_to_le32(info); 735e4073430SBaochen Qiang } 736e4073430SBaochen Qiang 737e4073430SBaochen Qiang static 738e4073430SBaochen Qiang struct rx_attention *ath11k_hw_wcn6855_rx_desc_get_attention(struct hal_rx_desc *desc) 739e4073430SBaochen Qiang { 740e4073430SBaochen Qiang return &desc->u.wcn6855.attention; 741e4073430SBaochen Qiang } 742e4073430SBaochen Qiang 743e4073430SBaochen Qiang static u8 *ath11k_hw_wcn6855_rx_desc_get_msdu_payload(struct hal_rx_desc *desc) 744e4073430SBaochen Qiang { 745e4073430SBaochen Qiang return &desc->u.wcn6855.msdu_payload[0]; 746e4073430SBaochen Qiang } 747e4073430SBaochen Qiang 7482167fa60SSriram R static bool ath11k_hw_wcn6855_rx_desc_mac_addr2_valid(struct hal_rx_desc *desc) 7492167fa60SSriram R { 7502167fa60SSriram R return __le32_to_cpu(desc->u.wcn6855.mpdu_start.info1) & 7512167fa60SSriram R RX_MPDU_START_INFO1_MAC_ADDR2_VALID; 7522167fa60SSriram R } 7532167fa60SSriram R 7542167fa60SSriram R static u8 *ath11k_hw_wcn6855_rx_desc_mpdu_start_addr2(struct hal_rx_desc *desc) 7552167fa60SSriram R { 7562167fa60SSriram R return desc->u.wcn6855.mpdu_start.addr2; 7572167fa60SSriram R } 7582167fa60SSriram R 7590d55b76fSBaochen Qiang static void ath11k_hw_wcn6855_reo_setup(struct ath11k_base *ab) 7600d55b76fSBaochen Qiang { 7610d55b76fSBaochen Qiang u32 reo_base = HAL_SEQ_WCSS_UMAC_REO_REG; 7620d55b76fSBaochen Qiang u32 val; 7630d55b76fSBaochen Qiang /* Each hash entry uses four bits to map to a particular ring. */ 7640d55b76fSBaochen Qiang u32 ring_hash_map = HAL_HASH_ROUTING_RING_SW1 << 0 | 7650d55b76fSBaochen Qiang HAL_HASH_ROUTING_RING_SW2 << 4 | 7660d55b76fSBaochen Qiang HAL_HASH_ROUTING_RING_SW3 << 8 | 7670d55b76fSBaochen Qiang HAL_HASH_ROUTING_RING_SW4 << 12 | 7680d55b76fSBaochen Qiang HAL_HASH_ROUTING_RING_SW1 << 16 | 7690d55b76fSBaochen Qiang HAL_HASH_ROUTING_RING_SW2 << 20 | 7700d55b76fSBaochen Qiang HAL_HASH_ROUTING_RING_SW3 << 24 | 7710d55b76fSBaochen Qiang HAL_HASH_ROUTING_RING_SW4 << 28; 7720d55b76fSBaochen Qiang 7730d55b76fSBaochen Qiang val = ath11k_hif_read32(ab, reo_base + HAL_REO1_GEN_ENABLE); 7740d55b76fSBaochen Qiang val |= FIELD_PREP(HAL_REO1_GEN_ENABLE_AGING_LIST_ENABLE, 1) | 7750d55b76fSBaochen Qiang FIELD_PREP(HAL_REO1_GEN_ENABLE_AGING_FLUSH_ENABLE, 1); 7760d55b76fSBaochen Qiang ath11k_hif_write32(ab, reo_base + HAL_REO1_GEN_ENABLE, val); 7770d55b76fSBaochen Qiang 77822cc6873SManikanta Pubbisetty val = ath11k_hif_read32(ab, reo_base + HAL_REO1_MISC_CTL(ab)); 7790d55b76fSBaochen Qiang val &= ~HAL_REO1_MISC_CTL_FRAGMENT_DST_RING; 7800d55b76fSBaochen Qiang val |= FIELD_PREP(HAL_REO1_MISC_CTL_FRAGMENT_DST_RING, HAL_SRNG_RING_ID_REO2SW1); 78122cc6873SManikanta Pubbisetty ath11k_hif_write32(ab, reo_base + HAL_REO1_MISC_CTL(ab), val); 7820d55b76fSBaochen Qiang 7830d55b76fSBaochen Qiang ath11k_hif_write32(ab, reo_base + HAL_REO1_AGING_THRESH_IX_0(ab), 7840d55b76fSBaochen Qiang HAL_DEFAULT_REO_TIMEOUT_USEC); 7850d55b76fSBaochen Qiang ath11k_hif_write32(ab, reo_base + HAL_REO1_AGING_THRESH_IX_1(ab), 7860d55b76fSBaochen Qiang HAL_DEFAULT_REO_TIMEOUT_USEC); 7870d55b76fSBaochen Qiang ath11k_hif_write32(ab, reo_base + HAL_REO1_AGING_THRESH_IX_2(ab), 7880d55b76fSBaochen Qiang HAL_DEFAULT_REO_TIMEOUT_USEC); 7890d55b76fSBaochen Qiang ath11k_hif_write32(ab, reo_base + HAL_REO1_AGING_THRESH_IX_3(ab), 7900d55b76fSBaochen Qiang HAL_DEFAULT_REO_TIMEOUT_USEC); 7910d55b76fSBaochen Qiang 7920d55b76fSBaochen Qiang ath11k_hif_write32(ab, reo_base + HAL_REO1_DEST_RING_CTRL_IX_2, 7930d55b76fSBaochen Qiang ring_hash_map); 7940d55b76fSBaochen Qiang ath11k_hif_write32(ab, reo_base + HAL_REO1_DEST_RING_CTRL_IX_3, 7950d55b76fSBaochen Qiang ring_hash_map); 7960d55b76fSBaochen Qiang } 7970d55b76fSBaochen Qiang 79869968f88SSriram R static void ath11k_hw_ipq5018_reo_setup(struct ath11k_base *ab) 79969968f88SSriram R { 80069968f88SSriram R u32 reo_base = HAL_SEQ_WCSS_UMAC_REO_REG; 80169968f88SSriram R u32 val; 80269968f88SSriram R 80369968f88SSriram R /* Each hash entry uses three bits to map to a particular ring. */ 80469968f88SSriram R u32 ring_hash_map = HAL_HASH_ROUTING_RING_SW1 << 0 | 80569968f88SSriram R HAL_HASH_ROUTING_RING_SW2 << 4 | 80669968f88SSriram R HAL_HASH_ROUTING_RING_SW3 << 8 | 80769968f88SSriram R HAL_HASH_ROUTING_RING_SW4 << 12 | 80869968f88SSriram R HAL_HASH_ROUTING_RING_SW1 << 16 | 80969968f88SSriram R HAL_HASH_ROUTING_RING_SW2 << 20 | 81069968f88SSriram R HAL_HASH_ROUTING_RING_SW3 << 24 | 81169968f88SSriram R HAL_HASH_ROUTING_RING_SW4 << 28; 81269968f88SSriram R 81369968f88SSriram R val = ath11k_hif_read32(ab, reo_base + HAL_REO1_GEN_ENABLE); 81469968f88SSriram R 81569968f88SSriram R val &= ~HAL_REO1_GEN_ENABLE_FRAG_DST_RING; 81669968f88SSriram R val |= FIELD_PREP(HAL_REO1_GEN_ENABLE_FRAG_DST_RING, 81769968f88SSriram R HAL_SRNG_RING_ID_REO2SW1) | 81869968f88SSriram R FIELD_PREP(HAL_REO1_GEN_ENABLE_AGING_LIST_ENABLE, 1) | 81969968f88SSriram R FIELD_PREP(HAL_REO1_GEN_ENABLE_AGING_FLUSH_ENABLE, 1); 82069968f88SSriram R ath11k_hif_write32(ab, reo_base + HAL_REO1_GEN_ENABLE, val); 82169968f88SSriram R 82269968f88SSriram R ath11k_hif_write32(ab, reo_base + HAL_REO1_AGING_THRESH_IX_0(ab), 82369968f88SSriram R HAL_DEFAULT_REO_TIMEOUT_USEC); 82469968f88SSriram R ath11k_hif_write32(ab, reo_base + HAL_REO1_AGING_THRESH_IX_1(ab), 82569968f88SSriram R HAL_DEFAULT_REO_TIMEOUT_USEC); 82669968f88SSriram R ath11k_hif_write32(ab, reo_base + HAL_REO1_AGING_THRESH_IX_2(ab), 82769968f88SSriram R HAL_DEFAULT_REO_TIMEOUT_USEC); 82869968f88SSriram R ath11k_hif_write32(ab, reo_base + HAL_REO1_AGING_THRESH_IX_3(ab), 82969968f88SSriram R HAL_DEFAULT_REO_TIMEOUT_USEC); 83069968f88SSriram R 83169968f88SSriram R ath11k_hif_write32(ab, reo_base + HAL_REO1_DEST_RING_CTRL_IX_0, 83269968f88SSriram R ring_hash_map); 83369968f88SSriram R ath11k_hif_write32(ab, reo_base + HAL_REO1_DEST_RING_CTRL_IX_1, 83469968f88SSriram R ring_hash_map); 83569968f88SSriram R ath11k_hif_write32(ab, reo_base + HAL_REO1_DEST_RING_CTRL_IX_2, 83669968f88SSriram R ring_hash_map); 83769968f88SSriram R ath11k_hif_write32(ab, reo_base + HAL_REO1_DEST_RING_CTRL_IX_3, 83869968f88SSriram R ring_hash_map); 83969968f88SSriram R } 84069968f88SSriram R 841031ffa6cSP Praneesh static u16 842031ffa6cSP Praneesh ath11k_hw_ipq8074_mpdu_info_get_peerid(struct hal_rx_mpdu_info *mpdu_info) 8438845fed1SBaochen Qiang { 8448845fed1SBaochen Qiang u16 peer_id = 0; 8458845fed1SBaochen Qiang 8468845fed1SBaochen Qiang peer_id = FIELD_GET(HAL_RX_MPDU_INFO_INFO0_PEERID, 847031ffa6cSP Praneesh __le32_to_cpu(mpdu_info->u.ipq8074.info0)); 8488845fed1SBaochen Qiang 8498845fed1SBaochen Qiang return peer_id; 8508845fed1SBaochen Qiang } 8518845fed1SBaochen Qiang 852031ffa6cSP Praneesh static u16 853031ffa6cSP Praneesh ath11k_hw_qcn9074_mpdu_info_get_peerid(struct hal_rx_mpdu_info *mpdu_info) 8548845fed1SBaochen Qiang { 8558845fed1SBaochen Qiang u16 peer_id = 0; 856031ffa6cSP Praneesh 857031ffa6cSP Praneesh peer_id = FIELD_GET(HAL_RX_MPDU_INFO_INFO0_PEERID, 858031ffa6cSP Praneesh __le32_to_cpu(mpdu_info->u.qcn9074.info0)); 859031ffa6cSP Praneesh 860031ffa6cSP Praneesh return peer_id; 861031ffa6cSP Praneesh } 862031ffa6cSP Praneesh 863031ffa6cSP Praneesh static u16 864031ffa6cSP Praneesh ath11k_hw_wcn6855_mpdu_info_get_peerid(struct hal_rx_mpdu_info *mpdu_info) 865031ffa6cSP Praneesh { 866031ffa6cSP Praneesh u16 peer_id = 0; 8678845fed1SBaochen Qiang 8688845fed1SBaochen Qiang peer_id = FIELD_GET(HAL_RX_MPDU_INFO_INFO0_PEERID_WCN6855, 869031ffa6cSP Praneesh __le32_to_cpu(mpdu_info->u.wcn6855.info0)); 8708845fed1SBaochen Qiang return peer_id; 8718845fed1SBaochen Qiang } 8728845fed1SBaochen Qiang 873648ab472SBaochen Qiang static bool ath11k_hw_wcn6855_rx_desc_get_ldpc_support(struct hal_rx_desc *desc) 874648ab472SBaochen Qiang { 875648ab472SBaochen Qiang return FIELD_GET(RX_MSDU_START_INFO2_LDPC, 876648ab472SBaochen Qiang __le32_to_cpu(desc->u.wcn6855.msdu_start.info2)); 877648ab472SBaochen Qiang } 878648ab472SBaochen Qiang 8797636c9a6SManikanta Pubbisetty static u32 ath11k_hw_ipq8074_get_tcl_ring_selector(struct sk_buff *skb) 8807636c9a6SManikanta Pubbisetty { 8817636c9a6SManikanta Pubbisetty /* Let the default ring selection be based on current processor 8827636c9a6SManikanta Pubbisetty * number, where one of the 3 tcl rings are selected based on 8837636c9a6SManikanta Pubbisetty * the smp_processor_id(). In case that ring 8847636c9a6SManikanta Pubbisetty * is full/busy, we resort to other available rings. 8857636c9a6SManikanta Pubbisetty * If all rings are full, we drop the packet. 8867636c9a6SManikanta Pubbisetty * 8877636c9a6SManikanta Pubbisetty * TODO: Add throttling logic when all rings are full 8887636c9a6SManikanta Pubbisetty */ 8897636c9a6SManikanta Pubbisetty return smp_processor_id(); 8907636c9a6SManikanta Pubbisetty } 8917636c9a6SManikanta Pubbisetty 8927636c9a6SManikanta Pubbisetty static u32 ath11k_hw_wcn6750_get_tcl_ring_selector(struct sk_buff *skb) 8937636c9a6SManikanta Pubbisetty { 8947636c9a6SManikanta Pubbisetty /* Select the TCL ring based on the flow hash of the SKB instead 8957636c9a6SManikanta Pubbisetty * of CPU ID. Since applications pumping the traffic can be scheduled 8967636c9a6SManikanta Pubbisetty * on multiple CPUs, there is a chance that packets of the same flow 8977636c9a6SManikanta Pubbisetty * could end on different TCL rings, this could sometimes results in 8987636c9a6SManikanta Pubbisetty * an out of order arrival of the packets at the receiver. 8997636c9a6SManikanta Pubbisetty */ 9007636c9a6SManikanta Pubbisetty return skb_get_hash(skb); 9017636c9a6SManikanta Pubbisetty } 9027636c9a6SManikanta Pubbisetty 903d547ca4cSAnilkumar Kolli const struct ath11k_hw_ops ipq8074_ops = { 904d547ca4cSAnilkumar Kolli .get_hw_mac_from_pdev_id = ath11k_hw_ipq8074_mac_from_pdev_id, 90536c7c640SKarthikeyan Periyasamy .wmi_init_config = ath11k_init_wmi_config_ipq8074, 9064152e420SCarl Huang .mac_id_to_pdev_id = ath11k_hw_mac_id_to_pdev_id_ipq8074, 9074152e420SCarl Huang .mac_id_to_srng_id = ath11k_hw_mac_id_to_srng_id_ipq8074, 9086fe6f68fSKarthikeyan Periyasamy .tx_mesh_enable = ath11k_hw_ipq8074_tx_mesh_enable, 909e678fbd4SKarthikeyan Periyasamy .rx_desc_get_first_msdu = ath11k_hw_ipq8074_rx_desc_get_first_msdu, 910e678fbd4SKarthikeyan Periyasamy .rx_desc_get_last_msdu = ath11k_hw_ipq8074_rx_desc_get_last_msdu, 911e678fbd4SKarthikeyan Periyasamy .rx_desc_get_l3_pad_bytes = ath11k_hw_ipq8074_rx_desc_get_l3_pad_bytes, 912e678fbd4SKarthikeyan Periyasamy .rx_desc_get_hdr_status = ath11k_hw_ipq8074_rx_desc_get_hdr_status, 913e678fbd4SKarthikeyan Periyasamy .rx_desc_encrypt_valid = ath11k_hw_ipq8074_rx_desc_encrypt_valid, 914e678fbd4SKarthikeyan Periyasamy .rx_desc_get_encrypt_type = ath11k_hw_ipq8074_rx_desc_get_encrypt_type, 915e678fbd4SKarthikeyan Periyasamy .rx_desc_get_decap_type = ath11k_hw_ipq8074_rx_desc_get_decap_type, 916e678fbd4SKarthikeyan Periyasamy .rx_desc_get_mesh_ctl = ath11k_hw_ipq8074_rx_desc_get_mesh_ctl, 917b3febdccSP Praneesh .rx_desc_get_ldpc_support = ath11k_hw_ipq8074_rx_desc_get_ldpc_support, 918e678fbd4SKarthikeyan Periyasamy .rx_desc_get_mpdu_seq_ctl_vld = ath11k_hw_ipq8074_rx_desc_get_mpdu_seq_ctl_vld, 919e678fbd4SKarthikeyan Periyasamy .rx_desc_get_mpdu_fc_valid = ath11k_hw_ipq8074_rx_desc_get_mpdu_fc_valid, 920e678fbd4SKarthikeyan Periyasamy .rx_desc_get_mpdu_start_seq_no = ath11k_hw_ipq8074_rx_desc_get_mpdu_start_seq_no, 921e678fbd4SKarthikeyan Periyasamy .rx_desc_get_msdu_len = ath11k_hw_ipq8074_rx_desc_get_msdu_len, 922e678fbd4SKarthikeyan Periyasamy .rx_desc_get_msdu_sgi = ath11k_hw_ipq8074_rx_desc_get_msdu_sgi, 923e678fbd4SKarthikeyan Periyasamy .rx_desc_get_msdu_rate_mcs = ath11k_hw_ipq8074_rx_desc_get_msdu_rate_mcs, 924e678fbd4SKarthikeyan Periyasamy .rx_desc_get_msdu_rx_bw = ath11k_hw_ipq8074_rx_desc_get_msdu_rx_bw, 925e678fbd4SKarthikeyan Periyasamy .rx_desc_get_msdu_freq = ath11k_hw_ipq8074_rx_desc_get_msdu_freq, 926e678fbd4SKarthikeyan Periyasamy .rx_desc_get_msdu_pkt_type = ath11k_hw_ipq8074_rx_desc_get_msdu_pkt_type, 927e678fbd4SKarthikeyan Periyasamy .rx_desc_get_msdu_nss = ath11k_hw_ipq8074_rx_desc_get_msdu_nss, 928e678fbd4SKarthikeyan Periyasamy .rx_desc_get_mpdu_tid = ath11k_hw_ipq8074_rx_desc_get_mpdu_tid, 929e678fbd4SKarthikeyan Periyasamy .rx_desc_get_mpdu_peer_id = ath11k_hw_ipq8074_rx_desc_get_mpdu_peer_id, 930e678fbd4SKarthikeyan Periyasamy .rx_desc_copy_attn_end_tlv = ath11k_hw_ipq8074_rx_desc_copy_attn_end, 931e678fbd4SKarthikeyan Periyasamy .rx_desc_get_mpdu_start_tag = ath11k_hw_ipq8074_rx_desc_get_mpdu_start_tag, 932e678fbd4SKarthikeyan Periyasamy .rx_desc_get_mpdu_ppdu_id = ath11k_hw_ipq8074_rx_desc_get_mpdu_ppdu_id, 933e678fbd4SKarthikeyan Periyasamy .rx_desc_set_msdu_len = ath11k_hw_ipq8074_rx_desc_set_msdu_len, 934e678fbd4SKarthikeyan Periyasamy .rx_desc_get_attention = ath11k_hw_ipq8074_rx_desc_get_attention, 935e678fbd4SKarthikeyan Periyasamy .rx_desc_get_msdu_payload = ath11k_hw_ipq8074_rx_desc_get_msdu_payload, 9360d55b76fSBaochen Qiang .reo_setup = ath11k_hw_ipq8074_reo_setup, 9378845fed1SBaochen Qiang .mpdu_info_get_peerid = ath11k_hw_ipq8074_mpdu_info_get_peerid, 9382167fa60SSriram R .rx_desc_mac_addr2_valid = ath11k_hw_ipq8074_rx_desc_mac_addr2_valid, 9392167fa60SSriram R .rx_desc_mpdu_start_addr2 = ath11k_hw_ipq8074_rx_desc_mpdu_start_addr2, 9407636c9a6SManikanta Pubbisetty .get_ring_selector = ath11k_hw_ipq8074_get_tcl_ring_selector, 941d547ca4cSAnilkumar Kolli }; 942d547ca4cSAnilkumar Kolli 943d547ca4cSAnilkumar Kolli const struct ath11k_hw_ops ipq6018_ops = { 944d547ca4cSAnilkumar Kolli .get_hw_mac_from_pdev_id = ath11k_hw_ipq6018_mac_from_pdev_id, 9452d4bcbedSCarl Huang .wmi_init_config = ath11k_init_wmi_config_ipq8074, 9464152e420SCarl Huang .mac_id_to_pdev_id = ath11k_hw_mac_id_to_pdev_id_ipq8074, 9474152e420SCarl Huang .mac_id_to_srng_id = ath11k_hw_mac_id_to_srng_id_ipq8074, 9486fe6f68fSKarthikeyan Periyasamy .tx_mesh_enable = ath11k_hw_ipq8074_tx_mesh_enable, 949e678fbd4SKarthikeyan Periyasamy .rx_desc_get_first_msdu = ath11k_hw_ipq8074_rx_desc_get_first_msdu, 950e678fbd4SKarthikeyan Periyasamy .rx_desc_get_last_msdu = ath11k_hw_ipq8074_rx_desc_get_last_msdu, 951e678fbd4SKarthikeyan Periyasamy .rx_desc_get_l3_pad_bytes = ath11k_hw_ipq8074_rx_desc_get_l3_pad_bytes, 952e678fbd4SKarthikeyan Periyasamy .rx_desc_get_hdr_status = ath11k_hw_ipq8074_rx_desc_get_hdr_status, 953e678fbd4SKarthikeyan Periyasamy .rx_desc_encrypt_valid = ath11k_hw_ipq8074_rx_desc_encrypt_valid, 954e678fbd4SKarthikeyan Periyasamy .rx_desc_get_encrypt_type = ath11k_hw_ipq8074_rx_desc_get_encrypt_type, 955e678fbd4SKarthikeyan Periyasamy .rx_desc_get_decap_type = ath11k_hw_ipq8074_rx_desc_get_decap_type, 956e678fbd4SKarthikeyan Periyasamy .rx_desc_get_mesh_ctl = ath11k_hw_ipq8074_rx_desc_get_mesh_ctl, 957b3febdccSP Praneesh .rx_desc_get_ldpc_support = ath11k_hw_ipq8074_rx_desc_get_ldpc_support, 958e678fbd4SKarthikeyan Periyasamy .rx_desc_get_mpdu_seq_ctl_vld = ath11k_hw_ipq8074_rx_desc_get_mpdu_seq_ctl_vld, 959e678fbd4SKarthikeyan Periyasamy .rx_desc_get_mpdu_fc_valid = ath11k_hw_ipq8074_rx_desc_get_mpdu_fc_valid, 960e678fbd4SKarthikeyan Periyasamy .rx_desc_get_mpdu_start_seq_no = ath11k_hw_ipq8074_rx_desc_get_mpdu_start_seq_no, 961e678fbd4SKarthikeyan Periyasamy .rx_desc_get_msdu_len = ath11k_hw_ipq8074_rx_desc_get_msdu_len, 962e678fbd4SKarthikeyan Periyasamy .rx_desc_get_msdu_sgi = ath11k_hw_ipq8074_rx_desc_get_msdu_sgi, 963e678fbd4SKarthikeyan Periyasamy .rx_desc_get_msdu_rate_mcs = ath11k_hw_ipq8074_rx_desc_get_msdu_rate_mcs, 964e678fbd4SKarthikeyan Periyasamy .rx_desc_get_msdu_rx_bw = ath11k_hw_ipq8074_rx_desc_get_msdu_rx_bw, 965e678fbd4SKarthikeyan Periyasamy .rx_desc_get_msdu_freq = ath11k_hw_ipq8074_rx_desc_get_msdu_freq, 966e678fbd4SKarthikeyan Periyasamy .rx_desc_get_msdu_pkt_type = ath11k_hw_ipq8074_rx_desc_get_msdu_pkt_type, 967e678fbd4SKarthikeyan Periyasamy .rx_desc_get_msdu_nss = ath11k_hw_ipq8074_rx_desc_get_msdu_nss, 968e678fbd4SKarthikeyan Periyasamy .rx_desc_get_mpdu_tid = ath11k_hw_ipq8074_rx_desc_get_mpdu_tid, 969e678fbd4SKarthikeyan Periyasamy .rx_desc_get_mpdu_peer_id = ath11k_hw_ipq8074_rx_desc_get_mpdu_peer_id, 970e678fbd4SKarthikeyan Periyasamy .rx_desc_copy_attn_end_tlv = ath11k_hw_ipq8074_rx_desc_copy_attn_end, 971e678fbd4SKarthikeyan Periyasamy .rx_desc_get_mpdu_start_tag = ath11k_hw_ipq8074_rx_desc_get_mpdu_start_tag, 972e678fbd4SKarthikeyan Periyasamy .rx_desc_get_mpdu_ppdu_id = ath11k_hw_ipq8074_rx_desc_get_mpdu_ppdu_id, 973e678fbd4SKarthikeyan Periyasamy .rx_desc_set_msdu_len = ath11k_hw_ipq8074_rx_desc_set_msdu_len, 974e678fbd4SKarthikeyan Periyasamy .rx_desc_get_attention = ath11k_hw_ipq8074_rx_desc_get_attention, 975e678fbd4SKarthikeyan Periyasamy .rx_desc_get_msdu_payload = ath11k_hw_ipq8074_rx_desc_get_msdu_payload, 9760d55b76fSBaochen Qiang .reo_setup = ath11k_hw_ipq8074_reo_setup, 9778845fed1SBaochen Qiang .mpdu_info_get_peerid = ath11k_hw_ipq8074_mpdu_info_get_peerid, 9782167fa60SSriram R .rx_desc_mac_addr2_valid = ath11k_hw_ipq8074_rx_desc_mac_addr2_valid, 9792167fa60SSriram R .rx_desc_mpdu_start_addr2 = ath11k_hw_ipq8074_rx_desc_mpdu_start_addr2, 9807636c9a6SManikanta Pubbisetty .get_ring_selector = ath11k_hw_ipq8074_get_tcl_ring_selector, 981d547ca4cSAnilkumar Kolli }; 9829de2ad43SCarl Huang 9839de2ad43SCarl Huang const struct ath11k_hw_ops qca6390_ops = { 9849de2ad43SCarl Huang .get_hw_mac_from_pdev_id = ath11k_hw_ipq8074_mac_from_pdev_id, 9854152e420SCarl Huang .wmi_init_config = ath11k_init_wmi_config_qca6390, 9864152e420SCarl Huang .mac_id_to_pdev_id = ath11k_hw_mac_id_to_pdev_id_qca6390, 9874152e420SCarl Huang .mac_id_to_srng_id = ath11k_hw_mac_id_to_srng_id_qca6390, 9886fe6f68fSKarthikeyan Periyasamy .tx_mesh_enable = ath11k_hw_ipq8074_tx_mesh_enable, 989e678fbd4SKarthikeyan Periyasamy .rx_desc_get_first_msdu = ath11k_hw_ipq8074_rx_desc_get_first_msdu, 990e678fbd4SKarthikeyan Periyasamy .rx_desc_get_last_msdu = ath11k_hw_ipq8074_rx_desc_get_last_msdu, 991e678fbd4SKarthikeyan Periyasamy .rx_desc_get_l3_pad_bytes = ath11k_hw_ipq8074_rx_desc_get_l3_pad_bytes, 992e678fbd4SKarthikeyan Periyasamy .rx_desc_get_hdr_status = ath11k_hw_ipq8074_rx_desc_get_hdr_status, 993e678fbd4SKarthikeyan Periyasamy .rx_desc_encrypt_valid = ath11k_hw_ipq8074_rx_desc_encrypt_valid, 994e678fbd4SKarthikeyan Periyasamy .rx_desc_get_encrypt_type = ath11k_hw_ipq8074_rx_desc_get_encrypt_type, 995e678fbd4SKarthikeyan Periyasamy .rx_desc_get_decap_type = ath11k_hw_ipq8074_rx_desc_get_decap_type, 996e678fbd4SKarthikeyan Periyasamy .rx_desc_get_mesh_ctl = ath11k_hw_ipq8074_rx_desc_get_mesh_ctl, 997b3febdccSP Praneesh .rx_desc_get_ldpc_support = ath11k_hw_ipq8074_rx_desc_get_ldpc_support, 998e678fbd4SKarthikeyan Periyasamy .rx_desc_get_mpdu_seq_ctl_vld = ath11k_hw_ipq8074_rx_desc_get_mpdu_seq_ctl_vld, 999e678fbd4SKarthikeyan Periyasamy .rx_desc_get_mpdu_fc_valid = ath11k_hw_ipq8074_rx_desc_get_mpdu_fc_valid, 1000e678fbd4SKarthikeyan Periyasamy .rx_desc_get_mpdu_start_seq_no = ath11k_hw_ipq8074_rx_desc_get_mpdu_start_seq_no, 1001e678fbd4SKarthikeyan Periyasamy .rx_desc_get_msdu_len = ath11k_hw_ipq8074_rx_desc_get_msdu_len, 1002e678fbd4SKarthikeyan Periyasamy .rx_desc_get_msdu_sgi = ath11k_hw_ipq8074_rx_desc_get_msdu_sgi, 1003e678fbd4SKarthikeyan Periyasamy .rx_desc_get_msdu_rate_mcs = ath11k_hw_ipq8074_rx_desc_get_msdu_rate_mcs, 1004e678fbd4SKarthikeyan Periyasamy .rx_desc_get_msdu_rx_bw = ath11k_hw_ipq8074_rx_desc_get_msdu_rx_bw, 1005e678fbd4SKarthikeyan Periyasamy .rx_desc_get_msdu_freq = ath11k_hw_ipq8074_rx_desc_get_msdu_freq, 1006e678fbd4SKarthikeyan Periyasamy .rx_desc_get_msdu_pkt_type = ath11k_hw_ipq8074_rx_desc_get_msdu_pkt_type, 1007e678fbd4SKarthikeyan Periyasamy .rx_desc_get_msdu_nss = ath11k_hw_ipq8074_rx_desc_get_msdu_nss, 1008e678fbd4SKarthikeyan Periyasamy .rx_desc_get_mpdu_tid = ath11k_hw_ipq8074_rx_desc_get_mpdu_tid, 1009e678fbd4SKarthikeyan Periyasamy .rx_desc_get_mpdu_peer_id = ath11k_hw_ipq8074_rx_desc_get_mpdu_peer_id, 1010e678fbd4SKarthikeyan Periyasamy .rx_desc_copy_attn_end_tlv = ath11k_hw_ipq8074_rx_desc_copy_attn_end, 1011e678fbd4SKarthikeyan Periyasamy .rx_desc_get_mpdu_start_tag = ath11k_hw_ipq8074_rx_desc_get_mpdu_start_tag, 1012e678fbd4SKarthikeyan Periyasamy .rx_desc_get_mpdu_ppdu_id = ath11k_hw_ipq8074_rx_desc_get_mpdu_ppdu_id, 1013e678fbd4SKarthikeyan Periyasamy .rx_desc_set_msdu_len = ath11k_hw_ipq8074_rx_desc_set_msdu_len, 1014e678fbd4SKarthikeyan Periyasamy .rx_desc_get_attention = ath11k_hw_ipq8074_rx_desc_get_attention, 1015e678fbd4SKarthikeyan Periyasamy .rx_desc_get_msdu_payload = ath11k_hw_ipq8074_rx_desc_get_msdu_payload, 10160d55b76fSBaochen Qiang .reo_setup = ath11k_hw_ipq8074_reo_setup, 10178845fed1SBaochen Qiang .mpdu_info_get_peerid = ath11k_hw_ipq8074_mpdu_info_get_peerid, 10182167fa60SSriram R .rx_desc_mac_addr2_valid = ath11k_hw_ipq8074_rx_desc_mac_addr2_valid, 10192167fa60SSriram R .rx_desc_mpdu_start_addr2 = ath11k_hw_ipq8074_rx_desc_mpdu_start_addr2, 10207636c9a6SManikanta Pubbisetty .get_ring_selector = ath11k_hw_ipq8074_get_tcl_ring_selector, 10216fe6f68fSKarthikeyan Periyasamy }; 10226fe6f68fSKarthikeyan Periyasamy 10236fe6f68fSKarthikeyan Periyasamy const struct ath11k_hw_ops qcn9074_ops = { 10246fe6f68fSKarthikeyan Periyasamy .get_hw_mac_from_pdev_id = ath11k_hw_ipq6018_mac_from_pdev_id, 10256fe6f68fSKarthikeyan Periyasamy .wmi_init_config = ath11k_init_wmi_config_ipq8074, 10266fe6f68fSKarthikeyan Periyasamy .mac_id_to_pdev_id = ath11k_hw_mac_id_to_pdev_id_ipq8074, 10276fe6f68fSKarthikeyan Periyasamy .mac_id_to_srng_id = ath11k_hw_mac_id_to_srng_id_ipq8074, 10286fe6f68fSKarthikeyan Periyasamy .tx_mesh_enable = ath11k_hw_qcn9074_tx_mesh_enable, 1029e678fbd4SKarthikeyan Periyasamy .rx_desc_get_first_msdu = ath11k_hw_qcn9074_rx_desc_get_first_msdu, 1030e678fbd4SKarthikeyan Periyasamy .rx_desc_get_last_msdu = ath11k_hw_qcn9074_rx_desc_get_last_msdu, 1031e678fbd4SKarthikeyan Periyasamy .rx_desc_get_l3_pad_bytes = ath11k_hw_qcn9074_rx_desc_get_l3_pad_bytes, 1032e678fbd4SKarthikeyan Periyasamy .rx_desc_get_hdr_status = ath11k_hw_qcn9074_rx_desc_get_hdr_status, 1033e678fbd4SKarthikeyan Periyasamy .rx_desc_encrypt_valid = ath11k_hw_qcn9074_rx_desc_encrypt_valid, 1034e678fbd4SKarthikeyan Periyasamy .rx_desc_get_encrypt_type = ath11k_hw_qcn9074_rx_desc_get_encrypt_type, 1035e678fbd4SKarthikeyan Periyasamy .rx_desc_get_decap_type = ath11k_hw_qcn9074_rx_desc_get_decap_type, 1036e678fbd4SKarthikeyan Periyasamy .rx_desc_get_mesh_ctl = ath11k_hw_qcn9074_rx_desc_get_mesh_ctl, 1037b3febdccSP Praneesh .rx_desc_get_ldpc_support = ath11k_hw_qcn9074_rx_desc_get_ldpc_support, 1038e678fbd4SKarthikeyan Periyasamy .rx_desc_get_mpdu_seq_ctl_vld = ath11k_hw_qcn9074_rx_desc_get_mpdu_seq_ctl_vld, 1039e678fbd4SKarthikeyan Periyasamy .rx_desc_get_mpdu_fc_valid = ath11k_hw_qcn9074_rx_desc_get_mpdu_fc_valid, 1040e678fbd4SKarthikeyan Periyasamy .rx_desc_get_mpdu_start_seq_no = ath11k_hw_qcn9074_rx_desc_get_mpdu_start_seq_no, 1041e678fbd4SKarthikeyan Periyasamy .rx_desc_get_msdu_len = ath11k_hw_qcn9074_rx_desc_get_msdu_len, 1042e678fbd4SKarthikeyan Periyasamy .rx_desc_get_msdu_sgi = ath11k_hw_qcn9074_rx_desc_get_msdu_sgi, 1043e678fbd4SKarthikeyan Periyasamy .rx_desc_get_msdu_rate_mcs = ath11k_hw_qcn9074_rx_desc_get_msdu_rate_mcs, 1044e678fbd4SKarthikeyan Periyasamy .rx_desc_get_msdu_rx_bw = ath11k_hw_qcn9074_rx_desc_get_msdu_rx_bw, 1045e678fbd4SKarthikeyan Periyasamy .rx_desc_get_msdu_freq = ath11k_hw_qcn9074_rx_desc_get_msdu_freq, 1046e678fbd4SKarthikeyan Periyasamy .rx_desc_get_msdu_pkt_type = ath11k_hw_qcn9074_rx_desc_get_msdu_pkt_type, 1047e678fbd4SKarthikeyan Periyasamy .rx_desc_get_msdu_nss = ath11k_hw_qcn9074_rx_desc_get_msdu_nss, 1048e678fbd4SKarthikeyan Periyasamy .rx_desc_get_mpdu_tid = ath11k_hw_qcn9074_rx_desc_get_mpdu_tid, 1049e678fbd4SKarthikeyan Periyasamy .rx_desc_get_mpdu_peer_id = ath11k_hw_qcn9074_rx_desc_get_mpdu_peer_id, 1050e678fbd4SKarthikeyan Periyasamy .rx_desc_copy_attn_end_tlv = ath11k_hw_qcn9074_rx_desc_copy_attn_end, 1051e678fbd4SKarthikeyan Periyasamy .rx_desc_get_mpdu_start_tag = ath11k_hw_qcn9074_rx_desc_get_mpdu_start_tag, 1052e678fbd4SKarthikeyan Periyasamy .rx_desc_get_mpdu_ppdu_id = ath11k_hw_qcn9074_rx_desc_get_mpdu_ppdu_id, 1053e678fbd4SKarthikeyan Periyasamy .rx_desc_set_msdu_len = ath11k_hw_qcn9074_rx_desc_set_msdu_len, 1054e678fbd4SKarthikeyan Periyasamy .rx_desc_get_attention = ath11k_hw_qcn9074_rx_desc_get_attention, 1055e678fbd4SKarthikeyan Periyasamy .rx_desc_get_msdu_payload = ath11k_hw_qcn9074_rx_desc_get_msdu_payload, 10560d55b76fSBaochen Qiang .reo_setup = ath11k_hw_ipq8074_reo_setup, 1057031ffa6cSP Praneesh .mpdu_info_get_peerid = ath11k_hw_qcn9074_mpdu_info_get_peerid, 10582167fa60SSriram R .rx_desc_mac_addr2_valid = ath11k_hw_ipq9074_rx_desc_mac_addr2_valid, 10592167fa60SSriram R .rx_desc_mpdu_start_addr2 = ath11k_hw_ipq9074_rx_desc_mpdu_start_addr2, 10607636c9a6SManikanta Pubbisetty .get_ring_selector = ath11k_hw_ipq8074_get_tcl_ring_selector, 10619de2ad43SCarl Huang }; 106234d5a3a8SKalle Valo 1063e4073430SBaochen Qiang const struct ath11k_hw_ops wcn6855_ops = { 1064e4073430SBaochen Qiang .get_hw_mac_from_pdev_id = ath11k_hw_ipq8074_mac_from_pdev_id, 1065e4073430SBaochen Qiang .wmi_init_config = ath11k_init_wmi_config_qca6390, 1066e4073430SBaochen Qiang .mac_id_to_pdev_id = ath11k_hw_mac_id_to_pdev_id_qca6390, 1067e4073430SBaochen Qiang .mac_id_to_srng_id = ath11k_hw_mac_id_to_srng_id_qca6390, 1068e4073430SBaochen Qiang .tx_mesh_enable = ath11k_hw_wcn6855_tx_mesh_enable, 1069e4073430SBaochen Qiang .rx_desc_get_first_msdu = ath11k_hw_wcn6855_rx_desc_get_first_msdu, 1070e4073430SBaochen Qiang .rx_desc_get_last_msdu = ath11k_hw_wcn6855_rx_desc_get_last_msdu, 1071e4073430SBaochen Qiang .rx_desc_get_l3_pad_bytes = ath11k_hw_wcn6855_rx_desc_get_l3_pad_bytes, 1072e4073430SBaochen Qiang .rx_desc_get_hdr_status = ath11k_hw_wcn6855_rx_desc_get_hdr_status, 1073e4073430SBaochen Qiang .rx_desc_encrypt_valid = ath11k_hw_wcn6855_rx_desc_encrypt_valid, 1074e4073430SBaochen Qiang .rx_desc_get_encrypt_type = ath11k_hw_wcn6855_rx_desc_get_encrypt_type, 1075e4073430SBaochen Qiang .rx_desc_get_decap_type = ath11k_hw_wcn6855_rx_desc_get_decap_type, 1076e4073430SBaochen Qiang .rx_desc_get_mesh_ctl = ath11k_hw_wcn6855_rx_desc_get_mesh_ctl, 1077648ab472SBaochen Qiang .rx_desc_get_ldpc_support = ath11k_hw_wcn6855_rx_desc_get_ldpc_support, 1078e4073430SBaochen Qiang .rx_desc_get_mpdu_seq_ctl_vld = ath11k_hw_wcn6855_rx_desc_get_mpdu_seq_ctl_vld, 1079e4073430SBaochen Qiang .rx_desc_get_mpdu_fc_valid = ath11k_hw_wcn6855_rx_desc_get_mpdu_fc_valid, 1080e4073430SBaochen Qiang .rx_desc_get_mpdu_start_seq_no = ath11k_hw_wcn6855_rx_desc_get_mpdu_start_seq_no, 1081e4073430SBaochen Qiang .rx_desc_get_msdu_len = ath11k_hw_wcn6855_rx_desc_get_msdu_len, 1082e4073430SBaochen Qiang .rx_desc_get_msdu_sgi = ath11k_hw_wcn6855_rx_desc_get_msdu_sgi, 1083e4073430SBaochen Qiang .rx_desc_get_msdu_rate_mcs = ath11k_hw_wcn6855_rx_desc_get_msdu_rate_mcs, 1084e4073430SBaochen Qiang .rx_desc_get_msdu_rx_bw = ath11k_hw_wcn6855_rx_desc_get_msdu_rx_bw, 1085e4073430SBaochen Qiang .rx_desc_get_msdu_freq = ath11k_hw_wcn6855_rx_desc_get_msdu_freq, 1086e4073430SBaochen Qiang .rx_desc_get_msdu_pkt_type = ath11k_hw_wcn6855_rx_desc_get_msdu_pkt_type, 1087e4073430SBaochen Qiang .rx_desc_get_msdu_nss = ath11k_hw_wcn6855_rx_desc_get_msdu_nss, 1088e4073430SBaochen Qiang .rx_desc_get_mpdu_tid = ath11k_hw_wcn6855_rx_desc_get_mpdu_tid, 1089e4073430SBaochen Qiang .rx_desc_get_mpdu_peer_id = ath11k_hw_wcn6855_rx_desc_get_mpdu_peer_id, 1090e4073430SBaochen Qiang .rx_desc_copy_attn_end_tlv = ath11k_hw_wcn6855_rx_desc_copy_attn_end, 1091e4073430SBaochen Qiang .rx_desc_get_mpdu_start_tag = ath11k_hw_wcn6855_rx_desc_get_mpdu_start_tag, 1092e4073430SBaochen Qiang .rx_desc_get_mpdu_ppdu_id = ath11k_hw_wcn6855_rx_desc_get_mpdu_ppdu_id, 1093e4073430SBaochen Qiang .rx_desc_set_msdu_len = ath11k_hw_wcn6855_rx_desc_set_msdu_len, 1094e4073430SBaochen Qiang .rx_desc_get_attention = ath11k_hw_wcn6855_rx_desc_get_attention, 1095e4073430SBaochen Qiang .rx_desc_get_msdu_payload = ath11k_hw_wcn6855_rx_desc_get_msdu_payload, 10960d55b76fSBaochen Qiang .reo_setup = ath11k_hw_wcn6855_reo_setup, 10978845fed1SBaochen Qiang .mpdu_info_get_peerid = ath11k_hw_wcn6855_mpdu_info_get_peerid, 10982167fa60SSriram R .rx_desc_mac_addr2_valid = ath11k_hw_wcn6855_rx_desc_mac_addr2_valid, 10992167fa60SSriram R .rx_desc_mpdu_start_addr2 = ath11k_hw_wcn6855_rx_desc_mpdu_start_addr2, 11007636c9a6SManikanta Pubbisetty .get_ring_selector = ath11k_hw_ipq8074_get_tcl_ring_selector, 1101e4073430SBaochen Qiang }; 1102e4073430SBaochen Qiang 110349890d9cSManikanta Pubbisetty const struct ath11k_hw_ops wcn6750_ops = { 110449890d9cSManikanta Pubbisetty .get_hw_mac_from_pdev_id = ath11k_hw_ipq8074_mac_from_pdev_id, 110549890d9cSManikanta Pubbisetty .wmi_init_config = ath11k_init_wmi_config_qca6390, 110649890d9cSManikanta Pubbisetty .mac_id_to_pdev_id = ath11k_hw_mac_id_to_pdev_id_qca6390, 110749890d9cSManikanta Pubbisetty .mac_id_to_srng_id = ath11k_hw_mac_id_to_srng_id_qca6390, 1108e67ba197SManikanta Pubbisetty .tx_mesh_enable = ath11k_hw_qcn9074_tx_mesh_enable, 1109e67ba197SManikanta Pubbisetty .rx_desc_get_first_msdu = ath11k_hw_qcn9074_rx_desc_get_first_msdu, 1110e67ba197SManikanta Pubbisetty .rx_desc_get_last_msdu = ath11k_hw_qcn9074_rx_desc_get_last_msdu, 1111e67ba197SManikanta Pubbisetty .rx_desc_get_l3_pad_bytes = ath11k_hw_qcn9074_rx_desc_get_l3_pad_bytes, 1112e67ba197SManikanta Pubbisetty .rx_desc_get_hdr_status = ath11k_hw_qcn9074_rx_desc_get_hdr_status, 1113e67ba197SManikanta Pubbisetty .rx_desc_encrypt_valid = ath11k_hw_qcn9074_rx_desc_encrypt_valid, 1114e67ba197SManikanta Pubbisetty .rx_desc_get_encrypt_type = ath11k_hw_qcn9074_rx_desc_get_encrypt_type, 1115e67ba197SManikanta Pubbisetty .rx_desc_get_decap_type = ath11k_hw_qcn9074_rx_desc_get_decap_type, 1116e67ba197SManikanta Pubbisetty .rx_desc_get_mesh_ctl = ath11k_hw_qcn9074_rx_desc_get_mesh_ctl, 1117e67ba197SManikanta Pubbisetty .rx_desc_get_ldpc_support = ath11k_hw_qcn9074_rx_desc_get_ldpc_support, 1118e67ba197SManikanta Pubbisetty .rx_desc_get_mpdu_seq_ctl_vld = ath11k_hw_qcn9074_rx_desc_get_mpdu_seq_ctl_vld, 1119e67ba197SManikanta Pubbisetty .rx_desc_get_mpdu_fc_valid = ath11k_hw_qcn9074_rx_desc_get_mpdu_fc_valid, 1120e67ba197SManikanta Pubbisetty .rx_desc_get_mpdu_start_seq_no = ath11k_hw_qcn9074_rx_desc_get_mpdu_start_seq_no, 1121e67ba197SManikanta Pubbisetty .rx_desc_get_msdu_len = ath11k_hw_qcn9074_rx_desc_get_msdu_len, 1122e67ba197SManikanta Pubbisetty .rx_desc_get_msdu_sgi = ath11k_hw_qcn9074_rx_desc_get_msdu_sgi, 1123e67ba197SManikanta Pubbisetty .rx_desc_get_msdu_rate_mcs = ath11k_hw_qcn9074_rx_desc_get_msdu_rate_mcs, 1124e67ba197SManikanta Pubbisetty .rx_desc_get_msdu_rx_bw = ath11k_hw_qcn9074_rx_desc_get_msdu_rx_bw, 1125e67ba197SManikanta Pubbisetty .rx_desc_get_msdu_freq = ath11k_hw_qcn9074_rx_desc_get_msdu_freq, 1126e67ba197SManikanta Pubbisetty .rx_desc_get_msdu_pkt_type = ath11k_hw_qcn9074_rx_desc_get_msdu_pkt_type, 1127e67ba197SManikanta Pubbisetty .rx_desc_get_msdu_nss = ath11k_hw_qcn9074_rx_desc_get_msdu_nss, 1128e67ba197SManikanta Pubbisetty .rx_desc_get_mpdu_tid = ath11k_hw_qcn9074_rx_desc_get_mpdu_tid, 1129e67ba197SManikanta Pubbisetty .rx_desc_get_mpdu_peer_id = ath11k_hw_qcn9074_rx_desc_get_mpdu_peer_id, 1130e67ba197SManikanta Pubbisetty .rx_desc_copy_attn_end_tlv = ath11k_hw_qcn9074_rx_desc_copy_attn_end, 1131e67ba197SManikanta Pubbisetty .rx_desc_get_mpdu_start_tag = ath11k_hw_qcn9074_rx_desc_get_mpdu_start_tag, 1132e67ba197SManikanta Pubbisetty .rx_desc_get_mpdu_ppdu_id = ath11k_hw_qcn9074_rx_desc_get_mpdu_ppdu_id, 1133e67ba197SManikanta Pubbisetty .rx_desc_set_msdu_len = ath11k_hw_qcn9074_rx_desc_set_msdu_len, 1134e67ba197SManikanta Pubbisetty .rx_desc_get_attention = ath11k_hw_qcn9074_rx_desc_get_attention, 1135e67ba197SManikanta Pubbisetty .rx_desc_get_msdu_payload = ath11k_hw_qcn9074_rx_desc_get_msdu_payload, 1136e67ba197SManikanta Pubbisetty .reo_setup = ath11k_hw_wcn6855_reo_setup, 1137e67ba197SManikanta Pubbisetty .mpdu_info_get_peerid = ath11k_hw_ipq8074_mpdu_info_get_peerid, 1138e67ba197SManikanta Pubbisetty .rx_desc_mac_addr2_valid = ath11k_hw_ipq9074_rx_desc_mac_addr2_valid, 1139e67ba197SManikanta Pubbisetty .rx_desc_mpdu_start_addr2 = ath11k_hw_ipq9074_rx_desc_mpdu_start_addr2, 11407636c9a6SManikanta Pubbisetty .get_ring_selector = ath11k_hw_wcn6750_get_tcl_ring_selector, 114149890d9cSManikanta Pubbisetty }; 114249890d9cSManikanta Pubbisetty 1143ba60f279SSriram R /* IPQ5018 hw ops is similar to QCN9074 except for the dest ring remap */ 1144ba60f279SSriram R const struct ath11k_hw_ops ipq5018_ops = { 1145ba60f279SSriram R .get_hw_mac_from_pdev_id = ath11k_hw_ipq6018_mac_from_pdev_id, 1146ba60f279SSriram R .wmi_init_config = ath11k_init_wmi_config_ipq8074, 1147ba60f279SSriram R .mac_id_to_pdev_id = ath11k_hw_mac_id_to_pdev_id_ipq8074, 1148ba60f279SSriram R .mac_id_to_srng_id = ath11k_hw_mac_id_to_srng_id_ipq8074, 1149ba60f279SSriram R .tx_mesh_enable = ath11k_hw_qcn9074_tx_mesh_enable, 1150ba60f279SSriram R .rx_desc_get_first_msdu = ath11k_hw_qcn9074_rx_desc_get_first_msdu, 1151ba60f279SSriram R .rx_desc_get_last_msdu = ath11k_hw_qcn9074_rx_desc_get_last_msdu, 1152ba60f279SSriram R .rx_desc_get_l3_pad_bytes = ath11k_hw_qcn9074_rx_desc_get_l3_pad_bytes, 1153ba60f279SSriram R .rx_desc_get_hdr_status = ath11k_hw_qcn9074_rx_desc_get_hdr_status, 1154ba60f279SSriram R .rx_desc_encrypt_valid = ath11k_hw_qcn9074_rx_desc_encrypt_valid, 1155ba60f279SSriram R .rx_desc_get_encrypt_type = ath11k_hw_qcn9074_rx_desc_get_encrypt_type, 1156ba60f279SSriram R .rx_desc_get_decap_type = ath11k_hw_qcn9074_rx_desc_get_decap_type, 1157ba60f279SSriram R .rx_desc_get_mesh_ctl = ath11k_hw_qcn9074_rx_desc_get_mesh_ctl, 1158ba60f279SSriram R .rx_desc_get_ldpc_support = ath11k_hw_qcn9074_rx_desc_get_ldpc_support, 1159ba60f279SSriram R .rx_desc_get_mpdu_seq_ctl_vld = ath11k_hw_qcn9074_rx_desc_get_mpdu_seq_ctl_vld, 1160ba60f279SSriram R .rx_desc_get_mpdu_fc_valid = ath11k_hw_qcn9074_rx_desc_get_mpdu_fc_valid, 1161ba60f279SSriram R .rx_desc_get_mpdu_start_seq_no = ath11k_hw_qcn9074_rx_desc_get_mpdu_start_seq_no, 1162ba60f279SSriram R .rx_desc_get_msdu_len = ath11k_hw_qcn9074_rx_desc_get_msdu_len, 1163ba60f279SSriram R .rx_desc_get_msdu_sgi = ath11k_hw_qcn9074_rx_desc_get_msdu_sgi, 1164ba60f279SSriram R .rx_desc_get_msdu_rate_mcs = ath11k_hw_qcn9074_rx_desc_get_msdu_rate_mcs, 1165ba60f279SSriram R .rx_desc_get_msdu_rx_bw = ath11k_hw_qcn9074_rx_desc_get_msdu_rx_bw, 1166ba60f279SSriram R .rx_desc_get_msdu_freq = ath11k_hw_qcn9074_rx_desc_get_msdu_freq, 1167ba60f279SSriram R .rx_desc_get_msdu_pkt_type = ath11k_hw_qcn9074_rx_desc_get_msdu_pkt_type, 1168ba60f279SSriram R .rx_desc_get_msdu_nss = ath11k_hw_qcn9074_rx_desc_get_msdu_nss, 1169ba60f279SSriram R .rx_desc_get_mpdu_tid = ath11k_hw_qcn9074_rx_desc_get_mpdu_tid, 1170ba60f279SSriram R .rx_desc_get_mpdu_peer_id = ath11k_hw_qcn9074_rx_desc_get_mpdu_peer_id, 1171ba60f279SSriram R .rx_desc_copy_attn_end_tlv = ath11k_hw_qcn9074_rx_desc_copy_attn_end, 1172ba60f279SSriram R .rx_desc_get_mpdu_start_tag = ath11k_hw_qcn9074_rx_desc_get_mpdu_start_tag, 1173ba60f279SSriram R .rx_desc_get_mpdu_ppdu_id = ath11k_hw_qcn9074_rx_desc_get_mpdu_ppdu_id, 1174ba60f279SSriram R .rx_desc_set_msdu_len = ath11k_hw_qcn9074_rx_desc_set_msdu_len, 1175ba60f279SSriram R .rx_desc_get_attention = ath11k_hw_qcn9074_rx_desc_get_attention, 117669968f88SSriram R .reo_setup = ath11k_hw_ipq5018_reo_setup, 1177ba60f279SSriram R .rx_desc_get_msdu_payload = ath11k_hw_qcn9074_rx_desc_get_msdu_payload, 1178ba60f279SSriram R .mpdu_info_get_peerid = ath11k_hw_ipq8074_mpdu_info_get_peerid, 1179ba60f279SSriram R .rx_desc_mac_addr2_valid = ath11k_hw_ipq9074_rx_desc_mac_addr2_valid, 1180ba60f279SSriram R .rx_desc_mpdu_start_addr2 = ath11k_hw_ipq9074_rx_desc_mpdu_start_addr2, 1181ce282d8dSZiyang Huang .get_ring_selector = ath11k_hw_ipq8074_get_tcl_ring_selector, 1182ba60f279SSriram R }; 1183ba60f279SSriram R 11847636c9a6SManikanta Pubbisetty #define ATH11K_TX_RING_MASK_0 BIT(0) 11857636c9a6SManikanta Pubbisetty #define ATH11K_TX_RING_MASK_1 BIT(1) 11867636c9a6SManikanta Pubbisetty #define ATH11K_TX_RING_MASK_2 BIT(2) 11877636c9a6SManikanta Pubbisetty #define ATH11K_TX_RING_MASK_3 BIT(3) 11887636c9a6SManikanta Pubbisetty #define ATH11K_TX_RING_MASK_4 BIT(4) 118934d5a3a8SKalle Valo 119034d5a3a8SKalle Valo #define ATH11K_RX_RING_MASK_0 0x1 119134d5a3a8SKalle Valo #define ATH11K_RX_RING_MASK_1 0x2 119234d5a3a8SKalle Valo #define ATH11K_RX_RING_MASK_2 0x4 119334d5a3a8SKalle Valo #define ATH11K_RX_RING_MASK_3 0x8 119434d5a3a8SKalle Valo 119534d5a3a8SKalle Valo #define ATH11K_RX_ERR_RING_MASK_0 0x1 119634d5a3a8SKalle Valo 119734d5a3a8SKalle Valo #define ATH11K_RX_WBM_REL_RING_MASK_0 0x1 119834d5a3a8SKalle Valo 119934d5a3a8SKalle Valo #define ATH11K_REO_STATUS_RING_MASK_0 0x1 120034d5a3a8SKalle Valo 120134d5a3a8SKalle Valo #define ATH11K_RXDMA2HOST_RING_MASK_0 0x1 120234d5a3a8SKalle Valo #define ATH11K_RXDMA2HOST_RING_MASK_1 0x2 120334d5a3a8SKalle Valo #define ATH11K_RXDMA2HOST_RING_MASK_2 0x4 120434d5a3a8SKalle Valo 120534d5a3a8SKalle Valo #define ATH11K_HOST2RXDMA_RING_MASK_0 0x1 120634d5a3a8SKalle Valo #define ATH11K_HOST2RXDMA_RING_MASK_1 0x2 120734d5a3a8SKalle Valo #define ATH11K_HOST2RXDMA_RING_MASK_2 0x4 120834d5a3a8SKalle Valo 120934d5a3a8SKalle Valo #define ATH11K_RX_MON_STATUS_RING_MASK_0 0x1 121034d5a3a8SKalle Valo #define ATH11K_RX_MON_STATUS_RING_MASK_1 0x2 121134d5a3a8SKalle Valo #define ATH11K_RX_MON_STATUS_RING_MASK_2 0x4 121234d5a3a8SKalle Valo 121334d5a3a8SKalle Valo const struct ath11k_hw_ring_mask ath11k_hw_ring_mask_ipq8074 = { 121434d5a3a8SKalle Valo .tx = { 121534d5a3a8SKalle Valo ATH11K_TX_RING_MASK_0, 121634d5a3a8SKalle Valo ATH11K_TX_RING_MASK_1, 121734d5a3a8SKalle Valo ATH11K_TX_RING_MASK_2, 121834d5a3a8SKalle Valo }, 121934d5a3a8SKalle Valo .rx_mon_status = { 122034d5a3a8SKalle Valo 0, 0, 0, 0, 122134d5a3a8SKalle Valo ATH11K_RX_MON_STATUS_RING_MASK_0, 122234d5a3a8SKalle Valo ATH11K_RX_MON_STATUS_RING_MASK_1, 122334d5a3a8SKalle Valo ATH11K_RX_MON_STATUS_RING_MASK_2, 122434d5a3a8SKalle Valo }, 122534d5a3a8SKalle Valo .rx = { 122634d5a3a8SKalle Valo 0, 0, 0, 0, 0, 0, 0, 122734d5a3a8SKalle Valo ATH11K_RX_RING_MASK_0, 122834d5a3a8SKalle Valo ATH11K_RX_RING_MASK_1, 122934d5a3a8SKalle Valo ATH11K_RX_RING_MASK_2, 123034d5a3a8SKalle Valo ATH11K_RX_RING_MASK_3, 123134d5a3a8SKalle Valo }, 123234d5a3a8SKalle Valo .rx_err = { 123334d5a3a8SKalle Valo ATH11K_RX_ERR_RING_MASK_0, 123434d5a3a8SKalle Valo }, 123534d5a3a8SKalle Valo .rx_wbm_rel = { 123634d5a3a8SKalle Valo ATH11K_RX_WBM_REL_RING_MASK_0, 123734d5a3a8SKalle Valo }, 123834d5a3a8SKalle Valo .reo_status = { 1239a8ae8336SHarshitha Prem 0, 0, 0, 124034d5a3a8SKalle Valo ATH11K_REO_STATUS_RING_MASK_0, 124134d5a3a8SKalle Valo }, 124234d5a3a8SKalle Valo .rxdma2host = { 124334d5a3a8SKalle Valo ATH11K_RXDMA2HOST_RING_MASK_0, 124434d5a3a8SKalle Valo ATH11K_RXDMA2HOST_RING_MASK_1, 124534d5a3a8SKalle Valo ATH11K_RXDMA2HOST_RING_MASK_2, 124634d5a3a8SKalle Valo }, 124734d5a3a8SKalle Valo .host2rxdma = { 124834d5a3a8SKalle Valo ATH11K_HOST2RXDMA_RING_MASK_0, 124934d5a3a8SKalle Valo ATH11K_HOST2RXDMA_RING_MASK_1, 125034d5a3a8SKalle Valo ATH11K_HOST2RXDMA_RING_MASK_2, 125134d5a3a8SKalle Valo }, 125234d5a3a8SKalle Valo }; 125334d5a3a8SKalle Valo 1254d4ecb90bSCarl Huang const struct ath11k_hw_ring_mask ath11k_hw_ring_mask_qca6390 = { 1255d4ecb90bSCarl Huang .tx = { 1256d4ecb90bSCarl Huang ATH11K_TX_RING_MASK_0, 1257d4ecb90bSCarl Huang }, 1258d4ecb90bSCarl Huang .rx_mon_status = { 1259d4ecb90bSCarl Huang 0, 0, 0, 0, 1260d4ecb90bSCarl Huang ATH11K_RX_MON_STATUS_RING_MASK_0, 1261d4ecb90bSCarl Huang ATH11K_RX_MON_STATUS_RING_MASK_1, 1262d4ecb90bSCarl Huang ATH11K_RX_MON_STATUS_RING_MASK_2, 1263d4ecb90bSCarl Huang }, 1264d4ecb90bSCarl Huang .rx = { 1265d4ecb90bSCarl Huang 0, 0, 0, 0, 0, 0, 0, 1266d4ecb90bSCarl Huang ATH11K_RX_RING_MASK_0, 1267d4ecb90bSCarl Huang ATH11K_RX_RING_MASK_1, 1268d4ecb90bSCarl Huang ATH11K_RX_RING_MASK_2, 1269d4ecb90bSCarl Huang ATH11K_RX_RING_MASK_3, 1270d4ecb90bSCarl Huang }, 1271d4ecb90bSCarl Huang .rx_err = { 1272d4ecb90bSCarl Huang ATH11K_RX_ERR_RING_MASK_0, 1273d4ecb90bSCarl Huang }, 1274d4ecb90bSCarl Huang .rx_wbm_rel = { 1275d4ecb90bSCarl Huang ATH11K_RX_WBM_REL_RING_MASK_0, 1276d4ecb90bSCarl Huang }, 1277d4ecb90bSCarl Huang .reo_status = { 1278d4ecb90bSCarl Huang ATH11K_REO_STATUS_RING_MASK_0, 1279d4ecb90bSCarl Huang }, 1280d4ecb90bSCarl Huang .rxdma2host = { 1281d4ecb90bSCarl Huang ATH11K_RXDMA2HOST_RING_MASK_0, 1282d4ecb90bSCarl Huang ATH11K_RXDMA2HOST_RING_MASK_1, 1283d4ecb90bSCarl Huang ATH11K_RXDMA2HOST_RING_MASK_2, 1284d4ecb90bSCarl Huang }, 1285d4ecb90bSCarl Huang .host2rxdma = { 1286d4ecb90bSCarl Huang }, 1287d4ecb90bSCarl Huang }; 1288d4ecb90bSCarl Huang 1289967c1d11SAnilkumar Kolli /* Target firmware's Copy Engine configuration. */ 1290967c1d11SAnilkumar Kolli const struct ce_pipe_config ath11k_target_ce_config_wlan_ipq8074[] = { 1291967c1d11SAnilkumar Kolli /* CE0: host->target HTC control and raw streams */ 1292967c1d11SAnilkumar Kolli { 1293967c1d11SAnilkumar Kolli .pipenum = __cpu_to_le32(0), 1294967c1d11SAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_OUT), 1295967c1d11SAnilkumar Kolli .nentries = __cpu_to_le32(32), 1296967c1d11SAnilkumar Kolli .nbytes_max = __cpu_to_le32(2048), 1297967c1d11SAnilkumar Kolli .flags = __cpu_to_le32(CE_ATTR_FLAGS), 1298967c1d11SAnilkumar Kolli .reserved = __cpu_to_le32(0), 1299967c1d11SAnilkumar Kolli }, 1300967c1d11SAnilkumar Kolli 1301967c1d11SAnilkumar Kolli /* CE1: target->host HTT + HTC control */ 1302967c1d11SAnilkumar Kolli { 1303967c1d11SAnilkumar Kolli .pipenum = __cpu_to_le32(1), 1304967c1d11SAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_IN), 1305967c1d11SAnilkumar Kolli .nentries = __cpu_to_le32(32), 1306967c1d11SAnilkumar Kolli .nbytes_max = __cpu_to_le32(2048), 1307967c1d11SAnilkumar Kolli .flags = __cpu_to_le32(CE_ATTR_FLAGS), 1308967c1d11SAnilkumar Kolli .reserved = __cpu_to_le32(0), 1309967c1d11SAnilkumar Kolli }, 1310967c1d11SAnilkumar Kolli 1311967c1d11SAnilkumar Kolli /* CE2: target->host WMI */ 1312967c1d11SAnilkumar Kolli { 1313967c1d11SAnilkumar Kolli .pipenum = __cpu_to_le32(2), 1314967c1d11SAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_IN), 1315967c1d11SAnilkumar Kolli .nentries = __cpu_to_le32(32), 1316967c1d11SAnilkumar Kolli .nbytes_max = __cpu_to_le32(2048), 1317967c1d11SAnilkumar Kolli .flags = __cpu_to_le32(CE_ATTR_FLAGS), 1318967c1d11SAnilkumar Kolli .reserved = __cpu_to_le32(0), 1319967c1d11SAnilkumar Kolli }, 1320967c1d11SAnilkumar Kolli 1321967c1d11SAnilkumar Kolli /* CE3: host->target WMI */ 1322967c1d11SAnilkumar Kolli { 1323967c1d11SAnilkumar Kolli .pipenum = __cpu_to_le32(3), 1324967c1d11SAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_OUT), 1325967c1d11SAnilkumar Kolli .nentries = __cpu_to_le32(32), 1326967c1d11SAnilkumar Kolli .nbytes_max = __cpu_to_le32(2048), 1327967c1d11SAnilkumar Kolli .flags = __cpu_to_le32(CE_ATTR_FLAGS), 1328967c1d11SAnilkumar Kolli .reserved = __cpu_to_le32(0), 1329967c1d11SAnilkumar Kolli }, 1330967c1d11SAnilkumar Kolli 1331967c1d11SAnilkumar Kolli /* CE4: host->target HTT */ 1332967c1d11SAnilkumar Kolli { 1333967c1d11SAnilkumar Kolli .pipenum = __cpu_to_le32(4), 1334967c1d11SAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_OUT), 1335967c1d11SAnilkumar Kolli .nentries = __cpu_to_le32(256), 1336967c1d11SAnilkumar Kolli .nbytes_max = __cpu_to_le32(256), 1337967c1d11SAnilkumar Kolli .flags = __cpu_to_le32(CE_ATTR_FLAGS | CE_ATTR_DIS_INTR), 1338967c1d11SAnilkumar Kolli .reserved = __cpu_to_le32(0), 1339967c1d11SAnilkumar Kolli }, 1340967c1d11SAnilkumar Kolli 1341967c1d11SAnilkumar Kolli /* CE5: target->host Pktlog */ 1342967c1d11SAnilkumar Kolli { 1343967c1d11SAnilkumar Kolli .pipenum = __cpu_to_le32(5), 1344967c1d11SAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_IN), 1345967c1d11SAnilkumar Kolli .nentries = __cpu_to_le32(32), 1346967c1d11SAnilkumar Kolli .nbytes_max = __cpu_to_le32(2048), 1347967c1d11SAnilkumar Kolli .flags = __cpu_to_le32(0), 1348967c1d11SAnilkumar Kolli .reserved = __cpu_to_le32(0), 1349967c1d11SAnilkumar Kolli }, 1350967c1d11SAnilkumar Kolli 1351967c1d11SAnilkumar Kolli /* CE6: Reserved for target autonomous hif_memcpy */ 1352967c1d11SAnilkumar Kolli { 1353967c1d11SAnilkumar Kolli .pipenum = __cpu_to_le32(6), 1354967c1d11SAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_INOUT), 1355967c1d11SAnilkumar Kolli .nentries = __cpu_to_le32(32), 1356967c1d11SAnilkumar Kolli .nbytes_max = __cpu_to_le32(65535), 1357967c1d11SAnilkumar Kolli .flags = __cpu_to_le32(CE_ATTR_FLAGS), 1358967c1d11SAnilkumar Kolli .reserved = __cpu_to_le32(0), 1359967c1d11SAnilkumar Kolli }, 1360967c1d11SAnilkumar Kolli 1361967c1d11SAnilkumar Kolli /* CE7 used only by Host */ 1362967c1d11SAnilkumar Kolli { 1363967c1d11SAnilkumar Kolli .pipenum = __cpu_to_le32(7), 1364967c1d11SAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_OUT), 1365967c1d11SAnilkumar Kolli .nentries = __cpu_to_le32(32), 1366967c1d11SAnilkumar Kolli .nbytes_max = __cpu_to_le32(2048), 1367967c1d11SAnilkumar Kolli .flags = __cpu_to_le32(CE_ATTR_FLAGS), 1368967c1d11SAnilkumar Kolli .reserved = __cpu_to_le32(0), 1369967c1d11SAnilkumar Kolli }, 1370967c1d11SAnilkumar Kolli 1371967c1d11SAnilkumar Kolli /* CE8 target->host used only by IPA */ 1372967c1d11SAnilkumar Kolli { 1373967c1d11SAnilkumar Kolli .pipenum = __cpu_to_le32(8), 1374967c1d11SAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_INOUT), 1375967c1d11SAnilkumar Kolli .nentries = __cpu_to_le32(32), 1376967c1d11SAnilkumar Kolli .nbytes_max = __cpu_to_le32(65535), 1377967c1d11SAnilkumar Kolli .flags = __cpu_to_le32(CE_ATTR_FLAGS), 1378967c1d11SAnilkumar Kolli .reserved = __cpu_to_le32(0), 1379967c1d11SAnilkumar Kolli }, 1380967c1d11SAnilkumar Kolli 1381967c1d11SAnilkumar Kolli /* CE9 host->target HTT */ 1382967c1d11SAnilkumar Kolli { 1383967c1d11SAnilkumar Kolli .pipenum = __cpu_to_le32(9), 1384967c1d11SAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_OUT), 1385967c1d11SAnilkumar Kolli .nentries = __cpu_to_le32(32), 1386967c1d11SAnilkumar Kolli .nbytes_max = __cpu_to_le32(2048), 1387967c1d11SAnilkumar Kolli .flags = __cpu_to_le32(CE_ATTR_FLAGS), 1388967c1d11SAnilkumar Kolli .reserved = __cpu_to_le32(0), 1389967c1d11SAnilkumar Kolli }, 1390967c1d11SAnilkumar Kolli 1391967c1d11SAnilkumar Kolli /* CE10 target->host HTT */ 1392967c1d11SAnilkumar Kolli { 1393967c1d11SAnilkumar Kolli .pipenum = __cpu_to_le32(10), 1394967c1d11SAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_INOUT_H2H), 1395967c1d11SAnilkumar Kolli .nentries = __cpu_to_le32(0), 1396967c1d11SAnilkumar Kolli .nbytes_max = __cpu_to_le32(0), 1397967c1d11SAnilkumar Kolli .flags = __cpu_to_le32(CE_ATTR_FLAGS), 1398967c1d11SAnilkumar Kolli .reserved = __cpu_to_le32(0), 1399967c1d11SAnilkumar Kolli }, 1400967c1d11SAnilkumar Kolli 1401967c1d11SAnilkumar Kolli /* CE11 Not used */ 1402967c1d11SAnilkumar Kolli }; 1403967c1d11SAnilkumar Kolli 1404967c1d11SAnilkumar Kolli /* Map from service/endpoint to Copy Engine. 1405967c1d11SAnilkumar Kolli * This table is derived from the CE_PCI TABLE, above. 1406967c1d11SAnilkumar Kolli * It is passed to the Target at startup for use by firmware. 1407967c1d11SAnilkumar Kolli */ 1408967c1d11SAnilkumar Kolli const struct service_to_pipe ath11k_target_service_to_ce_map_wlan_ipq8074[] = { 1409967c1d11SAnilkumar Kolli { 1410967c1d11SAnilkumar Kolli .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_VO), 1411967c1d11SAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ 1412967c1d11SAnilkumar Kolli .pipenum = __cpu_to_le32(3), 1413967c1d11SAnilkumar Kolli }, 1414967c1d11SAnilkumar Kolli { 1415967c1d11SAnilkumar Kolli .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_VO), 1416967c1d11SAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ 1417967c1d11SAnilkumar Kolli .pipenum = __cpu_to_le32(2), 1418967c1d11SAnilkumar Kolli }, 1419967c1d11SAnilkumar Kolli { 1420967c1d11SAnilkumar Kolli .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_BK), 1421967c1d11SAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ 1422967c1d11SAnilkumar Kolli .pipenum = __cpu_to_le32(3), 1423967c1d11SAnilkumar Kolli }, 1424967c1d11SAnilkumar Kolli { 1425967c1d11SAnilkumar Kolli .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_BK), 1426967c1d11SAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ 1427967c1d11SAnilkumar Kolli .pipenum = __cpu_to_le32(2), 1428967c1d11SAnilkumar Kolli }, 1429967c1d11SAnilkumar Kolli { 1430967c1d11SAnilkumar Kolli .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_BE), 1431967c1d11SAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ 1432967c1d11SAnilkumar Kolli .pipenum = __cpu_to_le32(3), 1433967c1d11SAnilkumar Kolli }, 1434967c1d11SAnilkumar Kolli { 1435967c1d11SAnilkumar Kolli .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_BE), 1436967c1d11SAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ 1437967c1d11SAnilkumar Kolli .pipenum = __cpu_to_le32(2), 1438967c1d11SAnilkumar Kolli }, 1439967c1d11SAnilkumar Kolli { 1440967c1d11SAnilkumar Kolli .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_VI), 1441967c1d11SAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ 1442967c1d11SAnilkumar Kolli .pipenum = __cpu_to_le32(3), 1443967c1d11SAnilkumar Kolli }, 1444967c1d11SAnilkumar Kolli { 1445967c1d11SAnilkumar Kolli .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_VI), 1446967c1d11SAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ 1447967c1d11SAnilkumar Kolli .pipenum = __cpu_to_le32(2), 1448967c1d11SAnilkumar Kolli }, 1449967c1d11SAnilkumar Kolli { 1450967c1d11SAnilkumar Kolli .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_CONTROL), 1451967c1d11SAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ 1452967c1d11SAnilkumar Kolli .pipenum = __cpu_to_le32(3), 1453967c1d11SAnilkumar Kolli }, 1454967c1d11SAnilkumar Kolli { 1455967c1d11SAnilkumar Kolli .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_CONTROL), 1456967c1d11SAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ 1457967c1d11SAnilkumar Kolli .pipenum = __cpu_to_le32(2), 1458967c1d11SAnilkumar Kolli }, 1459967c1d11SAnilkumar Kolli { 1460967c1d11SAnilkumar Kolli .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_CONTROL_MAC1), 1461967c1d11SAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ 1462967c1d11SAnilkumar Kolli .pipenum = __cpu_to_le32(7), 1463967c1d11SAnilkumar Kolli }, 1464967c1d11SAnilkumar Kolli { 1465967c1d11SAnilkumar Kolli .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_CONTROL_MAC1), 1466967c1d11SAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ 1467967c1d11SAnilkumar Kolli .pipenum = __cpu_to_le32(2), 1468967c1d11SAnilkumar Kolli }, 1469967c1d11SAnilkumar Kolli { 1470967c1d11SAnilkumar Kolli .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_CONTROL_MAC2), 1471967c1d11SAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ 1472967c1d11SAnilkumar Kolli .pipenum = __cpu_to_le32(9), 1473967c1d11SAnilkumar Kolli }, 1474967c1d11SAnilkumar Kolli { 1475967c1d11SAnilkumar Kolli .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_CONTROL_MAC2), 1476967c1d11SAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ 1477967c1d11SAnilkumar Kolli .pipenum = __cpu_to_le32(2), 1478967c1d11SAnilkumar Kolli }, 1479967c1d11SAnilkumar Kolli { 1480967c1d11SAnilkumar Kolli .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_RSVD_CTRL), 1481967c1d11SAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ 1482967c1d11SAnilkumar Kolli .pipenum = __cpu_to_le32(0), 1483967c1d11SAnilkumar Kolli }, 1484967c1d11SAnilkumar Kolli { 1485967c1d11SAnilkumar Kolli .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_RSVD_CTRL), 1486967c1d11SAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ 1487967c1d11SAnilkumar Kolli .pipenum = __cpu_to_le32(1), 1488967c1d11SAnilkumar Kolli }, 1489967c1d11SAnilkumar Kolli { /* not used */ 1490967c1d11SAnilkumar Kolli .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_TEST_RAW_STREAMS), 1491967c1d11SAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ 1492967c1d11SAnilkumar Kolli .pipenum = __cpu_to_le32(0), 1493967c1d11SAnilkumar Kolli }, 1494967c1d11SAnilkumar Kolli { /* not used */ 1495967c1d11SAnilkumar Kolli .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_TEST_RAW_STREAMS), 1496967c1d11SAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ 1497967c1d11SAnilkumar Kolli .pipenum = __cpu_to_le32(1), 1498967c1d11SAnilkumar Kolli }, 1499967c1d11SAnilkumar Kolli { 1500967c1d11SAnilkumar Kolli .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_HTT_DATA_MSG), 1501967c1d11SAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ 1502967c1d11SAnilkumar Kolli .pipenum = __cpu_to_le32(4), 1503967c1d11SAnilkumar Kolli }, 1504967c1d11SAnilkumar Kolli { 1505967c1d11SAnilkumar Kolli .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_HTT_DATA_MSG), 1506967c1d11SAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ 1507967c1d11SAnilkumar Kolli .pipenum = __cpu_to_le32(1), 1508967c1d11SAnilkumar Kolli }, 1509967c1d11SAnilkumar Kolli { 1510967c1d11SAnilkumar Kolli .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_PKT_LOG), 1511967c1d11SAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ 1512967c1d11SAnilkumar Kolli .pipenum = __cpu_to_le32(5), 1513967c1d11SAnilkumar Kolli }, 1514967c1d11SAnilkumar Kolli 1515967c1d11SAnilkumar Kolli /* (Additions here) */ 1516967c1d11SAnilkumar Kolli 1517967c1d11SAnilkumar Kolli { /* terminator entry */ } 1518967c1d11SAnilkumar Kolli }; 1519967c1d11SAnilkumar Kolli 1520b129699aSAnilkumar Kolli const struct service_to_pipe ath11k_target_service_to_ce_map_wlan_ipq6018[] = { 1521b129699aSAnilkumar Kolli { 1522b129699aSAnilkumar Kolli .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_VO), 1523b129699aSAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ 1524b129699aSAnilkumar Kolli .pipenum = __cpu_to_le32(3), 1525b129699aSAnilkumar Kolli }, 1526b129699aSAnilkumar Kolli { 1527b129699aSAnilkumar Kolli .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_VO), 1528b129699aSAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ 1529b129699aSAnilkumar Kolli .pipenum = __cpu_to_le32(2), 1530b129699aSAnilkumar Kolli }, 1531b129699aSAnilkumar Kolli { 1532b129699aSAnilkumar Kolli .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_BK), 1533b129699aSAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ 1534b129699aSAnilkumar Kolli .pipenum = __cpu_to_le32(3), 1535b129699aSAnilkumar Kolli }, 1536b129699aSAnilkumar Kolli { 1537b129699aSAnilkumar Kolli .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_BK), 1538b129699aSAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ 1539b129699aSAnilkumar Kolli .pipenum = __cpu_to_le32(2), 1540b129699aSAnilkumar Kolli }, 1541b129699aSAnilkumar Kolli { 1542b129699aSAnilkumar Kolli .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_BE), 1543b129699aSAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ 1544b129699aSAnilkumar Kolli .pipenum = __cpu_to_le32(3), 1545b129699aSAnilkumar Kolli }, 1546b129699aSAnilkumar Kolli { 1547b129699aSAnilkumar Kolli .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_BE), 1548b129699aSAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ 1549b129699aSAnilkumar Kolli .pipenum = __cpu_to_le32(2), 1550b129699aSAnilkumar Kolli }, 1551b129699aSAnilkumar Kolli { 1552b129699aSAnilkumar Kolli .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_VI), 1553b129699aSAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ 1554b129699aSAnilkumar Kolli .pipenum = __cpu_to_le32(3), 1555b129699aSAnilkumar Kolli }, 1556b129699aSAnilkumar Kolli { 1557b129699aSAnilkumar Kolli .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_VI), 1558b129699aSAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ 1559b129699aSAnilkumar Kolli .pipenum = __cpu_to_le32(2), 1560b129699aSAnilkumar Kolli }, 1561b129699aSAnilkumar Kolli { 1562b129699aSAnilkumar Kolli .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_CONTROL), 1563b129699aSAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ 1564b129699aSAnilkumar Kolli .pipenum = __cpu_to_le32(3), 1565b129699aSAnilkumar Kolli }, 1566b129699aSAnilkumar Kolli { 1567b129699aSAnilkumar Kolli .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_CONTROL), 1568b129699aSAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ 1569b129699aSAnilkumar Kolli .pipenum = __cpu_to_le32(2), 1570b129699aSAnilkumar Kolli }, 1571b129699aSAnilkumar Kolli { 1572b129699aSAnilkumar Kolli .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_CONTROL_MAC1), 1573b129699aSAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ 1574b129699aSAnilkumar Kolli .pipenum = __cpu_to_le32(7), 1575b129699aSAnilkumar Kolli }, 1576b129699aSAnilkumar Kolli { 1577b129699aSAnilkumar Kolli .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_CONTROL_MAC1), 1578b129699aSAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ 1579b129699aSAnilkumar Kolli .pipenum = __cpu_to_le32(2), 1580b129699aSAnilkumar Kolli }, 1581b129699aSAnilkumar Kolli { 1582b129699aSAnilkumar Kolli .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_RSVD_CTRL), 1583b129699aSAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ 1584b129699aSAnilkumar Kolli .pipenum = __cpu_to_le32(0), 1585b129699aSAnilkumar Kolli }, 1586b129699aSAnilkumar Kolli { 1587b129699aSAnilkumar Kolli .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_RSVD_CTRL), 1588b129699aSAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ 1589b129699aSAnilkumar Kolli .pipenum = __cpu_to_le32(1), 1590b129699aSAnilkumar Kolli }, 1591b129699aSAnilkumar Kolli { /* not used */ 1592b129699aSAnilkumar Kolli .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_TEST_RAW_STREAMS), 1593b129699aSAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ 1594b129699aSAnilkumar Kolli .pipenum = __cpu_to_le32(0), 1595b129699aSAnilkumar Kolli }, 1596b129699aSAnilkumar Kolli { /* not used */ 1597b129699aSAnilkumar Kolli .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_TEST_RAW_STREAMS), 1598b129699aSAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ 1599b129699aSAnilkumar Kolli .pipenum = __cpu_to_le32(1), 1600b129699aSAnilkumar Kolli }, 1601b129699aSAnilkumar Kolli { 1602b129699aSAnilkumar Kolli .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_HTT_DATA_MSG), 1603b129699aSAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ 1604b129699aSAnilkumar Kolli .pipenum = __cpu_to_le32(4), 1605b129699aSAnilkumar Kolli }, 1606b129699aSAnilkumar Kolli { 1607b129699aSAnilkumar Kolli .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_HTT_DATA_MSG), 1608b129699aSAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ 1609b129699aSAnilkumar Kolli .pipenum = __cpu_to_le32(1), 1610b129699aSAnilkumar Kolli }, 1611b129699aSAnilkumar Kolli { 1612b129699aSAnilkumar Kolli .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_PKT_LOG), 1613b129699aSAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ 1614b129699aSAnilkumar Kolli .pipenum = __cpu_to_le32(5), 1615b129699aSAnilkumar Kolli }, 1616b129699aSAnilkumar Kolli 1617b129699aSAnilkumar Kolli /* (Additions here) */ 1618b129699aSAnilkumar Kolli 1619b129699aSAnilkumar Kolli { /* terminator entry */ } 1620b129699aSAnilkumar Kolli }; 1621b129699aSAnilkumar Kolli 1622967c1d11SAnilkumar Kolli /* Target firmware's Copy Engine configuration. */ 1623967c1d11SAnilkumar Kolli const struct ce_pipe_config ath11k_target_ce_config_wlan_qca6390[] = { 1624967c1d11SAnilkumar Kolli /* CE0: host->target HTC control and raw streams */ 1625967c1d11SAnilkumar Kolli { 1626967c1d11SAnilkumar Kolli .pipenum = __cpu_to_le32(0), 1627967c1d11SAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_OUT), 1628967c1d11SAnilkumar Kolli .nentries = __cpu_to_le32(32), 1629967c1d11SAnilkumar Kolli .nbytes_max = __cpu_to_le32(2048), 1630967c1d11SAnilkumar Kolli .flags = __cpu_to_le32(CE_ATTR_FLAGS), 1631967c1d11SAnilkumar Kolli .reserved = __cpu_to_le32(0), 1632967c1d11SAnilkumar Kolli }, 1633967c1d11SAnilkumar Kolli 1634967c1d11SAnilkumar Kolli /* CE1: target->host HTT + HTC control */ 1635967c1d11SAnilkumar Kolli { 1636967c1d11SAnilkumar Kolli .pipenum = __cpu_to_le32(1), 1637967c1d11SAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_IN), 1638967c1d11SAnilkumar Kolli .nentries = __cpu_to_le32(32), 1639967c1d11SAnilkumar Kolli .nbytes_max = __cpu_to_le32(2048), 1640967c1d11SAnilkumar Kolli .flags = __cpu_to_le32(CE_ATTR_FLAGS), 1641967c1d11SAnilkumar Kolli .reserved = __cpu_to_le32(0), 1642967c1d11SAnilkumar Kolli }, 1643967c1d11SAnilkumar Kolli 1644967c1d11SAnilkumar Kolli /* CE2: target->host WMI */ 1645967c1d11SAnilkumar Kolli { 1646967c1d11SAnilkumar Kolli .pipenum = __cpu_to_le32(2), 1647967c1d11SAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_IN), 1648967c1d11SAnilkumar Kolli .nentries = __cpu_to_le32(32), 1649967c1d11SAnilkumar Kolli .nbytes_max = __cpu_to_le32(2048), 1650967c1d11SAnilkumar Kolli .flags = __cpu_to_le32(CE_ATTR_FLAGS), 1651967c1d11SAnilkumar Kolli .reserved = __cpu_to_le32(0), 1652967c1d11SAnilkumar Kolli }, 1653967c1d11SAnilkumar Kolli 1654967c1d11SAnilkumar Kolli /* CE3: host->target WMI */ 1655967c1d11SAnilkumar Kolli { 1656967c1d11SAnilkumar Kolli .pipenum = __cpu_to_le32(3), 1657967c1d11SAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_OUT), 1658967c1d11SAnilkumar Kolli .nentries = __cpu_to_le32(32), 1659967c1d11SAnilkumar Kolli .nbytes_max = __cpu_to_le32(2048), 1660967c1d11SAnilkumar Kolli .flags = __cpu_to_le32(CE_ATTR_FLAGS), 1661967c1d11SAnilkumar Kolli .reserved = __cpu_to_le32(0), 1662967c1d11SAnilkumar Kolli }, 1663967c1d11SAnilkumar Kolli 1664967c1d11SAnilkumar Kolli /* CE4: host->target HTT */ 1665967c1d11SAnilkumar Kolli { 1666967c1d11SAnilkumar Kolli .pipenum = __cpu_to_le32(4), 1667967c1d11SAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_OUT), 1668967c1d11SAnilkumar Kolli .nentries = __cpu_to_le32(256), 1669967c1d11SAnilkumar Kolli .nbytes_max = __cpu_to_le32(256), 1670967c1d11SAnilkumar Kolli .flags = __cpu_to_le32(CE_ATTR_FLAGS | CE_ATTR_DIS_INTR), 1671967c1d11SAnilkumar Kolli .reserved = __cpu_to_le32(0), 1672967c1d11SAnilkumar Kolli }, 1673967c1d11SAnilkumar Kolli 1674967c1d11SAnilkumar Kolli /* CE5: target->host Pktlog */ 1675967c1d11SAnilkumar Kolli { 1676967c1d11SAnilkumar Kolli .pipenum = __cpu_to_le32(5), 1677967c1d11SAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_IN), 1678967c1d11SAnilkumar Kolli .nentries = __cpu_to_le32(32), 1679967c1d11SAnilkumar Kolli .nbytes_max = __cpu_to_le32(2048), 1680967c1d11SAnilkumar Kolli .flags = __cpu_to_le32(CE_ATTR_FLAGS), 1681967c1d11SAnilkumar Kolli .reserved = __cpu_to_le32(0), 1682967c1d11SAnilkumar Kolli }, 1683967c1d11SAnilkumar Kolli 1684967c1d11SAnilkumar Kolli /* CE6: Reserved for target autonomous hif_memcpy */ 1685967c1d11SAnilkumar Kolli { 1686967c1d11SAnilkumar Kolli .pipenum = __cpu_to_le32(6), 1687967c1d11SAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_INOUT), 1688967c1d11SAnilkumar Kolli .nentries = __cpu_to_le32(32), 1689967c1d11SAnilkumar Kolli .nbytes_max = __cpu_to_le32(16384), 1690967c1d11SAnilkumar Kolli .flags = __cpu_to_le32(CE_ATTR_FLAGS), 1691967c1d11SAnilkumar Kolli .reserved = __cpu_to_le32(0), 1692967c1d11SAnilkumar Kolli }, 1693967c1d11SAnilkumar Kolli 1694967c1d11SAnilkumar Kolli /* CE7 used only by Host */ 1695967c1d11SAnilkumar Kolli { 1696967c1d11SAnilkumar Kolli .pipenum = __cpu_to_le32(7), 1697967c1d11SAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_INOUT_H2H), 1698967c1d11SAnilkumar Kolli .nentries = __cpu_to_le32(0), 1699967c1d11SAnilkumar Kolli .nbytes_max = __cpu_to_le32(0), 1700967c1d11SAnilkumar Kolli .flags = __cpu_to_le32(CE_ATTR_FLAGS | CE_ATTR_DIS_INTR), 1701967c1d11SAnilkumar Kolli .reserved = __cpu_to_le32(0), 1702967c1d11SAnilkumar Kolli }, 1703967c1d11SAnilkumar Kolli 1704967c1d11SAnilkumar Kolli /* CE8 target->host used only by IPA */ 1705967c1d11SAnilkumar Kolli { 1706967c1d11SAnilkumar Kolli .pipenum = __cpu_to_le32(8), 1707967c1d11SAnilkumar Kolli .pipedir = __cpu_to_le32(PIPEDIR_INOUT), 1708967c1d11SAnilkumar Kolli .nentries = __cpu_to_le32(32), 1709967c1d11SAnilkumar Kolli .nbytes_max = __cpu_to_le32(16384), 1710967c1d11SAnilkumar Kolli .flags = __cpu_to_le32(CE_ATTR_FLAGS), 1711967c1d11SAnilkumar Kolli .reserved = __cpu_to_le32(0), 1712967c1d11SAnilkumar Kolli }, 1713967c1d11SAnilkumar Kolli /* CE 9, 10, 11 are used by MHI driver */ 1714967c1d11SAnilkumar Kolli }; 1715967c1d11SAnilkumar Kolli 1716967c1d11SAnilkumar Kolli /* Map from service/endpoint to Copy Engine. 1717967c1d11SAnilkumar Kolli * This table is derived from the CE_PCI TABLE, above. 1718967c1d11SAnilkumar Kolli * It is passed to the Target at startup for use by firmware. 1719967c1d11SAnilkumar Kolli */ 1720967c1d11SAnilkumar Kolli const struct service_to_pipe ath11k_target_service_to_ce_map_wlan_qca6390[] = { 1721967c1d11SAnilkumar Kolli { 1722967c1d11SAnilkumar Kolli __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_VO), 1723967c1d11SAnilkumar Kolli __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ 1724967c1d11SAnilkumar Kolli __cpu_to_le32(3), 1725967c1d11SAnilkumar Kolli }, 1726967c1d11SAnilkumar Kolli { 1727967c1d11SAnilkumar Kolli __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_VO), 1728967c1d11SAnilkumar Kolli __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ 1729967c1d11SAnilkumar Kolli __cpu_to_le32(2), 1730967c1d11SAnilkumar Kolli }, 1731967c1d11SAnilkumar Kolli { 1732967c1d11SAnilkumar Kolli __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_BK), 1733967c1d11SAnilkumar Kolli __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ 1734967c1d11SAnilkumar Kolli __cpu_to_le32(3), 1735967c1d11SAnilkumar Kolli }, 1736967c1d11SAnilkumar Kolli { 1737967c1d11SAnilkumar Kolli __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_BK), 1738967c1d11SAnilkumar Kolli __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ 1739967c1d11SAnilkumar Kolli __cpu_to_le32(2), 1740967c1d11SAnilkumar Kolli }, 1741967c1d11SAnilkumar Kolli { 1742967c1d11SAnilkumar Kolli __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_BE), 1743967c1d11SAnilkumar Kolli __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ 1744967c1d11SAnilkumar Kolli __cpu_to_le32(3), 1745967c1d11SAnilkumar Kolli }, 1746967c1d11SAnilkumar Kolli { 1747967c1d11SAnilkumar Kolli __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_BE), 1748967c1d11SAnilkumar Kolli __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ 1749967c1d11SAnilkumar Kolli __cpu_to_le32(2), 1750967c1d11SAnilkumar Kolli }, 1751967c1d11SAnilkumar Kolli { 1752967c1d11SAnilkumar Kolli __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_VI), 1753967c1d11SAnilkumar Kolli __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ 1754967c1d11SAnilkumar Kolli __cpu_to_le32(3), 1755967c1d11SAnilkumar Kolli }, 1756967c1d11SAnilkumar Kolli { 1757967c1d11SAnilkumar Kolli __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_VI), 1758967c1d11SAnilkumar Kolli __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ 1759967c1d11SAnilkumar Kolli __cpu_to_le32(2), 1760967c1d11SAnilkumar Kolli }, 1761967c1d11SAnilkumar Kolli { 1762967c1d11SAnilkumar Kolli __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_CONTROL), 1763967c1d11SAnilkumar Kolli __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ 1764967c1d11SAnilkumar Kolli __cpu_to_le32(3), 1765967c1d11SAnilkumar Kolli }, 1766967c1d11SAnilkumar Kolli { 1767967c1d11SAnilkumar Kolli __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_CONTROL), 1768967c1d11SAnilkumar Kolli __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ 1769967c1d11SAnilkumar Kolli __cpu_to_le32(2), 1770967c1d11SAnilkumar Kolli }, 1771967c1d11SAnilkumar Kolli { 1772967c1d11SAnilkumar Kolli __cpu_to_le32(ATH11K_HTC_SVC_ID_RSVD_CTRL), 1773967c1d11SAnilkumar Kolli __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ 1774967c1d11SAnilkumar Kolli __cpu_to_le32(0), 1775967c1d11SAnilkumar Kolli }, 1776967c1d11SAnilkumar Kolli { 1777967c1d11SAnilkumar Kolli __cpu_to_le32(ATH11K_HTC_SVC_ID_RSVD_CTRL), 1778967c1d11SAnilkumar Kolli __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ 1779967c1d11SAnilkumar Kolli __cpu_to_le32(2), 1780967c1d11SAnilkumar Kolli }, 1781967c1d11SAnilkumar Kolli { 1782967c1d11SAnilkumar Kolli __cpu_to_le32(ATH11K_HTC_SVC_ID_HTT_DATA_MSG), 1783967c1d11SAnilkumar Kolli __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ 1784967c1d11SAnilkumar Kolli __cpu_to_le32(4), 1785967c1d11SAnilkumar Kolli }, 1786967c1d11SAnilkumar Kolli { 1787967c1d11SAnilkumar Kolli __cpu_to_le32(ATH11K_HTC_SVC_ID_HTT_DATA_MSG), 1788967c1d11SAnilkumar Kolli __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ 1789967c1d11SAnilkumar Kolli __cpu_to_le32(1), 1790967c1d11SAnilkumar Kolli }, 1791967c1d11SAnilkumar Kolli 1792967c1d11SAnilkumar Kolli /* (Additions here) */ 1793967c1d11SAnilkumar Kolli 1794967c1d11SAnilkumar Kolli { /* must be last */ 1795967c1d11SAnilkumar Kolli __cpu_to_le32(0), 1796967c1d11SAnilkumar Kolli __cpu_to_le32(0), 1797967c1d11SAnilkumar Kolli __cpu_to_le32(0), 1798967c1d11SAnilkumar Kolli }, 1799967c1d11SAnilkumar Kolli }; 1800967c1d11SAnilkumar Kolli 18016289ac2bSKarthikeyan Periyasamy /* Target firmware's Copy Engine configuration. */ 18026289ac2bSKarthikeyan Periyasamy const struct ce_pipe_config ath11k_target_ce_config_wlan_qcn9074[] = { 18036289ac2bSKarthikeyan Periyasamy /* CE0: host->target HTC control and raw streams */ 18046289ac2bSKarthikeyan Periyasamy { 18056289ac2bSKarthikeyan Periyasamy .pipenum = __cpu_to_le32(0), 18066289ac2bSKarthikeyan Periyasamy .pipedir = __cpu_to_le32(PIPEDIR_OUT), 18076289ac2bSKarthikeyan Periyasamy .nentries = __cpu_to_le32(32), 18086289ac2bSKarthikeyan Periyasamy .nbytes_max = __cpu_to_le32(2048), 18096289ac2bSKarthikeyan Periyasamy .flags = __cpu_to_le32(CE_ATTR_FLAGS), 18106289ac2bSKarthikeyan Periyasamy .reserved = __cpu_to_le32(0), 18116289ac2bSKarthikeyan Periyasamy }, 18126289ac2bSKarthikeyan Periyasamy 18136289ac2bSKarthikeyan Periyasamy /* CE1: target->host HTT + HTC control */ 18146289ac2bSKarthikeyan Periyasamy { 18156289ac2bSKarthikeyan Periyasamy .pipenum = __cpu_to_le32(1), 18166289ac2bSKarthikeyan Periyasamy .pipedir = __cpu_to_le32(PIPEDIR_IN), 18176289ac2bSKarthikeyan Periyasamy .nentries = __cpu_to_le32(32), 18186289ac2bSKarthikeyan Periyasamy .nbytes_max = __cpu_to_le32(2048), 18196289ac2bSKarthikeyan Periyasamy .flags = __cpu_to_le32(CE_ATTR_FLAGS), 18206289ac2bSKarthikeyan Periyasamy .reserved = __cpu_to_le32(0), 18216289ac2bSKarthikeyan Periyasamy }, 18226289ac2bSKarthikeyan Periyasamy 18236289ac2bSKarthikeyan Periyasamy /* CE2: target->host WMI */ 18246289ac2bSKarthikeyan Periyasamy { 18256289ac2bSKarthikeyan Periyasamy .pipenum = __cpu_to_le32(2), 18266289ac2bSKarthikeyan Periyasamy .pipedir = __cpu_to_le32(PIPEDIR_IN), 18276289ac2bSKarthikeyan Periyasamy .nentries = __cpu_to_le32(32), 18286289ac2bSKarthikeyan Periyasamy .nbytes_max = __cpu_to_le32(2048), 18296289ac2bSKarthikeyan Periyasamy .flags = __cpu_to_le32(CE_ATTR_FLAGS), 18306289ac2bSKarthikeyan Periyasamy .reserved = __cpu_to_le32(0), 18316289ac2bSKarthikeyan Periyasamy }, 18326289ac2bSKarthikeyan Periyasamy 18336289ac2bSKarthikeyan Periyasamy /* CE3: host->target WMI */ 18346289ac2bSKarthikeyan Periyasamy { 18356289ac2bSKarthikeyan Periyasamy .pipenum = __cpu_to_le32(3), 18366289ac2bSKarthikeyan Periyasamy .pipedir = __cpu_to_le32(PIPEDIR_OUT), 18376289ac2bSKarthikeyan Periyasamy .nentries = __cpu_to_le32(32), 18386289ac2bSKarthikeyan Periyasamy .nbytes_max = __cpu_to_le32(2048), 18396289ac2bSKarthikeyan Periyasamy .flags = __cpu_to_le32(CE_ATTR_FLAGS), 18406289ac2bSKarthikeyan Periyasamy .reserved = __cpu_to_le32(0), 18416289ac2bSKarthikeyan Periyasamy }, 18426289ac2bSKarthikeyan Periyasamy 18436289ac2bSKarthikeyan Periyasamy /* CE4: host->target HTT */ 18446289ac2bSKarthikeyan Periyasamy { 18456289ac2bSKarthikeyan Periyasamy .pipenum = __cpu_to_le32(4), 18466289ac2bSKarthikeyan Periyasamy .pipedir = __cpu_to_le32(PIPEDIR_OUT), 18476289ac2bSKarthikeyan Periyasamy .nentries = __cpu_to_le32(256), 18486289ac2bSKarthikeyan Periyasamy .nbytes_max = __cpu_to_le32(256), 18496289ac2bSKarthikeyan Periyasamy .flags = __cpu_to_le32(CE_ATTR_FLAGS | CE_ATTR_DIS_INTR), 18506289ac2bSKarthikeyan Periyasamy .reserved = __cpu_to_le32(0), 18516289ac2bSKarthikeyan Periyasamy }, 18526289ac2bSKarthikeyan Periyasamy 18536289ac2bSKarthikeyan Periyasamy /* CE5: target->host Pktlog */ 18546289ac2bSKarthikeyan Periyasamy { 18556289ac2bSKarthikeyan Periyasamy .pipenum = __cpu_to_le32(5), 18566289ac2bSKarthikeyan Periyasamy .pipedir = __cpu_to_le32(PIPEDIR_IN), 18576289ac2bSKarthikeyan Periyasamy .nentries = __cpu_to_le32(32), 18586289ac2bSKarthikeyan Periyasamy .nbytes_max = __cpu_to_le32(2048), 18596289ac2bSKarthikeyan Periyasamy .flags = __cpu_to_le32(CE_ATTR_FLAGS), 18606289ac2bSKarthikeyan Periyasamy .reserved = __cpu_to_le32(0), 18616289ac2bSKarthikeyan Periyasamy }, 18626289ac2bSKarthikeyan Periyasamy 18636289ac2bSKarthikeyan Periyasamy /* CE6: Reserved for target autonomous hif_memcpy */ 18646289ac2bSKarthikeyan Periyasamy { 18656289ac2bSKarthikeyan Periyasamy .pipenum = __cpu_to_le32(6), 18666289ac2bSKarthikeyan Periyasamy .pipedir = __cpu_to_le32(PIPEDIR_INOUT), 18676289ac2bSKarthikeyan Periyasamy .nentries = __cpu_to_le32(32), 18686289ac2bSKarthikeyan Periyasamy .nbytes_max = __cpu_to_le32(16384), 18696289ac2bSKarthikeyan Periyasamy .flags = __cpu_to_le32(CE_ATTR_FLAGS), 18706289ac2bSKarthikeyan Periyasamy .reserved = __cpu_to_le32(0), 18716289ac2bSKarthikeyan Periyasamy }, 18726289ac2bSKarthikeyan Periyasamy 18736289ac2bSKarthikeyan Periyasamy /* CE7 used only by Host */ 18746289ac2bSKarthikeyan Periyasamy { 18756289ac2bSKarthikeyan Periyasamy .pipenum = __cpu_to_le32(7), 18766289ac2bSKarthikeyan Periyasamy .pipedir = __cpu_to_le32(PIPEDIR_INOUT_H2H), 18776289ac2bSKarthikeyan Periyasamy .nentries = __cpu_to_le32(0), 18786289ac2bSKarthikeyan Periyasamy .nbytes_max = __cpu_to_le32(0), 18796289ac2bSKarthikeyan Periyasamy .flags = __cpu_to_le32(CE_ATTR_FLAGS | CE_ATTR_DIS_INTR), 18806289ac2bSKarthikeyan Periyasamy .reserved = __cpu_to_le32(0), 18816289ac2bSKarthikeyan Periyasamy }, 18826289ac2bSKarthikeyan Periyasamy 18836289ac2bSKarthikeyan Periyasamy /* CE8 target->host used only by IPA */ 18846289ac2bSKarthikeyan Periyasamy { 18856289ac2bSKarthikeyan Periyasamy .pipenum = __cpu_to_le32(8), 18866289ac2bSKarthikeyan Periyasamy .pipedir = __cpu_to_le32(PIPEDIR_INOUT), 18876289ac2bSKarthikeyan Periyasamy .nentries = __cpu_to_le32(32), 18886289ac2bSKarthikeyan Periyasamy .nbytes_max = __cpu_to_le32(16384), 18896289ac2bSKarthikeyan Periyasamy .flags = __cpu_to_le32(CE_ATTR_FLAGS), 18906289ac2bSKarthikeyan Periyasamy .reserved = __cpu_to_le32(0), 18916289ac2bSKarthikeyan Periyasamy }, 18926289ac2bSKarthikeyan Periyasamy /* CE 9, 10, 11 are used by MHI driver */ 18936289ac2bSKarthikeyan Periyasamy }; 18946289ac2bSKarthikeyan Periyasamy 18956289ac2bSKarthikeyan Periyasamy /* Map from service/endpoint to Copy Engine. 18966289ac2bSKarthikeyan Periyasamy * This table is derived from the CE_PCI TABLE, above. 18976289ac2bSKarthikeyan Periyasamy * It is passed to the Target at startup for use by firmware. 18986289ac2bSKarthikeyan Periyasamy */ 18996289ac2bSKarthikeyan Periyasamy const struct service_to_pipe ath11k_target_service_to_ce_map_wlan_qcn9074[] = { 19006289ac2bSKarthikeyan Periyasamy { 19016289ac2bSKarthikeyan Periyasamy __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_VO), 19026289ac2bSKarthikeyan Periyasamy __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ 19036289ac2bSKarthikeyan Periyasamy __cpu_to_le32(3), 19046289ac2bSKarthikeyan Periyasamy }, 19056289ac2bSKarthikeyan Periyasamy { 19066289ac2bSKarthikeyan Periyasamy __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_VO), 19076289ac2bSKarthikeyan Periyasamy __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ 19086289ac2bSKarthikeyan Periyasamy __cpu_to_le32(2), 19096289ac2bSKarthikeyan Periyasamy }, 19106289ac2bSKarthikeyan Periyasamy { 19116289ac2bSKarthikeyan Periyasamy __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_BK), 19126289ac2bSKarthikeyan Periyasamy __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ 19136289ac2bSKarthikeyan Periyasamy __cpu_to_le32(3), 19146289ac2bSKarthikeyan Periyasamy }, 19156289ac2bSKarthikeyan Periyasamy { 19166289ac2bSKarthikeyan Periyasamy __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_BK), 19176289ac2bSKarthikeyan Periyasamy __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ 19186289ac2bSKarthikeyan Periyasamy __cpu_to_le32(2), 19196289ac2bSKarthikeyan Periyasamy }, 19206289ac2bSKarthikeyan Periyasamy { 19216289ac2bSKarthikeyan Periyasamy __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_BE), 19226289ac2bSKarthikeyan Periyasamy __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ 19236289ac2bSKarthikeyan Periyasamy __cpu_to_le32(3), 19246289ac2bSKarthikeyan Periyasamy }, 19256289ac2bSKarthikeyan Periyasamy { 19266289ac2bSKarthikeyan Periyasamy __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_BE), 19276289ac2bSKarthikeyan Periyasamy __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ 19286289ac2bSKarthikeyan Periyasamy __cpu_to_le32(2), 19296289ac2bSKarthikeyan Periyasamy }, 19306289ac2bSKarthikeyan Periyasamy { 19316289ac2bSKarthikeyan Periyasamy __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_VI), 19326289ac2bSKarthikeyan Periyasamy __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ 19336289ac2bSKarthikeyan Periyasamy __cpu_to_le32(3), 19346289ac2bSKarthikeyan Periyasamy }, 19356289ac2bSKarthikeyan Periyasamy { 19366289ac2bSKarthikeyan Periyasamy __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_VI), 19376289ac2bSKarthikeyan Periyasamy __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ 19386289ac2bSKarthikeyan Periyasamy __cpu_to_le32(2), 19396289ac2bSKarthikeyan Periyasamy }, 19406289ac2bSKarthikeyan Periyasamy { 19416289ac2bSKarthikeyan Periyasamy __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_CONTROL), 19426289ac2bSKarthikeyan Periyasamy __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ 19436289ac2bSKarthikeyan Periyasamy __cpu_to_le32(3), 19446289ac2bSKarthikeyan Periyasamy }, 19456289ac2bSKarthikeyan Periyasamy { 19466289ac2bSKarthikeyan Periyasamy __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_CONTROL), 19476289ac2bSKarthikeyan Periyasamy __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ 19486289ac2bSKarthikeyan Periyasamy __cpu_to_le32(2), 19496289ac2bSKarthikeyan Periyasamy }, 19506289ac2bSKarthikeyan Periyasamy { 19516289ac2bSKarthikeyan Periyasamy __cpu_to_le32(ATH11K_HTC_SVC_ID_RSVD_CTRL), 19526289ac2bSKarthikeyan Periyasamy __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ 19536289ac2bSKarthikeyan Periyasamy __cpu_to_le32(0), 19546289ac2bSKarthikeyan Periyasamy }, 19556289ac2bSKarthikeyan Periyasamy { 19566289ac2bSKarthikeyan Periyasamy __cpu_to_le32(ATH11K_HTC_SVC_ID_RSVD_CTRL), 19576289ac2bSKarthikeyan Periyasamy __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ 19586289ac2bSKarthikeyan Periyasamy __cpu_to_le32(1), 19596289ac2bSKarthikeyan Periyasamy }, 19606289ac2bSKarthikeyan Periyasamy { 19616289ac2bSKarthikeyan Periyasamy __cpu_to_le32(ATH11K_HTC_SVC_ID_TEST_RAW_STREAMS), 19626289ac2bSKarthikeyan Periyasamy __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ 19636289ac2bSKarthikeyan Periyasamy __cpu_to_le32(0), 19646289ac2bSKarthikeyan Periyasamy }, 19656289ac2bSKarthikeyan Periyasamy { 19666289ac2bSKarthikeyan Periyasamy __cpu_to_le32(ATH11K_HTC_SVC_ID_TEST_RAW_STREAMS), 19676289ac2bSKarthikeyan Periyasamy __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ 19686289ac2bSKarthikeyan Periyasamy __cpu_to_le32(1), 19696289ac2bSKarthikeyan Periyasamy }, 19706289ac2bSKarthikeyan Periyasamy { 19716289ac2bSKarthikeyan Periyasamy __cpu_to_le32(ATH11K_HTC_SVC_ID_HTT_DATA_MSG), 19726289ac2bSKarthikeyan Periyasamy __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ 19736289ac2bSKarthikeyan Periyasamy __cpu_to_le32(4), 19746289ac2bSKarthikeyan Periyasamy }, 19756289ac2bSKarthikeyan Periyasamy { 19766289ac2bSKarthikeyan Periyasamy __cpu_to_le32(ATH11K_HTC_SVC_ID_HTT_DATA_MSG), 19776289ac2bSKarthikeyan Periyasamy __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ 19786289ac2bSKarthikeyan Periyasamy __cpu_to_le32(1), 19796289ac2bSKarthikeyan Periyasamy }, 19806289ac2bSKarthikeyan Periyasamy { 19816289ac2bSKarthikeyan Periyasamy __cpu_to_le32(ATH11K_HTC_SVC_ID_PKT_LOG), 19826289ac2bSKarthikeyan Periyasamy __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ 19836289ac2bSKarthikeyan Periyasamy __cpu_to_le32(5), 19846289ac2bSKarthikeyan Periyasamy }, 19856289ac2bSKarthikeyan Periyasamy 19866289ac2bSKarthikeyan Periyasamy /* (Additions here) */ 19876289ac2bSKarthikeyan Periyasamy 19886289ac2bSKarthikeyan Periyasamy { /* must be last */ 19896289ac2bSKarthikeyan Periyasamy __cpu_to_le32(0), 19906289ac2bSKarthikeyan Periyasamy __cpu_to_le32(0), 19916289ac2bSKarthikeyan Periyasamy __cpu_to_le32(0), 19926289ac2bSKarthikeyan Periyasamy }, 19936289ac2bSKarthikeyan Periyasamy }; 19946289ac2bSKarthikeyan Periyasamy 19957dc67af0SKarthikeyan Periyasamy const struct ath11k_hw_ring_mask ath11k_hw_ring_mask_qcn9074 = { 19967dc67af0SKarthikeyan Periyasamy .tx = { 19977dc67af0SKarthikeyan Periyasamy ATH11K_TX_RING_MASK_0, 19987dc67af0SKarthikeyan Periyasamy ATH11K_TX_RING_MASK_1, 19997dc67af0SKarthikeyan Periyasamy ATH11K_TX_RING_MASK_2, 20007dc67af0SKarthikeyan Periyasamy }, 20017dc67af0SKarthikeyan Periyasamy .rx_mon_status = { 20027dc67af0SKarthikeyan Periyasamy 0, 0, 0, 20037dc67af0SKarthikeyan Periyasamy ATH11K_RX_MON_STATUS_RING_MASK_0, 20047dc67af0SKarthikeyan Periyasamy ATH11K_RX_MON_STATUS_RING_MASK_1, 20057dc67af0SKarthikeyan Periyasamy ATH11K_RX_MON_STATUS_RING_MASK_2, 20067dc67af0SKarthikeyan Periyasamy }, 20077dc67af0SKarthikeyan Periyasamy .rx = { 20087dc67af0SKarthikeyan Periyasamy 0, 0, 0, 0, 20097dc67af0SKarthikeyan Periyasamy ATH11K_RX_RING_MASK_0, 20107dc67af0SKarthikeyan Periyasamy ATH11K_RX_RING_MASK_1, 20117dc67af0SKarthikeyan Periyasamy ATH11K_RX_RING_MASK_2, 20127dc67af0SKarthikeyan Periyasamy ATH11K_RX_RING_MASK_3, 20137dc67af0SKarthikeyan Periyasamy }, 20147dc67af0SKarthikeyan Periyasamy .rx_err = { 20157dc67af0SKarthikeyan Periyasamy 0, 0, 0, 20167dc67af0SKarthikeyan Periyasamy ATH11K_RX_ERR_RING_MASK_0, 20177dc67af0SKarthikeyan Periyasamy }, 20187dc67af0SKarthikeyan Periyasamy .rx_wbm_rel = { 20197dc67af0SKarthikeyan Periyasamy 0, 0, 0, 20207dc67af0SKarthikeyan Periyasamy ATH11K_RX_WBM_REL_RING_MASK_0, 20217dc67af0SKarthikeyan Periyasamy }, 20227dc67af0SKarthikeyan Periyasamy .reo_status = { 20237dc67af0SKarthikeyan Periyasamy 0, 0, 0, 20247dc67af0SKarthikeyan Periyasamy ATH11K_REO_STATUS_RING_MASK_0, 20257dc67af0SKarthikeyan Periyasamy }, 20267dc67af0SKarthikeyan Periyasamy .rxdma2host = { 20277dc67af0SKarthikeyan Periyasamy 0, 0, 0, 20287dc67af0SKarthikeyan Periyasamy ATH11K_RXDMA2HOST_RING_MASK_0, 20297dc67af0SKarthikeyan Periyasamy }, 20307dc67af0SKarthikeyan Periyasamy .host2rxdma = { 20317dc67af0SKarthikeyan Periyasamy 0, 0, 0, 20327dc67af0SKarthikeyan Periyasamy ATH11K_HOST2RXDMA_RING_MASK_0, 20337dc67af0SKarthikeyan Periyasamy }, 20347dc67af0SKarthikeyan Periyasamy }; 20357dc67af0SKarthikeyan Periyasamy 20367636c9a6SManikanta Pubbisetty const struct ath11k_hw_ring_mask ath11k_hw_ring_mask_wcn6750 = { 20377636c9a6SManikanta Pubbisetty .tx = { 20387636c9a6SManikanta Pubbisetty ATH11K_TX_RING_MASK_0, 20397636c9a6SManikanta Pubbisetty 0, 20407636c9a6SManikanta Pubbisetty ATH11K_TX_RING_MASK_2, 20417636c9a6SManikanta Pubbisetty 0, 20427636c9a6SManikanta Pubbisetty ATH11K_TX_RING_MASK_4, 20437636c9a6SManikanta Pubbisetty }, 20447636c9a6SManikanta Pubbisetty .rx_mon_status = { 20457636c9a6SManikanta Pubbisetty 0, 0, 0, 0, 0, 0, 20467636c9a6SManikanta Pubbisetty ATH11K_RX_MON_STATUS_RING_MASK_0, 20477636c9a6SManikanta Pubbisetty }, 20487636c9a6SManikanta Pubbisetty .rx = { 20497636c9a6SManikanta Pubbisetty 0, 0, 0, 0, 0, 0, 0, 20507636c9a6SManikanta Pubbisetty ATH11K_RX_RING_MASK_0, 20517636c9a6SManikanta Pubbisetty ATH11K_RX_RING_MASK_1, 20527636c9a6SManikanta Pubbisetty ATH11K_RX_RING_MASK_2, 20537636c9a6SManikanta Pubbisetty ATH11K_RX_RING_MASK_3, 20547636c9a6SManikanta Pubbisetty }, 20557636c9a6SManikanta Pubbisetty .rx_err = { 20567636c9a6SManikanta Pubbisetty 0, ATH11K_RX_ERR_RING_MASK_0, 20577636c9a6SManikanta Pubbisetty }, 20587636c9a6SManikanta Pubbisetty .rx_wbm_rel = { 20597636c9a6SManikanta Pubbisetty 0, ATH11K_RX_WBM_REL_RING_MASK_0, 20607636c9a6SManikanta Pubbisetty }, 20617636c9a6SManikanta Pubbisetty .reo_status = { 20627636c9a6SManikanta Pubbisetty 0, ATH11K_REO_STATUS_RING_MASK_0, 20637636c9a6SManikanta Pubbisetty }, 20647636c9a6SManikanta Pubbisetty .rxdma2host = { 20657636c9a6SManikanta Pubbisetty ATH11K_RXDMA2HOST_RING_MASK_0, 20667636c9a6SManikanta Pubbisetty ATH11K_RXDMA2HOST_RING_MASK_1, 20677636c9a6SManikanta Pubbisetty ATH11K_RXDMA2HOST_RING_MASK_2, 20687636c9a6SManikanta Pubbisetty }, 20697636c9a6SManikanta Pubbisetty .host2rxdma = { 20707636c9a6SManikanta Pubbisetty }, 20717636c9a6SManikanta Pubbisetty }; 20727636c9a6SManikanta Pubbisetty 207326af7aabSSriram R /* Target firmware's Copy Engine configuration for IPQ5018 */ 207426af7aabSSriram R const struct ce_pipe_config ath11k_target_ce_config_wlan_ipq5018[] = { 207526af7aabSSriram R /* CE0: host->target HTC control and raw streams */ 207626af7aabSSriram R { 207726af7aabSSriram R .pipenum = __cpu_to_le32(0), 207826af7aabSSriram R .pipedir = __cpu_to_le32(PIPEDIR_OUT), 207926af7aabSSriram R .nentries = __cpu_to_le32(32), 208026af7aabSSriram R .nbytes_max = __cpu_to_le32(2048), 208126af7aabSSriram R .flags = __cpu_to_le32(CE_ATTR_FLAGS), 208226af7aabSSriram R .reserved = __cpu_to_le32(0), 208326af7aabSSriram R }, 208426af7aabSSriram R 208526af7aabSSriram R /* CE1: target->host HTT + HTC control */ 208626af7aabSSriram R { 208726af7aabSSriram R .pipenum = __cpu_to_le32(1), 208826af7aabSSriram R .pipedir = __cpu_to_le32(PIPEDIR_IN), 208926af7aabSSriram R .nentries = __cpu_to_le32(32), 209026af7aabSSriram R .nbytes_max = __cpu_to_le32(2048), 209126af7aabSSriram R .flags = __cpu_to_le32(CE_ATTR_FLAGS), 209226af7aabSSriram R .reserved = __cpu_to_le32(0), 209326af7aabSSriram R }, 209426af7aabSSriram R 209526af7aabSSriram R /* CE2: target->host WMI */ 209626af7aabSSriram R { 209726af7aabSSriram R .pipenum = __cpu_to_le32(2), 209826af7aabSSriram R .pipedir = __cpu_to_le32(PIPEDIR_IN), 209926af7aabSSriram R .nentries = __cpu_to_le32(32), 210026af7aabSSriram R .nbytes_max = __cpu_to_le32(2048), 210126af7aabSSriram R .flags = __cpu_to_le32(CE_ATTR_FLAGS), 210226af7aabSSriram R .reserved = __cpu_to_le32(0), 210326af7aabSSriram R }, 210426af7aabSSriram R 210526af7aabSSriram R /* CE3: host->target WMI */ 210626af7aabSSriram R { 210726af7aabSSriram R .pipenum = __cpu_to_le32(3), 210826af7aabSSriram R .pipedir = __cpu_to_le32(PIPEDIR_OUT), 210926af7aabSSriram R .nentries = __cpu_to_le32(32), 211026af7aabSSriram R .nbytes_max = __cpu_to_le32(2048), 211126af7aabSSriram R .flags = __cpu_to_le32(CE_ATTR_FLAGS), 211226af7aabSSriram R .reserved = __cpu_to_le32(0), 211326af7aabSSriram R }, 211426af7aabSSriram R 211526af7aabSSriram R /* CE4: host->target HTT */ 211626af7aabSSriram R { 211726af7aabSSriram R .pipenum = __cpu_to_le32(4), 211826af7aabSSriram R .pipedir = __cpu_to_le32(PIPEDIR_OUT), 211926af7aabSSriram R .nentries = __cpu_to_le32(256), 212026af7aabSSriram R .nbytes_max = __cpu_to_le32(256), 212126af7aabSSriram R .flags = __cpu_to_le32(CE_ATTR_FLAGS | CE_ATTR_DIS_INTR), 212226af7aabSSriram R .reserved = __cpu_to_le32(0), 212326af7aabSSriram R }, 212426af7aabSSriram R 212526af7aabSSriram R /* CE5: target->host Pktlog */ 212626af7aabSSriram R { 212726af7aabSSriram R .pipenum = __cpu_to_le32(5), 212826af7aabSSriram R .pipedir = __cpu_to_le32(PIPEDIR_IN), 212926af7aabSSriram R .nentries = __cpu_to_le32(32), 213026af7aabSSriram R .nbytes_max = __cpu_to_le32(2048), 213126af7aabSSriram R .flags = __cpu_to_le32(CE_ATTR_FLAGS), 213226af7aabSSriram R .reserved = __cpu_to_le32(0), 213326af7aabSSriram R }, 213426af7aabSSriram R 213526af7aabSSriram R /* CE6: Reserved for target autonomous hif_memcpy */ 213626af7aabSSriram R { 213726af7aabSSriram R .pipenum = __cpu_to_le32(6), 213826af7aabSSriram R .pipedir = __cpu_to_le32(PIPEDIR_INOUT), 213926af7aabSSriram R .nentries = __cpu_to_le32(32), 214026af7aabSSriram R .nbytes_max = __cpu_to_le32(16384), 214126af7aabSSriram R .flags = __cpu_to_le32(CE_ATTR_FLAGS), 214226af7aabSSriram R .reserved = __cpu_to_le32(0), 214326af7aabSSriram R }, 214426af7aabSSriram R 214526af7aabSSriram R /* CE7 used only by Host */ 214626af7aabSSriram R { 214726af7aabSSriram R .pipenum = __cpu_to_le32(7), 214826af7aabSSriram R .pipedir = __cpu_to_le32(PIPEDIR_OUT), 214926af7aabSSriram R .nentries = __cpu_to_le32(32), 215026af7aabSSriram R .nbytes_max = __cpu_to_le32(2048), 215126af7aabSSriram R .flags = __cpu_to_le32(0x2000), 215226af7aabSSriram R .reserved = __cpu_to_le32(0), 215326af7aabSSriram R }, 215426af7aabSSriram R 215526af7aabSSriram R /* CE8 target->host used only by IPA */ 215626af7aabSSriram R { 215726af7aabSSriram R .pipenum = __cpu_to_le32(8), 215826af7aabSSriram R .pipedir = __cpu_to_le32(PIPEDIR_INOUT), 215926af7aabSSriram R .nentries = __cpu_to_le32(32), 216026af7aabSSriram R .nbytes_max = __cpu_to_le32(16384), 216126af7aabSSriram R .flags = __cpu_to_le32(CE_ATTR_FLAGS), 216226af7aabSSriram R .reserved = __cpu_to_le32(0), 216326af7aabSSriram R }, 216426af7aabSSriram R }; 216526af7aabSSriram R 216626af7aabSSriram R /* Map from service/endpoint to Copy Engine for IPQ5018. 216726af7aabSSriram R * This table is derived from the CE TABLE, above. 216826af7aabSSriram R * It is passed to the Target at startup for use by firmware. 216926af7aabSSriram R */ 217026af7aabSSriram R const struct service_to_pipe ath11k_target_service_to_ce_map_wlan_ipq5018[] = { 217126af7aabSSriram R { 217226af7aabSSriram R .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_VO), 217326af7aabSSriram R .pipedir = __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ 217426af7aabSSriram R .pipenum = __cpu_to_le32(3), 217526af7aabSSriram R }, 217626af7aabSSriram R { 217726af7aabSSriram R .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_VO), 217826af7aabSSriram R .pipedir = __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ 217926af7aabSSriram R .pipenum = __cpu_to_le32(2), 218026af7aabSSriram R }, 218126af7aabSSriram R { 218226af7aabSSriram R .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_BK), 218326af7aabSSriram R .pipedir = __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ 218426af7aabSSriram R .pipenum = __cpu_to_le32(3), 218526af7aabSSriram R }, 218626af7aabSSriram R { 218726af7aabSSriram R .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_BK), 218826af7aabSSriram R .pipedir = __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ 218926af7aabSSriram R .pipenum = __cpu_to_le32(2), 219026af7aabSSriram R }, 219126af7aabSSriram R { 219226af7aabSSriram R .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_BE), 219326af7aabSSriram R .pipedir = __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ 219426af7aabSSriram R .pipenum = __cpu_to_le32(3), 219526af7aabSSriram R }, 219626af7aabSSriram R { 219726af7aabSSriram R .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_BE), 219826af7aabSSriram R .pipedir = __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ 219926af7aabSSriram R .pipenum = __cpu_to_le32(2), 220026af7aabSSriram R }, 220126af7aabSSriram R { 220226af7aabSSriram R .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_VI), 220326af7aabSSriram R .pipedir = __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ 220426af7aabSSriram R .pipenum = __cpu_to_le32(3), 220526af7aabSSriram R }, 220626af7aabSSriram R { 220726af7aabSSriram R .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_VI), 220826af7aabSSriram R .pipedir = __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ 220926af7aabSSriram R .pipenum = __cpu_to_le32(2), 221026af7aabSSriram R }, 221126af7aabSSriram R { 221226af7aabSSriram R .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_CONTROL), 221326af7aabSSriram R .pipedir = __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ 221426af7aabSSriram R .pipenum = __cpu_to_le32(3), 221526af7aabSSriram R }, 221626af7aabSSriram R { 221726af7aabSSriram R .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_CONTROL), 221826af7aabSSriram R .pipedir = __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ 221926af7aabSSriram R .pipenum = __cpu_to_le32(2), 222026af7aabSSriram R }, 222126af7aabSSriram R 222226af7aabSSriram R { 222326af7aabSSriram R .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_RSVD_CTRL), 222426af7aabSSriram R .pipedir = __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ 222526af7aabSSriram R .pipenum = __cpu_to_le32(0), 222626af7aabSSriram R }, 222726af7aabSSriram R { 222826af7aabSSriram R .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_RSVD_CTRL), 222926af7aabSSriram R .pipedir = __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ 223026af7aabSSriram R .pipenum = __cpu_to_le32(1), 223126af7aabSSriram R }, 223226af7aabSSriram R 223326af7aabSSriram R { 223426af7aabSSriram R .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_TEST_RAW_STREAMS), 223526af7aabSSriram R .pipedir = __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ 223626af7aabSSriram R .pipenum = __cpu_to_le32(0), 223726af7aabSSriram R }, 223826af7aabSSriram R { 223926af7aabSSriram R .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_TEST_RAW_STREAMS), 224026af7aabSSriram R .pipedir = __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ 224126af7aabSSriram R .pipenum = __cpu_to_le32(1), 224226af7aabSSriram R }, 224326af7aabSSriram R { 224426af7aabSSriram R .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_HTT_DATA_MSG), 224526af7aabSSriram R .pipedir = __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ 224626af7aabSSriram R .pipenum = __cpu_to_le32(4), 224726af7aabSSriram R }, 224826af7aabSSriram R { 224926af7aabSSriram R .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_HTT_DATA_MSG), 225026af7aabSSriram R .pipedir = __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ 225126af7aabSSriram R .pipenum = __cpu_to_le32(1), 225226af7aabSSriram R }, 225326af7aabSSriram R { 225426af7aabSSriram R .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_PKT_LOG), 225526af7aabSSriram R .pipedir = __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ 225626af7aabSSriram R .pipenum = __cpu_to_le32(5), 225726af7aabSSriram R }, 225826af7aabSSriram R 225926af7aabSSriram R /* (Additions here) */ 226026af7aabSSriram R 226126af7aabSSriram R { /* terminator entry */ } 226226af7aabSSriram R }; 226326af7aabSSriram R 2264b42b3678SSriram R const struct ce_ie_addr ath11k_ce_ie_addr_ipq8074 = { 2265b42b3678SSriram R .ie1_reg_addr = CE_HOST_IE_ADDRESS, 2266b42b3678SSriram R .ie2_reg_addr = CE_HOST_IE_2_ADDRESS, 2267b42b3678SSriram R .ie3_reg_addr = CE_HOST_IE_3_ADDRESS, 2268b42b3678SSriram R }; 2269b42b3678SSriram R 2270b42b3678SSriram R const struct ce_ie_addr ath11k_ce_ie_addr_ipq5018 = { 2271b42b3678SSriram R .ie1_reg_addr = CE_HOST_IPQ5018_IE_ADDRESS - HAL_IPQ5018_CE_WFSS_REG_BASE, 2272b42b3678SSriram R .ie2_reg_addr = CE_HOST_IPQ5018_IE_2_ADDRESS - HAL_IPQ5018_CE_WFSS_REG_BASE, 2273b42b3678SSriram R .ie3_reg_addr = CE_HOST_IPQ5018_IE_3_ADDRESS - HAL_IPQ5018_CE_WFSS_REG_BASE, 2274b42b3678SSriram R }; 2275b42b3678SSriram R 2276b42b3678SSriram R const struct ce_remap ath11k_ce_remap_ipq5018 = { 2277b42b3678SSriram R .base = HAL_IPQ5018_CE_WFSS_REG_BASE, 2278b42b3678SSriram R .size = HAL_IPQ5018_CE_SIZE, 2279b42b3678SSriram R }; 2280b42b3678SSriram R 22816976433cSCarl Huang const struct ath11k_hw_regs ipq8074_regs = { 22826976433cSCarl Huang /* SW2TCL(x) R0 ring configuration address */ 22836976433cSCarl Huang .hal_tcl1_ring_base_lsb = 0x00000510, 22846976433cSCarl Huang .hal_tcl1_ring_base_msb = 0x00000514, 22856976433cSCarl Huang .hal_tcl1_ring_id = 0x00000518, 22866976433cSCarl Huang .hal_tcl1_ring_misc = 0x00000520, 22876976433cSCarl Huang .hal_tcl1_ring_tp_addr_lsb = 0x0000052c, 22886976433cSCarl Huang .hal_tcl1_ring_tp_addr_msb = 0x00000530, 22896976433cSCarl Huang .hal_tcl1_ring_consumer_int_setup_ix0 = 0x00000540, 22906976433cSCarl Huang .hal_tcl1_ring_consumer_int_setup_ix1 = 0x00000544, 22916976433cSCarl Huang .hal_tcl1_ring_msi1_base_lsb = 0x00000558, 22926976433cSCarl Huang .hal_tcl1_ring_msi1_base_msb = 0x0000055c, 22936976433cSCarl Huang .hal_tcl1_ring_msi1_data = 0x00000560, 22946976433cSCarl Huang .hal_tcl2_ring_base_lsb = 0x00000568, 22956976433cSCarl Huang .hal_tcl_ring_base_lsb = 0x00000618, 22966976433cSCarl Huang 22976976433cSCarl Huang /* TCL STATUS ring address */ 22986976433cSCarl Huang .hal_tcl_status_ring_base_lsb = 0x00000720, 22996976433cSCarl Huang 23006976433cSCarl Huang /* REO2SW(x) R0 ring configuration address */ 23016976433cSCarl Huang .hal_reo1_ring_base_lsb = 0x0000029c, 23026976433cSCarl Huang .hal_reo1_ring_base_msb = 0x000002a0, 23036976433cSCarl Huang .hal_reo1_ring_id = 0x000002a4, 23046976433cSCarl Huang .hal_reo1_ring_misc = 0x000002ac, 23056976433cSCarl Huang .hal_reo1_ring_hp_addr_lsb = 0x000002b0, 23066976433cSCarl Huang .hal_reo1_ring_hp_addr_msb = 0x000002b4, 23076976433cSCarl Huang .hal_reo1_ring_producer_int_setup = 0x000002c0, 23086976433cSCarl Huang .hal_reo1_ring_msi1_base_lsb = 0x000002e4, 23096976433cSCarl Huang .hal_reo1_ring_msi1_base_msb = 0x000002e8, 23106976433cSCarl Huang .hal_reo1_ring_msi1_data = 0x000002ec, 23116976433cSCarl Huang .hal_reo2_ring_base_lsb = 0x000002f4, 23126976433cSCarl Huang .hal_reo1_aging_thresh_ix_0 = 0x00000564, 23136976433cSCarl Huang .hal_reo1_aging_thresh_ix_1 = 0x00000568, 23146976433cSCarl Huang .hal_reo1_aging_thresh_ix_2 = 0x0000056c, 23156976433cSCarl Huang .hal_reo1_aging_thresh_ix_3 = 0x00000570, 23166976433cSCarl Huang 23176976433cSCarl Huang /* REO2SW(x) R2 ring pointers (head/tail) address */ 23186976433cSCarl Huang .hal_reo1_ring_hp = 0x00003038, 23196976433cSCarl Huang .hal_reo1_ring_tp = 0x0000303c, 23206976433cSCarl Huang .hal_reo2_ring_hp = 0x00003040, 23216976433cSCarl Huang 23226976433cSCarl Huang /* REO2TCL R0 ring configuration address */ 23236976433cSCarl Huang .hal_reo_tcl_ring_base_lsb = 0x000003fc, 23246976433cSCarl Huang .hal_reo_tcl_ring_hp = 0x00003058, 23256976433cSCarl Huang 232649890d9cSManikanta Pubbisetty /* REO CMD ring address */ 232749890d9cSManikanta Pubbisetty .hal_reo_cmd_ring_base_lsb = 0x00000194, 232849890d9cSManikanta Pubbisetty .hal_reo_cmd_ring_hp = 0x00003020, 232949890d9cSManikanta Pubbisetty 23306976433cSCarl Huang /* REO status address */ 23316976433cSCarl Huang .hal_reo_status_ring_base_lsb = 0x00000504, 23326976433cSCarl Huang .hal_reo_status_hp = 0x00003070, 23336976433cSCarl Huang 233449890d9cSManikanta Pubbisetty /* SW2REO ring address */ 233549890d9cSManikanta Pubbisetty .hal_sw2reo_ring_base_lsb = 0x000001ec, 233649890d9cSManikanta Pubbisetty .hal_sw2reo_ring_hp = 0x00003028, 233749890d9cSManikanta Pubbisetty 23386fe6f68fSKarthikeyan Periyasamy /* WCSS relative address */ 23396fe6f68fSKarthikeyan Periyasamy .hal_seq_wcss_umac_ce0_src_reg = 0x00a00000, 23406fe6f68fSKarthikeyan Periyasamy .hal_seq_wcss_umac_ce0_dst_reg = 0x00a01000, 23416fe6f68fSKarthikeyan Periyasamy .hal_seq_wcss_umac_ce1_src_reg = 0x00a02000, 23426fe6f68fSKarthikeyan Periyasamy .hal_seq_wcss_umac_ce1_dst_reg = 0x00a03000, 23436fe6f68fSKarthikeyan Periyasamy 23446fe6f68fSKarthikeyan Periyasamy /* WBM Idle address */ 23456fe6f68fSKarthikeyan Periyasamy .hal_wbm_idle_link_ring_base_lsb = 0x00000860, 23466fe6f68fSKarthikeyan Periyasamy .hal_wbm_idle_link_ring_misc = 0x00000870, 23476fe6f68fSKarthikeyan Periyasamy 23486fe6f68fSKarthikeyan Periyasamy /* SW2WBM release address */ 23496fe6f68fSKarthikeyan Periyasamy .hal_wbm_release_ring_base_lsb = 0x000001d8, 23506fe6f68fSKarthikeyan Periyasamy 23516fe6f68fSKarthikeyan Periyasamy /* WBM2SW release address */ 23526fe6f68fSKarthikeyan Periyasamy .hal_wbm0_release_ring_base_lsb = 0x00000910, 23536fe6f68fSKarthikeyan Periyasamy .hal_wbm1_release_ring_base_lsb = 0x00000968, 23546fe6f68fSKarthikeyan Periyasamy 23556fe6f68fSKarthikeyan Periyasamy /* PCIe base address */ 23566fe6f68fSKarthikeyan Periyasamy .pcie_qserdes_sysclk_en_sel = 0x0, 23576fe6f68fSKarthikeyan Periyasamy .pcie_pcs_osc_dtct_config_base = 0x0, 235849890d9cSManikanta Pubbisetty 235949890d9cSManikanta Pubbisetty /* Shadow register area */ 236049890d9cSManikanta Pubbisetty .hal_shadow_base_addr = 0x0, 236122cc6873SManikanta Pubbisetty 236222cc6873SManikanta Pubbisetty /* REO misc control register, not used in IPQ8074 */ 236322cc6873SManikanta Pubbisetty .hal_reo1_misc_ctl = 0x0, 23646976433cSCarl Huang }; 23656976433cSCarl Huang 23666976433cSCarl Huang const struct ath11k_hw_regs qca6390_regs = { 23676976433cSCarl Huang /* SW2TCL(x) R0 ring configuration address */ 23686976433cSCarl Huang .hal_tcl1_ring_base_lsb = 0x00000684, 23696976433cSCarl Huang .hal_tcl1_ring_base_msb = 0x00000688, 23706976433cSCarl Huang .hal_tcl1_ring_id = 0x0000068c, 23716976433cSCarl Huang .hal_tcl1_ring_misc = 0x00000694, 23726976433cSCarl Huang .hal_tcl1_ring_tp_addr_lsb = 0x000006a0, 23736976433cSCarl Huang .hal_tcl1_ring_tp_addr_msb = 0x000006a4, 23746976433cSCarl Huang .hal_tcl1_ring_consumer_int_setup_ix0 = 0x000006b4, 23756976433cSCarl Huang .hal_tcl1_ring_consumer_int_setup_ix1 = 0x000006b8, 23766976433cSCarl Huang .hal_tcl1_ring_msi1_base_lsb = 0x000006cc, 23776976433cSCarl Huang .hal_tcl1_ring_msi1_base_msb = 0x000006d0, 23786976433cSCarl Huang .hal_tcl1_ring_msi1_data = 0x000006d4, 23796976433cSCarl Huang .hal_tcl2_ring_base_lsb = 0x000006dc, 23806976433cSCarl Huang .hal_tcl_ring_base_lsb = 0x0000078c, 23816976433cSCarl Huang 23826976433cSCarl Huang /* TCL STATUS ring address */ 23836976433cSCarl Huang .hal_tcl_status_ring_base_lsb = 0x00000894, 23846976433cSCarl Huang 23856976433cSCarl Huang /* REO2SW(x) R0 ring configuration address */ 23866976433cSCarl Huang .hal_reo1_ring_base_lsb = 0x00000244, 23876976433cSCarl Huang .hal_reo1_ring_base_msb = 0x00000248, 23886976433cSCarl Huang .hal_reo1_ring_id = 0x0000024c, 23896976433cSCarl Huang .hal_reo1_ring_misc = 0x00000254, 23906976433cSCarl Huang .hal_reo1_ring_hp_addr_lsb = 0x00000258, 23916976433cSCarl Huang .hal_reo1_ring_hp_addr_msb = 0x0000025c, 23926976433cSCarl Huang .hal_reo1_ring_producer_int_setup = 0x00000268, 23936976433cSCarl Huang .hal_reo1_ring_msi1_base_lsb = 0x0000028c, 23946976433cSCarl Huang .hal_reo1_ring_msi1_base_msb = 0x00000290, 23956976433cSCarl Huang .hal_reo1_ring_msi1_data = 0x00000294, 23966976433cSCarl Huang .hal_reo2_ring_base_lsb = 0x0000029c, 23976976433cSCarl Huang .hal_reo1_aging_thresh_ix_0 = 0x0000050c, 23986976433cSCarl Huang .hal_reo1_aging_thresh_ix_1 = 0x00000510, 23996976433cSCarl Huang .hal_reo1_aging_thresh_ix_2 = 0x00000514, 24006976433cSCarl Huang .hal_reo1_aging_thresh_ix_3 = 0x00000518, 24016976433cSCarl Huang 24026976433cSCarl Huang /* REO2SW(x) R2 ring pointers (head/tail) address */ 24036976433cSCarl Huang .hal_reo1_ring_hp = 0x00003030, 24046976433cSCarl Huang .hal_reo1_ring_tp = 0x00003034, 24056976433cSCarl Huang .hal_reo2_ring_hp = 0x00003038, 24066976433cSCarl Huang 24076976433cSCarl Huang /* REO2TCL R0 ring configuration address */ 24086976433cSCarl Huang .hal_reo_tcl_ring_base_lsb = 0x000003a4, 24096976433cSCarl Huang .hal_reo_tcl_ring_hp = 0x00003050, 24106976433cSCarl Huang 241149890d9cSManikanta Pubbisetty /* REO CMD ring address */ 241249890d9cSManikanta Pubbisetty .hal_reo_cmd_ring_base_lsb = 0x00000194, 241349890d9cSManikanta Pubbisetty .hal_reo_cmd_ring_hp = 0x00003020, 241449890d9cSManikanta Pubbisetty 24156976433cSCarl Huang /* REO status address */ 24166976433cSCarl Huang .hal_reo_status_ring_base_lsb = 0x000004ac, 24176976433cSCarl Huang .hal_reo_status_hp = 0x00003068, 24186fe6f68fSKarthikeyan Periyasamy 241949890d9cSManikanta Pubbisetty /* SW2REO ring address */ 242049890d9cSManikanta Pubbisetty .hal_sw2reo_ring_base_lsb = 0x000001ec, 242149890d9cSManikanta Pubbisetty .hal_sw2reo_ring_hp = 0x00003028, 242249890d9cSManikanta Pubbisetty 24236fe6f68fSKarthikeyan Periyasamy /* WCSS relative address */ 24246fe6f68fSKarthikeyan Periyasamy .hal_seq_wcss_umac_ce0_src_reg = 0x00a00000, 24256fe6f68fSKarthikeyan Periyasamy .hal_seq_wcss_umac_ce0_dst_reg = 0x00a01000, 24266fe6f68fSKarthikeyan Periyasamy .hal_seq_wcss_umac_ce1_src_reg = 0x00a02000, 24276fe6f68fSKarthikeyan Periyasamy .hal_seq_wcss_umac_ce1_dst_reg = 0x00a03000, 24286fe6f68fSKarthikeyan Periyasamy 24296fe6f68fSKarthikeyan Periyasamy /* WBM Idle address */ 24306fe6f68fSKarthikeyan Periyasamy .hal_wbm_idle_link_ring_base_lsb = 0x00000860, 24316fe6f68fSKarthikeyan Periyasamy .hal_wbm_idle_link_ring_misc = 0x00000870, 24326fe6f68fSKarthikeyan Periyasamy 24336fe6f68fSKarthikeyan Periyasamy /* SW2WBM release address */ 24346fe6f68fSKarthikeyan Periyasamy .hal_wbm_release_ring_base_lsb = 0x000001d8, 24356fe6f68fSKarthikeyan Periyasamy 24366fe6f68fSKarthikeyan Periyasamy /* WBM2SW release address */ 24376fe6f68fSKarthikeyan Periyasamy .hal_wbm0_release_ring_base_lsb = 0x00000910, 24386fe6f68fSKarthikeyan Periyasamy .hal_wbm1_release_ring_base_lsb = 0x00000968, 24396fe6f68fSKarthikeyan Periyasamy 24406fe6f68fSKarthikeyan Periyasamy /* PCIe base address */ 24416fe6f68fSKarthikeyan Periyasamy .pcie_qserdes_sysclk_en_sel = 0x01e0c0ac, 24426fe6f68fSKarthikeyan Periyasamy .pcie_pcs_osc_dtct_config_base = 0x01e0c628, 244349890d9cSManikanta Pubbisetty 244449890d9cSManikanta Pubbisetty /* Shadow register area */ 244549890d9cSManikanta Pubbisetty .hal_shadow_base_addr = 0x000008fc, 244622cc6873SManikanta Pubbisetty 244722cc6873SManikanta Pubbisetty /* REO misc control register, not used in QCA6390 */ 244822cc6873SManikanta Pubbisetty .hal_reo1_misc_ctl = 0x0, 24496fe6f68fSKarthikeyan Periyasamy }; 24506fe6f68fSKarthikeyan Periyasamy 24516fe6f68fSKarthikeyan Periyasamy const struct ath11k_hw_regs qcn9074_regs = { 24526fe6f68fSKarthikeyan Periyasamy /* SW2TCL(x) R0 ring configuration address */ 24536fe6f68fSKarthikeyan Periyasamy .hal_tcl1_ring_base_lsb = 0x000004f0, 24546fe6f68fSKarthikeyan Periyasamy .hal_tcl1_ring_base_msb = 0x000004f4, 24556fe6f68fSKarthikeyan Periyasamy .hal_tcl1_ring_id = 0x000004f8, 24566fe6f68fSKarthikeyan Periyasamy .hal_tcl1_ring_misc = 0x00000500, 24576fe6f68fSKarthikeyan Periyasamy .hal_tcl1_ring_tp_addr_lsb = 0x0000050c, 24586fe6f68fSKarthikeyan Periyasamy .hal_tcl1_ring_tp_addr_msb = 0x00000510, 24596fe6f68fSKarthikeyan Periyasamy .hal_tcl1_ring_consumer_int_setup_ix0 = 0x00000520, 24606fe6f68fSKarthikeyan Periyasamy .hal_tcl1_ring_consumer_int_setup_ix1 = 0x00000524, 24616fe6f68fSKarthikeyan Periyasamy .hal_tcl1_ring_msi1_base_lsb = 0x00000538, 24626fe6f68fSKarthikeyan Periyasamy .hal_tcl1_ring_msi1_base_msb = 0x0000053c, 24636fe6f68fSKarthikeyan Periyasamy .hal_tcl1_ring_msi1_data = 0x00000540, 24646fe6f68fSKarthikeyan Periyasamy .hal_tcl2_ring_base_lsb = 0x00000548, 24656fe6f68fSKarthikeyan Periyasamy .hal_tcl_ring_base_lsb = 0x000005f8, 24666fe6f68fSKarthikeyan Periyasamy 24676fe6f68fSKarthikeyan Periyasamy /* TCL STATUS ring address */ 24686fe6f68fSKarthikeyan Periyasamy .hal_tcl_status_ring_base_lsb = 0x00000700, 24696fe6f68fSKarthikeyan Periyasamy 24706fe6f68fSKarthikeyan Periyasamy /* REO2SW(x) R0 ring configuration address */ 24716fe6f68fSKarthikeyan Periyasamy .hal_reo1_ring_base_lsb = 0x0000029c, 24726fe6f68fSKarthikeyan Periyasamy .hal_reo1_ring_base_msb = 0x000002a0, 24736fe6f68fSKarthikeyan Periyasamy .hal_reo1_ring_id = 0x000002a4, 24746fe6f68fSKarthikeyan Periyasamy .hal_reo1_ring_misc = 0x000002ac, 24756fe6f68fSKarthikeyan Periyasamy .hal_reo1_ring_hp_addr_lsb = 0x000002b0, 24766fe6f68fSKarthikeyan Periyasamy .hal_reo1_ring_hp_addr_msb = 0x000002b4, 24776fe6f68fSKarthikeyan Periyasamy .hal_reo1_ring_producer_int_setup = 0x000002c0, 24786fe6f68fSKarthikeyan Periyasamy .hal_reo1_ring_msi1_base_lsb = 0x000002e4, 24796fe6f68fSKarthikeyan Periyasamy .hal_reo1_ring_msi1_base_msb = 0x000002e8, 24806fe6f68fSKarthikeyan Periyasamy .hal_reo1_ring_msi1_data = 0x000002ec, 24816fe6f68fSKarthikeyan Periyasamy .hal_reo2_ring_base_lsb = 0x000002f4, 24826fe6f68fSKarthikeyan Periyasamy .hal_reo1_aging_thresh_ix_0 = 0x00000564, 24836fe6f68fSKarthikeyan Periyasamy .hal_reo1_aging_thresh_ix_1 = 0x00000568, 24846fe6f68fSKarthikeyan Periyasamy .hal_reo1_aging_thresh_ix_2 = 0x0000056c, 24856fe6f68fSKarthikeyan Periyasamy .hal_reo1_aging_thresh_ix_3 = 0x00000570, 24866fe6f68fSKarthikeyan Periyasamy 24876fe6f68fSKarthikeyan Periyasamy /* REO2SW(x) R2 ring pointers (head/tail) address */ 24886fe6f68fSKarthikeyan Periyasamy .hal_reo1_ring_hp = 0x00003038, 24896fe6f68fSKarthikeyan Periyasamy .hal_reo1_ring_tp = 0x0000303c, 24906fe6f68fSKarthikeyan Periyasamy .hal_reo2_ring_hp = 0x00003040, 24916fe6f68fSKarthikeyan Periyasamy 24926fe6f68fSKarthikeyan Periyasamy /* REO2TCL R0 ring configuration address */ 24936fe6f68fSKarthikeyan Periyasamy .hal_reo_tcl_ring_base_lsb = 0x000003fc, 24946fe6f68fSKarthikeyan Periyasamy .hal_reo_tcl_ring_hp = 0x00003058, 24956fe6f68fSKarthikeyan Periyasamy 249649890d9cSManikanta Pubbisetty /* REO CMD ring address */ 249749890d9cSManikanta Pubbisetty .hal_reo_cmd_ring_base_lsb = 0x00000194, 249849890d9cSManikanta Pubbisetty .hal_reo_cmd_ring_hp = 0x00003020, 249949890d9cSManikanta Pubbisetty 25006fe6f68fSKarthikeyan Periyasamy /* REO status address */ 25016fe6f68fSKarthikeyan Periyasamy .hal_reo_status_ring_base_lsb = 0x00000504, 25026fe6f68fSKarthikeyan Periyasamy .hal_reo_status_hp = 0x00003070, 25036fe6f68fSKarthikeyan Periyasamy 250449890d9cSManikanta Pubbisetty /* SW2REO ring address */ 250549890d9cSManikanta Pubbisetty .hal_sw2reo_ring_base_lsb = 0x000001ec, 250649890d9cSManikanta Pubbisetty .hal_sw2reo_ring_hp = 0x00003028, 250749890d9cSManikanta Pubbisetty 25086fe6f68fSKarthikeyan Periyasamy /* WCSS relative address */ 25096fe6f68fSKarthikeyan Periyasamy .hal_seq_wcss_umac_ce0_src_reg = 0x01b80000, 25106fe6f68fSKarthikeyan Periyasamy .hal_seq_wcss_umac_ce0_dst_reg = 0x01b81000, 25116fe6f68fSKarthikeyan Periyasamy .hal_seq_wcss_umac_ce1_src_reg = 0x01b82000, 25126fe6f68fSKarthikeyan Periyasamy .hal_seq_wcss_umac_ce1_dst_reg = 0x01b83000, 25136fe6f68fSKarthikeyan Periyasamy 25146fe6f68fSKarthikeyan Periyasamy /* WBM Idle address */ 25156fe6f68fSKarthikeyan Periyasamy .hal_wbm_idle_link_ring_base_lsb = 0x00000874, 25166fe6f68fSKarthikeyan Periyasamy .hal_wbm_idle_link_ring_misc = 0x00000884, 25176fe6f68fSKarthikeyan Periyasamy 25186fe6f68fSKarthikeyan Periyasamy /* SW2WBM release address */ 25196fe6f68fSKarthikeyan Periyasamy .hal_wbm_release_ring_base_lsb = 0x000001ec, 25206fe6f68fSKarthikeyan Periyasamy 25216fe6f68fSKarthikeyan Periyasamy /* WBM2SW release address */ 25226fe6f68fSKarthikeyan Periyasamy .hal_wbm0_release_ring_base_lsb = 0x00000924, 25236fe6f68fSKarthikeyan Periyasamy .hal_wbm1_release_ring_base_lsb = 0x0000097c, 25246fe6f68fSKarthikeyan Periyasamy 25256fe6f68fSKarthikeyan Periyasamy /* PCIe base address */ 25266fe6f68fSKarthikeyan Periyasamy .pcie_qserdes_sysclk_en_sel = 0x01e0e0a8, 25276fe6f68fSKarthikeyan Periyasamy .pcie_pcs_osc_dtct_config_base = 0x01e0f45c, 252849890d9cSManikanta Pubbisetty 252949890d9cSManikanta Pubbisetty /* Shadow register area */ 253049890d9cSManikanta Pubbisetty .hal_shadow_base_addr = 0x0, 253122cc6873SManikanta Pubbisetty 253222cc6873SManikanta Pubbisetty /* REO misc control register, not used in QCN9074 */ 253322cc6873SManikanta Pubbisetty .hal_reo1_misc_ctl = 0x0, 25346976433cSCarl Huang }; 2535755b1f73SBaochen Qiang 2536755b1f73SBaochen Qiang const struct ath11k_hw_regs wcn6855_regs = { 2537755b1f73SBaochen Qiang /* SW2TCL(x) R0 ring configuration address */ 2538755b1f73SBaochen Qiang .hal_tcl1_ring_base_lsb = 0x00000690, 2539755b1f73SBaochen Qiang .hal_tcl1_ring_base_msb = 0x00000694, 2540755b1f73SBaochen Qiang .hal_tcl1_ring_id = 0x00000698, 2541755b1f73SBaochen Qiang .hal_tcl1_ring_misc = 0x000006a0, 2542755b1f73SBaochen Qiang .hal_tcl1_ring_tp_addr_lsb = 0x000006ac, 2543755b1f73SBaochen Qiang .hal_tcl1_ring_tp_addr_msb = 0x000006b0, 2544755b1f73SBaochen Qiang .hal_tcl1_ring_consumer_int_setup_ix0 = 0x000006c0, 2545755b1f73SBaochen Qiang .hal_tcl1_ring_consumer_int_setup_ix1 = 0x000006c4, 2546755b1f73SBaochen Qiang .hal_tcl1_ring_msi1_base_lsb = 0x000006d8, 2547755b1f73SBaochen Qiang .hal_tcl1_ring_msi1_base_msb = 0x000006dc, 2548755b1f73SBaochen Qiang .hal_tcl1_ring_msi1_data = 0x000006e0, 2549755b1f73SBaochen Qiang .hal_tcl2_ring_base_lsb = 0x000006e8, 2550755b1f73SBaochen Qiang .hal_tcl_ring_base_lsb = 0x00000798, 2551755b1f73SBaochen Qiang 2552755b1f73SBaochen Qiang /* TCL STATUS ring address */ 2553755b1f73SBaochen Qiang .hal_tcl_status_ring_base_lsb = 0x000008a0, 2554755b1f73SBaochen Qiang 2555755b1f73SBaochen Qiang /* REO2SW(x) R0 ring configuration address */ 2556755b1f73SBaochen Qiang .hal_reo1_ring_base_lsb = 0x00000244, 2557755b1f73SBaochen Qiang .hal_reo1_ring_base_msb = 0x00000248, 2558755b1f73SBaochen Qiang .hal_reo1_ring_id = 0x0000024c, 2559755b1f73SBaochen Qiang .hal_reo1_ring_misc = 0x00000254, 2560755b1f73SBaochen Qiang .hal_reo1_ring_hp_addr_lsb = 0x00000258, 2561755b1f73SBaochen Qiang .hal_reo1_ring_hp_addr_msb = 0x0000025c, 2562755b1f73SBaochen Qiang .hal_reo1_ring_producer_int_setup = 0x00000268, 2563755b1f73SBaochen Qiang .hal_reo1_ring_msi1_base_lsb = 0x0000028c, 2564755b1f73SBaochen Qiang .hal_reo1_ring_msi1_base_msb = 0x00000290, 2565755b1f73SBaochen Qiang .hal_reo1_ring_msi1_data = 0x00000294, 2566755b1f73SBaochen Qiang .hal_reo2_ring_base_lsb = 0x0000029c, 2567755b1f73SBaochen Qiang .hal_reo1_aging_thresh_ix_0 = 0x000005bc, 2568755b1f73SBaochen Qiang .hal_reo1_aging_thresh_ix_1 = 0x000005c0, 2569755b1f73SBaochen Qiang .hal_reo1_aging_thresh_ix_2 = 0x000005c4, 2570755b1f73SBaochen Qiang .hal_reo1_aging_thresh_ix_3 = 0x000005c8, 2571755b1f73SBaochen Qiang 2572755b1f73SBaochen Qiang /* REO2SW(x) R2 ring pointers (head/tail) address */ 2573755b1f73SBaochen Qiang .hal_reo1_ring_hp = 0x00003030, 2574755b1f73SBaochen Qiang .hal_reo1_ring_tp = 0x00003034, 2575755b1f73SBaochen Qiang .hal_reo2_ring_hp = 0x00003038, 2576755b1f73SBaochen Qiang 2577755b1f73SBaochen Qiang /* REO2TCL R0 ring configuration address */ 2578755b1f73SBaochen Qiang .hal_reo_tcl_ring_base_lsb = 0x00000454, 2579755b1f73SBaochen Qiang .hal_reo_tcl_ring_hp = 0x00003060, 2580755b1f73SBaochen Qiang 258149890d9cSManikanta Pubbisetty /* REO CMD ring address */ 258249890d9cSManikanta Pubbisetty .hal_reo_cmd_ring_base_lsb = 0x00000194, 258349890d9cSManikanta Pubbisetty .hal_reo_cmd_ring_hp = 0x00003020, 258449890d9cSManikanta Pubbisetty 2585755b1f73SBaochen Qiang /* REO status address */ 2586755b1f73SBaochen Qiang .hal_reo_status_ring_base_lsb = 0x0000055c, 2587755b1f73SBaochen Qiang .hal_reo_status_hp = 0x00003078, 2588755b1f73SBaochen Qiang 258949890d9cSManikanta Pubbisetty /* SW2REO ring address */ 259049890d9cSManikanta Pubbisetty .hal_sw2reo_ring_base_lsb = 0x000001ec, 259149890d9cSManikanta Pubbisetty .hal_sw2reo_ring_hp = 0x00003028, 259249890d9cSManikanta Pubbisetty 2593755b1f73SBaochen Qiang /* WCSS relative address */ 2594755b1f73SBaochen Qiang .hal_seq_wcss_umac_ce0_src_reg = 0x1b80000, 2595755b1f73SBaochen Qiang .hal_seq_wcss_umac_ce0_dst_reg = 0x1b81000, 2596755b1f73SBaochen Qiang .hal_seq_wcss_umac_ce1_src_reg = 0x1b82000, 2597755b1f73SBaochen Qiang .hal_seq_wcss_umac_ce1_dst_reg = 0x1b83000, 2598755b1f73SBaochen Qiang 2599755b1f73SBaochen Qiang /* WBM Idle address */ 2600755b1f73SBaochen Qiang .hal_wbm_idle_link_ring_base_lsb = 0x00000870, 2601755b1f73SBaochen Qiang .hal_wbm_idle_link_ring_misc = 0x00000880, 2602755b1f73SBaochen Qiang 2603755b1f73SBaochen Qiang /* SW2WBM release address */ 2604755b1f73SBaochen Qiang .hal_wbm_release_ring_base_lsb = 0x000001e8, 2605755b1f73SBaochen Qiang 2606755b1f73SBaochen Qiang /* WBM2SW release address */ 2607755b1f73SBaochen Qiang .hal_wbm0_release_ring_base_lsb = 0x00000920, 2608755b1f73SBaochen Qiang .hal_wbm1_release_ring_base_lsb = 0x00000978, 2609755b1f73SBaochen Qiang 2610755b1f73SBaochen Qiang /* PCIe base address */ 2611755b1f73SBaochen Qiang .pcie_qserdes_sysclk_en_sel = 0x01e0c0ac, 2612755b1f73SBaochen Qiang .pcie_pcs_osc_dtct_config_base = 0x01e0c628, 261349890d9cSManikanta Pubbisetty 261449890d9cSManikanta Pubbisetty /* Shadow register area */ 261549890d9cSManikanta Pubbisetty .hal_shadow_base_addr = 0x000008fc, 261622cc6873SManikanta Pubbisetty 261722cc6873SManikanta Pubbisetty /* REO misc control register, used for fragment 261822cc6873SManikanta Pubbisetty * destination ring config in WCN6855. 261922cc6873SManikanta Pubbisetty */ 262022cc6873SManikanta Pubbisetty .hal_reo1_misc_ctl = 0x00000630, 262149890d9cSManikanta Pubbisetty }; 262249890d9cSManikanta Pubbisetty 262349890d9cSManikanta Pubbisetty const struct ath11k_hw_regs wcn6750_regs = { 262449890d9cSManikanta Pubbisetty /* SW2TCL(x) R0 ring configuration address */ 262549890d9cSManikanta Pubbisetty .hal_tcl1_ring_base_lsb = 0x00000694, 262649890d9cSManikanta Pubbisetty .hal_tcl1_ring_base_msb = 0x00000698, 262749890d9cSManikanta Pubbisetty .hal_tcl1_ring_id = 0x0000069c, 262849890d9cSManikanta Pubbisetty .hal_tcl1_ring_misc = 0x000006a4, 262949890d9cSManikanta Pubbisetty .hal_tcl1_ring_tp_addr_lsb = 0x000006b0, 263049890d9cSManikanta Pubbisetty .hal_tcl1_ring_tp_addr_msb = 0x000006b4, 263149890d9cSManikanta Pubbisetty .hal_tcl1_ring_consumer_int_setup_ix0 = 0x000006c4, 263249890d9cSManikanta Pubbisetty .hal_tcl1_ring_consumer_int_setup_ix1 = 0x000006c8, 263349890d9cSManikanta Pubbisetty .hal_tcl1_ring_msi1_base_lsb = 0x000006dc, 263449890d9cSManikanta Pubbisetty .hal_tcl1_ring_msi1_base_msb = 0x000006e0, 263549890d9cSManikanta Pubbisetty .hal_tcl1_ring_msi1_data = 0x000006e4, 263649890d9cSManikanta Pubbisetty .hal_tcl2_ring_base_lsb = 0x000006ec, 263749890d9cSManikanta Pubbisetty .hal_tcl_ring_base_lsb = 0x0000079c, 263849890d9cSManikanta Pubbisetty 263949890d9cSManikanta Pubbisetty /* TCL STATUS ring address */ 264049890d9cSManikanta Pubbisetty .hal_tcl_status_ring_base_lsb = 0x000008a4, 264149890d9cSManikanta Pubbisetty 264249890d9cSManikanta Pubbisetty /* REO2SW(x) R0 ring configuration address */ 264349890d9cSManikanta Pubbisetty .hal_reo1_ring_base_lsb = 0x000001ec, 264449890d9cSManikanta Pubbisetty .hal_reo1_ring_base_msb = 0x000001f0, 264549890d9cSManikanta Pubbisetty .hal_reo1_ring_id = 0x000001f4, 264649890d9cSManikanta Pubbisetty .hal_reo1_ring_misc = 0x000001fc, 264749890d9cSManikanta Pubbisetty .hal_reo1_ring_hp_addr_lsb = 0x00000200, 264849890d9cSManikanta Pubbisetty .hal_reo1_ring_hp_addr_msb = 0x00000204, 264949890d9cSManikanta Pubbisetty .hal_reo1_ring_producer_int_setup = 0x00000210, 265049890d9cSManikanta Pubbisetty .hal_reo1_ring_msi1_base_lsb = 0x00000234, 265149890d9cSManikanta Pubbisetty .hal_reo1_ring_msi1_base_msb = 0x00000238, 265249890d9cSManikanta Pubbisetty .hal_reo1_ring_msi1_data = 0x0000023c, 265349890d9cSManikanta Pubbisetty .hal_reo2_ring_base_lsb = 0x00000244, 265449890d9cSManikanta Pubbisetty .hal_reo1_aging_thresh_ix_0 = 0x00000564, 265549890d9cSManikanta Pubbisetty .hal_reo1_aging_thresh_ix_1 = 0x00000568, 265649890d9cSManikanta Pubbisetty .hal_reo1_aging_thresh_ix_2 = 0x0000056c, 265749890d9cSManikanta Pubbisetty .hal_reo1_aging_thresh_ix_3 = 0x00000570, 265849890d9cSManikanta Pubbisetty 265949890d9cSManikanta Pubbisetty /* REO2SW(x) R2 ring pointers (head/tail) address */ 266049890d9cSManikanta Pubbisetty .hal_reo1_ring_hp = 0x00003028, 266149890d9cSManikanta Pubbisetty .hal_reo1_ring_tp = 0x0000302c, 266249890d9cSManikanta Pubbisetty .hal_reo2_ring_hp = 0x00003030, 266349890d9cSManikanta Pubbisetty 266449890d9cSManikanta Pubbisetty /* REO2TCL R0 ring configuration address */ 266549890d9cSManikanta Pubbisetty .hal_reo_tcl_ring_base_lsb = 0x000003fc, 266649890d9cSManikanta Pubbisetty .hal_reo_tcl_ring_hp = 0x00003058, 266749890d9cSManikanta Pubbisetty 266849890d9cSManikanta Pubbisetty /* REO CMD ring address */ 266949890d9cSManikanta Pubbisetty .hal_reo_cmd_ring_base_lsb = 0x000000e4, 267049890d9cSManikanta Pubbisetty .hal_reo_cmd_ring_hp = 0x00003010, 267149890d9cSManikanta Pubbisetty 267249890d9cSManikanta Pubbisetty /* REO status address */ 267349890d9cSManikanta Pubbisetty .hal_reo_status_ring_base_lsb = 0x00000504, 267449890d9cSManikanta Pubbisetty .hal_reo_status_hp = 0x00003070, 267549890d9cSManikanta Pubbisetty 267649890d9cSManikanta Pubbisetty /* SW2REO ring address */ 267749890d9cSManikanta Pubbisetty .hal_sw2reo_ring_base_lsb = 0x0000013c, 267849890d9cSManikanta Pubbisetty .hal_sw2reo_ring_hp = 0x00003018, 267949890d9cSManikanta Pubbisetty 268049890d9cSManikanta Pubbisetty /* WCSS relative address */ 268149890d9cSManikanta Pubbisetty .hal_seq_wcss_umac_ce0_src_reg = 0x01b80000, 268249890d9cSManikanta Pubbisetty .hal_seq_wcss_umac_ce0_dst_reg = 0x01b81000, 268349890d9cSManikanta Pubbisetty .hal_seq_wcss_umac_ce1_src_reg = 0x01b82000, 268449890d9cSManikanta Pubbisetty .hal_seq_wcss_umac_ce1_dst_reg = 0x01b83000, 268549890d9cSManikanta Pubbisetty 268649890d9cSManikanta Pubbisetty /* WBM Idle address */ 268749890d9cSManikanta Pubbisetty .hal_wbm_idle_link_ring_base_lsb = 0x00000874, 268849890d9cSManikanta Pubbisetty .hal_wbm_idle_link_ring_misc = 0x00000884, 268949890d9cSManikanta Pubbisetty 269049890d9cSManikanta Pubbisetty /* SW2WBM release address */ 269149890d9cSManikanta Pubbisetty .hal_wbm_release_ring_base_lsb = 0x000001ec, 269249890d9cSManikanta Pubbisetty 269349890d9cSManikanta Pubbisetty /* WBM2SW release address */ 269449890d9cSManikanta Pubbisetty .hal_wbm0_release_ring_base_lsb = 0x00000924, 269549890d9cSManikanta Pubbisetty .hal_wbm1_release_ring_base_lsb = 0x0000097c, 269649890d9cSManikanta Pubbisetty 269749890d9cSManikanta Pubbisetty /* PCIe base address */ 269849890d9cSManikanta Pubbisetty .pcie_qserdes_sysclk_en_sel = 0x0, 269949890d9cSManikanta Pubbisetty .pcie_pcs_osc_dtct_config_base = 0x0, 270049890d9cSManikanta Pubbisetty 270149890d9cSManikanta Pubbisetty /* Shadow register area */ 270249890d9cSManikanta Pubbisetty .hal_shadow_base_addr = 0x00000504, 270322cc6873SManikanta Pubbisetty 270422cc6873SManikanta Pubbisetty /* REO misc control register, used for fragment 270522cc6873SManikanta Pubbisetty * destination ring config in WCN6750. 270622cc6873SManikanta Pubbisetty */ 270722cc6873SManikanta Pubbisetty .hal_reo1_misc_ctl = 0x000005d8, 2708755b1f73SBaochen Qiang }; 2709734223d7SBaochen Qiang 27107636c9a6SManikanta Pubbisetty static const struct ath11k_hw_tcl2wbm_rbm_map ath11k_hw_tcl2wbm_rbm_map_ipq8074[] = { 27117636c9a6SManikanta Pubbisetty { 27127636c9a6SManikanta Pubbisetty .tcl_ring_num = 0, 27137636c9a6SManikanta Pubbisetty .wbm_ring_num = 0, 27147636c9a6SManikanta Pubbisetty .rbm_id = HAL_RX_BUF_RBM_SW0_BM, 27157636c9a6SManikanta Pubbisetty }, 27167636c9a6SManikanta Pubbisetty { 27177636c9a6SManikanta Pubbisetty .tcl_ring_num = 1, 27187636c9a6SManikanta Pubbisetty .wbm_ring_num = 1, 27197636c9a6SManikanta Pubbisetty .rbm_id = HAL_RX_BUF_RBM_SW1_BM, 27207636c9a6SManikanta Pubbisetty }, 27217636c9a6SManikanta Pubbisetty { 27227636c9a6SManikanta Pubbisetty .tcl_ring_num = 2, 27237636c9a6SManikanta Pubbisetty .wbm_ring_num = 2, 27247636c9a6SManikanta Pubbisetty .rbm_id = HAL_RX_BUF_RBM_SW2_BM, 27257636c9a6SManikanta Pubbisetty }, 27267636c9a6SManikanta Pubbisetty }; 27277636c9a6SManikanta Pubbisetty 27287636c9a6SManikanta Pubbisetty static const struct ath11k_hw_tcl2wbm_rbm_map ath11k_hw_tcl2wbm_rbm_map_wcn6750[] = { 27297636c9a6SManikanta Pubbisetty { 27307636c9a6SManikanta Pubbisetty .tcl_ring_num = 0, 27317636c9a6SManikanta Pubbisetty .wbm_ring_num = 0, 27327636c9a6SManikanta Pubbisetty .rbm_id = HAL_RX_BUF_RBM_SW0_BM, 27337636c9a6SManikanta Pubbisetty }, 27347636c9a6SManikanta Pubbisetty { 27357636c9a6SManikanta Pubbisetty .tcl_ring_num = 1, 27367636c9a6SManikanta Pubbisetty .wbm_ring_num = 4, 27377636c9a6SManikanta Pubbisetty .rbm_id = HAL_RX_BUF_RBM_SW4_BM, 27387636c9a6SManikanta Pubbisetty }, 27397636c9a6SManikanta Pubbisetty { 27407636c9a6SManikanta Pubbisetty .tcl_ring_num = 2, 27417636c9a6SManikanta Pubbisetty .wbm_ring_num = 2, 27427636c9a6SManikanta Pubbisetty .rbm_id = HAL_RX_BUF_RBM_SW2_BM, 27437636c9a6SManikanta Pubbisetty }, 27447636c9a6SManikanta Pubbisetty }; 27457636c9a6SManikanta Pubbisetty 2746711b80acSSriram R const struct ath11k_hw_regs ipq5018_regs = { 2747711b80acSSriram R /* SW2TCL(x) R0 ring configuration address */ 2748711b80acSSriram R .hal_tcl1_ring_base_lsb = 0x00000694, 2749711b80acSSriram R .hal_tcl1_ring_base_msb = 0x00000698, 2750711b80acSSriram R .hal_tcl1_ring_id = 0x0000069c, 2751711b80acSSriram R .hal_tcl1_ring_misc = 0x000006a4, 2752711b80acSSriram R .hal_tcl1_ring_tp_addr_lsb = 0x000006b0, 2753711b80acSSriram R .hal_tcl1_ring_tp_addr_msb = 0x000006b4, 2754711b80acSSriram R .hal_tcl1_ring_consumer_int_setup_ix0 = 0x000006c4, 2755711b80acSSriram R .hal_tcl1_ring_consumer_int_setup_ix1 = 0x000006c8, 2756711b80acSSriram R .hal_tcl1_ring_msi1_base_lsb = 0x000006dc, 2757711b80acSSriram R .hal_tcl1_ring_msi1_base_msb = 0x000006e0, 2758711b80acSSriram R .hal_tcl1_ring_msi1_data = 0x000006e4, 2759711b80acSSriram R .hal_tcl2_ring_base_lsb = 0x000006ec, 2760711b80acSSriram R .hal_tcl_ring_base_lsb = 0x0000079c, 2761711b80acSSriram R 2762711b80acSSriram R /* TCL STATUS ring address */ 2763711b80acSSriram R .hal_tcl_status_ring_base_lsb = 0x000008a4, 2764711b80acSSriram R 2765711b80acSSriram R /* REO2SW(x) R0 ring configuration address */ 2766711b80acSSriram R .hal_reo1_ring_base_lsb = 0x000001ec, 2767711b80acSSriram R .hal_reo1_ring_base_msb = 0x000001f0, 2768711b80acSSriram R .hal_reo1_ring_id = 0x000001f4, 2769711b80acSSriram R .hal_reo1_ring_misc = 0x000001fc, 2770711b80acSSriram R .hal_reo1_ring_hp_addr_lsb = 0x00000200, 2771711b80acSSriram R .hal_reo1_ring_hp_addr_msb = 0x00000204, 2772711b80acSSriram R .hal_reo1_ring_producer_int_setup = 0x00000210, 2773711b80acSSriram R .hal_reo1_ring_msi1_base_lsb = 0x00000234, 2774711b80acSSriram R .hal_reo1_ring_msi1_base_msb = 0x00000238, 2775711b80acSSriram R .hal_reo1_ring_msi1_data = 0x0000023c, 2776711b80acSSriram R .hal_reo2_ring_base_lsb = 0x00000244, 2777711b80acSSriram R .hal_reo1_aging_thresh_ix_0 = 0x00000564, 2778711b80acSSriram R .hal_reo1_aging_thresh_ix_1 = 0x00000568, 2779711b80acSSriram R .hal_reo1_aging_thresh_ix_2 = 0x0000056c, 2780711b80acSSriram R .hal_reo1_aging_thresh_ix_3 = 0x00000570, 2781711b80acSSriram R 2782711b80acSSriram R /* REO2SW(x) R2 ring pointers (head/tail) address */ 2783711b80acSSriram R .hal_reo1_ring_hp = 0x00003028, 2784711b80acSSriram R .hal_reo1_ring_tp = 0x0000302c, 2785711b80acSSriram R .hal_reo2_ring_hp = 0x00003030, 2786711b80acSSriram R 2787711b80acSSriram R /* REO2TCL R0 ring configuration address */ 2788711b80acSSriram R .hal_reo_tcl_ring_base_lsb = 0x000003fc, 2789711b80acSSriram R .hal_reo_tcl_ring_hp = 0x00003058, 2790711b80acSSriram R 2791711b80acSSriram R /* SW2REO ring address */ 2792711b80acSSriram R .hal_sw2reo_ring_base_lsb = 0x0000013c, 2793711b80acSSriram R .hal_sw2reo_ring_hp = 0x00003018, 2794711b80acSSriram R 2795711b80acSSriram R /* REO CMD ring address */ 2796711b80acSSriram R .hal_reo_cmd_ring_base_lsb = 0x000000e4, 2797711b80acSSriram R .hal_reo_cmd_ring_hp = 0x00003010, 2798711b80acSSriram R 2799711b80acSSriram R /* REO status address */ 2800711b80acSSriram R .hal_reo_status_ring_base_lsb = 0x00000504, 2801711b80acSSriram R .hal_reo_status_hp = 0x00003070, 2802711b80acSSriram R 2803711b80acSSriram R /* WCSS relative address */ 2804711b80acSSriram R .hal_seq_wcss_umac_ce0_src_reg = 0x08400000 2805711b80acSSriram R - HAL_IPQ5018_CE_WFSS_REG_BASE, 2806711b80acSSriram R .hal_seq_wcss_umac_ce0_dst_reg = 0x08401000 2807711b80acSSriram R - HAL_IPQ5018_CE_WFSS_REG_BASE, 2808711b80acSSriram R .hal_seq_wcss_umac_ce1_src_reg = 0x08402000 2809711b80acSSriram R - HAL_IPQ5018_CE_WFSS_REG_BASE, 2810711b80acSSriram R .hal_seq_wcss_umac_ce1_dst_reg = 0x08403000 2811711b80acSSriram R - HAL_IPQ5018_CE_WFSS_REG_BASE, 2812711b80acSSriram R 2813711b80acSSriram R /* WBM Idle address */ 2814711b80acSSriram R .hal_wbm_idle_link_ring_base_lsb = 0x00000874, 2815711b80acSSriram R .hal_wbm_idle_link_ring_misc = 0x00000884, 2816711b80acSSriram R 2817711b80acSSriram R /* SW2WBM release address */ 2818711b80acSSriram R .hal_wbm_release_ring_base_lsb = 0x000001ec, 2819711b80acSSriram R 2820711b80acSSriram R /* WBM2SW release address */ 2821711b80acSSriram R .hal_wbm0_release_ring_base_lsb = 0x00000924, 2822711b80acSSriram R .hal_wbm1_release_ring_base_lsb = 0x0000097c, 2823711b80acSSriram R }; 2824711b80acSSriram R 2825734223d7SBaochen Qiang const struct ath11k_hw_hal_params ath11k_hw_hal_params_ipq8074 = { 2826734223d7SBaochen Qiang .rx_buf_rbm = HAL_RX_BUF_RBM_SW3_BM, 28277636c9a6SManikanta Pubbisetty .tcl2wbm_rbm_map = ath11k_hw_tcl2wbm_rbm_map_ipq8074, 2828734223d7SBaochen Qiang }; 2829734223d7SBaochen Qiang 2830734223d7SBaochen Qiang const struct ath11k_hw_hal_params ath11k_hw_hal_params_qca6390 = { 2831734223d7SBaochen Qiang .rx_buf_rbm = HAL_RX_BUF_RBM_SW1_BM, 28327636c9a6SManikanta Pubbisetty .tcl2wbm_rbm_map = ath11k_hw_tcl2wbm_rbm_map_ipq8074, 28337636c9a6SManikanta Pubbisetty }; 28347636c9a6SManikanta Pubbisetty 28357636c9a6SManikanta Pubbisetty const struct ath11k_hw_hal_params ath11k_hw_hal_params_wcn6750 = { 28367636c9a6SManikanta Pubbisetty .rx_buf_rbm = HAL_RX_BUF_RBM_SW1_BM, 28377636c9a6SManikanta Pubbisetty .tcl2wbm_rbm_map = ath11k_hw_tcl2wbm_rbm_map_wcn6750, 2838734223d7SBaochen Qiang }; 2839652f69edSBaochen Qiang 2840652f69edSBaochen Qiang static const struct cfg80211_sar_freq_ranges ath11k_hw_sar_freq_ranges_wcn6855[] = { 2841652f69edSBaochen Qiang {.start_freq = 2402, .end_freq = 2482 }, /* 2G ch1~ch13 */ 2842652f69edSBaochen Qiang {.start_freq = 5150, .end_freq = 5250 }, /* 5G UNII-1 ch32~ch48 */ 2843652f69edSBaochen Qiang {.start_freq = 5250, .end_freq = 5725 }, /* 5G UNII-2 ch50~ch144 */ 2844652f69edSBaochen Qiang {.start_freq = 5725, .end_freq = 5810 }, /* 5G UNII-3 ch149~ch161 */ 2845652f69edSBaochen Qiang {.start_freq = 5815, .end_freq = 5895 }, /* 5G UNII-4 ch163~ch177 */ 2846652f69edSBaochen Qiang {.start_freq = 5925, .end_freq = 6165 }, /* 6G UNII-5 Ch1, Ch2 ~ Ch41 */ 2847652f69edSBaochen Qiang {.start_freq = 6165, .end_freq = 6425 }, /* 6G UNII-5 ch45~ch93 */ 2848652f69edSBaochen Qiang {.start_freq = 6425, .end_freq = 6525 }, /* 6G UNII-6 ch97~ch113 */ 2849652f69edSBaochen Qiang {.start_freq = 6525, .end_freq = 6705 }, /* 6G UNII-7 ch117~ch149 */ 2850652f69edSBaochen Qiang {.start_freq = 6705, .end_freq = 6875 }, /* 6G UNII-7 ch153~ch185 */ 2851652f69edSBaochen Qiang {.start_freq = 6875, .end_freq = 7125 }, /* 6G UNII-8 ch189~ch233 */ 2852652f69edSBaochen Qiang }; 2853652f69edSBaochen Qiang 2854652f69edSBaochen Qiang const struct cfg80211_sar_capa ath11k_hw_sar_capa_wcn6855 = { 2855652f69edSBaochen Qiang .type = NL80211_SAR_TYPE_POWER, 2856652f69edSBaochen Qiang .num_freq_ranges = (ARRAY_SIZE(ath11k_hw_sar_freq_ranges_wcn6855)), 2857652f69edSBaochen Qiang .freq_ranges = ath11k_hw_sar_freq_ranges_wcn6855, 2858652f69edSBaochen Qiang }; 2859