Skip to content

Commit d58f3ae

Browse files
committed
drivers: ethernet: add support for microchip lan9250
This PR adds support for LAN9250 spi ethernet controller. This driver is tested on the Mikroe ETH Click 3 https://www.mikroe.com/eth-3-click Signed-off-by: Mario Paja <[email protected]>
1 parent 42262e8 commit d58f3ae

File tree

6 files changed

+1096
-0
lines changed

6 files changed

+1096
-0
lines changed

drivers/ethernet/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ zephyr_library_sources_ifdef(CONFIG_ETH_LAN865X eth_lan865x.c oa_tc6.c)
4242
zephyr_library_sources_ifdef(CONFIG_ETH_XMC4XXX eth_xmc4xxx.c)
4343
zephyr_library_sources_ifdef(CONFIG_ETH_TEST eth_test.c)
4444
zephyr_library_sources_ifdef(CONFIG_ETH_RENESAS_RA eth_renesas_ra.c)
45+
zephyr_library_sources_ifdef(CONFIG_ETH_LAN9250 eth_lan9250.c)
4546

4647
if(CONFIG_ETH_NXP_S32_NETC)
4748
zephyr_library_sources(eth_nxp_s32_netc.c)

drivers/ethernet/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ source "drivers/ethernet/Kconfig.numaker"
7575
source "drivers/ethernet/Kconfig.lan865x"
7676
source "drivers/ethernet/Kconfig.xmc4xxx"
7777
source "drivers/ethernet/Kconfig.test"
78+
source "drivers/ethernet/Kconfig.lan9250"
7879

7980
source "drivers/ethernet/eth_nxp_enet_qos/Kconfig"
8081

drivers/ethernet/Kconfig.lan9250

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# LAN9250 Stand-alone Ethernet Controller configuration options
2+
3+
# Copyright (c) 2024 Mario Paja
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
7+
menuconfig ETH_LAN9250
8+
bool "LAN9250 Ethernet Controller"
9+
default y
10+
depends on DT_HAS_MICROCHIP_LAN9250_ENABLED
11+
select SPI
12+
help
13+
LAN9250 Stand-Alone Ethernet Controller
14+
with SPI Interface
15+
16+
if ETH_LAN9250
17+
18+
config ETH_LAN9250_RX_THREAD_STACK_SIZE
19+
int "Stack size for internal incoming packet handler"
20+
default 800
21+
help
22+
Size of the stack used for internal thread which is ran for
23+
incoming packet processing.
24+
25+
config ETH_LAN9250_RX_THREAD_PRIO
26+
int "Priority for internal incoming packet handler"
27+
default 2
28+
help
29+
Priority level for internal thread which is ran for incoming
30+
packet processing.
31+
32+
config ETH_LAN9250_BUF_ALLOC_TIMEOUT
33+
int "Network buffer allocation timeout"
34+
default 100
35+
help
36+
Given timeout in milliseconds. Maximum amount of time
37+
that the driver will wait from the IP stack to get
38+
a memory buffer before the Ethernet frame is dropped.
39+
40+
endif

0 commit comments

Comments
 (0)