[PATCH 09/11] imx: ventana: enable dm support for MMC and SATA
Peter Robinson
pbrobinson at gmail.com
Mon Mar 1 23:48:40 CET 2021
On Mon, Mar 1, 2021 at 10:35 PM Tim Harvey <tharvey at gateworks.com> wrote:
>
> 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.
I'm not sure that's entirely true, they may be a new addition, or just
not previously documented as working, they're added for the rockchip
devices in Linux and they're documented in the bindings as working
now:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1796164fac7e348f74a0f1f1cae995b22d002315
> 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 at gateworks.com>
> ---
> arch/arm/dts/imx6qdl-gw52xx.dtsi | 1 +
> arch/arm/dts/imx6qdl-gw53xx.dtsi | 1 +
> arch/arm/dts/imx6qdl-gw54xx.dtsi | 1 +
> arch/arm/dts/imx6qdl-gw560x.dtsi | 2 ++
> arch/arm/dts/imx6qdl-gw5904.dtsi | 1 +
> arch/arm/dts/imx6qdl-gw5910.dtsi | 1 +
> arch/arm/dts/imx6qdl-gw5912.dtsi | 1 +
> board/gateworks/gw_ventana/gw_ventana.c | 5 -----
> configs/gwventana_emmc_defconfig | 2 ++
> configs/gwventana_gw5904_defconfig | 2 ++
> configs/gwventana_nand_defconfig | 2 ++
> 11 files changed, 14 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm/dts/imx6qdl-gw52xx.dtsi b/arch/arm/dts/imx6qdl-gw52xx.dtsi
> index de54b7c217..6eedf8d40d 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 64bb88dc74..9deec7e352 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 56d090ec0f..a30ba4848e 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 d5468fb260..0786b0d546 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 52b255b726..5b7bd56932 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 56d0c4ff6c..248e077a56 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 797f160249..7593872c07 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 78dee5723d..4c6e5097a4 100644
> --- a/board/gateworks/gw_ventana/gw_ventana.c
> +++ b/board/gateworks/gw_ventana/gw_ventana.c
> @@ -27,7 +27,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>
> @@ -649,10 +648,6 @@ int board_init(void)
> 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 696f49ca8a..d383a85f8b 100644
> --- a/configs/gwventana_emmc_defconfig
> +++ b/configs/gwventana_emmc_defconfig
> @@ -19,6 +19,7 @@ CONFIG_SPL=y
> 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_NETCONSOLE=y
> 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 0e697017b1..b6ef9e6f8a 100644
> --- a/configs/gwventana_gw5904_defconfig
> +++ b/configs/gwventana_gw5904_defconfig
> @@ -19,6 +19,7 @@ CONFIG_SPL=y
> 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_NETCONSOLE=y
> 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 9b204c7263..533d31af9f 100644
> --- a/configs/gwventana_nand_defconfig
> +++ b/configs/gwventana_nand_defconfig
> @@ -19,6 +19,7 @@ CONFIG_SPL=y
> 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_NETCONSOLE=y
> 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
> --
> 2.17.1
>
More information about the U-Boot
mailing list