mirror of
https://github.com/esphome/esphome.git
synced 2025-09-28 16:12:24 +01:00
Merge remote-tracking branch 'upstream/dev' into integration
This commit is contained in:
52
.github/workflows/stale.yml
vendored
52
.github/workflows/stale.yml
vendored
@@ -15,36 +15,52 @@ concurrency:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
stale:
|
stale:
|
||||||
|
if: github.repository_owner == 'esphome'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/stale@3a9db7e6a41a89f618792c92c0e97cc736e1b13f # v10.0.0
|
- name: Stale
|
||||||
|
uses: actions/stale@3a9db7e6a41a89f618792c92c0e97cc736e1b13f # v10.0.0
|
||||||
with:
|
with:
|
||||||
|
debug-only: ${{ github.ref != 'refs/heads/dev' }} # Dry-run when not run on dev branch
|
||||||
|
remove-stale-when-updated: true
|
||||||
|
operations-per-run: 150
|
||||||
|
|
||||||
|
# The 90 day stale policy for PRs
|
||||||
|
# - PRs
|
||||||
|
# - No PRs marked as "not-stale"
|
||||||
|
# - No Issues (see below)
|
||||||
days-before-pr-stale: 90
|
days-before-pr-stale: 90
|
||||||
days-before-pr-close: 7
|
days-before-pr-close: 7
|
||||||
days-before-issue-stale: -1
|
|
||||||
days-before-issue-close: -1
|
|
||||||
remove-stale-when-updated: true
|
|
||||||
stale-pr-label: "stale"
|
stale-pr-label: "stale"
|
||||||
exempt-pr-labels: "not-stale"
|
exempt-pr-labels: "not-stale"
|
||||||
stale-pr-message: >
|
stale-pr-message: >
|
||||||
There hasn't been any activity on this pull request recently. This
|
There hasn't been any activity on this pull request recently. This
|
||||||
pull request has been automatically marked as stale because of that
|
pull request has been automatically marked as stale because of that
|
||||||
and will be closed if no further activity occurs within 7 days.
|
and will be closed if no further activity occurs within 7 days.
|
||||||
Thank you for your contributions.
|
|
||||||
|
|
||||||
# Use stale to automatically close issues with a
|
If you are the author of this PR, please leave a comment if you want
|
||||||
# reference to the issue tracker
|
to keep it open. Also, please rebase your PR onto the latest dev
|
||||||
close-issues:
|
branch to ensure that it's up to date with the latest changes.
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
Thank you for your contribution!
|
||||||
- uses: actions/stale@3a9db7e6a41a89f618792c92c0e97cc736e1b13f # v10.0.0
|
|
||||||
with:
|
# The 90 day stale policy for Issues
|
||||||
days-before-pr-stale: -1
|
# - Issues
|
||||||
days-before-pr-close: -1
|
# - No Issues marked as "not-stale"
|
||||||
days-before-issue-stale: 1
|
# - No PRs (see above)
|
||||||
days-before-issue-close: 1
|
days-before-issue-stale: 90
|
||||||
remove-stale-when-updated: true
|
days-before-issue-close: 7
|
||||||
stale-issue-label: "stale"
|
stale-issue-label: "stale"
|
||||||
exempt-issue-labels: "not-stale"
|
exempt-issue-labels: "not-stale"
|
||||||
stale-issue-message: >
|
stale-issue-message: >
|
||||||
https://github.com/esphome/esphome/issues/430
|
There hasn't been any activity on this issue recently. Due to the
|
||||||
|
high number of incoming GitHub notifications, we have to clean some
|
||||||
|
of the old issues, as many of them have already been resolved with
|
||||||
|
the latest updates.
|
||||||
|
|
||||||
|
Please make sure to update to the latest ESPHome version and
|
||||||
|
check if that solves the issue. Let us know if that works for you by
|
||||||
|
adding a comment 👍
|
||||||
|
|
||||||
|
This issue has now been marked as stale and will be closed if no
|
||||||
|
further activity occurs. Thank you for your contributions.
|
||||||
|
@@ -2,9 +2,15 @@ import logging
|
|||||||
|
|
||||||
from esphome import pins
|
from esphome import pins
|
||||||
import esphome.codegen as cg
|
import esphome.codegen as cg
|
||||||
from esphome.components.esp32 import add_idf_sdkconfig_option, get_esp32_variant
|
from esphome.components.esp32 import (
|
||||||
|
add_idf_component,
|
||||||
|
add_idf_sdkconfig_option,
|
||||||
|
get_esp32_variant,
|
||||||
|
)
|
||||||
from esphome.components.esp32.const import (
|
from esphome.components.esp32.const import (
|
||||||
|
VARIANT_ESP32,
|
||||||
VARIANT_ESP32C3,
|
VARIANT_ESP32C3,
|
||||||
|
VARIANT_ESP32P4,
|
||||||
VARIANT_ESP32S2,
|
VARIANT_ESP32S2,
|
||||||
VARIANT_ESP32S3,
|
VARIANT_ESP32S3,
|
||||||
)
|
)
|
||||||
@@ -75,12 +81,14 @@ ETHERNET_TYPES = {
|
|||||||
"W5500": EthernetType.ETHERNET_TYPE_W5500,
|
"W5500": EthernetType.ETHERNET_TYPE_W5500,
|
||||||
"OPENETH": EthernetType.ETHERNET_TYPE_OPENETH,
|
"OPENETH": EthernetType.ETHERNET_TYPE_OPENETH,
|
||||||
"DM9051": EthernetType.ETHERNET_TYPE_DM9051,
|
"DM9051": EthernetType.ETHERNET_TYPE_DM9051,
|
||||||
|
"LAN8670": EthernetType.ETHERNET_TYPE_LAN8670,
|
||||||
}
|
}
|
||||||
|
|
||||||
# PHY types that need compile-time defines for conditional compilation
|
# PHY types that need compile-time defines for conditional compilation
|
||||||
_PHY_TYPE_TO_DEFINE = {
|
_PHY_TYPE_TO_DEFINE = {
|
||||||
"KSZ8081": "USE_ETHERNET_KSZ8081",
|
"KSZ8081": "USE_ETHERNET_KSZ8081",
|
||||||
"KSZ8081RNA": "USE_ETHERNET_KSZ8081",
|
"KSZ8081RNA": "USE_ETHERNET_KSZ8081",
|
||||||
|
"LAN8670": "USE_ETHERNET_LAN8670",
|
||||||
# Add other PHY types here only if they need conditional compilation
|
# Add other PHY types here only if they need conditional compilation
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -136,6 +144,14 @@ def _validate(config):
|
|||||||
else:
|
else:
|
||||||
use_address = CORE.name + config[CONF_DOMAIN]
|
use_address = CORE.name + config[CONF_DOMAIN]
|
||||||
config[CONF_USE_ADDRESS] = use_address
|
config[CONF_USE_ADDRESS] = use_address
|
||||||
|
|
||||||
|
# Validate LAN8670 is only used with ESP32 classic or ESP32-P4
|
||||||
|
if config[CONF_TYPE] == "LAN8670":
|
||||||
|
variant = get_esp32_variant()
|
||||||
|
if variant not in (VARIANT_ESP32, VARIANT_ESP32P4):
|
||||||
|
raise cv.Invalid(
|
||||||
|
f"LAN8670 PHY is only supported on ESP32 classic and ESP32-P4, not {variant}"
|
||||||
|
)
|
||||||
if config[CONF_TYPE] in SPI_ETHERNET_TYPES:
|
if config[CONF_TYPE] in SPI_ETHERNET_TYPES:
|
||||||
if _is_framework_spi_polling_mode_supported():
|
if _is_framework_spi_polling_mode_supported():
|
||||||
if CONF_POLLING_INTERVAL in config and CONF_INTERRUPT_PIN in config:
|
if CONF_POLLING_INTERVAL in config and CONF_INTERRUPT_PIN in config:
|
||||||
@@ -248,6 +264,7 @@ CONFIG_SCHEMA = cv.All(
|
|||||||
"W5500": SPI_SCHEMA,
|
"W5500": SPI_SCHEMA,
|
||||||
"OPENETH": BASE_SCHEMA,
|
"OPENETH": BASE_SCHEMA,
|
||||||
"DM9051": SPI_SCHEMA,
|
"DM9051": SPI_SCHEMA,
|
||||||
|
"LAN8670": RMII_SCHEMA,
|
||||||
},
|
},
|
||||||
upper=True,
|
upper=True,
|
||||||
),
|
),
|
||||||
@@ -356,5 +373,9 @@ async def to_code(config):
|
|||||||
# Also disable WiFi/BT coexistence since WiFi is disabled
|
# Also disable WiFi/BT coexistence since WiFi is disabled
|
||||||
add_idf_sdkconfig_option("CONFIG_SW_COEXIST_ENABLE", False)
|
add_idf_sdkconfig_option("CONFIG_SW_COEXIST_ENABLE", False)
|
||||||
|
|
||||||
|
if config[CONF_TYPE] == "LAN8670":
|
||||||
|
# Add LAN867x 10BASE-T1S PHY support component
|
||||||
|
add_idf_component(name="espressif/lan867x", ref="2.0.0")
|
||||||
|
|
||||||
if CORE.using_arduino:
|
if CORE.using_arduino:
|
||||||
cg.add_library("WiFi", None)
|
cg.add_library("WiFi", None)
|
||||||
|
@@ -9,6 +9,10 @@
|
|||||||
#include <cinttypes>
|
#include <cinttypes>
|
||||||
#include "esp_event.h"
|
#include "esp_event.h"
|
||||||
|
|
||||||
|
#ifdef USE_ETHERNET_LAN8670
|
||||||
|
#include "esp_eth_phy_lan867x.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef USE_ETHERNET_SPI
|
#ifdef USE_ETHERNET_SPI
|
||||||
#include <driver/gpio.h>
|
#include <driver/gpio.h>
|
||||||
#include <driver/spi_master.h>
|
#include <driver/spi_master.h>
|
||||||
@@ -200,6 +204,12 @@ void EthernetComponent::setup() {
|
|||||||
this->phy_ = esp_eth_phy_new_ksz80xx(&phy_config);
|
this->phy_ = esp_eth_phy_new_ksz80xx(&phy_config);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
#ifdef USE_ETHERNET_LAN8670
|
||||||
|
case ETHERNET_TYPE_LAN8670: {
|
||||||
|
this->phy_ = esp_eth_phy_new_lan867x(&phy_config);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#ifdef USE_ETHERNET_SPI
|
#ifdef USE_ETHERNET_SPI
|
||||||
#if CONFIG_ETH_SPI_ETHERNET_W5500
|
#if CONFIG_ETH_SPI_ETHERNET_W5500
|
||||||
@@ -353,6 +363,12 @@ void EthernetComponent::dump_config() {
|
|||||||
eth_type = "DM9051";
|
eth_type = "DM9051";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#ifdef USE_ETHERNET_LAN8670
|
||||||
|
case ETHERNET_TYPE_LAN8670:
|
||||||
|
eth_type = "LAN8670";
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
default:
|
default:
|
||||||
eth_type = "Unknown";
|
eth_type = "Unknown";
|
||||||
break;
|
break;
|
||||||
|
@@ -28,6 +28,7 @@ enum EthernetType : uint8_t {
|
|||||||
ETHERNET_TYPE_W5500,
|
ETHERNET_TYPE_W5500,
|
||||||
ETHERNET_TYPE_OPENETH,
|
ETHERNET_TYPE_OPENETH,
|
||||||
ETHERNET_TYPE_DM9051,
|
ETHERNET_TYPE_DM9051,
|
||||||
|
ETHERNET_TYPE_LAN8670,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ManualIP {
|
struct ManualIP {
|
||||||
|
@@ -19,3 +19,7 @@ dependencies:
|
|||||||
- if: "target in [esp32h2, esp32p4]"
|
- if: "target in [esp32h2, esp32p4]"
|
||||||
zorxx/multipart-parser:
|
zorxx/multipart-parser:
|
||||||
version: 1.0.1
|
version: 1.0.1
|
||||||
|
espressif/lan867x:
|
||||||
|
version: "2.0.0"
|
||||||
|
rules:
|
||||||
|
- if: "target in [esp32, esp32p4]"
|
||||||
|
14
tests/components/ethernet/common-lan8670.yaml
Normal file
14
tests/components/ethernet/common-lan8670.yaml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
ethernet:
|
||||||
|
type: LAN8670
|
||||||
|
mdc_pin: 23
|
||||||
|
mdio_pin: 25
|
||||||
|
clk:
|
||||||
|
pin: 0
|
||||||
|
mode: CLK_EXT_IN
|
||||||
|
phy_addr: 0
|
||||||
|
power_pin: 26
|
||||||
|
manual_ip:
|
||||||
|
static_ip: 192.168.178.56
|
||||||
|
gateway: 192.168.178.1
|
||||||
|
subnet: 255.255.255.0
|
||||||
|
domain: .local
|
1
tests/components/ethernet/test-lan8670.esp32-ard.yaml
Normal file
1
tests/components/ethernet/test-lan8670.esp32-ard.yaml
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<<: !include common-lan8670.yaml
|
1
tests/components/ethernet/test-lan8670.esp32-idf.yaml
Normal file
1
tests/components/ethernet/test-lan8670.esp32-idf.yaml
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<<: !include common-lan8670.yaml
|
Reference in New Issue
Block a user