imx: ventana: enable dm support for MMC and SATA

Enable driver model support for MMC and SATA.

Note that DM_MMC requires aliases for your mmc devices so
they are added to the dts. Linux does not support enumerating mmc
devices by alias so these are not present in the Linux dts.

Note that we still need board_mmc_init() and board_mmc_getcd() for
not DM SPL to support MMC.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
diff --git a/arch/arm/dts/imx6qdl-gw52xx.dtsi b/arch/arm/dts/imx6qdl-gw52xx.dtsi
index de54b7c..6eedf8d 100644
--- a/arch/arm/dts/imx6qdl-gw52xx.dtsi
+++ b/arch/arm/dts/imx6qdl-gw52xx.dtsi
@@ -13,6 +13,7 @@
 		led0 = &led0;
 		led1 = &led1;
 		led2 = &led2;
+		mmc0 = &usdhc3;
 		nand = &gpmi;
 		ssi0 = &ssi1;
 		usb0 = &usbh1;
diff --git a/arch/arm/dts/imx6qdl-gw53xx.dtsi b/arch/arm/dts/imx6qdl-gw53xx.dtsi
index 64bb88d..9deec7e 100644
--- a/arch/arm/dts/imx6qdl-gw53xx.dtsi
+++ b/arch/arm/dts/imx6qdl-gw53xx.dtsi
@@ -13,6 +13,7 @@
 		led0 = &led0;
 		led1 = &led1;
 		led2 = &led2;
+		mmc0 = &usdhc3;
 		nand = &gpmi;
 		ssi0 = &ssi1;
 		usb0 = &usbh1;
diff --git a/arch/arm/dts/imx6qdl-gw54xx.dtsi b/arch/arm/dts/imx6qdl-gw54xx.dtsi
index 56d090e..a30ba48 100644
--- a/arch/arm/dts/imx6qdl-gw54xx.dtsi
+++ b/arch/arm/dts/imx6qdl-gw54xx.dtsi
@@ -14,6 +14,7 @@
 		led0 = &led0;
 		led1 = &led1;
 		led2 = &led2;
+		mmc0 = &usdhc3;
 		nand = &gpmi;
 		ssi0 = &ssi1;
 		usb0 = &usbh1;
diff --git a/arch/arm/dts/imx6qdl-gw560x.dtsi b/arch/arm/dts/imx6qdl-gw560x.dtsi
index d5468fb..0786b0d 100644
--- a/arch/arm/dts/imx6qdl-gw560x.dtsi
+++ b/arch/arm/dts/imx6qdl-gw560x.dtsi
@@ -55,6 +55,8 @@
 		led0 = &led0;
 		led1 = &led1;
 		led2 = &led2;
+		mmc0 = &usdhc2;
+		mmc1 = &usdhc3;
 		ssi0 = &ssi1;
 		usb0 = &usbh1;
 		usb1 = &usbotg;
diff --git a/arch/arm/dts/imx6qdl-gw5904.dtsi b/arch/arm/dts/imx6qdl-gw5904.dtsi
index 52b255b..5b7bd56 100644
--- a/arch/arm/dts/imx6qdl-gw5904.dtsi
+++ b/arch/arm/dts/imx6qdl-gw5904.dtsi
@@ -55,6 +55,7 @@
 		led0 = &led0;
 		led1 = &led1;
 		led2 = &led2;
+		mmc0 = &usdhc3;
 		usb0 = &usbh1;
 		usb1 = &usbotg;
 	};
diff --git a/arch/arm/dts/imx6qdl-gw5910.dtsi b/arch/arm/dts/imx6qdl-gw5910.dtsi
index 56d0c4f..248e077 100644
--- a/arch/arm/dts/imx6qdl-gw5910.dtsi
+++ b/arch/arm/dts/imx6qdl-gw5910.dtsi
@@ -13,6 +13,7 @@
 		led0 = &led0;
 		led1 = &led1;
 		led2 = &led2;
