All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] SM8450 IPA support
@ 2026-09-09  3:10 Esteban Urrutia
  2026-09-09  3:11 ` [PATCH v2 1/3] dt-bindings: net: qcom,ipa: Add SM8450 compatible Esteban Urrutia
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Esteban Urrutia @ 2026-09-09  3:10 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Alex Elder, Bjorn Andersson, Konrad Dybcio
  Cc: Esteban Urrutia, Nazar Kompanets, linux-arm-msm, netdev,
	devicetree, linux-kernel, phone-devel, Krzysztof Kozlowski

This series has been tested on the following SoCs:
- SM7475
- SM8450
- SM8475
In these the modem works as expected and no crashes occur.

Signed-off-by: Esteban Urrutia <esteuwu@proton.me>
---
Changes in v2:
- Add missing resource limits for DMA and QDSS source groups.
  - These are marked as unused downstream, but still have values written
  to them.
- Add Nazar as a co-developer.
  - We developed independent implementations and are both working on
  this series.
- Add the IPA_MEM_MODEM_STATS_DROP memory region.
- Pick tags.
- Rebase against linux-next.
- Remove comment in driver stating smem_size differences.
  For both SM8450 and SM8475 SoCs:
  - All devices based on these SoCs use an smem_size of 0x9000. [1]
  - Specifying an smem_size of 0xb000 causes the modem to assert a
  shared memory allocation failure. [2]
- Remove overlapping optional memory regions.
  - No comments from anyone regarding these, so remove them.
- Reorder patches. (Dmitry, Krzysztof)
- Sort iommus property in DT. (Krzysztof)
- Specify actual IMEM base and size in DT. (Konrad)
- Update commit messages and cover letter.
- Link to v1: https://patch.msgid.link/20260622-sm8450-ipa-v1-0-532f0299f96e@proton.me

[1] https://github.com/sm8450-mainline/fdt
[2] https://github.com/dopaemon/android_kernel_xiaomi_sm8450-devicetrees/commit/0cff0b070363fb9a312ba6e66244898013e7038f

To: Andrew Lunn <andrew+netdev@lunn.ch>
To: "David S. Miller" <davem@davemloft.net>
To: Eric Dumazet <edumazet@google.com>
To: Jakub Kicinski <kuba@kernel.org>
To: Paolo Abeni <pabeni@redhat.com>
To: Rob Herring <robh@kernel.org>
To: Krzysztof Kozlowski <krzk+dt@kernel.org>
To: Conor Dooley <conor+dt@kernel.org>
To: Alex Elder <elder@kernel.org>
To: Bjorn Andersson <andersson@kernel.org>
To: Konrad Dybcio <konradybcio@kernel.org>
Cc: Nazar Kompanets <xlie7669@gmail.com>
Cc: linux-arm-msm@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: phone-devel@vger.kernel.org

---
Esteban Urrutia (3):
      dt-bindings: net: qcom,ipa: Add SM8450 compatible
      net: ipa: Add IPA v5.1 configuration data
      arm64: dts: qcom: sm8450: Add IPA node

 .../devicetree/bindings/net/qcom,ipa.yaml          |   1 +
 arch/arm64/boot/dts/qcom/sm8450.dtsi               |  59 ++-
 drivers/net/ipa/Makefile                           |   2 +-
 drivers/net/ipa/data/ipa_data-v5.1.c               | 476 +++++++++++++++++++++
 drivers/net/ipa/gsi_reg.c                          |   1 +
 drivers/net/ipa/ipa_data.h                         |   1 +
 drivers/net/ipa/ipa_main.c                         |   4 +
 drivers/net/ipa/ipa_reg.c                          |   1 +
 8 files changed, 537 insertions(+), 8 deletions(-)
---
base-commit: a9d7ced84989ec05be09b4b8428759ef60450a0f
change-id: 20260908-sm8450-ipa-4dfc931c8ce0

Best regards,
--  
Esteban Urrutia <esteuwu@proton.me>



^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v2 1/3] dt-bindings: net: qcom,ipa: Add SM8450 compatible
  2026-09-09  3:10 [PATCH v2 0/3] SM8450 IPA support Esteban Urrutia
@ 2026-09-09  3:11 ` Esteban Urrutia
  2026-09-09  3:11 ` [PATCH v2 2/3] net: ipa: Add IPA v5.1 configuration data Esteban Urrutia
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 10+ messages in thread
From: Esteban Urrutia @ 2026-09-09  3:11 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Alex Elder, Bjorn Andersson, Konrad Dybcio
  Cc: Esteban Urrutia, Nazar Kompanets, linux-arm-msm, netdev,
	devicetree, linux-kernel, phone-devel, Krzysztof Kozlowski

Add support for the SM8450 SoC, which uses IPA v5.1.

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Co-developed-by: Nazar Kompanets <xlie7669@gmail.com>
Signed-off-by: Nazar Kompanets <xlie7669@gmail.com>
Signed-off-by: Esteban Urrutia <esteuwu@proton.me>
---
 Documentation/devicetree/bindings/net/qcom,ipa.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/net/qcom,ipa.yaml b/Documentation/devicetree/bindings/net/qcom,ipa.yaml
index 68ec76fe4473..db91bfaaf833 100644
--- a/Documentation/devicetree/bindings/net/qcom,ipa.yaml
+++ b/Documentation/devicetree/bindings/net/qcom,ipa.yaml
@@ -53,6 +53,7 @@ properties:
           - qcom,sdx65-ipa
           - qcom,sm6350-ipa
           - qcom,sm8350-ipa
+          - qcom,sm8450-ipa
           - qcom,sm8550-ipa
       - items:
           - enum:

-- 
2.55.0



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 2/3] net: ipa: Add IPA v5.1 configuration data
  2026-09-09  3:10 [PATCH v2 0/3] SM8450 IPA support Esteban Urrutia
  2026-09-09  3:11 ` [PATCH v2 1/3] dt-bindings: net: qcom,ipa: Add SM8450 compatible Esteban Urrutia
@ 2026-09-09  3:11 ` Esteban Urrutia
  2026-09-10  3:11   ` sashiko-bot
  2026-09-09  3:11 ` [PATCH v2 3/3] arm64: dts: qcom: sm8450: Add IPA node Esteban Urrutia
  2026-09-09  3:12 ` [PATCH v2 0/3] SM8450 IPA support Esteban Urrutia
  3 siblings, 1 reply; 10+ messages in thread
