Skip to content

Commit

Permalink
ethernet: Add new driver for Marvell Armada 375 network unit
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
wojtas-marcin authored and davem330 committed Jul 11, 2014
1 parent b642881 commit 3f51850
Show file tree
Hide file tree
Showing 4 changed files with 6,463 additions and 0 deletions.
61 changes: 61 additions & 0 deletions Documentation/devicetree/bindings/net/marvell-pp2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
* Marvell Armada 375 Ethernet Controller (PPv2)

Required properties:

- compatible: should be "marvell,armada-375-pp2"
- reg: addresses and length of the register sets for the device.
Must contain the following register sets:
- common controller registers
- LMS registers
In addition, at least one port register set is required.
- clocks: a pointer to the reference clocks for this device, consequently:
- main controller clock
- GOP clock
- clock-names: names of used clocks, must be "pp_clk" and "gop_clk".

The ethernet ports are represented by subnodes. At least one port is
required.

Required properties (port):

- interrupts: interrupt for the port
- port-id: should be '0' or '1' for ethernet ports, and '2' for the
loopback port
- phy-mode: See ethernet.txt file in the same directory

Optional properties (port):

- marvell,loopback: port is loopback mode
- phy: a phandle to a phy node defining the PHY address (as the reg
property, a single integer). Note: if this property isn't present,
then fixed link is assumed, and the 'fixed-link' property is
mandatory.

Example:

ethernet@f0000 {
compatible = "marvell,armada-375-pp2";
reg = <0xf0000 0xa000>,
<0xc0000 0x3060>,
<0xc4000 0x100>,
<0xc5000 0x100>;
clocks = <&gateclk 3>, <&gateclk 19>;
clock-names = "pp_clk", "gop_clk";
status = "okay";

eth0: eth0@c4000 {
interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
port-id = <0>;
status = "okay";
phy = <&phy0>;
phy-mode = "gmii";
};

eth1: eth1@c5000 {
interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
port-id = <1>;
status = "okay";
phy = <&phy3>;
phy-mode = "gmii";
};
};
8 changes: 8 additions & 0 deletions drivers/net/ethernet/marvell/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@ config MVNETA
driver, which should be used for the older Marvell SoCs
(Dove, Orion, Discovery, Kirkwood).

config MVPP2
tristate "Marvell Armada 375 network interface support"
depends on MACH_ARMADA_375
select MVMDIO
---help---
This driver supports the network interface units in the
Marvell ARMADA 375 SoC.

config PXA168_ETH
tristate "Marvell pxa168 ethernet support"
depends on CPU_PXA168
Expand Down
1 change: 1 addition & 0 deletions drivers/net/ethernet/marvell/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
obj-$(CONFIG_MVMDIO) += mvmdio.o
obj-$(CONFIG_MV643XX_ETH) += mv643xx_eth.o
obj-$(CONFIG_MVNETA) += mvneta.o
obj-$(CONFIG_MVPP2) += mvpp2.o
obj-$(CONFIG_PXA168_ETH) += pxa168_eth.o
obj-$(CONFIG_SKGE) += skge.o
obj-$(CONFIG_SKY2) += sky2.o
Loading

0 comments on commit 3f51850

Please sign in to comment.