Skip to content

Commit c5aff18

Browse files
committed
net: mvneta: driver for Marvell Armada 370/XP network unit
This patch contains a new network driver for the network unit of the ARM Marvell Armada 370 and the Armada XP. Both SoCs use the PJ4B processor, a Marvell-developed ARM core that implements the ARMv7 instruction set. Compared to previous ARM Marvell SoCs (Kirkwood, Orion, Discovery), the network unit in Armada 370 and Armada XP is highly different. This is the reason why this new 'mvneta' driver is needed, while the older ARM Marvell SoCs use the 'mv643xx_eth' driver. Here is an overview of the most important hardware changes that require a new, specific, driver for the network unit of Armada 370/XP: - The new network unit has a completely different design and layout for the RX and TX descriptors. They are now organized as a simple array (each RX and TX queue has base address and size of this array) rather than a linked list as in the old SoCs. - The new network unit has a different RXQ and TXQ management: this management is done using special read/write counter registers, while in the Old SocS, it was done using the Ownership bit in RX and TX descriptors. - The new network unit has different interrupt registers - The new network unit way of cleaning of interrupts is not done by writing to the cause register, but by updating per-queue counters - The new network unit has different GMAC registers (link, speed, duplex configuration) and different WRR registers. - The new network unit has lots of new units like PnC (Parser and Classifier), PMT, BM (Memory Buffer Management), xPON, and more. The driver proposed in the current patch only handles the basic features. Additional hardware features will progressively be supported as needed. This code has originally been written by Rami Rosen <rosenr@marvell.com>, and then reviewed and cleaned up by Thomas Petazzoni <thomas.petazzoni@free-electrons.com>. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Acked-by: David S. Miller <davem@davemloft.net>
1 parent fc8f5ad commit c5aff18

File tree

4 files changed

+2876
-0
lines changed

4 files changed

+2876
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
* Marvell Armada 370 / Armada XP Ethernet Controller (NETA)
2+
3+
Required properties:
4+
- compatible: should be "marvell,armada-370-neta".
5+
- reg: address and length of the register set for the device.
6+
- interrupts: interrupt for the device
7+
- phy: A phandle to a phy node defining the PHY address (as the reg
8+
property, a single integer).
9+
- phy-mode: The interface between the SoC and the PHY (a string that
10+
of_get_phy_mode() can understand)
11+
- clock-frequency: frequency of the peripheral clock of the SoC.
12+
13+
Example:
14+
15+
ethernet@d0070000 {
16+
compatible = "marvell,armada-370-neta";
17+
reg = <0xd0070000 0x2500>;
18+
interrupts = <8>;
19+
clock-frequency = <250000000>;
20+
status = "okay";
21+
phy = <&phy0>;
22+
phy-mode = "rgmii-id";
23+
};

drivers/net/ethernet/marvell/Kconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,19 @@ config MVMDIO
4242
(used on Armada 370 and XP), but it could be used in the
4343
future by the MV643XX_ETH driver.
4444

45+
config MVNETA
46+
tristate "Marvell Armada 370/XP network interface support"
47+
depends on MACH_ARMADA_370_XP
48+
select PHYLIB
49+
select MVMDIO
50+
---help---
51+
This driver supports the network interface units in the
52+
Marvell ARMADA XP and ARMADA 370 SoC family.
53+
54+
Note that this driver is distinct from the mv643xx_eth
55+
driver, which should be used for the older Marvell SoCs
56+
(Dove, Orion, Discovery, Kirkwood).
57+
4558
config PXA168_ETH
4659
tristate "Marvell pxa168 ethernet support"
4760
depends on CPU_PXA168

drivers/net/ethernet/marvell/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
obj-$(CONFIG_MV643XX_ETH) += mv643xx_eth.o
66
obj-$(CONFIG_MVMDIO) += mvmdio.o
7+
obj-$(CONFIG_MVNETA) += mvneta.o
78
obj-$(CONFIG_PXA168_ETH) += pxa168_eth.o
89
obj-$(CONFIG_SKGE) += skge.o
910
obj-$(CONFIG_SKY2) += sky2.o

0 commit comments

Comments
 (0)