blob: 760c22bbdf70fc8596e93e979fbd1273319bf11a [file] [log] [blame]
Alex Elder1ed7d0c02020-03-05 22:28:18 -06001// SPDX-License-Identifier: GPL-2.0
2
3/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
Alex Elder47f71d62021-03-26 10:11:13 -05004 * Copyright (C) 2019-2021 Linaro Ltd.
Alex Elder1ed7d0c02020-03-05 22:28:18 -06005 */
6
7#include <linux/log2.h>
8
9#include "gsi.h"
10#include "ipa_data.h"
11#include "ipa_endpoint.h"
12#include "ipa_mem.h"
13
Alex Elderfc566da2021-03-28 12:31:08 -050014/** enum ipa_resource_type - IPA resource types for an SoC having IPA v3.5.1 */
Alex Eldercf9a10b2021-03-26 10:11:17 -050015enum ipa_resource_type {
16 /* Source resource types; first must have value 0 */
17 IPA_RESOURCE_TYPE_SRC_PKT_CONTEXTS = 0,
18 IPA_RESOURCE_TYPE_SRC_DESCRIPTOR_LISTS,
19 IPA_RESOURCE_TYPE_SRC_DESCRIPTOR_BUFF,
20 IPA_RESOURCE_TYPE_SRC_HPS_DMARS,
21 IPA_RESOURCE_TYPE_SRC_ACK_ENTRIES,
22
23 /* Destination resource types; first must have value 0 */
24 IPA_RESOURCE_TYPE_DST_DATA_SECTORS = 0,
25 IPA_RESOURCE_TYPE_DST_DPS_DMARS,
26};
27
Alex Elderfc566da2021-03-28 12:31:08 -050028/* Resource groups used for an SoC having IPA v3.5.1 */
Alex Elder47f71d62021-03-26 10:11:13 -050029enum ipa_rsrc_group_id {
30 /* Source resource group identifiers */
31 IPA_RSRC_GROUP_SRC_LWA_DL = 0,
32 IPA_RSRC_GROUP_SRC_UL_DL,
33 IPA_RSRC_GROUP_SRC_MHI_DMA,
34 IPA_RSRC_GROUP_SRC_UC_RX_Q,
Alex Elder4fd704b2021-03-26 10:11:21 -050035 IPA_RSRC_GROUP_SRC_COUNT, /* Last in set; not a source group */
Alex Elder47f71d62021-03-26 10:11:13 -050036
37 /* Destination resource group identifiers */
38 IPA_RSRC_GROUP_DST_LWA_DL = 0,
39 IPA_RSRC_GROUP_DST_UL_DL_DPL,
40 IPA_RSRC_GROUP_DST_UNUSED_2,
Alex Elder4fd704b2021-03-26 10:11:21 -050041 IPA_RSRC_GROUP_DST_COUNT, /* Last; not a destination group */
Alex Elder47f71d62021-03-26 10:11:13 -050042};
43
Alex Elderfc566da2021-03-28 12:31:08 -050044/* QSB configuration data for an SoC having IPA v3.5.1 */
Alex Elder37537fa2021-03-19 10:24:22 -050045static const struct ipa_qsb_data ipa_qsb_data[] = {
46 [IPA_QSB_MASTER_DDR] = {
47 .max_writes = 8,
48 .max_reads = 8,
49 },
50 [IPA_QSB_MASTER_PCIE] = {
51 .max_writes = 4,
52 .max_reads = 12,
53 },
54};
55
Alex Elderfc566da2021-03-28 12:31:08 -050056/* Endpoint datdata for an SoC having IPA v3.5.1 */
Alex Elder1ed7d0c02020-03-05 22:28:18 -060057static const struct ipa_gsi_endpoint_data ipa_gsi_endpoint_data[] = {
58 [IPA_ENDPOINT_AP_COMMAND_TX] = {
59 .ee_id = GSI_EE_AP,
60 .channel_id = 4,
61 .endpoint_id = 5,
62 .toward_ipa = true,
63 .channel = {
64 .tre_count = 512,
65 .event_count = 256,
66 .tlv_count = 20,
67 },
68 .endpoint = {
Alex Elder1ed7d0c02020-03-05 22:28:18 -060069 .config = {
Alex Elder47f71d62021-03-26 10:11:13 -050070 .resource_group = IPA_RSRC_GROUP_SRC_UL_DL,
Alex Elder1ed7d0c02020-03-05 22:28:18 -060071 .dma_mode = true,
72 .dma_endpoint = IPA_ENDPOINT_AP_LAN_RX,
Alex Elder1690d8a2021-03-20 10:57:06 -050073 .tx = {
74 .seq_type = IPA_SEQ_DMA,
75 },
Alex Elder1ed7d0c02020-03-05 22:28:18 -060076 },
77 },
78 },
79 [IPA_ENDPOINT_AP_LAN_RX] = {
80 .ee_id = GSI_EE_AP,
81 .channel_id = 5,
82 .endpoint_id = 9,
83 .toward_ipa = false,
84 .channel = {
85 .tre_count = 256,
86 .event_count = 256,
87 .tlv_count = 8,
88 },
89 .endpoint = {
Alex Elder1ed7d0c02020-03-05 22:28:18 -060090 .config = {
Alex Elder47f71d62021-03-26 10:11:13 -050091 .resource_group = IPA_RSRC_GROUP_DST_UL_DL_DPL,
Alex Elder1ed7d0c02020-03-05 22:28:18 -060092 .aggregation = true,
93 .status_enable = true,
94 .rx = {
95 .pad_align = ilog2(sizeof(u32)),
96 },
97 },
98 },
99 },
100 [IPA_ENDPOINT_AP_MODEM_TX] = {
101 .ee_id = GSI_EE_AP,
102 .channel_id = 3,
103 .endpoint_id = 2,
104 .toward_ipa = true,
105 .channel = {
106 .tre_count = 512,
107 .event_count = 512,
108 .tlv_count = 16,
109 },
110 .endpoint = {
111 .filter_support = true,
Alex Elder1ed7d0c02020-03-05 22:28:18 -0600112 .config = {
Alex Elder47f71d62021-03-26 10:11:13 -0500113 .resource_group = IPA_RSRC_GROUP_SRC_UL_DL,
Alex Elder1ed7d0c02020-03-05 22:28:18 -0600114 .checksum = true,
115 .qmap = true,
116 .status_enable = true,
117 .tx = {
Alex Elder1690d8a2021-03-20 10:57:06 -0500118 .seq_type = IPA_SEQ_2_PASS_SKIP_LAST_UC,
Alex Elder49e76a42021-04-09 13:07:17 -0500119 .seq_rep_type = IPA_SEQ_REP_DMA_PARSER,
Alex Elder1ed7d0c02020-03-05 22:28:18 -0600120 .status_endpoint =
121 IPA_ENDPOINT_MODEM_AP_RX,
Alex Elder1ed7d0c02020-03-05 22:28:18 -0600122 },
123 },
124 },
125 },
126 [IPA_ENDPOINT_AP_MODEM_RX] = {
127 .ee_id = GSI_EE_AP,
128 .channel_id = 6,
129 .endpoint_id = 10,
130 .toward_ipa = false,
131 .channel = {
132 .tre_count = 256,
133 .event_count = 256,
134 .tlv_count = 8,
135 },
136 .endpoint = {
Alex Elder1ed7d0c02020-03-05 22:28:18 -0600137 .config = {
Alex Elder47f71d62021-03-26 10:11:13 -0500138 .resource_group = IPA_RSRC_GROUP_DST_UL_DL_DPL,
Alex Elder1ed7d0c02020-03-05 22:28:18 -0600139 .checksum = true,
140 .qmap = true,
141 .aggregation = true,
142 .rx = {
143 .aggr_close_eof = true,
144 },
145 },
146 },
147 },
Alex Elder1ed7d0c02020-03-05 22:28:18 -0600148 [IPA_ENDPOINT_MODEM_LAN_TX] = {
149 .ee_id = GSI_EE_MODEM,
150 .channel_id = 0,
151 .endpoint_id = 3,
152 .toward_ipa = true,
153 .endpoint = {
154 .filter_support = true,
155 },
156 },
Alex Elder1ed7d0c02020-03-05 22:28:18 -0600157 [IPA_ENDPOINT_MODEM_AP_TX] = {
158 .ee_id = GSI_EE_MODEM,
159 .channel_id = 4,
160 .endpoint_id = 6,
161 .toward_ipa = true,
162 .endpoint = {
163 .filter_support = true,
164 },
165 },
166 [IPA_ENDPOINT_MODEM_AP_RX] = {
167 .ee_id = GSI_EE_MODEM,
168 .channel_id = 2,
169 .endpoint_id = 12,
170 .toward_ipa = false,
171 },
172};
173
Alex Elderfc566da2021-03-28 12:31:08 -0500174/* Source resource configuration data for an SoC having IPA v3.5.1 */
Alex Elder7336ce12021-03-26 10:11:19 -0500175static const struct ipa_resource ipa_resource_src[] = {
Alex Elder4bcfb352021-03-26 10:11:16 -0500176 [IPA_RESOURCE_TYPE_SRC_PKT_CONTEXTS] = {
Alex Elder47f71d62021-03-26 10:11:13 -0500177 .limits[IPA_RSRC_GROUP_SRC_LWA_DL] = {
Alex Eldercf9a10b2021-03-26 10:11:17 -0500178 .min = 1, .max = 255,
Alex Elder1ed7d0c02020-03-05 22:28:18 -0600179 },
Alex Elder47f71d62021-03-26 10:11:13 -0500180 .limits[IPA_RSRC_GROUP_SRC_UL_DL] = {
Alex Eldercf9a10b2021-03-26 10:11:17 -0500181 .min = 1, .max = 255,
Alex Elder1ed7d0c02020-03-05 22:28:18 -0600182 },
Alex Elder9ab7e722021-03-26 10:11:14 -0500183 .limits[IPA_RSRC_GROUP_SRC_UC_RX_Q] = {
Alex Eldercf9a10b2021-03-26 10:11:17 -0500184 .min = 1, .max = 63,
Alex Elder9ab7e722021-03-26 10:11:14 -0500185 },
Alex Elder1ed7d0c02020-03-05 22:28:18 -0600186 },
Alex Elder4bcfb352021-03-26 10:11:16 -0500187 [IPA_RESOURCE_TYPE_SRC_DESCRIPTOR_LISTS] = {
Alex Elder47f71d62021-03-26 10:11:13 -0500188 .limits[IPA_RSRC_GROUP_SRC_LWA_DL] = {
Alex Eldercf9a10b2021-03-26 10:11:17 -0500189 .min = 10, .max = 10,
Alex Elder1ed7d0c02020-03-05 22:28:18 -0600190 },
Alex Elder47f71d62021-03-26 10:11:13 -0500191 .limits[IPA_RSRC_GROUP_SRC_UL_DL] = {
Alex Eldercf9a10b2021-03-26 10:11:17 -0500192 .min = 10, .max = 10,
Alex Elder1ed7d0c02020-03-05 22:28:18 -0600193 },
Alex Elder9ab7e722021-03-26 10:11:14 -0500194 .limits[IPA_RSRC_GROUP_SRC_UC_RX_Q] = {
Alex Eldercf9a10b2021-03-26 10:11:17 -0500195 .min = 8, .max = 8,
Alex Elder9ab7e722021-03-26 10:11:14 -0500196 },
Alex Elder1ed7d0c02020-03-05 22:28:18 -0600197 },
Alex Elder4bcfb352021-03-26 10:11:16 -0500198 [IPA_RESOURCE_TYPE_SRC_DESCRIPTOR_BUFF] = {
Alex Elder47f71d62021-03-26 10:11:13 -0500199 .limits[IPA_RSRC_GROUP_SRC_LWA_DL] = {
Alex Eldercf9a10b2021-03-26 10:11:17 -0500200 .min = 12, .max = 12,
Alex Elder1ed7d0c02020-03-05 22:28:18 -0600201 },
Alex Elder47f71d62021-03-26 10:11:13 -0500202 .limits[IPA_RSRC_GROUP_SRC_UL_DL] = {
Alex Eldercf9a10b2021-03-26 10:11:17 -0500203 .min = 14, .max = 14,
Alex Elder1ed7d0c02020-03-05 22:28:18 -0600204 },
Alex Elder9ab7e722021-03-26 10:11:14 -0500205 .limits[IPA_RSRC_GROUP_SRC_UC_RX_Q] = {
Alex Eldercf9a10b2021-03-26 10:11:17 -0500206 .min = 8, .max = 8,
Alex Elder9ab7e722021-03-26 10:11:14 -0500207 },
Alex Elder1ed7d0c02020-03-05 22:28:18 -0600208 },
Alex Elder4bcfb352021-03-26 10:11:16 -0500209 [IPA_RESOURCE_TYPE_SRC_HPS_DMARS] = {
Alex Elder47f71d62021-03-26 10:11:13 -0500210 .limits[IPA_RSRC_GROUP_SRC_LWA_DL] = {
Alex Eldercf9a10b2021-03-26 10:11:17 -0500211 .min = 0, .max = 63,
Alex Elder1ed7d0c02020-03-05 22:28:18 -0600212 },
Alex Elder47f71d62021-03-26 10:11:13 -0500213 .limits[IPA_RSRC_GROUP_SRC_UL_DL] = {
Alex Eldercf9a10b2021-03-26 10:11:17 -0500214 .min = 0, .max = 63,
Alex Elder1ed7d0c02020-03-05 22:28:18 -0600215 },
Alex Elder9ab7e722021-03-26 10:11:14 -0500216 .limits[IPA_RSRC_GROUP_SRC_MHI_DMA] = {
Alex Eldercf9a10b2021-03-26 10:11:17 -0500217 .min = 0, .max = 63,
Alex Elder9ab7e722021-03-26 10:11:14 -0500218 },
219 .limits[IPA_RSRC_GROUP_SRC_UC_RX_Q] = {
Alex Eldercf9a10b2021-03-26 10:11:17 -0500220 .min = 0, .max = 63,
Alex Elder9ab7e722021-03-26 10:11:14 -0500221 },
Alex Elder1ed7d0c02020-03-05 22:28:18 -0600222 },
Alex Elder4bcfb352021-03-26 10:11:16 -0500223 [IPA_RESOURCE_TYPE_SRC_ACK_ENTRIES] = {
Alex Elder47f71d62021-03-26 10:11:13 -0500224 .limits[IPA_RSRC_GROUP_SRC_LWA_DL] = {
Alex Eldercf9a10b2021-03-26 10:11:17 -0500225 .min = 14, .max = 14,
Alex Elder1ed7d0c02020-03-05 22:28:18 -0600226 },
Alex Elder47f71d62021-03-26 10:11:13 -0500227 .limits[IPA_RSRC_GROUP_SRC_UL_DL] = {
Alex Eldercf9a10b2021-03-26 10:11:17 -0500228 .min = 20, .max = 20,
Alex Elder1ed7d0c02020-03-05 22:28:18 -0600229 },
Alex Elder9ab7e722021-03-26 10:11:14 -0500230 .limits[IPA_RSRC_GROUP_SRC_UC_RX_Q] = {
Alex Eldercf9a10b2021-03-26 10:11:17 -0500231 .min = 14, .max = 14,
Alex Elder9ab7e722021-03-26 10:11:14 -0500232 },
Alex Elder1ed7d0c02020-03-05 22:28:18 -0600233 },
234};
235
Alex Elderfc566da2021-03-28 12:31:08 -0500236/* Destination resource configuration data for an SoC having IPA v3.5.1 */
Alex Elder7336ce12021-03-26 10:11:19 -0500237static const struct ipa_resource ipa_resource_dst[] = {
Alex Elder4bcfb352021-03-26 10:11:16 -0500238 [IPA_RESOURCE_TYPE_DST_DATA_SECTORS] = {
Alex Elder47f71d62021-03-26 10:11:13 -0500239 .limits[IPA_RSRC_GROUP_DST_LWA_DL] = {
Alex Eldercf9a10b2021-03-26 10:11:17 -0500240 .min = 4, .max = 4,
Alex Elder1ed7d0c02020-03-05 22:28:18 -0600241 },
242 .limits[1] = {
Alex Eldercf9a10b2021-03-26 10:11:17 -0500243 .min = 4, .max = 4,
Alex Elder1ed7d0c02020-03-05 22:28:18 -0600244 },
Alex Elder9ab7e722021-03-26 10:11:14 -0500245 .limits[IPA_RSRC_GROUP_DST_UNUSED_2] = {
Alex Eldercf9a10b2021-03-26 10:11:17 -0500246 .min = 3, .max = 3,
Alex Elder9ab7e722021-03-26 10:11:14 -0500247 }
Alex Elder1ed7d0c02020-03-05 22:28:18 -0600248 },
Alex Elder4bcfb352021-03-26 10:11:16 -0500249 [IPA_RESOURCE_TYPE_DST_DPS_DMARS] = {
Alex Elder47f71d62021-03-26 10:11:13 -0500250 .limits[IPA_RSRC_GROUP_DST_LWA_DL] = {
Alex Eldercf9a10b2021-03-26 10:11:17 -0500251 .min = 2, .max = 63,
Alex Elder1ed7d0c02020-03-05 22:28:18 -0600252 },
Alex Elder47f71d62021-03-26 10:11:13 -0500253 .limits[IPA_RSRC_GROUP_DST_UL_DL_DPL] = {
Alex Eldercf9a10b2021-03-26 10:11:17 -0500254 .min = 1, .max = 63,
Alex Elder1ed7d0c02020-03-05 22:28:18 -0600255 },
Alex Elder9ab7e722021-03-26 10:11:14 -0500256 .limits[IPA_RSRC_GROUP_DST_UNUSED_2] = {
Alex Eldercf9a10b2021-03-26 10:11:17 -0500257 .min = 1, .max = 2,
Alex Elder9ab7e722021-03-26 10:11:14 -0500258 }
Alex Elder1ed7d0c02020-03-05 22:28:18 -0600259 },
260};
261
Alex Elderfc566da2021-03-28 12:31:08 -0500262/* Resource configuration data for an SoC having IPA v3.5.1 */
Alex Elder1ed7d0c02020-03-05 22:28:18 -0600263static const struct ipa_resource_data ipa_resource_data = {
Alex Elder4fd704b2021-03-26 10:11:21 -0500264 .rsrc_group_src_count = IPA_RSRC_GROUP_SRC_COUNT,
265 .rsrc_group_dst_count = IPA_RSRC_GROUP_DST_COUNT,
Alex Elder1ed7d0c02020-03-05 22:28:18 -0600266 .resource_src_count = ARRAY_SIZE(ipa_resource_src),
267 .resource_src = ipa_resource_src,
268 .resource_dst_count = ARRAY_SIZE(ipa_resource_dst),
269 .resource_dst = ipa_resource_dst,
270};
271
Alex Elderfc566da2021-03-28 12:31:08 -0500272/* IPA-resident memory region data for an SoC having IPA v3.5.1 */
Alex Elder3128aae2020-05-04 12:58:57 -0500273static const struct ipa_mem ipa_mem_local_data[] = {
Alex Elderc61cfb92021-06-10 14:23:08 -0500274 {
Alex Elder14ab6a22021-06-09 17:34:54 -0500275 .id = IPA_MEM_UC_SHARED,
Alex Elder1ed7d0c02020-03-05 22:28:18 -0600276 .offset = 0x0000,
277 .size = 0x0080,
278 .canary_count = 0,
279 },
Alex Elderc61cfb92021-06-10 14:23:08 -0500280 {
Alex Elder14ab6a22021-06-09 17:34:54 -0500281 .id = IPA_MEM_UC_INFO,
Alex Elder1ed7d0c02020-03-05 22:28:18 -0600282 .offset = 0x0080,
283 .size = 0x0200,
284 .canary_count = 0,
285 },
Alex Elderc61cfb92021-06-10 14:23:08 -0500286 {
Alex Elder14ab6a22021-06-09 17:34:54 -0500287 .id = IPA_MEM_V4_FILTER_HASHED,
Alex Elder1ed7d0c02020-03-05 22:28:18 -0600288 .offset = 0x0288,
289 .size = 0x0078,
290 .canary_count = 2,
291 },
Alex Elderc61cfb92021-06-10 14:23:08 -0500292 {
Alex Elder14ab6a22021-06-09 17:34:54 -0500293 .id = IPA_MEM_V4_FILTER,
Alex Elder1ed7d0c02020-03-05 22:28:18 -0600294 .offset = 0x0308,
295 .size = 0x0078,
296 .canary_count = 2,
297 },
Alex Elderc61cfb92021-06-10 14:23:08 -0500298 {
Alex Elder14ab6a22021-06-09 17:34:54 -0500299 .id = IPA_MEM_V6_FILTER_HASHED,
Alex Elder1ed7d0c02020-03-05 22:28:18 -0600300 .offset = 0x0388,
301 .size = 0x0078,
302 .canary_count = 2,
303 },
Alex Elderc61cfb92021-06-10 14:23:08 -0500304 {
Alex Elder14ab6a22021-06-09 17:34:54 -0500305 .id = IPA_MEM_V6_FILTER,
Alex Elder1ed7d0c02020-03-05 22:28:18 -0600306 .offset = 0x0408,
307 .size = 0x0078,
308 .canary_count = 2,
309 },
Alex Elderc61cfb92021-06-10 14:23:08 -0500310 {
Alex Elder14ab6a22021-06-09 17:34:54 -0500311 .id = IPA_MEM_V4_ROUTE_HASHED,
Alex Elder1ed7d0c02020-03-05 22:28:18 -0600312 .offset = 0x0488,
313 .size = 0x0078,
314 .canary_count = 2,
315 },
Alex Elderc61cfb92021-06-10 14:23:08 -0500316 {
Alex Elder14ab6a22021-06-09 17:34:54 -0500317 .id = IPA_MEM_V4_ROUTE,
Alex Elder1ed7d0c02020-03-05 22:28:18 -0600318 .offset = 0x0508,
319 .size = 0x0078,
320 .canary_count = 2,
321 },
Alex Elderc61cfb92021-06-10 14:23:08 -0500322 {
Alex Elder14ab6a22021-06-09 17:34:54 -0500323 .id = IPA_MEM_V6_ROUTE_HASHED,
Alex Elder1ed7d0c02020-03-05 22:28:18 -0600324 .offset = 0x0588,
325 .size = 0x0078,
326 .canary_count = 2,
327 },
Alex Elderc61cfb92021-06-10 14:23:08 -0500328 {
Alex Elder14ab6a22021-06-09 17:34:54 -0500329 .id = IPA_MEM_V6_ROUTE,
Alex Elder1ed7d0c02020-03-05 22:28:18 -0600330 .offset = 0x0608,
331 .size = 0x0078,
332 .canary_count = 2,
333 },
Alex Elderc61cfb92021-06-10 14:23:08 -0500334 {
Alex Elder14ab6a22021-06-09 17:34:54 -0500335 .id = IPA_MEM_MODEM_HEADER,
Alex Elder1ed7d0c02020-03-05 22:28:18 -0600336 .offset = 0x0688,
337 .size = 0x0140,
338 .canary_count = 2,
339 },
Alex Elderc61cfb92021-06-10 14:23:08 -0500340 {
Alex Elder14ab6a22021-06-09 17:34:54 -0500341 .id = IPA_MEM_MODEM_PROC_CTX,
Alex Elder1ed7d0c02020-03-05 22:28:18 -0600342 .offset = 0x07d0,
343 .size = 0x0200,
344 .canary_count = 2,
345 },
Alex Elderc61cfb92021-06-10 14:23:08 -0500346 {
Alex Elder14ab6a22021-06-09 17:34:54 -0500347 .id = IPA_MEM_AP_PROC_CTX,
Alex Elder1ed7d0c02020-03-05 22:28:18 -0600348 .offset = 0x09d0,
349 .size = 0x0200,
350 .canary_count = 0,
351 },
Alex Elderc61cfb92021-06-10 14:23:08 -0500352 {
Alex Elder14ab6a22021-06-09 17:34:54 -0500353 .id = IPA_MEM_MODEM,
Alex Elder1ed7d0c02020-03-05 22:28:18 -0600354 .offset = 0x0bd8,
355 .size = 0x1024,
356 .canary_count = 0,
357 },
Alex Elderc61cfb92021-06-10 14:23:08 -0500358 {
Alex Elder14ab6a22021-06-09 17:34:54 -0500359 .id = IPA_MEM_UC_EVENT_RING,
Alex Elder1ed7d0c02020-03-05 22:28:18 -0600360 .offset = 0x1c00,
361 .size = 0x0400,
362 .canary_count = 1,
363 },
364};
365
Alex Elderfc566da2021-03-28 12:31:08 -0500366/* Memory configuration data for an SoC having IPA v3.5.1 */
Alex Eldere4a9f452021-03-19 10:24:18 -0500367static const struct ipa_mem_data ipa_mem_data = {
Alex Elder3128aae2020-05-04 12:58:57 -0500368 .local_count = ARRAY_SIZE(ipa_mem_local_data),
369 .local = ipa_mem_local_data,
Alex Elder3e313c32020-05-04 12:58:58 -0500370 .imem_addr = 0x146bd000,
371 .imem_size = 0x00002000,
Alex Eldera0036bb2020-05-04 12:58:59 -0500372 .smem_id = 497,
373 .smem_size = 0x00002000,
Alex Elder3128aae2020-05-04 12:58:57 -0500374};
375
Alex Elderea151e12021-01-15 06:50:50 -0600376/* Interconnect bandwidths are in 1000 byte/second units */
Alex Eldere4a9f452021-03-19 10:24:18 -0500377static const struct ipa_interconnect_data ipa_interconnect_data[] = {
Alex Elderea151e12021-01-15 06:50:50 -0600378 {
379 .name = "memory",
380 .peak_bandwidth = 600000, /* 600 MBps */
381 .average_bandwidth = 80000, /* 80 MBps */
382 },
383 /* Average bandwidth is unused for the next two interconnects */
384 {
385 .name = "imem",
386 .peak_bandwidth = 350000, /* 350 MBps */
387 .average_bandwidth = 0, /* unused */
388 },
389 {
390 .name = "config",
391 .peak_bandwidth = 40000, /* 40 MBps */
392 .average_bandwidth = 0, /* unused */
393 },
394};
395
Alex Elderfc566da2021-03-28 12:31:08 -0500396/* Clock and interconnect configuration data for an SoC having IPA v3.5.1 */
Alex Elder7aa0e8b2021-08-20 11:01:28 -0500397static const struct ipa_power_data ipa_power_data = {
Alex Elderf08c9922020-11-19 16:40:40 -0600398 .core_clock_rate = 75 * 1000 * 1000, /* Hz */
Alex Elderea151e12021-01-15 06:50:50 -0600399 .interconnect_count = ARRAY_SIZE(ipa_interconnect_data),
400 .interconnect_data = ipa_interconnect_data,
Alex Elderf08c9922020-11-19 16:40:40 -0600401};
402
Alex Elderfc566da2021-03-28 12:31:08 -0500403/* Configuration data for an SoC having IPA v3.5.1 */
404const struct ipa_data ipa_data_v3_5_1 = {
Alex Elder1ed7d0c02020-03-05 22:28:18 -0600405 .version = IPA_VERSION_3_5_1,
Alex Eldere695bed2021-03-28 12:31:06 -0500406 .backward_compat = BCR_CMDQ_L_LACK_ONE_ENTRY_FMASK |
407 BCR_TX_NOT_USING_BRESP_FMASK |
408 BCR_SUSPEND_L2_IRQ_FMASK |
409 BCR_HOLB_DROP_L2_IRQ_FMASK |
410 BCR_DUAL_TX_FMASK,
Alex Elder37537fa2021-03-19 10:24:22 -0500411 .qsb_count = ARRAY_SIZE(ipa_qsb_data),
412 .qsb_data = ipa_qsb_data,
Alex Elder1ed7d0c02020-03-05 22:28:18 -0600413 .endpoint_count = ARRAY_SIZE(ipa_gsi_endpoint_data),
414 .endpoint_data = ipa_gsi_endpoint_data,
415 .resource_data = &ipa_resource_data,
Alex Elder3128aae2020-05-04 12:58:57 -0500416 .mem_data = &ipa_mem_data,
Alex Elder7aa0e8b2021-08-20 11:01:28 -0500417 .power_data = &ipa_power_data,
Alex Elder1ed7d0c02020-03-05 22:28:18 -0600418};