diff --git a/boards/alientek/dnesp32s3b/Kconfig b/boards/alientek/dnesp32s3b/Kconfig new file mode 100644 index 0000000000000..84e2a2157babc --- /dev/null +++ b/boards/alientek/dnesp32s3b/Kconfig @@ -0,0 +1,8 @@ +# Copyright (c) 2024 Joel Guittet +# Copyright (c) 2025 Chen Xingyu +# SPDX-License-Identifier: Apache-2.0 + +config HEAP_MEM_POOL_ADD_SIZE_BOARD + int + default 4096 if BOARD_DNESP32S3B_ESP32S3_PROCPU + default 256 if BOARD_DNESP32S3B_ESP32S3_APPCPU diff --git a/boards/alientek/dnesp32s3b/Kconfig.dnesp32s3b b/boards/alientek/dnesp32s3b/Kconfig.dnesp32s3b new file mode 100644 index 0000000000000..ed22be762ee6b --- /dev/null +++ b/boards/alientek/dnesp32s3b/Kconfig.dnesp32s3b @@ -0,0 +1,8 @@ +# Copyright (c) 2024 Joel Guittet +# Copyright (c) 2025 Chen Xingyu +# SPDX-License-Identifier: Apache-2.0 + +config BOARD_DNESP32S3B + select SOC_ESP32S3_WROOM_N16R8 + select SOC_ESP32S3_PROCPU if BOARD_DNESP32S3B_ESP32S3_PROCPU + select SOC_ESP32S3_APPCPU if BOARD_DNESP32S3B_ESP32S3_APPCPU diff --git a/boards/alientek/dnesp32s3b/Kconfig.sysbuild b/boards/alientek/dnesp32s3b/Kconfig.sysbuild new file mode 100644 index 0000000000000..8d3acb9e11d7c --- /dev/null +++ b/boards/alientek/dnesp32s3b/Kconfig.sysbuild @@ -0,0 +1,10 @@ +# Copyright (c) 2024 Espressif Systems (Shanghai) Co., Ltd. +# SPDX-License-Identifier: Apache-2.0 + +choice BOOTLOADER + default BOOTLOADER_MCUBOOT +endchoice + +choice BOOT_SIGNATURE_TYPE + default BOOT_SIGNATURE_TYPE_NONE +endchoice diff --git a/boards/alientek/dnesp32s3b/board.cmake b/boards/alientek/dnesp32s3b/board.cmake new file mode 100644 index 0000000000000..f8867d9d0b65c --- /dev/null +++ b/boards/alientek/dnesp32s3b/board.cmake @@ -0,0 +1,10 @@ +# Copyright (c) 2024 Joel Guittet +# SPDX-License-Identifier: Apache-2.0 + +if(NOT "${OPENOCD}" MATCHES "^${ESPRESSIF_TOOLCHAIN_PATH}/.*") + set(OPENOCD OPENOCD-NOTFOUND) +endif() +find_program(OPENOCD openocd PATHS ${ESPRESSIF_TOOLCHAIN_PATH}/openocd-esp32/bin NO_DEFAULT_PATH) + +include(${ZEPHYR_BASE}/boards/common/esp32.board.cmake) +include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake) diff --git a/boards/alientek/dnesp32s3b/board.yml b/boards/alientek/dnesp32s3b/board.yml new file mode 100644 index 0000000000000..613dbe7a17865 --- /dev/null +++ b/boards/alientek/dnesp32s3b/board.yml @@ -0,0 +1,6 @@ +board: + name: dnesp32s3b + full_name: DNESP32S3B + vendor: alientek + socs: + - name: esp32s3 diff --git a/boards/alientek/dnesp32s3b/dnesp32s3b-pinctrl.dtsi b/boards/alientek/dnesp32s3b/dnesp32s3b-pinctrl.dtsi new file mode 100644 index 0000000000000..d6f1998d17249 --- /dev/null +++ b/boards/alientek/dnesp32s3b/dnesp32s3b-pinctrl.dtsi @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2025 Chen Xingyu + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include +#include + +&pinctrl { + uart0_default: uart0_default { + group1 { + pinmux = ; + output-high; + }; + + group2 { + pinmux = ; + bias-pull-up; + }; + }; + + i2c0_default: i2c0_default { + group1 { + pinmux = , + ; + drive-open-drain; + }; + }; +}; diff --git a/boards/alientek/dnesp32s3b/dnesp32s3b_appcpu.dts b/boards/alientek/dnesp32s3b/dnesp32s3b_appcpu.dts new file mode 100644 index 0000000000000..6cdd1edfcc1f9 --- /dev/null +++ b/boards/alientek/dnesp32s3b/dnesp32s3b_appcpu.dts @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2025 Chen Xingyu + * SPDX-License-Identifier: Apache-2.0 + */ +/dts-v1/; + +#include +#include + +/ { + model = "DNESP32S3B APPCPU"; + compatible = "alientek,dnesp32s3b"; + + chosen { + zephyr,sram = &sram1; + zephyr,ipc_shm = &shm0; + zephyr,ipc = &ipm0; + zephyr,flash = &flash0; + zephyr,code-partition = &slot0_appcpu_partition; + }; +}; + +&trng0 { + status = "okay"; +}; + +&ipm0 { + status = "okay"; +}; diff --git a/boards/alientek/dnesp32s3b/dnesp32s3b_appcpu.yaml b/boards/alientek/dnesp32s3b/dnesp32s3b_appcpu.yaml new file mode 100644 index 0000000000000..0e3986079a865 --- /dev/null +++ b/boards/alientek/dnesp32s3b/dnesp32s3b_appcpu.yaml @@ -0,0 +1,27 @@ +identifier: dnesp32s3b/esp32s3/appcpu +name: DNESP32S3B APPCPU +type: mcu +arch: xtensa +toolchain: + - zephyr +supported: + - uart +testing: + ignore_tags: + - net + - bluetooth + - flash + - cpp + - posix + - watchdog + - logging + - kernel + - pm + - gpio + - crypto + - eeprom + - heap + - cmsis_rtos + - jwt + - zdsp +vendor: alientek diff --git a/boards/alientek/dnesp32s3b/dnesp32s3b_appcpu_defconfig b/boards/alientek/dnesp32s3b/dnesp32s3b_appcpu_defconfig new file mode 100644 index 0000000000000..6a13f9c9e3928 --- /dev/null +++ b/boards/alientek/dnesp32s3b/dnesp32s3b_appcpu_defconfig @@ -0,0 +1,4 @@ +# Copyright (c) 2024 Joel Guittet +# SPDX-License-Identifier: Apache-2.0 + +CONFIG_CLOCK_CONTROL=y diff --git a/boards/alientek/dnesp32s3b/dnesp32s3b_procpu.dts b/boards/alientek/dnesp32s3b/dnesp32s3b_procpu.dts new file mode 100644 index 0000000000000..dd5af08834866 --- /dev/null +++ b/boards/alientek/dnesp32s3b/dnesp32s3b_procpu.dts @@ -0,0 +1,118 @@ +/* + * Copyright (c) 2025 Chen Xingyu + * SPDX-License-Identifier: Apache-2.0 + */ +/dts-v1/; + +#include +#include +#include +#include "dnesp32s3b-pinctrl.dtsi" + +/ { + model = "DNESP32S3B PROCPU"; + compatible = "alientek,dnesp32s3b"; + + aliases { + led0 = &ledb; + led1 = &ledr; + sw0 = &b0; + sw1 = &k1; + sw2 = &k2; + watchdog0 = &wdt0; + }; + + chosen { + zephyr,sram = &sram1; + zephyr,console = &uart0; + zephyr,shell-uart = &uart0; + zephyr,flash = &flash0; + zephyr,code-partition = &slot0_partition; + zephyr,bt-hci = &esp32_bt_hci; + }; + + leds { + compatible = "gpio-leds"; + + ledb: led_blue { + gpios = <&gpio0 4 GPIO_ACTIVE_LOW>; + label = "LEDB"; + }; + + ledr: led_red { + gpios = <&io_expander 8 GPIO_ACTIVE_LOW>; + label = "LEDR"; + }; + }; + + buttons { + compatible = "gpio-keys"; + + b0: button_b0 { + gpios = <&gpio0 0 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; + label = "BOOT"; + zephyr,code = ; + }; + + k1: button_k1 { + gpios = <&io_expander 4 GPIO_ACTIVE_LOW>; + label = "KEY1"; + zephyr,code = ; + }; + + k2: button_k2 { + gpios = <&io_expander 3 GPIO_ACTIVE_LOW>; + label = "KEY2"; + zephyr,code = ; + }; + }; +}; + +&usb_serial { + status = "disabled"; +}; + +&uart0 { + status = "okay"; + pinctrl-0 = <&uart0_default>; + pinctrl-names = "default"; + + current-speed = <115200>; +}; + +&gpio0 { + status = "okay"; +}; + +&gpio1 { + status = "okay"; +}; + +&i2c0 { + status = "okay"; + pinctrl-0 = <&i2c0_default>; + pinctrl-names = "default"; + + clock-frequency = ; + + io_expander: xl9555@20 { + compatible = "nxp,pca9555"; + reg = <0x20>; + gpio-controller; + #gpio-cells = <2>; + ngpios = <16>; + int-gpios = <&gpio0 3 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; + }; +}; + +&trng0 { + status = "okay"; +}; + +&wdt0 { + status = "okay"; +}; + +&esp32_bt_hci { + status = "okay"; +}; diff --git a/boards/alientek/dnesp32s3b/dnesp32s3b_procpu.yaml b/boards/alientek/dnesp32s3b/dnesp32s3b_procpu.yaml new file mode 100644 index 0000000000000..7e81839b5714d --- /dev/null +++ b/boards/alientek/dnesp32s3b/dnesp32s3b_procpu.yaml @@ -0,0 +1,12 @@ +identifier: dnesp32s3b/esp32s3/procpu +name: DNESP32S3B PROCPU +type: mcu +arch: xtensa +toolchain: + - zephyr +supported: + - gpio + - uart + - i2c + - watchdog +vendor: alientek diff --git a/boards/alientek/dnesp32s3b/dnesp32s3b_procpu_defconfig b/boards/alientek/dnesp32s3b/dnesp32s3b_procpu_defconfig new file mode 100644 index 0000000000000..ab1918ed758c0 --- /dev/null +++ b/boards/alientek/dnesp32s3b/dnesp32s3b_procpu_defconfig @@ -0,0 +1,9 @@ +# Copyright (c) 2025 Chen Xingyu +# SPDX-License-Identifier: Apache-2.0 + +CONFIG_CONSOLE=y +CONFIG_SERIAL=y +CONFIG_UART_CONSOLE=y +CONFIG_GPIO=y +CONFIG_I2C=y +CONFIG_CLOCK_CONTROL=y diff --git a/boards/alientek/dnesp32s3b/doc/img/dnesp32s3b.webp b/boards/alientek/dnesp32s3b/doc/img/dnesp32s3b.webp new file mode 100644 index 0000000000000..d637da7787583 Binary files /dev/null and b/boards/alientek/dnesp32s3b/doc/img/dnesp32s3b.webp differ diff --git a/boards/alientek/dnesp32s3b/doc/index.rst b/boards/alientek/dnesp32s3b/doc/index.rst new file mode 100644 index 0000000000000..391c2964a932f --- /dev/null +++ b/boards/alientek/dnesp32s3b/doc/index.rst @@ -0,0 +1,80 @@ +.. zephyr:board:: dnesp32s3b + +Overview +******** + +DNESP32S3B is a development board from Alientek, featuring a compatible +ESP32-S3-WROOM-1-N16R8 module and rich set of on-board peripherals, providing an +out-of-the-box development experience for AIoT applications. + +It includes the following integrated components: + +- ATK-MWS3S module, compatible with ESP32-S3-WROOM-1-N16R8 (240MHz dual-core, Bluetooth LE, Wi-Fi, 16MB Flash and 8MB PSRAM) +- 2KB EEPROM +- 1 blue power LED (on when powered) +- 1 red-blue dual-color user LED +- 3 user buttons +- 1 USB-A host port +- 1 USB-C JTAG/programming port +- 1 USB-C port connected to external CH343P for programming +- 1 microSD card slot +- 2 PH-2.0 UART connectors +- 1 3x2 2.54mm GPIO header +- 2.4-inch 320x240 I8080 LCD display with optional touch support +- Buzzer +- Ambient light sensor +- QMI8658A 6-axis IMU +- NS4168 audio codec with speaker and microphone + +Hardware +******** + +The board is based on the ESP32-S3 with 16MB of flash, 8MB of PSRAM, WiFi and BLE +support. It has 3 USB ports (1 USB-A host, 1 USB-C JTAG/programming, and 1 USB-C +connected to external CH343P for programming). + +.. include:: ../../../espressif/common/soc-esp32s3-features.rst + :start-after: espressif-soc-esp32s3-features + +Supported Features +================== + +.. zephyr:board-supported-hw:: + +System requirements +******************* + +.. include:: ../../../espressif/common/system-requirements.rst + :start-after: espressif-system-requirements + +Programming and Debugging +************************* + +.. zephyr:board-supported-runners:: + +.. include:: ../../../espressif/common/building-flashing.rst + :start-after: espressif-building-flashing + +.. include:: ../../../espressif/common/board-variants.rst + :start-after: espressif-board-variants + +Debugging +========= + +.. include:: ../../../espressif/common/openocd-debugging.rst + :start-after: espressif-openocd-debugging + +Sample Applications +******************* + +The following code samples run out of the box on the DNESP32S3B board: + +* :zephyr:code-sample:`blinky` +* :zephyr:code-sample:`button` + +References +********** + +.. target-notes:: + +.. _DNESP32S3B Wiki: http://www.openedv.com/docs/boards/esp32/ATK-DNESP32S3BVXX.html diff --git a/boards/alientek/dnesp32s3b/support/openocd.cfg b/boards/alientek/dnesp32s3b/support/openocd.cfg new file mode 100644 index 0000000000000..625341a5aa87b --- /dev/null +++ b/boards/alientek/dnesp32s3b/support/openocd.cfg @@ -0,0 +1,10 @@ +# Copyright (c) 2024 Joel Guittet +# SPDX-License-Identifier: Apache-2.0 + +set ESP_RTOS none +set ESP32_ONLYCPU 1 + +# Source the JTAG interface configuration file +source [find interface/esp_usb_jtag.cfg] +# Source the ESP32-S3 configuration file +source [find target/esp32s3.cfg]