Thread (2 messages) 2 messages, 2 authors, 1d ago
WARM1d

[PATCH v3] arm64: dts: qcom: shikra: Add BAM-DMUX support

From: Vishnu Santhosh <hidden>
Date: 2026-09-20 03:28:40
Also in: linux-arm-msm, lkml
Subsystem: arm/qualcomm mailing list, arm/qualcomm support, the rest · Maintainers: Bjorn Andersson, Konrad Dybcio, Linus Torvalds

Add the SMSM state entries, BAM-DMUX node, and BAM DMA controller needed
to provide modem data channels on Shikra.

Reserve a 256 KiB restricted DMA pool and reference it from both the
BAM-DMUX and BAM DMA nodes. Set qcom,vmid to NAV so the BAM-DMUX driver
can grant the modem access to the complete pool before requesting the DMA
channels.

The 256 KiB pool provides space for BAM-DMUX RX and TX buffers and BAM
descriptor FIFOs, with additional headroom.

Place the BAM-DMUX node below the modem remoteproc so userspace can
associate the resulting network interfaces with the owning remoteproc
through the device hierarchy.

Co-developed-by: Deepak Kumar Singh <redacted>
Signed-off-by: Deepak Kumar Singh <redacted>
Signed-off-by: Vishnu Santhosh <redacted>
---
Changes in v3:
- Add a shared restricted DMA pool for BAM-DMUX mappings and BAM
  descriptor FIFOs.
- Add memory-region references to the BAM-DMUX and BAM DMA nodes.
- Add qcom,vmid to grant NAV access to the pool.
- Replace and supersede the separate BAM-DMUX VMID extension v1:
  https://lore.kernel.org/r/20260714-b4-qcom-shikra-dts-bam-dmux-vmid-ext-v1-1-5b19da8d7735@oss.qualcomm.com (local)
- Link to v2: https://lore.kernel.org/r/20260711-qcom-shikra-dts-bam-dmux-v2-1-d5b33ee32138@oss.qualcomm.com (local)

Changes in v2:
- Move the "bam-dmux" node below the modem remoteproc
  ("remoteproc_mpss"), instead of at the root, so that userspace can
  associate the resulting network interfaces with the owning
  remoteproc via udev/sysfs (Stephan)
- Add the "shikra-dt-m1" series as a declared prerequisite, since it
  introduces the "remoteproc_mpss" node this series now depends on
- Link to v1: https://lore.kernel.org/r/20260611-qcom-shikra-dts-bam-dmux-v1-1-43d0b43d41ef@oss.qualcomm.com (local)
---
 arch/arm64/boot/dts/qcom/shikra.dtsi | 51 ++++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/shikra.dtsi b/arch/arm64/boot/dts/qcom/shikra.dtsi
index 92d22e3b6931cf49f213d1807f78fc1a261f290d..4980c125b7e1a45f3793ba2335b6cfd1702eb877 100644
--- a/arch/arm64/boot/dts/qcom/shikra.dtsi
+++ b/arch/arm64/boot/dts/qcom/shikra.dtsi
@@ -10,6 +10,7 @@
 #include <dt-bindings/interconnect/qcom,icc.h>
 #include <dt-bindings/interconnect/qcom,osm-l3.h>
 #include <dt-bindings/dma/qcom-gpi.h>
+#include <dt-bindings/firmware/qcom,scm.h>
 #include <dt-bindings/interconnect/qcom,rpm-icc.h>
 #include <dt-bindings/interconnect/qcom,shikra.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
@@ -352,6 +353,13 @@ reserved_memory: reserved-memory {
 		#size-cells = <2>;
 		ranges;
 
+		bam_dmux_pool: restricted-dma-pool {
+			compatible = "restricted-dma-pool";
+			size = <0x0 0x40000>;
+			alignment = <0x0 0x40000>;
+			alloc-ranges = <0x0 0x80000000 0x0 0x80000000>;
+		};
+
 		hyp_mem: hyp@80000000 {
 			reg = <0x0 0x80000000 0x0 0x1600000>;
 			no-map;
@@ -500,6 +508,23 @@ modem_smp2p_in: slave-kernel {
 		};
 	};
 
+	smsm {
+		compatible = "qcom,smsm";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		mboxes = <0>, <&apcs_glb 13>;
+		apps_smsm: apps@0 {
+			reg = <0>;
+			#qcom,smem-state-cells = <1>;
+		};
+		modem_smsm: modem@1 {
+			reg = <1>;
+			interrupts = <GIC_SPI 69 IRQ_TYPE_EDGE_RISING 0>;
+			interrupt-controller;
+			#interrupt-cells = <2>;
+		};
+	};
+
 	soc: soc@0 {
 		compatible = "simple-bus";
 
@@ -1866,6 +1891,20 @@ glink-edge {
 				qcom,remote-pid = <1>;
 				label = "mpss";
 			};
+
+			bam_dmux: bam-dmux {
+				compatible = "qcom,bam-dmux";
+				interrupt-parent = <&modem_smsm>;
+				interrupts = <1 IRQ_TYPE_EDGE_BOTH>,
+					     <11 IRQ_TYPE_EDGE_BOTH>;
+				interrupt-names = "pc", "pc-ack";
+				qcom,smem-states = <&apps_smsm 1>, <&apps_smsm 11>;
+				qcom,smem-state-names = "pc", "pc-ack";
+				dmas = <&bam_dmux_dma 4>, <&bam_dmux_dma 5>;
+				dma-names = "tx", "rx";
+				memory-region = <&bam_dmux_pool>;
+				qcom,vmid = <QCOM_SCM_VMID_NAV>;
+			};
 		};
 
 		remoteproc_cdsp: remoteproc@b300000 {
@@ -2026,6 +2065,18 @@ dispcc: clock-controller@5f00000 {
 			#power-domain-cells = <1>;
 		};
 
+		bam_dmux_dma: dma-controller@6044000 {
+			compatible = "qcom,bam-v1.7.0";
+			reg = <0x0 0x06044000 0x0 0x19000>;
+			interrupts = <GIC_SPI 74 IRQ_TYPE_EDGE_RISING 0>;
+			#dma-cells = <1>;
+			qcom,ee = <0>;
+			num-channels = <6>;
+			qcom,num-ees = <1>;
+			qcom,powered-remotely;
+			memory-region = <&bam_dmux_pool>;
+		};
+
 		sram@c11e000 {
 			compatible = "qcom,shikra-imem", "mmio-sram";
 			reg = <0x0 0x0c11e000 0x0 0x1000>;
---
base-commit: 518e5b794c06c0f0eb40df3e202274a66202c137
change-id: 20260603-qcom-shikra-dts-bam-dmux-7fdcbb6fb662
prerequisite-message-id: 20260908-shikra-pas-bam-dmux-binding-v4-1-6044889e7e3d@oss.qualcomm.com
prerequisite-patch-id: c3d19e8dbf9451f9f8155c86c21a4e6b5dc796d0
prerequisite-message-id: 20260920-qcom-bam-dma-vmid-ext-v2-1-4dbbff0e57c8@oss.qualcomm.com
prerequisite-patch-id: 30840b157a197cc896556c0152b26a00abba0010
prerequisite-message-id: 20260920-qcom-bam-dmux-vmid-ext-v2-0-ef5ca2178378@oss.qualcomm.com
prerequisite-patch-id: a9c2ce26fabf293f94f384409991f8a9b3afaafa
prerequisite-patch-id: c4d2876bea87e825468eb3bd116bfdf5a203f7c1

Best regards,
-- 
Vishnu Santhosh [off-list ref]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help