* [PATCH 0/3] Add support for switch on Armanda 370 RD
@ 2014-11-05 19:01 Andrew Lunn
2014-11-05 19:01 ` [PATCH 1/3] dsa: mv88e6171: Add support for mv88e6172 Andrew Lunn
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Andrew Lunn @ 2014-11-05 19:01 UTC (permalink / raw)
To: linux-arm-kernel
This patchset adds support for the switch chip found on the Marvell
370 RD board. The first patch extends the current mv88e6171 driver to
also support the mv88e6172. The second patch described the switch in
the device tree of the board, and the last patch enables require build
options in mvebu_v7_defconfig.
Davem should take patch #1
Jason Cooper should take patch #2 and #3.
Andrew Lunn (3):
dsa: mv88e6171: Add support for mv88e6172
mvebu: 370 RD: Add support for the switch
mvebu: defconfig: Enable the mv88E6171 switch driver
arch/arm/boot/dts/armada-370-rd.dts | 49 ++++++++++++++++++++++++++++++++----
arch/arm/boot/dts/armada-370-xp.dtsi | 2 +-
arch/arm/configs/mvebu_v7_defconfig | 2 ++
drivers/net/dsa/Kconfig | 6 ++---
drivers/net/dsa/mv88e6171.c | 5 +++-
5 files changed, 54 insertions(+), 10 deletions(-)
--
2.1.3
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/3] dsa: mv88e6171: Add support for mv88e6172
2014-11-05 19:01 [PATCH 0/3] Add support for switch on Armanda 370 RD Andrew Lunn
@ 2014-11-05 19:01 ` Andrew Lunn
2014-11-06 20:08 ` David Miller
2014-11-05 19:02 ` [PATCH 2/3] mvebu: 370 RD: Add support for the switch Andrew Lunn
2014-11-05 19:02 ` [PATCH 3/3] mvebu: defconfig: Enable the mv88E6171 switch driver Andrew Lunn
2 siblings, 1 reply; 7+ messages in thread
From: Andrew Lunn @ 2014-11-05 19:01 UTC (permalink / raw)
To: linux-arm-kernel
The mv88e6172 is very similar to the mv88e6171. So extend the
mv88e6171 driver to support it.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
drivers/net/dsa/Kconfig | 6 +++---
drivers/net/dsa/mv88e6171.c | 5 ++++-
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/net/dsa/Kconfig b/drivers/net/dsa/Kconfig
index 9234d808cbb3..69bed5b2f078 100644
--- a/drivers/net/dsa/Kconfig
+++ b/drivers/net/dsa/Kconfig
@@ -37,13 +37,13 @@ config NET_DSA_MV88E6123_61_65
ethernet switch chips.
config NET_DSA_MV88E6171
- tristate "Marvell 88E6171 ethernet switch chip support"
+ tristate "Marvell 88E6171/6172 ethernet switch chip support"
select NET_DSA
select NET_DSA_MV88E6XXX
select NET_DSA_TAG_EDSA
---help---
- This enables support for the Marvell 88E6171 ethernet switch
- chip.
+ This enables support for the Marvell 88E6171/6172 ethernet switch
+ chips.
config NET_DSA_BCM_SF2
tristate "Broadcom Starfighter 2 Ethernet switch support"
diff --git a/drivers/net/dsa/mv88e6171.c b/drivers/net/dsa/mv88e6171.c
index 1020a7af67cf..d9919ce2b005 100644
--- a/drivers/net/dsa/mv88e6171.c
+++ b/drivers/net/dsa/mv88e6171.c
@@ -1,4 +1,4 @@
-/* net/dsa/mv88e6171.c - Marvell 88e6171 switch chip support
+/* net/dsa/mv88e6171.c - Marvell 88e6171/8826172 switch chip support
* Copyright (c) 2008-2009 Marvell Semiconductor
* Copyright (c) 2014 Claudio Leite <leitec@staticky.com>
*
@@ -29,6 +29,8 @@ static char *mv88e6171_probe(struct device *host_dev, int sw_addr)
if (ret >= 0) {
if ((ret & 0xfff0) == 0x1710)
return "Marvell 88E6171";
+ if ((ret & 0xfff0) == 0x1720)
+ return "Marvell 88E6172";
}
return NULL;
@@ -409,3 +411,4 @@ struct dsa_switch_driver mv88e6171_switch_driver = {
};
MODULE_ALIAS("platform:mv88e6171");
+MODULE_ALIAS("platform:mv88e6172");
--
2.1.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/3] mvebu: 370 RD: Add support for the switch
2014-11-05 19:01 [PATCH 0/3] Add support for switch on Armanda 370 RD Andrew Lunn
2014-11-05 19:01 ` [PATCH 1/3] dsa: mv88e6171: Add support for mv88e6172 Andrew Lunn
@ 2014-11-05 19:02 ` Andrew Lunn
2014-11-07 3:30 ` Jason Cooper
2014-11-05 19:02 ` [PATCH 3/3] mvebu: defconfig: Enable the mv88E6171 switch driver Andrew Lunn
2 siblings, 1 reply; 7+ messages in thread
From: Andrew Lunn @ 2014-11-05 19:02 UTC (permalink / raw)
To: linux-arm-kernel
The 370 rd has a 7 port, mv88E6182 switch, connected to eth1. Add a
fixed-link subnode to the ethernet device tree node, to force
gigabit/full duplex. Add a dsa node, with describing the four used
ports. This requires adding an alias to the mdio node, so it can be
referenced as a phandle.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
arch/arm/boot/dts/armada-370-rd.dts | 49 ++++++++++++++++++++++++++++++++----
arch/arm/boot/dts/armada-370-xp.dtsi | 2 +-
2 files changed, 45 insertions(+), 6 deletions(-)
diff --git a/arch/arm/boot/dts/armada-370-rd.dts b/arch/arm/boot/dts/armada-370-rd.dts
index f57a8f841498..2bb671a778db 100644
--- a/arch/arm/boot/dts/armada-370-rd.dts
+++ b/arch/arm/boot/dts/armada-370-rd.dts
@@ -85,10 +85,6 @@
phy0: ethernet-phy at 0 {
reg = <0>;
};
-
- phy1: ethernet-phy at 1 {
- reg = <1>;
- };
};
ethernet at 70000 {
@@ -100,8 +96,11 @@
pinctrl-0 = <&ge1_rgmii_pins>;
pinctrl-names = "default";
status = "okay";
- phy = <&phy1>;
phy-mode = "rgmii-id";
+ fixed-link {
+ speed = <1000>;
+ full-duplex;
+ };
};
mvsdio at d4000 {
@@ -173,4 +172,44 @@
};
};
};
+
+ dsa at 0 {
+ compatible = "marvell,dsa";
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ dsa,ethernet = <ð1>;
+ dsa,mii-bus = <&mdio>;
+
+ switch at 0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x10 0>; /* MDIO address 16, switch 0 in tree */
+
+ port at 0 {
+ reg = <0>;
+ label = "lan0";
+ };
+
+ port at 1 {
+ reg = <1>;
+ label = "lan1";
+ };
+
+ port at 2 {
+ reg = <2>;
+ label = "lan2";
+ };
+
+ port at 3 {
+ reg = <3>;
+ label = "lan3";
+ };
+
+ port at 5 {
+ reg = <5>;
+ label = "cpu";
+ };
+ };
+ };
};
diff --git a/arch/arm/boot/dts/armada-370-xp.dtsi b/arch/arm/boot/dts/armada-370-xp.dtsi
index 83286ec9702c..4d84ca981fe0 100644
--- a/arch/arm/boot/dts/armada-370-xp.dtsi
+++ b/arch/arm/boot/dts/armada-370-xp.dtsi
@@ -232,7 +232,7 @@
status = "disabled";
};
- mdio {
+ mdio: mdio {
#address-cells = <1>;
#size-cells = <0>;
compatible = "marvell,orion-mdio";
--
2.1.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/3] mvebu: defconfig: Enable the mv88E6171 switch driver
2014-11-05 19:01 [PATCH 0/3] Add support for switch on Armanda 370 RD Andrew Lunn
2014-11-05 19:01 ` [PATCH 1/3] dsa: mv88e6171: Add support for mv88e6172 Andrew Lunn
2014-11-05 19:02 ` [PATCH 2/3] mvebu: 370 RD: Add support for the switch Andrew Lunn
@ 2014-11-05 19:02 ` Andrew Lunn
2014-11-07 3:32 ` Jason Cooper
2 siblings, 1 reply; 7+ messages in thread
From: Andrew Lunn @ 2014-11-05 19:02 UTC (permalink / raw)
To: linux-arm-kernel
This switch is used by the 370-rd. Enable it and support for
fixed-link phy configuration.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
arch/arm/configs/mvebu_v7_defconfig | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/configs/mvebu_v7_defconfig b/arch/arm/configs/mvebu_v7_defconfig
index ed0a0d1be0f3..8548eee5cbeb 100644
--- a/arch/arm/configs/mvebu_v7_defconfig
+++ b/arch/arm/configs/mvebu_v7_defconfig
@@ -59,10 +59,12 @@ CONFIG_ATA=y
CONFIG_AHCI_MVEBU=y
CONFIG_SATA_MV=y
CONFIG_NETDEVICES=y
+CONFIG_NET_DSA_MV88E6171=y
CONFIG_MV643XX_ETH=y
CONFIG_MVNETA=y
CONFIG_MVPP2=y
CONFIG_MARVELL_PHY=y
+CONFIG_FIXED_PHY=y
CONFIG_MWIFIEX=y
CONFIG_MWIFIEX_SDIO=y
CONFIG_INPUT_EVDEV=y
--
2.1.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 1/3] dsa: mv88e6171: Add support for mv88e6172
2014-11-05 19:01 ` [PATCH 1/3] dsa: mv88e6171: Add support for mv88e6172 Andrew Lunn
@ 2014-11-06 20:08 ` David Miller
0 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2014-11-06 20:08 UTC (permalink / raw)
To: linux-arm-kernel
From: Andrew Lunn <andrew@lunn.ch>
Date: Wed, 5 Nov 2014 20:01:59 +0100
> The mv88e6172 is very similar to the mv88e6171. So extend the
> mv88e6171 driver to support it.
>
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Applied to net-next, thanks.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/3] mvebu: 370 RD: Add support for the switch
2014-11-05 19:02 ` [PATCH 2/3] mvebu: 370 RD: Add support for the switch Andrew Lunn
@ 2014-11-07 3:30 ` Jason Cooper
0 siblings, 0 replies; 7+ messages in thread
From: Jason Cooper @ 2014-11-07 3:30 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Nov 05, 2014 at 08:02:00PM +0100, Andrew Lunn wrote:
> The 370 rd has a 7 port, mv88E6182 switch, connected to eth1. Add a
> fixed-link subnode to the ethernet device tree node, to force
> gigabit/full duplex. Add a dsa node, with describing the four used
> ports. This requires adding an alias to the mdio node, so it can be
> referenced as a phandle.
>
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> ---
> arch/arm/boot/dts/armada-370-rd.dts | 49 ++++++++++++++++++++++++++++++++----
> arch/arm/boot/dts/armada-370-xp.dtsi | 2 +-
> 2 files changed, 45 insertions(+), 6 deletions(-)
Applied to mvebu/dt
thx,
Jason.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 3/3] mvebu: defconfig: Enable the mv88E6171 switch driver
2014-11-05 19:02 ` [PATCH 3/3] mvebu: defconfig: Enable the mv88E6171 switch driver Andrew Lunn
@ 2014-11-07 3:32 ` Jason Cooper
0 siblings, 0 replies; 7+ messages in thread
From: Jason Cooper @ 2014-11-07 3:32 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Nov 05, 2014 at 08:02:01PM +0100, Andrew Lunn wrote:
> This switch is used by the 370-rd. Enable it and support for
> fixed-link phy configuration.
>
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> ---
> arch/arm/configs/mvebu_v7_defconfig | 2 ++
> 1 file changed, 2 insertions(+)
Applied to mvebu/defconfig
thx,
Jason.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-11-07 3:32 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-05 19:01 [PATCH 0/3] Add support for switch on Armanda 370 RD Andrew Lunn
2014-11-05 19:01 ` [PATCH 1/3] dsa: mv88e6171: Add support for mv88e6172 Andrew Lunn
2014-11-06 20:08 ` David Miller
2014-11-05 19:02 ` [PATCH 2/3] mvebu: 370 RD: Add support for the switch Andrew Lunn
2014-11-07 3:30 ` Jason Cooper
2014-11-05 19:02 ` [PATCH 3/3] mvebu: defconfig: Enable the mv88E6171 switch driver Andrew Lunn
2014-11-07 3:32 ` Jason Cooper
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).