From 762cecdfb840a5c26348e37630e1a39ab38862ab Mon Sep 17 00:00:00 2001 From: "Isaac J. Manjarres" Date: Fri, 7 May 2021 10:06:46 -0700 Subject: [PATCH 1/4] ARM: dts: msm: Update the memory map for 1 GB variants of sdxlemur Update the memory map for all 1 GB variants of sdxlemur to version 2 by introducing a carveout for audio usecases. Change-Id: I7a387bbcbb1e6d290625549a56315142bf7fefb3 --- qcom/sdxlemur-1024mb.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/qcom/sdxlemur-1024mb.dtsi b/qcom/sdxlemur-1024mb.dtsi index 86fae265cfbd..e7985b5815af 100644 --- a/qcom/sdxlemur-1024mb.dtsi +++ b/qcom/sdxlemur-1024mb.dtsi @@ -7,3 +7,9 @@ &access_control_mem { reg = <0x8fd80000 0x80000>; }; + +&reserved_memory { + audio_heap_mem: audio_mem_region@8c000000 { + reg = <0x8c000000 0x400000>; + }; +}; From 13bb7b25dfcd665ad895be5123dedf9233a8bb12 Mon Sep 17 00:00:00 2001 From: "Isaac J. Manjarres" Date: Fri, 7 May 2021 18:08:55 -0700 Subject: [PATCH 2/4] ARM: dts: msm: Add an audio ION device node for the audio carveout heap Add an audio ION device node for the audio carveout heap on sdxlemur to ensure that the carveout region is hyp assigned at boot. Change-Id: I32809f50c2767a65303bc6de7e91ad8a310ba84e --- qcom/sdx-audio-lpass.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/qcom/sdx-audio-lpass.dtsi b/qcom/sdx-audio-lpass.dtsi index 2369bfe586b0..0cf809dc3c8f 100644 --- a/qcom/sdx-audio-lpass.dtsi +++ b/qcom/sdx-audio-lpass.dtsi @@ -19,6 +19,12 @@ memory-region = <&audio_mem>; }; + qcom,msm-audio-ion-co { + compatible = "qcom,msm-audio-ion-cma"; + qcom,scm-mp-enabled; + memory-region = <&audio_heap_mem>; + }; + pcm0: qcom,msm-pcm { compatible = "qcom,msm-pcm-dsp"; qcom,msm-pcm-dsp-id = <0>; From 40fb3c8793fb83c19d2dd6eaee32cae2ed2b31c7 Mon Sep 17 00:00:00 2001 From: "Isaac J. Manjarres" Date: Wed, 28 Apr 2021 13:43:04 -0700 Subject: [PATCH 3/4] ARM: dts: msm: Add a carveout heap for audio usecases on sdxlemur Define a carveout heap for audio usecases on 1 GB variants of sdxlemur. Change-Id: I71e1904b68b85a16da7f9d95ca60363dffaf51a7 --- qcom/sdxlemur-audio.dtsi | 5 +++++ qcom/sdxlemur-ion.dtsi | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/qcom/sdxlemur-audio.dtsi b/qcom/sdxlemur-audio.dtsi index 4f3cae1c280c..189ec72a5c12 100644 --- a/qcom/sdxlemur-audio.dtsi +++ b/qcom/sdxlemur-audio.dtsi @@ -38,3 +38,8 @@ "msm-dai-q6-auxpcm.2"; }; }; + +&audio_co_heap { + status = "okay"; + memory-region = <&audio_heap_mem>; +}; diff --git a/qcom/sdxlemur-ion.dtsi b/qcom/sdxlemur-ion.dtsi index dbf4220881a9..8fb6e0abb786 100644 --- a/qcom/sdxlemur-ion.dtsi +++ b/qcom/sdxlemur-ion.dtsi @@ -17,6 +17,16 @@ qcom,ion-heap-type = "DMA"; }; + audio_co_heap: qcom,ion-heap@17 { /* AUDIO CARVEOUT HEAP */ + reg = ; + qcom,ion-heap-type = "MSM_CARVEOUT"; + /* + * memory-region must be specified when enabled here or + * when the node is overridden to be enabled elsewhere. + */ + status = "disabled"; + }; + qcom,ion-heap@27 { /* QSEECOM HEAP */ reg = ; memory-region = <&qseecom_mem>; From 4fc73ce5c56ceed3ef49fc5ebaecc349e9328b02 Mon Sep 17 00:00:00 2001 From: "Isaac J. Manjarres" Date: Fri, 7 May 2021 10:09:46 -0700 Subject: [PATCH 4/4] ARM: dts: msm: Remove the audio ION CMA heap for sdxlemur Remove the audio ION CMA heap, along with its associated memory region, and the audio device node, as they are no longer in use. Change-Id: Ifa5730b8fd6a3f2ceeea82bee8aec153f82d60e1 --- qcom/sdx-audio-lpass.dtsi | 6 ------ qcom/sdxlemur-ion.dtsi | 6 ------ qcom/sdxlemur.dtsi | 8 -------- 3 files changed, 20 deletions(-) diff --git a/qcom/sdx-audio-lpass.dtsi b/qcom/sdx-audio-lpass.dtsi index 0cf809dc3c8f..fdbf5d95c4e0 100644 --- a/qcom/sdx-audio-lpass.dtsi +++ b/qcom/sdx-audio-lpass.dtsi @@ -14,12 +14,6 @@ }; qcom,msm-audio-ion { - compatible = "qcom,msm-audio-ion-cma"; - qcom,scm-mp-enabled; - memory-region = <&audio_mem>; - }; - - qcom,msm-audio-ion-co { compatible = "qcom,msm-audio-ion-cma"; qcom,scm-mp-enabled; memory-region = <&audio_heap_mem>; diff --git a/qcom/sdxlemur-ion.dtsi b/qcom/sdxlemur-ion.dtsi index 8fb6e0abb786..ae1ce3979e3f 100644 --- a/qcom/sdxlemur-ion.dtsi +++ b/qcom/sdxlemur-ion.dtsi @@ -11,12 +11,6 @@ qcom,ion-heap-type = "MSM_SYSTEM"; }; - qcom,ion-heap@8 { /* AUDIO HEAP */ - reg = ; - memory-region = <&audio_mem>; - qcom,ion-heap-type = "DMA"; - }; - audio_co_heap: qcom,ion-heap@17 { /* AUDIO CARVEOUT HEAP */ reg = ; qcom,ion-heap-type = "MSM_CARVEOUT"; diff --git a/qcom/sdxlemur.dtsi b/qcom/sdxlemur.dtsi index b111a051ee4d..a130619ee521 100644 --- a/qcom/sdxlemur.dtsi +++ b/qcom/sdxlemur.dtsi @@ -69,14 +69,6 @@ size = <0x400000>; }; - - audio_mem: audio_region@0 { - compatible = "shared-dma-pool"; - alloc-ranges = <0x00000000 0xffffffff>; - reusable; - size = <0x400000>; - }; - llcc_tcm_mem: llcc_tcm_region { no-map; reg = <0x15800000 0x800000>;