diff --git a/.clang-tidy.hash b/.clang-tidy.hash index 3ffe32af88..d6d401ee66 100644 --- a/.clang-tidy.hash +++ b/.clang-tidy.hash @@ -1 +1 @@ -74867fc82764102ce1275ea2bc43e3aeee7619679537c6db61114a33342bb4c7 +ce05c28e9dc0b12c4f6e7454986ffea5123ac974a949da841be698c535f2083e diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 841c297bce..8718772f53 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -115,6 +115,7 @@ jobs: python-version: - "3.11" - "3.13" + - "3.14" os: - ubuntu-latest - macOS-latest diff --git a/esphome/components/esp32/__init__.py b/esphome/components/esp32/__init__.py index a680a78951..b78b945a24 100644 --- a/esphome/components/esp32/__init__.py +++ b/esphome/components/esp32/__init__.py @@ -645,11 +645,12 @@ def _is_framework_url(source: str) -> bool: # The default/recommended arduino framework version # - https://github.com/espressif/arduino-esp32/releases ARDUINO_FRAMEWORK_VERSION_LOOKUP = { - "recommended": cv.Version(3, 3, 6), - "latest": cv.Version(3, 3, 6), - "dev": cv.Version(3, 3, 6), + "recommended": cv.Version(3, 3, 7), + "latest": cv.Version(3, 3, 7), + "dev": cv.Version(3, 3, 7), } ARDUINO_PLATFORM_VERSION_LOOKUP = { + cv.Version(3, 3, 7): cv.Version(55, 3, 37), cv.Version(3, 3, 6): cv.Version(55, 3, 36), cv.Version(3, 3, 5): cv.Version(55, 3, 35), cv.Version(3, 3, 4): cv.Version(55, 3, 31, "2"), @@ -668,6 +669,7 @@ ARDUINO_PLATFORM_VERSION_LOOKUP = { # These versions correspond to pioarduino/esp-idf releases # See: https://github.com/pioarduino/esp-idf/releases ARDUINO_IDF_VERSION_LOOKUP = { + cv.Version(3, 3, 7): cv.Version(5, 5, 2), cv.Version(3, 3, 6): cv.Version(5, 5, 2), cv.Version(3, 3, 5): cv.Version(5, 5, 2), cv.Version(3, 3, 4): cv.Version(5, 5, 1), @@ -691,7 +693,7 @@ ESP_IDF_FRAMEWORK_VERSION_LOOKUP = { "dev": cv.Version(5, 5, 2), } ESP_IDF_PLATFORM_VERSION_LOOKUP = { - cv.Version(5, 5, 2): cv.Version(55, 3, 36), + cv.Version(5, 5, 2): cv.Version(55, 3, 37), cv.Version(5, 5, 1): cv.Version(55, 3, 31, "2"), cv.Version(5, 5, 0): cv.Version(55, 3, 31, "2"), cv.Version(5, 4, 3): cv.Version(55, 3, 32), @@ -708,8 +710,8 @@ ESP_IDF_PLATFORM_VERSION_LOOKUP = { # The platform-espressif32 version # - https://github.com/pioarduino/platform-espressif32/releases PLATFORM_VERSION_LOOKUP = { - "recommended": cv.Version(55, 3, 36), - "latest": cv.Version(55, 3, 36), + "recommended": cv.Version(55, 3, 37), + "latest": cv.Version(55, 3, 37), "dev": "https://github.com/pioarduino/platform-espressif32.git#develop", } diff --git a/esphome/components/esp32/boards.py b/esphome/components/esp32/boards.py index 8b066064f2..66367d63ae 100644 --- a/esphome/components/esp32/boards.py +++ b/esphome/components/esp32/boards.py @@ -1686,6 +1686,10 @@ BOARDS = { "name": "Espressif ESP32-C6-DevKitM-1", "variant": VARIANT_ESP32C6, }, + "esp32-c61-devkitc1": { + "name": "Espressif ESP32-C61-DevKitC-1 (4 MB Flash)", + "variant": VARIANT_ESP32C61, + }, "esp32-c61-devkitc1-n8r2": { "name": "Espressif ESP32-C61-DevKitC-1 N8R2 (8 MB Flash Quad, 2 MB PSRAM Quad)", "variant": VARIANT_ESP32C61, @@ -1718,6 +1722,10 @@ BOARDS = { "name": "Espressif ESP32-P4 rev.300 generic", "variant": VARIANT_ESP32P4, }, + "esp32-p4_r3-evboard": { + "name": "Espressif ESP32-P4 Function EV Board v1.6 (rev.301)", + "variant": VARIANT_ESP32P4, + }, "esp32-pico-devkitm-2": { "name": "Espressif ESP32-PICO-DevKitM-2", "variant": VARIANT_ESP32, @@ -2554,6 +2562,10 @@ BOARDS = { "name": "XinaBox CW02", "variant": VARIANT_ESP32, }, + "yb_esp32s3_amp": { + "name": "YelloByte YB-ESP32-S3-AMP", + "variant": VARIANT_ESP32S3, + }, "yb_esp32s3_amp_v2": { "name": "YelloByte YB-ESP32-S3-AMP (Rev.2)", "variant": VARIANT_ESP32S3, @@ -2562,6 +2574,10 @@ BOARDS = { "name": "YelloByte YB-ESP32-S3-AMP (Rev.3)", "variant": VARIANT_ESP32S3, }, + "yb_esp32s3_dac": { + "name": "YelloByte YB-ESP32-S3-DAC", + "variant": VARIANT_ESP32S3, + }, "yb_esp32s3_drv": { "name": "YelloByte YB-ESP32-S3-DRV", "variant": VARIANT_ESP32S3, diff --git a/esphome/components/ethernet/__init__.py b/esphome/components/ethernet/__init__.py index 38489ceb2b..52f5f44d41 100644 --- a/esphome/components/ethernet/__init__.py +++ b/esphome/components/ethernet/__init__.py @@ -130,11 +130,16 @@ ETHERNET_TYPES = { } # PHY types that need compile-time defines for conditional compilation +# Each RMII PHY type gets a define so unused PHY drivers are excluded by the linker _PHY_TYPE_TO_DEFINE = { + "LAN8720": "USE_ETHERNET_LAN8720", + "RTL8201": "USE_ETHERNET_RTL8201", + "DP83848": "USE_ETHERNET_DP83848", + "IP101": "USE_ETHERNET_IP101", + "JL1101": "USE_ETHERNET_JL1101", "KSZ8081": "USE_ETHERNET_KSZ8081", "KSZ8081RNA": "USE_ETHERNET_KSZ8081", "LAN8670": "USE_ETHERNET_LAN8670", - # Add other PHY types here only if they need conditional compilation } SPI_ETHERNET_TYPES = ["W5500", "DM9051"] diff --git a/esphome/components/ethernet/ethernet_component.cpp b/esphome/components/ethernet/ethernet_component.cpp index f17f12211f..90ba0dda30 100644 --- a/esphome/components/ethernet/ethernet_component.cpp +++ b/esphome/components/ethernet/ethernet_component.cpp @@ -186,31 +186,43 @@ void EthernetComponent::setup() { } #endif #if CONFIG_ETH_USE_ESP32_EMAC +#ifdef USE_ETHERNET_LAN8720 case ETHERNET_TYPE_LAN8720: { this->phy_ = esp_eth_phy_new_lan87xx(&phy_config); break; } +#endif +#ifdef USE_ETHERNET_RTL8201 case ETHERNET_TYPE_RTL8201: { this->phy_ = esp_eth_phy_new_rtl8201(&phy_config); break; } +#endif +#ifdef USE_ETHERNET_DP83848 case ETHERNET_TYPE_DP83848: { this->phy_ = esp_eth_phy_new_dp83848(&phy_config); break; } +#endif +#ifdef USE_ETHERNET_IP101 case ETHERNET_TYPE_IP101: { this->phy_ = esp_eth_phy_new_ip101(&phy_config); break; } +#endif +#ifdef USE_ETHERNET_JL1101 case ETHERNET_TYPE_JL1101: { this->phy_ = esp_eth_phy_new_jl1101(&phy_config); break; } +#endif +#ifdef USE_ETHERNET_KSZ8081 case ETHERNET_TYPE_KSZ8081: case ETHERNET_TYPE_KSZ8081RNA: { this->phy_ = esp_eth_phy_new_ksz80xx(&phy_config); break; } +#endif #ifdef USE_ETHERNET_LAN8670 case ETHERNET_TYPE_LAN8670: { this->phy_ = esp_eth_phy_new_lan867x(&phy_config); @@ -343,26 +355,32 @@ void EthernetComponent::loop() { void EthernetComponent::dump_config() { const char *eth_type; switch (this->type_) { +#ifdef USE_ETHERNET_LAN8720 case ETHERNET_TYPE_LAN8720: eth_type = "LAN8720"; break; - +#endif +#ifdef USE_ETHERNET_RTL8201 case ETHERNET_TYPE_RTL8201: eth_type = "RTL8201"; break; - +#endif +#ifdef USE_ETHERNET_DP83848 case ETHERNET_TYPE_DP83848: eth_type = "DP83848"; break; - +#endif +#ifdef USE_ETHERNET_IP101 case ETHERNET_TYPE_IP101: eth_type = "IP101"; break; - +#endif +#ifdef USE_ETHERNET_JL1101 case ETHERNET_TYPE_JL1101: eth_type = "JL1101"; break; - +#endif +#ifdef USE_ETHERNET_KSZ8081 case ETHERNET_TYPE_KSZ8081: eth_type = "KSZ8081"; break; @@ -370,7 +388,7 @@ void EthernetComponent::dump_config() { case ETHERNET_TYPE_KSZ8081RNA: eth_type = "KSZ8081RNA"; break; - +#endif case ETHERNET_TYPE_W5500: eth_type = "W5500"; break; @@ -839,13 +857,15 @@ void EthernetComponent::ksz8081_set_clock_reference_(esp_eth_mac_t *mac) { void EthernetComponent::write_phy_register_(esp_eth_mac_t *mac, PHYRegister register_data) { esp_err_t err; - constexpr uint8_t eth_phy_psr_reg_addr = 0x1F; +#ifdef USE_ETHERNET_RTL8201 + constexpr uint8_t eth_phy_psr_reg_addr = 0x1F; if (this->type_ == ETHERNET_TYPE_RTL8201 && register_data.page) { ESP_LOGD(TAG, "Select PHY Register Page: 0x%02" PRIX32, register_data.page); err = mac->write_phy_reg(mac, this->phy_addr_, eth_phy_psr_reg_addr, register_data.page); ESPHL_ERROR_CHECK(err, "Select PHY Register page failed"); } +#endif ESP_LOGD(TAG, "Writing to PHY Register Address: 0x%02" PRIX32 "\n" @@ -854,11 +874,13 @@ void EthernetComponent::write_phy_register_(esp_eth_mac_t *mac, PHYRegister regi err = mac->write_phy_reg(mac, this->phy_addr_, register_data.address, register_data.value); ESPHL_ERROR_CHECK(err, "Writing PHY Register failed"); +#ifdef USE_ETHERNET_RTL8201 if (this->type_ == ETHERNET_TYPE_RTL8201 && register_data.page) { ESP_LOGD(TAG, "Select PHY Register Page 0x00"); err = mac->write_phy_reg(mac, this->phy_addr_, eth_phy_psr_reg_addr, 0x0); ESPHL_ERROR_CHECK(err, "Select PHY Register Page 0 failed"); } +#endif } #endif diff --git a/esphome/core/defines.h b/esphome/core/defines.h index 7e6df31ea2..bfa33e4e59 100644 --- a/esphome/core/defines.h +++ b/esphome/core/defines.h @@ -239,9 +239,15 @@ #define USB_HOST_MAX_REQUESTS 16 #ifdef USE_ARDUINO -#define USE_ARDUINO_VERSION_CODE VERSION_CODE(3, 3, 6) +#define USE_ARDUINO_VERSION_CODE VERSION_CODE(3, 3, 7) #define USE_ETHERNET +#define USE_ETHERNET_LAN8720 +#define USE_ETHERNET_RTL8201 +#define USE_ETHERNET_DP83848 +#define USE_ETHERNET_IP101 +#define USE_ETHERNET_JL1101 #define USE_ETHERNET_KSZ8081 +#define USE_ETHERNET_LAN8670 #define USE_ETHERNET_MANUAL_IP #define USE_ETHERNET_IP_STATE_LISTENERS #define USE_ETHERNET_CONNECT_TRIGGER diff --git a/platformio.ini b/platformio.ini index 6b29daf87a..09b3d8722d 100644 --- a/platformio.ini +++ b/platformio.ini @@ -133,9 +133,9 @@ extra_scripts = post:esphome/components/esp8266/post_build.py.script ; This are common settings for the ESP32 (all variants) using Arduino. [common:esp32-arduino] extends = common:arduino -platform = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.36/platform-espressif32.zip +platform = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.37/platform-espressif32.zip platform_packages = - pioarduino/framework-arduinoespressif32@https://github.com/espressif/arduino-esp32/releases/download/3.3.6/esp32-core-3.3.6.tar.xz + pioarduino/framework-arduinoespressif32@https://github.com/espressif/arduino-esp32/releases/download/3.3.7/esp32-core-3.3.7.tar.xz pioarduino/framework-espidf@https://github.com/pioarduino/esp-idf/releases/download/v5.5.2/esp-idf-v5.5.2.tar.xz framework = arduino, espidf ; Arduino as an ESP-IDF component @@ -169,7 +169,7 @@ extra_scripts = post:esphome/components/esp32/post_build.py.script ; This are common settings for the ESP32 (all variants) using IDF. [common:esp32-idf] extends = common:idf -platform = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.36/platform-espressif32.zip +platform = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.37/platform-espressif32.zip platform_packages = pioarduino/framework-espidf@https://github.com/pioarduino/esp-idf/releases/download/v5.5.2/esp-idf-v5.5.2.tar.xz diff --git a/pyproject.toml b/pyproject.toml index 339bc65eed..c6a2c22a5d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,8 +20,8 @@ classifiers = [ "Topic :: Home Automation", ] -# Python 3.14 is currently not supported by IDF <= 5.5.1, see https://github.com/esphome/esphome/issues/11502 -requires-python = ">=3.11.0,<3.14" +# Python 3.14 is not supported on Windows, see https://github.com/zephyrproject-rtos/windows-curses/issues/76 +requires-python = ">=3.11.0,<3.15" dynamic = ["dependencies", "optional-dependencies", "version"]