1/*
2 * Copyright 2024 NXP
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#include <zephyr/dt-bindings/ipc_service/static_vrings.h>
8#include <zephyr/dt-bindings/memory-attr/memory-attr-arm.h>
9
10/ {
11	chosen {
12		/* Delete ipc chosen property where old IPM mailbox driver below is
13		 * configured.
14		 */
15		/delete-property/ zephyr,ipc;
16		/delete-property/ zephyr,ipc_shm;
17
18		zephyr,console = &lpuart1;
19		zephyr,shell-uart = &lpuart1;
20	};
21
22	/* Define memory regions for IPC
23	 * Note that shared memory must have specific MPU attributes set.
24	 */
25	 ocram2_ipc0: memory@202c0000{
26		compatible = "zephyr,memory-region", "mmio-sram";
27		reg = <0x202c0000 DT_SIZE_K(32)>;
28		zephyr,memory-region="OCRAM2_IPC0";
29		zephyr,memory-attr = <( DT_MEM_ARM(ATTR_MPU_IO))>;
30	};
31	ocram2_ipc1: memory@202c8000{
32		compatible = "zephyr,memory-region", "mmio-sram";
33		reg = <0x202c8000 DT_SIZE_K(32)>;
34		zephyr,memory-region="OCRAM2_IPC1";
35		zephyr,memory-attr = <( DT_MEM_ARM(ATTR_MPU_IO))>;
36	};
37
38	soc {
39		/* Delete IPM Driver node nxp,imx-mu */
40		/delete-node/ mailbox@40c48000;
41
42		/* Attach MBOX driver to MU Unit */
43		mbox:mbox@40c48000 {
44			compatible = "nxp,mbox-imx-mu";
45			reg = <0x40c48000 0x4000>;
46			interrupts = <118 0>;
47			rx-channels = <4>;
48			#mbox-cells = <1>;
49			status = "okay";
50		};
51	};
52
53	ipc {
54		/delete-node/ ipc0;
55
56		ipc0: ipc0 {
57			compatible = "zephyr,ipc-openamp-static-vrings";
58			memory-region = <&ocram2_ipc0>;
59			mboxes = <&mbox 0>, <&mbox 1>;
60			mbox-names = "tx", "rx";
61			role = "host";
62			status = "okay";
63		};
64
65		ipc1: ipc1 {
66			compatible = "zephyr,ipc-openamp-static-vrings";
67			memory-region = <&ocram2_ipc1>;
68			mboxes = <&mbox 2>, <&mbox 3>;
69			mbox-names = "tx", "rx";
70			role = "host";
71			zephyr,priority = <1 PRIO_COOP>;
72			zephyr,buffer-size = <128>;
73			status = "okay";
74		};
75	};
76};
77