Files
esphome/tests/components/ethernet/common-w5500-spi-id.yaml
T
Jesse Hills 288bf3713f [ethernet] Add spi_id option to attach SPI chips to a shared spi bus
SPI ethernet chips always initialized their own SPI host, so they could
not coexist with other peripherals on the same physical pins. Boards
like the M5Stack CoreS3 put the LCD, SD slot, and expansion bus on one
multi-drop SPI bus, so attaching an ethernet base there was impossible.

With spi_id set, the ethernet component skips spi_bus_initialize() and
adds its device to the referenced hardware spi bus instead; the pins and
host come from that bus. Without spi_id, behavior is unchanged.
2026-08-20 13:54:45 +12:00

18 lines
373 B
YAML

ethernet:
type: W5500
spi_id: spi_bus
cs_pin: 5
interrupt_pin: 36
reset_pin: 22
clock_speed: 10Mhz
manual_ip:
static_ip: 192.168.178.56
gateway: 192.168.178.1
subnet: 255.255.255.0
domain: .local
mac_address: "02:AA:BB:CC:DD:01"
on_connect:
- logger.log: "Ethernet connected!"
on_disconnect:
- logger.log: "Ethernet disconnected!"