This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit bc8ce393cb6c20e6348a1e17c49ee38553c469b5
Author: Filipe Cavalcanti <filipe.cavalca...@espressif.com>
AuthorDate: Wed Jun 25 16:06:00 2025 -0300

    documentation: update docs on SDMMC for ESP32C3|C6|H2
    
    Adds sdmmc_spi defconfig documentation for ESP32C3, ESP32C6 and ESP32H2 
boards.
    
    Signed-off-by: Filipe Cavalcanti <filipe.cavalca...@espressif.com>
---
 .../esp32c3/boards/esp32c3-generic/index.rst       | 33 ++++++++++++++++++++++
 .../esp32c6/boards/esp32c6-devkitc/index.rst       | 33 ++++++++++++++++++++++
 .../esp32c6/boards/esp32c6-devkitm/index.rst       | 33 ++++++++++++++++++++++
 .../risc-v/esp32h2/boards/esp32h2-devkit/index.rst | 33 ++++++++++++++++++++++
 4 files changed, 132 insertions(+)

diff --git 
a/Documentation/platforms/risc-v/esp32c3/boards/esp32c3-generic/index.rst 
b/Documentation/platforms/risc-v/esp32c3/boards/esp32c3-generic/index.rst
index 8e288070aca..cf6b3fa29c7 100644
--- a/Documentation/platforms/risc-v/esp32c3/boards/esp32c3-generic/index.rst
+++ b/Documentation/platforms/risc-v/esp32c3/boards/esp32c3-generic/index.rst
@@ -413,6 +413,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>
+
 spi
 --------
 
diff --git 
a/Documentation/platforms/risc-v/esp32c6/boards/esp32c6-devkitc/index.rst 
b/Documentation/platforms/risc-v/esp32c6/boards/esp32c6-devkitc/index.rst
index e0ab223ddc1..26f99b53c98 100644
--- a/Documentation/platforms/risc-v/esp32c6/boards/esp32c6-devkitc/index.rst
+++ b/Documentation/platforms/risc-v/esp32c6/boards/esp32c6-devkitc/index.rst
@@ -433,6 +433,39 @@ If SPI peripherals are already in use you can also use 
bitbang driver which is a
 software implemented SPI peripheral by enabling `CONFIG_ESPRESSIF_SPI_BITBANG`
 option.
 
+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>
+
 spiflash
 --------
 
diff --git 
a/Documentation/platforms/risc-v/esp32c6/boards/esp32c6-devkitm/index.rst 
b/Documentation/platforms/risc-v/esp32c6/boards/esp32c6-devkitm/index.rst
index d0455fff009..deea9ec6f54 100644
--- a/Documentation/platforms/risc-v/esp32c6/boards/esp32c6-devkitm/index.rst
+++ b/Documentation/platforms/risc-v/esp32c6/boards/esp32c6-devkitm/index.rst
@@ -328,6 +328,39 @@ You can set an alarm, check its progress and receive a 
notification after it exp
     Alarm 0 is active with 10 seconds to expiration
     nsh> alarm_daemon: alarm 0 received
 
+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>
+
 spi
 --------
 
diff --git 
a/Documentation/platforms/risc-v/esp32h2/boards/esp32h2-devkit/index.rst 
b/Documentation/platforms/risc-v/esp32h2/boards/esp32h2-devkit/index.rst
index 59fa74bc53d..d9b3f79ce02 100644
--- a/Documentation/platforms/risc-v/esp32h2/boards/esp32h2-devkit/index.rst
+++ b/Documentation/platforms/risc-v/esp32h2/boards/esp32h2-devkit/index.rst
@@ -384,6 +384,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>
+
 spi
 --------
 

Reply via email to