Skip to content

Commit

Permalink
driver: eth: Support for lan8651 T1S ETH
Browse files Browse the repository at this point in the history
This patch set provides support for T1S ethernet device - LAN8651.

For SPI communication the implementation of Open Alliance TC6
specification is used.

The driver implementation focuses mostly on reducing memory footprint,
as the used SoC (STM32G491) for development has only 32 KiB RAM in total.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
  • Loading branch information
Lukasz Majewski committed Nov 6, 2023
1 parent 2b30849 commit 7200f6f
Show file tree
Hide file tree
Showing 7 changed files with 759 additions and 0 deletions.
1 change: 1 addition & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Expand Up @@ -304,6 +304,7 @@
/drivers/ethernet/*smsc91x* @sgrrzhf
/drivers/ethernet/*adin2111* @GeorgeCGV
/drivers/ethernet/*oa_tc6* @lmajewski
/drivers/ethernet/*lan865x* @lmajewski
/drivers/ethernet/phy/ @rlubos @tbursztyka @arvinf @jukkar
/drivers/ethernet/phy/*adin2111* @GeorgeCGV
/drivers/mdio/ @rlubos @tbursztyka @arvinf
Expand Down
1 change: 1 addition & 0 deletions drivers/ethernet/CMakeLists.txt
Expand Up @@ -34,6 +34,7 @@ zephyr_library_sources_ifdef(CONFIG_SLIP_TAP eth_slip_tap.c)
zephyr_library_sources_ifdef(CONFIG_ETH_SMSC91X eth_smsc91x.c)
zephyr_library_sources_ifdef(CONFIG_ETH_IVSHMEM eth_ivshmem.c eth_ivshmem_queue.c)
zephyr_library_sources_ifdef(CONFIG_ETH_ADIN2111 eth_adin2111.c)
zephyr_library_sources_ifdef(CONFIG_ETH_LAN865X eth_lan865x.c oa_tc6.c)

if(CONFIG_ETH_NXP_S32_NETC)
zephyr_library_sources(eth_nxp_s32_netc.c)
Expand Down
1 change: 1 addition & 0 deletions drivers/ethernet/Kconfig
Expand Up @@ -62,6 +62,7 @@ source "drivers/ethernet/Kconfig.smsc91x"
source "drivers/ethernet/Kconfig.ivshmem"
source "drivers/ethernet/Kconfig.adin2111"
source "drivers/ethernet/Kconfig.numaker"
source "drivers/ethernet/Kconfig.lan865x"

source "drivers/ethernet/phy/Kconfig"

Expand Down
50 changes: 50 additions & 0 deletions drivers/ethernet/Kconfig.lan865x
@@ -0,0 +1,50 @@
# Copyright (c) 2023 DENX Software Engineering GmbH
# SPDX-License-Identifier: Apache-2.0

menuconfig ETH_LAN865X
bool "LAN865X 10BASE-T1S Controller"
default y
depends on DT_HAS_MICROCHIP_LAN865X_ENABLED
select SPI
help
The LAN865X is a low power, 10BASE-T1S transceiver compliant with
the IEEE® 802.3cg-2019™ Ethernet standard for long reach, 10
Mbps single pair Ethernet (SPE).

Featuring an integrated media access control (MAC) and a PHY,
the LAN865X enables direct connectivity with a variety of controllers
via a serial peripheral inter-face (SPI).

if ETH_LAN865X

config ETH_LAN865X_INIT_PRIORITY
int "LAN865X driver init priority"
default 72
help
LAN865X device driver initialization priority.
Must be initialized after SPI.


config ETH_LAN865X_IRQ_THREAD_STACK_SIZE
int "Stack size for a thread that processes IRQ"
default 512
help
Size of the stack used for internal thread which is ran to
process raised INT IRQ.

config ETH_LAN865X_IRQ_THREAD_PRIO
int "Priority for internal incoming packet handler"
default 2
help
Priority level for internal thread which is ran for LAN
INT IRQ processing.

config ETH_LAN865X_TIMEOUT
int "IP buffer timeout"
default 100
help
Given timeout in milliseconds. Maximum amount of time
that the driver will wait from the IP stack to get
a memory buffer before the Ethernet frame is dropped.

endif # ETH_LAN865X

0 comments on commit 7200f6f

Please sign in to comment.