12c7b9b93SAlex Elder // SPDX-License-Identifier: GPL-2.0 22c7b9b93SAlex Elder 32c7b9b93SAlex Elder /* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. 42c7b9b93SAlex Elder * Copyright (C) 2019-2021 Linaro Ltd. 52c7b9b93SAlex Elder */ 62c7b9b93SAlex Elder 72c7b9b93SAlex Elder #include <linux/log2.h> 82c7b9b93SAlex Elder 932d00f62SPaolo Abeni #include "../gsi.h" 1032d00f62SPaolo Abeni #include "../ipa_data.h" 1132d00f62SPaolo Abeni #include "../ipa_endpoint.h" 1232d00f62SPaolo Abeni #include "../ipa_mem.h" 132c7b9b93SAlex Elder 142c7b9b93SAlex Elder /** enum ipa_resource_type - IPA resource types for an SoC having IPA v3.5.1 */ 152c7b9b93SAlex Elder enum ipa_resource_type { 162c7b9b93SAlex Elder /* Source resource types; first must have value 0 */ 172c7b9b93SAlex Elder IPA_RESOURCE_TYPE_SRC_PKT_CONTEXTS = 0, 182c7b9b93SAlex Elder IPA_RESOURCE_TYPE_SRC_DESCRIPTOR_LISTS, 192c7b9b93SAlex Elder IPA_RESOURCE_TYPE_SRC_DESCRIPTOR_BUFF, 202c7b9b93SAlex Elder IPA_RESOURCE_TYPE_SRC_HPS_DMARS, 212c7b9b93SAlex Elder IPA_RESOURCE_TYPE_SRC_ACK_ENTRIES, 222c7b9b93SAlex Elder 232c7b9b93SAlex Elder /* Destination resource types; first must have value 0 */ 242c7b9b93SAlex Elder IPA_RESOURCE_TYPE_DST_DATA_SECTORS = 0, 252c7b9b93SAlex Elder IPA_RESOURCE_TYPE_DST_DPS_DMARS, 262c7b9b93SAlex Elder }; 272c7b9b93SAlex Elder 282c7b9b93SAlex Elder /* Resource groups used for an SoC having IPA v3.5.1 */ 292c7b9b93SAlex Elder enum ipa_rsrc_group_id { 302c7b9b93SAlex Elder /* Source resource group identifiers */ 312c7b9b93SAlex Elder IPA_RSRC_GROUP_SRC_LWA_DL = 0, 322c7b9b93SAlex Elder IPA_RSRC_GROUP_SRC_UL_DL, 332c7b9b93SAlex Elder IPA_RSRC_GROUP_SRC_MHI_DMA, 342c7b9b93SAlex Elder IPA_RSRC_GROUP_SRC_UC_RX_Q, 352c7b9b93SAlex Elder IPA_RSRC_GROUP_SRC_COUNT, /* Last in set; not a source group */ 362c7b9b93SAlex Elder 372c7b9b93SAlex Elder /* Destination resource group identifiers */ 382c7b9b93SAlex Elder IPA_RSRC_GROUP_DST_LWA_DL = 0, 392c7b9b93SAlex Elder IPA_RSRC_GROUP_DST_UL_DL_DPL, 402c7b9b93SAlex Elder IPA_RSRC_GROUP_DST_UNUSED_2, 412c7b9b93SAlex Elder IPA_RSRC_GROUP_DST_COUNT, /* Last; not a destination group */ 422c7b9b93SAlex Elder }; 432c7b9b93SAlex Elder 442c7b9b93SAlex Elder /* QSB configuration data for an SoC having IPA v3.5.1 */ 452c7b9b93SAlex Elder static const struct ipa_qsb_data ipa_qsb_data[] = { 462c7b9b93SAlex Elder [IPA_QSB_MASTER_DDR] = { 472c7b9b93SAlex Elder .max_writes = 8, 482c7b9b93SAlex Elder .max_reads = 8, 492c7b9b93SAlex Elder }, 502c7b9b93SAlex Elder [IPA_QSB_MASTER_PCIE] = { 512c7b9b93SAlex Elder .max_writes = 4, 522c7b9b93SAlex Elder .max_reads = 12, 532c7b9b93SAlex Elder }, 542c7b9b93SAlex Elder }; 552c7b9b93SAlex Elder 562c7b9b93SAlex Elder /* Endpoint datdata for an SoC having IPA v3.5.1 */ 572c7b9b93SAlex Elder static const struct ipa_gsi_endpoint_data ipa_gsi_endpoint_data[] = { 582c7b9b93SAlex Elder [IPA_ENDPOINT_AP_COMMAND_TX] = { 592c7b9b93SAlex Elder .ee_id = GSI_EE_AP, 602c7b9b93SAlex Elder .channel_id = 4, 612c7b9b93SAlex Elder .endpoint_id = 5, 622c7b9b93SAlex Elder .toward_ipa = true, 632c7b9b93SAlex Elder .channel = { 642c7b9b93SAlex Elder .tre_count = 512, 652c7b9b93SAlex Elder .event_count = 256, 662c7b9b93SAlex Elder .tlv_count = 20, 672c7b9b93SAlex Elder }, 682c7b9b93SAlex Elder .endpoint = { 692c7b9b93SAlex Elder .config = { 702c7b9b93SAlex Elder .resource_group = IPA_RSRC_GROUP_SRC_UL_DL, 712c7b9b93SAlex Elder .dma_mode = true, 722c7b9b93SAlex Elder .dma_endpoint = IPA_ENDPOINT_AP_LAN_RX, 732c7b9b93SAlex Elder .tx = { 742c7b9b93SAlex Elder .seq_type = IPA_SEQ_DMA, 752c7b9b93SAlex Elder }, 762c7b9b93SAlex Elder }, 772c7b9b93SAlex Elder }, 782c7b9b93SAlex Elder }, 792c7b9b93SAlex Elder [IPA_ENDPOINT_AP_LAN_RX] = { 802c7b9b93SAlex Elder .ee_id = GSI_EE_AP, 812c7b9b93SAlex Elder .channel_id = 5, 822c7b9b93SAlex Elder .endpoint_id = 9, 832c7b9b93SAlex Elder .toward_ipa = false, 842c7b9b93SAlex Elder .channel = { 852c7b9b93SAlex Elder .tre_count = 256, 862c7b9b93SAlex Elder .event_count = 256, 872c7b9b93SAlex Elder .tlv_count = 8, 882c7b9b93SAlex Elder }, 892c7b9b93SAlex Elder .endpoint = { 902c7b9b93SAlex Elder .config = { 912c7b9b93SAlex Elder .resource_group = IPA_RSRC_GROUP_DST_UL_DL_DPL, 922c7b9b93SAlex Elder .aggregation = true, 932c7b9b93SAlex Elder .status_enable = true, 942c7b9b93SAlex Elder .rx = { 952c7b9b93SAlex Elder .buffer_size = 8192, 962c7b9b93SAlex Elder .pad_align = ilog2(sizeof(u32)), 972c7b9b93SAlex Elder .aggr_time_limit = 500, 982c7b9b93SAlex Elder }, 992c7b9b93SAlex Elder }, 1002c7b9b93SAlex Elder }, 1012c7b9b93SAlex Elder }, 1022c7b9b93SAlex Elder [IPA_ENDPOINT_AP_MODEM_TX] = { 1032c7b9b93SAlex Elder .ee_id = GSI_EE_AP, 1042c7b9b93SAlex Elder .channel_id = 3, 1052c7b9b93SAlex Elder .endpoint_id = 2, 1062c7b9b93SAlex Elder .toward_ipa = true, 1072c7b9b93SAlex Elder .channel = { 1082c7b9b93SAlex Elder .tre_count = 512, 1092c7b9b93SAlex Elder .event_count = 512, 1102c7b9b93SAlex Elder .tlv_count = 16, 1112c7b9b93SAlex Elder }, 1122c7b9b93SAlex Elder .endpoint = { 1132c7b9b93SAlex Elder .filter_support = true, 1142c7b9b93SAlex Elder .config = { 1152c7b9b93SAlex Elder .resource_group = IPA_RSRC_GROUP_SRC_UL_DL, 1162c7b9b93SAlex Elder .checksum = true, 1172c7b9b93SAlex Elder .qmap = true, 1182c7b9b93SAlex Elder .status_enable = true, 1192c7b9b93SAlex Elder .tx = { 1202c7b9b93SAlex Elder .seq_type = IPA_SEQ_2_PASS_SKIP_LAST_UC, 1212c7b9b93SAlex Elder .seq_rep_type = IPA_SEQ_REP_DMA_PARSER, 1222c7b9b93SAlex Elder .status_endpoint = 1232c7b9b93SAlex Elder IPA_ENDPOINT_MODEM_AP_RX, 1242c7b9b93SAlex Elder }, 1252c7b9b93SAlex Elder }, 1262c7b9b93SAlex Elder }, 1272c7b9b93SAlex Elder }, 1282c7b9b93SAlex Elder [IPA_ENDPOINT_AP_MODEM_RX] = { 1292c7b9b93SAlex Elder .ee_id = GSI_EE_AP, 1302c7b9b93SAlex Elder .channel_id = 6, 1312c7b9b93SAlex Elder .endpoint_id = 10, 1322c7b9b93SAlex Elder .toward_ipa = false, 1332c7b9b93SAlex Elder .channel = { 1342c7b9b93SAlex Elder .tre_count = 256, 1352c7b9b93SAlex Elder .event_count = 256, 1362c7b9b93SAlex Elder .tlv_count = 8, 1372c7b9b93SAlex Elder }, 1382c7b9b93SAlex Elder .endpoint = { 1392c7b9b93SAlex Elder .config = { 1402c7b9b93SAlex Elder .resource_group = IPA_RSRC_GROUP_DST_UL_DL_DPL, 1412c7b9b93SAlex Elder .checksum = true, 1422c7b9b93SAlex Elder .qmap = true, 1432c7b9b93SAlex Elder .aggregation = true, 1442c7b9b93SAlex Elder .rx = { 1452c7b9b93SAlex Elder .buffer_size = 8192, 1462c7b9b93SAlex Elder .aggr_time_limit = 500, 1472c7b9b93SAlex Elder .aggr_close_eof = true, 1482c7b9b93SAlex Elder }, 1492c7b9b93SAlex Elder }, 1502c7b9b93SAlex Elder }, 1512c7b9b93SAlex Elder }, 1522c7b9b93SAlex Elder [IPA_ENDPOINT_MODEM_LAN_TX] = { 1532c7b9b93SAlex Elder .ee_id = GSI_EE_MODEM, 1542c7b9b93SAlex Elder .channel_id = 0, 1552c7b9b93SAlex Elder .endpoint_id = 3, 1562c7b9b93SAlex Elder .toward_ipa = true, 1572c7b9b93SAlex Elder .endpoint = { 1582c7b9b93SAlex Elder .filter_support = true, 1592c7b9b93SAlex Elder }, 1602c7b9b93SAlex Elder }, 1612c7b9b93SAlex Elder [IPA_ENDPOINT_MODEM_AP_TX] = { 1622c7b9b93SAlex Elder .ee_id = GSI_EE_MODEM, 1632c7b9b93SAlex Elder .channel_id = 4, 1642c7b9b93SAlex Elder .endpoint_id = 6, 1652c7b9b93SAlex Elder .toward_ipa = true, 1662c7b9b93SAlex Elder .endpoint = { 1672c7b9b93SAlex Elder .filter_support = true, 1682c7b9b93SAlex Elder }, 1692c7b9b93SAlex Elder }, 1702c7b9b93SAlex Elder [IPA_ENDPOINT_MODEM_AP_RX] = { 1712c7b9b93SAlex Elder .ee_id = GSI_EE_MODEM, 1722c7b9b93SAlex Elder .channel_id = 2, 1732c7b9b93SAlex Elder .endpoint_id = 12, 1742c7b9b93SAlex Elder .toward_ipa = false, 1752c7b9b93SAlex Elder }, 1762c7b9b93SAlex Elder }; 1772c7b9b93SAlex Elder 1782c7b9b93SAlex Elder /* Source resource configuration data for an SoC having IPA v3.5.1 */ 1792c7b9b93SAlex Elder static const struct ipa_resource ipa_resource_src[] = { 1802c7b9b93SAlex Elder [IPA_RESOURCE_TYPE_SRC_PKT_CONTEXTS] = { 1812c7b9b93SAlex Elder .limits[IPA_RSRC_GROUP_SRC_LWA_DL] = { 182f23a566bSCaleb Connolly .min = 1, .max = 63, 1832c7b9b93SAlex Elder }, 1842c7b9b93SAlex Elder .limits[IPA_RSRC_GROUP_SRC_UL_DL] = { 185f23a566bSCaleb Connolly .min = 1, .max = 63, 1862c7b9b93SAlex Elder }, 1872c7b9b93SAlex Elder .limits[IPA_RSRC_GROUP_SRC_UC_RX_Q] = { 1882c7b9b93SAlex Elder .min = 1, .max = 63, 1892c7b9b93SAlex Elder }, 1902c7b9b93SAlex Elder }, 1912c7b9b93SAlex Elder [IPA_RESOURCE_TYPE_SRC_DESCRIPTOR_LISTS] = { 1922c7b9b93SAlex Elder .limits[IPA_RSRC_GROUP_SRC_LWA_DL] = { 1932c7b9b93SAlex Elder .min = 10, .max = 10, 1942c7b9b93SAlex Elder }, 1952c7b9b93SAlex Elder .limits[IPA_RSRC_GROUP_SRC_UL_DL] = { 1962c7b9b93SAlex Elder .min = 10, .max = 10, 1972c7b9b93SAlex Elder }, 1982c7b9b93SAlex Elder .limits[IPA_RSRC_GROUP_SRC_UC_RX_Q] = { 1992c7b9b93SAlex Elder .min = 8, .max = 8, 2002c7b9b93SAlex Elder }, 2012c7b9b93SAlex Elder }, 2022c7b9b93SAlex Elder [IPA_RESOURCE_TYPE_SRC_DESCRIPTOR_BUFF] = { 2032c7b9b93SAlex Elder .limits[IPA_RSRC_GROUP_SRC_LWA_DL] = { 2042c7b9b93SAlex Elder .min = 12, .max = 12, 2052c7b9b93SAlex Elder }, 2062c7b9b93SAlex Elder .limits[IPA_RSRC_GROUP_SRC_UL_DL] = { 2072c7b9b93SAlex Elder .min = 14, .max = 14, 2082c7b9b93SAlex Elder }, 2092c7b9b93SAlex Elder .limits[IPA_RSRC_GROUP_SRC_UC_RX_Q] = { 2102c7b9b93SAlex Elder .min = 8, .max = 8, 2112c7b9b93SAlex Elder }, 2122c7b9b93SAlex Elder }, 2132c7b9b93SAlex Elder [IPA_RESOURCE_TYPE_SRC_HPS_DMARS] = { 2142c7b9b93SAlex Elder .limits[IPA_RSRC_GROUP_SRC_LWA_DL] = { 2152c7b9b93SAlex Elder .min = 0, .max = 63, 2162c7b9b93SAlex Elder }, 2172c7b9b93SAlex Elder .limits[IPA_RSRC_GROUP_SRC_UL_DL] = { 2182c7b9b93SAlex Elder .min = 0, .max = 63, 2192c7b9b93SAlex Elder }, 2202c7b9b93SAlex Elder .limits[IPA_RSRC_GROUP_SRC_MHI_DMA] = { 2212c7b9b93SAlex Elder .min = 0, .max = 63, 2222c7b9b93SAlex Elder }, 2232c7b9b93SAlex Elder .limits[IPA_RSRC_GROUP_SRC_UC_RX_Q] = { 2242c7b9b93SAlex Elder .min = 0, .max = 63, 2252c7b9b93SAlex Elder }, 2262c7b9b93SAlex Elder }, 2272c7b9b93SAlex Elder [IPA_RESOURCE_TYPE_SRC_ACK_ENTRIES] = { 2282c7b9b93SAlex Elder .limits[IPA_RSRC_GROUP_SRC_LWA_DL] = { 2292c7b9b93SAlex Elder .min = 14, .max = 14, 2302c7b9b93SAlex Elder }, 2312c7b9b93SAlex Elder .limits[IPA_RSRC_GROUP_SRC_UL_DL] = { 2322c7b9b93SAlex Elder .min = 20, .max = 20, 2332c7b9b93SAlex Elder }, 2342c7b9b93SAlex Elder .limits[IPA_RSRC_GROUP_SRC_UC_RX_Q] = { 2352c7b9b93SAlex Elder .min = 14, .max = 14, 2362c7b9b93SAlex Elder }, 2372c7b9b93SAlex Elder }, 2382c7b9b93SAlex Elder }; 2392c7b9b93SAlex Elder 2402c7b9b93SAlex Elder /* Destination resource configuration data for an SoC having IPA v3.5.1 */ 2412c7b9b93SAlex Elder static const struct ipa_resource ipa_resource_dst[] = { 2422c7b9b93SAlex Elder [IPA_RESOURCE_TYPE_DST_DATA_SECTORS] = { 2432c7b9b93SAlex Elder .limits[IPA_RSRC_GROUP_DST_LWA_DL] = { 2442c7b9b93SAlex Elder .min = 4, .max = 4, 2452c7b9b93SAlex Elder }, 2462c7b9b93SAlex Elder .limits[1] = { 2472c7b9b93SAlex Elder .min = 4, .max = 4, 2482c7b9b93SAlex Elder }, 2492c7b9b93SAlex Elder .limits[IPA_RSRC_GROUP_DST_UNUSED_2] = { 2502c7b9b93SAlex Elder .min = 3, .max = 3, 2512c7b9b93SAlex Elder } 2522c7b9b93SAlex Elder }, 2532c7b9b93SAlex Elder [IPA_RESOURCE_TYPE_DST_DPS_DMARS] = { 2542c7b9b93SAlex Elder .limits[IPA_RSRC_GROUP_DST_LWA_DL] = { 2552c7b9b93SAlex Elder .min = 2, .max = 63, 2562c7b9b93SAlex Elder }, 2572c7b9b93SAlex Elder .limits[IPA_RSRC_GROUP_DST_UL_DL_DPL] = { 2582c7b9b93SAlex Elder .min = 1, .max = 63, 2592c7b9b93SAlex Elder }, 2602c7b9b93SAlex Elder .limits[IPA_RSRC_GROUP_DST_UNUSED_2] = { 2612c7b9b93SAlex Elder .min = 1, .max = 2, 2622c7b9b93SAlex Elder } 2632c7b9b93SAlex Elder }, 2642c7b9b93SAlex Elder }; 2652c7b9b93SAlex Elder 2662c7b9b93SAlex Elder /* Resource configuration data for an SoC having IPA v3.5.1 */ 2672c7b9b93SAlex Elder static const struct ipa_resource_data ipa_resource_data = { 2682c7b9b93SAlex Elder .rsrc_group_src_count = IPA_RSRC_GROUP_SRC_COUNT, 2692c7b9b93SAlex Elder .rsrc_group_dst_count = IPA_RSRC_GROUP_DST_COUNT, 2702c7b9b93SAlex Elder .resource_src_count = ARRAY_SIZE(ipa_resource_src), 2712c7b9b93SAlex Elder .resource_src = ipa_resource_src, 2722c7b9b93SAlex Elder .resource_dst_count = ARRAY_SIZE(ipa_resource_dst), 2732c7b9b93SAlex Elder .resource_dst = ipa_resource_dst, 2742c7b9b93SAlex Elder }; 2752c7b9b93SAlex Elder 2762c7b9b93SAlex Elder /* IPA-resident memory region data for an SoC having IPA v3.5.1 */ 2772c7b9b93SAlex Elder static const struct ipa_mem ipa_mem_local_data[] = { 2782c7b9b93SAlex Elder { 2792c7b9b93SAlex Elder .id = IPA_MEM_UC_SHARED, 2802c7b9b93SAlex Elder .offset = 0x0000, 2812c7b9b93SAlex Elder .size = 0x0080, 2822c7b9b93SAlex Elder .canary_count = 0, 2832c7b9b93SAlex Elder }, 2842c7b9b93SAlex Elder { 2852c7b9b93SAlex Elder .id = IPA_MEM_UC_INFO, 2862c7b9b93SAlex Elder .offset = 0x0080, 2872c7b9b93SAlex Elder .size = 0x0200, 2882c7b9b93SAlex Elder .canary_count = 0, 2892c7b9b93SAlex Elder }, 2902c7b9b93SAlex Elder { 2912c7b9b93SAlex Elder .id = IPA_MEM_V4_FILTER_HASHED, 2922c7b9b93SAlex Elder .offset = 0x0288, 2932c7b9b93SAlex Elder .size = 0x0078, 2942c7b9b93SAlex Elder .canary_count = 2, 2952c7b9b93SAlex Elder }, 2962c7b9b93SAlex Elder { 2972c7b9b93SAlex Elder .id = IPA_MEM_V4_FILTER, 2982c7b9b93SAlex Elder .offset = 0x0308, 2992c7b9b93SAlex Elder .size = 0x0078, 3002c7b9b93SAlex Elder .canary_count = 2, 3012c7b9b93SAlex Elder }, 3022c7b9b93SAlex Elder { 3032c7b9b93SAlex Elder .id = IPA_MEM_V6_FILTER_HASHED, 3042c7b9b93SAlex Elder .offset = 0x0388, 3052c7b9b93SAlex Elder .size = 0x0078, 3062c7b9b93SAlex Elder .canary_count = 2, 3072c7b9b93SAlex Elder }, 3082c7b9b93SAlex Elder { 3092c7b9b93SAlex Elder .id = IPA_MEM_V6_FILTER, 3102c7b9b93SAlex Elder .offset = 0x0408, 3112c7b9b93SAlex Elder .size = 0x0078, 3122c7b9b93SAlex Elder .canary_count = 2, 3132c7b9b93SAlex Elder }, 3142c7b9b93SAlex Elder { 3152c7b9b93SAlex Elder .id = IPA_MEM_V4_ROUTE_HASHED, 3162c7b9b93SAlex Elder .offset = 0x0488, 3172c7b9b93SAlex Elder .size = 0x0078, 3182c7b9b93SAlex Elder .canary_count = 2, 3192c7b9b93SAlex Elder }, 3202c7b9b93SAlex Elder { 3212c7b9b93SAlex Elder .id = IPA_MEM_V4_ROUTE, 3222c7b9b93SAlex Elder .offset = 0x0508, 3232c7b9b93SAlex Elder .size = 0x0078, 3242c7b9b93SAlex Elder .canary_count = 2, 3252c7b9b93SAlex Elder }, 3262c7b9b93SAlex Elder { 3272c7b9b93SAlex Elder .id = IPA_MEM_V6_ROUTE_HASHED, 3282c7b9b93SAlex Elder .offset = 0x0588, 3292c7b9b93SAlex Elder .size = 0x0078, 3302c7b9b93SAlex Elder .canary_count = 2, 3312c7b9b93SAlex Elder }, 3322c7b9b93SAlex Elder { 3332c7b9b93SAlex Elder .id = IPA_MEM_V6_ROUTE, 3342c7b9b93SAlex Elder .offset = 0x0608, 3352c7b9b93SAlex Elder .size = 0x0078, 3362c7b9b93SAlex Elder .canary_count = 2, 3372c7b9b93SAlex Elder }, 3382c7b9b93SAlex Elder { 3392c7b9b93SAlex Elder .id = IPA_MEM_MODEM_HEADER, 3402c7b9b93SAlex Elder .offset = 0x0688, 3412c7b9b93SAlex Elder .size = 0x0140, 3422c7b9b93SAlex Elder .canary_count = 2, 3432c7b9b93SAlex Elder }, 3442c7b9b93SAlex Elder { 3452c7b9b93SAlex Elder .id = IPA_MEM_MODEM_PROC_CTX, 3462c7b9b93SAlex Elder .offset = 0x07d0, 3472c7b9b93SAlex Elder .size = 0x0200, 3482c7b9b93SAlex Elder .canary_count = 2, 3492c7b9b93SAlex Elder }, 3502c7b9b93SAlex Elder { 3512c7b9b93SAlex Elder .id = IPA_MEM_AP_PROC_CTX, 3522c7b9b93SAlex Elder .offset = 0x09d0, 3532c7b9b93SAlex Elder .size = 0x0200, 3542c7b9b93SAlex Elder .canary_count = 0, 3552c7b9b93SAlex Elder }, 3562c7b9b93SAlex Elder { 3572c7b9b93SAlex Elder .id = IPA_MEM_MODEM, 3582c7b9b93SAlex Elder .offset = 0x0bd8, 3592c7b9b93SAlex Elder .size = 0x1024, 3602c7b9b93SAlex Elder .canary_count = 0, 3612c7b9b93SAlex Elder }, 3622c7b9b93SAlex Elder { 3632c7b9b93SAlex Elder .id = IPA_MEM_UC_EVENT_RING, 3642c7b9b93SAlex Elder .offset = 0x1c00, 3652c7b9b93SAlex Elder .size = 0x0400, 3662c7b9b93SAlex Elder .canary_count = 1, 3672c7b9b93SAlex Elder }, 3682c7b9b93SAlex Elder }; 3692c7b9b93SAlex Elder 3702c7b9b93SAlex Elder /* Memory configuration data for an SoC having IPA v3.5.1 */ 3712c7b9b93SAlex Elder static const struct ipa_mem_data ipa_mem_data = { 3722c7b9b93SAlex Elder .local_count = ARRAY_SIZE(ipa_mem_local_data), 3732c7b9b93SAlex Elder .local = ipa_mem_local_data, 3742c7b9b93SAlex Elder .imem_addr = 0x146bd000, 3752c7b9b93SAlex Elder .imem_size = 0x00002000, 3762c7b9b93SAlex Elder .smem_id = 497, 3772c7b9b93SAlex Elder .smem_size = 0x00002000, 3782c7b9b93SAlex Elder }; 3792c7b9b93SAlex Elder 3802c7b9b93SAlex Elder /* Interconnect bandwidths are in 1000 byte/second units */ 3812c7b9b93SAlex Elder static const struct ipa_interconnect_data ipa_interconnect_data[] = { 3822c7b9b93SAlex Elder { 3832c7b9b93SAlex Elder .name = "memory", 3842c7b9b93SAlex Elder .peak_bandwidth = 600000, /* 600 MBps */ 3852c7b9b93SAlex Elder .average_bandwidth = 80000, /* 80 MBps */ 3862c7b9b93SAlex Elder }, 3872c7b9b93SAlex Elder /* Average bandwidth is unused for the next two interconnects */ 3882c7b9b93SAlex Elder { 3892c7b9b93SAlex Elder .name = "imem", 3902c7b9b93SAlex Elder .peak_bandwidth = 350000, /* 350 MBps */ 3912c7b9b93SAlex Elder .average_bandwidth = 0, /* unused */ 3922c7b9b93SAlex Elder }, 3932c7b9b93SAlex Elder { 3942c7b9b93SAlex Elder .name = "config", 3952c7b9b93SAlex Elder .peak_bandwidth = 40000, /* 40 MBps */ 3962c7b9b93SAlex Elder .average_bandwidth = 0, /* unused */ 3972c7b9b93SAlex Elder }, 3982c7b9b93SAlex Elder }; 3992c7b9b93SAlex Elder 4002c7b9b93SAlex Elder /* Clock and interconnect configuration data for an SoC having IPA v3.5.1 */ 4012c7b9b93SAlex Elder static const struct ipa_power_data ipa_power_data = { 4022c7b9b93SAlex Elder .core_clock_rate = 75 * 1000 * 1000, /* Hz */ 4032c7b9b93SAlex Elder .interconnect_count = ARRAY_SIZE(ipa_interconnect_data), 4042c7b9b93SAlex Elder .interconnect_data = ipa_interconnect_data, 4052c7b9b93SAlex Elder }; 4062c7b9b93SAlex Elder 4072c7b9b93SAlex Elder /* Configuration data for an SoC having IPA v3.5.1 */ 4082c7b9b93SAlex Elder const struct ipa_data ipa_data_v3_5_1 = { 4092c7b9b93SAlex Elder .version = IPA_VERSION_3_5_1, 41021ab2078SAlex Elder .backward_compat = BIT(BCR_CMDQ_L_LACK_ONE_ENTRY) | 41121ab2078SAlex Elder BIT(BCR_TX_NOT_USING_BRESP) | 41221ab2078SAlex Elder BIT(BCR_SUSPEND_L2_IRQ) | 41321ab2078SAlex Elder BIT(BCR_HOLB_DROP_L2_IRQ) | 41421ab2078SAlex Elder BIT(BCR_DUAL_TX), 4152c7b9b93SAlex Elder .qsb_count = ARRAY_SIZE(ipa_qsb_data), 4162c7b9b93SAlex Elder .qsb_data = ipa_qsb_data, 417*8defab8bSAlex Elder .modem_route_count = 8, 4182c7b9b93SAlex Elder .endpoint_count = ARRAY_SIZE(ipa_gsi_endpoint_data), 4192c7b9b93SAlex Elder .endpoint_data = ipa_gsi_endpoint_data, 4202c7b9b93SAlex Elder .resource_data = &ipa_resource_data, 4212c7b9b93SAlex Elder .mem_data = &ipa_mem_data, 4222c7b9b93SAlex Elder .power_data = &ipa_power_data, 4232c7b9b93SAlex Elder }; 424