// SPDX-License-Identifier: GPL-2.0-only OR MIT
/**
 * Device Tree Source for enabling IPC using TI SDK firmware on AM62P SoCs
 *
 * Copyright (C) 2023-2025 Texas Instruments Incorporated - https://www.ti.com/
 */

&reserved_memory {
	mcu_r5fss0_core0_dma_memory_region: memory@9b800000 {
		compatible = "shared-dma-pool";
		reg = <0x00 0x9b800000 0x00 0x100000>;
		no-map;
	};

	mcu_r5fss0_core0_memory_region: memory@9b900000 {
		compatible = "shared-dma-pool";
		reg = <0x00 0x9b900000 0x00 0xf00000>;
		no-map;
	};
};

&mailbox0_cluster0 {
	status = "okay";

	mbox_r5_0: mbox-r5-0 {
		ti,mbox-rx = <0 0 0>;
		ti,mbox-tx = <1 0 0>;
	};
};

&mailbox0_cluster1 {
	status = "okay";

	mbox_mcu_r5_0: mbox-mcu-r5-0 {
		ti,mbox-rx = <0 0 0>;
		ti,mbox-tx = <1 0 0>;
	};
};

&wkup_r5fss0 {
	status = "okay";
};

&wkup_r5fss0_core0 {
	bootph-pre-ram;
	mboxes = <&mailbox0_cluster0 &mbox_r5_0>;
	memory-region = <&wkup_r5fss0_core0_dma_memory_region>,
			<&wkup_r5fss0_core0_ipc_region>,
			<&wkup_r5fss0_core0_lpm_fs_stub_region>,
			<&wkup_r5fss0_core0_lpm_metadata_region>,
			<&wkup_r5fss0_core0_lpm_rest_region>,
			<&wkup_r5fss0_core0_dm_region>;
	memory-region-names = "dma", "ipc", "lpm-stub",
			      "lpm-metadata", "lpm-context",
			      "dm-firmware";
	status = "okay";
};

&mcu_r5fss0 {
	status = "okay";
};

&mcu_r5fss0_core0 {
	mboxes = <&mailbox0_cluster1 &mbox_mcu_r5_0>;
	memory-region = <&mcu_r5fss0_core0_dma_memory_region>,
			<&mcu_r5fss0_core0_memory_region>;
	memory-region-names = "dma", "firmware";
	status = "okay";
};