From nobody Fri Apr 3 04:42:41 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 838D34219F4; Mon, 2 Mar 2026 15:58:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772467138; cv=none; b=fGxkRJ/tLniUZkn1UMm84pqyqQrqYFhRtrsQbrbndwhBctPRvfveC58YA9gclaNNcibCZrHFzhQPWJXLdvwoICAjoAwnIAn5tN5fepGdOQ4Ari4DgDiyCC2/s1srZE5487yGIklauEMR3dDJFTGTPv/1hS4+CIgUxuZlDeM4Dx8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772467138; c=relaxed/simple; bh=9XAB1WkKG/tI/e5hODd4LVsH6dlMu4Pako5uxzY7r4U=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=LUbjXkWahxVpmVbZcijX+B0+hAhFLnOEcSGeT38Z4poiFtO6Ta1VFA0yDyw501YAeDnpOlyopd+dBax5hbQKO2cAJ/o90kaNIadzJvkIHGnngrYfbAa+OF+DFoyF0APY1IbxqHMhZRnJoHIkexD1CnOZ49IAoLA2qvFATBCx28o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=BBDO6xpy; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="BBDO6xpy" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EE525C2BC86; Mon, 2 Mar 2026 15:58:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772467138; bh=9XAB1WkKG/tI/e5hODd4LVsH6dlMu4Pako5uxzY7r4U=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=BBDO6xpyUQKWL9UsEIKdAWsnIaFoWPIpLpD7uwMfZb0ivCt/fEvdD6n/A2jt4FSRw egHhbfCogoP+omXjTBHhg9ClSMKEGnzbifHZMJg7rK57QeAZ59SM8D2gG9YjQX67vf WfBM96nLV3IPp5dyWOU44aCNJx1c/5uj7QQAGsQX4BfLtJrUhS+L2DZsPFYpMbCWUO 2RCLx0Anp5mLKSg57g5NUu7nHpriYYf30uGjoyZP1tZe0uE5zx1jAKurY6gep9uyfr /yfvLOGU1Q4o6kiiFoXLvLmFvtBJL0fOyV5vEnLFQz/nBbzoEuE79cddcGAqKbt6DB /rH/mNzxoommQ== From: Konrad Dybcio Date: Mon, 02 Mar 2026 16:58:43 +0100 Subject: [PATCH net-next v6 1/3] dt-bindings: sram: qcom,imem: Allow modem-tables subnode Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260302-topic-ipa_imem-v6-1-c0ebbf3eae9f@oss.qualcomm.com> References: <20260302-topic-ipa_imem-v6-0-c0ebbf3eae9f@oss.qualcomm.com> In-Reply-To: <20260302-topic-ipa_imem-v6-0-c0ebbf3eae9f@oss.qualcomm.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Alex Elder Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Konrad Dybcio , Krzysztof Kozlowski , Alex Elder X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1772467127; l=1479; i=konrad.dybcio@oss.qualcomm.com; s=20230215; h=from:subject:message-id; bh=EkZkFoDGwWgx618F15NSBVvffYCMvU4Fbz6lmWps3uA=; b=TQjbvFSC2DWAlWeInoI/npkN46UsX+LvcBtHh6lhCy9MQXAQQGTIuham+mjaHG1luXLCbOQMb UZh0yhNyPCnBSAQSpXdPEZwnGmubVX7GY1P5ZMvMmxV/j191nkrirah X-Developer-Key: i=konrad.dybcio@oss.qualcomm.com; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= From: Konrad Dybcio The IP Accelerator hardware/firmware owns a sizeable region within the IMEM, named 'modem-tables', containing various packet processing configuration data. It's not actually accessed by the OS, although we have to IOMMU-map it with the IPA device, so that presumably the firmware can act upon it. Allow it as a subnode of IMEM. Reviewed-by: Krzysztof Kozlowski Reviewed-by: Alex Elder Signed-off-by: Konrad Dybcio --- Documentation/devicetree/bindings/sram/qcom,imem.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Documentation/devicetree/bindings/sram/qcom,imem.yaml b/Docume= ntation/devicetree/bindings/sram/qcom,imem.yaml index 6a627c57ae2f..c63026904061 100644 --- a/Documentation/devicetree/bindings/sram/qcom,imem.yaml +++ b/Documentation/devicetree/bindings/sram/qcom,imem.yaml @@ -67,6 +67,20 @@ properties: $ref: /schemas/power/reset/syscon-reboot-mode.yaml# =20 patternProperties: + "^modem-tables@[0-9a-f]+$": + type: object + description: + Region containing packet processing configuration for the IP Acceler= ator. + + properties: + reg: + maxItems: 1 + + required: + - reg + + additionalProperties: false + "^pil-reloc@[0-9a-f]+$": $ref: /schemas/remoteproc/qcom,pil-info.yaml# description: Peripheral image loader relocation region --=20 2.53.0 From nobody Fri Apr 3 04:42:41 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AD11D4219E9; Mon, 2 Mar 2026 15:59:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772467143; cv=none; b=Oi/KaZe6cbKsklqhrfP7pFvCcOh7U2bQpMPTlLgO7I9AyIX3MB5uiby0duWA9cgMWa3rpe+Yc2sChHyBZZjQDqSP/W0PMDCGNR8qFOpPXo2KuYosIx/MPbiFikrXayrWd4FpdHz9ZoATo5eHd8VrpEsTFR9bP1/mfx+pfJGf2/A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772467143; c=relaxed/simple; bh=2dYSFWHyj4X3N9lIZ8cPMHQHezOGMsV6I5UBAIu+Dd8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=u3oemkPwFt6Y6Qbxh/S4Py1lzZm4bH4k6rGjZ1fs5d4n5IPQNls6O+H1kQeSoq9hhoUhNIiPeC6U/euY9WA2B318T/C3fDb/tQUXhWH92Uh6HOaZiRHkEKCwgRHcxZrLkfTv1mi51MxgDWgszKaV7zdmMUFEvov3Eftn3xx6wjM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=nDMHIbT+; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="nDMHIbT+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A60AEC19423; Mon, 2 Mar 2026 15:58:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772467143; bh=2dYSFWHyj4X3N9lIZ8cPMHQHezOGMsV6I5UBAIu+Dd8=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=nDMHIbT+hVGBt5izYjCQ7w4i5Ku6k62jBaVcxMEfZ5JctWjJ/2ioABaomEx8zuBlm l8iaMnAuQaqaEuBxNrBC69DVckigqPMbK18352ToXNVAsLy5BxtgPdc7VK5yXnoe4j dMgceJGwl1tYJRX5mST4e/DrJXFlpK5dbX5CLNUF5bdVb0PQXqbYTbsWR/CsjBi06Q ZrMZcH9CWwt+bc8Hoq1cTPKymc3T7OeAabOW8Ku2aF/FKi6po6ZbeKBhNsXjVRKvw4 SSX8WmnnkzjMI/0Mif6eP+Klk984LYcym6I6/VfX83+8jRdh3Uqut/Q6YcUsqDtyk8 9vP/coeENsvMw== From: Konrad Dybcio Date: Mon, 02 Mar 2026 16:58:44 +0100 Subject: [PATCH net-next v6 2/3] dt-bindings: net: qcom,ipa: Add sram property for describing IMEM slice Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260302-topic-ipa_imem-v6-2-c0ebbf3eae9f@oss.qualcomm.com> References: <20260302-topic-ipa_imem-v6-0-c0ebbf3eae9f@oss.qualcomm.com> In-Reply-To: <20260302-topic-ipa_imem-v6-0-c0ebbf3eae9f@oss.qualcomm.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Alex Elder Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Konrad Dybcio , Alex Elder , Krzysztof Kozlowski X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1772467127; l=1543; i=konrad.dybcio@oss.qualcomm.com; s=20230215; h=from:subject:message-id; bh=FtJRSrboOafEtcZXaNS6FW/2KBBL5SVhQOA5zYIeMBE=; b=yZ6H/1jek/pFw9MYIiPXqH4J/YmOW5zlo3YcOXOj/g+hJJs45gcZEV9GWNdVVnCviJWVRfSqJ D/KRaG5vOPpCmfRtW4wew/Fl8cMVCwn1WTNKILjcLDozUxW7Sc7S7EL X-Developer-Key: i=konrad.dybcio@oss.qualcomm.com; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= From: Konrad Dybcio The IPA driver currently grabs a slice of IMEM through hardcoded addresses. Not only is that ugly and against the principles of DT, but it also creates a situation where two distinct platforms implementing the same version of IPA would need to be hardcoded together and matched at runtime. Instead, do the sane thing and accept a handle to said region directly. Don't make it required on purpose, as it's not there on ancient implementations (currently unsupported) and we're not yet done with filling the data across al DTs. Reviewed-by: Alex Elder Reviewed-by: Krzysztof Kozlowski Signed-off-by: Konrad Dybcio --- Documentation/devicetree/bindings/net/qcom,ipa.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Documentation/devicetree/bindings/net/qcom,ipa.yaml b/Document= ation/devicetree/bindings/net/qcom,ipa.yaml index c7f5f2ef7452..4237e74041ef 100644 --- a/Documentation/devicetree/bindings/net/qcom,ipa.yaml +++ b/Documentation/devicetree/bindings/net/qcom,ipa.yaml @@ -165,6 +165,13 @@ properties: initializing IPA hardware. Optional, and only used when Trust Zone performs early initialization. =20 + sram: + maxItems: 1 + description: + A reference to an additional region residing in IMEM (special + on-chip SRAM), which is accessed by the IPA firmware and needs + to be IOMMU-mapped from the OS. + required: - compatible - iommus --=20 2.53.0 From nobody Fri Apr 3 04:42:41 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 613D94219E9; Mon, 2 Mar 2026 15:59:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772467148; cv=none; b=AoZJDIIjNwvTKkIRpdh95h8tZCQ5zUxAFPLvgi+5iF4Qeg2qgGeDr+HtNqc482Ps+Bmlf++SqxJpctfcFrvVsdp+uffPPYCxYxM5rezM0FpEXsOmVV074rPYYV9bJ5rte9hvIRhwj+aM3FxIv5RCVg/L4cgustB95Ls9UOnwwAc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772467148; c=relaxed/simple; bh=jPoALjGIJosbnsT7LQYpnfA7my0J+97RmRVEyzh8brU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=O3NgYaiW0QF0N9UdXkr7l1bagB33mPkRFQlHAV+hGkJiccIS8DiA66rrzUkQIe4GzjEkbyS7FZ1WRNp29wUvXOOOLFpD79wKDZkRTVgev8JQ+qpd1UrGon7x8CwxVdBWSM/TFhoG82nvzxMYVg7YwGyoUCj35dxzqs7MKjWA97Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=sFMnGsgM; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="sFMnGsgM" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DDB3DC19423; Mon, 2 Mar 2026 15:59:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772467148; bh=jPoALjGIJosbnsT7LQYpnfA7my0J+97RmRVEyzh8brU=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=sFMnGsgMk3rvHrYjD0+TgRDirgr/P+cWPnZkHnm7Z9v8YLyHsxw3ej39yuXwDwMor KH8jSIWAdTZcJunEkwkI0OKRSMU9hCTXAfQZM7nTLzER3dZSTJNY8V79tuvzE+3/XB Fs2yGUi6k7QG9sXWeUoO4r3u8vIwtoOIkdzFchb0WYi9jh3vTLnTQktsVvHGw6a5gY 5d+jBgW8P61/JW0l/RpxQqNJ30PKadxq0gzhLOvXUThlb/h2jpNbO6+Lt3N9Ymc+ME H23EMAZ3IyOpjKw3npGjqmdlRRP9jiLut7VnilBhzY3VJPYuxupsiKqNm7TfHdc/JO w6+XaB2Zz2ZMA== From: Konrad Dybcio Date: Mon, 02 Mar 2026 16:58:45 +0100 Subject: [PATCH net-next v6 3/3] net: ipa: Grab IMEM slice base/size from DTS Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260302-topic-ipa_imem-v6-3-c0ebbf3eae9f@oss.qualcomm.com> References: <20260302-topic-ipa_imem-v6-0-c0ebbf3eae9f@oss.qualcomm.com> In-Reply-To: <20260302-topic-ipa_imem-v6-0-c0ebbf3eae9f@oss.qualcomm.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Alex Elder Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Konrad Dybcio , Alex Elder , Dmitry Baryshkov , Simon Horman X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1772467127; l=2779; i=konrad.dybcio@oss.qualcomm.com; s=20230215; h=from:subject:message-id; bh=IjEzmMlwd+3eC68bOWdIEpVrr7dfATtLLbU+ngjO+E4=; b=HxdYODHFO1ypLQqwFh6Smn5yUCMVYHYWUUN/NZ900TGu/Ca82nspqvG2qSpMbd7u4ZgzO2x3a FZggmUClw/jBDEOUDx2lF4vBI8XMox3yD/UV80Z66PX1Z/ft89u6Npc X-Developer-Key: i=konrad.dybcio@oss.qualcomm.com; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= From: Konrad Dybcio This is a detail that differ per chip, and not per IPA version (and there are cases of the same IPA versions being implemented across very very very different SoCs). This region isn't actually used by the driver, but we most definitely want to iommu-map it, so that IPA can poke at the data within. Reviewed-by: Alex Elder Acked-by: Dmitry Baryshkov Reviewed-by: Simon Horman Signed-off-by: Konrad Dybcio --- drivers/net/ipa/ipa_data.h | 9 +++++++-- drivers/net/ipa/ipa_mem.c | 24 +++++++++++++++++++++++- 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/drivers/net/ipa/ipa_data.h b/drivers/net/ipa/ipa_data.h index 2fd03f0799b2..f3bdc64cef05 100644 --- a/drivers/net/ipa/ipa_data.h +++ b/drivers/net/ipa/ipa_data.h @@ -185,8 +185,13 @@ struct ipa_resource_data { struct ipa_mem_data { u32 local_count; const struct ipa_mem *local; - u32 imem_addr; - u32 imem_size; + + /* These values are now passed via DT, but to support + * older systems we must allow this to be specified here. + */ + u32 imem_addr; /* DEPRECATED */ + u32 imem_size; /* DEPRECATED */ + u32 smem_size; }; =20 diff --git a/drivers/net/ipa/ipa_mem.c b/drivers/net/ipa/ipa_mem.c index 835a3c9c1fd4..078d32a18dbf 100644 --- a/drivers/net/ipa/ipa_mem.c +++ b/drivers/net/ipa/ipa_mem.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include =20 @@ -617,7 +618,9 @@ static void ipa_smem_exit(struct ipa *ipa) int ipa_mem_init(struct ipa *ipa, struct platform_device *pdev, const struct ipa_mem_data *mem_data) { + struct device_node *ipa_slice_np; struct device *dev =3D &pdev->dev; + u32 imem_base, imem_size; struct resource *res; int ret; =20 @@ -656,7 +659,26 @@ int ipa_mem_init(struct ipa *ipa, struct platform_devi= ce *pdev, ipa->mem_addr =3D res->start; ipa->mem_size =3D resource_size(res); =20 - ret =3D ipa_imem_init(ipa, mem_data->imem_addr, mem_data->imem_size); + ipa_slice_np =3D of_parse_phandle(dev->of_node, "sram", 0); + if (ipa_slice_np) { + struct resource sram_res; + + ret =3D of_address_to_resource(ipa_slice_np, 0, &sram_res); + of_node_put(ipa_slice_np); + if (ret) + goto err_unmap; + + imem_base =3D sram_res.start; + imem_size =3D resource_size(&sram_res); + } else { + /* Backwards compatibility for DTs lacking + * an explicit reference + */ + imem_base =3D mem_data->imem_addr; + imem_size =3D mem_data->imem_size; + } + + ret =3D ipa_imem_init(ipa, imem_base, imem_size); if (ret) goto err_unmap; =20 --=20 2.53.0