Skip to content

Commit

Permalink
drivers: sdhc: add native driver support for emmc host controller
Browse files Browse the repository at this point in the history
add native host controller driver support for emmc version 5.1.
The driver expose zephyr sdhc api interface for emmc host controller.

Signed-off-by: Najumon B.A <najumon.ba@intel.com>
  • Loading branch information
najumon1980 committed Aug 21, 2023
1 parent 38d3839 commit bb732dc
Show file tree
Hide file tree
Showing 6 changed files with 1,699 additions and 1 deletion.
1 change: 1 addition & 0 deletions drivers/sdhc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ zephyr_library()
zephyr_library_sources_ifdef(CONFIG_IMX_USDHC imx_usdhc.c)
zephyr_library_sources_ifdef(CONFIG_SPI_SDHC sdhc_spi.c)
zephyr_library_sources_ifdef(CONFIG_MCUX_SDIF mcux_sdif.c)
zephyr_library_sources_ifdef(CONFIG_EMMC_HOST emmc_host.c)
endif()
2 changes: 1 addition & 1 deletion drivers/sdhc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ if SDHC
source "drivers/sdhc/Kconfig.imx"
source "drivers/sdhc/Kconfig.spi"
source "drivers/sdhc/Kconfig.mcux_sdif"
source "drivers/sdhc/Kconfig.emmc"

config SDHC_INIT_PRIORITY
int "SDHC driver init priority"
Expand Down Expand Up @@ -49,5 +50,4 @@ module = SDHC
module-str = sdhc
source "subsys/logging/Kconfig.template.log_config"


endif # SDHC
60 changes: 60 additions & 0 deletions drivers/sdhc/Kconfig.emmc
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Copyright (c) 2023 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

config EMMC_HOST
bool "EMMC driver"
select SDHC_SUPPORTS_NATIVE_MODE
select EVENTS
default y
depends on DT_HAS_EMMC_HOST_ENABLED
help
EMMC driver support.

if EMMC_HOST
config EMMC_HOST_INTR
bool "EMMC host controller interrupt mode"
default y
help
EMMC host controller interrupt mode support.

config EMMC_HOST_DMA
bool "EMMC host controller DMA mode"
select DCACHE
help
EMMC host controller DMA mode support.

config EMMC_HOST_ADMA
bool "EMMC host controller ADMA mode"
depends on EMMC_HOST_DMA
help
EMMC host controller ADMA mode support.

config EMMC_HOST_ADMA_DESC_SIZE
int "EMMC host controller ADMA Descriptor size"
depends on EMMC_HOST_DMA
default 32
help
EMMC host controller ADMA Descriptor size.

config EMMC_HOST_AUTO_STOP
bool "auto stop command mode"
default y
help
Auto stop command mode support.

config EMMC_HOST_BLOCK_GAP
bool "Block gap mode"
depends on EMMC_HOST_DMA
help
Block gap mode support.

config EMMC_HOST_TUNING
bool "Host tuning"
help
Host tuning support.

module = EMMC_HOST
module-str = emmc_host
source "subsys/logging/Kconfig.template.log_config"

endif

0 comments on commit bb732dc

Please sign in to comment.