From 9c6971279d58e532cd4d9b6d9d57579549d67c7a Mon Sep 17 00:00:00 2001 From: Robert-Ionut Alexa Date: Mon, 21 Nov 2022 18:55:09 +0200 Subject: [PATCH] esp32-sparrow-kit: enable support for MMCSD-SPI Add the necessary configs to the default nsh config file in order to enable support for MMCSD-SPI. Signed-off-by: Robert-Ionut Alexa --- .../esp32-sparrow-kit/configs/nsh/defconfig | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/boards/xtensa/esp32/esp32-sparrow-kit/configs/nsh/defconfig b/boards/xtensa/esp32/esp32-sparrow-kit/configs/nsh/defconfig index c2c140b764..cf8554005b 100644 --- a/boards/xtensa/esp32/esp32-sparrow-kit/configs/nsh/defconfig +++ b/boards/xtensa/esp32/esp32-sparrow-kit/configs/nsh/defconfig @@ -6,9 +6,14 @@ # modifications. # # CONFIG_ARCH_LEDS is not set +# CONFIG_ESP32_SPI2_DMA is not set +# CONFIG_MMCSD_HAVE_CARDDETECT is not set +# CONFIG_MMCSD_HAVE_WRITEPROTECT is not set +# CONFIG_MMCSD_MMCSUPPORT is not set # CONFIG_NSH_ARGCAT is not set # CONFIG_NSH_CMDOPT_HEXDUMP is not set # CONFIG_NSH_CMDPARMS is not set +# CONFIG_SPI_EXCHANGE is not set CONFIG_ARCH="xtensa" CONFIG_ARCH_BOARD="esp32-sparrow-kit" CONFIG_ARCH_BOARD_COMMON=y @@ -22,18 +27,29 @@ CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y CONFIG_ESP32_I2C0=y CONFIG_ESP32_I2C0_SDAPIN=21 +CONFIG_ESP32_SPI2=y +CONFIG_ESP32_SPI2_CLKPIN=18 +CONFIG_ESP32_SPI2_CSPIN=5 +CONFIG_ESP32_SPI2_MISOPIN=19 +CONFIG_ESP32_SPI2_MOSIPIN=23 CONFIG_ESP32_UART0=y +CONFIG_FAT_LCNAMES=y +CONFIG_FAT_LFN=y +CONFIG_FS_FAT=y CONFIG_FS_PROCFS=y CONFIG_HAVE_CXX=y CONFIG_HAVE_CXXINITIALIZE=y CONFIG_IDLETHREAD_STACKSIZE=3072 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y +CONFIG_MMCSD=y +CONFIG_MMCSD_SPICLOCK=4000000 CONFIG_MM_REGIONS=3 CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_LINELEN=64 +CONFIG_NSH_MMCSDSPIPORTNO=2 CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 CONFIG_RAM_SIZE=114688