From: Esteban Urrutia @ 2026-09-09  3:11 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Alex Elder, Bjorn Andersson, Konrad Dybcio
  Cc: Esteban Urrutia, Nazar Kompanets, linux-arm-msm, netdev,
	devicetree, linux-kernel, phone-devel

Add the configuration data required for IPA v5.1, which is used in the
Qualcomm SM8450 SoC.

Co-developed-by: Nazar Kompanets <xlie7669@gmail.com>
Signed-off-by: Nazar Kompanets <xlie7669@gmail.com>
Signed-off-by: Esteban Urrutia <esteuwu@proton.me>
---
 drivers/net/ipa/Makefile             |   2 +-
 drivers/net/ipa/data/ipa_data-v5.1.c | 476 +++++++++++++++++++++++++++++++++++
 drivers/net/ipa/gsi_reg.c            |   1 +
 drivers/net/ipa/ipa_data.h           |   1 +
 drivers/net/ipa/ipa_main.c           |   4 +
 drivers/net/ipa/ipa_reg.c            |   1 +
 6 files changed, 484 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ipa/Makefile b/drivers/net/ipa/Makefile
index e148ec3c1a10..d4995c2e8ca0 100644
--- a/drivers/net/ipa/Makefile
+++ b/drivers/net/ipa/Makefile
@@ -7,7 +7,7 @@ IPA_REG_VERSIONS	:=	3.1 3.5.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.2 4.5 4.7 4.9 4.11 5.0 5.1 5.2 5.5
 
 obj-$(CONFIG_QCOM_IPA)	+=	ipa.o
 
