You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2026/03/18 02:16:46 UTC
(nuttx) 02/02: boards/xtensa: add option to disable SPI Flash MTD automatic bringup
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 1630b483d2d1f5b8916aa12ce75ea225e1d2f032
Author: Filipe Cavalcanti <fi...@espressif.com>
AuthorDate: Tue Mar 17 09:19:26 2026 -0300
boards/xtensa: add option to disable SPI Flash MTD automatic bringup
The ESP32*_SPIFLASH_AUTO_BRINGUP option allows disabling automatic bringup.
This causes /dev/mtdblock0 to show up instead of always mounting a file system.
Signed-off-by: Filipe Cavalcanti <fi...@espressif.com>
---
boards/xtensa/esp32/common/Kconfig | 12 ++++++++++--
boards/xtensa/esp32s2/common/Kconfig | 12 ++++++++++--
.../esp32s2/esp32s2-saola-1/configs/spiflash/defconfig | 1 -
.../esp32s2/esp32s2-saola-1/configs/sta_softap/defconfig | 1 -
boards/xtensa/esp32s2/esp32s2-saola-1/configs/wifi/defconfig | 1 -
boards/xtensa/esp32s3/common/Kconfig | 12 ++++++++++--
6 files changed, 30 insertions(+), 9 deletions(-)
diff --git a/boards/xtensa/esp32/common/Kconfig b/boards/xtensa/esp32/common/Kconfig
index 5111fdb1d50..0aa9157704f 100644
--- a/boards/xtensa/esp32/common/Kconfig
+++ b/boards/xtensa/esp32/common/Kconfig
@@ -19,10 +19,18 @@ config ESP32_QEMU_IMAGE
---help---
Create a binary flash image used for QEMU.
+config ESP32_SPIFLASH_AUTO_BRINGUP
+ bool "Automatic mount of SPI Flash MTD"
+ default y
+ depends on ESP32_SPIFLASH
+ ---help---
+ Auto bring-up the SPI Flash MTD on board bring-up.
+ If not selected, the MTD will be registered as a device node on /dev.
+
choice ESP32_SPIFLASH_FS
- prompt "Mount SPI Flash MTD on bring-up"
+ prompt "File system to mount on SPI Flash MTD"
default ESP32_SPIFLASH_SMARTFS
- depends on ESP32_SPIFLASH
+ depends on ESP32_SPIFLASH_AUTO_BRINGUP
optional
---help---
Mount the SPI Flash MTD with the selected File System format on board
diff --git a/boards/xtensa/esp32s2/common/Kconfig b/boards/xtensa/esp32s2/common/Kconfig
index c4b74fb9913..67d35dd4157 100644
--- a/boards/xtensa/esp32s2/common/Kconfig
+++ b/boards/xtensa/esp32s2/common/Kconfig
@@ -12,10 +12,18 @@ config ESP32S2_MERGE_BINS
This is only useful when the path to binary files (e.g. bootloader)
is provided via the ESPTOOL_BINDIR variable.
+config ESP32S2_SPIFLASH_AUTO_BRINGUP
+ bool "Automatic mount of SPI Flash MTD"
+ default y
+ depends on ESP32S2_SPIFLASH
+ ---help---
+ Auto bring-up the SPI Flash MTD on board bring-up.
+ If not selected, the MTD will be registered as a device node on /dev.
+
choice ESP32S2_SPIFLASH_FS
- prompt "Mount SPI Flash MTD on bring-up"
+ prompt "File system to mount on SPI Flash MTD"
default ESP32S2_SPIFLASH_SMARTFS
- depends on ESPRESSIF_SPIFLASH
+ depends on ESP32S2_SPIFLASH_AUTO_BRINGUP
optional
---help---
Mount the SPI Flash MTD with the selected File System format on board
diff --git a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/spiflash/defconfig b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/spiflash/defconfig
index 79a56fbb5fc..98f7b814d8e 100644
--- a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/spiflash/defconfig
+++ b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/spiflash/defconfig
@@ -19,7 +19,6 @@ CONFIG_ARCH_STACKDUMP=y
CONFIG_ARCH_XTENSA=y
CONFIG_BOARD_LOOPSPERMSEC=16717
CONFIG_BUILTIN=y
-CONFIG_ESP32S2_SPIFLASH_SMARTFS=y
CONFIG_ESP32S2_UART0=y
CONFIG_ESPRESSIF_SPIFLASH=y
CONFIG_FS_PROCFS=y
diff --git a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/sta_softap/defconfig b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/sta_softap/defconfig
index e2d7a894a91..68cf99a5179 100644
--- a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/sta_softap/defconfig
+++ b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/sta_softap/defconfig
@@ -22,7 +22,6 @@ CONFIG_BOARD_LOOPSPERMSEC=16717
CONFIG_BUILTIN=y
CONFIG_DRIVERS_IEEE80211=y
CONFIG_DRIVERS_WIRELESS=y
-CONFIG_ESP32S2_SPIFLASH_SPIFFS=y
CONFIG_ESP32S2_UART0=y
CONFIG_ESPRESSIF_SPIFLASH=y
CONFIG_ESPRESSIF_WIFI=y
diff --git a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/wifi/defconfig b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/wifi/defconfig
index 7be7499416e..042b3149782 100644
--- a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/wifi/defconfig
+++ b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/wifi/defconfig
@@ -22,7 +22,6 @@ CONFIG_BOARD_LOOPSPERMSEC=16717
CONFIG_BUILTIN=y
CONFIG_DRIVERS_IEEE80211=y
CONFIG_DRIVERS_WIRELESS=y
-CONFIG_ESP32S2_SPIFLASH_SPIFFS=y
CONFIG_ESP32S2_UART0=y
CONFIG_ESPRESSIF_SPIFLASH=y
CONFIG_ESPRESSIF_WIFI=y
diff --git a/boards/xtensa/esp32s3/common/Kconfig b/boards/xtensa/esp32s3/common/Kconfig
index 60f840cce24..03687716f41 100644
--- a/boards/xtensa/esp32s3/common/Kconfig
+++ b/boards/xtensa/esp32s3/common/Kconfig
@@ -49,10 +49,18 @@ config ESP32S3_STORAGE_MTD_SIZE
---help---
MTD size in SPI Flash.
+config ESP32S3_SPIFLASH_AUTO_BRINGUP
+ bool "Automatic mount of SPI Flash MTD"
+ default y
+ depends on ESP32S3_MTD
+ ---help---
+ Auto bring-up the SPI Flash MTD on board bring-up.
+ If not selected, the MTD will be registered as a device node on /dev.
+
choice ESP32S3_SPIFLASH_FS
- prompt "Mount SPI Flash MTD on bring-up"
+ prompt "File system to mount on SPI Flash MTD"
default ESP32S3_SPIFLASH_SMARTFS
- depends on ESP32S3_MTD
+ depends on ESP32S3_SPIFLASH_AUTO_BRINGUP
optional
---help---
Mount the SPI Flash MTD with the selected File System format on board