Commit graph

36 commits

Author SHA1 Message Date
Jukka Rissanen c6a19a2046 cmake: qemu: Allow user to add parameters to Ethernet TAP
User can now add extra Ethernet TAP parameters when starting QEMU.
This is useful if we want to set for example the MAC address
of the network interface.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-05-20 15:36:39 +02:00
Jukka Rissanen c03336e442 cmake: Allow change of the QEMU Ethernet interface name
Instead of hardcoding the "zeth" network interface name, use the
name defined in Kconfig so that user can change it if needed.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-03-10 14:38:28 +02:00
Oane Kingma 437587af20 drivers/ethernet: Add support for SiLabs Giant Gecko GG11
Ethernet MAC present in Silicon Labs EFM32GG11B4xx and
EFM32GG11B8xx SoCs.

DMA based driver with support for link up/down detection.

Signed-off-by: Oane Kingma <o.kingma@interay.com>
2020-01-24 10:28:33 -06:00
Ulf Magnusson bd6e04411e kconfig: Clean up header comments and make them consistent
Use this short header style in all Kconfig files:

    # <description>

    # <copyright>
    # <license>

    ...

Also change all <description>s from

    # Kconfig[.extension] - Foo-related options

to just

    # Foo-related options

It's clear enough that it's about Kconfig.

The <description> cleanup was done with this command, along with some
manual cleanup (big letter at the start, etc.)

    git ls-files '*Kconfig*' | \
        xargs sed -i -E '1 s/#\s*Kconfig[\w.-]*\s*-\s*/# /'

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-11-04 17:31:27 -05:00
Johann Fischer d8d7782790 drivers: eth: add driver for ENC424J600 Ethernet Controller
Add driver for ENC424J600 Ethernet Controller.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-09-12 11:30:19 +03:00
Charles E. Youse cda625b726 drivers/ethernet/eth_dw: remove DesignWare Ethernet driver
This was only used on the Quark SoCs. It is no longer used, can no
longer be tested, and it's reliant upon the deprecated legacy PCI
subsystem. Remove it to prevent bitrot.

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-09-08 22:09:10 -04:00
Mariusz Glebocki 35edfedf68 drivers: ethernet: Add LiteEth driver
Add LiteX Ethernet driver with bindings for this device.

Signed-off-by: Mariusz Glebocki <mglebocki@antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
2019-07-22 15:28:54 +03:00
Paul Sokolovsky 483b9d609c 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 <paul.sokolovsky@linaro.org>
2019-01-19 11:59:29 -05:00
Sebastian Bøe 92ccd2ccd8 kconfig: Refactor the dependency on 'NET_L2_ETHERNET'
Refactor the dependency on 'NET_L2_ETHERNET'.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-12-30 16:24:50 -05:00
Vijay Kumar B cffb2d8051 drivers: ethernet: Add TI Stellaris ethernet controller driver.
The driver can be tested using different networking emulation
approaches.

This approach will work across multiple Qemu instances. There can be
more than one Qemu instance, run using the following command. They
would appear to be on the same Ethernet network.

  $ qemu-system-arm -M lm3s6965evb                      \
                    -serial stdio                       \
                    -net nic                            \
                    -net socket,mcast=230.0.0.1:1234    \
                    -kernel zephyr.elf

This approach will work with other virtualization technologies that
support connecting to a VDE switch, like VirtualBox and User Mode
Linux. The switch can be started using the following command.

  $ vde_switch --sock /tmp/switch

Qemu can be connected to the switch using the following command.

  $ qemu-system-arm -M lm3s6965evb                      \
                    -serial stdio                       \
                    -net nic                            \
                    -net vde,sock=/tmp/switch   	\
                    -kernel zephyr.elf

Signed-off-by: Fadhel Habeeb <fadhel@zilogic.com>
Signed-off-by: Nirav Parmar <niravparmar@zilogic.com>
Signed-off-by: Vijay Kumar B <vijaykumar@zilogic.com>
2018-12-04 09:36:51 -06:00
Oleg Zhurakivskyy 65ea181c92 drivers: eth: e1000: Add driver for Intel PRO/1000 Ethernet controller
This patch adds a driver for Intel PRO/1000 Gigabit Ethernet controller.

The driver currently supports only a single instance of the NIC.

Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
2018-10-10 04:17:15 -04:00
Jukka Rissanen 009e4dafa7 net: Make Kconfig template variables prettier
Adding spaces around "=" when definining Kconfig template so
that is more consistent with overall style of these template
variables.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-10-05 09:01:37 -04:00
Jukka Rissanen 20295c821b drivers: eth: Convert to use new logging
Convert the ethernet drivers to use the new logging system.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-10-04 14:13:57 +03:00
Ulf Magnusson 8cf8db3a73 Kconfig: Use a short, consistent style for prompts
Consistently use

    config FOO
            bool/int/hex/string "Prompt text"

instead of

    config FOO
            bool/int/hex/string
            prompt "Prompt text"

(...and a bunch of other variations that e.g. swapped the order of the
type and the 'prompt', or put other properties between them).

The shorthand is fully equivalent to using 'prompt'. It saves lines and
avoids tricking people into thinking there is some semantic difference.

Most of the grunt work was done by a modified version of
https://unix.stackexchange.com/questions/26284/
how-can-i-use-sed-to-replace-a-multi-line-string/26290#26290, but some
of the rarer variations had to be converted manually.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-08-15 04:10:10 -07:00
Jukka Rissanen 0f66426f4a drivers: eth: Add ethernet driver for native posix arch
This creates zeth network interface in your host and allows user
to send and receive data sent to this network interface.

Fixes #6007

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-03-18 20:47:36 -04:00
Erwin Rol 6e3782480e driver: eth_stm32_hal: Initial STM32 HAL based Ethernet driver
Signed-off-by: Erwin Rol <erwin@erwinrol.com>
2017-07-12 12:53:51 +03:00
David B. Kinder 93e4d7258d spell: fix Kconfig help typos: /boards /drivers
Fix misspellings in Kconfig help text

Change-Id: I3ae28a5d23d8e266612114bc0eb8a6e158129dc7
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-04-21 21:31:30 +00:00
Anas Nashif 9f004d9b7c drivers: make ethernet init prio depend on NET_L2_ETHERNET
Change-Id: I5e72e7ba53e65e5ebc2b41fa30b84513fe10c998
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-02-02 14:43:51 +00:00
Piotr Mienkowski d519ef17b7 drivers: Add Atmel SAM family GMAC Ethernet driver
This is a zero-copy networking implementation of Ethernet driver.

Limitations:
- one shot PHY setup, no support for PHY disconnect/reconnect
- no support for devices with DCache enabled due to missing
  non-cacheable RAM regions in Zephyr.

Tested on Atmel SMART SAM E70 Xplained board

Origin: Original

Jira: ZEP-1492
Change-Id: Ib944f91193efbd12c1142b0bcf1f635388bf1b87
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2017-02-01 21:01:19 +00:00
David B. Kinder ac74d8b652 license: Replace Apache boilerplate with SPDX tag
Replace the existing Apache 2.0 boilerplate header with an SPDX tag
throughout the zephyr code tree. This patch was generated via a
script run over the master branch.

Also updated doc/porting/application.rst that had a dependency on
line numbers in a literal include.

Manually updated subsys/logging/sys_log.c that had a malformed
header in the original file.  Also cleanup several cases that already
had a SPDX tag and we either got a duplicate or missed updating.

Jira: ZEP-1457

Change-Id: I6131a1d4ee0e58f5b938300c2d2fc77d2e69572c
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-01-19 03:50:58 +00:00
Maureen Helm 40f5de5a56 ethernet: Rename ksdk to mcux
Renames the ksdk ethernet shim driver to mcux.

Change-Id: Ief03eabe4ce39be0d0896543c1cb660ff380b439
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2017-01-12 09:46:26 -06:00
Marcus Shawcroft 9094fdb8c4 eth/config: Group ethernet driver configuration into one menu.
Change-Id: Ieff568916f2c0428719e3e217ce0ca1ddf2908ff
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-12-20 13:47:32 +00:00
Tomasz Bursztyka d882e24002 drivers: ethernet: Enable sys log levels depending on NET_ETHERNET_L2
ETHERNET is a left-over from old and now unavailable IP stack.

Change-Id: I488d9ffcfb1fe3589b522dc2d620873daeb892c8
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-12-16 19:14:54 +01:00
Tomasz Bursztyka 58c34af329 drivers: ethernet: Push DW specific Kconfig options to its own file
Note: This driver need to be ported to new native IP stack in order to
be available again.

Change-Id: I7825c8679e66f8a1d44d75c9d53e9da207b743af
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-12-16 19:14:54 +01:00
Jukka Rissanen f2b7492269 ethernet: Add driver initialization priority to Kconfig
The default kernel init priority is too low. Make this
configurable and set the default priority so that the
ethernet driver is started just before the network stack.

This commit adds generic ethernet priority and changes
currently available ethernet drivers to use it.

Change-Id: If695e52b6dd9ea227f10ba306bb145d72d2312b0
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-12-02 12:41:17 +02:00
Marcus Shawcroft 87077727bf eth: Add KSDK ENET driver.
Provide a network driver wrapped around the KSDK ENET and PHY
drivers.

The driver performs one shot PHY setup.  There is no support for PHY
disconnect, reconnect or configuration change.  The PHY setup,
implement via KSDK contains polled code that can block the
initialization thread for a few seconds.

There is no statistics collection for either normal operation or error
behaviour.

Origin: Original

Change-Id: Ia0f2e89a61348ed949976070353e823c178fcb24
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-16 09:57:35 +00:00
Marcus Shawcroft 352ef5f033 eth: Rework LOG_ETHERNET_LEVEL config description.
Generalize the LOG_ETHERNET_LEVEL configuration parameter for use with
multiple ethernet drivers.

Change-Id: I26bc2189c8cf79db19f59e8082caec03b0d9c7b8
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-05 11:29:37 +00:00
Kumar Gala 9ec847e608 Revert "rfc: ksdk: Add KSDK ENET driver."
This reverts commit 581e15ced2.

The commit was marked RFC and should not have been merged yet.

Change-Id: Iafd3587f8840e64670c32fa5726ea20ac9c9962a
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-09-23 09:07:26 -05:00
Marcus Shawcroft 581e15ced2 rfc: ksdk: Add KSDK ENET driver.
Provide a network driver wrapped around the KSDK ENET and PHY
drivers.

This driver is functional, just.  It is not in a fit state to be merged to master yet.

Origin: Original

Change-Id: Id29e756f33c6c0263926139188c49f9a9c3d5e09
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-09-23 01:54:00 +00:00
Juan Manuel Cruz 184a399f61 driver: ENC28J60 Ethernet SPI module
Adds the ENC28J60 Ethernet module driver.

Origin: Original
JIRA: ZEP-291

Change-Id: I2b5790ecb251f9059f172bcaafadef24bd27207a
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
2016-08-05 20:36:44 +00:00
Ravi kumar Veeramally f93771a25c Revert "net: Restructured Ethernet driver menu"
This reverts commit 6de5643eb1.

Patch breaks applications running over Ethernet.

Jira: ZEP-565

Change-Id: Id147b7089f175c769c42c4e3dfb95408ee17ba9e
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-07-20 22:57:55 +00:00
Jani Pajarinen 6de5643eb1 net: Restructured Ethernet driver menu
Created menu for Ethernet driver and moved driver + debugging setting
under it. Changed prompt from "Grove log level" to more describing and
fixed typos.

Change-Id: If2f79fee1a002a42e89e2493a2294332abec05ee
Signed-off-by: Jani Pajarinen <jani.pajarinen@intel.com>
2016-07-13 14:33:44 +00:00
Kumar Gala 9ec2f3be80 Cleanup whitespace in Kconfig files
Convert leading whitespace into tabs in Kconfig files.  Also replaced
double spaces between config and <prompt>.

Change-Id: I341c718ecf4143529b477c239bbde88e18f37062
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-05-25 13:28:07 -05:00
Anas Nashif 90db02786c eth_dw: use sys log interface for debugging
Change-Id: I40ad4d2aa0419a7439a2fc0883a83430fa755b84
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-12 10:57:27 +00:00
Daniel Leung ba4099430b ethernet/dw: remove kconfigs that are SoC specific
Remove those kconfig options that are SoC specific, and
should not be configurable via kconfig.

Change-Id: Ib483419be5199b52cf281b4b106cd8a3be95b7be
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-04-07 00:58:57 +00:00
Michael LeMay ebba3bf38b eth: dw: Add driver for Synopsys DesignWare Ethernet MAC
This patch adds a driver for a Synopsys DesignWare Ethernet MAC.  The
driver uses interrupts to handle received frames, but it uses a
spinloop when transmitting to wait for the transmit descriptor to
become available.  Transmission is coordinated by a fiber, so this
should not result in the system execution being blocked.  Only a
single descriptor is allocated for each of the transmit and receive
directions to save memory and simplify the code.  Another
simplification is that none of the offload capabilities of the
Ethernet device are used.  The driver currently only supports a single
instance of the Ethernet MAC, which is consistent with the limitation
in the network stack that only a single network device is supported.

Change-Id: I013b3d439a76e8ff91a775516f7035841b040870
Signed-off-by: Michael LeMay <michael.lemay@intel.com>
2016-02-05 20:24:38 -05:00