* [PATCH v2 net-next 0/3] Network driver for Armada 375 SoC
@ 2014-07-05 11:54 Ezequiel Garcia
2014-07-05 11:54 ` [PATCH v2 2/3] ARM: mvebu: Add support for the network controller in " Ezequiel Garcia
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Ezequiel Garcia @ 2014-07-05 11:54 UTC (permalink / raw)
To: linux-arm-kernel
Changes from v1:
* Marcin Wojtas is the author of the driver, so I fixed authorship
for patch 1/3:
"ethernet: Add new driver for Marvell Armada 375 network unit"
This patchset adds a new network driver to support the network controller
in Armada 375 SoC.
The network interfaces share a common hardware unit called Packet Processor,
which contains a common register space and per-port register spaces.
The new network unit has different RXQ and TXQ management. The ports
associate so-called per-port "logical queues" which are mapped to "physical
queues". The latter are shared among the ports.
Fo the egress part, the mapping for each port is predefined by hardware.
The egress path incorporates so-called aggregation queues (one per CPU),
from where the data is passed to the physical queues and then via prefetch
buffer to the TxDMA.
The ingress path has a Parser and Classifier (PnC) and a Buffer Manager (BM)
whose usage is obligatory. We are only implementing a simple configuration
for the Parser and Classifier, yet the code is considerably large.
This network unit has other optional features like xPON, WoL, Hardware
Forwarding, and more. This initial commit doesn't provide support for these.
The mvpp2 network driver has been written by Marcin Wojtas and then reviewed
and cleaned up by Ezequiel Garcia.
Ezequiel Garcia (2):
ARM: mvebu: Add support for the network controller in Armada 375 SoC
ARM: mvebu: Enable the network controller in Armada 375 DB board
Marcin Wojtas (1):
ethernet: Add new driver for Marvell Armada 375 network unit
.../devicetree/bindings/net/marvell-pp2.txt | 61 +
arch/arm/boot/dts/armada-375-db.dts | 26 +
arch/arm/boot/dts/armada-375.dtsi | 31 +
drivers/net/ethernet/marvell/Kconfig | 8 +
drivers/net/ethernet/marvell/Makefile | 1 +
drivers/net/ethernet/marvell/mvpp2.c | 6378 ++++++++++++++++++++
6 files changed, 6505 insertions(+)
create mode 100644 Documentation/devicetree/bindings/net/marvell-pp2.txt
create mode 100644 drivers/net/ethernet/marvell/mvpp2.c
--
1.9.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 2/3] ARM: mvebu: Add support for the network controller in Armada 375 SoC
2014-07-05 11:54 [PATCH v2 net-next 0/3] Network driver for Armada 375 SoC Ezequiel Garcia
@ 2014-07-05 11:54 ` Ezequiel Garcia
2014-07-05 11:54 ` [PATCH v2 3/3] ARM: mvebu: Enable the network controller in Armada 375 DB board Ezequiel Garcia
[not found] ` <1404561288-11720-2-git-send-email-ezequiel.garcia@free-electrons.com>
2 siblings, 0 replies; 5+ messages in thread
From: Ezequiel Garcia @ 2014-07-05 11:54 UTC (permalink / raw)
To: linux-arm-kernel
This commit adds the support for the network controller in Marvell
Armada 375 SoC devicetree.
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
---
arch/arm/boot/dts/armada-375.dtsi | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/arch/arm/boot/dts/armada-375.dtsi b/arch/arm/boot/dts/armada-375.dtsi
index fb92551..5e897d2 100644
--- a/arch/arm/boot/dts/armada-375.dtsi
+++ b/arch/arm/boot/dts/armada-375.dtsi
@@ -151,6 +151,37 @@
<0xc100 0x100>;
};
+ mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "marvell,orion-mdio";
+ reg = <0xc0054 0x4>;
+ };
+
+ /* Network controller */
+ pp2 at f0000 {
+ compatible = "marvell,armada-375-pp2";
+ reg = <0xf0000 0xa000>, /* Packet Processor regs */
+ <0xc0000 0x3060>, /* LMS regs */
+ <0xc4000 0x100>, /* eth0 regs */
+ <0xc5000 0x100>; /* eth1 regs */
+ clocks = <&gateclk 3>, <&gateclk 19>;
+ clock-names = "pp_clk", "gop_clk";
+ status = "disabled";
+
+ eth0: ethernet at c4000 {
+ interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
+ port-id = <0>;
+ status = "disabled";
+ };
+
+ eth1: ethernet at c5000 {
+ interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
+ port-id = <1>;
+ status = "disabled";
+ };
+ };
+
spi0: spi at 10600 {
compatible = "marvell,orion-spi";
reg = <0x10600 0x50>;
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2 3/3] ARM: mvebu: Enable the network controller in Armada 375 DB board
2014-07-05 11:54 [PATCH v2 net-next 0/3] Network driver for Armada 375 SoC Ezequiel Garcia
2014-07-05 11:54 ` [PATCH v2 2/3] ARM: mvebu: Add support for the network controller in " Ezequiel Garcia
@ 2014-07-05 11:54 ` Ezequiel Garcia
[not found] ` <1404561288-11720-2-git-send-email-ezequiel.garcia@free-electrons.com>
2 siblings, 0 replies; 5+ messages in thread
From: Ezequiel Garcia @ 2014-07-05 11:54 UTC (permalink / raw)
To: linux-arm-kernel
This commit enables the network controller in the Armada 375 DB board,
and configures the two available ethernet interfaces.
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
---
arch/arm/boot/dts/armada-375-db.dts | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/arch/arm/boot/dts/armada-375-db.dts b/arch/arm/boot/dts/armada-375-db.dts
index 1e2919d..43ac381 100644
--- a/arch/arm/boot/dts/armada-375-db.dts
+++ b/arch/arm/boot/dts/armada-375-db.dts
@@ -123,6 +123,32 @@
cd-gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;
wp-gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>;
};
+
+ mdio {
+ phy0: ethernet-phy at 0 {
+ reg = <0>;
+ };
+
+ phy3: ethernet-phy at 3 {
+ reg = <3>;
+ };
+ };
+
+ pp2 at f0000 {
+ status = "okay";
+
+ ethernet at c4000 {
+ status = "okay";
+ phy = <&phy0>;
+ phy-mode = "rgmii-id";
+ };
+
+ ethernet at c5000 {
+ status = "okay";
+ phy = <&phy3>;
+ phy-mode = "gmii";
+ };
+ };
};
pcie-controller {
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
[parent not found: <1404561288-11720-2-git-send-email-ezequiel.garcia@free-electrons.com>]
* [PATCH v2 1/3] ethernet: Add new driver for Marvell Armada 375 network unit
[not found] ` <1404561288-11720-2-git-send-email-ezequiel.garcia@free-electrons.com>
@ 2014-07-08 22:26 ` David Miller
2014-07-08 23:40 ` Ezequiel Garcia
0 siblings, 1 reply; 5+ messages in thread
From: David Miller @ 2014-07-08 22:26 UTC (permalink / raw)
To: linux-arm-kernel
From: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Date: Sat, 5 Jul 2014 08:54:46 -0300
> +module_param(rxq_number, int, S_IRUGO);
> +module_param(txq_number, int, S_IRUGO);
Please don't use module parameters (undocumented ones at that) for things
like this.
Instead, use or create standard interfaces which other drivers can use as
well, so that the user interface is consistent for setting things of this
nature regardless of device type.
Thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 1/3] ethernet: Add new driver for Marvell Armada 375 network unit
2014-07-08 22:26 ` [PATCH v2 1/3] ethernet: Add new driver for Marvell Armada 375 network unit David Miller
@ 2014-07-08 23:40 ` Ezequiel Garcia
0 siblings, 0 replies; 5+ messages in thread
From: Ezequiel Garcia @ 2014-07-08 23:40 UTC (permalink / raw)
To: linux-arm-kernel
On 08 Jul 03:26 PM, David Miller wrote:
> From: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
> Date: Sat, 5 Jul 2014 08:54:46 -0300
>
> > +module_param(rxq_number, int, S_IRUGO);
> > +module_param(txq_number, int, S_IRUGO);
>
> Please don't use module parameters (undocumented ones at that) for things
> like this.
>
> Instead, use or create standard interfaces which other drivers can use as
> well, so that the user interface is consistent for setting things of this
> nature regardless of device type.
>
Hm... in fact these two parameters should be removed. They are redundant in
this and the mvneta driver. The Rx queue number should be fixed and none of
the drivers support more than 1.
The Tx queue number should be set to the hardware supported one, there's no
reason to use something different.
So, unless someone objects, we'll remove them in v4.
Thanks for the feedback,
--
Ezequiel Garc?a, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-07-08 23:40 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-05 11:54 [PATCH v2 net-next 0/3] Network driver for Armada 375 SoC Ezequiel Garcia
2014-07-05 11:54 ` [PATCH v2 2/3] ARM: mvebu: Add support for the network controller in " Ezequiel Garcia
2014-07-05 11:54 ` [PATCH v2 3/3] ARM: mvebu: Enable the network controller in Armada 375 DB board Ezequiel Garcia
[not found] ` <1404561288-11720-2-git-send-email-ezequiel.garcia@free-electrons.com>
2014-07-08 22:26 ` [PATCH v2 1/3] ethernet: Add new driver for Marvell Armada 375 network unit David Miller
2014-07-08 23:40 ` Ezequiel Garcia
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).