* [PATCH 0/4] Fix Shikra q6apm DAI under KVM/EL2
@ 2026-11-19 16:47 Mohit Sharma
2026-11-19 16:47 ` [PATCH 1/4] dt-bindings: sound: qcom,q6apm-dai: allow Shikra compatible Mohit Sharma
` (4 more replies)
0 siblings, 5 replies; 11+ messages in thread
From: Mohit Sharma @ 2026-11-19 16:47 UTC (permalink / raw)
To: Srinivas Kandagatla, Bjorn Andersson, Mark Brown
Cc: Ajay Kumar Nandam, Liam Girdwood, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Rob Clark, Will Deacon,
Robin Murphy, Joerg Roedel, Konrad Dybcio, Abel Vesa,
Jaroslav Kysela, Takashi Iwai, linux-sound, linux-arm-msm,
devicetree, iommu, linux-arm-kernel, linux-kernel, Mohit Sharma
Shikra's q6apm DAI is hosted on the modem DSP. In the hypervisor
configuration its shared memory is assigned directly, but when Linux runs
at EL2 it owns the apps SMMU and the audio stream must be described and
mapped there. Using the normal translating domain causes context faults
because the firmware consumes SID-tagged physical addresses.
Select an identity domain for the Shikra q6apm DAI. Also allow
modem-domain q6apm DAIs carrying an IOMMU specifier to use the DMA/IOMMU
path, while retaining SCM assignment for modem-domain DAIs without an
IOMMU.
The series is ordered as follows:
1. Add the Shikra-specific q6apm DAI compatible to the binding.
2. Select an identity domain for that compatible.
3. Add the compatible to the Shikra q6apm DAI node.
4. Select SCM or IOMMU operation from the presence of an IOMMU stream.
The Shikra EL2 overlay is expected to provide the q6apm DAI SMMU stream
description. That overlay change is maintained separately from this
series.
Validated on a Shikra EVK booted under KVM/EL2. The q6apm DAI probes
through the IOMMU path without the previous SCM/IOMMU mutual-exclusion
failure, and playback and capture use the per-stream identity domain.
Mohit Sharma (4):
dt-bindings: sound: qcom,q6apm-dai: allow Shikra compatible
iommu: arm-smmu-qcom: use identity domain for Shikra q6apm DAI
arm64: dts: qcom: shikra: add q6apm DAI compatible
ASoC: qcom: q6apm-dai: allow the mDSP IOMMU path
.../devicetree/bindings/sound/qcom,q6apm-dai.yaml | 6 +++++-
arch/arm64/boot/dts/qcom/shikra.dtsi | 3 ++-
drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 1 +
sound/soc/qcom/qdsp6/q6apm-dai.c | 9 ++-------
4 files changed, 10 insertions(+), 9 deletions(-)
--
2.34.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 1/4] dt-bindings: sound: qcom,q6apm-dai: allow Shikra compatible
2026-11-19 16:47 [PATCH 0/4] Fix Shikra q6apm DAI under KVM/EL2 Mohit Sharma
@ 2026-11-19 16:47 ` Mohit Sharma
2026-11-19 23:08 ` Mark Brown
2026-11-19 16:47 ` [PATCH 2/4] iommu: arm-smmu-qcom: use identity domain for Shikra q6apm DAI Mohit Sharma
` (3 subsequent siblings)
4 siblings, 1 reply; 11+ messages in thread
From: Mohit Sharma @ 2026-11-19 16:47 UTC (permalink / raw)
To: Srinivas Kandagatla, Bjorn Andersson, Mark Brown
Cc: Ajay Kumar Nandam, Liam Girdwood, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Rob Clark, Will Deacon,
Robin Murphy, Joerg Roedel, Konrad Dybcio, Abel Vesa,
Jaroslav Kysela, Takashi Iwai, linux-sound, linux-arm-msm,
devicetree, iommu, linux-arm-kernel, linux-kernel, Mohit Sharma
Shikra's q6apm DAI needs a SoC-specific compatible so that the Qualcomm
SMMU implementation can select the identity domain required by its
firmware ABI. The ASoC driver continues to bind using the generic
fallback compatible.
Allow the Shikra compatible followed by the existing generic compatible.
Co-developed-by: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
Signed-off-by: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
Signed-off-by: Mohit Sharma <mohit.sharma@oss.qualcomm.com>
diff --git a/Documentation/devicetree/bindings/sound/qcom,q6apm-dai.yaml b/Documentation/devicetree/bindings/sound/qcom,q6apm-dai.yaml
index c1f9fc9eab64..c5eea6698ab6 100644
--- a/Documentation/devicetree/bindings/sound/qcom,q6apm-dai.yaml
+++ b/Documentation/devicetree/bindings/sound/qcom,q6apm-dai.yaml
@@ -14,7 +14,11 @@ description: |
properties:
compatible:
- const: qcom,q6apm-dais
+ oneOf:
+ - const: qcom,q6apm-dais
+ - items:
+ - const: qcom,shikra-q6apm-dais
+ - const: qcom,q6apm-dais
iommus:
minItems: 1
--
2.34.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 2/4] iommu: arm-smmu-qcom: use identity domain for Shikra q6apm DAI
2026-11-19 16:47 [PATCH 0/4] Fix Shikra q6apm DAI under KVM/EL2 Mohit Sharma
2026-11-19 16:47 ` [PATCH 1/4] dt-bindings: sound: qcom,q6apm-dai: allow Shikra compatible Mohit Sharma
@ 2026-11-19 16:47 ` Mohit Sharma
2026-11-19 16:47 ` [PATCH 3/4] arm64: dts: qcom: shikra: add q6apm DAI compatible Mohit Sharma
` (2 subsequent siblings)
4 siblings, 0 replies; 11+ messages in thread
From: Mohit Sharma @ 2026-11-19 16:47 UTC (permalink / raw)
To: Srinivas Kandagatla, Bjorn Andersson, Mark Brown
Cc: Ajay Kumar Nandam, Liam Girdwood, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Rob Clark, Will Deacon,
Robin Murphy, Joerg Roedel, Konrad Dybcio, Abel Vesa,
Jaroslav Kysela, Takashi Iwai, linux-sound, linux-arm-msm,
devicetree, iommu, linux-arm-kernel, linux-kernel, Mohit Sharma
Shikra's q6apm DAI is hosted on the modem DSP under SMMU stream ID
0x1cc. Its firmware consumes the SID-tagged shared-memory addresses as
physical addresses, so a translating domain leaves those addresses
unmapped and causes context faults when Linux owns the SMMU under EL2.
Add the Shikra q6apm DAI compatible to the Qualcomm SMMU client match
table. This selects an identity domain for this stream while retaining
an SMMU mapping scoped to its own stream ID.
Co-developed-by: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
Signed-off-by: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
Signed-off-by: Mohit Sharma <mohit.sharma@oss.qualcomm.com>
diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
index a0550740185f..b340ca5f5117 100644
--- a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
+++ b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
@@ -435,6 +435,7 @@ static const struct of_device_id qcom_smmu_client_of_match[] __maybe_unused = {
{ .compatible = "qcom,sdm670-mdss" },
{ .compatible = "qcom,sdm845-mdss" },
{ .compatible = "qcom,sdm845-mss-pil" },
+ { .compatible = "qcom,shikra-q6apm-dais" },
{ .compatible = "qcom,sm6115-mdss" },
{ .compatible = "qcom,sm6350-mdss" },
{ .compatible = "qcom,sm6375-mdss" },
--
2.34.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 3/4] arm64: dts: qcom: shikra: add q6apm DAI compatible
2026-11-19 16:47 [PATCH 0/4] Fix Shikra q6apm DAI under KVM/EL2 Mohit Sharma
2026-11-19 16:47 ` [PATCH 1/4] dt-bindings: sound: qcom,q6apm-dai: allow Shikra compatible Mohit Sharma
2026-11-19 16:47 ` [PATCH 2/4] iommu: arm-smmu-qcom: use identity domain for Shikra q6apm DAI Mohit Sharma
@ 2026-11-19 16:47 ` Mohit Sharma
2026-11-19 16:47 ` [PATCH 4/4] ASoC: qcom: q6apm-dai: allow the mDSP IOMMU path Mohit Sharma
2026-11-27 8:48 ` [PATCH v2 0/4] Fix Shikra q6apm DAI under KVM/EL2 Mohit Sharma
4 siblings, 0 replies; 11+ messages in thread
From: Mohit Sharma @ 2026-11-19 16:47 UTC (permalink / raw)
To: Srinivas Kandagatla, Bjorn Andersson, Mark Brown
Cc: Ajay Kumar Nandam, Liam Girdwood, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Rob Clark, Will Deacon,
Robin Murphy, Joerg Roedel, Konrad Dybcio, Abel Vesa,
Jaroslav Kysela, Takashi Iwai, linux-sound, linux-arm-msm,
devicetree, iommu, linux-arm-kernel, linux-kernel, Mohit Sharma
Add the Shikra-specific compatible to the q6apm DAI node while retaining
the generic fallback used by the ASoC driver. The specific compatible
lets arm-smmu-qcom select the identity domain required by the firmware
ABI when the EL2 overlay describes this stream to the SMMU.
The EL2 stream description is part of the prerequisite Shikra EL2
overlay series.
Co-developed-by: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
Signed-off-by: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
Signed-off-by: Mohit Sharma <mohit.sharma@oss.qualcomm.com>
diff --git a/arch/arm64/boot/dts/qcom/shikra.dtsi b/arch/arm64/boot/dts/qcom/shikra.dtsi
index f096469fb984..09b268af9eef 100644
--- a/arch/arm64/boot/dts/qcom/shikra.dtsi
+++ b/arch/arm64/boot/dts/qcom/shikra.dtsi
@@ -2983,7 +2983,8 @@ q6apmbedai: bedais {
};
q6apmdai: dais {
- compatible = "qcom,q6apm-dais";
+ compatible = "qcom,shikra-q6apm-dais",
+ "qcom,q6apm-dais";
memory-region = <&audio_heap_mem
&audio_mdsp_carveout_mem>;
};
--
2.34.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 4/4] ASoC: qcom: q6apm-dai: allow the mDSP IOMMU path
2026-11-19 16:47 [PATCH 0/4] Fix Shikra q6apm DAI under KVM/EL2 Mohit Sharma
` (2 preceding siblings ...)
2026-11-19 16:47 ` [PATCH 3/4] arm64: dts: qcom: shikra: add q6apm DAI compatible Mohit Sharma
@ 2026-11-19 16:47 ` Mohit Sharma
2026-11-27 8:48 ` [PATCH v2 0/4] Fix Shikra q6apm DAI under KVM/EL2 Mohit Sharma
4 siblings, 0 replies; 11+ messages in thread
From: Mohit Sharma @ 2026-11-19 16:47 UTC (permalink / raw)
To: Srinivas Kandagatla, Bjorn Andersson, Mark Brown
Cc: Ajay Kumar Nandam, Liam Girdwood, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Rob Clark, Will Deacon,
Robin Murphy, Joerg Roedel, Konrad Dybcio, Abel Vesa,
Jaroslav Kysela, Takashi Iwai, linux-sound, linux-arm-msm,
devicetree, iommu, linux-arm-kernel, linux-kernel, Mohit Sharma
The q6apm DAI currently selects SCM buffer assignment solely from the GPR
domain. This prevents an mDSP-backed DAI from using an IOMMU, even when
the device tree provides an iommus property for environments where the
mDSP stream is routed through the apps SMMU.
Use the parsed stream ID to distinguish the two memory access models. An
mDSP DAI without an IOMMU continues to use SCM-assigned buffers, while an
mDSP DAI with an IOMMU follows the existing DMA/IOMMU path. This also
avoids requiring SCM availability for the IOMMU configuration.
Fixes: bb8afd437d79 ("ASoC: qcom: q6apm-dai: add SCM buffer assignment for mDSP platforms")
Co-developed-by: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
Signed-off-by: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
Signed-off-by: Mohit Sharma <mohit.sharma@oss.qualcomm.com>
diff --git a/sound/soc/qcom/qdsp6/q6apm-dai.c b/sound/soc/qcom/qdsp6/q6apm-dai.c
index c1f0af93e808..a29fe4241776 100644
--- a/sound/soc/qcom/qdsp6/q6apm-dai.c
+++ b/sound/soc/qcom/qdsp6/q6apm-dai.c
@@ -1218,16 +1218,11 @@ static int q6apm_dai_probe(struct platform_device *pdev)
pdata->sid = args.args[0] & SID_MASK_DEFAULT;
if (apm && apm->gdev &&
- apm->gdev->domain_id == GPR_DOMAIN_ID_MODEM) {
+ apm->gdev->domain_id == GPR_DOMAIN_ID_MODEM &&
+ pdata->sid < 0) {
if (!qcom_scm_is_available())
return -EPROBE_DEFER;
- if (pdata->sid >= 0) {
- dev_err(dev,
- "iommus and mDSP SCM path are mutually exclusive\n");
- return -EINVAL;
- }
-
pdata->use_scm_assign = true;
rc = devm_add_action_or_reset(dev, q6apm_dai_scm_cleanup,
--
2.34.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/4] dt-bindings: sound: qcom,q6apm-dai: allow Shikra compatible
2026-11-19 16:47 ` [PATCH 1/4] dt-bindings: sound: qcom,q6apm-dai: allow Shikra compatible Mohit Sharma
@ 2026-11-19 23:08 ` Mark Brown
0 siblings, 0 replies; 11+ messages in thread
From: Mark Brown @ 2026-11-19 23:08 UTC (permalink / raw)
To: Mohit Sharma
Cc: Srinivas Kandagatla, Bjorn Andersson, Ajay Kumar Nandam,
Liam Girdwood, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Rob Clark, Will Deacon, Robin Murphy, Joerg Roedel,
Konrad Dybcio, Abel Vesa, Jaroslav Kysela, Takashi Iwai,
linux-sound, linux-arm-msm, devicetree, iommu, linux-arm-kernel,
linux-kernel
[-- Attachment #1: Type: text/plain, Size: 628 bytes --]
On Thu, Nov 19, 2026 at 10:17:02PM +0530, Mohit Sharma wrote:
> Shikra's q6apm DAI needs a SoC-specific compatible so that the Qualcomm
> SMMU implementation can select the identity domain required by its
> firmware ABI. The ASoC driver continues to bind using the generic
> fallback compatible.
Please submit patches using subject lines reflecting the style for the
subsystem, this makes it easier for people to identify relevant patches.
Look at what existing commits in the area you're changing are doing and
make sure your subject lines visually resemble what they're doing.
There's no need to resubmit to fix this alone.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v2 0/4] Fix Shikra q6apm DAI under KVM/EL2
2026-11-19 16:47 [PATCH 0/4] Fix Shikra q6apm DAI under KVM/EL2 Mohit Sharma
` (3 preceding siblings ...)
2026-11-19 16:47 ` [PATCH 4/4] ASoC: qcom: q6apm-dai: allow the mDSP IOMMU path Mohit Sharma
@ 2026-11-27 8:48 ` Mohit Sharma
2026-11-27 8:48 ` [PATCH v2 1/4] ASoC: dt-bindings: qcom,q6apm-dai: Add Shikra support Mohit Sharma
` (3 more replies)
4 siblings, 4 replies; 11+ messages in thread
From: Mohit Sharma @ 2026-11-27 8:48 UTC (permalink / raw)
To: Srinivas Kandagatla, Bjorn Andersson, Mark Brown
Cc: Ajay Kumar Nandam, Liam Girdwood, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Rob Clark, Will Deacon,
Robin Murphy, Joerg Roedel, Konrad Dybcio, Abel Vesa,
Jaroslav Kysela, Takashi Iwai, linux-sound, linux-arm-msm,
devicetree, iommu, linux-arm-kernel, linux-kernel, Mohit Sharma
Shikra's q6apm DAI is hosted on the modem DSP. In the hypervisor
configuration its shared memory is assigned directly, but when Linux runs
at EL2 it owns the apps SMMU and the audio stream must be described and
mapped there. Using the normal translating domain causes context faults
because the firmware consumes SID-tagged physical addresses.
Shikra also retains its reserved-memory carveout as the backing pool for
the audio DMA heap. The EL2 overlay adds an IOMMU description over the
base DTB, so the resulting DAI node contains both memory-region and
iommus. Allow both properties while continuing to require at least one.
Select an identity domain for the Shikra q6apm DAI. Also allow
modem-domain q6apm DAIs carrying an IOMMU specifier to use the DMA/IOMMU
path, while retaining SCM assignment for modem-domain DAIs without an
IOMMU.
The series is ordered as follows:
1. Add the Shikra-specific compatible and allow both memory properties.
2. Select an identity domain for that compatible.
3. Add the compatible to the Shikra q6apm DAI node.
4. Select SCM or IOMMU operation from the presence of an IOMMU stream.
The Shikra EL2 overlay is expected to provide the q6apm DAI SMMU stream
description. That overlay change is maintained separately from this
series.
Validated on a Shikra EVK booted under KVM/EL2. The q6apm DAI probes
through the IOMMU path without the previous SCM/IOMMU mutual-exclusion
failure, and playback and capture use the per-stream identity domain.
Changes in v2:
- Follow the established subject-line style for each subsystem.
- Permit memory-region and iommus together for the Shikra EL2 audio path.
Mohit Sharma (4):
ASoC: dt-bindings: qcom,q6apm-dai: Add Shikra support
iommu/arm-smmu-qcom: Use identity domain for Shikra q6apm DAI
arm64: dts: qcom: shikra: Add q6apm DAI compatible
ASoC: qcom: q6apm-dai: Allow the mDSP IOMMU path
.../devicetree/bindings/sound/qcom,q6apm-dai.yaml | 8 ++++++--
arch/arm64/boot/dts/qcom/shikra.dtsi | 3 ++-
drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 1 +
sound/soc/qcom/qdsp6/q6apm-dai.c | 9 ++-------
4 files changed, 11 insertions(+), 10 deletions(-)
--
2.34.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v2 1/4] ASoC: dt-bindings: qcom,q6apm-dai: Add Shikra support
2026-11-27 8:48 ` [PATCH v2 0/4] Fix Shikra q6apm DAI under KVM/EL2 Mohit Sharma
@ 2026-11-27 8:48 ` Mohit Sharma
2026-11-27 8:48 ` [PATCH v2 2/4] iommu/arm-smmu-qcom: Use identity domain for Shikra q6apm DAI Mohit Sharma
` (2 subsequent siblings)
3 siblings, 0 replies; 11+ messages in thread
From: Mohit Sharma @ 2026-11-27 8:48 UTC (permalink / raw)
To: Srinivas Kandagatla, Bjorn Andersson, Mark Brown
Cc: Ajay Kumar Nandam, Liam Girdwood, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Rob Clark, Will Deacon,
Robin Murphy, Joerg Roedel, Konrad Dybcio, Abel Vesa,
Jaroslav Kysela, Takashi Iwai, linux-sound, linux-arm-msm,
devicetree, iommu, linux-arm-kernel, linux-kernel, Mohit Sharma
Shikra's q6apm DAI needs a SoC-specific compatible so that the Qualcomm
SMMU implementation can select the identity domain required by its
firmware ABI. The ASoC driver continues to bind using the generic
fallback compatible.
Shikra uses a reserved-memory carveout as the backing pool for its
audio DMA heap. When Linux runs under KVM/EL2, it also owns the apps SMMU
and the EL2 overlay adds an iommus property to the DAI node. The resulting
tree contains both memory-region and iommus, describing the allocation
pool and the mDSP address translation respectively.
Allow the Shikra compatible followed by the existing generic compatible.
Replace oneOf with anyOf so at least one memory description remains
required while permitting both properties in the Shikra EL2 tree.
Co-developed-by: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
Signed-off-by: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
Signed-off-by: Mohit Sharma <mohit.sharma@oss.qualcomm.com>
---
.../devicetree/bindings/sound/qcom,q6apm-dai.yaml | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/sound/qcom,q6apm-dai.yaml b/Documentation/devicetree/bindings/sound/qcom,q6apm-dai.yaml
index c1f9fc9eab64..8ad20f95c814 100644
--- a/Documentation/devicetree/bindings/sound/qcom,q6apm-dai.yaml
+++ b/Documentation/devicetree/bindings/sound/qcom,q6apm-dai.yaml
@@ -14,7 +14,11 @@ description: |
properties:
compatible:
- const: qcom,q6apm-dais
+ oneOf:
+ - const: qcom,q6apm-dais
+ - items:
+ - const: qcom,shikra-q6apm-dais
+ - const: qcom,q6apm-dais
iommus:
minItems: 1
@@ -33,7 +37,7 @@ properties:
required:
- compatible
-oneOf:
+anyOf:
- required:
- iommus
- required:
--
2.34.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v2 2/4] iommu/arm-smmu-qcom: Use identity domain for Shikra q6apm DAI
2026-11-27 8:48 ` [PATCH v2 0/4] Fix Shikra q6apm DAI under KVM/EL2 Mohit Sharma
2026-11-27 8:48 ` [PATCH v2 1/4] ASoC: dt-bindings: qcom,q6apm-dai: Add Shikra support Mohit Sharma
@ 2026-11-27 8:48 ` Mohit Sharma
2026-11-27 8:48 ` [PATCH v2 3/4] arm64: dts: qcom: shikra: Add q6apm DAI compatible Mohit Sharma
2026-11-27 8:48 ` [PATCH v2 4/4] ASoC: qcom: q6apm-dai: Allow the mDSP IOMMU path Mohit Sharma
3 siblings, 0 replies; 11+ messages in thread
From: Mohit Sharma @ 2026-11-27 8:48 UTC (permalink / raw)
To: Srinivas Kandagatla, Bjorn Andersson, Mark Brown
Cc: Ajay Kumar Nandam, Liam Girdwood, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Rob Clark, Will Deacon,
Robin Murphy, Joerg Roedel, Konrad Dybcio, Abel Vesa,
Jaroslav Kysela, Takashi Iwai, linux-sound, linux-arm-msm,
devicetree, iommu, linux-arm-kernel, linux-kernel, Mohit Sharma
Shikra's q6apm DAI is hosted on the modem DSP under SMMU stream ID
0x1cc. Its firmware consumes the SID-tagged shared-memory addresses as
physical addresses, so a translating domain leaves those addresses
unmapped and causes context faults when Linux owns the SMMU under EL2.
Add the Shikra q6apm DAI compatible to the Qualcomm SMMU client match
table. This selects an identity domain for this stream while retaining
an SMMU mapping scoped to its own stream ID.
Co-developed-by: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
Signed-off-by: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
Signed-off-by: Mohit Sharma <mohit.sharma@oss.qualcomm.com>
---
drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
index 795e8ec7e8fa..09ea293052b2 100644
--- a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
+++ b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
@@ -420,6 +420,7 @@ static const struct of_device_id qcom_smmu_client_of_match[] __maybe_unused = {
{ .compatible = "qcom,sdm670-mdss" },
{ .compatible = "qcom,sdm845-mdss" },
{ .compatible = "qcom,sdm845-mss-pil" },
+ { .compatible = "qcom,shikra-q6apm-dais" },
{ .compatible = "qcom,sm6115-mdss" },
{ .compatible = "qcom,sm6350-mdss" },
{ .compatible = "qcom,sm6375-mdss" },
--
2.34.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v2 3/4] arm64: dts: qcom: shikra: Add q6apm DAI compatible
2026-11-27 8:48 ` [PATCH v2 0/4] Fix Shikra q6apm DAI under KVM/EL2 Mohit Sharma
2026-11-27 8:48 ` [PATCH v2 1/4] ASoC: dt-bindings: qcom,q6apm-dai: Add Shikra support Mohit Sharma
2026-11-27 8:48 ` [PATCH v2 2/4] iommu/arm-smmu-qcom: Use identity domain for Shikra q6apm DAI Mohit Sharma
@ 2026-11-27 8:48 ` Mohit Sharma
2026-11-27 8:48 ` [PATCH v2 4/4] ASoC: qcom: q6apm-dai: Allow the mDSP IOMMU path Mohit Sharma
3 siblings, 0 replies; 11+ messages in thread
From: Mohit Sharma @ 2026-11-27 8:48 UTC (permalink / raw)
To: Srinivas Kandagatla, Bjorn Andersson, Mark Brown
Cc: Ajay Kumar Nandam, Liam Girdwood, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Rob Clark, Will Deacon,
Robin Murphy, Joerg Roedel, Konrad Dybcio, Abel Vesa,
Jaroslav Kysela, Takashi Iwai, linux-sound, linux-arm-msm,
devicetree, iommu, linux-arm-kernel, linux-kernel, Mohit Sharma
Add the Shikra-specific compatible to the q6apm DAI node while retaining
the generic fallback used by the ASoC driver. The specific compatible
lets arm-smmu-qcom select the identity domain required by the firmware
ABI when the EL2 overlay describes this stream to the SMMU.
The EL2 stream description is part of the prerequisite Shikra EL2
overlay series.
Co-developed-by: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
Signed-off-by: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
Signed-off-by: Mohit Sharma <mohit.sharma@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/shikra.dtsi | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/qcom/shikra.dtsi b/arch/arm64/boot/dts/qcom/shikra.dtsi
index 0a95ad5a5582..796d5225d161 100644
--- a/arch/arm64/boot/dts/qcom/shikra.dtsi
+++ b/arch/arm64/boot/dts/qcom/shikra.dtsi
@@ -2358,7 +2358,8 @@ q6apmbedai: bedais {
};
q6apmdai: dais {
- compatible = "qcom,q6apm-dais";
+ compatible = "qcom,shikra-q6apm-dais",
+ "qcom,q6apm-dais";
memory-region = <&audio_heap_mem
&audio_mdsp_carveout_mem>;
};
--
2.34.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v2 4/4] ASoC: qcom: q6apm-dai: Allow the mDSP IOMMU path
2026-11-27 8:48 ` [PATCH v2 0/4] Fix Shikra q6apm DAI under KVM/EL2 Mohit Sharma
` (2 preceding siblings ...)
2026-11-27 8:48 ` [PATCH v2 3/4] arm64: dts: qcom: shikra: Add q6apm DAI compatible Mohit Sharma
@ 2026-11-27 8:48 ` Mohit Sharma
3 siblings, 0 replies; 11+ messages in thread
From: Mohit Sharma @ 2026-11-27 8:48 UTC (permalink / raw)
To: Srinivas Kandagatla, Bjorn Andersson, Mark Brown
Cc: Ajay Kumar Nandam, Liam Girdwood, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Rob Clark, Will Deacon,
Robin Murphy, Joerg Roedel, Konrad Dybcio, Abel Vesa,
Jaroslav Kysela, Takashi Iwai, linux-sound, linux-arm-msm,
devicetree, iommu, linux-arm-kernel, linux-kernel, Mohit Sharma
The q6apm DAI currently selects SCM buffer assignment solely from the GPR
domain. This prevents an mDSP-backed DAI from using an IOMMU, even when
the device tree provides an iommus property for environments where the
mDSP stream is routed through the apps SMMU.
Use the parsed stream ID to distinguish the two memory access models. An
mDSP DAI without an IOMMU continues to use SCM-assigned buffers, while an
mDSP DAI with an IOMMU follows the existing DMA/IOMMU path. This also
avoids requiring SCM availability for the IOMMU configuration.
Fixes: bb8afd437d79 ("ASoC: qcom: q6apm-dai: add SCM buffer assignment for mDSP platforms")
Co-developed-by: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
Signed-off-by: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
Signed-off-by: Mohit Sharma <mohit.sharma@oss.qualcomm.com>
---
sound/soc/qcom/qdsp6/q6apm-dai.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/sound/soc/qcom/qdsp6/q6apm-dai.c b/sound/soc/qcom/qdsp6/q6apm-dai.c
index afa4bb095e09..94302837b93b 100644
--- a/sound/soc/qcom/qdsp6/q6apm-dai.c
+++ b/sound/soc/qcom/qdsp6/q6apm-dai.c
@@ -1221,16 +1221,11 @@ static int q6apm_dai_probe(struct platform_device *pdev)
}
if (apm && apm->gdev &&
- apm->gdev->domain_id == GPR_DOMAIN_ID_MODEM) {
+ apm->gdev->domain_id == GPR_DOMAIN_ID_MODEM &&
+ pdata->sid < 0) {
if (!qcom_scm_is_available())
return -EPROBE_DEFER;
- if (pdata->sid >= 0) {
- dev_err(dev,
- "iommus and mDSP SCM path are mutually exclusive\n");
- return -EINVAL;
- }
-
pdata->use_scm_assign = true;
rc = devm_add_action_or_reset(dev, q6apm_dai_scm_cleanup,
--
2.34.1
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2026-11-27 8:48 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-19 16:47 [PATCH 0/4] Fix Shikra q6apm DAI under KVM/EL2 Mohit Sharma
2026-11-19 16:47 ` [PATCH 1/4] dt-bindings: sound: qcom,q6apm-dai: allow Shikra compatible Mohit Sharma
2026-11-19 23:08 ` Mark Brown
2026-11-19 16:47 ` [PATCH 2/4] iommu: arm-smmu-qcom: use identity domain for Shikra q6apm DAI Mohit Sharma
2026-11-19 16:47 ` [PATCH 3/4] arm64: dts: qcom: shikra: add q6apm DAI compatible Mohit Sharma
2026-11-19 16:47 ` [PATCH 4/4] ASoC: qcom: q6apm-dai: allow the mDSP IOMMU path Mohit Sharma
2026-11-27 8:48 ` [PATCH v2 0/4] Fix Shikra q6apm DAI under KVM/EL2 Mohit Sharma
2026-11-27 8:48 ` [PATCH v2 1/4] ASoC: dt-bindings: qcom,q6apm-dai: Add Shikra support Mohit Sharma
2026-11-27 8:48 ` [PATCH v2 2/4] iommu/arm-smmu-qcom: Use identity domain for Shikra q6apm DAI Mohit Sharma
2026-11-27 8:48 ` [PATCH v2 3/4] arm64: dts: qcom: shikra: Add q6apm DAI compatible Mohit Sharma
2026-11-27 8:48 ` [PATCH v2 4/4] ASoC: qcom: q6apm-dai: Allow the mDSP IOMMU path Mohit Sharma
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®