Skip to content

Commit b8e225c

Browse files
committed
drivers: eth_smsc911x: Add driver for SMSC9118 aka LAN9118 chip
As emulated by QEMU. SMSC9118 is compatible with SMSC9220 as used in ARM MPS2 board, as well as SMSC9115/6/7/etc. devices. Portions of the code are based on mbedOS code from its targets/TARGET_ARM_SSG/TARGET_CM3DS_MPS2/device/drivers/smsc9220_eth.c eth_smsc9220_priv.h originally comes from Arm mbedOS file: targets/TARGET_ARM_SSG/TARGET_CM3DS_MPS2/device/drivers/smsc9220_eth.h augmented with struct & defines from: targets/TARGET_ARM_SSG/TARGET_CM3DS_MPS2/device/CM3DS.h and renamed as eth_smsc911x_priv.h to follow Zephyr conventions. Then, following changes applied: Changes to build under Zephyr, changes to use symbolic constants and field access helpers, typo fixes, etc. Signed-off-by: Paul Sokolovsky <[email protected]>
1 parent 7e42237 commit b8e225c

File tree

5 files changed

+935
-0
lines changed

5 files changed

+935
-0
lines changed

drivers/ethernet/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ zephyr_sources_ifdef(CONFIG_ETH_DW eth_dw.c)
1010
zephyr_sources_ifdef(CONFIG_ETH_E1000 eth_e1000.c)
1111
zephyr_sources_ifdef(CONFIG_ETH_ENC28J60 eth_enc28j60.c)
1212
zephyr_sources_ifdef(CONFIG_ETH_MCUX eth_mcux.c)
13+
zephyr_sources_ifdef(CONFIG_ETH_SMSC911X eth_smsc911x.c)
1314
zephyr_sources_ifdef(CONFIG_ETH_STM32_HAL eth_stm32_hal.c)
1415

1516
if(CONFIG_ETH_NATIVE_POSIX)

drivers/ethernet/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ source "drivers/ethernet/Kconfig.dw"
3030
source "drivers/ethernet/Kconfig.e1000"
3131
source "drivers/ethernet/Kconfig.sam_gmac"
3232
source "drivers/ethernet/Kconfig.stm32_hal"
33+
source "drivers/ethernet/Kconfig.smsc911x"
3334
source "drivers/ethernet/Kconfig.native_posix"
3435
source "drivers/ethernet/Kconfig.stellaris"
3536

drivers/ethernet/Kconfig.smsc911x

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#
2+
# Copyright (c) 2018 Linaro Limited
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
7+
menuconfig ETH_SMSC911X
8+
bool "SMSC911x/9220 Ethernet driver"
9+
depends on NET_L2_ETHERNET
10+
help
11+
Enable driver for SMSC/LAN911x/9220 family of chips.
12+
13+
# Hidden option
14+
config ETH_NIC_MODEL
15+
string
16+
default "lan9118"
17+
depends on ETH_SMSC911X
18+
help
19+
Tells what Qemu network model to use. This value is given as
20+
a parameter to -nic qemu command line option.

0 commit comments

Comments
 (0)