From 5ffad148518f13e92c3e043ba6477a58ad353db1 Mon Sep 17 00:00:00 2001 From: Iuliana Prodan Date: Mon, 16 Dec 2024 12:14:53 +0200 Subject: [PATCH 1/5] manifest: update hal_nxp revision Update hal_nxp revision to pull in the following patch: e5dc558ed6a9("mcux: hal_nxp: Enable MU1 driver for 8ULP") Signed-off-by: Iuliana Prodan --- west.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/west.yml b/west.yml index 5b84378e2ea113..65c2d1ce8b8791 100644 --- a/west.yml +++ b/west.yml @@ -203,7 +203,7 @@ manifest: groups: - hal - name: hal_nxp - revision: d2e2514cbe70babc2dfe6e8eb0e4f9e4c97769b6 + revision: pull/488/head path: modules/hal/nxp groups: - hal From efdfaf0fb019074c12b54ce8478e710e9ecbdedd Mon Sep 17 00:00:00 2001 From: Iuliana Prodan Date: Mon, 16 Dec 2024 03:21:16 +0200 Subject: [PATCH 2/5] dts: xtensa: nxp: fix compile warning Fix the following compile warning: "Warning (unique_unit_address_if_enabled): /cpus/cpu@0: duplicate unit-address (also used in node /cpus/interrupt-controller@0)" Signed-off-by: Iuliana Prodan --- dts/xtensa/nxp/nxp_imx8ulp.dtsi | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/dts/xtensa/nxp/nxp_imx8ulp.dtsi b/dts/xtensa/nxp/nxp_imx8ulp.dtsi index 46381671e05d21..4bce740ddc4a77 100644 --- a/dts/xtensa/nxp/nxp_imx8ulp.dtsi +++ b/dts/xtensa/nxp/nxp_imx8ulp.dtsi @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 NXP + * Copyright 2023, 2024 NXP * * SPDX-License-Identifier: Apache-2.0 */ @@ -17,16 +17,16 @@ device_type = "cpu"; compatible = "cdns,tensilica-xtensa-lx7"; reg = <0>; - }; - #address-cells = <1>; - #size-cells = <0>; + #address-cells = <1>; + #size-cells = <0>; - clic: interrupt-controller@0 { - compatible = "cdns,xtensa-core-intc"; - reg = <0>; - interrupt-controller; - #interrupt-cells = <3>; + clic: interrupt-controller@0 { + compatible = "cdns,xtensa-core-intc"; + reg = <0>; + interrupt-controller; + #interrupt-cells = <3>; + }; }; }; From 2bfece822b9e02884c498c917ae30ac369bdcd49 Mon Sep 17 00:00:00 2001 From: Iuliana Prodan Date: Mon, 16 Dec 2024 03:23:24 +0200 Subject: [PATCH 3/5] soc: nxp: imx: add resource_table section in linker script Add resource_table section in linker script for i.MX8ULP, for inter-process communication. Signed-off-by: Iuliana Prodan --- soc/nxp/imx/imx8ulp/adsp/linker.ld | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/soc/nxp/imx/imx8ulp/adsp/linker.ld b/soc/nxp/imx/imx8ulp/adsp/linker.ld index a9f07e825ec3b1..98fab64a087d4f 100644 --- a/soc/nxp/imx/imx8ulp/adsp/linker.ld +++ b/soc/nxp/imx/imx8ulp/adsp/linker.ld @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 NXP + * Copyright 2023, 2024 NXP * * SPDX-License-Identifier: Apache-2.0 */ @@ -172,6 +172,13 @@ EXTERN(ext_man_fw_ver) SECTIONS { +#ifdef CONFIG_OPENAMP_RSC_TABLE + SECTION_PROLOGUE(.resource_table,, SUBALIGN(4)) + { + KEEP(*(.resource_table*)) + } GROUP_LINK_IN(ROMABLE_REGION) +#endif + #include #ifdef CONFIG_LLEXT From 194f1bdb042d16ff72ede181e99f8d1d253f6729 Mon Sep 17 00:00:00 2001 From: Iuliana Prodan Date: Mon, 16 Dec 2024 03:22:32 +0200 Subject: [PATCH 4/5] dts: xtensa: nxp: add mailbox node Add mailbox node used for inter-process communication. Signed-off-by: Iuliana Prodan --- dts/xtensa/nxp/nxp_imx8ulp.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dts/xtensa/nxp/nxp_imx8ulp.dtsi b/dts/xtensa/nxp/nxp_imx8ulp.dtsi index 4bce740ddc4a77..c0850ef9eab6e2 100644 --- a/dts/xtensa/nxp/nxp_imx8ulp.dtsi +++ b/dts/xtensa/nxp/nxp_imx8ulp.dtsi @@ -98,4 +98,14 @@ dai-index = <6>; status = "disabled"; }; + + mu3: mbox@2da20000 { + compatible = "nxp,mbox-imx-mu"; + reg = <0x2da20000 DT_SIZE_K(64)>; + interrupt-parent = <&clic>; + interrupts = <15 0 0>; + rx-channels = <4>; + #mbox-cells = <1>; + status = "disabled"; + }; }; From 74e80fa52fd846bc732c3cc987163f15ccc0bdbb Mon Sep 17 00:00:00 2001 From: Iuliana Prodan Date: Mon, 16 Dec 2024 03:26:31 +0200 Subject: [PATCH 5/5] samples: add support for i.MX8ULP DSP in openamp_rsc_table Add the dts and config overlay for imx8ulp_evk//adsp to have the openamp_rsc_table sample working on HiFi4 DSP from i.MX8ULP. Since openamp_rsc_table sample uses IPM API and i.MX8ULP has a mbox driver for messaging unit, we need a mailbox node. This will load the ipm_mbox driver that exposes the IPM interface while using a MBOX driver in the back-end. Signed-off-by: Iuliana Prodan --- .../boards/imx8ulp_evk_mimx8ud7_adsp.conf | 8 +++++ .../boards/imx8ulp_evk_mimx8ud7_adsp.overlay | 31 +++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 samples/subsys/ipc/openamp_rsc_table/boards/imx8ulp_evk_mimx8ud7_adsp.conf create mode 100644 samples/subsys/ipc/openamp_rsc_table/boards/imx8ulp_evk_mimx8ud7_adsp.overlay diff --git a/samples/subsys/ipc/openamp_rsc_table/boards/imx8ulp_evk_mimx8ud7_adsp.conf b/samples/subsys/ipc/openamp_rsc_table/boards/imx8ulp_evk_mimx8ud7_adsp.conf new file mode 100644 index 00000000000000..35b9c68a4ee1f8 --- /dev/null +++ b/samples/subsys/ipc/openamp_rsc_table/boards/imx8ulp_evk_mimx8ud7_adsp.conf @@ -0,0 +1,8 @@ +CONFIG_LOG_PRINTK=n +CONFIG_OPENAMP_WITH_DCACHE=y + +CONFIG_MBOX=y +CONFIG_MBOX_INIT_PRIORITY=3 + +CONFIG_IPM_MBOX=y +CONFIG_MBOX_NXP_IMX_MU=y diff --git a/samples/subsys/ipc/openamp_rsc_table/boards/imx8ulp_evk_mimx8ud7_adsp.overlay b/samples/subsys/ipc/openamp_rsc_table/boards/imx8ulp_evk_mimx8ud7_adsp.overlay new file mode 100644 index 00000000000000..4b38ed19328d46 --- /dev/null +++ b/samples/subsys/ipc/openamp_rsc_table/boards/imx8ulp_evk_mimx8ud7_adsp.overlay @@ -0,0 +1,31 @@ +/* + * Copyright 2024 NXP + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/ { + chosen { + /* + * shared memory reserved for the inter-processor communication + */ + zephyr,ipc_shm = &dspsram3; + zephyr,ipc = &mailbox0; + }; + + dspsram3: memory@8fef0000 { + compatible = "mmio-sram"; + reg = <0x8fef0000 0x110000>; + }; + + mailbox0: mailbox { + compatible = "zephyr,mbox-ipm"; + mboxes = <&mu3 0>, <&mu3 1>; + mbox-names = "tx", "rx"; + status = "okay"; + }; +}; + +&mu3 { + status = "okay"; +};