Skip to content

Commit a1b86c5

Browse files
committed
Merge branch 'dm9051'
Joseph CHAMG says: ==================== ADD DM9051 ETHERNET DRIVER DM9051 is a spi interface chip, need cs/mosi/miso/clock with an interrupt gpio pin ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 2e13bde + 2dc95a4 commit a1b86c5

File tree

5 files changed

+1516
-0
lines changed

5 files changed

+1516
-0
lines changed
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/net/davicom,dm9051.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Davicom DM9051 SPI Ethernet Controller
8+
9+
maintainers:
10+
- Joseph CHANG <[email protected]>
11+
12+
description: |
13+
The DM9051 is a fully integrated and cost-effective low pin count single
14+
chip Fast Ethernet controller with a Serial Peripheral Interface (SPI).
15+
16+
allOf:
17+
- $ref: ethernet-controller.yaml#
18+
19+
properties:
20+
compatible:
21+
const: davicom,dm9051
22+
23+
reg:
24+
maxItems: 1
25+
26+
spi-max-frequency:
27+
maximum: 45000000
28+
29+
interrupts:
30+
maxItems: 1
31+
32+
local-mac-address: true
33+
34+
mac-address: true
35+
36+
required:
37+
- compatible
38+
- reg
39+
- spi-max-frequency
40+
- interrupts
41+
42+
additionalProperties: false
43+
44+
examples:
45+
# Raspberry Pi platform
46+
- |
47+
/* for Raspberry Pi with pin control stuff for GPIO irq */
48+
#include <dt-bindings/interrupt-controller/irq.h>
49+
#include <dt-bindings/gpio/gpio.h>
50+
spi {
51+
#address-cells = <1>;
52+
#size-cells = <0>;
53+
54+
ethernet@0 {
55+
compatible = "davicom,dm9051";
56+
reg = <0>; /* spi chip select */
57+
local-mac-address = [00 00 00 00 00 00];
58+
interrupt-parent = <&gpio>;
59+
interrupts = <26 IRQ_TYPE_LEVEL_LOW>;
60+
spi-max-frequency = <31200000>;
61+
};
62+
};

drivers/net/ethernet/davicom/Kconfig

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,19 @@
33
# Davicom device configuration
44
#
55

6+
config NET_VENDOR_DAVICOM
7+
bool "Davicom devices"
8+
default y
9+
help
10+
If you have a network (Ethernet) card belonging to this class, say Y.
11+
12+
Note that the answer to this question doesn't directly affect the
13+
kernel: saying N will just cause the configurator to skip all
14+
the questions about Davicom devices. If you say Y, you will be asked
15+
for your specific card in the following selections.
16+
17+
if NET_VENDOR_DAVICOM
18+
619
config DM9000
720
tristate "DM9000 support"
821
depends on ARM || MIPS || COLDFIRE || NIOS2 || COMPILE_TEST
@@ -22,3 +35,21 @@ config DM9000_FORCE_SIMPLE_PHY_POLL
2235
bit to determine if the link is up or down instead of the more
2336
costly MII PHY reads. Note, this will not work if the chip is
2437
operating with an external PHY.
38+
39+
config DM9051
40+
tristate "DM9051 SPI support"
41+
depends on SPI
42+
select CRC32
43+
select MDIO
44+
select PHYLIB
45+
select REGMAP_SPI
46+
help
47+
Support for DM9051 SPI chipset.
48+
49+
To compile this driver as a module, choose M here. The module
50+
will be called dm9051.
51+
52+
The SPI mode for the host's SPI master to access DM9051 is mode
53+
0 on the SPI bus.
54+
55+
endif # NET_VENDOR_DAVICOM

drivers/net/ethernet/davicom/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
#
55

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

0 commit comments

Comments
 (0)