Skip to content

Commit

Permalink
boards: shields: Add support for WIZnet WIZ550io Ethernet shield
Browse files Browse the repository at this point in the history
Add support for WIZnet WIZ550io Ethernet shield

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
  • Loading branch information
gramsay0 committed Jun 1, 2024
1 parent 892146f commit 88bac43
Show file tree
Hide file tree
Showing 4 changed files with 107 additions and 0 deletions.
13 changes: 13 additions & 0 deletions boards/shields/wiznet_eth_wiz550io/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright (c) 2024 Grant Ramsay
# SPDX-License-Identifier: Apache-2.0

if SHIELD_WIZNET_ETH_WIZ550IO

if NETWORKING

config NET_L2_ETHERNET
default y

endif # NETWORKING

endif # SHIELD_WIZNET_ETH_WIZ550IO
5 changes: 5 additions & 0 deletions boards/shields/wiznet_eth_wiz550io/Kconfig.shield
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright (c) 2024 Grant Ramsay
# SPDX-License-Identifier: Apache-2.0

config SHIELD_WIZNET_ETH_WIZ550IO
def_bool $(shields_list_contains,wiznet_eth_wiz550io)
64 changes: 64 additions & 0 deletions boards/shields/wiznet_eth_wiz550io/doc/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
.. _wiznet_eth_wiz550io:

WIZnet WIZ550io ETH
###################

Overview
********

WIZnet WIZ550io Ethernet is breakout board with SPI bus access.
`WIZ550io`_ contains a W5500 Ethernet controller with an extra PIC12F519 MCU.
The PIC12F519 MCU initialises the W5500 with a unique MAC address after a GPIO
reset.

`W5500`_ is 10/100 MBPS stand alone Ethernet controller with on-board MAC & PHY,
16 KiloBytes for FIFO buffer and SPI serial interface.

Pins Assignment of the WIZ550io Shield
======================================

+-----------------------+---------------------------------------------+
| Shield Connector Pin | Function |
+=======================+=============================================+
| RST# | Ethernet Controller's Reset |
+-----------------------+---------------------------------------------+
| CS# | SPI's Chip Select |
+-----------------------+---------------------------------------------+
| SCK | SPI's ClocK |
+-----------------------+---------------------------------------------+
| SDO | SPI's Slave Data Output (MISO) |
+-----------------------+---------------------------------------------+
| SDI | SPI's Slave Data Input (MISO) |
+-----------------------+---------------------------------------------+
| INT | Ethernet Controller's Interrupt Output |
+-----------------------+---------------------------------------------+
| RDY | WIZ550io Ready Output |
+-----------------------+---------------------------------------------+

Requirements
************

This shield/breakout board can be used with any board with SPI interfaces in
Arduino header or custom header (by adjusting the overlay).

Programming
***********

Set ``-DSHIELD=wiznet_eth_wiz550io`` when you invoke ``west build``. For example:

.. zephyr-app-commands::
:zephyr-app: samples/net/dhcpv4_client
:board: nrf52840dk/nrf52840
:shield: wiznet_eth_wiz550io
:goals: build

References
**********

.. target-notes::

.. _WIZ550io:
https://wiznet.io/products/network-modules/wiz550io

.. _W5500:
https://wiznet.io/products/iethernet-chips/w5500
25 changes: 25 additions & 0 deletions boards/shields/wiznet_eth_wiz550io/wiznet_eth_wiz550io.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/* Copyright (c) 2024 Grant Ramsay
* SPDX-License-Identifier: Apache-2.0
*/

&arduino_spi {
status = "okay";

eth_w5500: eth_w5500@0 {
compatible = "wiznet,w5500";
reg = <0x0>;
/* Note: Reducing spi-max-frequency may help with errors/stability */
spi-max-frequency = <DT_FREQ_M(80)>;
int-gpios = <&arduino_header 15 GPIO_ACTIVE_LOW>; /* D9 */
/* Do not put the reset-gpios property here */
};
};

/ {
wiz550io {
compatible = "wiznet,wiz550io";
wiznet,w5500 = <&eth_w5500>;
reset-gpios = <&arduino_header 14 GPIO_ACTIVE_LOW>; /* D8 */
ready-gpios = <&arduino_header 13 GPIO_ACTIVE_HIGH>; /* D7 */
};
};

0 comments on commit 88bac43

Please sign in to comment.