+		mmc0 = &usdhc3;
 	};
 
 	chosen {
diff --git a/arch/arm/dts/imx6qdl-gw5912.dtsi b/arch/arm/dts/imx6qdl-gw5912.dtsi
index 797f160..7593872 100644
--- a/arch/arm/dts/imx6qdl-gw5912.dtsi
+++ b/arch/arm/dts/imx6qdl-gw5912.dtsi
@@ -13,6 +13,7 @@
 		led0 = &led0;
 		led1 = &led1;
 		led2 = &led2;
+		mmc0 = &usdhc3;
 		nand = &gpmi;
 		usb0 = &usbh1;
 		usb1 = &usbotg;
diff --git a/board/gateworks/gw_ventana/gw_ventana.c b/board/gateworks/gw_ventana/gw_ventana.c
index 50bb202..7be4555 100644
--- a/board/gateworks/gw_ventana/gw_ventana.c
+++ b/board/gateworks/gw_ventana/gw_ventana.c
@@ -28,7 +28,6 @@
 #include <hwconfig.h>
 #include <i2c.h>
 #include <fdt_support.h>
-#include <fsl_esdhc_imx.h>
 #include <jffs2/load_kernel.h>
 #include <linux/ctype.h>
 #include <miiphy.h>
@@ -650,10 +649,6 @@
 	setup_ventana_i2c(1);
 	setup_ventana_i2c(2);
 
-#ifdef CONFIG_SATA
-	setup_sata();
-#endif
-
 	setup_iomux_gpio(board_type, &ventana_info);
 
 	return 0;
diff --git a/configs/gwventana_emmc_defconfig b/configs/gwventana_emmc_defconfig
index 696f49c..d383a85 100644
--- a/configs/gwventana_emmc_defconfig
+++ b/configs/gwventana_emmc_defconfig
@@ -19,6 +19,7 @@
 CONFIG_ENV_OFFSET_REDUND=0xD1400
 CONFIG_CMD_HDMIDETECT=y
 CONFIG_DEFAULT_DEVICE_TREE="imx6q-gw54xx"
+CONFIG_AHCI=y
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_SPL_LOAD_FIT=y
@@ -79,6 +80,7 @@
 CONFIG_DM=y
 CONFIG_BOUNCE_BUFFER=y
 CONFIG_DWC_AHSATA=y
+CONFIG_DM_MMC=y
 CONFIG_SUPPORT_EMMC_RPMB=y
 CONFIG_SUPPORT_EMMC_BOOT=y
 CONFIG_FSL_USDHC=y
diff --git a/configs/gwventana_gw5904_defconfig b/configs/gwventana_gw5904_defconfig
index 0e69701..b6ef9e6 100644
--- a/configs/gwventana_gw5904_defconfig
+++ b/configs/gwventana_gw5904_defconfig
@@ -19,6 +19,7 @@
 CONFIG_ENV_OFFSET_REDUND=0xD1400
 CONFIG_CMD_HDMIDETECT=y
 CONFIG_DEFAULT_DEVICE_TREE="imx6q-gw54xx"
+CONFIG_AHCI=y
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_SPL_LOAD_FIT=y
@@ -79,6 +80,7 @@
 CONFIG_DM=y
 CONFIG_BOUNCE_BUFFER=y
 CONFIG_DWC_AHSATA=y
+CONFIG_DM_MMC=y
 CONFIG_SUPPORT_EMMC_RPMB=y
 CONFIG_SUPPORT_EMMC_BOOT=y
 CONFIG_FSL_USDHC=y
diff --git a/configs/gwventana_nand_defconfig b/configs/gwventana_nand_defconfig
index 9b204c7..533d31a 100644
--- a/configs/gwventana_nand_defconfig
+++ b/configs/gwventana_nand_defconfig
@@ -19,6 +19,7 @@
 CONFIG_ENV_OFFSET_REDUND=0x1080000
 CONFIG_CMD_HDMIDETECT=y
 CONFIG_DEFAULT_DEVICE_TREE="imx6q-gw54xx"
+CONFIG_AHCI=y
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_SPL_LOAD_FIT=y
@@ -81,6 +82,7 @@
 CONFIG_DM=y
 CONFIG_BOUNCE_BUFFER=y
 CONFIG_DWC_AHSATA=y
+CONFIG_DM_MMC=y
 CONFIG_SUPPORT_EMMC_RPMB=y
 CONFIG_SUPPORT_EMMC_BOOT=y
 CONFIG_FSL_USDHC=y