diff --git a/src/WebCfgServer.cpp b/src/WebCfgServer.cpp index dde3de7..18765ce 100644 --- a/src/WebCfgServer.cpp +++ b/src/WebCfgServer.cpp @@ -6975,6 +6975,7 @@ const std::vector> WebCfgServer::getNetworkDetectionOp options.push_back(std::make_pair("8", "GL-S10")); options.push_back(std::make_pair("9", "ETH01-Evo")); options.push_back(std::make_pair("13", "Waveshare ESP32-S3-ETH / ESP32-S3-ETH-POE")); + options.push_back(std::make_pair("14", "LilyGO T-ETH-Lite-ESP32S3")); options.push_back(std::make_pair("11", "Custom LAN module")); return options; diff --git a/src/enums/NetworkDeviceType.h b/src/enums/NetworkDeviceType.h index 18a8054..68e2f69 100644 --- a/src/enums/NetworkDeviceType.h +++ b/src/enums/NetworkDeviceType.h @@ -14,5 +14,6 @@ enum class NetworkDeviceType GL_S10, ETH01_Evo, Waveshare_ESP32_S3_ETH, + LilyGO_T_ETH_Lite_S3, CUSTOM }; \ No newline at end of file diff --git a/src/networkDevices/W5500Definitions.h b/src/networkDevices/W5500Definitions.h index e564add..5bf9604 100644 --- a/src/networkDevices/W5500Definitions.h +++ b/src/networkDevices/W5500Definitions.h @@ -2,40 +2,47 @@ #include -#define ETH_PHY_TYPE_W5500 ETH_PHY_W5500 -#define ETH_PHY_ADDR_W5500 1 -#define ETH_PHY_IRQ_M5_W5500 -1 -#define ETH_PHY_RST_M5_W5500 -1 -#define ETH_PHY_CS_M5_W5500 19 -#define ETH_PHY_SPI_SCK_M5_W5500 22 -#define ETH_PHY_SPI_MISO_M5_W5500 23 -#define ETH_PHY_SPI_MOSI_M5_W5500 33 +#define ETH_PHY_TYPE_W5500 ETH_PHY_W5500 +#define ETH_PHY_ADDR_W5500 1 +#define ETH_PHY_IRQ_M5_W5500 -1 +#define ETH_PHY_RST_M5_W5500 -1 +#define ETH_PHY_CS_M5_W5500 19 +#define ETH_PHY_SPI_SCK_M5_W5500 22 +#define ETH_PHY_SPI_MISO_M5_W5500 23 +#define ETH_PHY_SPI_MOSI_M5_W5500 33 -#define ETH_PHY_CS_M5_W5500_S3 6 -#define ETH_PHY_SPI_SCK_M5_W5500_S3 5 -#define ETH_PHY_SPI_MISO_M5_W5500_S3 7 -#define ETH_PHY_SPI_MOSI_M5_W5500_S3 8 +#define ETH_PHY_CS_M5_W5500_S3 6 +#define ETH_PHY_SPI_SCK_M5_W5500_S3 5 +#define ETH_PHY_SPI_MISO_M5_W5500_S3 7 +#define ETH_PHY_SPI_MOSI_M5_W5500_S3 8 -#define ETH_PHY_IRQ_ELITE_W5500 14 -#define ETH_PHY_RST_ELITE_W5500 -1 -#define ETH_PHY_CS_ELITE_W5500 45 -#define ETH_PHY_SPI_SCK_ELITE_W5500 48 -#define ETH_PHY_SPI_MISO_ELITE_W5500 47 -#define ETH_PHY_SPI_MOSI_ELITE_W5500 21 +#define ETH_PHY_IRQ_ELITE_W5500 14 +#define ETH_PHY_RST_ELITE_W5500 -1 +#define ETH_PHY_CS_ELITE_W5500 45 +#define ETH_PHY_SPI_SCK_ELITE_W5500 48 +#define ETH_PHY_SPI_MISO_ELITE_W5500 47 +#define ETH_PHY_SPI_MOSI_ELITE_W5500 21 -#define ETH_PHY_IRQ_GENERIC_W5500 3 -#define ETH_PHY_RST_GENERIC_W5500 4 -#define ETH_PHY_CS_GENERIC_W5500 5 -#define ETH_PHY_SPI_SCK_GENERIC_W5500 8 -#define ETH_PHY_SPI_MISO_GENERIC_W5500 9 -#define ETH_PHY_SPI_MOSI_GENERIC_W5500 10 +#define ETH_PHY_IRQ_GENERIC_W5500 3 +#define ETH_PHY_RST_GENERIC_W5500 4 +#define ETH_PHY_CS_GENERIC_W5500 5 +#define ETH_PHY_SPI_SCK_GENERIC_W5500 8 +#define ETH_PHY_SPI_MISO_GENERIC_W5500 9 +#define ETH_PHY_SPI_MOSI_GENERIC_W5500 10 -#define ETH_ADDR_WAVESHARE_ESP32_S3_ETH 1 -#define ETH_PHY_SPI_IRQ_WAVESHARE_ESP32_S3_ETH 10 -#define ETH_PHY_SPI_RST_WAVESHARE_ESP32_S3_ETH 9 -#define ETH_PHY_SPI_CS_WAVESHARE_ESP32_S3_ETH 14 -#define ETH_PHY_SPI_SCK_WAVESHARE_ESP32_S3_ETH 13 -#define ETH_PHY_SPI_MISO_WAVESHARE_ESP32_S3_ETH 12 -#define ETH_PHY_SPI_MOSI_WAVESHARE_ESP32_S3_ETH 11 +#define ETH_ADDR_WAVESHARE_ESP32_S3_ETH 1 +#define ETH_PHY_SPI_IRQ_WAVESHARE_ESP32_S3_ETH 10 +#define ETH_PHY_SPI_RST_WAVESHARE_ESP32_S3_ETH 9 +#define ETH_PHY_SPI_CS_WAVESHARE_ESP32_S3_ETH 14 +#define ETH_PHY_SPI_SCK_WAVESHARE_ESP32_S3_ETH 13 +#define ETH_PHY_SPI_MISO_WAVESHARE_ESP32_S3_ETH 12 +#define ETH_PHY_SPI_MOSI_WAVESHARE_ESP32_S3_ETH 11 + +#define ETH_PHY_CS_ETHLITES3_W5500 9 +#define ETH_PHY_IRQ_ETHLITES3_W5500 13 +#define ETH_PHY_RST_ETHLITES3_W5500 14 +#define ETH_PHY_SPI_SCK_ETHLITES3_W5500 10 +#define ETH_PHY_SPI_MISO_ETHLITES3_W5500 11 +#define ETH_PHY_SPI_MOSI_ETHLITES3_W5500 12 #define ETH_ADDR 1 \ No newline at end of file diff --git a/src/util/NetworkDeviceInstantiator.cpp b/src/util/NetworkDeviceInstantiator.cpp index 1bcd2d3..d57b6ec 100644 --- a/src/util/NetworkDeviceInstantiator.cpp +++ b/src/util/NetworkDeviceInstantiator.cpp @@ -80,6 +80,18 @@ NetworkDevice *NetworkDeviceInstantiator::Create(NetworkDeviceType networkDevice ETH_PHY_SPI_MOSI_ELITE_W5500, ETH_PHY_W5500); break; + case NetworkDeviceType::LilyGO_T_ETH_Lite_S3: + device = new EthernetDevice(hostname, preferences, ipConfiguration, "LilyGO T-ETH-Lite-ESP32S3", + ETH_PHY_ADDR_W5500, + ETH_PHY_CS_ETHLITES3_W5500, + ETH_PHY_IRQ_ETHLITES3_W5500, + ETH_PHY_RST_ETHLITES3_W5500, + ETH_PHY_SPI_SCK_ETHLITES3_W5500, + ETH_PHY_SPI_MISO_ETHLITES3_W5500, + ETH_PHY_SPI_MOSI_ETHLITES3_W5500, + ETH_PHY_W5500); + break; + case NetworkDeviceType::CUSTOM: { int custPHY = preferences->getInt(preference_network_custom_phy, 0); diff --git a/src/util/NetworkUtil.cpp b/src/util/NetworkUtil.cpp index e68325c..0d4633a 100644 --- a/src/util/NetworkUtil.cpp +++ b/src/util/NetworkUtil.cpp @@ -36,6 +36,8 @@ NetworkDeviceType NetworkUtil::GetDeviceTypeFromPreference(int hardwareDetect, i return NetworkDeviceType::LilyGO_T_ETH_ELite; case 13: return NetworkDeviceType::Waveshare_ESP32_S3_ETH; + case 14: + return NetworkDeviceType::LilyGO_T_ETH_Lite_S3; default: Log->println("Unknown hardware selected, falling back to Wi-Fi."); return NetworkDeviceType::WiFi;