Skip to content

Commit

Permalink
net: Add DM9051 driver
Browse files Browse the repository at this point in the history
Add davicom dm9051 SPI ethernet driver. The driver work with some
parameters, such as:

 - spi bus number

 - spi chip select

 - spi clock frequency

 - interrupt gpio pin

Interrupt polarity fixed to low.
Test OK with Raspberry Pi 2 and Pi 4 as well for its broadcom CPUs.
This driver can work to many other CPUs too, since it independently
uses the lower spi control functions that are provided from the CPU
vendors.

Signed-off-by: Joseph CHANG <josright123@gmail.com>
  • Loading branch information
josright123 authored and intel-lab-lkp committed Dec 8, 2021
1 parent f545705 commit 9ee7a9a
Show file tree
Hide file tree
Showing 4 changed files with 1,277 additions and 0 deletions.
30 changes: 30 additions & 0 deletions drivers/net/ethernet/davicom/Kconfig
Expand Up @@ -3,6 +3,20 @@
# Davicom device configuration
#

config NET_VENDOR_DAVICOM
bool "Davicom devices"
depends on ARM || MIPS || COLDFIRE || NIOS2 || COMPILE_TEST || SPI
default y
help
If you have a network (Ethernet) card belonging to this class, say Y.

Note that the answer to this question doesn't directly affect the
kernel: saying N will just cause the configurator to skip all
the questions about Davicom devices. If you say Y, you will be asked
for your specific card in the following selections.

if NET_VENDOR_DAVICOM

config DM9000
tristate "DM9000 support"
depends on ARM || MIPS || COLDFIRE || NIOS2 || COMPILE_TEST
Expand All @@ -22,3 +36,19 @@ config DM9000_FORCE_SIMPLE_PHY_POLL
bit to determine if the link is up or down instead of the more
costly MII PHY reads. Note, this will not work if the chip is
operating with an external PHY.

config DM9051
tristate "DM9051 SPI support"
depends on SPI
select CRC32
select MII
help
Support for DM9051 SPI chipset.

To compile this driver as a module, choose M here. The module
will be called dm9051.

The SPI mode for the host's SPI master to access DM9051 is mode
0 on the SPI bus.

endif # NET_VENDOR_DAVICOM
1 change: 1 addition & 0 deletions drivers/net/ethernet/davicom/Makefile
Expand Up @@ -4,3 +4,4 @@
#

obj-$(CONFIG_DM9000) += dm9000.o
obj-$(CONFIG_DM9051) += dm9051.o

0 comments on commit 9ee7a9a

Please sign in to comment.