1 // SPDX-License-Identifier: GPL-2.0
3 /* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
4 * Copyright (C) 2019-2020 Linaro Ltd.
7 #include <linux/log2.h>
11 #include "ipa_endpoint.h"
14 /* Endpoint configuration for the SDM845 SoC. */
15 static const struct ipa_gsi_endpoint_data ipa_gsi_endpoint_data[] = {
16 [IPA_ENDPOINT_AP_COMMAND_TX] = {
27 .seq_type = IPA_SEQ_DMA_ONLY,
30 .dma_endpoint = IPA_ENDPOINT_AP_LAN_RX,
34 [IPA_ENDPOINT_AP_LAN_RX] = {
45 .seq_type = IPA_SEQ_INVALID,
48 .status_enable = true,
50 .pad_align = ilog2(sizeof(u32)),
55 [IPA_ENDPOINT_AP_MODEM_TX] = {
66 .filter_support = true,
68 IPA_SEQ_2ND_PKT_PROCESS_PASS_NO_DEC_UCP,
72 .status_enable = true,
75 IPA_ENDPOINT_MODEM_AP_RX,
80 [IPA_ENDPOINT_AP_MODEM_RX] = {
91 .seq_type = IPA_SEQ_INVALID,
97 .aggr_close_eof = true,
102 [IPA_ENDPOINT_MODEM_COMMAND_TX] = {
103 .ee_id = GSI_EE_MODEM,
108 [IPA_ENDPOINT_MODEM_LAN_TX] = {
109 .ee_id = GSI_EE_MODEM,
114 .filter_support = true,
117 [IPA_ENDPOINT_MODEM_LAN_RX] = {
118 .ee_id = GSI_EE_MODEM,
123 [IPA_ENDPOINT_MODEM_AP_TX] = {
124 .ee_id = GSI_EE_MODEM,
129 .filter_support = true,
132 [IPA_ENDPOINT_MODEM_AP_RX] = {
133 .ee_id = GSI_EE_MODEM,
140 /* For the SDM845, resource groups are allocated this way:
144 static const struct ipa_resource_src ipa_resource_src[] = {
146 .type = IPA_RESOURCE_TYPE_SRC_PKT_CONTEXTS,
157 .type = IPA_RESOURCE_TYPE_SRC_DESCRIPTOR_LISTS,
168 .type = IPA_RESOURCE_TYPE_SRC_DESCRIPTOR_BUFF,
179 .type = IPA_RESOURCE_TYPE_SRC_HPS_DMARS,
190 .type = IPA_RESOURCE_TYPE_SRC_ACK_ENTRIES,
202 static const struct ipa_resource_dst ipa_resource_dst[] = {
204 .type = IPA_RESOURCE_TYPE_DST_DATA_SECTORS,
215 .type = IPA_RESOURCE_TYPE_DST_DPS_DMARS,
227 /* Resource configuration for the SDM845 SoC. */
228 static const struct ipa_resource_data ipa_resource_data = {
229 .resource_src_count = ARRAY_SIZE(ipa_resource_src),
230 .resource_src = ipa_resource_src,
231 .resource_dst_count = ARRAY_SIZE(ipa_resource_dst),
232 .resource_dst = ipa_resource_dst,
235 /* IPA-resident memory region configuration for the SDM845 SoC. */
236 static const struct ipa_mem ipa_mem_local_data[] = {
237 [IPA_MEM_UC_SHARED] = {
242 [IPA_MEM_UC_INFO] = {
247 [IPA_MEM_V4_FILTER_HASHED] = {
252 [IPA_MEM_V4_FILTER] = {
257 [IPA_MEM_V6_FILTER_HASHED] = {
262 [IPA_MEM_V6_FILTER] = {
267 [IPA_MEM_V4_ROUTE_HASHED] = {
272 [IPA_MEM_V4_ROUTE] = {
277 [IPA_MEM_V6_ROUTE_HASHED] = {
282 [IPA_MEM_V6_ROUTE] = {
287 [IPA_MEM_MODEM_HEADER] = {
292 [IPA_MEM_AP_HEADER] = {
297 [IPA_MEM_MODEM_PROC_CTX] = {
302 [IPA_MEM_AP_PROC_CTX] = {
312 [IPA_MEM_UC_EVENT_RING] = {
319 static struct ipa_mem_data ipa_mem_data = {
320 .local_count = ARRAY_SIZE(ipa_mem_local_data),
321 .local = ipa_mem_local_data,
322 .imem_addr = 0x146bd000,
323 .imem_size = 0x00002000,
325 .smem_size = 0x00002000,
328 /* Configuration data for the SDM845 SoC. */
329 const struct ipa_data ipa_data_sdm845 = {
330 .version = IPA_VERSION_3_5_1,
331 .endpoint_count = ARRAY_SIZE(ipa_gsi_endpoint_data),
332 .endpoint_data = ipa_gsi_endpoint_data,
333 .resource_data = &ipa_resource_data,
334 .mem_data = &ipa_mem_data,