From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.219.51 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796424884; b=XQCAODuNSZ3MFfinAnUKiNcSewbPAH3RQN9bfi3WLy3dDlDaJSLcKIYxclmpphxeLJ4M O5IvJBrEF6mLETYjn/7x4M+9V2n5ZCosovcKwgDLI/sqp+YzBdXkeH8FkkAMGpXUzCTDn IeSAqmh2oe+oakUvxEBkkL1EeZBtspqfRXzX30Pe8ux1c6EA8490qp07olaExexPLwxXF U3bYs7fLILZVoncPcRFE5/u4XABwMwq6SpSE/yYE8KgadkHW/nje1erm62I/sR5XXTOC7 5O4wJnzA546LHGx28cRkMizYzxUvi2EQaqLrN1aUA72QE0Uj0spzxjhq65i3eYhu80g== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796424884; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Message-ID:Date:MIME-Version:User-Agent:Subject:To:Cc:References: Content-Language:From:In-Reply-To:Content-Type: Content-Transfer-Encoding; bh=iEyri1YBg2pGwHNVgElEiF3rleYtFNC7J3e+YHMjzp4=; b=u7F1v7TqdLyvG5RfL/zqbuaFpSvvqUuL6t18uImgoyknJjCYFAzKcM53X0A17YYuxxAJ 3RcBs/M0wb1YS+X0q5ijzMOFUNi25Td7p5nqREmFJiDKvzp5m6B+45rsdINvp/rwh64WZ DjHS+Zf3grsIfQ2wVn2UfDqCt1WoD08bFERZ0IQzrdvZUq5Sm+q3Fa0F5/b2oeI2G8cHl 7eFLd+a8lYModBCbj6lDufpCmLaPSDnakkALu8XMBATjJAec6owvJUHVl4livc9x880m9 nbMUKxlxSvuuiyna/4gHQCL6uh4vTbp/RJIsphuTqNbyhYkvK/sqdNDI7RS34fWiCzA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=ieee.org; spf=pass smtp.mailfrom=ieee.org; dkim=pass header.d=ieee.org header.i=@ieee.org header.a=rsa-sha256 header.s=google header.b=f9B+xCZg; arc=none smtp.remote-ip=209.85.219.51 Received: from mail-qv1-f51.google.com (mail-qv1-f51.google.com [209.85.219.51]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 367D8606A332 for ; Fri, 4 Dec 2026 22:54:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 367D8606A332 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=ieee.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ieee.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ieee.org header.i=@ieee.org header.a=rsa-sha256 header.s=google header.b=f9B+xCZg Received: by mail-qv1-f51.google.com with SMTP id 6a1803df08f44-91f0274f88cso21757426d6.0 for ; Fri, 04 Dec 2026 14:54:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ieee.org; s=google; t=1796424882; x=1797029682; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=iEyri1YBg2pGwHNVgElEiF3rleYtFNC7J3e+YHMjzp4=; b=f9B+xCZg4cfo2L1/lnrhj0uH306jbxDXwwRfYNcDTCAvetuSIQFNt3fJY7cVK3YMjR rglcf75hSzzwU35rlr9t68xgI18Ner5MOmF61YyMpJ/CB8yeuYQSaWljf3w5W0UmvRpK v7hRdRRxsqX4NmdQPkv0RGfAj1p6xUKD6HN0Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796424882; x=1797029682; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=iEyri1YBg2pGwHNVgElEiF3rleYtFNC7J3e+YHMjzp4=; b=CMS/ft0gj7wZTZAbu4cXRhaH3fffqgnPNTGf8l32/ANr/c5sdFA+wBj7txXJ7NSOrA 4MGEt/4MKASwySYM+Ozy3956gIfPppDZU59+GsvzsReFAH/iJi+L7WFAu98FKj1kjXc+ W0EIPuPIkXjeq7NPuE0upgo+wwXF05Gt7I+x0r/anef56gNYKCgvSWpzyI0EhYclCWog HsWikK7AQfqudKCHbRDp49vko24YDKON6xZCVx9pvQgdcYg1t8gT7noqO1MSPoMtWA28 mkRCm2bhDqd0i4YRuF3mc8fBb1DfvsBHQE6k0DtIM+FkS8m7isEc64sRdLl1cdRJ2wsf k+fQ== X-Forwarded-Encrypted: i=1; AL+hErGgIsuFIq6td2Rp/6A21SekI4UHaXb1oEnKcTDFmSSMH3TNBeR91dlq8hHOWolxkF57WksA4JyWgyNKnAs=@vger.kernel.org X-Gm-Message-State: AB4q+uG+NbRGkCCjVYrRiCJFZ+2J4Z+W9MQ7aWfxe7gWAXX2sLNPSpXy qV0QndF3nlHA1CXg6JIbhrDccD7LyaKTNpuKjESBlD9X+RuZao5I4G2+LlwseKSm+w== X-Gm-Gg: AZFdTZfAKiUF1RZpYXebHZP2WP4U84bejbBUoWJIo37QRrMgrAWc2pCvhYCwgfM8GVY Y4lZfLLxmPwHxCmW6K0AnxZpqdX+KujLEg3DNMSa13ErDXPrOHAMoGkkMq98Q2pmlSbkTK4KSA0 DONVYcw21+J9OJHe2tVkff1veVCO2gSHsVVv6ZOAFTOxSlKJA25lDeuC+V3tv+erxNm3hy3Oadw 1l8Qd5xD2tgsIa8+y6mRc8OEvhAnal7o+2D5XZi/mwfyYZo8TbIOiO/+PHRfR7EtX/kGH6IiqbZ d3TIAvsDwi1wyj/nhMKGv87/zIGlLdPQEp8KWTh5IHKBw94KFVt0AxwYeOpfZm5e1HAjiJYgvgB Bar6LHp31aUq70lxRXWo1FqeH87mQIKOyCvrCysauqaNftAQwdWXSFnMRpHylOFL0HUgX5087QX 4IBl1OciI38jz3eBTc1m1GDUIYMF1NZwi5lrGSB2WDYLECNxobUAAr8iifclaL4wEbXr0JGvNQN pFplYPYvMFvY9hX0eFLkKQYGDPfwVr5k7idAiVQfwJGstYDEmiKe2jiWplHlMyxI72rhwDCtfzB fjpyUc9gmkz14kSYM7ecRwyjUg== X-Received: by 2002:ad4:5dce:0:b0:90e:96a9:4c5d with SMTP id 6a1803df08f44-921e26809d6mr59239956d6.15.1796424881918; Fri, 04 Dec 2026 14:54:41 -0800 (PST) Received: from [172.22.22.28] ([76.156.233.211]) by smtp.googlemail.com with ESMTPSA id 6a1803df08f44-921e8d35af6sm17869196d6.16.2026.12.04.14.54.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 04 Dec 2026 14:54:38 -0800 (PST) Message-ID: <548011b3-cfe5-4b04-8b50-4c859f8e2cd7@ieee.org> Date: Fri, 4 Dec 2026 16:54:37 -0600 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net-next 3/3] net: ipa: add SC8180X (IPA v4.1) configuration data To: robertijtsma@gmail.com, Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Alex Elder Cc: linux-arm-msm@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20261125-qcom-ipa-sc8180x-v1-0-48a889acbe6b@gmail.com> <20261125-qcom-ipa-sc8180x-v1-3-48a889acbe6b@gmail.com> Content-Language: en-US From: Alex Elder In-Reply-To: <20261125-qcom-ipa-sc8180x-v1-3-48a889acbe6b@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 11/24/26 5:01 PM, Robert Ijtsma via B4 Relay wrote: > From: Robert Ijtsma > > Add the SC8180X (IPA v4.1) endpoint, resource group, shared memory, > IMEM (0x146bd000, 8 KiB), and backward-compatibility configuration table > (ipa_data_v4_1) and bind it to the qcom,sc8180x-ipa compatible. > > Register offsets and endpoint/resource limits are derived from the > downstream Qualcomm msm-4.14 poipu/sm8150 IPA v4.1 driver and SC8180X > devicetree tables, adapted to the upstream ipa_mem_data layout. > > Tested on Microsoft Surface Pro X SQ2 (SC8180X, Snapdragon X24 LTE > modem) with rmnet_ipa0 MAPv4 and ModemManager qcom-soc QMAP bearers. > > Signed-off-by: Robert Ijtsma It looks to me like you got all the numbers right (though it's hard work to methodically check all this stuff). However you need to rework this to match the existing coding style in several places. > --- > drivers/net/ipa/Makefile | 2 +- > drivers/net/ipa/data/ipa_data-v4.1.c | 319 +++++++++++++++++++++++++++++++++++ > drivers/net/ipa/ipa_data.h | 1 + > drivers/net/ipa/ipa_main.c | 4 + > 4 files changed, 325 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/ipa/Makefile b/drivers/net/ipa/Makefile > index 2420af0..025a313 100644 > --- a/drivers/net/ipa/Makefile > +++ b/drivers/net/ipa/Makefile > @@ -7,7 +7,7 @@ IPA_REG_VERSIONS := 3.1 3.5.1 4.1 4.2 4.5 4.7 4.9 4.11 5.0 5.5 > # Some IPA versions can reuse another set of GSI register definitions. > GSI_REG_VERSIONS := 3.1 3.5.1 4.0 4.5 4.9 4.11 5.0 > > -IPA_DATA_VERSIONS := 3.1 3.5.1 4.2 4.5 4.7 4.9 4.11 5.0 5.2 5.5 > +IPA_DATA_VERSIONS := 3.1 3.5.1 4.1 4.2 4.5 4.7 4.9 4.11 5.0 5.2 5.5 > > obj-$(CONFIG_QCOM_IPA) += ipa.o > > diff --git a/drivers/net/ipa/data/ipa_data-v4.1.c b/drivers/net/ipa/data/ipa_data-v4.1.c > new file mode 100644 > index 0000000..9b52c60 > --- /dev/null > +++ b/drivers/net/ipa/data/ipa_data-v4.1.c > @@ -0,0 +1,319 @@ > +// SPDX-License-Identifier: GPL-2.0 > + > +/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. > + * Copyright (C) 2026 Robin Snyders > + */ > + > +#include > +#include > + > +#include "../ipa_data.h" > +#include "../ipa_endpoint.h" > +#include "../ipa_mem.h" > +#include "../ipa_version.h" > + > +/** enum ipa_resource_type - IPA resource types for an SoC having IPA v4.1 */ > +enum ipa_resource_type { > + /* Source resource types; first must have value 0 */ > + IPA_RESOURCE_TYPE_SRC_PKT_CONTEXTS = 0, > + IPA_RESOURCE_TYPE_SRC_DESCRIPTOR_LISTS, > + IPA_RESOURCE_TYPE_SRC_DESCRIPTOR_BUFF, > + IPA_RESOURCE_TYPE_SRC_HPS_DMARS, > + IPA_RESOURCE_TYPE_SRC_ACK_ENTRIES, > + > + /* Destination resource types; first must have value 0 */ > + IPA_RESOURCE_TYPE_DST_DATA_SECTORS = 0, > + IPA_RESOURCE_TYPE_DST_DPS_DMARS, > +}; The above look good. > + > +/* Resource groups used for an SoC having IPA v4.1 */ > +enum ipa_rsrc_group_id { > + /* Source resource group identifiers */ > + IPA_RSRC_GROUP_SRC_LWA_DL = 0, > + IPA_RSRC_GROUP_SRC_UL_DL, > + IPA_RSRC_GROUP_SRC_UNUSED_2, > + IPA_RSRC_GROUP_SRC_UC_RX_Q, > + IPA_RSRC_GROUP_SRC_COUNT, /* Last in set; not a source group */ > + > + /* Destination resource group identifiers */ > + IPA_RSRC_GROUP_DST_LWA_DL = 0, > + IPA_RSRC_GROUP_DST_UL_DL_DPL, > + IPA_RSRC_GROUP_DST_UNUSED_2, > + IPA_RSRC_GROUP_DST_UC_RX_Q, In "ipa_utils.c" I see this for IPA_4_1: /* LWA_DL UL/DL/DPL uC, other are invalid */ But then they seem to describe four sets of resource ranges or something. Maybe someone from Qualcomm understands. It's hard to know how to interpret their comment, but their numbers appear to allocate DST resources to four things. > + IPA_RSRC_GROUP_DST_COUNT, /* Last; not a destination group */ > +}; > + > +/* QSB configuration data for an SoC having IPA v4.1 */ > +static const struct ipa_qsb_data ipa_qsb_data[] = { > + [IPA_QSB_MASTER_DDR] = { > + .max_writes = 8, > + .max_reads = 12, You are missing max_reads_beats = 120 here. > + }, > + [IPA_QSB_MASTER_PCIE] = { > + .max_writes = 4, > + .max_reads = 12, > + }, > +}; > + > +/* Endpoint data for an SoC having IPA v4.1 */ > +static const struct ipa_gsi_endpoint_data ipa_gsi_endpoint_data[] = { > + [IPA_ENDPOINT_AP_COMMAND_TX] = { > + .ee_id = GSI_EE_AP, > + .channel_id = 4, > + .endpoint_id = 5, > + .toward_ipa = true, > + .channel = { > + .tre_count = 512, > + .event_count = 256, > + .tlv_count = 20, > + }, > + .endpoint = { > + .config = { > + .resource_group = IPA_RSRC_GROUP_SRC_UL_DL, > + .dma_mode = true, > + .dma_endpoint = IPA_ENDPOINT_AP_LAN_RX, > + .tx = { > + .seq_type = IPA_SEQ_DMA, > + }, > + }, > + }, > + }, The above endpoint looks good. You probably get this message: channel 4 limited to 256 TREs It's always tough tracking down the number of TREs and events. I'm pretty sure the ring buffer size downstream is: #define IPA_SYS_DESC_FIFO_SZ 0x800 And that gets doubled somewhere, and you divide that by the size of a TRE (16 bytes) and you end up with 256. So I *think* the tre_count and event_count should both be 256 (also on IPA v3.5.1 but I'm not going to mess with that). > + [IPA_ENDPOINT_AP_LAN_RX] = { > + .ee_id = GSI_EE_AP, > + .channel_id = 5, > + .endpoint_id = 10, > + .toward_ipa = false, > + .channel = { > + .tre_count = 256, > + .event_count = 256, > + .tlv_count = 9, > + }, > + .endpoint = { > + .config = { > + .resource_group = IPA_RSRC_GROUP_DST_UL_DL_DPL, > + .aggregation = true, > + .status_enable = true, > + .rx = { > + .buffer_size = 8192, > + .pad_align = ilog2(sizeof(u32)), > + .aggr_time_limit = 500, > + }, > + }, > + }, > + }, The above endpoint looks good. > + [IPA_ENDPOINT_AP_MODEM_TX] = { > + .ee_id = GSI_EE_AP, > + .channel_id = 3, > + .endpoint_id = 2, > + .toward_ipa = true, > + .channel = { > + .tre_count = 512, > + .event_count = 512, > + .tlv_count = 16, > + }, > + .endpoint = { > + .filter_support = true, > + .config = { > + .resource_group = IPA_RSRC_GROUP_SRC_UL_DL, > + .checksum = true, > + .qmap = true, > + .status_enable = true, > + .tx = { > + .seq_type = IPA_SEQ_2_PASS_SKIP_LAST_UC, > + .seq_rep_type = IPA_SEQ_REP_DMA_PARSER, > + .status_endpoint = > + IPA_ENDPOINT_MODEM_AP_RX, > + }, > + }, > + }, > + }, Downstream is this: #define IPA_SYS_TX_DATA_DESC_FIFO_SZ 0x1000 Which I think translates to 512 TREs. > + [IPA_ENDPOINT_AP_MODEM_RX] = { > + .ee_id = GSI_EE_AP, > + .channel_id = 6, > + .endpoint_id = 11, > + .toward_ipa = false, > + .channel = { > + .tre_count = 256, > + .event_count = 256, > + .tlv_count = 9, > + }, > + .endpoint = { > + .config = { > + .resource_group = IPA_RSRC_GROUP_DST_UL_DL_DPL, > + .checksum = true, > + .qmap = true, > + .aggregation = true, > + .rx = { > + .buffer_size = 8192, > + .aggr_time_limit = 500, > + .aggr_close_eof = true, > + }, > + }, > + }, > + }, > + [IPA_ENDPOINT_MODEM_COMMAND_TX] = { > + .ee_id = GSI_EE_MODEM, > + .channel_id = 1, > + .endpoint_id = 4, > + .toward_ipa = true, > + }, > + [IPA_ENDPOINT_MODEM_LAN_RX] = { > + .ee_id = GSI_EE_MODEM, > + .channel_id = 4, > + .endpoint_id = 14, > + .toward_ipa = false, > + }, > + [IPA_ENDPOINT_MODEM_AP_TX] = { > + .ee_id = GSI_EE_MODEM, > + .channel_id = 0, > + .endpoint_id = 3, > + .toward_ipa = true, > + .endpoint = { > + .filter_support = true, > + }, > + }, > + [IPA_ENDPOINT_MODEM_AP_RX] = { > + .ee_id = GSI_EE_MODEM, > + .channel_id = 3, > + .endpoint_id = 13, > + .toward_ipa = false, > + }, The modem endpoint definitions look good. > +}; > + > +/* Source resource configuration data for an SoC having IPA v4.1 */ > +static const struct ipa_resource ipa_resource_src[] = { Please add the index in these initializers, for example: [IPA_RESOURCE_TYPE_SRC_PKT_CONTEXTS] = { You should see that all of the ipa_data files follow a very consistent format, and therefore you should not deviate for that without a very good reason. > + { > + .limits[0] = { .min = 1, .max = 63 }, Please use symbolic values, for example: .limits[IPA_RSRC_GROUP_SRC_LWA_DL] = { > + .limits[1] = { .min = 1, .max = 63 }, > + .limits[2] = { .min = 0, .max = 0 }, If limits min/max are both 0 you can just omit it. > + .limits[3] = { .min = 1, .max = 63 }, > + }, > + { > + .limits[0] = { .min = 10, .max = 10 }, > + .limits[1] = { .min = 10, .max = 10 }, > + .limits[2] = { .min = 0, .max = 0 }, > + .limits[3] = { .min = 8, .max = 8 }, > + }, > + { > + .limits[0] = { .min = 12, .max = 12 }, > + .limits[1] = { .min = 14, .max = 14 }, > + .limits[2] = { .min = 0, .max = 0 }, > + .limits[3] = { .min = 8, .max = 8 }, > + }, > + { > + .limits[0] = { .min = 0, .max = 63 }, > + .limits[1] = { .min = 0, .max = 63 }, > + .limits[2] = { .min = 0, .max = 63 }, I'm pretty sure the above line is an error in the downstream code (this is almost certainly { 0, 0 }). > + .limits[3] = { .min = 0, .max = 63 }, > + }, > + { > + .limits[0] = { .min = 14, .max = 14 }, > + .limits[1] = { .min = 20, .max = 20 }, > + .limits[2] = { .min = 0, .max = 0 }, > + .limits[3] = { .min = 14, .max = 14 }, > + }, > +}; Other than the comments above, the numbers assigned here look correct. > + > +/* Destination resource configuration data for an SoC having IPA v4.1 */ > +static const struct ipa_resource ipa_resource_dst[] = { > + { > + .limits[0] = { .min = 4, .max = 4 }, > + .limits[1] = { .min = 4, .max = 4 }, > + .limits[2] = { .min = 3, .max = 3 }, > + .limits[3] = { .min = 2, .max = 2 }, > + }, > + { > + .limits[0] = { .min = 2, .max = 63 }, > + .limits[1] = { .min = 1, .max = 63 }, > + .limits[2] = { .min = 1, .max = 2 }, > + .limits[3] = { .min = 0, .max = 2 }, > + }, > +}; The numbers above look correct, but please initialize them following the pattern used elsewhere (with explicit symbols indicating which array entry is initialized). > + > +/* Resource configuration data for an SoC having IPA v4.1 */ > +static const struct ipa_resource_data ipa_resource_data = { > + .rsrc_group_src_count = IPA_RSRC_GROUP_SRC_COUNT, > + .rsrc_group_dst_count = IPA_RSRC_GROUP_DST_COUNT, > + .resource_src_count = ARRAY_SIZE(ipa_resource_src), > + .resource_src = ipa_resource_src, > + .resource_dst_count = ARRAY_SIZE(ipa_resource_dst), > + .resource_dst = ipa_resource_dst, > +}; > + > +/* IPA-resident memory region data for an SoC having IPA v4.1 */ > +static const struct ipa_mem ipa_mem_local_data[] = { Please don't combine these (below) into one line. Follow the coding style used in *all* other similar source files. > + { .id = IPA_MEM_UC_SHARED, .offset = 0x0000, .size = 0x0080, .canary_count = 0, }, > + { .id = IPA_MEM_UC_INFO, .offset = 0x0080, .size = 0x0200, .canary_count = 0, }, > + { .id = IPA_MEM_V4_FILTER_HASHED, .offset = 0x0288, .size = 0x0078, .canary_count = 2, }, > + { .id = IPA_MEM_V4_FILTER, .offset = 0x0308, .size = 0x0078, .canary_count = 2, }, > + { .id = IPA_MEM_V6_FILTER_HASHED, .offset = 0x0388, .size = 0x0078, .canary_count = 2, }, > + { .id = IPA_MEM_V6_FILTER, .offset = 0x0408, .size = 0x0078, .canary_count = 2, }, > + { .id = IPA_MEM_V4_ROUTE_HASHED, .offset = 0x0488, .size = 0x0078, .canary_count = 2, }, > + { .id = IPA_MEM_V4_ROUTE, .offset = 0x0508, .size = 0x0078, .canary_count = 2, }, > + { .id = IPA_MEM_V6_ROUTE_HASHED, .offset = 0x0588, .size = 0x0078, .canary_count = 2, }, > + { .id = IPA_MEM_V6_ROUTE, .offset = 0x0608, .size = 0x0078, .canary_count = 2, }, > + { .id = IPA_MEM_MODEM_HEADER, .offset = 0x0688, .size = 0x0140, .canary_count = 2, }, > + /* No AP_HEADER: original size0, omitted for6.3.8 zero-region validation. */ What does "for6.3.8 zero-region validation" mean? You don't need to have a comment here saying something is missing. Just define what is present. > + { .id = IPA_MEM_MODEM_PROC_CTX, .offset = 0x07d0, .size = 0x0200, .canary_count = 2, }, > + { .id = IPA_MEM_AP_PROC_CTX, .offset = 0x09d0, .size = 0x0200, .canary_count = 0, }, > + { .id = IPA_MEM_PDN_CONFIG, .offset = 0x0bd8, .size = 0x0050, .canary_count = 2, }, > + { .id = IPA_MEM_STATS_QUOTA_MODEM, .offset = 0x0c30, .size = 0x0060, .canary_count = 2, }, > + { .id = IPA_MEM_STATS_TETHERING, .offset = 0x0c90, .size = 0x0140, .canary_count = 0, }, > + { .id = IPA_MEM_STATS_V4_FILTER, .offset = 0x0dd0, .size = 0x0180, .canary_count = 0, }, > + { .id = IPA_MEM_STATS_V6_FILTER, .offset = 0x0f50, .size = 0x0180, .canary_count = 0, }, > + { .id = IPA_MEM_STATS_V4_ROUTE, .offset = 0x10d0, .size = 0x0180, .canary_count = 0, }, > + { .id = IPA_MEM_STATS_V6_ROUTE, .offset = 0x1250, .size = 0x0180, .canary_count = 0, }, > + { .id = IPA_MEM_STATS_DROP, .offset = 0x13d0, .size = 0x0020, .canary_count = 0, }, > + { .id = IPA_MEM_MODEM, .offset = 0x13f0, .size = 0x100c, .canary_count = 0, }, > + { .id = IPA_MEM_UC_EVENT_RING, .offset = 0x2400, .size = 0x0400, .canary_count = 1, }, > +}; > + > +/* Memory configuration data for an SoC having IPA v4.1 */ > +static const struct ipa_mem_data ipa_mem_data = { > + .local_count = ARRAY_SIZE(ipa_mem_local_data), > + .local = ipa_mem_local_data, > + .imem_addr = 0x146bd000, > + .imem_size = 0x00002000, The imem information I *think* needs to come from devicetree now (ask Konrad for confirmation). There's a property "sram" that takes a phandle which specifies its offset and size, so I think you'd do this: sram@146b8000 { /* XXX guessing on address */ ipa_modem_tables: modem-tables@5000 { reg = <0x5000 0x2000> }; }; ipa: ipa@... { . . . sram = <&ipa_modem_tables>; }; > + .smem_size = 0x00002000, > +}; > + > +/* Interconnect bandwidths are in 1000 byte/second units */ > +static const struct ipa_interconnect_data ipa_interconnect_data[] = { > + { > + .name = "memory", > + .peak_bandwidth = 600000, /* 600 MBps */ > + .average_bandwidth = 80000, /* 80 MBps */ > + }, > + /* Average bandwidth is unused for the next two interconnects */ > + { > + .name = "imem", > + .peak_bandwidth = 350000, /* 350 MBps */ > + .average_bandwidth = 0, /* unused */ > + }, > + { > + .name = "config", > + .peak_bandwidth = 40000, /* 40 MBps */ > + .average_bandwidth = 0, /* unused */ > + }, > +}; > + > +/* Clock and interconnect configuration data for an SoC having IPA v4.1 */ > +static const struct ipa_power_data ipa_power_data = { > + .core_clock_rate = 100 * 1000 * 1000, /* Hz */ > + .interconnect_count = ARRAY_SIZE(ipa_interconnect_data), > + .interconnect_data = ipa_interconnect_data, > +}; > + > +/* Configuration data for an SoC having IPA v4.1 */ > +const struct ipa_data ipa_data_v4_1 = { > + .version = IPA_VERSION_4_1, > + .backward_compat = 0x39, You should define this using the ipa_bcr_compat enumerated type. Please follow the coding style used in "ipa_data-v3.5.1.c": .backward_compat = BIT(BCR_CMDQ_L_LACK_ONE_ENTRY) | BIT(BCR_SUSPEND_L2_IRQ) | BIT(BCR_HOLB_DROP_L2_IRQ) | BIT(BCR_DUAL_TX), -Alex > + .qsb_count = ARRAY_SIZE(ipa_qsb_data), > + .qsb_data = ipa_qsb_data, > + .modem_route_count = 8, > + .endpoint_count = ARRAY_SIZE(ipa_gsi_endpoint_data), > + .endpoint_data = ipa_gsi_endpoint_data, > + .resource_data = &ipa_resource_data, > + .mem_data = &ipa_mem_data, > + .power_data = &ipa_power_data, > +}; > diff --git a/drivers/net/ipa/ipa_data.h b/drivers/net/ipa/ipa_data.h > index 3eb9dc2..20da242 100644 > --- a/drivers/net/ipa/ipa_data.h > +++ b/drivers/net/ipa/ipa_data.h > @@ -247,6 +247,7 @@ struct ipa_data { > > extern const struct ipa_data ipa_data_v3_1; > extern const struct ipa_data ipa_data_v3_5_1; > +extern const struct ipa_data ipa_data_v4_1; > extern const struct ipa_data ipa_data_v4_2; > extern const struct ipa_data ipa_data_v4_5; > extern const struct ipa_data ipa_data_v4_7; > diff --git a/drivers/net/ipa/ipa_main.c b/drivers/net/ipa/ipa_main.c > index 14ac2d2..fa26f36 100644 > --- a/drivers/net/ipa/ipa_main.c > +++ b/drivers/net/ipa/ipa_main.c > @@ -648,6 +648,10 @@ static const struct of_device_id ipa_match[] = { > .compatible = "qcom,sdm845-ipa", > .data = &ipa_data_v3_5_1, > }, > + { > + .compatible = "qcom,sc8180x-ipa", > + .data = &ipa_data_v4_1, > + }, > { > .compatible = "qcom,sc7180-ipa", > .data = &ipa_data_v4_2, >