// SPDX-License-Identifier: (GPL-2.0+ OR MIT)

/dts-v1/;

#include "imx8mn.dtsi"
#include "imx8mn-evk.dtsi"
#include <dt-bindings/interrupt-controller/irq.h>

/ {
	model = "NXP i.MX8MNano DDR3L EVK board";
	compatible = "fsl,imx8mn-ddr3l-evk", "fsl,imx8mn";
};

&A53_0 {
	cpu-supply = <&buck1>;
};

&A53_1 {
	cpu-supply = <&buck1>;
};

&A53_2 {
	cpu-supply = <&buck1>;
};

&A53_3 {
	cpu-supply = <&buck1>;
};

&i2c1 {
	pmic: pmic@25 {
		compatible = "nxp,pca9450b";
		reg = <0x25>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_pmic>;
		interrupt-parent = <&gpio1>;
		interrupts = <3 IRQ_TYPE_LEVEL_LOW>;

		regulators {
			buck1: BUCK1 {
				regulator-name = "VDD_SOC_0V9";
				regulator-min-microvolt = <850000>;
				regulator-max-microvolt = <950000>;
				regulator-boot-on;
				regulator-always-on;
				regulator-ramp-delay = <3125>;
			};

			buck4: BUCK4 {
				regulator-name = "VDD_3V3";
				regulator-min-microvolt = <3300000>;
				regulator-max-microvolt = <3300000>;
				regulator-boot-on;
				regulator-always-on;
			};

			buck5: BUCK5 {
				regulator-name = "VDD_1V8";
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <1800000>;
				regulator-boot-on;
				regulator-always-on;
			};

			buck6: BUCK6 {
				regulator-name = "NVCC_DRAM_1V35";
				regulator-min-microvolt = <1350000>;
				regulator-max-microvolt = <1350000>;
				regulator-boot-on;
				regulator-always-on;
			};

			ldo1: LDO1 {
				regulator-name = "NVCC_SNVS_1V8";
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <1800000>;
				regulator-boot-on;
				regulator-always-on;
			};

			ldo2: LDO2 {
				regulator-name = "VDD_SNVS_0V8";
				regulator-min-microvolt = <800000>;
				regulator-max-microvolt = <800000>;
				regulator-boot-on;
				regulator-always-on;
			};

			ldo3: LDO3 {
				regulator-name = "VDDA_1V8";
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <1800000>;
				regulator-boot-on;
				regulator-always-on;
			};

			ldo4: LDO4 {
				regulator-name = "VDD_PHY_1V2";
				regulator-min-microvolt = <1200000>;
				regulator-max-microvolt = <1200000>;
				regulator-boot-on;
				regulator-always-on;
			};

			ldo5: LDO5 {
				regulator-name = "NVCC_SD2";
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <3300000>;
				regulator-boot-on;
				regulator-always-on;
			};
		};
	};
};

&i2c2 {
	hdmi@3d {
		avdd-supply = <&buck5>;
		dvdd-supply = <&buck5>;
		pvdd-supply = <&buck5>;
		a2vdd-supply = <&buck5>;
		v1p2-supply = <&buck5>;
	};
};

&i2c3 {
	camera@3c {
		DOVDD-supply = <&buck5>;
	};
};
