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:
parent
3e8bbee9ed
commit
64c5b93d5c
4 changed files with 1516 additions and 4 deletions
|
@ -4,5 +4,5 @@ if (CONFIG_SD_STACK)
|
||||||
zephyr_interface_library_named(SD)
|
zephyr_interface_library_named(SD)
|
||||||
|
|
||||||
zephyr_library()
|
zephyr_library()
|
||||||
zephyr_library_sources (sd.c)
|
zephyr_library_sources (sd.c sdmmc.c)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Copyright (c) 2022 NXP
|
# Copyright 2022 NXP
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
# SD stack configuration options
|
# SD stack configuration options
|
||||||
|
@ -48,7 +48,11 @@ config SD_DATA_TIMEOUT
|
||||||
|
|
||||||
config SD_BUFFER_SIZE
|
config SD_BUFFER_SIZE
|
||||||
int
|
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
|
help
|
||||||
Size in bytes of internal buffer SD card uses for unaligned reads and
|
Size in bytes of internal buffer SD card uses for unaligned reads and
|
||||||
internal data reads during initialization
|
internal data reads during initialization
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2022 NXP
|
* Copyright 2022 NXP
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
1508
subsys/sd/sdmmc.c
Normal file
1508
subsys/sd/sdmmc.c
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue