From: andrew@lunn.ch (Andrew Lunn)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] mvebu: 370 RD: Add support for the switch
Date: Wed, 5 Nov 2014 20:02:00 +0100 [thread overview]
Message-ID: <1415214121-29286-3-git-send-email-andrew@lunn.ch> (raw)
In-Reply-To: <1415214121-29286-1-git-send-email-andrew@lunn.ch>
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
next prev parent reply other threads:[~2014-11-05 19:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Andrew Lunn [this message]
2014-11-07 3:30 ` [PATCH 2/3] mvebu: 370 RD: Add support for the switch 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1415214121-29286-3-git-send-email-andrew@lunn.ch \
--to=andrew@lunn.ch \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).