Skip to content

Commit 190c878

Browse files
Windrow14xiaoxiang781216
authored andcommitted
arch/xtensa/src/esp32s3/Kconfig|Make.defs|esp32s3_sdmmc.c,
arch/xtensa/src/esp32s3/hardware/esp32s3_sdmmc.h|esp32s3_soc.h, boards/xtensa/esp32s3/common/include/esp32s3_board_sdmmc.h, boards/xtensa/esp32s3/common/src/Make.defs|esp32s3_board_sdmmc.c, boards/xtensa/esp32s3/esp32s3-devkit/src/esp32s3_bringup.c: add SD/mmc driver Support 1-bit bus width and 4-bit bus width. Support eMMC high speed SDR mode. Support transfer data with DMA. Support SD clock frequency up to 40MHZ. Signed-off-by: Yinzhe Wu <Yinzhe.Wu@sony.com> Reviewed-by: Yuezhang Mo <Yuezhang.Mo@sony.com> Reviewed-by: Jacky Cao <Jacky.Cao@sony.com> Tested-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
1 parent c96a33a commit 190c878

File tree

12 files changed

+3682
-1
lines changed

12 files changed

+3682
-1
lines changed

Documentation/platforms/xtensa/esp32s3/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ RMT No
208208
RNG No
209209
RSA No
210210
RTC Yes
211-
SD/MMC No
211+
SD/MMC Yes
212212
SDIO No
213213
SHA No
214214
SPI Yes

arch/xtensa/src/esp32s3/Kconfig

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2491,6 +2491,59 @@ config ESP32S3_LCD_REGDEBUG
24912491

24922492
endmenu
24932493

2494+
menu "SD/MMC Configuration"
2495+
2496+
config ESP32S3_SDMMC
2497+
bool "SD/MMC driver"
2498+
select ARCH_HAVE_SDIO
2499+
select MMCSD
2500+
select MMCSD_SDIO
2501+
select SDIO_BLOCKSETUP
2502+
select SCHED_WORKQUEUE
2503+
select SCHED_HPWORK
2504+
select ESP32S3_SDMMC_DMA
2505+
default n
2506+
2507+
config ESP32S3_SDMMC_DMA
2508+
bool "Support DMA for SD/MMC"
2509+
depends on ESP32S3_SDMMC
2510+
select SDIO_DMA
2511+
default y
2512+
2513+
config ESP32S3_SDMMC_CMD
2514+
int "CMD GPIO"
2515+
depends on ESP32S3_SDMMC
2516+
default 41
2517+
2518+
config ESP32S3_SDMMC_CLK
2519+
int "CLK GPIO"
2520+
depends on ESP32S3_SDMMC
2521+
default 39
2522+
2523+
config ESP32S3_SDMMC_D0
2524+
int "D0 GPIO"
2525+
depends on ESP32S3_SDMMC
2526+
default 40
2527+
2528+
config ESP32S3_SDMMC_D1
2529+
int "D1 GPIO"
2530+
depends on ESP32S3_SDMMC
2531+
depends on !SDIO_WIDTH_D1_ONLY
2532+
default 16
2533+
2534+
config ESP32S3_SDMMC_D2
2535+
int "D2 GPIO"
2536+
depends on ESP32S3_SDMMC
2537+
depends on !SDIO_WIDTH_D1_ONLY
2538+
default 8
2539+
2540+
config ESP32S3_SDMMC_D3
2541+
int "D3 GPIO"
2542+
depends on ESP32S3_SDMMC
2543+
depends on !SDIO_WIDTH_D1_ONLY
2544+
default 42
2545+
endmenu
2546+
24942547
menu "Bootloader and Image Configuration"
24952548

24962549
config ESPRESSIF_SIMPLE_BOOT

arch/xtensa/src/esp32s3/Make.defs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,10 @@ ifeq ($(CONFIG_ESP32S3_LCD),y)
186186
CHIP_CSRCS += esp32s3_lcd.c
187187
endif
188188

189+
ifeq ($(CONFIG_ESP32S3_SDMMC),y)
190+
CHIP_CSRCS += esp32s3_sdmmc.c
191+
endif
192+
189193
ifeq ($(CONFIG_ESP32S3_AES_ACCELERATOR),y)
190194
CHIP_CSRCS += esp32s3_aes.c
191195
endif

0 commit comments

Comments
 (0)