From nobody Sun Apr 5 13:26:25 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 CC1D536BCD4; Tue, 17 Feb 2026 13:30:46 +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=1771335046; cv=none; b=il8Me4bmIriBjVL8vHxZOv0deM1BxSiay7N6U3twtwwmZ3wc6wmmoLH733JSg8swTtoK5iHDr/djXuH/ahtHD6BQw2+BSB3uJwCjtTERAmqoApMiZtVIpLKCfRl+LgmVe7CUxqd3O9NKM5hT/opjYNnZ61D4dOd5YNWuxKzRPKY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771335046; c=relaxed/simple; bh=0M9Dd0azDdSLBxIT5OL+TpdmsfjZf+cKrxgcoZpNdvo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=BKhHrUDQLEnofWYHhB+986l/WsOWTC/bkTPAlxq3z4FX+y0ijyZRIiXGXSakdQOGfBZbf2uqO6S1YEYNrwhw98WS8w7Wexohw8NcAOlPyGTW8V+r3EFSAtNXzPwmmtfjYyRNJ8kILg1GeTlnNzlzbHHfIgXOBwFJgjnRFTtWDPE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=B/b05Bv+; 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="B/b05Bv+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3B34AC19424; Tue, 17 Feb 2026 13:30:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1771335046; bh=0M9Dd0azDdSLBxIT5OL+TpdmsfjZf+cKrxgcoZpNdvo=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=B/b05Bv+LfTxbGl5oYUWEkEzZNSr3HgHyWxutJwWPT0s5xWIsc3vPNyiQ5LXrUN/U KD9XCVVN6L1/CzkaABiUEYH0ne8k1CQhtdz2BWwToebV2nPRmjgI+bKCs7T/8nNnz4 wOa73/VOLbvTdmtwzuIOQgbHi+OrUbCBWzHF/XuDzto/ETjl85eEqs7F4J+NjyAc3W Zw5eqayTb1dLnRfN1AJ3PZlegJ5kE8bSWViAfnVlOt85UGM/HJZ/4wE2kdKDdZrRkL ExXvTQFbPux/LUxpOm9MWaym5na6WJeoCNeIxaPFBbuXHrQOYPVI8wMChzzH599lmc wa9U6Uhi4ayYQ== From: Konrad Dybcio Date: Tue, 17 Feb 2026 14:30:31 +0100 Subject: [PATCH net-next v3 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: <20260217-topic-ipa_imem-v3-1-d6d8ed1dfb67@oss.qualcomm.com> References: <20260217-topic-ipa_imem-v3-0-d6d8ed1dfb67@oss.qualcomm.com> In-Reply-To: <20260217-topic-ipa_imem-v3-0-d6d8ed1dfb67@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 X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1771335036; l=1360; i=konrad.dybcio@oss.qualcomm.com; s=20230215; h=from:subject:message-id; bh=VAi1muvo7JWVgjq38LEgp0VTJgMrkoPVsq0eeChfM0g=; b=PWFYj69hN81Uu/g8L01nxknVXA+B3kr8nW/qHaeRNkoq7I6wtPuZgEckqKaNwlvf9fCa+UVrk T/waaMzt9J0B5arvPqlUm8rq5hqf6mYFM8xQuyEBeDu8xUzF7ACHrEU 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. Signed-off-by: Konrad Dybcio Reviewed-by: Alex Elder Reviewed-by: Krzysztof Kozlowski --- 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 Sun Apr 5 13:26:25 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 5FDE736B060; Tue, 17 Feb 2026 13:30:51 +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=1771335051; cv=none; b=Q3uHRnsDz3AiC43rht4RPmNAJOaM0X7V1t2Kfcj0gOY11lDSztBv2IuTg48w+ZIMqDizUVN2/MNPjVEJ71hwXwKfQldXFwrp7KdeSPXJ6o9AiJLkixuQQoh0BvPU7OHj5KO0fAOZcwCZuw2oRIOl60FvimoH+NMo9dgBsktLqmM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771335051; c=relaxed/simple; bh=2dYSFWHyj4X3N9lIZ8cPMHQHezOGMsV6I5UBAIu+Dd8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=s8ddPNPK13UOjTMnDI2EAil0GQcE70Ezv6zHFMDYMkUPZzWbRR+v7mLMy00vd4OBNHyFi4i5bKa0HwaAGTrmJZNxj7jKm+Xq43alPgR2CqCCr+yQXGyFZmUq6nMjvsDzF/mkd6EEk2rh0+KZGY3crAljzcb7BhSyPfs3AXa+PkA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=nOXAZTGB; 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="nOXAZTGB" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D5102C4CEF7; Tue, 17 Feb 2026 13:30:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1771335051; bh=2dYSFWHyj4X3N9lIZ8cPMHQHezOGMsV6I5UBAIu+Dd8=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=nOXAZTGBii0gc2jU3prxuTQ/S/jSlK56ocqC1HCfUPiGavMRm32TEIuwLzKAGpqfj cBH2+pDPQqvj+rkxzpNgW6SKt1Ht1KnXJqXcvQwZ8975NFOvem6FyFzf7kCspFdyrC Zo1nXgwlACCU5F7El1u8Y6HP0uCE231xyhVzNDZeWvUx1QPNs+E0rv2NAsq6HdjbgI H8ym1uBhN3RlloYRd2iVw+p92NP0O1PK/48uR0Nbo5XVQArHARxr/U944bRRYRp4/f cW7lAf8/aZoiwwR76Ezwx2DLizY/mRJd76oxAGMvXSreeuP1hxWzk3Oo6Bjj1le5mL OfQVrXXLSNWvw== From: Konrad Dybcio Date: Tue, 17 Feb 2026 14:30:32 +0100 Subject: [PATCH net-next v3 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: <20260217-topic-ipa_imem-v3-2-d6d8ed1dfb67@oss.qualcomm.com> References: <20260217-topic-ipa_imem-v3-0-d6d8ed1dfb67@oss.qualcomm.com> In-Reply-To: <20260217-topic-ipa_imem-v3-0-d6d8ed1dfb67@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=1771335036; l=1543; i=konrad.dybcio@oss.qualcomm.com; s=20230215; h=from:subject:message-id; bh=FtJRSrboOafEtcZXaNS6FW/2KBBL5SVhQOA5zYIeMBE=; b=EX5x1oE/s/FmoZ2ssY9lmqXW4GA3mEWGAnZLAFlbKNlRbAxvgirbu8T7pYHYWXoS2nc8K5bVF dvxd6e1PT/WDPWI055ND39PimC191vITdj7QRfCcmVosnvomfHRmW7c 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 Sun Apr 5 13:26:25 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 B407932548C; Tue, 17 Feb 2026 13:30:56 +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=1771335056; cv=none; b=r69WjHBAhkuUEJx24hGPwt7lP0Urugi897AvQ37eNHm46ztcUPWEfpRLZn4EtuoLbjidZFDotUzpS+cHX+vWTqR/jqrIep6Ofe1ugTDkJGksT56hnVXCjsWpEtAtBFLpTQvoqPsW4J45PXY7lMtnbc/wprltnRNx3NOCDYTGiqk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771335056; c=relaxed/simple; bh=1rLFpL4Uwtqdb0H/T/vGwCmqj19wxgLIAnLHuOiEYYk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=bH+ZFOJL77t5gMbeZZaE2BMNtgYYewwu7mMPGcX+75ig5hWNsPh7xhgDTXd9R6lgtFP2nH0Hu4phoEaINdJ/BY+njeSxma2wTacwFPKfBmjK1xTA1TO3vPHIZf9spPh1h7fxRJdtX9WfRM2Bh762FydyjvdoTZjdGphVDQfWmgE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=AsPVwg8s; 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="AsPVwg8s" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9032EC4CEF7; Tue, 17 Feb 2026 13:30:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1771335056; bh=1rLFpL4Uwtqdb0H/T/vGwCmqj19wxgLIAnLHuOiEYYk=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=AsPVwg8sUL+ZtiB3njQKqvHKKv5g6f4QzJNhk9yyUGPUEZTredmyyklYdLpYuU5Km 9mJinBNjaATj6AFJmGl1kApHrVCVWzilolhsqUQr3jH6czdON8qg4kUuK3lYAKLOHO y2rZ0Bo5SDgv42iakXO1L0lvmPC1I9NOqTH87BLuoAObp3JPmd4A7nP9aFtwMAK5oi juXG9iOX6e7roN+wRZ+t9s+V4u8xvrx6v4WW6gZbYVyLxiYZdCS6SOSRwKY6sF7yTg PfD5ix4CTPFfhKr3A9HuDIs8p4PHhcb5PUlMS6VzDzBV5Af6K4ecpBHReGEgK0sbbl FDp6bdH8T24rA== From: Konrad Dybcio Date: Tue, 17 Feb 2026 14:30:33 +0100 Subject: [PATCH net-next v3 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: <20260217-topic-ipa_imem-v3-3-d6d8ed1dfb67@oss.qualcomm.com> References: <20260217-topic-ipa_imem-v3-0-d6d8ed1dfb67@oss.qualcomm.com> In-Reply-To: <20260217-topic-ipa_imem-v3-0-d6d8ed1dfb67@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=1771335036; l=2618; i=konrad.dybcio@oss.qualcomm.com; s=20230215; h=from:subject:message-id; bh=d2RMINvOV7bNStCWiw3Bqaw/rVPWmmHqQzpiKgrBtF0=; b=YhXT572fSQ1ifKpMECPi9DOcNowWYxzl9/N77/ZdiYnT3LMH96pNZoXk+IuHQ0Gdowx+otzXg GPDT5NAuR6pCkZZ4bHpCzjHvUd9Zayg+Bz0MYj89gKE+Hj//8KA8gV+ 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 | 4 ++++ drivers/net/ipa/ipa_mem.c | 21 ++++++++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/drivers/net/ipa/ipa_data.h b/drivers/net/ipa/ipa_data.h index 2fd03f0799b2..5fe164981083 100644 --- a/drivers/net/ipa/ipa_data.h +++ b/drivers/net/ipa/ipa_data.h @@ -185,8 +185,12 @@ struct ipa_resource_data { struct ipa_mem_data { u32 local_count; const struct ipa_mem *local; + + /* DEPRECATED (now passed via DT) fallback data, + * varies per chip and not per IPA version */ u32 imem_addr; u32 imem_size; + u32 smem_size; }; =20 diff --git a/drivers/net/ipa/ipa_mem.c b/drivers/net/ipa/ipa_mem.c index 835a3c9c1fd4..583aea625709 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,23 @@ 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) { + ret =3D of_address_to_resource(ipa_slice_np, 0, res); + of_node_put(ipa_slice_np); + if (ret) + return ret; + + imem_base =3D res->start; + imem_size =3D resource_size(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