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

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


The following commit(s) were added to refs/heads/master by this push:
     new 1ddbeee4efc boards/esp32s3: add support to M5Stack Cardputer board
1ddbeee4efc is described below

commit 1ddbeee4efc34085149fe8bc483ac94f0a19068b
Author: Jorge Guzman <[email protected]>
AuthorDate: Mon Jun 29 01:40:40 2026 -0300

    boards/esp32s3: add support to M5Stack Cardputer board
    
    This port adds support for the M5Stack Cardputer (M5Stamp S3 /
    ESP32-S3FN8, dual Xtensa LX7 @ 240 MHz, 8 MB flash, no PSRAM).
    
    It reuses the common ESP32-S3 board helpers and ships these
    configurations:
    
      - nsh:    NuttShell over the USB-Serial-JTAG console
      - sdcard: microSD card on SPI3 (FAT)
      - fb:     ST7789 240x135 display exposed as a framebuffer
      - wifi:   Wi-Fi station
      - softap: Wi-Fi SoftAP with DHCP server
      - lvgl:   LVGL graphics on the ST7789 (lvgldemo)
    
    Signed-off-by: Jorge Guzman <[email protected]>
---
 .../esp32-cardputer-image-1.png                    | Bin 0 -> 251199 bytes
 .../esp32-cardputer-image-2.png                    | Bin 0 -> 248582 bytes
 .../esp32s3/boards/esp32s3-m5-cardputer/index.rst  | 118 +++++++++++
 boards/Kconfig                                     |  15 ++
 boards/xtensa/esp32s3/esp32s3-m5-cardputer/Kconfig |   8 +
 .../esp32s3-m5-cardputer/configs/fb/defconfig      |  67 +++++++
 .../esp32s3-m5-cardputer/configs/lvgl/defconfig    |  74 +++++++
 .../esp32s3-m5-cardputer/configs/nsh/defconfig     |  47 +++++
 .../esp32s3-m5-cardputer/configs/sdcard/defconfig  |  57 ++++++
 .../esp32s3-m5-cardputer/configs/softap/defconfig  |  82 ++++++++
 .../esp32s3-m5-cardputer/configs/wifi/defconfig    |  78 ++++++++
 .../esp32s3/esp32s3-m5-cardputer/include/board.h   | 128 ++++++++++++
 .../esp32s3/esp32s3-m5-cardputer/scripts/Make.defs |  57 ++++++
 .../esp32s3/esp32s3-m5-cardputer/src/Make.defs     |  46 +++++
 .../src/esp32s3-m5-cardputer.h                     |  91 +++++++++
 .../src/esp32s3_board_lcd_st7789.c                 | 149 ++++++++++++++
 .../esp32s3-m5-cardputer/src/esp32s3_board_spi.c   | 117 +++++++++++
 .../esp32s3-m5-cardputer/src/esp32s3_boot.c        |  77 +++++++
 .../esp32s3-m5-cardputer/src/esp32s3_bringup.c     | 222 +++++++++++++++++++++
 .../esp32s3-m5-cardputer/src/esp32s3_reset.c       |  87 ++++++++
 20 files changed, 1520 insertions(+)

diff --git 
a/Documentation/platforms/xtensa/esp32s3/boards/esp32s3-m5-cardputer/esp32-cardputer-image-1.png
 
b/Documentation/platforms/xtensa/esp32s3/boards/esp32s3-m5-cardputer/esp32-cardputer-image-1.png
new file mode 100644
index 00000000000..e0872d50f59
Binary files /dev/null and 
b/Documentation/platforms/xtensa/esp32s3/boards/esp32s3-m5-cardputer/esp32-cardputer-image-1.png
 differ
diff --git 
a/Documentation/platforms/xtensa/esp32s3/boards/esp32s3-m5-cardputer/esp32-cardputer-image-2.png
 
b/Documentation/platforms/xtensa/esp32s3/boards/esp32s3-m5-cardputer/esp32-cardputer-image-2.png
new file mode 100644
index 00000000000..85083ba7901
Binary files /dev/null and 
b/Documentation/platforms/xtensa/esp32s3/boards/esp32s3-m5-cardputer/esp32-cardputer-image-2.png
 differ
diff --git 
a/Documentation/platforms/xtensa/esp32s3/boards/esp32s3-m5-cardputer/index.rst 
b/Documentation/platforms/xtensa/esp32s3/boards/esp32s3-m5-cardputer/index.rst
new file mode 100644
index 00000000000..b96169482ed
--- /dev/null
+++ 
b/Documentation/platforms/xtensa/esp32s3/boards/esp32s3-m5-cardputer/index.rst
@@ -0,0 +1,118 @@
+.. _esp32s3-m5-cardputer:
+
+=================
+M5Stack Cardputer
+=================
+
+.. tags:: chip:esp32, chip:esp32s3, arch:xtensa, vendor:espressif
+
+.. figure:: esp32-cardputer-image-1.png
+   :align: center
+   :alt: M5Stack Cardputer
+
+   M5Stack Cardputer
+
+The `M5Stack Cardputer <https://docs.m5stack.com/en/core/Cardputer>`_ is a
+pocket-sized computer kit built around an M5Stamp S3 module (ESP32-S3FN8, dual
+Xtensa LX7 @ 240 MHz, 8 MB flash, no PSRAM).  It integrates a 1.14" ST7789
+TFT, an NS4168 I2S speaker, an SPM1423 microphone, an IR transmitter, a
+microSD slot and a Grove port.
+
+.. figure:: esp32-cardputer-image-2.png
+   :align: center
+   :alt: M5Stack Cardputer
+
+   M5Stack Cardputer
+
+Features
+========
+
+* ESP32-S3FN8 (dual Xtensa LX7 @ 240 MHz), 8 MB flash, no PSRAM
+* Wi-Fi 4 (2.4 GHz) and Bluetooth LE (native ESP32-S3 radio)
+* 1.14" 240x135 ST7789v2 TFT on SPI2
+* NS4168 mono I2S Class-D speaker amplifier
+* SPM1423 PDM microphone
+* IR transmitter, addressable RGB LED (WS2812)
+* microSD card slot (SPI) and Grove HY2.0-4P (I2C)
+* USB Type-C (native USB-Serial-JTAG)
+
+Serial Console
+==============
+
+By default the NSH console runs over the **USB-Serial-JTAG** peripheral exposed
+on the USB Type-C connector.  It enumerates on the host as ``/dev/ttyACM0``
+(Linux).  No external USB-to-UART bridge is required.
+
+Pin Mapping
+===========
+
+=========================== ==========================================
+Peripheral                  ESP32-S3 GPIO
+=========================== ==========================================
+ST7789 SPI2 SCLK/MOSI/CS    36 / 35 / 37
+ST7789 DC/RST/backlight     34 / 33 / 38
+microSD SPI3 SCK/MISO       40 / 39
+microSD SPI3 MOSI/CS        14 / 12
+Speaker NS4168 BCK/WS/DOUT  41 / 43 / 42
+Microphone SPM1423 DATA/CLK 46 / 43 (CLK shared with speaker WS)
+IR transmitter              44
+RGB LED (WS2812)            21
+Grove I2C SDA/SCL           2 / 1
+Battery ADC (1:2 divider)   10
+USB D-/D+ (native)          19 / 20
+BOOT / user button          0
+=========================== ==========================================
+
+Configurations
+==============
+
+All configurations use the USB-Serial-JTAG console and can be selected with::
+
+    ./tools/configure.sh esp32s3-m5-cardputer:<config>
+
+nsh
+    Basic NuttShell over USB-Serial-JTAG.  Open the console
+    (``/dev/ttyACM0``) and interact with the shell::
+
+        nsh> help
+        nsh> ls /dev
+
+sdcard
+    NSH plus the microSD card on SPI3 (FAT), registered as ``/dev/mmcsd0``.
+    Mount it and access the files::
+
+        nsh> mount -t vfat /dev/mmcsd0 /mnt
+        nsh> ls /mnt
+        nsh> echo "hello" > /mnt/test.txt
+
+fb
+    ST7789 display exposed as a framebuffer (``/dev/fb0``).  Run the 
framebuffer
+    example to draw test patterns on the screen::
+
+        nsh> fb
+
+wifi
+    Wi-Fi station.  Associate with an access point and obtain an address over
+    DHCP (replace ``<ssid>``/``<passphrase>`` with your network)::
+
+        nsh> wapi psk wlan0 <passphrase> 3
+        nsh> wapi essid wlan0 <ssid> 1
+        nsh> renew wlan0
+        nsh> ifconfig
+        nsh> ping 8.8.8.8
+
+softap
+    Wi-Fi SoftAP with a DHCP server.  The board starts the access point
+    ``NuttX`` (WPA2/WPA3-SAE, passphrase ``nuttx12345``) at 10.0.0.1.  Start 
the
+    DHCP server so stations that join get an address::
+
+        nsh> ifconfig
+        nsh> dhcpd wlan0
+
+    Then connect a client to the ``NuttX`` network; it receives an address in
+    the 10.0.0.0/24 range and can reach the board at 10.0.0.1.
+
+lvgl
+    Graphics support with LVGL on the ST7789 display.  Run the LVGL demo::
+
+        nsh> lvgldemo
diff --git a/boards/Kconfig b/boards/Kconfig
index ad047a75f11..58bc9c313f7 100644
--- a/boards/Kconfig
+++ b/boards/Kconfig
@@ -496,6 +496,17 @@ config ARCH_BOARD_ESP32S3_DEVKIT
                ESP32-S3-DevKitC-1 version may be based either on 
