8000 ports/esp32: Add support for 2 new BPI boards. by Wind-stormger · Pull Request #8532 · micropython/micropython · GitHub
[go: up one dir, main page]

Skip to content

ports/esp32: Add support for 2 new BPI boards. #8532

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions ports/esp32/boards/BPI_LEAF_S2/board.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"deploy": [
"../deploy_s2.md"
],
"docs": "",
"features": [
"Battery Charging",
"RGB LED",
"USB-C",
"SPIRAM",
"WiFi"
],
"images": [
"bpi_leaf_s2.jpg"
],
"mcu": "esp32s2",
"product": "BPI-Leaf-S2",
"thumbnail": "",
"url": "https://banana-pi.org/",
"vendor": "Banana Pi"
}
8 changes: 8 additions & 0 deletions ports/esp32/boards/BPI_LEAF_S2/mpconfigboard.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
set(IDF_TARGET esp32s2)

set(SDKCONFIG_DEFAULTS
boards/sdkconfig.base
boards/sdkconfig.spiram_sx
boards/sdkconfig.usb
boards/BPI_LEAF_S2/sdkconfig.board
)
8 changes: 8 additions & 0 deletions ports/esp32/boards/BPI_LEAF_S2/mpconfigboard.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#define MICROPY_HW_BOARD_NAME "BPI-Leaf-S2"
#define MICROPY_HW_MCU_NAME "ESP32-S2"

#define MICROPY_PY_BLUETOOTH (0)
#define MICROPY_HW_ENABLE_SDCARD (0)

#define MICROPY_HW_I2C0_SCL (9)
#define MICROPY_HW_I2C0_SDA (8)
19 changes: 19 additions & 0 deletions ports/esp32/boards/BPI_LEAF_S2/sdkconfig.board
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
CONFIG_ESP32S2_DEFAULT_CPU_FREQ_240=y

CONFIG_FLASHMODE_QIO=y
CONFIG_ESPTOOLPY_FLASHFREQ_80M=y
CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y
CONFIG_ESPTOOLPY_AFTER_NORESET=y

CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
CONFIG_USB_AND_UART=y

CONFIG_LWIP_LOCAL_HOSTNAME="BPI-Leaf-S2"

# CONFIG_TINYUSB_DESC_USE_ESPRESSIF_VID is not set
CONFIG_TINYUSB_DESC_CUSTOM_VID=0x303A
# CONFIG_TINYUSB_DESC_USE_DEFAULT_PID is not set
CONFIG_TINYUSB_DESC_CUSTOM_PID=0x80E3
CONFIG_TINYUSB_DESC_BCD_DEVICE=0x0100
CONFIG_TINYUSB_DESC_MANUFACTURER_STRING="Banana Pi"
CONFIG_TINYUSB_DESC_PRODUCT_STRING="BPI-Leaf-S2 Device"
22 changes: 22 additions & 0 deletions ports/esp32/boards/BPI_LEAF_S3/board.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"deploy": [
"../deploy_s3.md"
],
"docs": "",
"features": [
"Battery Charging",
"RGB LED",
"SPIRAM",
"USB-C",
"BLE",
"WiFi"
],
"images": [
"bpi_leaf_s3.jpg"
],
"mcu": "esp32s3",
"product": "BPI-Leaf-S3",
"thumbnail": "",
"url": "https://banana-pi.org/",
"vendor": "Banana Pi"
}
8 changes: 8 additions & 0 deletions ports/esp32/boards/BPI_LEAF_S3/mpconfigboard.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
set(IDF_TARGET esp32s3)

set(SDKCONFIG_DEFAULTS
boards/sdkconfig.base
boards/sdkconfig.usb
boards/sdkconfig.spiram_sx
boards/BPI_LEAF_S3/sdkconfig.board
)
8 changes: 8 additions & 0 deletions ports/esp32/boards/BPI_LEAF_S3/mpconfigboard.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#define MICROPY_HW_BOARD_NAME "BPI-Leaf-S3"
#define MICROPY_HW_MCU_NAME "ESP32-S3"

#define MICROPY_PY_BLUETOOTH (0)
#define MICROPY_PY_MACHINE_DAC (0)

#define MICROPY_HW_I2C0_SCL (16)
#define MICROPY_HW_I2C0_SDA (15)
24 changes: 24 additions & 0 deletions ports/esp32/boards/BPI_LEAF_S3/sdkconfig.board
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240=y

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"

CONFIG_LWIP_LOCAL_HOSTNAME="BPI-Leaf-S3"

# CONFIG_TINYUSB_DESC_USE_ESPRESSIF_VID is not set
CONFIG_TINYUSB_DESC_CUSTOM_VID=0x303A
# CONFIG_TINYUSB_DESC_USE_DEFAULT_PID is not set
CONFIG_TINYUSB_DESC_CUSTOM_PID=0x80E0
CONFIG_TINYUSB_DESC_BCD_DEVICE=0x0100
CONFIG_TINYUSB_DESC_MANUFACTURER_STRING="Banana Pi"
CONFIG_TINYUSB_DESC_PRODUCT_STRING="BPI-Leaf-S3 Device"
0