Skip to content

Commit 28ff3e1

Browse files
SgrrZhfcarlescufi
authored andcommitted
drivers: eth_smsc91x: Add driver for SMSC91C111 aka LAN91C111 chip
Arm fvp_baser_aemv8r and fvp_base_revc_2xaemv8a boards are using SMSC91C111 as their ethernet adapters. Portions of the codes are based on FreeBSD code from its 'src/sys/dev/smc/if_smc.c' and 'src/sys/dev/smc/if_smcreg.h'. This driver has two parts, one is the ethernet controller driver, which is MAC layer driver. The other is the MDIO driver, which is the PHY layer driver. Both of them are in the same source file due to that they need to share the same reading and writing register functions and the smsc object. The mdio driver is needed by the existing 'phy_mii' driver, which is a driver for the generic MII-compliant PHY. This driver was developed under the fvp_base_revc_2xaemv8a target and has been tested on the fvp_baser_aemv8r target. Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
1 parent 9bf75d1 commit 28ff3e1

File tree

7 files changed

+1049
-0
lines changed

7 files changed

+1049
-0
lines changed

drivers/ethernet/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ zephyr_library_sources_ifdef(CONFIG_ETH_W5500 eth_w5500.c)
3030
zephyr_library_sources_ifdef(CONFIG_ETH_SAM_GMAC eth_sam_gmac.c)
3131
zephyr_library_sources_ifdef(CONFIG_ETH_CYCLONEV eth_cyclonev.c)
3232
zephyr_library_sources_ifdef(CONFIG_SLIP_TAP eth_slip_tap.c)
33+
zephyr_library_sources_ifdef(CONFIG_ETH_SMSC91X eth_smsc91x.c)
3334

3435
if(CONFIG_ETH_NXP_S32_NETC)
3536
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
@@ -57,6 +57,7 @@ source "drivers/ethernet/Kconfig.dsa"
5757
source "drivers/ethernet/Kconfig.xlnx_gem"
5858
source "drivers/ethernet/Kconfig.cyclonev"
5959
source "drivers/ethernet/Kconfig.nxp_s32"
60+
source "drivers/ethernet/Kconfig.smsc91x"
6061

6162
source "drivers/ethernet/phy/Kconfig"
6263

drivers/ethernet/Kconfig.smsc91x

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Copyright (c) 2023 Arm Limited (or its affiliates). All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config ETH_SMSC91X
5+
bool "SMSC91x Ethernet driver"
6+
default y
7+
depends on DT_HAS_SMSC_LAN91C111_ENABLED
8+
help
9+
Enable driver for SMSC/LAN91x family of chips.

0 commit comments

Comments
 (0)