// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Copyright 2022 Toradex
 */

/dts-v1/;

#include "imx6dl-colibri-iris.dts"

/ {
	model = "Toradex Colibri iMX6DL/S on Colibri Iris V2 Board";
	compatible = "toradex,colibri_imx6dl-iris-v2", "toradex,colibri_imx6dl",
		     "fsl,imx6dl";

	reg_3v3_vmmc: regulator-3v3-vmmc {
		compatible = "regulator-fixed";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_enable_3v3_vmmc>;
		regulator-name = "3v3_vmmc";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		gpio = <&gpio2 11 GPIO_ACTIVE_HIGH>;
		startup-delay-us = <100>;
		enable-active-high;
	};
};

&iomuxc {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_gpio_iris	&pinctrl_usbh_oc_1 &pinctrl_usbc_id_1>;

	pinctrl_enable_3v3_vmmc: enable3v3vmmcgrp {
		fsl,pins = <
			MX6QDL_PAD_SD4_DAT3__GPIO2_IO11	0x1b0b0
		>;
	};
};

/* Colibri MMC */
&usdhc1 {
	cap-power-off-card;
	/* uncomment the following to enable SD card UHS mode if you have a V1.1 module */
	/* /delete-property/ no-1-8-v; */
	vmmc-supply = <&reg_3v3_vmmc>;
	status = "okay";
};