// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
 * Copyright (C) 2023-2026 Marek Vasut
 */
/dts-v1/;
/plugin/;

#include <dt-bindings/clock/imx8mp-clock.h>

&{/} {
	#address-cells = <2>;
	#size-cells = <2>;

	reserved-memory {	/* CM7 reserved memory */
		#address-cells = <2>;
		#size-cells = <2>;
		ranges;

		m_core_reserved: m_core@54000000 {
			reg = <0 0x54000000 0 0x1000000>;
			no-map;
		};

		vdev0vring0: vdev0vring0@55000000 {
			reg = <0 0x55000000 0 0x8000>;
			no-map;
		};

		vdev0vring1: vdev0vring1@55008000 {
			reg = <0 0x55008000 0 0x8000>;
			no-map;
		};

		rsc_table: rsc-table@550ff000 {
			reg = <0 0x550ff000 0 0x1000>;
			no-map;
		};

		vdev0buffer: vdev0buffer@55400000 {
			compatible = "shared-dma-pool";
			reg = <0 0x55400000 0 0x100000>;
			no-map;
		};
	};

	imx8mp-cm7 {
		compatible = "fsl,imx8mp-cm7-mmio";
		clocks = <&clk IMX8MP_CLK_M7_CORE>;
		fsl,iomuxc-gpr = <&gpr>;
		mbox-names = "tx", "rx", "rxdb";
		mboxes = <&mu 0 1
			  &mu 1 1
			  &mu 3 1>;
		memory-region = <&vdev0buffer>, <&vdev0vring0>, <&vdev0vring1>, <&rsc_table>;
		syscon = <&src>;
	};
};