Skip to content

drivers: ethernet: smsc9118 driver (as used by mps2_an385) #11680

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jan 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions boards/arm/mps2_an385/Kconfig.board
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
config BOARD_MPS2_AN385
bool "ARM Cortex-M3 SMM on V2M-MPS2 (Application Note AN385)"
depends on SOC_MPS2_AN385
select QEMU_TARGET
select HAS_COVERAGE_SUPPORT
11 changes: 11 additions & 0 deletions boards/arm/mps2_an385/mps2_an385.dts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
chosen {
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
zephyr,uart-pipe = &uart1;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
};
Expand Down Expand Up @@ -128,6 +129,16 @@
interrupts = <17 3>;
};

eth0: eth@0 {
/* Linux has "smsc,lan9115" */
compatible = "smsc,lan9220";
/* Such a big size from memory map in AN385 */
/* Actual reg range is ~0x200 */
reg = <0x40200000 0x100000>;
label = "eth0";
interrupts = <13 3>;
};

i2c_touch: i2c@40022000 {
compatible = "arm,versatile-i2c";
clock-frequency = <I2C_BITRATE_STANDARD>;
Expand Down
2 changes: 2 additions & 0 deletions boards/arm/mps2_an385/mps2_an385.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@ toolchain:
- zephyr
- gnuarmemb
- xtools
supported:
- netif:slip
testing:
default: true
1 change: 1 addition & 0 deletions drivers/ethernet/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ zephyr_sources_ifdef(CONFIG_ETH_DW eth_dw.c)
zephyr_sources_ifdef(CONFIG_ETH_E1000 eth_e1000.c)
zephyr_sources_ifdef(CONFIG_ETH_ENC28J60 eth_enc28j60.c)
zephyr_sources_ifdef(CONFIG_ETH_MCUX eth_mcux.c)
zephyr_sources_ifdef(CONFIG_ETH_SMSC911X eth_smsc911x.c)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merge this patch with previous one. Driver comes all file at once: code, Kconfig and built directives

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, didn't notice we had it like that. Done.

zephyr_sources_ifdef(CONFIG_ETH_STM32_HAL eth_stm32_hal.c)

if(CONFIG_ETH_NATIVE_POSIX)
Expand Down
1 change: 1 addition & 0 deletions drivers/ethernet/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ source "drivers/ethernet/Kconfig.dw"
source "drivers/ethernet/Kconfig.e1000"
source "drivers/ethernet/Kconfig.sam_gmac"
source "drivers/ethernet/Kconfig.stm32_hal"
source "drivers/ethernet/Kconfig.smsc911x"
source "drivers/ethernet/Kconfig.native_posix"
source "drivers/ethernet/Kconfig.stellaris"

Expand Down
20 changes: 20 additions & 0 deletions drivers/ethernet/Kconfig.smsc911x
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#
# Copyright (c) 2018 Linaro Limited
#
# SPDX-License-Identifier: Apache-2.0
#

menuconfig ETH_SMSC911X
bool "SMSC911x/9220 Ethernet driver"
depends on NET_L2_ETHERNET
help
Enable driver for SMSC/LAN911x/9220 family of chips.

# Hidden option
config ETH_NIC_MODEL
string
default "lan9118"
depends on ETH_SMSC911X
help
Tells what Qemu network model to use. This value is given as
a parameter to -nic qemu command line option.
Loading