ESP32-S3-WROOM-1/1U or
                ESP32-S3-WROOM-2/2U.
 
+config ARCH_BOARD_ESP32S3_M5_CARDPUTER
+       bool "M5Stack Cardputer (ESP32-S3)"
+       depends on ARCH_CHIP_ESP32S3MINI1N8 || ARCH_CHIP_ESP32S3WROOM1N8R2 || 
ARCH_CHIP_ESP32S3WROOM1N8R8 || ARCH_CHIP_ESP32S3CUSTOM
+       select ARCH_HAVE_BUTTONS
+       select ARCH_HAVE_IRQBUTTONS if ESPRESSIF_GPIO_IRQ
+       ---help---
+               The M5Stack Cardputer is a portable computer kit built around 
the
+               ESP32-S3FN8 (dual Xtensa LX7 @ 240 MHz, 8 MB flash, no PSRAM).  
It
+               integrates a 56-key keyboard, a 1.14" ST7789 TFT, an NS4168 I2S
+               speaker, an SPM1423 microphone, an IR transmitter and a microSD 
slot.
+
 config ARCH_BOARD_ESP32S3_8048S043
        bool "ESP32-S3 8048S043"
        depends on ARCH_CHIP_ESP32S3WROOM1N4 || ARCH_CHIP_ESP32S3MINI1N8 || 
ARCH_CHIP_ESP32S3WROOM1N8R2 || ARCH_CHIP_ESP32S3WROOM1N16R8 || 
ARCH_CHIP_ESP32S3WROOM2N16R8V || ARCH_CHIP_ESP32S3WROOM2N32R8V || 
ARCH_CHIP_ESP32S3CUSTOM || ARCH_CHIP_ESP32S3WROOM1N8R8
@@ -3715,6 +3726,7 @@ config ARCH_BOARD
        default "esp32s2-saola-1"              if ARCH_BOARD_ESP32S2_SAOLA_1
        default "franzininho-wifi"             if ARCH_BOARD_FRANZININHO_WIFI
        default "esp32s3-devkit"               if ARCH_BOARD_ESP32S3_DEVKIT
+       default "esp32s3-m5-cardputer"         if 
ARCH_BOARD_ESP32S3_M5_CARDPUTER
        default "esp32s3-8048S043"             if ARCH_BOARD_ESP32S3_8048S043
        default "esp32s3-eye"                  if ARCH_BOARD_ESP32S3_EYE
        default "esp32s3-meadow"               if ARCH_BOARD_ESP32S3_MEADOW
@@ -5028,6 +5040,9 @@ endif
 if ARCH_BOARD_ESP32S3_DEVKIT
 source "boards/xtensa/esp32s3/esp32s3-devkit/Kconfig"
 endif
+if ARCH_BOARD_ESP32S3_M5_CARDPUTER
+source "boards/xtensa/esp32s3/esp32s3-m5-cardputer/Kconfig"
+endif
 if ARCH_BOARD_ESP32S3_8048S043
 source "boards/xtensa/esp32s3/esp32s3-8048S043/Kconfig"
 endif
