sd: Add sdmmc protocol stack

Add SDMMC driver to subsystem. SDMMC driver will handle initialization,
as well as SDMMC I/O. SD mode support is currently supported, SPI mode
support is not.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
This commit is contained in:
Daniel DeGrasse 2022-02-16 15:37:18 -06:00 committed by David Leach
commit 64c5b93d5c
4 changed files with 1516 additions and 4 deletions

View file

@ -4,5 +4,5 @@ if (CONFIG_SD_STACK)
zephyr_interface_library_named(SD)
zephyr_library()
zephyr_library_sources (sd.c)
zephyr_library_sources (sd.c sdmmc.c)
endif()

View file

@ -1,4 +1,4 @@
# Copyright (c) 2022 NXP
# Copyright 2022 NXP
# SPDX-License-Identifier: Apache-2.0
# SD stack configuration options
@ -48,7 +48,11 @@ config SD_DATA_TIMEOUT
config SD_BUFFER_SIZE
int
default 512
# If SDHC required buffer alignment, we need a full block size in
# internal buffer
default 512 if SDHC_BUFFER_ALIGNMENT != 1
# Otherwise, we only need 64 bytes to read SD switch function
default 64
help
Size in bytes of internal buffer SD card uses for unaligned reads and
internal data reads during initialization

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 NXP
* Copyright 2022 NXP
*
* SPDX-License-Identifier: Apache-2.0
*/

1508
subsys/sd/sdmmc.c Normal file

File diff suppressed because it is too large Load diff