boards: Eth Click MikroElectronica shield

Adds support for a new SHIELD, Eth Click.
Mikro-BUS type shield supported in Zephyr.
Adds Kconfig for mikroe_eth_click shield.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
This commit is contained in:
Andrei Gansari 2020-03-20 18:09:36 +02:00 committed by Carles Cufí
parent 2a75139b7c
commit 714211acfb
4 changed files with 88 additions and 0 deletions

View file

@ -0,0 +1,5 @@
# Copyright (c) 2020 Linaro Limited.
# SPDX-License-Identifier: Apache-2.0
config SHIELD_MIKROE_ETH_CLICK
def_bool $(shields_list_contains,mikroe_eth_click)

View file

@ -0,0 +1,58 @@
.. _mikroe_eth_click:
Overview
********
ETH Click is an accessory board in mikroBus™ form factor. It features `ENC28J60`_,
a 28-pin, 10BASE-T stand alone Ethernet Controller with an on-board MAC & PHY,
8K Bytes of Buffer RAM and SPI serial interface.
More information at `Eth Click Shield website`_.
Pins Assignment of the Eth Click 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 |
+-----------------------+---------------------------------------------+
Requirements
************
This shield can only be used with a board which provides a configuration
for Mikro-BUS connectors and defines node aliases for SPI and GPIO interfaces
(see :ref:`shields` for more details).
Programming
***********
Set ``-DSHIELD=mikroe_eth_click`` when you invoke ``west build``. For example:
.. zephyr-app-commands::
:zephyr-app: samples/net/dhcp_client
:board: lpcxpresso55s69
:shield: mikroe_eth_click
:goals: build
References
**********
.. target-notes::
.. _Eth Click Shield website:
https://www.mikroe.com/eth-click
.. _ENC28J60:
https://www.microchip.com/wwwproducts/en/en022889

View file

@ -0,0 +1,7 @@
# ENC28J60 is L2 chip slave on SPI
CONFIG_SPI=y
CONFIG_NET_L2_ETHERNET=y
# ENC28J60 Ethernet Device
CONFIG_ETH_ENC28J60=y
CONFIG_ETH_ENC28J60_0=y

View file

@ -0,0 +1,18 @@
/* Copyright (c) 2020 Linaro Limited.
* SPDX-License-Identifier: Apache-2.0
*/
&mikrobus_spi {
status = "okay";
cs-gpios = <&mikrobus_header 2 0>; /* CS */
eth_click@0 {
compatible = "microchip,enc28j60";
local-mac-address = [00 00 00 01 02 03];
/* Errata B7/1 specifies min 8Mhz, 20MHz max according to RM */
spi-max-frequency = <10000000>;
int-gpios = <&mikrobus_header 7 GPIO_ACTIVE_LOW>; /* INT */
label = "ETH_0";
reg = <0>;
};
};