From 5caf2d3f9ae16eda5649ca577a5f0dbc66b710bd Mon Sep 17 00:00:00 2001 From: MartinMueller2003 Date: Wed, 17 Jan 2024 15:49:24 -0500 Subject: [PATCH] Added support for Bongo69 platform --- ESPixelStick/src/GPIO_Defs.hpp | 2 + .../GPIO_Defs_ESP32_Bongo69.hpp | 93 +++++++++++++++++++ dist/firmware/firmware.json | 35 +++++++ platformio.ini | 12 ++- 4 files changed, 141 insertions(+), 1 deletion(-) create mode 100644 ESPixelStick/src/platformDefinitions/GPIO_Defs_ESP32_Bongo69.hpp diff --git a/ESPixelStick/src/GPIO_Defs.hpp b/ESPixelStick/src/GPIO_Defs.hpp index f80939a8b..9c28fcb64 100644 --- a/ESPixelStick/src/GPIO_Defs.hpp +++ b/ESPixelStick/src/GPIO_Defs.hpp @@ -112,6 +112,8 @@ typedef enum # include "platformDefinitions/GPIO_Defs_ESP32_QUINLED_UNO_ETH_ESPSV3.hpp" #elif defined (BOARD_ESP32_TTGO_T8) # include "platformDefinitions/GPIO_Defs_ESP32_TTGO_T8.hpp" +#elif defined (BOARD_ESP32_BONGO69) +# include "platformDefinitions/GPIO_Defs_ESP32_Bongo69.hpp" #elif defined (BOARD_ESP32_WT32ETH01) # include "platformDefinitions/GPIO_Defs_ESP32_WT32ETH01.hpp" #elif defined (BOARD_ESP32_WT32ETH01_WASATCH) diff --git a/ESPixelStick/src/platformDefinitions/GPIO_Defs_ESP32_Bongo69.hpp b/ESPixelStick/src/platformDefinitions/GPIO_Defs_ESP32_Bongo69.hpp new file mode 100644 index 000000000..6a1ba09c7 --- /dev/null +++ b/ESPixelStick/src/platformDefinitions/GPIO_Defs_ESP32_Bongo69.hpp @@ -0,0 +1,93 @@ +#pragma once +/* +* GPIO_Defs_ESP32_Bongo69.hpp - Output Management class +* +* Project: ESPixelStick - An ESP8266 / ESP32 and E1.31 based pixel driver +* Copyright (c) 2021 Shelby Merrick +* http://www.forkineye.com +* +* This program is provided free for you to use in any way that you wish, +* subject to the laws and regulations where you are using it. Due diligence +* is strongly suggested before using this code. Please give credit where due. +* +* The Author makes no warranty of any kind, express or implied, with regard +* to this program or the documentation contained in this document. The +* Author shall not be liable in any event for incidental or consequential +* damages in connection with, or arising out of, the furnishing, performance +* or use of these programs. +* +*/ + +#define SUPPORT_ETHERNET + +//Output Manager +#define DEFAULT_RMT_0_GPIO gpio_num_t::GPIO_NUM_1 +#define DEFAULT_RMT_1_GPIO gpio_num_t::GPIO_NUM_2 +#define DEFAULT_RMT_2_GPIO gpio_num_t::GPIO_NUM_3 +#define DEFAULT_RMT_3_GPIO gpio_num_t::GPIO_NUM_4 +#define DEFAULT_RMT_4_GPIO gpio_num_t::GPIO_NUM_5 +#define DEFAULT_RMT_5_GPIO gpio_num_t::GPIO_NUM_12 +#define DEFAULT_RMT_6_GPIO gpio_num_t::GPIO_NUM_14 +#define DEFAULT_RMT_7_GPIO gpio_num_t::GPIO_NUM_15 + +// # define SUPPORT_SPI_OUTPUT +// #define DEFAULT_SPI_DATA_GPIO gpio_num_t::GPIO_NUM_15 +// #define DEFAULT_SPI_CLOCK_GPIO gpio_num_t::GPIO_NUM_25 + +#define DEFAULT_I2C_SDA gpio_num_t::GPIO_NUM_21 +#define DEFAULT_I2C_SCL gpio_num_t::GPIO_NUM_22 + +// File Manager +// #define SUPPORT_SD +#define SD_CARD_MISO_PIN gpio_num_t::GPIO_NUM_12 +#define SD_CARD_MOSI_PIN gpio_num_t::GPIO_NUM_13 +#define SD_CARD_CLK_PIN gpio_num_t::GPIO_NUM_14 +#define SD_CARD_CS_PIN gpio_num_t::GPIO_NUM_15 + +#include + + +/* + * ETH_CLOCK_GPIO0_IN - default: external clock from crystal oscillator + * ETH_CLOCK_GPIO0_OUT - 50MHz clock from internal APLL output on GPIO0 - possibly an inverter is needed for LAN8720 + * ETH_CLOCK_GPIO16_OUT - 50MHz clock from internal APLL output on GPIO16 - possibly an inverter is needed for LAN8720 + * ETH_CLOCK_GPIO17_OUT - 50MHz clock from internal APLL inverted output on GPIO17 - tested with LAN8720 +*/ +#define DEFAULT_ETH_CLK_MODE eth_clock_mode_t::ETH_CLOCK_GPIO17_OUT + +// Pin# of the enable signal for the external crystal oscillator (-1 to disable for internal APLL source) +#define DEFAULT_ETH_POWER_PIN gpio_num_t::GPIO_NUM_16 +#define ETH_POWER_PIN DEFAULT_ETH_POWER_PIN +#define DEFAULT_ETH_POWER_PIN_ACTIVE HIGH + +// Type of the Ethernet PHY (LAN8720 or TLK110) +#define DEFAULT_ETH_TYPE eth_phy_type_t::ETH_PHY_LAN8720 + +// I2C-address of Ethernet PHY (0 or 1 for LAN8720, 31 for TLK110) +#define ETH_ADDR_PHY_LAN8720 1 + +#define DEFAULT_ETH_ADDR ETH_ADDR_PHY_LAN8720 +#define DEFAULT_ETH_TXEN gpio_num_t::GPIO_NUM_21 +#define DEFAULT_ETH_TXD0 gpio_num_t::GPIO_NUM_19 +#define DEFAULT_ETH_TXD1 gpio_num_t::GPIO_NUM_22 +#define DEFAULT_ETH_CRSDV gpio_num_t::GPIO_NUM_27 +#define DEFAULT_ETH_RXD0 gpio_num_t::GPIO_NUM_25 +#define DEFAULT_ETH_RXD1 gpio_num_t::GPIO_NUM_26 +#define DEFAULT_ETH_MDC_PIN gpio_num_t::GPIO_NUM_23 +#define DEFAULT_ETH_MDIO_PIN gpio_num_t::GPIO_NUM_18 + +// Output Types +// Not Finished - #define SUPPORT_OutputType_TLS3001 +// #define SUPPORT_OutputType_APA102 // SPI +#define SUPPORT_OutputType_DMX // UART +#define SUPPORT_OutputType_GECE // UART +#define SUPPORT_OutputType_GS8208 // UART / RMT +#define SUPPORT_OutputType_Renard // UART +#define SUPPORT_OutputType_Serial // UART +#define SUPPORT_OutputType_TM1814 // UART / RMT +#define SUPPORT_OutputType_UCS1903 // UART / RMT +#define SUPPORT_OutputType_UCS8903 // UART / RMT +// #define SUPPORT_OutputType_WS2801 // SPI +#define SUPPORT_OutputType_WS2811 // UART / RMT +#define SUPPORT_OutputType_Relay // GPIO +// #define SUPPORT_OutputType_Servo_PCA9685 // I2C (default pins) diff --git a/dist/firmware/firmware.json b/dist/firmware/firmware.json index 2fb0e87bf..8549998d1 100644 --- a/dist/firmware/firmware.json +++ b/dist/firmware/firmware.json @@ -339,6 +339,41 @@ "offset": "0x3B0000" } }, + { + "name": "ESP32 BONGO 69", + "description": "ESP32 8 port eth controller", + "chip": "esp32", + "appbin": "esp32/esp32_bongo69-app.bin", + "esptool": { + "baudrate": "460800", + "options": "--before default_reset --after hard_reset", + "flashcmd": "write_flash -z" + }, + "binfiles": [ + { + "name": "esp32/esp32_bongo69-bootloader.bin", + "offset": "0x1000" + }, + { + "name": "esp32/esp32_bongo-partitions.bin", + "offset": "0x8000" + }, + { + "name": "esp32/boot_app0.bin", + "offset": "0xe000" + }, + { + "name": "esp32/esp32_bongo69-app.bin", + "offset": "0x10000" + } + ], + "filesystem": { + "page": "256", + "block": "4096", + "size": "0x50000", + "offset": "0x3B0000" + } + }, { "name": "ESP32 WTEth 01", "description": "ESP32 for DIY builds", diff --git a/platformio.ini b/platformio.ini index cc37ae742..52f55d9cd 100644 --- a/platformio.ini +++ b/platformio.ini @@ -4,7 +4,7 @@ ; Local configuration should be done in platformio_user.ini [platformio] -default_envs = espsv3, d1_mini, d1_mini_pro, d32_pro, d32_pro_eth, esp32_cam, esp32_ttgo_t8, d1_mini32, d1_mini32_eth, esp32_wt32eth01, esp32_quinled_quad, esp32_quinled_quad_ae_plus, esp32_quinled_quad_ae_plus_8, esp32_quinled_quad_eth, esp32_quinled_uno, esp32_quinled_uno_ae_plus, esp32_quinled_uno_eth, esp32_quinled_dig_octa, esp01s, d1_mini_mhetesp32minikit, olimex_esp32_gw, d1_mini_twilightlord, d1_mini_twilightlord_eth, esp32_devkitc, esp32_quinled_uno_eth_espsv3, esp32_quinled_uno_espsv3, m5stack_atom, esp3deuxquatro_dmx, esp32_wasatch +default_envs = espsv3, d1_mini, d1_mini_pro, d32_pro, d32_pro_eth, esp32_cam, esp32_ttgo_t8, d1_mini32, d1_mini32_eth, esp32_bongo69, esp32_wt32eth01, esp32_quinled_quad, esp32_quinled_quad_ae_plus, esp32_quinled_quad_ae_plus_8, esp32_quinled_quad_eth, esp32_quinled_uno, esp32_quinled_uno_ae_plus, esp32_quinled_uno_eth, esp32_quinled_dig_octa, esp01s, d1_mini_mhetesp32minikit, olimex_esp32_gw, d1_mini_twilightlord, d1_mini_twilightlord_eth, esp32_devkitc, esp32_quinled_uno_eth_espsv3, esp32_quinled_uno_espsv3, m5stack_atom, esp3deuxquatro_dmx, esp32_wasatch src_dir = ./ESPixelStick data_dir = ./ESPixelStick/data build_cache_dir = ./.pio/.buildcache @@ -236,6 +236,16 @@ build_flags = -D BOARD_ESP32_WT32ETH01 -I ./.pio/packages/framework-arduinoespressif32/libraries/Ethernet/src +; BONGO69 +[env:esp32_bongo69] +extends = esp32git +board = esp32dev +build_flags = + ${esp32git.build_flags} + -D BOARD_NAME='"esp32_bongo69"' + -D BOARD_ESP32_BONGO69 + -I ./.pio/packages/framework-arduinoespressif32/libraries/Ethernet/src + [env:esp32_quinled_dig_octa] extends = esp32git board = wemos_d1_mini32