From patchwork Wed Nov 5 19:02:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Lunn X-Patchwork-Id: 5237641 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2CB9C9F295 for ; Wed, 5 Nov 2014 19:05:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5BDA12012F for ; Wed, 5 Nov 2014 19:05:49 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7E90420125 for ; Wed, 5 Nov 2014 19:05:48 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Xm5s2-0008B1-5m; Wed, 05 Nov 2014 19:03:54 +0000 Received: from vps0.lunn.ch ([178.209.37.122]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Xm5rt-00084u-Ue for linux-arm-kernel@lists.infradead.org; Wed, 05 Nov 2014 19:03:46 +0000 Received: from lunn by vps0.lunn.ch with local (Exim 4.80) (envelope-from ) id 1Xm5qH-0007cz-2J; Wed, 05 Nov 2014 20:02:05 +0100 From: Andrew Lunn To: davem@davemloft.net, Jason Cooper Subject: [PATCH 2/3] mvebu: 370 RD: Add support for the switch Date: Wed, 5 Nov 2014 20:02:00 +0100 Message-Id: <1415214121-29286-3-git-send-email-andrew@lunn.ch> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1415214121-29286-1-git-send-email-andrew@lunn.ch> References: <1415214121-29286-1-git-send-email-andrew@lunn.ch> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141105_110346_194965_22FE14F3 X-CRM114-Status: GOOD ( 10.61 ) X-Spam-Score: -0.6 (/) Cc: Thomas Petazzoni , Andrew Lunn , tawfik@marvell.com, netdev@vger.kernel.org, maxime.ripard@free-electrons.com, linux ARM X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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@0 { reg = <0>; }; - - phy1: ethernet-phy@1 { - reg = <1>; - }; }; ethernet@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@d4000 { @@ -173,4 +172,44 @@ }; }; }; + + dsa@0 { + compatible = "marvell,dsa"; + #address-cells = <2>; + #size-cells = <0>; + + dsa,ethernet = <ð1>; + dsa,mii-bus = <&mdio>; + + switch@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0x10 0>; /* MDIO address 16, switch 0 in tree */ + + port@0 { + reg = <0>; + label = "lan0"; + }; + + port@1 { + reg = <1>; + label = "lan1"; + }; + + port@2 { + reg = <2>; + label = "lan2"; + }; + + port@3 { + reg = <3>; + label = "lan3"; + }; + + port@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";