* [PATCH net-next v4 1/3] dt-bindings: sram: qcom,imem: Allow modem-tables subnode
2026-02-19 13:49 [net-next PATCH v4 0/3] Grab IPA IMEM slice through DT Konrad Dybcio
@ 2026-02-19 13:49 ` Konrad Dybcio
2026-02-19 13:49 ` [PATCH net-next v4 2/3] dt-bindings: net: qcom,ipa: Add sram property for describing IMEM slice Konrad Dybcio
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Konrad Dybcio @ 2026-02-19 13:49 UTC (permalink / raw)
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, devicetree, linux-kernel, netdev,
Konrad Dybcio, Krzysztof Kozlowski, Alex Elder
From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
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 <krzysztof.kozlowski@oss.qualcomm.com>
Reviewed-by: Alex Elder <elder@riscstar.com>
Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
---
Documentation/devicetree/bindings/sram/qcom,imem.yaml | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/Documentation/devicetree/bindings/sram/qcom,imem.yaml b/Documentation/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#
patternProperties:
+ "^modem-tables@[0-9a-f]+$":
+ type: object
+ description:
+ Region containing packet processing configuration for the IP Accelerator.
+
+ 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
--
2.53.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH net-next v4 2/3] dt-bindings: net: qcom,ipa: Add sram property for describing IMEM slice
2026-02-19 13:49 [net-next PATCH v4 0/3] Grab IPA IMEM slice through DT Konrad Dybcio
2026-02-19 13:49 ` [PATCH net-next v4 1/3] dt-bindings: sram: qcom,imem: Allow modem-tables subnode Konrad Dybcio
@ 2026-02-19 13:49 ` Konrad Dybcio
2026-02-19 13:49 ` [PATCH net-next v4 3/3] net: ipa: Grab IMEM slice base/size from DTS Konrad Dybcio
2026-02-21 0:11 ` [net-next PATCH v4 0/3] Grab IPA IMEM slice through DT Jakub Kicinski
3 siblings, 0 replies; 5+ messages in thread
From: Konrad Dybcio @ 2026-02-19 13:49 UTC (permalink / raw)
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, devicetree, linux-kernel, netdev,
Konrad Dybcio, Alex Elder, Krzysztof Kozlowski
From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
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 <elder@riscstar.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
---
Documentation/devicetree/bindings/net/qcom,ipa.yaml | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/Documentation/devicetree/bindings/net/qcom,ipa.yaml b/Documentation/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.
+ 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
--
2.53.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH net-next v4 3/3] net: ipa: Grab IMEM slice base/size from DTS
2026-02-19 13:49 [net-next PATCH v4 0/3] Grab IPA IMEM slice through DT Konrad Dybcio
2026-02-19 13:49 ` [PATCH net-next v4 1/3] dt-bindings: sram: qcom,imem: Allow modem-tables subnode Konrad Dybcio
2026-02-19 13:49 ` [PATCH net-next v4 2/3] dt-bindings: net: qcom,ipa: Add sram property for describing IMEM slice Konrad Dybcio
@ 2026-02-19 13:49 ` Konrad Dybcio
2026-02-21 0:11 ` [net-next PATCH v4 0/3] Grab IPA IMEM slice through DT Jakub Kicinski
3 siblings, 0 replies; 5+ messages in thread
From: Konrad Dybcio @ 2026-02-19 13:49 UTC (permalink / raw)
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, devicetree, linux-kernel, netdev,
Konrad Dybcio, Alex Elder, Dmitry Baryshkov, Simon Horman
From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
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 <elder@riscstar.com>
Acked-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
---
drivers/net/ipa/ipa_data.h | 9 +++++++--
drivers/net/ipa/ipa_mem.c | 22 +++++++++++++++++++++-
2 files changed, 28 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;
};
diff --git a/drivers/net/ipa/ipa_mem.c b/drivers/net/ipa/ipa_mem.c
index 835a3c9c1fd4..5d3f68bd02d9 100644
--- a/drivers/net/ipa/ipa_mem.c
+++ b/drivers/net/ipa/ipa_mem.c
@@ -7,6 +7,7 @@
#include <linux/dma-mapping.h>
#include <linux/io.h>
#include <linux/iommu.h>
+#include <linux/of_address.h>
#include <linux/platform_device.h>
#include <linux/types.h>
@@ -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 = &pdev->dev;
+ u32 imem_base, imem_size;
struct resource *res;
int ret;
@@ -656,7 +659,24 @@ int ipa_mem_init(struct ipa *ipa, struct platform_device *pdev,
ipa->mem_addr = res->start;
ipa->mem_size = resource_size(res);
- ret = ipa_imem_init(ipa, mem_data->imem_addr, mem_data->imem_size);
+ ipa_slice_np = of_parse_phandle(dev->of_node, "sram", 0);
+ if (ipa_slice_np) {
+ ret = of_address_to_resource(ipa_slice_np, 0, res);
+ of_node_put(ipa_slice_np);
+ if (ret)
+ goto err_unmap;
+
+ imem_base = res->start;
+ imem_size = resource_size(res);
+ } else {
+ /* Backwards compatibility for DTs lacking
+ * an explicit reference
+ */
+ imem_base = mem_data->imem_addr;
+ imem_size = mem_data->imem_size;
+ }
+
+ ret = ipa_imem_init(ipa, imem_base, imem_size);
if (ret)
goto err_unmap;
--
2.53.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [net-next PATCH v4 0/3] Grab IPA IMEM slice through DT
2026-02-19 13:49 [net-next PATCH v4 0/3] Grab IPA IMEM slice through DT Konrad Dybcio
` (2 preceding siblings ...)
2026-02-19 13:49 ` [PATCH net-next v4 3/3] net: ipa: Grab IMEM slice base/size from DTS Konrad Dybcio
@ 2026-02-21 0:11 ` Jakub Kicinski
3 siblings, 0 replies; 5+ messages in thread
From: Jakub Kicinski @ 2026-02-21 0:11 UTC (permalink / raw)
To: Konrad Dybcio
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson,
Andrew Lunn, David S. Miller, Eric Dumazet, Paolo Abeni,
Alex Elder, Marijn Suijten, linux-arm-msm, devicetree,
linux-kernel, netdev, Konrad Dybcio, Krzysztof Kozlowski,
Alex Elder, Dmitry Baryshkov, Simon Horman, Krzysztof Kozlowski
On Thu, 19 Feb 2026 14:49:47 +0100 Konrad Dybcio wrote:
> This adds the necessary driver change to migrate over from
> hardcoded-per-IPA-version-but-varying-per-implementation numbers, while
> unfortunately keeping them in there for backwards compatibility.
>
> The DT changes will be submitted in a separate series, this one is OK
> to merge independently.
## Form letter - net-next-closed
We have already submitted our pull request with net-next material for v7.0,
and therefore net-next is closed for new drivers, features, code refactoring
and optimizations. We are currently accepting bug fixes only.
Please repost when net-next reopens after Feb 23rd.
RFC patches sent for review only are obviously welcome at any time.
See: https://www.kernel.org/doc/html/next/process/maintainer-netdev.html#development-cycle
--
pw-bot: defer
pv-bot: closed
^ permalink raw reply [flat|nested] 5+ messages in thread