diff --git a/boards/xtensa/esp32s3/esp32s3-m5-cardputer/Kconfig 
b/boards/xtensa/esp32s3/esp32s3-m5-cardputer/Kconfig
new file mode 100644
index 00000000000..a07197f7079
--- /dev/null
+++ b/boards/xtensa/esp32s3/esp32s3-m5-cardputer/Kconfig
@@ -0,0 +1,8 @@
+#
+# For a description of the syntax of this configuration file,
+# see the file kconfig-language.txt in the NuttX tools repository.
+#
+
+if ARCH_BOARD_ESP32S3_M5_CARDPUTER
+
+endif # ARCH_BOARD_ESP32S3_M5_CARDPUTER
diff --git a/boards/xtensa/esp32s3/esp32s3-m5-cardputer/configs/fb/defconfig 
b/boards/xtensa/esp32s3/esp32s3-m5-cardputer/configs/fb/defconfig
new file mode 100644
index 00000000000..133a21e038a
--- /dev/null
+++ b/boards/xtensa/esp32s3/esp32s3-m5-cardputer/configs/fb/defconfig
@@ -0,0 +1,67 @@
+#
+# This file is autogenerated: PLEASE DO NOT EDIT IT.
+#
+# You can use "make menuconfig" to make any modifications to the installed 
.config file.
+# You can then do "make savedefconfig" to generate a new defconfig file that 
includes your
+# modifications.
+#
+# CONFIG_NSH_ARGCAT is not set
+# CONFIG_NSH_CMDOPT_HEXDUMP is not set
+CONFIG_ARCH="xtensa"
+CONFIG_ARCH_BOARD="esp32s3-m5-cardputer"
+CONFIG_ARCH_BOARD_COMMON=y
+CONFIG_ARCH_BOARD_ESP32S3_M5_CARDPUTER=y
+CONFIG_ARCH_CHIP="esp32s3"
+CONFIG_ARCH_CHIP_ESP32S3=y
+CONFIG_ARCH_CHIP_ESP32S3MINI1N8=y
+CONFIG_ARCH_INTERRUPTSTACK=2048
+CONFIG_ARCH_IRQ_TO_NDX=y
+CONFIG_ARCH_MINIMAL_VECTORTABLE_DYNAMIC=y
+CONFIG_ARCH_NUSER_INTERRUPTS=2
+CONFIG_ARCH_STACKDUMP=y
+CONFIG_ARCH_XTENSA=y
+CONFIG_BOARDCTL_RESET=y
+CONFIG_BOARD_LOOPSPERMSEC=16717
+CONFIG_BUILTIN=y
+CONFIG_DEBUG_FULLOPT=y
+CONFIG_DEBUG_SYMBOLS=y
+CONFIG_DRIVERS_VIDEO=y
+CONFIG_ESP32S3_SPI2=y
+CONFIG_ESP32S3_SPI2_CLKPIN=36
+CONFIG_ESP32S3_SPI2_CSPIN=37
+CONFIG_ESP32S3_SPI2_MISOPIN=-1
+CONFIG_ESP32S3_SPI2_MOSIPIN=35
+CONFIG_ESP32S3_SPI_SWCS=y
+CONFIG_ESP32S3_USBSERIAL=y
+CONFIG_EXAMPLES_FB=y
+CONFIG_FS_PROCFS=y
+CONFIG_IDLETHREAD_STACKSIZE=3072
+CONFIG_INIT_ENTRYPOINT="nsh_main"
+CONFIG_INIT_STACKSIZE=3072
+CONFIG_INTELHEX_BINARY=y
+CONFIG_LCD=y
+CONFIG_LCD_DEV=y
+CONFIG_LCD_FRAMEBUFFER=y
+CONFIG_LCD_ST7789=y
+CONFIG_LCD_ST7789_DATA_ENDIAN_LITTLE=y
+CONFIG_LCD_ST7789_FREQUENCY=40000000
+CONFIG_LCD_ST7789_XOFFSET=52
+CONFIG_LCD_ST7789_XRES=135
+CONFIG_LCD_ST7789_YOFFSET=40
+CONFIG_LCD_ST7789_YRES=240
+CONFIG_LIBC_PERROR_STDOUT=y
+CONFIG_LIBC_STRERROR=y
+CONFIG_LINE_MAX=64
+CONFIG_NSH_BUILTIN_APPS=y
+CONFIG_NSH_FILEIOSIZE=512
+CONFIG_NSH_READLINE=y
+CONFIG_PREALLOC_TIMERS=4
+CONFIG_RR_INTERVAL=200
+CONFIG_SCHED_WAITPID=y
+CONFIG_SPI_CMDDATA=y
+CONFIG_START_DAY=29
+CONFIG_START_MONTH=11
+CONFIG_START_YEAR=2019
+CONFIG_SYSLOG_BUFFER=y
+CONFIG_SYSTEM_NSH=y
+CONFIG_VIDEO_FB=y
diff --git a/boards/xtensa/esp32s3/esp32s3-m5-cardputer/configs/lvgl/defconfig 
b/boards/xtensa/esp32s3/esp32s3-m5-cardputer/configs/lvgl/defconfig
new file mode 100644
index 00000000000..3680dcb4152
--- /dev/null
+++ b/boards/xtensa/esp32s3/esp32s3-m5-cardputer/configs/lvgl/defconfig
@@ -0,0 +1,74 @@
+#
+# This file is autogenerated: PLEASE DO NOT EDIT IT.
+#
+# You can use "make menuconfig" to make any modifications to the installed 
.config file.
+# You can then do "make savedefconfig" to generate a new defconfig file that 
includes your
+# modifications.
+#
+# CONFIG_NSH_ARGCAT is not set
+# CONFIG_NSH_CMDOPT_HEXDUMP is not set
+CONFIG_ARCH="xtensa"
+CONFIG_ARCH_BOARD="esp32s3-m5-cardputer"
+CONFIG_ARCH_BOARD_COMMON=y
+CONFIG_ARCH_BOARD_ESP32S3_M5_CARDPUTER=y
+CONFIG_ARCH_CHIP="esp32s3"
+CONFIG_ARCH_CHIP_ESP32S3=y
+CONFIG_ARCH_CHIP_ESP32S3MINI1N8=y
+CONFIG_ARCH_INTERRUPTSTACK=2048
+CONFIG_ARCH_IRQ_TO_NDX=y
+CONFIG_ARCH_MINIMAL_VECTORTABLE_DYNAMIC=y
+CONFIG_ARCH_NUSER_INTERRUPTS=2
+CONFIG_ARCH_STACKDUMP=y
+CONFIG_ARCH_XTENSA=y
+CONFIG_BOARDCTL_RESET=y
+CONFIG_BOARD_LOOPSPERMSEC=16717
+CONFIG_BUILTIN=y
+CONFIG_DEBUG_FULLOPT=y
+CONFIG_DEBUG_SYMBOLS=y
+CONFIG_ESP32S3_SPI2=y
+CONFIG_ESP32S3_SPI2_CLKPIN=36
+CONFIG_ESP32S3_SPI2_CSPIN=37
+CONFIG_ESP32S3_SPI2_MISOPIN=-1
+CONFIG_ESP32S3_SPI2_MOSIPIN=35
+CONFIG_ESP32S3_SPI_SWCS=y
+CONFIG_ESP32S3_USBSERIAL=y
+CONFIG_EXAMPLES_LVGLDEMO=y
+CONFIG_FS_PROCFS=y
+CONFIG_GRAPHICS_LVGL=y
+CONFIG_IDLETHREAD_STACKSIZE=3072
+CONFIG_INIT_ENTRYPOINT="nsh_main"
+CONFIG_INIT_STACKSIZE=8192
+CONFIG_INTELHEX_BINARY=y
+CONFIG_LCD=y
+CONFIG_LCD_DEV=y
+CONFIG_LCD_FRAMEBUFFER=y
+CONFIG_LCD_ST7789=y
+CONFIG_LCD_ST7789_DATA_ENDIAN_LITTLE=y
+CONFIG_LCD_ST7789_FREQUENCY=40000000
+CONFIG_LCD_ST7789_XOFFSET=52
+CONFIG_LCD_ST7789_XRES=135
+CONFIG_LCD_ST7789_YOFFSET=40
+CONFIG_LCD_ST7789_YRES=240
+CONFIG_LIBC_PERROR_STDOUT=y
+CONFIG_LIBC_STRERROR=y
+CONFIG_LINE_MAX=64
+CONFIG_LV_USE_CLIB_MALLOC=y
+CONFIG_LV_USE_CLIB_SPRINTF=y
+CONFIG_LV_USE_CLIB_STRING=y
+CONFIG_LV_USE_DEMO_WIDGETS=y
+CONFIG_LV_USE_LOG=y
+CONFIG_LV_USE_NUTTX=y
+CONFIG_LV_USE_NUTTX_LCD=y
+CONFIG_NSH_BUILTIN_APPS=y
+CONFIG_NSH_FILEIOSIZE=512
+CONFIG_NSH_READLINE=y
+CONFIG_PIPES=y
+CONFIG_PREALLOC_TIMERS=4
+CONFIG_RR_INTERVAL=200
+CONFIG_SCHED_WAITPID=y
+CONFIG_SPI_CMDDATA=y
+CONFIG_START_DAY=29
+CONFIG_START_MONTH=11
+CONFIG_START_YEAR=2019
+CONFIG_SYSLOG_BUFFER=y
+CONFIG_SYSTEM_NSH=y
diff --git a/boards/xtensa/esp32s3/esp32s3-m5-cardputer/configs/nsh/defconfig 
b/boards/xtensa/esp32s3/esp32s3-m5-cardputer/configs/nsh/defconfig
new file mode 100644
index 00000000000..54e3f42096c
--- /dev/null
+++ b/boards/xtensa/esp32s3/esp32s3-m5-cardputer/configs/nsh/defconfig
@@ -0,0 +1,47 @@
+#
+# This file is autogenerated: PLEASE DO NOT EDIT IT.
+#
+# You can use "make menuconfig" to make any modifications to the installed 
.config file.
+# You can then do "make savedefconfig" to generate a new defconfig file that 
includes your
+# modifications.
+#
+# CONFIG_NSH_ARGCAT is not set
+# CONFIG_NSH_CMDOPT_HEXDUMP is not set
+CONFIG_ARCH="xtensa"
+CONFIG_ARCH_BOARD="esp32s3-m5-cardputer"
+CONFIG_ARCH_BOARD_COMMON=y
+CONFIG_ARCH_BOARD_ESP32S3_M5_CARDPUTER=y
+CONFIG_ARCH_CHIP="esp32s3"
+CONFIG_ARCH_CHIP_ESP32S3=y
+CONFIG_ARCH_CHIP_ESP32S3MINI1N8=y
+CONFIG_ARCH_INTERRUPTSTACK=2048
+CONFIG_ARCH_IRQ_TO_NDX=y
+CONFIG_ARCH_MINIMAL_VECTORTABLE_DYNAMIC=y
+CONFIG_ARCH_NUSER_INTERRUPTS=2
+CONFIG_ARCH_STACKDUMP=y
+CONFIG_ARCH_XTENSA=y
+CONFIG_BOARDCTL_RESET=y
+CONFIG_BOARD_LOOPSPERMSEC=16717
+CONFIG_BUILTIN=y
+CONFIG_DEBUG_FULLOPT=y
+CONFIG_DEBUG_SYMBOLS=y
+CONFIG_ESP32S3_USBSERIAL=y
+CONFIG_FS_PROCFS=y
+CONFIG_IDLETHREAD_STACKSIZE=3072
+CONFIG_INIT_ENTRYPOINT="nsh_main"
+CONFIG_INIT_STACKSIZE=3072
+CONFIG_INTELHEX_BINARY=y
+CONFIG_LIBC_PERROR_STDOUT=y
+CONFIG_LIBC_STRERROR=y
+CONFIG_LINE_MAX=64
+CONFIG_NSH_BUILTIN_APPS=y
+CONFIG_NSH_FILEIOSIZE=512
+CONFIG_NSH_READLINE=y
+CONFIG_PREALLOC_TIMERS=4
+CONFIG_RR_INTERVAL=200
+CONFIG_SCHED_WAITPID=y
+CONFIG_START_DAY=29
+CONFIG_START_MONTH=11
+CONFIG_START_YEAR=2019
+CONFIG_SYSLOG_BUFFER=y
+CONFIG_SYSTEM_NSH=y
diff --git 
a/boards/xtensa/esp32s3/esp32s3-m5-cardputer/configs/sdcard/defconfig 
b/boards/xtensa/esp32s3/esp32s3-m5-cardputer/configs/sdcard/defconfig
new file mode 100644
index 00000000000..49a333d2b85
--- /dev/null
+++ b/boards/xtensa/esp32s3/esp32s3-m5-cardputer/configs/sdcard/defconfig
@@ -0,0 +1,57 @@
+#
+# This file is autogenerated: PLEASE DO NOT EDIT IT.
+#
+# You can use "make menuconfig" to make any modifications to the installed 
.config file.
+# You can then do "make savedefconfig" to generate a new defconfig file that 
includes your
+# modifications.
+#
+# CONFIG_NSH_ARGCAT is not set
+# CONFIG_NSH_CMDOPT_HEXDUMP is not set
+CONFIG_ARCH="xtensa"
+CONFIG_ARCH_BOARD="esp32s3-m5-cardputer"
+CONFIG_ARCH_BOARD_COMMON=y
+CONFIG_ARCH_BOARD_ESP32S3_M5_CARDPUTER=y
+CONFIG_ARCH_CHIP="esp32s3"
+CONFIG_ARCH_CHIP_ESP32S3=y
+CONFIG_ARCH_CHIP_ESP32S3MINI1N8=y
+CONFIG_ARCH_INTERRUPTSTACK=2048
+CONFIG_ARCH_IRQ_TO_NDX=y
+CONFIG_ARCH_MINIMAL_VECTORTABLE_DYNAMIC=y
+CONFIG_ARCH_NUSER_INTERRUPTS=2
+CONFIG_ARCH_STACKDUMP=y
+CONFIG_ARCH_XTENSA=y
+CONFIG_BOARDCTL_RESET=y
+CONFIG_BOARD_LOOPSPERMSEC=16717
+CONFIG_BUILTIN=y
+CONFIG_DEBUG_FULLOPT=y
+CONFIG_DEBUG_SYMBOLS=y
+CONFIG_ESP32S3_SPI3=y
+CONFIG_ESP32S3_SPI3_CLKPIN=40
+CONFIG_ESP32S3_SPI3_CSPIN=12
+CONFIG_ESP32S3_SPI3_MISOPIN=39
+CONFIG_ESP32S3_SPI3_MOSIPIN=14
+CONFIG_ESP32S3_USBSERIAL=y
+CONFIG_FAT_LCNAMES=y
+CONFIG_FAT_LFN=y
+CONFIG_FS_FAT=y
+CONFIG_FS_PROCFS=y
+CONFIG_IDLETHREAD_STACKSIZE=3072
+CONFIG_INIT_ENTRYPOINT="nsh_main"
+CONFIG_INIT_STACKSIZE=3072
+CONFIG_INTELHEX_BINARY=y
+CONFIG_LIBC_PERROR_STDOUT=y
+CONFIG_LIBC_STRERROR=y
+CONFIG_LINE_MAX=64
+CONFIG_MMCSD=y
+CONFIG_NSH_BUILTIN_APPS=y
+CONFIG_NSH_FILEIOSIZE=512
+CONFIG_NSH_MMCSDSPIPORTNO=3
+CONFIG_NSH_READLINE=y
+CONFIG_PREALLOC_TIMERS=4
+CONFIG_RR_INTERVAL=200
+CONFIG_SCHED_WAITPID=y
+CONFIG_START_DAY=29
+CONFIG_START_MONTH=11
+CONFIG_START_YEAR=2019
+CONFIG_SYSLOG_BUFFER=y
+CONFIG_SYSTEM_NSH=y
diff --git 
a/boards/xtensa/esp32s3/esp32s3-m5-cardputer/configs/softap/defconfig 
b/boards/xtensa/esp32s3/esp32s3-m5-cardputer/configs/softap/defconfig
new file mode 100644
index 00000000000..25ad79ed20c
--- /dev/null
+++ b/boards/xtensa/esp32s3/esp32s3-m5-cardputer/configs/softap/defconfig
@@ -0,0 +1,82 @@
+#
+# This file is autogenerated: PLEASE DO NOT EDIT IT.
+#
+# You can use "make menuconfig" to make any modifications to the installed 
.config file.
+# You can then do "make savedefconfig" to generate a new defconfig file that 
includes your
+# modifications.
+#
+# CONFIG_NSH_ARGCAT is not set
+# CONFIG_NSH_CMDOPT_HEXDUMP is not set
+CONFIG_ALLOW_BSD_COMPONENTS=y
+CONFIG_ARCH="xtensa"
+CONFIG_ARCH_BOARD="esp32s3-m5-cardputer"
+CONFIG_ARCH_BOARD_COMMON=y
+CONFIG_ARCH_BOARD_ESP32S3_M5_CARDPUTER=y
+CONFIG_ARCH_CHIP="esp32s3"
+CONFIG_ARCH_CHIP_ESP32S3=y
+CONFIG_ARCH_CHIP_ESP32S3MINI1N8=y
+CONFIG_ARCH_INTERRUPTSTACK=2048
+CONFIG_ARCH_IRQ_TO_NDX=y
+CONFIG_ARCH_MINIMAL_VECTORTABLE_DYNAMIC=y
+CONFIG_ARCH_NUSER_INTERRUPTS=2
+CONFIG_ARCH_STACKDUMP=y
+CONFIG_ARCH_XTENSA=y
+CONFIG_BOARD_LOOPSPERMSEC=16717
+CONFIG_BUILTIN=y
+CONFIG_DRIVERS_IEEE80211=y
+CONFIG_DRIVERS_WIRELESS=y
+CONFIG_ESP32S3_SPIFLASH=y
+CONFIG_ESP32S3_SPIFLASH_SPIFFS=y
+CONFIG_ESP32S3_USBSERIAL=y
+CONFIG_ESPRESSIF_WIFI=y
+CONFIG_ESPRESSIF_WIFI_SOFTAP=y
+CONFIG_EXAMPLES_DHCPD=y
+CONFIG_FS_PROCFS=y
+CONFIG_IDLETHREAD_STACKSIZE=3072
+CONFIG_INIT_ENTRYPOINT="nsh_main"
+CONFIG_INIT_STACKSIZE=3072
+CONFIG_INTELHEX_BINARY=y
+CONFIG_IOB_BUFSIZE=400
+CONFIG_IOB_NBUFFERS=100
+CONFIG_IOB_NCHAINS=32
+CONFIG_IOB_THROTTLE=40
+CONFIG_LINE_MAX=64
+CONFIG_NETDB_DNSCLIENT=y
+CONFIG_NETDEV_LATEINIT=y
+CONFIG_NETDEV_PHY_IOCTL=y
+CONFIG_NETDEV_WIRELESS_IOCTL=y
+CONFIG_NETINIT_IPADDR=0x0a000001
+CONFIG_NETUTILS_CJSON=y
+CONFIG_NETUTILS_DHCPD=y
+CONFIG_NETUTILS_IPERF=y
+CONFIG_NET_BROADCAST=y
+CONFIG_NET_ETH_PKTSIZE=1514
+CONFIG_NET_ICMP_SOCKET=y
+CONFIG_NET_TCP=y
+CONFIG_NET_TCP_DELAYED_ACK=y
+CONFIG_NET_TCP_WRITE_BUFFERS=y
+CONFIG_NET_UDP=y
+CONFIG_NET_UDP_WRITE_BUFFERS=y
+CONFIG_NSH_BUILTIN_APPS=y
+CONFIG_NSH_FILEIOSIZE=512
+CONFIG_NSH_READLINE=y
+CONFIG_PREALLOC_TIMERS=4
+CONFIG_PTHREAD_MUTEX_TYPES=y
+CONFIG_RR_INTERVAL=200
+CONFIG_RTC=y
+CONFIG_RTC_DRIVER=y
+CONFIG_SCHED_LPWORK=y
+CONFIG_SCHED_WAITPID=y
+CONFIG_START_DAY=29
+CONFIG_START_MONTH=11
+CONFIG_START_YEAR=2019
+CONFIG_SYSLOG_BUFFER=y
+CONFIG_SYSTEM_NSH=y
+CONFIG_SYSTEM_PING=y
+CONFIG_TIMER=y
+CONFIG_TLS_TASK_NELEM=4
+CONFIG_WIRELESS=y
+CONFIG_WIRELESS_WAPI=y
+CONFIG_WIRELESS_WAPI_CMDTOOL=y
+CONFIG_WIRELESS_WAPI_INITCONF=y
+CONFIG_WIRELESS_WAPI_STACKSIZE=4096
diff --git a/boards/xtensa/esp32s3/esp32s3-m5-cardputer/configs/wifi/defconfig 
b/boards/xtensa/esp32s3/esp32s3-m5-cardputer/configs/wifi/defconfig
new file mode 100644
index 00000000000..325527492db
--- /dev/null
+++ b/boards/xtensa/esp32s3/esp32s3-m5-cardputer/configs/wifi/defconfig
@@ -0,0 +1,78 @@
+#
+# This file is autogenerated: PLEASE DO NOT EDIT IT.
+#
+# You can use "make menuconfig" to make any modifications to the installed 
.config file.
+# You can then do "make savedefconfig" to generate a new defconfig file that 
includes your
+# modifications.
+#
+# CONFIG_NSH_ARGCAT is not set
+# CONFIG_NSH_CMDOPT_HEXDUMP is not set
+CONFIG_ALLOW_BSD_COMPONENTS=y
+CONFIG_ARCH="xtensa"
+CONFIG_ARCH_BOARD="esp32s3-m5-cardputer"
+CONFIG_ARCH_BOARD_COMMON=y
+CONFIG_ARCH_BOARD_ESP32S3_M5_CARDPUTER=y
+CONFIG_ARCH_CHIP="esp32s3"
+CONFIG_ARCH_CHIP_ESP32S3=y
+CONFIG_ARCH_CHIP_ESP32S3MINI1N8=y
+CONFIG_ARCH_INTERRUPTSTACK=2048
+CONFIG_ARCH_IRQ_TO_NDX=y
+CONFIG_ARCH_MINIMAL_VECTORTABLE_DYNAMIC=y
+CONFIG_ARCH_NUSER_INTERRUPTS=2
+CONFIG_ARCH_STACKDUMP=y
+CONFIG_ARCH_XTENSA=y
+CONFIG_BOARD_LOOPSPERMSEC=16717
+CONFIG_BUILTIN=y
+CONFIG_DRIVERS_IEEE80211=y
+CONFIG_DRIVERS_WIRELESS=y
+CONFIG_ESP32S3_SPIFLASH=y
+CONFIG_ESP32S3_SPIFLASH_SPIFFS=y
+CONFIG_ESP32S3_USBSERIAL=y
+CONFIG_ESPRESSIF_WIFI=y
+CONFIG_FS_PROCFS=y
+CONFIG_IDLETHREAD_STACKSIZE=3072
+CONFIG_INIT_ENTRYPOINT="nsh_main"
+CONFIG_INIT_STACKSIZE=3072
+CONFIG_INTELHEX_BINARY=y
+CONFIG_IOB_BUFSIZE=400
+CONFIG_IOB_NBUFFERS=100
+CONFIG_IOB_NCHAINS=32
+CONFIG_IOB_THROTTLE=40
+CONFIG_LINE_MAX=64
+CONFIG_NETDB_DNSCLIENT=y
+CONFIG_NETDEV_LATEINIT=y
+CONFIG_NETDEV_PHY_IOCTL=y
+CONFIG_NETDEV_WIRELESS_IOCTL=y
+CONFIG_NETUTILS_CJSON=y
+CONFIG_NETUTILS_IPERF=y
+CONFIG_NET_ETH_PKTSIZE=1514
+CONFIG_NET_ICMP_SOCKET=y
+CONFIG_NET_TCP=y
+CONFIG_NET_TCP_DELAYED_ACK=y
+CONFIG_NET_TCP_WRITE_BUFFERS=y
+CONFIG_NET_UDP=y
+CONFIG_NET_UDP_WRITE_BUFFERS=y
+CONFIG_NSH_BUILTIN_APPS=y
+CONFIG_NSH_FILEIOSIZE=512
+CONFIG_NSH_READLINE=y
+CONFIG_PREALLOC_TIMERS=4
+CONFIG_PTHREAD_MUTEX_TYPES=y
+CONFIG_RR_INTERVAL=200
+CONFIG_RTC=y
+CONFIG_RTC_DRIVER=y
+CONFIG_SCHED_LPWORK=y
+CONFIG_SCHED_WAITPID=y
+CONFIG_START_DAY=29
+CONFIG_START_MONTH=11
+CONFIG_START_YEAR=2019
+CONFIG_SYSLOG_BUFFER=y
+CONFIG_SYSTEM_DHCPC_RENEW=y
+CONFIG_SYSTEM_NSH=y
+CONFIG_SYSTEM_PING=y
+CONFIG_TIMER=y
+CONFIG_TLS_TASK_NELEM=4
+CONFIG_WIRELESS=y
+CONFIG_WIRELESS_WAPI=y
+CONFIG_WIRELESS_WAPI_CMDTOOL=y
+CONFIG_WIRELESS_WAPI_INITCONF=y
+CONFIG_WIRELESS_WAPI_STACKSIZE=4096
diff --git a/boards/xtensa/esp32s3/esp32s3-m5-cardputer/include/board.h 
b/boards/xtensa/esp32s3/esp32s3-m5-cardputer/include/board.h
new file mode 100644
index 00000000000..f427858aef9
--- /dev/null
+++ b/boards/xtensa/esp32s3/esp32s3-m5-cardputer/include/board.h
@@ -0,0 +1,128 @@
+/****************************************************************************
+ * boards/xtensa/esp32s3/esp32s3-m5-cardputer/include/board.h
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ ****************************************************************************/
+
+#ifndef __BOARDS_XTENSA_ESP32S3_ESP32S3_M5_CARDPUTER_INCLUDE_BOARD_H
+#define __BOARDS_XTENSA_ESP32S3_ESP32S3_M5_CARDPUTER_INCLUDE_BOARD_H
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+/* Clocking *****************************************************************/
+
+/* The M5Stack Cardputer (StampS3 / ESP32-S3FN8) is fitted with a 40MHz
+ * crystal.
+ */
+
+#define BOARD_XTAL_FREQUENCY    40000000
+
+#ifdef CONFIG_ESP32S3_DEFAULT_CPU_FREQ_MHZ
+#  define BOARD_CLOCK_FREQUENCY (CONFIG_ESP32S3_DEFAULT_CPU_FREQ_MHZ * 1000000)
+#else
+#  define BOARD_CLOCK_FREQUENCY 80000000
+#endif
+
+/* M5Stack Cardputer full pin map
+ *
+ * The pin numbers below document the complete board wiring so that drivers
+ * can be added without having to re-derive it from the M5Cardputer/M5Unified
+ * libraries.  Peripherals that are not brought up by the current board logic
+ * are marked "(pins only)".  See the board documentation for the per-config
+ * peripheral status.
+ */
+
+/* USB-Serial-JTAG (NSH console over the USB-C port, native USB) */
+
+#define CARDPUTER_GPIO_USB_DM   19  /* USB D- */
+#define CARDPUTER_GPIO_USB_DP   20  /* USB D+ */
+
+/* 56-key keyboard - 8x7 matrix scanned through a 74HC138 3-to-8 demux.
+ *
+ * The three select lines drive the demux address (one of eight rows is
+ * pulled low at a time); the seven column lines are read back.
+ */
+
+#define CARDPUTER_GPIO_KB_A0    8   /* 74HC138 A0 (row select bit 0) */
+#define CARDPUTER_GPIO_KB_A1    9   /* 74HC138 A1 (row select bit 1) */
+#define CARDPUTER_GPIO_KB_A2    11  /* 74HC138 A2 (row select bit 2) */
+
+#define CARDPUTER_GPIO_KB_C0    13  /* Column read 0 */
+#define CARDPUTER_GPIO_KB_C1    15  /* Column read 1 */
+#define CARDPUTER_GPIO_KB_C2    3   /* Column read 2 */
+#define CARDPUTER_GPIO_KB_C3    4   /* Column read 3 */
+#define CARDPUTER_GPIO_KB_C4    5   /* Column read 4 */
+#define CARDPUTER_GPIO_KB_C5    6   /* Column read 5 */
+#define CARDPUTER_GPIO_KB_C6    7   /* Column read 6 */
+
+/* Display - ST7789v2 1.14" 240x135 TFT on SPI2 */
+
+#define CARDPUTER_GPIO_LCD_SCLK 36  /* SPI2 clock */
+#define CARDPUTER_GPIO_LCD_MOSI 35  /* SPI2 MOSI */
+#define CARDPUTER_GPIO_LCD_CS   37  /* Chip select */
+#define CARDPUTER_GPIO_LCD_DC   34  /* Data/command */
+#define CARDPUTER_GPIO_LCD_RST  33  /* Reset */
+#define CARDPUTER_GPIO_LCD_BL   38  /* Backlight enable */
+
+/* microSD - SPI3 (CS=12, MOSI=14, SCK=40, MISO=39) */
+
+#define CARDPUTER_GPIO_SD_SCLK  40  /* SPI3 clock */
+#define CARDPUTER_GPIO_SD_MISO  39  /* SPI3 MISO */
+#define CARDPUTER_GPIO_SD_MOSI  14  /* SPI3 MOSI */
+#define CARDPUTER_GPIO_SD_CS    12  /* Chip select */
+
+/* Audio out - NS4168 mono I2S Class-D amplifier (speaker) */
+
+#define CARDPUTER_GPIO_SPK_BCLK 41  /* I2S bit clock */
+#define CARDPUTER_GPIO_SPK_WS   43  /* I2S word/LR clock (shared, see note) */
+#define CARDPUTER_GPIO_SPK_DOUT 42  /* I2S data to NS4168 */
+
+/* Audio in - SPM1423 PDM microphone
+ *
+ * Note: the mic clock is the same pin as the speaker word-select (43); the
+ * board shares it between the I2S TX and the PDM RX paths.
+ */
+
+#define CARDPUTER_GPIO_MIC_DATA 46  /* PDM data */
+#define CARDPUTER_GPIO_MIC_CLK  43  /* PDM clock (shared with SPK_WS) */
+
+/* IR transmitter (pins only) */
+
+#define CARDPUTER_GPIO_IR_TX    44
+
+/* On-board RGB LED - WS2812 addressable (needs the RMT driver; pins only) */
+
+#define CARDPUTER_GPIO_RGB_LED  21
+
+/* Grove HY2.0-4P port - I2C (also usable as GPIO) */
+
+#define CARDPUTER_GPIO_I2C_SDA  2
+#define CARDPUTER_GPIO_I2C_SCL  1
+
+/* Battery voltage sense - ADC1 channel on GPIO10 (1:2 divider) */
+
+#define CARDPUTER_GPIO_BAT_ADC  10
+
+/* User / BOOT button (active low) */
+
+#define CARDPUTER_GPIO_BTN      0
+
+#endif /* __BOARDS_XTENSA_ESP32S3_ESP32S3_M5_CARDPUTER_INCLUDE_BOARD_H */
diff --git a/boards/xtensa/esp32s3/esp32s3-m5-cardputer/scripts/Make.defs 
b/boards/xtensa/esp32s3/esp32s3-m5-cardputer/scripts/Make.defs
new file mode 100644
index 00000000000..d22e3127143
--- /dev/null
+++ b/boards/xtensa/esp32s3/esp32s3-m5-cardputer/scripts/Make.defs
@@ -0,0 +1,57 @@
+############################################################################
+# boards/xtensa/esp32s3/esp32s3-m5-cardputer/scripts/Make.defs
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.  The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+include $(TOPDIR)/.config
+include $(TOPDIR)/tools/Config.mk
+include $(TOPDIR)/tools/esp32s3/Config.mk
+include $(TOPDIR)/arch/xtensa/src/lx7/Toolchain.defs
+
+ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)esp32s3_peripherals.ld
+ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)esp32s3_rom_aliases.ld
+
+# Pick the linker scripts from the board level if they exist, if not
+# pick the common linker scripts.
+
+ifeq ($(CONFIG_BUILD_PROTECTED),y)
+  ARCHSCRIPT += $(call FINDSCRIPT,protected_memory.ld)
+  ARCHSCRIPT += $(call FINDSCRIPT,kernel-space.ld)
+else
+  ARCHSCRIPT += $(call FINDSCRIPT,flat_memory.ld)
+  ifneq ($(CONFIG_ESP32S3_APP_FORMAT_LEGACY),y)
+    ARCHSCRIPT += $(call FINDSCRIPT,esp32s3_sections.ld)
+  else
+    ARCHSCRIPT += $(call FINDSCRIPT,legacy_sections.ld)
+  endif
+endif
+
+ifneq ($(CONFIG_DEBUG_NOOPT),y)
+  ARCHOPTIMIZATION += -fno-strength-reduce
+endif
+
+ARCHPICFLAGS = -fpic
+
+CFLAGS := $(ARCHCFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) 
$(ARCHDEFINES) $(EXTRAFLAGS)
+CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
+CXXFLAGS := $(ARCHCXXFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) 
$(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
+CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
+CPPFLAGS := $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
+AFLAGS := $(CFLAGS) -D__ASSEMBLY__
diff --git a/boards/xtensa/esp32s3/esp32s3-m5-cardputer/src/Make.defs 
b/boards/xtensa/esp32s3/esp32s3-m5-cardputer/src/Make.defs
new file mode 100644
index 00000000000..08c948f0b27
--- /dev/null
+++ b/boards/xtensa/esp32s3/esp32s3-m5-cardputer/src/Make.defs
@@ -0,0 +1,46 @@
+############################################################################
+# boards/xtensa/esp32s3/esp32s3-m5-cardputer/src/Make.defs
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.  The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+CSRCS = esp32s3_boot.c esp32s3_bringup.c
+
+ifeq ($(CONFIG_BOARDCTL_RESET),y)
+CSRCS += esp32s3_reset.c
+endif
+
+ifeq ($(CONFIG_ESP32S3_SPI),y)
+CSRCS += esp32s3_board_spi.c
+endif
+
+ifeq ($(CONFIG_LCD_ST7789),y)
+CSRCS += esp32s3_board_lcd_st7789.c
+endif
+
+DEPPATH += --dep-path board
+VPATH += :board
+CFLAGS += 
${INCDIR_PREFIX}$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board
+
+ifeq ($(CONFIG_ESPRESSIF_HR_TIMER),y)
+  CFLAGS += 
-I$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)chip$(DELIM)esp-hal-3rdparty$(DELIM)components$(DELIM)esp_timer$(DELIM)include
+endif
+  CFLAGS += 
-I$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)chip$(DELIM)esp-hal-3rdparty$(DELIM)components$(DELIM)esp_system$(DELIM)include
+  CFLAGS += 
-I$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)chip$(DELIM)esp-hal-3rdparty$(DELIM)components$(DELIM)esp_common$(DELIM)include
+  CFLAGS += 
-I$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)chip$(DELIM)esp-hal-3rdparty$(DELIM)nuttx$(DELIM)esp32s3$(DELIM)include
diff --git 
a/boards/xtensa/esp32s3/esp32s3-m5-cardputer/src/esp32s3-m5-cardputer.h 
b/boards/xtensa/esp32s3/esp32s3-m5-cardputer/src/esp32s3-m5-cardputer.h
new file mode 100644
index 00000000000..299e6cd91e6
--- /dev/null
+++ b/boards/xtensa/esp32s3/esp32s3-m5-cardputer/src/esp32s3-m5-cardputer.h
@@ -0,0 +1,91 @@
+/****************************************************************************
+ * boards/xtensa/esp32s3/esp32s3-m5-cardputer/src/esp32s3-m5-cardputer.h
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ ****************************************************************************/
+
+#ifndef __BOARDS_XTENSA_ESP32S3_ESP32S3_M5_CARDPUTER_SRC_ESP32S3_M5_CARDPUTER_H
+#define __BOARDS_XTENSA_ESP32S3_ESP32S3_M5_CARDPUTER_SRC_ESP32S3_M5_CARDPUTER_H
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+
+#include <stdbool.h>
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+/* ST7789 display - wired to SPI2; DC/RST/backlight are plain GPIOs.
+ * (Mirrors the CARDPUTER_GPIO_LCD_* pins documented in include/board.h.)
+ */
+
+#define DISPLAY_SPI    2
+#define DISPLAY_DC     34  /* Data/command */
+#define DISPLAY_RST    33  /* Reset */
+#define DISPLAY_BCKL   38  /* Backlight enable */
+
+/****************************************************************************
+ * Public Data
+ ****************************************************************************/
+
+#ifndef __ASSEMBLY__
+
+/****************************************************************************
+ * Public Function Prototypes
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: esp32s3_bringup
+ *
+ * Description:
+ *   Perform architecture-specific initialization.
+ *
+ *   CONFIG_BOARD_LATE_INITIALIZE=y :
+ *     Called from board_late_initialize().
+ *
+ * Returned Value:
+ *   Zero (OK) is returned on success; A negated errno value is returned on
+ *   any failure.
+ *
+ ****************************************************************************/
+
+int esp32s3_bringup(void);
+
+/****************************************************************************
+ * Name: board_i2c_init
+ *
+ * Description:
+ *   Configure the I2C driver(s) for the Grove port.
+ *
+ * Returned Value:
+ *   Zero (OK) is returned on success; A negated errno value is returned on
+ *   any failure.
+ *
+ ****************************************************************************/
+
+#ifdef CONFIG_I2C_DRIVER
+int board_i2c_init(void);
+#endif
+
+#endif /* __ASSEMBLY__ */
+#endif /* 
__BOARDS_XTENSA_ESP32S3_ESP32S3_M5_CARDPUTER_SRC_ESP32S3_M5_CARDPUTER_H */
diff --git 
a/boards/xtensa/esp32s3/esp32s3-m5-cardputer/src/esp32s3_board_lcd_st7789.c 
b/boards/xtensa/esp32s3/esp32s3-m5-cardputer/src/esp32s3_board_lcd_st7789.c
new file mode 100644
index 00000000000..6b163f8dd88
--- /dev/null
+++ b/boards/xtensa/esp32s3/esp32s3-m5-cardputer/src/esp32s3_board_lcd_st7789.c
@@ -0,0 +1,149 @@
+/****************************************************************************
+ * boards/xtensa/esp32s3/esp32s3-m5-cardputer/src/esp32s3_board_lcd_st7789.c
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+
+#include <stdbool.h>
+#include <nuttx/debug.h>
+#include <errno.h>
+
+#include <nuttx/arch.h>
+#include <nuttx/board.h>
+#include <nuttx/signal.h>
+#include <nuttx/spi/spi.h>
+#include <nuttx/lcd/lcd.h>
+#include <nuttx/lcd/st7789.h>
+
+#include <arch/board/board.h>
+
+#include "espressif/esp_gpio.h"
+#include "esp32s3_spi.h"
+
+#include "esp32s3-m5-cardputer.h"
+
+/****************************************************************************
+ * Private Data
+ ****************************************************************************/
+
+static struct spi_dev_s *g_spidev;
+static struct lcd_dev_s *g_lcd;
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name:  board_lcd_initialize
+ *
+ * Description:
+ *   Initialize the ST7789 LCD (1.14" 240x135) attached to SPI2.
+ *
+ * Returned Value:
+ *   Zero (OK) on success; a negated errno value on failure.
+ *
+ ****************************************************************************/
+
+int board_lcd_initialize(void)
+{
+  /* Initialize the non-SPI control GPIOs */
+
+  esp_configgpio(DISPLAY_DC, OUTPUT);
+  esp_configgpio(DISPLAY_RST, OUTPUT);
+  esp_configgpio(DISPLAY_BCKL, OUTPUT);
+
+  /* Reset the panel */
+
+  esp_gpiowrite(DISPLAY_RST, false);
+  nxsched_usleep(10 * 1000);
+  esp_gpiowrite(DISPLAY_RST, true);
+  nxsched_usleep(120 * 1000);
+
+  /* Turn on the backlight */
+
+  esp_gpiowrite(DISPLAY_BCKL, true);
+
+  g_spidev = esp32s3_spibus_initialize(DISPLAY_SPI);
+  if (!g_spidev)
+    {
+      lcderr("ERROR: Failed to initialize SPI port %d\n", DISPLAY_SPI);
+      return -ENODEV;
+    }
+
+  g_lcd = st7789_lcdinitialize(g_spidev);
+  if (!g_lcd)
+    {
+      lcderr("ERROR: st7789_lcdinitialize() failed\n");
+      return -ENODEV;
+    }
+
+  return OK;
+}
+
+/****************************************************************************
+ * Name:  board_lcd_getdev
+ *
+ * Description:
+ *   Return a reference to the LCD object for the specified LCD.
+ *
+ * Input Parameters:
+ *   devno - LCD device number
+ *
+ * Returned Value:
+ *   LCD device pointer if success or NULL if failed.
+ *
+ ****************************************************************************/
+
+struct lcd_dev_s *board_lcd_getdev(int devno)
+{
+  if (!g_lcd)
+    {
+      lcderr("ERROR: Failed to bind SPI port %d to LCD %d\n",
+             DISPLAY_SPI, devno);
+    }
+  else
+    {
+      lcdinfo("SPI port %d bound to LCD %d\n", DISPLAY_SPI, devno);
+      return g_lcd;
+    }
+
+  return NULL;
+}
+
+/****************************************************************************
+ * Name:  board_lcd_uninitialize
+ *
+ * Description:
+ *   Uninitialize the LCD support.
+ *
+ ****************************************************************************/
+
+void board_lcd_uninitialize(void)
+{
+  if (g_lcd)
+    {
+      g_lcd->setpower(g_lcd, 0);
+    }
+}
diff --git a/boards/xtensa/esp32s3/esp32s3-m5-cardputer/src/esp32s3_board_spi.c 
b/boards/xtensa/esp32s3/esp32s3-m5-cardputer/src/esp32s3_board_spi.c
new file mode 100644
index 00000000000..4bd10fcca08
--- /dev/null
+++ b/boards/xtensa/esp32s3/esp32s3-m5-cardputer/src/esp32s3_board_spi.c
@@ -0,0 +1,117 @@
+/****************************************************************************
+ * boards/xtensa/esp32s3/esp32s3-m5-cardputer/src/esp32s3_board_spi.c
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+
+#include <inttypes.h>
+#include <stdint.h>
+#include <stdbool.h>
+#include <nuttx/debug.h>
+
+#include <nuttx/spi/spi.h>
+
+#include "espressif/esp_gpio.h"
+#include "esp32s3-m5-cardputer.h"
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: esp32s3_spi2_status
+ *
+ * Description:
+ *   The ST7789 display is the only device on SPI2.
+ *
+ ****************************************************************************/
+
+#ifdef CONFIG_ESP32S3_SPI2
+
+uint8_t esp32s3_spi2_status(struct spi_dev_s *dev, uint32_t devid)
+{
+  uint8_t status = 0;
+
+  if (devid == SPIDEV_DISPLAY(0))
+    {
+      status |= SPI_STATUS_PRESENT;
+    }
+
+  return status;
+}
+
+#endif
+
+/****************************************************************************
+ * Name: esp32s3_spi2_cmddata
+ *
+ * Description:
+ *   Drive the ST7789 data/command (DC) line.
+ *
+ ****************************************************************************/
+
+#if defined(CONFIG_ESP32S3_SPI2) && defined(CONFIG_SPI_CMDDATA)
+
+int esp32s3_spi2_cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd)
+{
+  if (devid == SPIDEV_DISPLAY(0))
+    {
+      /* Low selects command, high selects data. */
+
+      esp_gpiowrite(DISPLAY_DC, !cmd);
+
+      return OK;
+    }
+
+  spiinfo("devid: %" PRIu32 " CMD: %s\n", devid, cmd ? "command" : "data");
+
+  return -ENODEV;
+}
+
+#endif
+
+/****************************************************************************
+ * Name: esp32s3_spi3_status
+ *
+ * Description:
+ *   The microSD card is the only device on SPI3.
+ *
+ ****************************************************************************/
+
+#ifdef CONFIG_ESP32S3_SPI3
+
+uint8_t esp32s3_spi3_status(struct spi_dev_s *dev, uint32_t devid)
+{
+  uint8_t status = 0;
+
+  if (devid == SPIDEV_MMCSD(0))
+    {
+      status |= SPI_STATUS_PRESENT;
+    }
+
+  return status;
+}
+
+#endif
diff --git a/boards/xtensa/esp32s3/esp32s3-m5-cardputer/src/esp32s3_boot.c 
b/boards/xtensa/esp32s3/esp32s3-m5-cardputer/src/esp32s3_boot.c
new file mode 100644
index 00000000000..1424c4dc4d4
--- /dev/null
+++ b/boards/xtensa/esp32s3/esp32s3-m5-cardputer/src/esp32s3_boot.c
@@ -0,0 +1,77 @@
+/****************************************************************************
+ * boards/xtensa/esp32s3/esp32s3-m5-cardputer/src/esp32s3_boot.c
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+
+#include <nuttx/debug.h>
+
+#include <nuttx/board.h>
+#include <nuttx/mm/mm.h>
+#include <arch/board/board.h>
+
+#include "esp32s3-m5-cardputer.h"
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: esp32s3_board_initialize
+ *
+ * Description:
+ *   All ESP32-S3 boards must provide the following entry point.
+ *   This entry point is called early in the initialization -- after all
+ *   memory has been configured and mapped but before any devices have been
+ *   initialized.
+ *
+ ****************************************************************************/
+
+void esp32s3_board_initialize(void)
+{
+}
+
+/****************************************************************************
+ * Name: board_late_initialize
+ *
+ * Description:
+ *   If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional
+ *   initialization call will be performed in the boot-up sequence to a
+ *   function called board_late_initialize().  board_late_initialize() will
+ *   be called immediately after up_initialize() is called and just before
+ *   the initial application is started.  This additional initialization
+ *   phase may be used, for example, to initialize board-specific device
+ *   drivers.
+ *
+ ****************************************************************************/
+
+#ifdef CONFIG_BOARD_LATE_INITIALIZE
+void board_late_initialize(void)
+{
+  /* Perform board-specific initialization */
+
+  esp32s3_bringup();
+}
+#endif
diff --git a/boards/xtensa/esp32s3/esp32s3-m5-cardputer/src/esp32s3_bringup.c 
b/boards/xtensa/esp32s3/esp32s3-m5-cardputer/src/esp32s3_bringup.c
new file mode 100644
index 00000000000..0d3f5c7afad
--- /dev/null
+++ b/boards/xtensa/esp32s3/esp32s3-m5-cardputer/src/esp32s3_bringup.c
@@ -0,0 +1,222 @@
+/****************************************************************************
+ * boards/xtensa/esp32s3/esp32s3-m5-cardputer/src/esp32s3_bringup.c
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+
+#include <syslog.h>
+#include <sys/types.h>
+#include <debug.h>
+
+#include <errno.h>
+#include <nuttx/fs/fs.h>
+#include <nuttx/board.h>
+#include <arch/board/board.h>
+
+#ifdef CONFIG_ESPRESSIF_WIFI
+#  include "esp32s3_board_wlan.h"
+#endif
+
+#ifdef CONFIG_ESPRESSIF_BLE
+#  include "esp32s3_ble.h"
+#endif
+
+#ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
+#  include "esp32s3_wifi_adapter.h"
+#endif
+
+#ifdef CONFIG_ESPRESSIF_HR_TIMER
+#  include "espressif/esp_hr_timer.h"
+#endif
+
+#ifdef CONFIG_ESP32S3_I2C
+#  include "esp32s3_i2c.h"
+#endif
+
+#ifdef CONFIG_VIDEO_FB
+#  include <nuttx/video/fb.h>
+#endif
+
+#ifdef CONFIG_LCD_DEV
+#  include <nuttx/lcd/lcd_dev.h>
+#endif
+
+#ifdef CONFIG_ESP32S3_SPI
+#  include "esp32s3_spi.h"
+#  include "esp32s3_board_spidev.h"
+#endif
+
+#if defined(CONFIG_ESP32S3_SDMMC) || defined(CONFIG_MMCSD_SPI)
+#  include "esp32s3_board_sdmmc.h"
+#endif
+
+#include "esp32s3-m5-cardputer.h"
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: esp32s3_bringup
+ *
+ * Description:
+ *   Perform architecture-specific initialization
+ *
+ *   CONFIG_BOARD_LATE_INITIALIZE=y :
+ *     Called from board_late_initialize().
+ *
+ ****************************************************************************/
+
+int esp32s3_bringup(void)
+{
+  int ret;
+
+  syslog(LOG_INFO, "esp32s3_bringup(): start.\n");
+
+#ifdef CONFIG_FS_PROCFS
+  /* Mount the procfs file system */
+
+  ret = nx_mount(NULL, "/proc", "procfs", 0, NULL);
+  if (ret < 0)
+    {
+      syslog(LOG_ERR, "ERROR: Failed to mount procfs at /proc: %d\n", ret);
+    }
+#endif
+
+#ifdef CONFIG_ESPRESSIF_HR_TIMER
+  /* Initialize the high-resolution timer subsystem.  The Wi-Fi stack relies
+   * on it (ets_timer / esp_timer) for scan and connection timeouts.
+   */
+
+  ret = esp_hr_timer_init();
+  if (ret < 0)
+    {
+      syslog(LOG_ERR, "ERROR: esp_hr_timer_init() failed: %d\n", ret);
+    }
+#endif
+
+#if defined(CONFIG_ESP32S3_SPI) && defined(CONFIG_SPI_DRIVER)
+  /* Register the microSD SPI bus as a generic SPI character device */
+
+#  ifdef CONFIG_ESP32S3_SPI2
+  ret = board_spidev_initialize(ESP32S3_SPI2);
+  if (ret < 0)
+    {
+      syslog(LOG_ERR, "ERROR: Failed to init spidev SPI2: %d\n", ret);
+    }
+#  endif
+
+#  ifdef CONFIG_ESP32S3_SPI3
+  ret = board_spidev_initialize(ESP32S3_SPI3);
+  if (ret < 0)
+    {
+      syslog(LOG_ERR, "ERROR: Failed to init spidev SPI3: %d\n", ret);
+    }
+#  endif
+#endif /* CONFIG_ESP32S3_SPI && CONFIG_SPI_DRIVER */
+
+#ifdef CONFIG_I2C_DRIVER
+  /* Configure the Grove I2C bus */
+
+  ret = board_i2c_init();
+  if (ret < 0)
+    {
+      syslog(LOG_ERR, "Failed to initialize I2C driver: %d\n", ret);
+    }
+#endif
+
+#ifdef CONFIG_ESPRESSIF_WIRELESS
+
+#  ifdef CONFIG_ESPRESSIF_WIFI_BT_COEXIST
+  ret = esp_wifi_bt_coexist_init();
+  if (ret)
+    {
+      syslog(LOG_ERR, "ERROR: Failed to initialize Wi-Fi and BT coexist\n");
+    }
+#  endif
+
+#  ifdef CONFIG_ESPRESSIF_BLE
+  ret = esp32s3_ble_initialize();
+  if (ret)
+    {
+      syslog(LOG_ERR, "ERROR: Failed to initialize BLE\n");
+    }
+#  endif
+
+#  ifdef CONFIG_ESPRESSIF_WIFI
+  ret = board_wlan_init();
+  if (ret < 0)
+    {
+      syslog(LOG_ERR, "ERROR: Failed to initialize wlan subsystem=%d\n",
+             ret);
+    }
+#  endif
+
+#endif /* CONFIG_ESPRESSIF_WIRELESS */
+
+#if defined(CONFIG_VIDEO_FB)
+  /* Initialize and register the framebuffer (backed by the ST7789 LCD) */
+
+  ret = fb_register(0, 0);
+  if (ret < 0)
+    {
+      syslog(LOG_ERR, "ERROR: Failed to initialize Frame Buffer Driver.\n");
+    }
+#elif defined(CONFIG_LCD)
+  ret = board_lcd_initialize();
+  if (ret < 0)
+    {
+      syslog(LOG_ERR, "ERROR: Failed to initialize LCD.\n");
+    }
+#endif
+
+#ifdef CONFIG_LCD_DEV
+  ret = lcddev_register(0);
+  if (ret < 0)
+    {
+      syslog(LOG_ERR, "ERROR: lcddev_register() failed: %d\n", ret);
+    }
+#endif
+
+#ifdef CONFIG_MMCSD_SPI
+  /* Mount the microSD card connected to the SPI3 bus */
+
+  ret = board_sdmmc_spi_initialize();
+  if (ret < 0)
+    {
+      syslog(LOG_ERR, "ERROR: Failed to initialize microSD: %d\n", ret);
+    }
+#endif
+
+  /* If we got here then perhaps not all initialization was successful, but
+   * at least enough succeeded to bring-up NSH with perhaps reduced
+   * capabilities.
+   */
+
+  syslog(LOG_INFO, "esp32s3_bringup(): end.\n");
+
+  UNUSED(ret);
+  return OK;
+}
diff --git a/boards/xtensa/esp32s3/esp32s3-m5-cardputer/src/esp32s3_reset.c 
b/boards/xtensa/esp32s3/esp32s3-m5-cardputer/src/esp32s3_reset.c
new file mode 100644
index 00000000000..282f8f2a27a
--- /dev/null
+++ b/boards/xtensa/esp32s3/esp32s3-m5-cardputer/src/esp32s3_reset.c
@@ -0,0 +1,87 @@
+/****************************************************************************
+ * boards/xtensa/esp32s3/esp32s3-m5-cardputer/src/esp32s3_reset.c
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+
+#include <stdlib.h>
+#include <nuttx/debug.h>
+#include <assert.h>
+#include <nuttx/arch.h>
+#include <nuttx/board.h>
+
+#include "esp32s3_systemreset.h"
+
+#ifdef CONFIG_BOARDCTL_RESET
+
+#if CONFIG_BOARD_ASSERT_RESET_VALUE == EXIT_SUCCESS
+#  error "CONFIG_BOARD_ASSERT_RESET_VALUE must not be equal to EXIT_SUCCESS"
+#endif
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: board_reset
+ *
+ * Description:
+ *   Reset board.  Support for this function is required by board-level
+ *   logic if CONFIG_BOARDCTL_RESET is selected.
+ *
+ * Input Parameters:
+ *   status - Status information provided with the reset event.  This
+ *            meaning of this status information is board-specific.  If not
+ *            used by a board, the value zero may be provided in calls to
+ *            board_reset().
+ *
+ * Returned Value:
+ *   If this function returns, then it was not possible to power-off the
+ *   board due to some constraints.  The return value in this case is a
+ *   board-specific reason for the failure to shutdown.
+ *
+ ****************************************************************************/
+
+int board_reset(int status)
+{
+  syslog(LOG_INFO, "reboot status=%d\n", status);
+
+  switch (status)
+    {
+      case EXIT_SUCCESS:
+        up_shutdown_handler();
+        break;
+      case CONFIG_BOARD_ASSERT_RESET_VALUE:
+        break;
+      default:
+        break;
+    }
+
+  up_systemreset();
+
+  return 0;
+}
+
+#endif /* CONFIG_BOARDCTL_RESET */

Reply via email to