From patchwork Mon Jun 6 18:16:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iyappan Subramanian X-Patchwork-Id: 9158995 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D677D60573 for ; Mon, 6 Jun 2016 18:18:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CC7EB28354 for ; Mon, 6 Jun 2016 18:18:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C17DA28357; Mon, 6 Jun 2016 18:18:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3989728354 for ; Mon, 6 Jun 2016 18:18:23 +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 1b9z5D-00042X-9C; Mon, 06 Jun 2016 18:17:03 +0000 Received: from mail-pf0-x236.google.com ([2607:f8b0:400e:c00::236]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1b9z4p-0003mZ-Rs for linux-arm-kernel@lists.infradead.org; Mon, 06 Jun 2016 18:16:42 +0000 Received: by mail-pf0-x236.google.com with SMTP id g64so69200132pfb.2 for ; Mon, 06 Jun 2016 11:16:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apm.com; s=apm; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=vbYaixl2ePHTQSez6JuYZmvU6bRba845jvAyiqIdghU=; b=EiI0y1dAr+I6G1tBHhXtuD/eKCPn+Kb20F9zXGmOXS8BwQnyfK2deVlhVEiUzEQLNc A856kOTHh7pQhqdJeaZQPk8DnAm1129LbhtSafurgzzkAirX6iBChbkKGI9PXx+JTibA dIr2ukGjCgJ554AvxgaGNj0j6YmZObHRDZW8o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=vbYaixl2ePHTQSez6JuYZmvU6bRba845jvAyiqIdghU=; b=HhMBj4bwfNc8sOfMDy4qv3kAGIDEsAbg/afpcnMGZQ3WJQTjVmh0ww2IXPEDx7INe/ Wi2+xH/HRmswyWJvDB1NC7jV09VBCy8E8uk8omCKaCbB37l/FqDFQg0MbqkI+Ooc5/0X rAfQeEzeSE0XNXe8igFH7ylwQ6lb4ZY81aro9QYXgu5uZkOzbVwV3+3asXeCd7zlD4PH anrMJtNX79kZBjveRZB+hdFX3rq9IRuc+1gXjWqEw9Zn8M5CJ0V8gAHJhwcndUoOY5Tk wbcxKWMpueNzKDCKrugJLfLTwUgxkv+uiu6WAW4pZymT6sbUAXQj7TpZH7PJoMiR2tXy JAcQ== X-Gm-Message-State: ALyK8tLMaZ7jO9s+UL9nnn0MB7syAepa95YyGZYaPKDjqFx2Cte3p/SFYGt7SH6YBbh4vJJV X-Received: by 10.98.98.6 with SMTP id w6mr27397728pfb.0.1465236978873; Mon, 06 Jun 2016 11:16:18 -0700 (PDT) Received: from isubrama-dev.amcc.com ([206.80.4.98]) by smtp.gmail.com with ESMTPSA id tb7sm26948294pab.21.2016.06.06.11.16.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 06 Jun 2016 11:16:18 -0700 (PDT) From: Iyappan Subramanian To: davem@davemloft.net, netdev@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v3 4/5] dtb: xgene: Add MDIO node Date: Mon, 6 Jun 2016 11:16:01 -0700 Message-Id: <1465236962-12131-5-git-send-email-isubramanian@apm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1465236962-12131-1-git-send-email-isubramanian@apm.com> References: <1465236962-12131-1-git-send-email-isubramanian@apm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160606_111640_126997_0FA8599D X-CRM114-Status: GOOD ( 10.55 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: matthias.bgg@gmail.com, andrew@lunn.ch, patches@apm.com, linux-arm-kernel@lists.infradead.org, Iyappan Subramanian MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Added mdio node for mdio driver. Also added phy-handle reference to the ethernet nodes. Removed unused mdio subnode within storm menet ethernet node. Removed unused clock node from storm sgenet1. Signed-off-by: Iyappan Subramanian Tested-by: Fushen Chen Tested-by: Toan Le Tested-by: Matthias Brugger --- arch/arm64/boot/dts/apm/apm-merlin.dts | 9 +++++++ arch/arm64/boot/dts/apm/apm-mustang.dts | 12 ++++++++++ arch/arm64/boot/dts/apm/apm-shadowcat.dtsi | 11 +++++++++ arch/arm64/boot/dts/apm/apm-storm.dtsi | 38 +++++++++++------------------- 4 files changed, 46 insertions(+), 24 deletions(-) diff --git a/arch/arm64/boot/dts/apm/apm-merlin.dts b/arch/arm64/boot/dts/apm/apm-merlin.dts index 387c6a8..c765f26 100644 --- a/arch/arm64/boot/dts/apm/apm-merlin.dts +++ b/arch/arm64/boot/dts/apm/apm-merlin.dts @@ -83,3 +83,12 @@ status = "ok"; }; }; + +&mdio { + sgenet0phy: phy@3 { + reg = <0x0>; + }; + sgenet1phy: phy@2 { + reg = <0x2>; + }; +}; diff --git a/arch/arm64/boot/dts/apm/apm-mustang.dts b/arch/arm64/boot/dts/apm/apm-mustang.dts index 44db32e..c4e2bc4 100644 --- a/arch/arm64/boot/dts/apm/apm-mustang.dts +++ b/arch/arm64/boot/dts/apm/apm-mustang.dts @@ -79,3 +79,15 @@ &mmc0 { status = "ok"; }; + +&mdio { + menetphy: phy@3 { + reg = <0x3>; + }; + sgenet0phy: phy@4 { + reg = <0x4>; + }; + sgenet1phy: phy@5 { + reg = <0x5>; + }; +}; diff --git a/arch/arm64/boot/dts/apm/apm-shadowcat.dtsi b/arch/arm64/boot/dts/apm/apm-shadowcat.dtsi index c569f76..17333fa 100644 --- a/arch/arm64/boot/dts/apm/apm-shadowcat.dtsi +++ b/arch/arm64/boot/dts/apm/apm-shadowcat.dtsi @@ -625,6 +625,15 @@ apm,irq-start = <8>; }; + mdio: mdio@0x1f610000 { + compatible = "apm,xgene-mdio-sgmii"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x0 0x1f610000 0x0 0x100>, + <0x0 0X1f61d000 0x0 0X100>; + clocks = <&xge0clk 0>; + }; + sgenet0: ethernet@1f610000 { compatible = "apm,xgene2-sgenet"; status = "disabled"; @@ -637,6 +646,7 @@ clocks = <&xge0clk 0>; local-mac-address = [00 01 73 00 00 01]; phy-connection-type = "sgmii"; + phy-handle = <&sgenet0phy>; }; xgenet1: ethernet@1f620000 { @@ -659,6 +669,7 @@ clocks = <&xge1clk 0>; local-mac-address = [00 01 73 00 00 02]; phy-connection-type = "xgmii"; + phy-handle = <&sgenet1phy>; }; rng: rng@10520000 { diff --git a/arch/arm64/boot/dts/apm/apm-storm.dtsi b/arch/arm64/boot/dts/apm/apm-storm.dtsi index 5147d76..f631fe4 100644 --- a/arch/arm64/boot/dts/apm/apm-storm.dtsi +++ b/arch/arm64/boot/dts/apm/apm-storm.dtsi @@ -237,20 +237,11 @@ clocks = <&socplldiv2 0>; reg = <0x0 0x1f21c000 0x0 0x1000>; reg-names = "csr-reg"; - csr-mask = <0x3>; + csr-mask = <0xa>; + enable-mask = <0xf>; clock-output-names = "sge0clk"; }; - sge1clk: sge1clk@1f21c000 { - compatible = "apm,xgene-device-clock"; - #clock-cells = <1>; - clocks = <&socplldiv2 0>; - reg = <0x0 0x1f21c000 0x0 0x1000>; - reg-names = "csr-reg"; - csr-mask = <0xc>; - clock-output-names = "sge1clk"; - }; - xge0clk: xge0clk@1f61c000 { compatible = "apm,xgene-device-clock"; #clock-cells = <1>; @@ -921,6 +912,14 @@ clocks = <&rtcclk 0>; }; + mdio: mdio@0x17020000 { + compatible = "apm,xgene-mdio-rgmii"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x0 0x17020000 0x0 0xd100>; + clocks = <&menetclk 0>; + }; + menet: ethernet@17020000 { compatible = "apm,xgene-enet"; status = "disabled"; @@ -930,21 +929,11 @@ reg-names = "enet_csr", "ring_csr", "ring_cmd"; interrupts = <0x0 0x3c 0x4>; dma-coherent; - clocks = <&menetclk 0>; /* mac address will be overwritten by the bootloader */ local-mac-address = [00 00 00 00 00 00]; + clocks = <&menetclk 0>; phy-connection-type = "rgmii"; phy-handle = <&menetphy>; - mdio { - compatible = "apm,xgene-mdio"; - #address-cells = <1>; - #size-cells = <0>; - menetphy: menetphy@3 { - compatible = "ethernet-phy-id001c.c915"; - reg = <0x3>; - }; - - }; }; sgenet0: ethernet@1f210000 { @@ -957,9 +946,10 @@ interrupts = <0x0 0xA0 0x4>, <0x0 0xA1 0x4>; dma-coherent; - clocks = <&sge0clk 0>; local-mac-address = [00 00 00 00 00 00]; + clocks = <&sge0clk 0>; phy-connection-type = "sgmii"; + phy-handle = <&sgenet0phy>; }; sgenet1: ethernet@1f210030 { @@ -973,9 +963,9 @@ <0x0 0xAD 0x4>; port-id = <1>; dma-coherent; - clocks = <&sge1clk 0>; local-mac-address = [00 00 00 00 00 00]; phy-connection-type = "sgmii"; + phy-handle = <&sgenet1phy>; }; xgenet: ethernet@1f610000 {