[PATCH v2] dt-bindings: dma: qcom,bam-dma: Allow memory-region property
From: Vishnu Santhosh
Date: Sat Sep 19 2026 - 22:38:45 EST
Some Qualcomm SoCs, such as Shikra, run the modem in a separate security
domain, preventing it from accessing BAM descriptor FIFOs allocated from
arbitrary host memory.
Add an optional memory-region property to constrain DMA allocations made
by the BAM DMA controller to a restricted DMA pool. Access permissions
for the remote execution environment are managed separately.
Co-developed-by: Deepak Kumar Singh <deepak.singh@xxxxxxxxxxxxxxxx>
Signed-off-by: Deepak Kumar Singh <deepak.singh@xxxxxxxxxxxxxxxx>
Signed-off-by: Vishnu Santhosh <vishnu.santhosh@xxxxxxxxxxxxxxxx>
---
Changes in v2:
- Replace the qcom,vmid property and BAM DMA driver SCM assignment with
the standard memory-region restricted DMA pool mechanism.
- Rely on generic DMA handling to constrain descriptor FIFO allocations
to the restricted pool.
- Drop the Shikra-specific BAM compatible and all BAM DMA driver changes.
- Link to v1: https://lore.kernel.org/r/20260714-qcom-bam-dma-vmid-ext-v1-0-cef87c57b7dc@xxxxxxxxxxxxxxxx
---
.../devicetree/bindings/dma/qcom,bam-dma.yaml | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/Documentation/devicetree/bindings/dma/qcom,bam-dma.yaml b/Documentation/devicetree/bindings/dma/qcom,bam-dma.yaml
index e72adc172af102d8f400044ea0dc32db6b2365be..1e4324799f2b3b8a9ebf9f084e457e66aad20d28 100644
--- a/Documentation/devicetree/bindings/dma/qcom,bam-dma.yaml
+++ b/Documentation/devicetree/bindings/dma/qcom,bam-dma.yaml
@@ -50,6 +50,13 @@ properties:
minItems: 1
maxItems: 7
+ memory-region:
+ maxItems: 1
+ description:
+ Phandle to a reserved-memory node compatible with restricted-dma-pool.
+ The BAM DMA controller uses the pool for DMA allocations, including
+ channel descriptor FIFOs.
+
num-channels:
$ref: /schemas/types.yaml#/definitions/uint32
description:
@@ -137,6 +144,20 @@ examples:
qcom,num-ees = <4>;
num-channels = <20>;
qcom,controlled-remotely;
+ memory-region = <&bam_dmux_pool>;
+ };
+ };
+
+ reserved-memory {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ bam_dmux_pool: restricted-dma-pool {
+ compatible = "restricted-dma-pool";
+ size = <0x40000>;
+ alignment = <0x40000>;
+ alloc-ranges = <0x80000000 0x80000000>;
};
};
...
---
base-commit: 40288c9206c17eb66a603262e06a58d300d0f279
change-id: 20260714-qcom-bam-dma-vmid-ext-8a3bd3c5c00e
Best regards,
--
Vishnu Santhosh <vishnu.santhosh@xxxxxxxxxxxxxxxx>