From e7f937c19e832194ee423275de808ae021e46864 Mon Sep 17 00:00:00 2001 From: Kunlei Zhang Date: Wed, 24 Jun 2020 22:04:43 +0800 Subject: [PATCH] ARM: dts: msm: add CMA heap allocation Add CMA heap allocation. Change-Id: I6a1995ab21a9a7b9d0352d21c999d143da91c732 --- bindings/sound/qcom-audio-dev.txt | 10 ++++++++++ qcom/lahaina-audio.dtsi | 4 ++++ qcom/lahaina-ion.dtsi | 6 ++++++ qcom/lahaina.dtsi | 8 ++++++++ 4 files changed, 28 insertions(+) diff --git a/bindings/sound/qcom-audio-dev.txt b/bindings/sound/qcom-audio-dev.txt index 52f415032020..5842a462546d 100644 --- a/bindings/sound/qcom-audio-dev.txt +++ b/bindings/sound/qcom-audio-dev.txt @@ -943,6 +943,16 @@ Example: qcom,smmu-enabled; }; +* msm-audio-ion-cma + +Required properties: + - compatible : "qcom,msm-audio-ion-cma" + +Example: + qcom,msm-audio-ion-cma { + compatible = "qcom,msm-audio-ion-cma"; + }; + * msm-dai-tdm [First Level Nodes] diff --git a/qcom/lahaina-audio.dtsi b/qcom/lahaina-audio.dtsi index 01ec6410d318..8344fd6e8bad 100644 --- a/qcom/lahaina-audio.dtsi +++ b/qcom/lahaina-audio.dtsi @@ -7,6 +7,10 @@ }; &audio_apr { + msm_audio_ion_cma: qcom,msm-audio-ion-cma { + compatible = "qcom,msm-audio-ion-cma"; + }; + q6core: qcom,q6core-audio { compatible = "qcom,q6core-audio"; #address-cells = <1>; diff --git a/qcom/lahaina-ion.dtsi b/qcom/lahaina-ion.dtsi index a530be30f411..eaf915b9caac 100644 --- a/qcom/lahaina-ion.dtsi +++ b/qcom/lahaina-ion.dtsi @@ -61,5 +61,11 @@ qcom,ion-heap-type = "HYP_CMA"; }; + qcom,ion-heap@5 { /* AUDIO ML HEAP */ + reg = ; + memory-region = <&audio_cma_mem>; + qcom,ion-heap-type = "DMA"; + }; + }; }; diff --git a/qcom/lahaina.dtsi b/qcom/lahaina.dtsi index da0a0e2781cf..20123c09b39f 100644 --- a/qcom/lahaina.dtsi +++ b/qcom/lahaina.dtsi @@ -499,6 +499,14 @@ size = <0x0 0x1000000>; }; + audio_cma_mem: audio_cma_region { + compatible = "shared-dma-pool"; + alloc-ranges = <0x0 0x00000000 0x0 0xffffffff>; + reusable; + alignment = <0x0 0x400000>; + size = <0x0 0x1C00000>; + }; + splash_memory:splash_region { reg = <0x0 0xe1000000 0x0 0x02300000>; label = "cont_splash_region";