// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Copyright (C) 2025 PHYTEC Messtechnik GmbH
 */

#include "imx8mp-u-boot.dtsi"

/ {
	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";

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

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

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

&reg_usdhc2_vmmc {
	bootph-pre-ram;
};

&pinctrl_uart4 {
	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;
};

&uart4 {
	bootph-pre-ram;
};

&i2c1 {
	bootph-pre-ram;
};

&pmic {
	bootph-pre-ram;
};

/* USB1 Type-C */
&usb3_phy0 {
	status = "okay";
};

&usb3_0 {
	fsl,over-current-active-low;
	fsl,power-active-low;
	status = "okay";
};

&usb_dwc3_0 {
	dr_mode = "peripheral";
	status = "okay";
};

/* USB2 4-port USB3.0 HUB */
&usb3_phy1 {
	vbus-supply = <&reg_vdd_5v0>;
	status = "okay";
};

&usb3_1 {
	fsl,permanently-attached;
	fsl,disable-port-power-control;
	status = "okay";
};

&usb_dwc3_1 {
	dr_mode = "host";
	status = "okay";
};

&usdhc2 {
	bootph-pre-ram;
};

&usdhc3 {
	bootph-pre-ram;
};

&wdog1 {
	bootph-pre-ram;
};
