Skip to content

dt-bindings: dma/net: qcom,bam: Add optional qcom,vmid property #1397

Open
quic-vishsant wants to merge 2 commits into
qualcomm-linux:early/hwe/shikra/dtfrom
quic-vishsant:for-shikra-bam-xpu-violation-dt
Open

dt-bindings: dma/net: qcom,bam: Add optional qcom,vmid property #1397
quic-vishsant wants to merge 2 commits into
qualcomm-linux:early/hwe/shikra/dtfrom
quic-vishsant:for-shikra-bam-xpu-violation-dt

Conversation

@quic-vishsant

Copy link
Copy Markdown

On Qualcomm Shikra the mDSP (VMID 43 / QCOM_SCM_VMID_NAV) is the AXI master for BAM-DMUX RX data buffers and BAM descriptor FIFOs. The XPU enforces per-region access control; without an SCM assignment granting VMID 43 read/write access, the first DMA transfer triggers an XPU violation fault.

Document the optional qcom,vmid property in both the qcom,bam-dma and qcom,bam-dmux binding schemas, then wire it up in the Shikra DTS:

  • bam_dmux_dma controller node: SCM-assigns each channel descriptor FIFO at allocation time (handled by bam_dma.c).
  • bam-dmux consumer node: SCM-assigns the coherent RX buffer block at probe time (handled by bam_dmux.c).

On platforms where a remotely-powered BAM enforces XPU access control
(e.g. Qualcomm Shikra SoC with the mDSP processor), both the BAM DMA
descriptor FIFOs and the BAM-DMUX RX data buffers must be SCM-assigned
to the remote VMID before the first DMA transfer. Add qcom,vmid to both
binding schemas to document this optional property.

- qcom,bam-dma.yaml: grants remote VMID access to per-channel
  descriptor FIFOs via SCM assignment in bam_alloc_chan().
- qcom,bam-dmux.yaml: grants remote VMID access to the coherent RX
  buffer block via SCM assignment at probe time.

Signed-off-by: Vishnu Santhosh <vishnu.santhosh@oss.qualcomm.com>
On Qualcomm Shikra SoC the mDSP(VMID 43) is the AXI master for
BAM-DMUX RX data buffers and BAM descriptor FIFO accesses. The XPU
enforces per-region access control; without SCM assignment granting
VMID 43 access, the first DMA transfer triggers an XPU violation.

Add qcom,vmid = <QCOM_SCM_VMID_NAV> to the bam-dmux consumer node so
the driver SCM-assigns the coherent RX buffer block at probe; and to
the bam_dmux_dma controller node so bam_dma.c SCM-assigns each channel
descriptor FIFO at allocation.

Only this modem-interfacing BAM path requires the assignment. Other
BAM instances on Shikra (USB, crypto) are not accessible to the NAV
VMID and are unaffected.

Signed-off-by: Vishnu Santhosh <vishnu.santhosh@oss.qualcomm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant