2023-10-10 09:10:04

by Iuliana Prodan (OSS)

[permalink] [raw]
Subject: [PATCH v3 0/2] Rpmsg support for i.MX DSP with resource table

From: Iuliana Prodan <[email protected]>

These patches are needed in order to support rpmsg on DSP when a
resource table is available.

Changes since v2:
- add newline between nodes in dtsi (patch 2/2)

Changes since v1:
- add missing bracket in dtsi (patch 2/2)

Iuliana Prodan (2):
remoteproc: imx_dsp_rproc: add mandatory find_loaded_rsc_table op
arm64: dts: imx8mp: add reserve-memory nodes for DSP

arch/arm64/boot/dts/freescale/imx8mp.dtsi | 16 ++++++++++++++++
drivers/remoteproc/imx_dsp_rproc.c | 1 +
2 files changed, 17 insertions(+)

--
2.17.1


2023-10-10 09:11:13

by Iuliana Prodan (OSS)

[permalink] [raw]
Subject: [PATCH v3 1/2] remoteproc: imx_dsp_rproc: add mandatory find_loaded_rsc_table op

From: Iuliana Prodan <[email protected]>

Add the .find_loaded_rsc_table operation for i.MX DSP.
We need it for inter-process communication between DSP
and main core.

This callback is used to find the resource table (defined
in remote processor linker script) where the address of the
vrings along with the other allocated resources (carveouts etc)
are stored.
If this is not found, the vrings are not allocated and
the IPC between cores will not work.

Signed-off-by: Iuliana Prodan <[email protected]>
Reviewed-by: Daniel Baluta <[email protected]>
---
drivers/remoteproc/imx_dsp_rproc.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/remoteproc/imx_dsp_rproc.c b/drivers/remoteproc/imx_dsp_rproc.c
index 8fcda9b74545..a1c62d15f16c 100644
--- a/drivers/remoteproc/imx_dsp_rproc.c
+++ b/drivers/remoteproc/imx_dsp_rproc.c
@@ -940,6 +940,7 @@ static const struct rproc_ops imx_dsp_rproc_ops = {
.kick = imx_dsp_rproc_kick,
.load = imx_dsp_rproc_elf_load_segments,
.parse_fw = imx_dsp_rproc_parse_fw,
+ .find_loaded_rsc_table = rproc_elf_find_loaded_rsc_table,
.sanity_check = rproc_elf_sanity_check,
.get_boot_addr = rproc_elf_get_boot_addr,
};
--
2.17.1

2023-10-10 09:11:15

by Iuliana Prodan (OSS)

[permalink] [raw]
Subject: [PATCH v3 2/2] arm64: dts: imx8mp: add reserve-memory nodes for DSP

From: Iuliana Prodan <[email protected]>

Add the reserve-memory nodes used by DSP when the rpmsg
feature is enabled.

Signed-off-by: Iuliana Prodan <[email protected]>
---
arch/arm64/boot/dts/freescale/imx8mp.dtsi | 16 ++++++++++++++++
1 file changed, 16 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
index cc406bb338fe..22815b3ea890 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
@@ -211,6 +211,22 @@
reg = <0 0x92400000 0 0x2000000>;
no-map;
};
+
+ dsp_vdev0vring0: vdev0vring0@942f0000 {
+ reg = <0 0x942f0000 0 0x8000>;
+ no-map;
+ };
+
+ dsp_vdev0vring1: vdev0vring1@942f8000 {
+ reg = <0 0x942f8000 0 0x8000>;
+ no-map;
+ };
+
+ dsp_vdev0buffer: vdev0buffer@94300000 {
+ compatible = "shared-dma-pool";
+ reg = <0 0x94300000 0 0x100000>;
+ no-map;
+ };
};

pmu {
--
2.17.1

2023-10-11 05:37:25

by Alexander Stein

[permalink] [raw]
Subject: Re: [PATCH v3 2/2] arm64: dts: imx8mp: add reserve-memory nodes for DSP

Hi Iuliana,

Am Dienstag, 10. Oktober 2023, 11:09:29 CEST schrieb Iuliana Prodan (OSS):
> From: Iuliana Prodan <[email protected]>
>
> Add the reserve-memory nodes used by DSP when the rpmsg
> feature is enabled.
>
> Signed-off-by: Iuliana Prodan <[email protected]>
> ---
> arch/arm64/boot/dts/freescale/imx8mp.dtsi | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> b/arch/arm64/boot/dts/freescale/imx8mp.dtsi index
> cc406bb338fe..22815b3ea890 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> @@ -211,6 +211,22 @@
> reg = <0 0x92400000 0 0x2000000>;
> no-map;
> };
> +
> + dsp_vdev0vring0: vdev0vring0@942f0000 {
> + reg = <0 0x942f0000 0 0x8000>;
> + no-map;
> + };
> +
> + dsp_vdev0vring1: vdev0vring1@942f8000 {
> + reg = <0 0x942f8000 0 0x8000>;
> + no-map;
> + };
> +
> + dsp_vdev0buffer: vdev0buffer@94300000 {
> + compatible = "shared-dma-pool";
> + reg = <0 0x94300000 0 0x100000>;
> + no-map;
> + };

Please configure these reserved memories on board level. Not every i.MX8MP
based board uses this DSP or has these memory addresses available.

Best regards,
Alexander

> };
>
> pmu {


--
TQ-Systems GmbH | M?hlstra?e 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht M?nchen, HRB 105018
Gesch?ftsf?hrer: Detlef Schneider, R?diger Stahl, Stefan Schneider
http://www.tq-group.com/



2023-10-13 08:36:04

by Iuliana Prodan

[permalink] [raw]
Subject: Re: [PATCH v3 2/2] arm64: dts: imx8mp: add reserve-memory nodes for DSP

Hi Alexander,

On 10/11/2023 8:37 AM, Alexander Stein wrote:
> Hi Iuliana,
>
> Am Dienstag, 10. Oktober 2023, 11:09:29 CEST schrieb Iuliana Prodan (OSS):
>> From: Iuliana Prodan <[email protected]>
>>
>> Add the reserve-memory nodes used by DSP when the rpmsg
>> feature is enabled.
>>
>> Signed-off-by: Iuliana Prodan <[email protected]>
>> ---
>> arch/arm64/boot/dts/freescale/imx8mp.dtsi | 16 ++++++++++++++++
>> 1 file changed, 16 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
>> b/arch/arm64/boot/dts/freescale/imx8mp.dtsi index
>> cc406bb338fe..22815b3ea890 100644
>> --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
>> +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
>> @@ -211,6 +211,22 @@
>> reg = <0 0x92400000 0 0x2000000>;
>> no-map;
>> };
>> +
>> + dsp_vdev0vring0: vdev0vring0@942f0000 {
>> + reg = <0 0x942f0000 0 0x8000>;
>> + no-map;
>> + };
>> +
>> + dsp_vdev0vring1: vdev0vring1@942f8000 {
>> + reg = <0 0x942f8000 0 0x8000>;
>> + no-map;
>> + };
>> +
>> + dsp_vdev0buffer: vdev0buffer@94300000 {
>> + compatible = "shared-dma-pool";
>> + reg = <0 0x94300000 0 0x100000>;
>> + no-map;
>> + };
> Please configure these reserved memories on board level. Not every i.MX8MP
> based board uses this DSP or has these memory addresses available.

Will it be ok in imx8mp-evk.dts?

Thanks,
Iulia

> Best regards,
> Alexander
>
>> };
>>
>> pmu {
>

2023-10-13 09:32:16

by Alexander Stein

[permalink] [raw]
Subject: Re: [PATCH v3 2/2] arm64: dts: imx8mp: add reserve-memory nodes for DSP

Hi Iuliana,

Am Freitag, 13. Oktober 2023, 10:35:17 CEST schrieb Iuliana Prodan:
> Hi Alexander,
>
> On 10/11/2023 8:37 AM, Alexander Stein wrote:
> > Hi Iuliana,
> >
> > Am Dienstag, 10. Oktober 2023, 11:09:29 CEST schrieb Iuliana Prodan (OSS):
> >> From: Iuliana Prodan <[email protected]>
> >>
> >> Add the reserve-memory nodes used by DSP when the rpmsg
> >> feature is enabled.
> >>
> >> Signed-off-by: Iuliana Prodan <[email protected]>
> >> ---
> >>
> >> arch/arm64/boot/dts/freescale/imx8mp.dtsi | 16 ++++++++++++++++
> >> 1 file changed, 16 insertions(+)
> >>
> >> diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> >> b/arch/arm64/boot/dts/freescale/imx8mp.dtsi index
> >> cc406bb338fe..22815b3ea890 100644
> >> --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> >> +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> >> @@ -211,6 +211,22 @@
> >>
> >> reg = <0 0x92400000 0 0x2000000>;
> >> no-map;
> >>
> >> };
> >>
> >> +
> >> + dsp_vdev0vring0: vdev0vring0@942f0000 {
> >> + reg = <0 0x942f0000 0 0x8000>;
> >> + no-map;
> >> + };
> >> +
> >> + dsp_vdev0vring1: vdev0vring1@942f8000 {
> >> + reg = <0 0x942f8000 0 0x8000>;
> >> + no-map;
> >> + };
> >> +
> >> + dsp_vdev0buffer: vdev0buffer@94300000 {
> >> + compatible = "shared-dma-pool";
> >> + reg = <0 0x94300000 0 0x100000>;
> >> + no-map;
> >> + };
> >
> > Please configure these reserved memories on board level. Not every i.MX8MP
> > based board uses this DSP or has these memory addresses available.
>
> Will it be ok in imx8mp-evk.dts?

If that is the board using the DSP and the reserved memory, then yes.

Best regards,
Alexander

> Thanks,
> Iulia
>
> > Best regards,
> > Alexander
> >
> >> };
> >>
> >> pmu {


--
TQ-Systems GmbH | M?hlstra?e 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht M?nchen, HRB 105018
Gesch?ftsf?hrer: Detlef Schneider, R?diger Stahl, Stefan Schneider
http://www.tq-group.com/