// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
 * Copyright (C) 2024 PHYTEC Messtechnik GmbH
 */

#include "imx8mm-u-boot.dtsi"

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

		/*
		 * Limit memory usage below the 4 GB (32-bit) boundary.
		 * The i.MX8MM DMA and peripherals cannot access >32-bit
		 * addresses. This prevents allocation failures in UEFI mode.
		 */
		u_boot_sdma_shield: sdma-shield@100000000 {
			reg = <0x1 0x00000000 0x0 0x40000000>;
		};
	};

	wdt-reboot {
		compatible = "wdt-reboot";
		wdt = <&wdog1>;
		bootph-pre-ram;
	};

	bootstd {
		bootph-verify;
		compatible = "u-boot,boot-std";

		filename-prefixes = "/", "/boot/";
		bootdev-order = "mmc2", "mmc1", "ethernet";

		rauc {
			compatible = "u-boot,distro-rauc";
		};

		script {
			compatible = "u-boot,script";
		};
	};
};

&pinctrl_i2c1 {
	bootph-pre-ram;
};

&pinctrl_uart3 {
	bootph-pre-ram;
};

&pinctrl_usdhc2_gpio {
	bootph-pre-ram;
};

&pinctrl_usdhc2 {
	bootph-pre-ram;
};

&pinctrl_usdhc3 {
	bootph-pre-ram;
};

&pinctrl_wdog {
	bootph-pre-ram;
};

&gpio1 {
	bootph-pre-ram;
};

&gpio2 {
	bootph-pre-ram;
};

&gpio3 {
	bootph-pre-ram;
};

&gpio4 {
	bootph-pre-ram;
};

&gpio5 {
	bootph-pre-ram;
};

&uart3 {
	bootph-pre-ram;
};

&i2c1 {
	bootph-pre-ram;
};

&usdhc2 {
	bootph-pre-ram;
};

&usdhc3 {
	bootph-pre-ram;
};

&wdog1 {
	bootph-pre-ram;
};
