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 2ddfab618b134d7b9b34e1207cce662467603f85
Author: Filipe Cavalcanti <filipe.cavalca...@espressif.com>
AuthorDate: Tue Jun 3 11:46:10 2025 -0300

    documentation: update docs on SDMMC for ESP32|S2|S3
---
 .../xtensa/esp32/boards/esp32-devkitc/index.rst    | 33 ++++++++++++++++++++++
 .../xtensa/esp32/boards/esp32-lyrat/index.rst      |  7 +++--
 .../xtensa/esp32/boards/esp32-wrover-kit/index.rst |  7 +++--
 Documentation/platforms/xtensa/esp32/index.rst     |  2 +-
 .../esp32s2/boards/esp32s2-saola-1/index.rst       | 33 ++++++++++++++++++++++
 Documentation/platforms/xtensa/esp32s2/index.rst   |  1 +
 .../xtensa/esp32s3/boards/esp32s3-devkit/index.rst | 33 ++++++++++++++++++++++
 7 files changed, 111 insertions(+), 5 deletions(-)

diff --git 
a/Documentation/platforms/xtensa/esp32/boards/esp32-devkitc/index.rst 
b/Documentation/platforms/xtensa/esp32/boards/esp32-devkitc/index.rst
index 30c69266cc..dde7e6abcd 100644
--- a/Documentation/platforms/xtensa/esp32/boards/esp32-devkitc/index.rst
+++ b/Documentation/platforms/xtensa/esp32/boards/esp32-devkitc/index.rst
@@ -951,6 +951,39 @@ DAC feature with following command with connecting simple 
LED on GPIO5
 
 After this command you will see LED will light up in different brightness.
 
+sdmmc_spi
+---------
+
+This configuration is used to mount a FAT/FAT32 SD Card into the OS' 
filesystem.
+It uses SPI to communicate with the SD Card, defaulting to SPI3.
+
+The SD slot number, SPI port number and minor number can be modified in 
``Application Configuration → NSH Library``.
+
+To access the card's files, make sure ``/dev/mmcsd0`` exists and then execute 
the following commands::
+
+    nsh> ls /dev
+    /dev:
+    console
+    mmcsd0
+    null
+    ttyS0
+    zero
+    nsh> mount -t vfat /dev/mmcsd0 /mnt
+
+This will mount the SD Card to ``/mnt``. Now, you can use the SD Card as a 
normal filesystem.
+For example, you can read a file and write to it::
+
+    nsh> ls /mnt
+    /mnt:
+    hello.txt
+    nsh> cat /mnt/hello.txt
+    Hello World
+    nsh> echo 'NuttX RTOS' >> /mnt/hello.txt
+    nsh> cat /mnt/hello.txt
+    Hello World!
+    NuttX RTOS
+    nsh>
+
 smp
 ---
 
diff --git a/Documentation/platforms/xtensa/esp32/boards/esp32-lyrat/index.rst 
b/Documentation/platforms/xtensa/esp32/boards/esp32-lyrat/index.rst
index f148e6cba2..0ec3e1f0a5 100644
--- a/Documentation/platforms/xtensa/esp32/boards/esp32-lyrat/index.rst
+++ b/Documentation/platforms/xtensa/esp32/boards/esp32-lyrat/index.rst
@@ -463,11 +463,14 @@ the ``buttons`` application and pressing on any of the 
available board buttons::
     To avoid any conflicts, it's not registered in the buttons subsystem and, 
thus,
     is unable to be used.
 
-mmcsdspi
---------
+sdmmc_spi
+---------
 
 This configuration is used to mount a FAT/FAT32 SD Card into the OS' 
filesystem.
 For the ESP32-LyraT, make sure the DIP switches 1 and 2 are turned to the ON 
position.
+
+The SD slot number, SPI port number and minor number can be modified in 
``Application Configuration → NSH Library``.
+
 To access the card's files, execute the following commands::
 
     nsh> mount -t vfat /dev/mmcsd0 /mnt
diff --git 
a/Documentation/platforms/xtensa/esp32/boards/esp32-wrover-kit/index.rst 
b/Documentation/platforms/xtensa/esp32/boards/esp32-wrover-kit/index.rst
index 81d6b4d526..093b573b77 100644
--- a/Documentation/platforms/xtensa/esp32/boards/esp32-wrover-kit/index.rst
+++ b/Documentation/platforms/xtensa/esp32/boards/esp32-wrover-kit/index.rst
@@ -202,10 +202,13 @@ driver. You can find LVGL here::
 
 This configuration uses the LVGL demonstration at `apps/examples/lvgldemo`.
 
-mmcsdspi
---------
+sdmmc_spi
+---------
 
 This configuration is used to mount a FAT/FAT32 SD Card into the OS' 
filesystem.
+
+The SD slot number, SPI port number and minor number can be modified in 
``Application Configuration → NSH Library``.
+
 To access the card's files, execute the following commands::
 
     nsh> mount -t vfat /dev/mmcsd0 /mnt
