diff --git a/boards/shields/seeed_w5500/Kconfig.defconfig b/boards/shields/seeed_w5500/Kconfig.defconfig new file mode 100644 index 0000000000000..72924f7ec8d31 --- /dev/null +++ b/boards/shields/seeed_w5500/Kconfig.defconfig @@ -0,0 +1,13 @@ +# Copyright (c) 2024 Marcin Niestroj +# SPDX-License-Identifier: Apache-2.0 + +if SHIELD_SEEED_W5500 + +if NETWORKING + +config NET_L2_ETHERNET + default y + +endif # NETWORKING + +endif # SHIELD_SEEED_W5500 diff --git a/boards/shields/seeed_w5500/Kconfig.shield b/boards/shields/seeed_w5500/Kconfig.shield new file mode 100644 index 0000000000000..cb5de82d457a0 --- /dev/null +++ b/boards/shields/seeed_w5500/Kconfig.shield @@ -0,0 +1,5 @@ +# Copyright (c) 2024 Marcin Niestroj +# SPDX-License-Identifier: Apache-2.0 + +config SHIELD_SEEED_W5500 + def_bool $(shields_list_contains,seeed_w5500) diff --git a/boards/shields/seeed_w5500/doc/index.rst b/boards/shields/seeed_w5500/doc/index.rst new file mode 100644 index 0000000000000..3ba095ce0f721 --- /dev/null +++ b/boards/shields/seeed_w5500/doc/index.rst @@ -0,0 +1,70 @@ +.. _seeed_w5500: + +Seeed W5500 Ethernet Shield +########################### + +Overview +******** + +Seeed `W5500 Ethernet Shield`_ is an Arduino connector shield with: + +- `W5500`_ 10/100 MBPS stand alone Ethernet controller with on-board MAC & PHY + and 16 KiloBytes for FIFO buffer, +- SPI serial interface, +- Grove UART connector, +- Grove I2C connector, +- SD card slot. + +.. figure:: seeed_w5500.webp + :align: center + :alt: Seeed W5500 Ethernet Shield + + Seeed W5500 Ethernet Shield + +Pins Assignment of the W5500 Shield +=================================== + ++-----------------------+---------------------------------------------+ +| Shield Connector Pin | Function | ++=======================+=============================================+ +| RST | Ethernet Controller's Reset | ++-----------------------+---------------------------------------------+ +| D2 | Ethernet Controller's Interrupt Output | ++-----------------------+---------------------------------------------+ +| D10 | SPI's Chip Select | ++-----------------------+---------------------------------------------+ +| D11 | SPI's Master Output Slave Input (MOSI) | ++-----------------------+---------------------------------------------+ +| D12 | SPI's Master Input Slave Output (MISO) | ++-----------------------+---------------------------------------------+ +| D13 | SPI's Clock | ++-----------------------+---------------------------------------------+ + +Requirements +************ + +This shield can only be used with a board that provides a configuration +for Arduino connectors and defines node aliases for SPI and GPIO interfaces +(see :ref:`shields` for more details). + +Programming +*********** + +Set ``--shield seeed_w5500`` when you invoke ``west build``. For example: + +.. zephyr-app-commands:: + :zephyr-app: samples/net/dhcpv4_client + :board: nrf52840dk/nrf52840 + :shield: seeed_w5500 + :goals: build + +References +********** + +.. target-notes:: + +.. _W5500: + https://wiznet.io/products/iethernet-chips/w5500 + +.. _W5500 Ethernet Shield: + https://wiki.seeedstudio.com/W5500_Ethernet_Shield_v1.0 diff --git a/boards/shields/seeed_w5500/doc/seeed_w5500.webp b/boards/shields/seeed_w5500/doc/seeed_w5500.webp new file mode 100644 index 0000000000000..83477d34fc072 Binary files /dev/null and b/boards/shields/seeed_w5500/doc/seeed_w5500.webp differ diff --git a/boards/shields/seeed_w5500/seeed_w5500.overlay b/boards/shields/seeed_w5500/seeed_w5500.overlay new file mode 100644 index 0000000000000..9551c0f0e3ae7 --- /dev/null +++ b/boards/shields/seeed_w5500/seeed_w5500.overlay @@ -0,0 +1,15 @@ +/* + * Copyright (c) 2024 Marcin Niestroj + * SPDX-License-Identifier: Apache-2.0 + */ + +&arduino_spi { + status = "okay"; + + eth_w5500: eth-w5500@0 { + compatible = "wiznet,w5500"; + reg = <0x0>; + spi-max-frequency = ; + int-gpios = <&arduino_header 8 GPIO_ACTIVE_LOW>; /* D2 */ + }; +};