Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 32 additions & 4 deletions Documentation/devicetree/bindings/sound/qcom,q6apm-dai.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ maintainers:
- Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

description: |
This binding describes the Qualcomm APM DAIs in DSP
This binding describes the Qualcomm APM DAIs in DSP.
When qcom,vmid is present, the driver performs SCM memory
assignment for PCM DMA buffers and any reserved-memory regions
listed in memory-region, granting the specified VMIDs RW access
while retaining HLOS as a co-owner.

properties:
compatible:
Expand All @@ -20,9 +24,21 @@ properties:
minItems: 1
maxItems: 2

memory-region:
description:
List of phandles to reserved-memory regions (shared-dma-pool,
no-map) that must be SCM-assigned to the VMIDs in qcom,vmid.
The first entry is the control-path buffer; subsequent entries
are data-path buffers. Only meaningful when qcom,vmid is present.
minItems: 1
maxItems: 8

qcom,vmid:
description: Optional list of destination VMIDs to share PCM DMA buffers with.
HLOS retains RW access as source owner and must not be listed.
description:
Optional list of destination VMIDs to grant RW access to PCM DMA
buffers and any memory-region carveouts. HLOS retains RW access
as source owner and must not be listed. When present,
qcom_scm_is_available() must return true at probe time.
$ref: /schemas/types.yaml#/definitions/uint32-array
items:
minimum: 1
Expand All @@ -32,7 +48,10 @@ properties:

required:
- compatible
- iommus

dependentRequired:
memory-region:
- qcom,vmid

additionalProperties: false

Expand All @@ -42,3 +61,12 @@ examples:
compatible = "qcom,q6apm-dais";
iommus = <&apps_smmu 0x1801 0x0>;
};
- |
#include <dt-bindings/firmware/qcom,scm.h>
dais {
compatible = "qcom,q6apm-dais";
iommus = <&apps_smmu 0x0c01 0x0>;
/* index 0: control path, index 1: data path */
memory-region = <&audio_heap_mem &audio_mdsp_carveout_mem>;
qcom,vmid = <QCOM_SCM_VMID_MSS_MSA QCOM_SCM_VMID_LPASS>;
};
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,13 @@ patternProperties:

clock-names:
minItems: 1
maxItems: 3
items:
- const: mclk
- const: bclk
- const: eclk
enum: [mclk, bclk, eclk]

dependencies:
clocks: [ clock-names ]
clock-names: [ clocks ]
clocks: [clock-names]
clock-names: [clocks]

required:
- reg
Expand Down
11 changes: 10 additions & 1 deletion arch/arm64/boot/dts/qcom/shikra.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,14 @@
};

audio_heap_mem: audio-heap@86200000 {
reg = <0x0 0x86200000 0x0 0x100000>;
compatible = "shared-dma-pool";
reg = <0x0 0x86200000 0x0 0x40000>;
no-map;
};

audio_mdsp_carveout_mem: audio-mdsp-carveout@86240000 {
compatible = "shared-dma-pool";
reg = <0x0 0x86240000 0x0 0x100000>;
no-map;
};

Expand Down Expand Up @@ -2634,6 +2641,8 @@

q6apmdai: dais {
compatible = "qcom,q6apm-dais";
memory-region = <&audio_heap_mem
&audio_mdsp_carveout_mem>;
qcom,vmid = <QCOM_SCM_VMID_LPASS
QCOM_SCM_VMID_MSS_MSA>;
};
Expand Down
1 change: 1 addition & 0 deletions sound/soc/qcom/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ config SND_SOC_QDSP6_ASM_DAI

config SND_SOC_QDSP6_APM_DAI
tristate
select QCOM_SCM
select SND_SOC_COMPRESS

config SND_SOC_QDSP6_APM_LPASS_DAI
Expand Down
Loading