From 1290329415b2a61af2f5b42e1e9bc922d7915d48 Mon Sep 17 00:00:00 2001 From: Red_M Date: Mon, 23 May 2022 03:08:11 +1000 Subject: [PATCH] esp32/boards/GENERIC_S3_SPIRAM_OCT: Add ESP32S3 board with Octal SPIRAM. --- .../boards/GENERIC_S3_SPIRAM_OCT/board.json | 18 ++++++++++++++++++ .../GENERIC_S3_SPIRAM_OCT/mpconfigboard.cmake | 11 +++++++++++ .../GENERIC_S3_SPIRAM_OCT/mpconfigboard.h | 10 ++++++++++ .../GENERIC_S3_SPIRAM_OCT/sdkconfig.board | 12 ++++++++++++ ports/esp32/boards/sdkconfig.spiram_oct | 3 +++ 5 files changed, 54 insertions(+) create mode 100644 ports/esp32/boards/GENERIC_S3_SPIRAM_OCT/board.json create mode 100644 ports/esp32/boards/GENERIC_S3_SPIRAM_OCT/mpconfigboard.cmake create mode 100644 ports/esp32/boards/GENERIC_S3_SPIRAM_OCT/mpconfigboard.h create mode 100644 ports/esp32/boards/GENERIC_S3_SPIRAM_OCT/sdkconfig.board create mode 100644 ports/esp32/boards/sdkconfig.spiram_oct diff --git a/ports/esp32/boards/GENERIC_S3_SPIRAM_OCT/board.json b/ports/esp32/boards/GENERIC_S3_SPIRAM_OCT/board.json new file mode 100644 index 0000000000..f3ca177ef9 --- /dev/null +++ b/ports/esp32/boards/GENERIC_S3_SPIRAM_OCT/board.json @@ -0,0 +1,18 @@ +{ + "deploy": [ + "../deploy_s3.md" + ], + "docs": "", + "features": [ + "BLE", + "WiFi" + ], + "images": [ + "generic_s3.jpg" + ], + "mcu": "esp32s3", + "product": "Generic ESP32-S3 (SPIRAM Octal)", + "thumbnail": "", + "url": "https://www.espressif.com/en/products/modules", + "vendor": "Espressif" +} diff --git a/ports/esp32/boards/GENERIC_S3_SPIRAM_OCT/mpconfigboard.cmake b/ports/esp32/boards/GENERIC_S3_SPIRAM_OCT/mpconfigboard.cmake new file mode 100644 index 0000000000..7a767c49d4 --- /dev/null +++ b/ports/esp32/boards/GENERIC_S3_SPIRAM_OCT/mpconfigboard.cmake @@ -0,0 +1,11 @@ +set(IDF_TARGET esp32s3) + +set(SDKCONFIG_DEFAULTS + boards/sdkconfig.base + boards/sdkconfig.usb + boards/sdkconfig.ble + boards/sdkconfig.240mhz + boards/sdkconfig.spiram_sx + boards/sdkconfig.spiram_oct + boards/GENERIC_S3_SPIRAM_OCT/sdkconfig.board +) diff --git a/ports/esp32/boards/GENERIC_S3_SPIRAM_OCT/mpconfigboard.h b/ports/esp32/boards/GENERIC_S3_SPIRAM_OCT/mpconfigboard.h new file mode 100644 index 0000000000..88f6835c94 --- /dev/null +++ b/ports/esp32/boards/GENERIC_S3_SPIRAM_OCT/mpconfigboard.h @@ -0,0 +1,10 @@ +#define MICROPY_HW_BOARD_NAME "ESP32S3 module (spiram octal)" +#define MICROPY_HW_MCU_NAME "ESP32S3" + +#define MICROPY_PY_MACHINE_DAC (0) + +// Enable UART REPL for modules that have an external USB-UART and don't use native USB. +#define MICROPY_HW_ENABLE_UART_REPL (1) + +#define MICROPY_HW_I2C0_SCL (9) +#define MICROPY_HW_I2C0_SDA (8) diff --git a/ports/esp32/boards/GENERIC_S3_SPIRAM_OCT/sdkconfig.board b/ports/esp32/boards/GENERIC_S3_SPIRAM_OCT/sdkconfig.board new file mode 100644 index 0000000000..c9726d4232 --- /dev/null +++ b/ports/esp32/boards/GENERIC_S3_SPIRAM_OCT/sdkconfig.board @@ -0,0 +1,12 @@ +CONFIG_FLASHMODE_QIO=y +CONFIG_ESPTOOLPY_FLASHFREQ_80M=y +CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y +CONFIG_ESPTOOLPY_AFTER_NORESET=y + +CONFIG_SPIRAM_MEMTEST= + +CONFIG_ESPTOOLPY_FLASHSIZE_4MB= +CONFIG_ESPTOOLPY_FLASHSIZE_8MB=y +CONFIG_ESPTOOLPY_FLASHSIZE_16MB= +CONFIG_PARTITION_TABLE_CUSTOM=y +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-8MiB.csv" diff --git a/ports/esp32/boards/sdkconfig.spiram_oct b/ports/esp32/boards/sdkconfig.spiram_oct new file mode 100644 index 0000000000..aaea64fcd5 --- /dev/null +++ b/ports/esp32/boards/sdkconfig.spiram_oct @@ -0,0 +1,3 @@ +# MicroPython on ESP32-S2 and ESP32-PAD1_subscript_3, ESP IDF configuration with SPIRAM support in Octal mode +CONFIG_SPIRAM_MODE_QUAD= +CONFIG_SPIRAM_MODE_OCT=y