Skip to content

Commit e42476f

Browse files
mariopajakartben
authored andcommitted
boards: shields: add microe eth3 click
Add shield definition for the Mikroe ETH 3 Click. ETH 3 Click is a compact add-on board that contains LAN9250 SPI Ethernet Controller Signed-off-by: Mario Paja <[email protected]>
1 parent 49eff65 commit e42476f

File tree

5 files changed

+101
-0
lines changed

5 files changed

+101
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Copyright (c) 2024 Mario Paja
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
if SHIELD_MIKROE_ETH3_CLICK
5+
6+
if NETWORKING
7+
8+
# LAN9250 is L2 chip slave on SPI
9+
config NET_L2_ETHERNET
10+
default y
11+
12+
endif # NETWORKING
13+
14+
endif # SHIELD_MIKROE_ETH3_CLICK
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (c) 2024 Mario Paja
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config SHIELD_MIKROE_ETH3_CLICK
5+
def_bool $(shields_list_contains,mikroe_eth3_click)
23.1 KB
Loading
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
.. _mikroe_eth3_click:
2+
3+
MikroElektronika ETH 3 Click
4+
############################
5+
6+
Overview
7+
********
8+
9+
ETH 3 Click is an accessory board in mikroBus™ form factor. It features `LAN9250`_,
10+
a 10/100Mbps BASE-T stand alone Ethernet Controller with an on-board MAC & PHY,
11+
16Kbyte FIFO Buffer and SPI serial interface.
12+
More information at `ETH 3 Click Shield website`_.
13+
14+
.. figure:: eth3_click.webp
15+
:align: center
16+
:alt: MikroElektronika ETH 3 Click
17+
18+
MikroElektronika ETH 3 Click (Credit: MikroElektronika)
19+
20+
Pins Assignment of the Eth Click Shield
21+
=======================================
22+
23+
+-----------------------+---------------------------------------------+
24+
| Shield Connector Pin | Function |
25+
+=======================+=============================================+
26+
| RST# | Ethernet Controller's Reset |
27+
+-----------------------+---------------------------------------------+
28+
| CS# | SPI's Chip Select |
29+
+-----------------------+---------------------------------------------+
30+
| SCK | SPI's ClocK |
31+
+-----------------------+---------------------------------------------+
32+
| SDO | SPI's Slave Data Output (MISO) |
33+
+-----------------------+---------------------------------------------+
34+
| SDI | SPI's Slave Data Input (MISO) |
35+
+-----------------------+---------------------------------------------+
36+
| INT | Ethernet Controller's Interrupt Output |
37+
+-----------------------+---------------------------------------------+
38+
39+
40+
Requirements
41+
************
42+
43+
This shield can only be used with a board which provides a configuration
44+
for Mikro-BUS connectors and defines node aliases for SPI and GPIO interfaces
45+
(see :ref:`shields` for more details).
46+
47+
Programming
48+
***********
49+
50+
Set ``--shield mikroe_eth3_click`` when you invoke ``west build``. For example:
51+
52+
.. zephyr-app-commands::
53+
:zephyr-app: samples/net/dhcpv4_client
54+
:board: mikroe_stm32_m4_clicker
55+
:shield: mikroe_eth3_click
56+
:goals: build
57+
58+
References
59+
**********
60+
61+
.. target-notes::
62+
63+
.. _ETH 3 Click Shield website:
64+
https://www.mikroe.com/eth-3-click
65+
66+
.. _LAN9250:
67+
https://www.microchip.com/en-us/product/lan9250
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/* Copyright (c) 2024 Mario Paja
2+
* SPDX-License-Identifier: Apache-2.0
3+
*/
4+
5+
&mikrobus_spi {
6+
status = "okay";
7+
8+
eth3_click_mikroe_eth3_click: eth3_click@0 {
9+
compatible = "microchip,lan9250";
10+
reg = <0x0>;
11+
local-mac-address = [00 00 00 01 02 03];
12+
spi-max-frequency = <30000000>;
13+
int-gpios = <&mikrobus_header 7 GPIO_ACTIVE_LOW>; /* INT */
14+
};
15+
};

0 commit comments

Comments
 (0)