[U-Boot] [PATCH v3 1/1] mmc: Add MMC support for stm32h7 Socs

Simon Glass sjg at chromium.org
Sun Aug 6 05:15:20 UTC 2017


Hi Patrice,

On 20 July 2017 at 02:34,  <patrice.chotard at st.com> wrote:
> From: Patrice Chotard <patrice.chotard at st.com>
>
> This patch adds SD/MMC support for STM32H7 SoCs.
>
> Here is an extraction of SDMMC main features, embedded in
> STM32H7 SoCs.
> The SD/MMC block include the following:
>  _ Full compliance with MultiMediaCard System Specification
>    Version 4.51. Card support for three different databus modes:
>    1-bit (default), 4-bit and 8-bit.
>  _ Full compatibility with previous versions of MultiMediaCards
>    (backward compatibility).
>  _ Full compliance with SD memory card specifications version 4.1.
>    (SDR104 SDMMC_CK speed limited to maximum allowed IO speed,
>     SPI mode and UHS-II mode not supported).
>  _ Full compliance with SDIO card specification version 4.0.
>    Card support for two different databus modes: 1-bit (default)
>    and 4-bit. (SDR104 SDMMC_CK speed limited to maximum allowed IO
>    speed, SPI mode and UHS-II mode not supported).
>  _ Data transfer up to 208 Mbyte/s for the 8 bit mode.
>    (depending maximum allowed IO speed).
>  _ Data and command output enable signals to control external
>    bidirectional drivers.
>
> The current version of the SDMMC supports only one SD/SDIO/MMC card
> at any one time and a stack of MMC Version 4.51 or previous.
>
> Signed-off-by: Christophe Kerello <christophe.kerello at st.com>
> Signed-off-by: Patrice Chotard <patrice.chotard at st.com>
> ---
> v3: _ use registers offset instead of registers struct description
>     _ rename clk_reg_add and pwr_reg_add to respectively clk_reg_msk and pwr_reg_msk
>     _ don't exit in error if DT bus-width value is not correct, force it to 1
>       and continue
> v2: _ add .get_cd() callback support
>
>  drivers/mmc/Kconfig        |   8 +
>  drivers/mmc/Makefile       |   1 +
>  drivers/mmc/stm32_sdmmc2.c | 598 +++++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 607 insertions(+)
>  create mode 100644 drivers/mmc/stm32_sdmmc2.c
>
> diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig
> index 82b8d75..f2e4c26 100644
> --- a/drivers/mmc/Kconfig
> +++ b/drivers/mmc/Kconfig
> @@ -377,6 +377,14 @@ config GENERIC_ATMEL_MCI
>           the SD Memory Card Specification V2.0, the SDIO V2.0 specification
>           and CE-ATA V1.1.
>
> +config STM32_SDMMC2
> +       bool "STMicroelectronics STM32H7 SD/MMC Host Controller support"
> +       depends on DM_MMC && OF_CONTROL && DM_MMC_OPS

I don't see a call to mmc_bind() anywhere. I'm not sure how this
driver actually works without that?

> +       help
> +         This selects support for the SD/MMC controller on STM32H7 SoCs.
> +         If you have a board based on such a SoC and with a SD/MMC slot,
> +         say Y or M here.
> +
>  endif

Regards,
Simon


More information about the U-Boot mailing list