diff --git a/Documentation/platforms/xtensa/esp32/index.rst 
b/Documentation/platforms/xtensa/esp32/index.rst
index fec15b9745..d6c8a6954a 100644
--- a/Documentation/platforms/xtensa/esp32/index.rst
+++ b/Documentation/platforms/xtensa/esp32/index.rst
@@ -415,7 +415,7 @@ RMT          Yes
 RNG          Yes
 RSA          No
 RTC          Yes
-SD/MMC       No
+SD/MMC       Yes    SPI based SD card driver
 SDIO         No
 SHA          Yes
 SPI          Yes
diff --git 
a/Documentation/platforms/xtensa/esp32s2/boards/esp32s2-saola-1/index.rst 
b/Documentation/platforms/xtensa/esp32s2/boards/esp32s2-saola-1/index.rst
index 880f4116b1..74639deeec 100644
--- a/Documentation/platforms/xtensa/esp32s2/boards/esp32s2-saola-1/index.rst
+++ b/Documentation/platforms/xtensa/esp32s2/boards/esp32s2-saola-1/index.rst
@@ -478,6 +478,39 @@ DAC feature with following command with connecting simple 
LED on GPIO5
 
 After this command you will see LED will light up in different brightness.
 
+sdmmc_spi
+---------
+
+This configuration is used to mount a FAT/FAT32 SD Card into the OS' 
filesystem.
+It uses SPI to communicate with the SD Card, defaulting to SPI2.
+
+The SD slot number, SPI port number and minor number can be modified in 
``Application Configuration → NSH Library``.
+
+To access the card's files, make sure ``/dev/mmcsd0`` exists and then execute 
the following commands::
+
+    nsh> ls /dev
+    /dev:
+    console
+    mmcsd0
+    null
+    ttyS0
+    zero
+    nsh> mount -t vfat /dev/mmcsd0 /mnt
+
+This will mount the SD Card to ``/mnt``. Now, you can use the SD Card as a 
normal filesystem.
+For example, you can read a file and write to it::
+
+    nsh> ls /mnt
+    /mnt:
+    hello.txt
+    nsh> cat /mnt/hello.txt
+    Hello World
+    nsh> echo 'NuttX RTOS' >> /mnt/hello.txt
+    nsh> cat /mnt/hello.txt
+    Hello World!
+    NuttX RTOS
+    nsh>
+
 timer
 -----
 
diff --git a/Documentation/platforms/xtensa/esp32s2/index.rst 
b/Documentation/platforms/xtensa/esp32s2/index.rst
index e8b65c110a..1e8ed289bd 100644
--- a/Documentation/platforms/xtensa/esp32s2/index.rst
+++ b/Documentation/platforms/xtensa/esp32s2/index.rst
@@ -397,6 +397,7 @@ RMT          Yes
 RNG          Yes
 RSA          No
 RTC          Yes
+SD/MMC       Yes    SPI based SD card driver
 SHA          No
 SPI          Yes
 SPIFLASH     Yes
diff --git 
a/Documentation/platforms/xtensa/esp32s3/boards/esp32s3-devkit/index.rst 
b/Documentation/platforms/xtensa/esp32s3/boards/esp32s3-devkit/index.rst
index f32726bacf..08b63474ed 100644
--- a/Documentation/platforms/xtensa/esp32s3/boards/esp32s3-devkit/index.rst
+++ b/Documentation/platforms/xtensa/esp32s3/boards/esp32s3-devkit/index.rst
@@ -753,6 +753,39 @@ Format and mount the SD/MMC device with following 
commands::
 FAT filesystem is enabled in the default configuration. Other filesystems may
 also work.
 
+sdmmc_spi
+---------
+
+This configuration is used to mount a FAT/FAT32 SD Card into the OS' 
filesystem.
+It uses SPI to communicate with the SD Card, defaulting to SPI2.
+
+The SD slot number, SPI port number and minor number can be modified in 
``Application Configuration → NSH Library``.
+
+To access the card's files, make sure ``/dev/mmcsd0`` exists and then execute 
the following commands::
+
+    nsh> ls /dev
+    /dev:
+    console
+    mmcsd0
+    null
+    ttyS0
+    zero
+    nsh> mount -t vfat /dev/mmcsd0 /mnt
+
+This will mount the SD Card to ``/mnt``. Now, you can use the SD Card as a 
normal filesystem.
+For example, you can read a file and write to it::
+
+    nsh> ls /mnt
+    /mnt:
+    hello.txt
+    nsh> cat /mnt/hello.txt
+    Hello World
+    nsh> echo 'NuttX RTOS' >> /mnt/hello.txt
+    nsh> cat /mnt/hello.txt
+    Hello World!
+    NuttX RTOS
+    nsh>
+
 smp
 ---
 

Reply via email to