diff --git a/drivers/net/ipa/data/ipa_data-v5.1.c b/drivers/net/ipa/data/ipa_data-v5.1.c
new file mode 100644
index 000000000000..7d7bc193b774
--- /dev/null
+++ b/drivers/net/ipa/data/ipa_data-v5.1.c
@@ -0,0 +1,476 @@
+// SPDX-License-Identifier: GPL-2.0
+
+/* Copyright (C) 2023-2024 Linaro Ltd. */
+/* Copyright (C) 2026 Nazar Kompanets <xlie7669@gmail.com> */
+/* Copyright (C) 2026 Esteban Urrutia <esteuwu@proton.me> */
+
+#include <linux/array_size.h>
+#include <linux/log2.h>
+
+#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 v5.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,
+	IPA_RESOURCE_TYPE_DST_ULSO_SEGMENTS,
+};
+
+/* Resource groups used for an SoC having IPA v5.1 */
+enum ipa_rsrc_group_id {
+	/* Source resource group identifiers */
+	IPA_RSRC_GROUP_SRC_UL				= 0,
+	IPA_RSRC_GROUP_SRC_DL,
+	IPA_RSRC_GROUP_SRC_DMA,
+	IPA_RSRC_GROUP_SRC_QDSS,
+	IPA_RSRC_GROUP_SRC_URLLC,
+	IPA_RSRC_GROUP_SRC_U_RX_QC,
+	IPA_RSRC_GROUP_SRC_COUNT,	/* Last in set; not a source group */
+
+	/* Destination resource group identifiers */
+	IPA_RSRC_GROUP_DST_UL				= 0,
+	IPA_RSRC_GROUP_DST_DL,
+	IPA_RSRC_GROUP_DST_UNUSED_2,
+	IPA_RSRC_GROUP_DST_UNUSED_3,
+	IPA_RSRC_GROUP_DST_UNUSED_4,
+	IPA_RSRC_GROUP_DST_UC,
+	IPA_RSRC_GROUP_DST_DRB_IP,
+	IPA_RSRC_GROUP_DST_COUNT,	/* Last; not a destination group */
+};
+
+/* QSB configuration data for an SoC having IPA v5.1 */
+static const struct ipa_qsb_data ipa_qsb_data[] = {
+	[IPA_QSB_MASTER_DDR] = {
+		.max_writes		= 0,
+		.max_reads		= 0,	/* no limit (hardware max) */
+		.max_reads_beats	= 0,
+	},
+	[IPA_QSB_MASTER_PCIE] = {
+		.max_writes		= 0,
+		.max_reads		= 0,	/* no limit (hardware max) */
+		.max_reads_beats	= 0,
+	},
+};
+
+/* Endpoint configuration data for an SoC having IPA v5.1 */
+static const struct ipa_gsi_endpoint_data ipa_gsi_endpoint_data[] = {
+	[IPA_ENDPOINT_AP_COMMAND_TX] = {
+		.ee_id		= GSI_EE_AP,
+		.channel_id	= 12,
+		.endpoint_id	= 14,
+		.toward_ipa	= true,
+		.channel = {
+			.tre_count	= 256,
+			.event_count	= 256,
+			.tlv_count	= 20,
+		},
+		.endpoint = {
+			.config = {
+				.resource_group	= IPA_RSRC_GROUP_SRC_UL,
+				.dma_mode	= true,
+				.dma_endpoint	= IPA_ENDPOINT_AP_LAN_RX,
+				.tx = {
+					.seq_type = IPA_SEQ_DMA,
+				},
+			},
+		},
+	},
+	[IPA_ENDPOINT_AP_LAN_RX] = {
+		.ee_id		= GSI_EE_AP,
+		.channel_id	= 13,
+		.endpoint_id	= 16,
+		.toward_ipa	= false,
+		.channel = {
+			.tre_count	= 256,
+			.event_count	= 256,
+			.tlv_count	= 9,
+		},
+		.endpoint = {
+			.config = {
+				.resource_group	= IPA_RSRC_GROUP_DST_UL,
+				.aggregation	= true,
+				.status_enable	= true,
+				.rx = {
+					.buffer_size	= 8192,
+					.pad_align	= ilog2(sizeof(u32)),
+					.aggr_time_limit = 500,
+				},
+			},
+		},
+	},
+	[IPA_ENDPOINT_AP_MODEM_TX] = {
+		.ee_id		= GSI_EE_AP,
+		.channel_id	= 11,
+		.endpoint_id	= 2,
+		.toward_ipa	= true,
+		.channel = {
+			.tre_count	= 512,
+			.event_count	= 512,
+			.tlv_count	= 25,
+		},
+		.endpoint = {
+			.filter_support	= true,
+			.config = {
+				.resource_group	= IPA_RSRC_GROUP_SRC_UL,
+				.checksum       = true,
+				.qmap		= true,
+				.status_enable	= true,
+				.tx = {
+					.seq_type = IPA_SEQ_2_PASS_SKIP_LAST_UC,
+					.status_endpoint =
+						IPA_ENDPOINT_MODEM_AP_RX,
+				},
+			},
+		},
+	},
+	[IPA_ENDPOINT_AP_MODEM_RX] = {
+		.ee_id		= GSI_EE_AP,
+		.channel_id	= 1,
+		.endpoint_id	= 23,
+		.toward_ipa	= false,
+		.channel = {
+			.tre_count	= 256,
+			.event_count	= 256,
+			.tlv_count	= 9,
+		},
+		.endpoint = {
+			.config = {
+				.resource_group	= IPA_RSRC_GROUP_DST_UL,
+				.checksum       = true,
+				.qmap		= true,
+				.aggregation	= true,
+				.rx = {
+					.buffer_size	= 8192,
+					.aggr_time_limit = 500,
+					.aggr_close_eof	= true,
+				},
+			},
+		},
+	},
+	[IPA_ENDPOINT_MODEM_AP_TX] = {
+		.ee_id		= GSI_EE_MODEM,
+		.channel_id	= 0,
+		.endpoint_id	= 12,
+		.toward_ipa	= true,
+		.endpoint = {
+			.filter_support	= true,
+		},
+	},
+	[IPA_ENDPOINT_MODEM_AP_RX] = {
+		.ee_id		= GSI_EE_MODEM,
+		.channel_id	= 7,
+		.endpoint_id	= 21,
+		.toward_ipa	= false,
+	},
+	[IPA_ENDPOINT_MODEM_DL_NLO_TX] = {
+		.ee_id		= GSI_EE_MODEM,
+		.channel_id	= 2,
+		.endpoint_id	= 15,
+		.toward_ipa	= true,
+		.endpoint = {
+			.filter_support	= true,
+		},
+	},
+};
+
+/* Source resource configuration data for an SoC having IPA v5.1 */
+static const struct ipa_resource ipa_resource_src[] = {
+	[IPA_RESOURCE_TYPE_SRC_PKT_CONTEXTS] = {
+		.limits[IPA_RSRC_GROUP_SRC_UL] = {
+			.min = 7,	.max = 12,
+		},
+		.limits[IPA_RSRC_GROUP_SRC_URLLC] = {
+			.min = 1,	.max = 63,
+		},
+		.limits[IPA_RSRC_GROUP_SRC_U_RX_QC] = {
+			.min = 0,	.max = 63,
+		},
+	},
+	[IPA_RESOURCE_TYPE_SRC_DESCRIPTOR_LISTS] = {
+		.limits[IPA_RSRC_GROUP_SRC_UL] = {
+			.min = 21,	.max = 21,
+		},
+		.limits[IPA_RSRC_GROUP_SRC_URLLC] = {
+			.min = 10,	.max = 10,
+		},
+	},
+	[IPA_RESOURCE_TYPE_SRC_DESCRIPTOR_BUFF] = {
+		.limits[IPA_RSRC_GROUP_SRC_UL] = {
+			.min = 33,	.max = 33,
+		},
+		.limits[IPA_RSRC_GROUP_SRC_URLLC] = {
+			.min = 20,	.max = 20,
+		},
+	},
+	[IPA_RESOURCE_TYPE_SRC_HPS_DMARS] = {
+		.limits[IPA_RSRC_GROUP_SRC_UL] = {
+			.min = 0,	.max = 63,
+		},
+		/* Marked as unused downstream */
+		.limits[IPA_RSRC_GROUP_SRC_DMA] = {
+			.min = 0,	.max = 63,
+		},
+		/* Marked as unused downstream */
+		.limits[IPA_RSRC_GROUP_SRC_QDSS] = {
+			.min = 0,	.max = 63,
+		},
+		.limits[IPA_RSRC_GROUP_SRC_URLLC] = {
+			.min = 1,	.max = 63,
+		},
+		.limits[IPA_RSRC_GROUP_SRC_U_RX_QC] = {
+			.min = 0,	.max = 63,
+		},
+	},
+	[IPA_RESOURCE_TYPE_SRC_ACK_ENTRIES] = {
+		.limits[IPA_RSRC_GROUP_SRC_UL] = {
+			.min = 38,	.max = 38,
+		},
+		.limits[IPA_RSRC_GROUP_SRC_URLLC] = {
+			.min = 16,	.max = 16,
+		},
+	},
+};
+
+/* Destination resource configuration data for an SoC having IPA v5.1 */
+static const struct ipa_resource ipa_resource_dst[] = {
+	[IPA_RESOURCE_TYPE_DST_DATA_SECTORS] = {
+		.limits[IPA_RSRC_GROUP_DST_UL] = {
+			.min = 6,	.max = 6,
+		},
+		.limits[IPA_RSRC_GROUP_DST_DL] = {
+			.min = 5,	.max = 5,
+		},
+		.limits[IPA_RSRC_GROUP_DST_DRB_IP] = {
+			.min = 39,	.max = 39,
+		},
+	},
+	[IPA_RESOURCE_TYPE_DST_DPS_DMARS] = {
+		.limits[IPA_RSRC_GROUP_DST_UL] = {
+			.min = 0,	.max = 3,
+		},
+		.limits[IPA_RSRC_GROUP_DST_DL] = {
+			.min = 0,	.max = 3,
+		},
+	},
+	[IPA_RESOURCE_TYPE_DST_ULSO_SEGMENTS] = {
+		.limits[IPA_RSRC_GROUP_DST_UL] = {
+			.min = 0,	.max = 63,
+		},
+		.limits[IPA_RSRC_GROUP_DST_DL] = {
+			.min = 0,	.max = 63,
+		},
+	},
+};
+
+/* Resource configuration data for an SoC having IPA v5.1 */
+static const struct ipa_resource_data ipa_resource_data = {
+	.rsrc_group_dst_count	= IPA_RSRC_GROUP_DST_COUNT,
+	.rsrc_group_src_count	= IPA_RSRC_GROUP_SRC_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 v5.1 */
+static const struct ipa_mem ipa_mem_local_data[] = {
+	{
+		.id		= IPA_MEM_UC_EVENT_RING,
+		.offset		= 0x0000,
+		.size		= 0x1000,
+		.canary_count	= 0,
+	},
+	{
+		.id		= IPA_MEM_UC_SHARED,
+		.offset		= 0x1000,
+		.size		= 0x0080,
+		.canary_count	= 0,
+	},
+	{
+		.id		= IPA_MEM_UC_INFO,
+		.offset		= 0x1080,
+		.size		= 0x0200,
+		.canary_count	= 0,
+	},
+	{
+		.id		= IPA_MEM_V4_FILTER_HASHED,
+		.offset		= 0x1288,
+		.size		= 0x0078,
+		.canary_count	= 2,
+	},
+	{
+		.id		= IPA_MEM_V4_FILTER,
+		.offset		= 0x1308,
+		.size		= 0x0078,
+		.canary_count	= 2,
+	},
+	{
+		.id		= IPA_MEM_V6_FILTER_HASHED,
+		.offset		= 0x1388,
+		.size		= 0x0078,
+		.canary_count	= 2,
+	},
+	{
+		.id		= IPA_MEM_V6_FILTER,
+		.offset		= 0x1408,
+		.size		= 0x0078,
+		.canary_count	= 2,
+	},
+	{
+		.id		= IPA_MEM_V4_ROUTE_HASHED,
+		.offset		= 0x1488,
+		.size		= 0x0098,
+		.canary_count	= 2,
+	},
+	{
+		.id		= IPA_MEM_V4_ROUTE,
+		.offset		= 0x1528,
+		.size		= 0x0098,
+		.canary_count	= 2,
+	},
+	{
+		.id		= IPA_MEM_V6_ROUTE_HASHED,
+		.offset		= 0x15c8,
+		.size		= 0x0098,
+		.canary_count	= 2,
+	},
+	{
+		.id		= IPA_MEM_V6_ROUTE,
+		.offset		= 0x1668,
+		.size		= 0x0098,
+		.canary_count	= 2,
+	},
+	{
+		.id		= IPA_MEM_MODEM_HEADER,
+		.offset		= 0x1708,
+		.size		= 0x0240,
+		.canary_count	= 2,
+	},
+	{
+		.id		= IPA_MEM_AP_HEADER,
+		.offset		= 0x1948,
+		.size		= 0x01e0,
+		.canary_count	= 0,
+	},
+	{
+		.id		= IPA_MEM_MODEM_PROC_CTX,
+		.offset		= 0x1b40,
+		.size		= 0x0b20,
+		.canary_count	= 2,
+	},
+	{
+		.id		= IPA_MEM_AP_PROC_CTX,
+		.offset		= 0x2660,
+		.size		= 0x0200,
+		.canary_count	= 0,
+	},
+	{
+		.id		= IPA_MEM_STATS_QUOTA_MODEM,
+		.offset		= 0x2868,
+		.size		= 0x0060,
+		.canary_count	= 2,
+	},
+	{
+		.id		= IPA_MEM_STATS_QUOTA_AP,
+		.offset		= 0x28c8,
+		.size		= 0x0048,
+		.canary_count	= 0,
+	},
+	{
+		.id		= IPA_MEM_STATS_TETHERING,
+		.offset		= 0x2910,
+		.size		= 0x03c0,
+		.canary_count	= 0,
+	},
+	{
+		.id		= IPA_MEM_STATS_FILTER_ROUTE,
+		.offset		= 0x2cd0,
+		.size		= 0x0ba0,
+		.canary_count	= 2,
+	},
+	{
+		.id		= IPA_MEM_STATS_DROP,
+		.offset		= 0x3870,
+		.size		= 0x0020,
+		.canary_count	= 0,
+	},
+	{
+		.id		= IPA_MEM_MODEM,
+		.offset		= 0x3898,
+		.size		= 0x0d48,
+		.canary_count	= 2,
+	},
+	{
+		.id		= IPA_MEM_NAT_TABLE,
+		.offset		= 0x45e0,
+		.size		= 0x0900,
+		.canary_count	= 0,
+	},
+	{
+		.id		= IPA_MEM_PDN_CONFIG,
+		.offset		= 0x4ee8,
+		.size		= 0x0100,
+		.canary_count	= 2,
+	},
+	{
+		.id		= IPA_MEM_MODEM_STATS_DROP,
+		.offset		= 0x4fe8,
+		.size		= 0x0018,
+		.canary_count	= 0,
+	},
+};
+
+/* Memory configuration data for an SoC having IPA v5.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	= 0x146a8000,
+	.imem_size	= 0x00002000,
+	.smem_size	= 0x00009000,
+};
+
+/* Interconnect rates are in 1000 byte/second units */
+static const struct ipa_interconnect_data ipa_interconnect_data[] = {
+	{
+		.name			= "memory",
+		.peak_bandwidth		= 1900000,	/* 1.9 GBps */
+		.average_bandwidth	= 590000,	/* 590 MBps */
+	},
+	/* Average rate is unused for the next interconnect */
+	{
+		.name			= "config",
+		.peak_bandwidth		= 76800,	/* 76.8 MBps */
+		.average_bandwidth	= 0,		/* unused */
+	},
+};
+
+/* Clock and interconnect configuration data for an SoC having IPA v5.1 */
+static const struct ipa_power_data ipa_power_data = {
+	.core_clock_rate	= 120 * 1000 * 1000,	/* Hz */
+	.interconnect_count	= ARRAY_SIZE(ipa_interconnect_data),
+	.interconnect_data	= ipa_interconnect_data,
+};
+
+/* Configuration data for an SoC having IPA v5.1. */
+const struct ipa_data ipa_data_v5_1 = {
+	.version		= IPA_VERSION_5_1,
+	.qsb_count		= ARRAY_SIZE(ipa_qsb_data),
+	.qsb_data		= ipa_qsb_data,
+	.modem_route_count	= 11,
+	.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/gsi_reg.c b/drivers/net/ipa/gsi_reg.c
index e13cf835a013..a57072ba4bef 100644
--- a/drivers/net/ipa/gsi_reg.c
+++ b/drivers/net/ipa/gsi_reg.c
@@ -110,6 +110,7 @@ static const struct regs *gsi_regs(struct gsi *gsi)
 		return &gsi_regs_v4_11;
 
 	case IPA_VERSION_5_0:
+	case IPA_VERSION_5_1:
 	case IPA_VERSION_5_2:
 	case IPA_VERSION_5_5:
 		return &gsi_regs_v5_0;
diff --git a/drivers/net/ipa/ipa_data.h b/drivers/net/ipa/ipa_data.h
index 3eb9dc2ce339..fe6f7d5bfe88 100644
--- a/drivers/net/ipa/ipa_data.h
+++ b/drivers/net/ipa/ipa_data.h
@@ -253,6 +253,7 @@ extern const struct ipa_data ipa_data_v4_7;
 extern const struct ipa_data ipa_data_v4_9;
 extern const struct ipa_data ipa_data_v4_11;
 extern const struct ipa_data ipa_data_v5_0;
+extern const struct ipa_data ipa_data_v5_1;
 extern const struct ipa_data ipa_data_v5_2;
 extern const struct ipa_data ipa_data_v5_5;
 
diff --git a/drivers/net/ipa/ipa_main.c b/drivers/net/ipa/ipa_main.c
index 14ac2d2faf7c..84bec461d22c 100644
--- a/drivers/net/ipa/ipa_main.c
+++ b/drivers/net/ipa/ipa_main.c
@@ -672,6 +672,10 @@ static const struct of_device_id ipa_match[] = {
 		.compatible	= "qcom,sdx65-ipa",
 		.data		= &ipa_data_v5_0,
 	},
+	{
+		.compatible	= "qcom,sm8450-ipa",
+		.data		= &ipa_data_v5_1,
+	},
 	{
 		.compatible	= "qcom,milos-ipa",
 		.data		= &ipa_data_v5_2,
diff --git a/drivers/net/ipa/ipa_reg.c b/drivers/net/ipa/ipa_reg.c
index 30bd69f4c147..5f22ca6295b1 100644
--- a/drivers/net/ipa/ipa_reg.c
+++ b/drivers/net/ipa/ipa_reg.c
@@ -125,6 +125,7 @@ static const struct regs *ipa_regs(enum ipa_version version)
 	case IPA_VERSION_4_11:
 		return &ipa_regs_v4_11;
 	case IPA_VERSION_5_0:
+	case IPA_VERSION_5_1:
 	case IPA_VERSION_5_2:
 		return &ipa_regs_v5_0;
 	case IPA_VERSION_5_5:

-- 
2.55.0



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 3/3] arm64: dts: qcom: sm8450: Add IPA node
  2026-09-09  3:10 [PATCH v2 0/3] SM8450 IPA support Esteban Urrutia
  2026-09-09  3:11 ` [PATCH v2 1/3] dt-bindings: net: qcom,ipa: Add SM8450 compatible Esteban Urrutia
  2026-09-09  3:11 ` [PATCH v2 2/3] net: ipa: Add IPA v5.1 configuration data Esteban Urrutia
@ 2026-09-09  3:11 ` Esteban Urrutia
  2026-09-09 19:06   ` Dmitry Baryshkov
  2026-09-10  3:11   ` sashiko-bot
  2026-09-09  3:12 ` [PATCH v2 0/3] SM8450 IPA support Esteban Urrutia
  3 siblings, 2 replies; 10+ messages in thread
From: Esteban Urrutia @ 2026-09-09  3:11 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Alex Elder, Bjorn Andersson, Konrad Dybcio
  Cc: Esteban Urrutia, Nazar Kompanets, linux-arm-msm, netdev,
	devicetree, linux-kernel, phone-devel

Add the description of the IPA block in the SM8450 SoC.

Co-developed-by: Nazar Kompanets <xlie7669@gmail.com>
Signed-off-by: Nazar Kompanets <xlie7669@gmail.com>
Signed-off-by: Esteban Urrutia <esteuwu@proton.me>
---
 arch/arm64/boot/dts/qcom/sm8450.dtsi | 59 +++++++++++++++++++++++++++++++-----
 1 file changed, 52 insertions(+), 7 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi
index b8793482b181..95b6fd22a846 100644
--- a/arch/arm64/boot/dts/qcom/sm8450.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi
@@ -2625,6 +2625,47 @@ adreno_smmu: iommu@3da0000 {
 			dma-coherent;
 		};
 
+		ipa: ipa@3f40000 {
+			compatible = "qcom,sm8450-ipa";
+
+			reg = <0 0x3f40000 0 0x10000>,
+			      <0 0x3f50000 0 0x5000>,
+			      <0 0x3e04000 0 0xfc000>;
+			reg-names = "ipa-reg",
+				    "ipa-shared",
+				    "gsi";
+			iommus = <&apps_smmu 0x5c0 0x0>,
+				 <&apps_smmu 0x5c2 0x0>;
+
+			interrupts-extended = <&intc GIC_SPI 654 IRQ_TYPE_EDGE_RISING>,
+					      <&intc GIC_SPI 432 IRQ_TYPE_LEVEL_HIGH>,
+					      <&ipa_smp2p_in 0 IRQ_TYPE_EDGE_RISING>,
+					      <&ipa_smp2p_in 1 IRQ_TYPE_EDGE_RISING>;
+			interrupt-names = "ipa",
+					  "gsi",
+					  "ipa-clock-query",
+					  "ipa-setup-ready";
+
+			clocks = <&rpmhcc RPMH_IPA_CLK>;
+			clock-names = "core";
+
+			interconnects = <&aggre2_noc MASTER_IPA 0 &mc_virt SLAVE_EBI1 0>,
+					<&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_IPA_CFG 0>;
+			interconnect-names = "memory",
+					     "config";
+
+			qcom,qmp = <&aoss_qmp>;
+
+			qcom,smem-states = <&ipa_smp2p_out 0>,
+					   <&ipa_smp2p_out 1>;
+			qcom,smem-state-names = "ipa-clock-enabled-valid",
+						"ipa-clock-enabled";
+
+			sram = <&ipa_modem_tables>;
+
+			status = "disabled";
+		};
+
 		usb_1_hsphy: phy@88e3000 {
 			compatible = "qcom,sm8450-usb-hs-phy",
 				     "qcom,usb-snps-hs-7nm-phy";
@@ -4957,21 +4998,25 @@ cti@13900000 {
 			clock-names = "apb_pclk";
 		};
 
-		sram@146aa000 {
+		sram@14680000 {
 			compatible = "qcom,sm8450-imem", "syscon", "simple-mfd";
-			reg = <0 0x146aa000 0 0x1000>;
-			ranges = <0 0 0x146aa000 0x1000>;
+			reg = <0 0x14680000 0 0x40000>;
+			ranges = <0 0 0x14680000 0x40000>;
 
 			#address-cells = <1>;
 			#size-cells = <1>;
 
-			minidump_config: minidump-sram@1c {
-				reg = <0x1c 0x4>;
+			ipa_modem_tables: modem-tables@28000 {
+				reg = <0x28000 0x2000>;
+			};
+
+			minidump_config: minidump-sram@2a01c {
+				reg = <0x2a01c 0x4>;
 			};
 
-			pil-reloc@94c {
+			pil-reloc@2a94c {
 				compatible = "qcom,pil-reloc-info";
-				reg = <0x94c 0xc8>;
+				reg = <0x2a94c 0xc8>;
 			};
 		};
 

-- 
2.55.0



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 0/3] SM8450 IPA support
  2026-09-09  3:10 [PATCH v2 0/3] SM8450 IPA support Esteban Urrutia
                   ` (2 preceding siblings ...)
  2026-09-09  3:11 ` [PATCH v2 3/3] arm64: dts: qcom: sm8450: Add IPA node Esteban Urrutia
@ 2026-09-09  3:12 ` Esteban Urrutia
  2026-09-09 18:12   ` Simon Horman
  3 siblings, 1 reply; 10+ messages in thread
From: Esteban Urrutia @ 2026-09-09  3:12 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Alex Elder, Bjorn Andersson, Konrad Dybcio
  Cc: Nazar Kompanets, linux-arm-msm, netdev, devicetree, linux-kernel,
	phone-devel, Krzysztof Kozlowski

On 9/9/26 12:10 AM, Esteban Urrutia wrote:
> This series has been tested on the following SoCs:
> - SM7475
> - SM8450
> - SM8475
> In these the modem works as expected and no crashes occur.

I forgot to mention that this series depends on the following patch:
https://lore.kernel.org/all/20260909-ipa-modem-drop-v1-1-0c9664f09c4a@proton.me/

Regards,
Esteban


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 0/3] SM8450 IPA support
  2026-09-09  3:12 ` [PATCH v2 0/3] SM8450 IPA support Esteban Urrutia
@ 2026-09-09 18:12   ` Simon Horman
  0 siblings, 0 replies; 10+ messages in thread
From: Simon Horman @ 2026-09-09 18:12 UTC (permalink / raw)
  To: Esteban Urrutia
  Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Alex Elder, Bjorn Andersson, Konrad Dybcio, Nazar Kompanets,
	linux-arm-msm, netdev, devicetree, linux-kernel, phone-devel,
	Krzysztof Kozlowski

On Wed, Sep 09, 2026 at 03:12:51AM +0000, Esteban Urrutia wrote:
> On 9/9/26 12:10 AM, Esteban Urrutia wrote:
> > This series has been tested on the following SoCs:
> > - SM7475
> > - SM8450
> > - SM8475
> > In these the modem works as expected and no crashes occur.
> 
> I forgot to mention that this series depends on the following patch:
> https://lore.kernel.org/all/20260909-ipa-modem-drop-v1-1-0c9664f09c4a@proton.me/

Our CI isn't smart enough to pick up dependencies.
So you'll need to repost once that patch is present in net-next.
As is, patch 2/3 fails to build.

Also, I think the patch-set needs to be split up somehow
so the networking portions can be accepted into net-next
while the other patches go via a different subsystem.

For the net-next portion, please set the target tree in the subject
like this:

Subject: [PATCH v3 net-next] ...

For more information on the Netdev development process, please see:
https://docs.kernel.org/process/maintainer-netdev.html

-- 
pw-bot: changes-requested

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 3/3] arm64: dts: qcom: sm8450: Add IPA node
  2026-09-09  3:11 ` [PATCH v2 3/3] arm64: dts: qcom: sm8450: Add IPA node Esteban Urrutia
@ 2026-09-09 19:06   ` Dmitry Baryshkov
  2026-09-09 21:04     ` Esteban Urrutia
  2026-09-10  3:11   ` sashiko-bot
  1 sibling, 1 reply; 10+ messages in thread
From: Dmitry Baryshkov @ 2026-09-09 19:06 UTC (permalink / raw)
  To: Esteban Urrutia
  Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Alex Elder, Bjorn Andersson, Konrad Dybcio, Nazar Kompanets,
	linux-arm-msm, netdev, devicetree, linux-kernel, phone-devel

On Wed, Sep 09, 2026 at 03:11:39AM +0000, Esteban Urrutia wrote:
> Add the description of the IPA block in the SM8450 SoC.
> 
> Co-developed-by: Nazar Kompanets <xlie7669@gmail.com>
> Signed-off-by: Nazar Kompanets <xlie7669@gmail.com>
> Signed-off-by: Esteban Urrutia <esteuwu@proton.me>
> ---
>  arch/arm64/boot/dts/qcom/sm8450.dtsi | 59 +++++++++++++++++++++++++++++++-----
>  1 file changed, 52 insertions(+), 7 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi
> index b8793482b181..95b6fd22a846 100644
> --- a/arch/arm64/boot/dts/qcom/sm8450.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi
> @@ -2625,6 +2625,47 @@ adreno_smmu: iommu@3da0000 {
>  			dma-coherent;
>  		};
>  
> +		ipa: ipa@3f40000 {
> +			compatible = "qcom,sm8450-ipa";
> +
> +			reg = <0 0x3f40000 0 0x10000>,
> +			      <0 0x3f50000 0 0x5000>,
> +			      <0 0x3e04000 0 0xfc000>;
> +			reg-names = "ipa-reg",
> +				    "ipa-shared",
> +				    "gsi";
> +			iommus = <&apps_smmu 0x5c0 0x0>,
> +				 <&apps_smmu 0x5c2 0x0>;
> +
> +			interrupts-extended = <&intc GIC_SPI 654 IRQ_TYPE_EDGE_RISING>,
> +					      <&intc GIC_SPI 432 IRQ_TYPE_LEVEL_HIGH>,
> +					      <&ipa_smp2p_in 0 IRQ_TYPE_EDGE_RISING>,
> +					      <&ipa_smp2p_in 1 IRQ_TYPE_EDGE_RISING>;
> +			interrupt-names = "ipa",
> +					  "gsi",
> +					  "ipa-clock-query",
> +					  "ipa-setup-ready";
> +
> +			clocks = <&rpmhcc RPMH_IPA_CLK>;
> +			clock-names = "core";
> +
> +			interconnects = <&aggre2_noc MASTER_IPA 0 &mc_virt SLAVE_EBI1 0>,
> +					<&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_IPA_CFG 0>;
> +			interconnect-names = "memory",
> +					     "config";
> +
> +			qcom,qmp = <&aoss_qmp>;
> +
> +			qcom,smem-states = <&ipa_smp2p_out 0>,
> +					   <&ipa_smp2p_out 1>;
> +			qcom,smem-state-names = "ipa-clock-enabled-valid",
> +						"ipa-clock-enabled";
> +
> +			sram = <&ipa_modem_tables>;

No qcom,gsi-loader / memory-region ?

> +
> +			status = "disabled";
> +		};
> +
>  		usb_1_hsphy: phy@88e3000 {
>  			compatible = "qcom,sm8450-usb-hs-phy",
>  				     "qcom,usb-snps-hs-7nm-phy";


Also the device is disabled by default. On which platform did you enable
it? Is it supported upstream?

-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 3/3] arm64: dts: qcom: sm8450: Add IPA node
  2026-09-09 19:06   ` Dmitry Baryshkov
@ 2026-09-09 21:04     ` Esteban Urrutia
  0 siblings, 0 replies; 10+ messages in thread
From: Esteban Urrutia @ 2026-09-09 21:04 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Alex Elder, Bjorn Andersson, Konrad Dybcio, Nazar Kompanets,
	linux-arm-msm, netdev, devicetree, linux-kernel, phone-devel

On 9/9/26 4:06 PM, Dmitry Baryshkov wrote:
>> diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi
>> index b8793482b181..95b6fd22a846 100644
>> --- a/arch/arm64/boot/dts/qcom/sm8450.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi
>> @@ -2625,6 +2625,47 @@ adreno_smmu: iommu@3da0000 {
>>  			dma-coherent;
>>  		};
>>
>> +		ipa: ipa@3f40000 {
>> +			compatible = "qcom,sm8450-ipa";
>> +
>> +			reg = <0 0x3f40000 0 0x10000>,
>> +			      <0 0x3f50000 0 0x5000>,
>> +			      <0 0x3e04000 0 0xfc000>;
>> +			reg-names = "ipa-reg",
>> +				    "ipa-shared",
>> +				    "gsi";
>> +			iommus = <&apps_smmu 0x5c0 0x0>,
>> +				 <&apps_smmu 0x5c2 0x0>;
>> +
>> +			interrupts-extended = <&intc GIC_SPI 654 IRQ_TYPE_EDGE_RISING>,
>> +					      <&intc GIC_SPI 432 IRQ_TYPE_LEVEL_HIGH>,
>> +					      <&ipa_smp2p_in 0 IRQ_TYPE_EDGE_RISING>,
>> +					      <&ipa_smp2p_in 1 IRQ_TYPE_EDGE_RISING>;
>> +			interrupt-names = "ipa",
>> +					  "gsi",
>> +					  "ipa-clock-query",
>> +					  "ipa-setup-ready";
>> +
>> +			clocks = <&rpmhcc RPMH_IPA_CLK>;
>> +			clock-names = "core";
>> +
>> +			interconnects = <&aggre2_noc MASTER_IPA 0 &mc_virt SLAVE_EBI1 0>,
>> +					<&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_IPA_CFG 0>;
>> +			interconnect-names = "memory",
>> +					     "config";
>> +
>> +			qcom,qmp = <&aoss_qmp>;
>> +
>> +			qcom,smem-states = <&ipa_smp2p_out 0>,
>> +					   <&ipa_smp2p_out 1>;
>> +			qcom,smem-state-names = "ipa-clock-enabled-valid",
>> +						"ipa-clock-enabled";
>> +
>> +			sram = <&ipa_modem_tables>;
> 
> No qcom,gsi-loader / memory-region ?

Right. I forgot about this change. I'll add those in v3.

>> +
>> +			status = "disabled";
>> +		};
>> +
>>  		usb_1_hsphy: phy@88e3000 {
>>  			compatible = "qcom,sm8450-usb-hs-phy",
>>  				     "qcom,usb-snps-hs-7nm-phy";
> 
> 
> Also the device is disabled by default. On which platform did you enable
> it? Is it supported upstream?

Yes, as it should be. It has currently been tested as working in:
- sm7475-realme-senna
- sm8450-oneplus-negroni
- sm8475-motorola-bronco
None of these devices have device trees upstreamed at the moment.
I plan on eventually upstreaming support for motorola-bronco.

Regards,
Esteban


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 2/3] net: ipa: Add IPA v5.1 configuration data
  2026-09-09  3:11 ` [PATCH v2 2/3] net: ipa: Add IPA v5.1 configuration data Esteban Urrutia
@ 2026-09-10  3:11   ` sashiko-bot
  0 siblings, 0 replies; 10+ messages in thread
From: sashiko-bot @ 2026-09-10  3:11 UTC (permalink / raw)
  To: Esteban Urrutia; +Cc: devicetree, robh, conor+dt

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [High] The canaries for the IPA_MEM_STATS_FILTER_ROUTE memory region overlap with the IPA_MEM_STATS_TETHERING memory region, causing data corruption.
- [High] The IPA_ENDPOINT_AP_MODEM_RX endpoint is incorrectly assigned to the DST_UL resource group instead of DST_DL.
- [Low] Undeclared identifier 'IPA_MEM_MODEM_STATS_DROP' causes a compilation error.
--

commit 072920040c7663b1214df96432603178023826d5
Author: Esteban Urrutia <esteuwu@proton.me>

net: ipa: Add IPA v5.1 configuration data

This commit adds the configuration data required for IPA v5.1, which is
used in the Qualcomm SM8450 SoC.

> diff --git a/drivers/net/ipa/data/ipa_data-v5.1.c b/drivers/net/ipa/data/ipa_data-v5.1.c
> new file mode 100644
> index 0000000000000..7d7bc193b774c
> --- /dev/null
> +++ b/drivers/net/ipa/data/ipa_data-v5.1.c
> @@ -0,0 +1,476 @@
> +// SPDX-License-Identifier: GPL-2.0
[ ... ]
> +/* Endpoint configuration data for an SoC having IPA v5.1 */
> +static const struct ipa_gsi_endpoint_data ipa_gsi_endpoint_data[] = {
[ ... ]
> +	[IPA_ENDPOINT_AP_MODEM_RX] = {
> +		.ee_id		= GSI_EE_AP,
> +		.channel_id	= 1,
> +		.endpoint_id	= 23,
> +		.toward_ipa	= false,
> +		.channel = {
> +			.tre_count	= 256,
> +			.event_count	= 256,
> +			.tlv_count	= 9,
> +		},
> +		.endpoint = {
> +			.config = {
> +				.resource_group	= IPA_RSRC_GROUP_DST_UL,

[Severity: High]
Is the AP_MODEM_RX endpoint incorrectly assigned to the DST_UL resource group
instead of DST_DL?

Looking at the destination resource limits in ipa_resource_dst, it appears
DST_DL is allocated 5 data sectors that remain completely unused by any
endpoint. Meanwhile, DST_UL has only 6 data sectors but must handle both
LAN_RX and MODEM_RX traffic.

Will this cause resource starvation for both datapaths under load?

[ ... ]
> +/* Destination resource configuration data for an SoC having IPA v5.1 */
> +static const struct ipa_resource ipa_resource_dst[] = {
> +	[IPA_RESOURCE_TYPE_DST_DATA_SECTORS] = {
> +		.limits[IPA_RSRC_GROUP_DST_UL] = {
> +			.min = 6,	.max = 6,
> +		},
> +		.limits[IPA_RSRC_GROUP_DST_DL] = {
> +			.min = 5,	.max = 5,
> +		},

[ ... ]
> +/* IPA-resident memory region data for an SoC having IPA v5.1 */
> +static const struct ipa_mem ipa_mem_local_data[] = {
[ ... ]
> +	{
> +		.id		= IPA_MEM_STATS_TETHERING,
> +		.offset		= 0x2910,
> +		.size		= 0x03c0,
> +		.canary_count	= 0,
> +	},
> +	{
> +		.id		= IPA_MEM_STATS_FILTER_ROUTE,
> +		.offset		= 0x2cd0,
> +		.size		= 0x0ba0,
> +		.canary_count	= 2,
> +	},

[Severity: High]
Is there a risk of memory layout overlap corrupting the tethering statistics?

During initialization in ipa_mem_config(), the driver writes canary values
(0xdeadbeef) before each region's offset. Since IPA_MEM_STATS_FILTER_ROUTE
starts at 0x2cd0 and has a canary_count of 2, eight bytes of canaries will be
written to 0x2cc8 through 0x2ccf.

However, the IPA_MEM_STATS_TETHERING region spans from 0x2910 to 0x2cd0
(size 0x03c0). Can we expect the last 8 bytes of the tethering stats
memory to be overwritten by the next region's canaries?

[ ... ]
> +	{
> +		.id		= IPA_MEM_MODEM_STATS_DROP,
> +		.offset		= 0x4fe8,
> +		.size		= 0x0018,
> +		.canary_count	= 0,
> +	},
> +};

[Severity: Low]
Could this result in a compilation error?

It appears that IPA_MEM_MODEM_STATS_DROP is not defined in enum ipa_mem_id,
which would lead to a build failure.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260909-sm8450-ipa-v2-0-2deb8b4e91a5@proton.me?part=2

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 3/3] arm64: dts: qcom: sm8450: Add IPA node
  2026-09-09  3:11 ` [PATCH v2 3/3] arm64: dts: qcom: sm8450: Add IPA node Esteban Urrutia
  2026-09-09 19:06   ` Dmitry Baryshkov
@ 2026-09-10  3:11   ` sashiko-bot
  1 sibling, 0 replies; 10+ messages in thread
From: sashiko-bot @ 2026-09-10  3:11 UTC (permalink / raw)
  To: Esteban Urrutia; +Cc: conor+dt, devicetree, robh

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The newly added `ipa` node is missing the `qcom,gsi-loader` and `memory-region` properties, which violates the `qcom,ipa.yaml` device tree binding schema and causes the driver to fail during probe.
--

commit dced093feda54c054d95c56e0362c394d8a7c590
Author: Esteban Urrutia <esteuwu@proton.me>

arm64: dts: qcom: sm8450: Add IPA node
    
Add the description of the IPA block in the SM8450 SoC.

> diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi
> index b8793482b1815..95b6fd22a8465 100644
> --- a/arch/arm64/boot/dts/qcom/sm8450.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi
[ ... ]
> @@ -2625,6 +2625,47 @@ adreno_smmu: iommu@3da0000 {
>  			dma-coherent;
>  		};
>  
> +		ipa: ipa@3f40000 {
> +			compatible = "qcom,sm8450-ipa";

[Severity: Medium]
The newly added ipa node appears to be missing the qcom,gsi-loader and
memory-region properties. This violates the qcom,ipa.yaml device tree
binding schema and causes the driver to fail during probe.

If a board file enables this ipa node, the IPA driver's ipa_firmware_load()
function will unconditionally attempt to fetch the firmware memory region via
of_reserved_mem_region_to_resource(). Without the memory-region property
(which should reference the existing &ipa_fw_mem), this call returns an error
and causes the driver probe to abort, leaving the IPA hardware completely
unusable.

Does this node need the qcom,gsi-loader and memory-region properties added to
ensure it validates correctly and probes successfully?

> +
> +			reg = <0 0x3f40000 0 0x10000>,
> +			      <0 0x3f50000 0 0x5000>,
> +			      <0 0x3e04000 0 0xfc000>;
> +			reg-names = "ipa-reg",

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260909-sm8450-ipa-v2-0-2deb8b4e91a5@proton.me?part=3

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-09-10  3:11 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-09  3:10 [PATCH v2 0/3] SM8450 IPA support Esteban Urrutia
2026-09-09  3:11 ` [PATCH v2 1/3] dt-bindings: net: qcom,ipa: Add SM8450 compatible Esteban Urrutia
2026-09-09  3:11 ` [PATCH v2 2/3] net: ipa: Add IPA v5.1 configuration data Esteban Urrutia
2026-09-10  3:11   ` sashiko-bot
2026-09-09  3:11 ` [PATCH v2 3/3] arm64: dts: qcom: sm8450: Add IPA node Esteban Urrutia
2026-09-09 19:06   ` Dmitry Baryshkov
2026-09-09 21:04     ` Esteban Urrutia
2026-09-10  3:11   ` sashiko-bot
2026-09-09  3:12 ` [PATCH v2 0/3] SM8450 IPA support Esteban Urrutia
2026-09-09 18:12   ` Simon Horman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.