Skip to content

Commit 3f51850

Browse files
wojtas-marcindavem330
authored andcommitted
ethernet: Add new driver for Marvell Armada 375 network unit
This commit adds a new network driver for the network controller in Marvell Armada 375 SoC. Given the controller is very different from the ones in the other Marvell SoCs that use the mv643xx_eth (Kirkwood, Orion, Discovery) and mvneta (Armada 370/38x/XP) drivers, a new driver is needed. Signed-off-by: Marcin Wojtas <mw@semihalf.com> [Ezequiel: coding style cleanup] Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent b642881 commit 3f51850

File tree

4 files changed

+6463
-0
lines changed

4 files changed

+6463
-0
lines changed
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
* Marvell Armada 375 Ethernet Controller (PPv2)
2+
3+
Required properties:
4+
5+
- compatible: should be "marvell,armada-375-pp2"
6+
- reg: addresses and length of the register sets for the device.
7+
Must contain the following register sets:
8+
- common controller registers
9+
- LMS registers
10+
In addition, at least one port register set is required.
11+
- clocks: a pointer to the reference clocks for this device, consequently:
12+
- main controller clock
13+
- GOP clock
14+
- clock-names: names of used clocks, must be "pp_clk" and "gop_clk".
15+
16+
The ethernet ports are represented by subnodes. At least one port is
17+
required.
18+
19+
Required properties (port):
20+
21+
- interrupts: interrupt for the port
22+
- port-id: should be '0' or '1' for ethernet ports, and '2' for the
23+
loopback port
24+
- phy-mode: See ethernet.txt file in the same directory
25+
26+
Optional properties (port):
27+
28+
- marvell,loopback: port is loopback mode
29+
- phy: a phandle to a phy node defining the PHY address (as the reg
30+
property, a single integer). Note: if this property isn't present,
31+
then fixed link is assumed, and the 'fixed-link' property is
32+
mandatory.
33+
34+
Example:
35+
36+
ethernet@f0000 {
37+
compatible = "marvell,armada-375-pp2";
38+
reg = <0xf0000 0xa000>,
39+
<0xc0000 0x3060>,
40+
<0xc4000 0x100>,
41+
<0xc5000 0x100>;
42+
clocks = <&gateclk 3>, <&gateclk 19>;
43+
clock-names = "pp_clk", "gop_clk";
44+
status = "okay";
45+
46+
eth0: eth0@c4000 {
47+
interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
48+
port-id = <0>;
49+
status = "okay";
50+
phy = <&phy0>;
51+
phy-mode = "gmii";
52+
};
53+
54+
eth1: eth1@c5000 {
55+
interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
56+
port-id = <1>;
57+
status = "okay";
58+
phy = <&phy3>;
59+
phy-mode = "gmii";
60+
};
61+
};

drivers/net/ethernet/marvell/Kconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,14 @@ config MVNETA
5454
driver, which should be used for the older Marvell SoCs
5555
(Dove, Orion, Discovery, Kirkwood).
5656

57+
config MVPP2
58+
tristate "Marvell Armada 375 network interface support"
59+
depends on MACH_ARMADA_375
60+
select MVMDIO
61+
---help---
62+
This driver supports the network interface units in the
63+
Marvell ARMADA 375 SoC.
64+
5765
config PXA168_ETH
5866
tristate "Marvell pxa168 ethernet support"
5967
depends on CPU_PXA168

drivers/net/ethernet/marvell/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
obj-$(CONFIG_MVMDIO) += mvmdio.o
66
obj-$(CONFIG_MV643XX_ETH) += mv643xx_eth.o
77
obj-$(CONFIG_MVNETA) += mvneta.o
8+
obj-$(CONFIG_MVPP2) += mvpp2.o
89
obj-$(CONFIG_PXA168_ETH) += pxa168_eth.o
910
obj-$(CONFIG_SKGE) += skge.o
1011
obj-$(CONFIG_SKY2) += sky2.o

0 commit comments

Comments
 (0)