From patchwork Sun Jul 22 05:39:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Icenowy Zheng X-Patchwork-Id: 10539149 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 037E6112B for ; Sun, 22 Jul 2018 05:58:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DB68F27165 for ; Sun, 22 Jul 2018 05:58:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CF18327853; Sun, 22 Jul 2018 05:58:40 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BEC762793A for ; Sun, 22 Jul 2018 05:58:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=0sRtyMJ2p29sSyunu9LX3RgAOiHf8vet4joI+37uRj8=; b=cNzB1csH0EHp3WO1cZiThuIy2+ W7IvqK56P+/GCVtTyR0y336k78j+eitjRqAifVCP2TlCt8d6mSNuqbb/W5sJeZOtcYx7XhHaJE5/O bzbP/xHR0GJuNky5gXFgLTVDAr0ae1pxN3WMeFOThpTwm3uaul2mlwHaRXQhaX0g70dpkrLRsOaKt 5elYi05WgSosrFqndTFY0emdF8irlTK5nL6/fBsELajdYWwPGfeT3sQQFSSQbMiAipK8zGAj4yooQ A87N2pwAvOUmcnQrXtzfCYgEam8qW2xlNs0yvlfdqQFxlBL9m6eq0jBU8Zs84+qV+JMtBhWjijqQV yHrsGJmw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fh7O6-0002WE-Cq; Sun, 22 Jul 2018 05:58:34 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fh7O4-0002UK-74 for linux-arm-kernel@bombadil.infradead.org; Sun, 22 Jul 2018 05:58:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=DqPYQdgk+zHHml2dYiB+pWdnnRwUNTMfjLZBfiW2sIU=; b=O5oCjDitLTZ9lw2cbi2jjrYtW jr3fgCsLkE8wYW7vwny2OMh/o4QqBwIMtHAxl3xlVgJ7bMSNc/C9PIzNRtclmiFWYM9DjM9ms2B9h MZp6IfdwBxJlHF/6CpiMl+GBWLIB2ry15a226LPGnNjrpNdMsXdn5wJckDC4Wo4I5rNhPd06f8csy MFUAGlUAG7dk4CC/59jT4hhSwHhKsPtybIL50k41pVrkPEt9pwQlE7sFxLOaXwT34VW/de+siRyHk LPKXGoQv9uaFb19OQMhpKfI+hm7SQs0efi0o6v1qLBIrLyPNP1Y8h1VrZLXrHEx/jNdPvNz0Vs/rd DXMwKtWEg==; Received: from burlywood.maple.relay.mailchannels.net ([23.83.214.26]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fh78C-0002P0-Md for linux-arm-kernel@lists.infradead.org; Sun, 22 Jul 2018 05:42:10 +0000 X-Sender-Id: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id D3B3B28171B; Sun, 22 Jul 2018 05:41:54 +0000 (UTC) Received: from hermes.aosc.io (unknown [100.96.26.113]) (Authenticated sender: lmn-TZDUIOWCRQMW) by relay.mailchannels.net (Postfix) with ESMTPA id 0A0D5281611; Sun, 22 Jul 2018 05:41:53 +0000 (UTC) X-Sender-Id: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io Received: from hermes.aosc.io (hermes.aosc.io [199.195.250.187]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.16.1); Sun, 22 Jul 2018 05:41:54 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io X-MailChannels-Auth-Id: lmn-TZDUIOWCRQMW X-Cooing-Fumbling: 301973e409ed32dd_1532238114712_3352376183 X-MC-Loop-Signature: 1532238114712:1809162652 X-MC-Ingress-Time: 1532238114712 Received: from localhost (localhost [127.0.0.1]) (Authenticated sender: icenowy@aosc.io) by hermes.aosc.io (Postfix) with ESMTPSA id 8B4369F536; Sun, 22 Jul 2018 05:41:46 +0000 (UTC) From: Icenowy Zheng To: Rob Herring , Maxime Ripard , Chen-Yu Tsai , "David S. Miller" , Corentin Labbe Subject: [PATCH 5/5] arm64: allwinner: h6: add support for the Ethernet on Pine H64 Date: Sun, 22 Jul 2018 13:39:55 +0800 Message-Id: <20180722053955.25266-6-icenowy@aosc.io> In-Reply-To: <20180722053955.25266-1-icenowy@aosc.io> References: <20180722053955.25266-1-icenowy@aosc.io> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180722_064208_962659_EBD3E597 X-CRM114-Status: GOOD ( 16.23 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, linux-arm-kernel@lists.infradead.org, Icenowy Zheng 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 The Pine H64 board has an Ethernet port, which is connected to a RTL8211E PHY, then the PHY is connected to the MAC on H6 SoC. Add support for the Ethernet port. Signed-off-by: Icenowy Zheng --- .../boot/dts/allwinner/sun50i-h6-pine-h64.dts | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts index ceffc40810ee..b168b3b8a9ad 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts @@ -14,6 +14,7 @@ compatible = "pine64,pine-h64", "allwinner,sun50i-h6"; aliases { + ethernet0 = &emac; serial0 = &uart0; }; @@ -39,6 +40,34 @@ gpios = <&r_pio 0 7 GPIO_ACTIVE_HIGH>; /* PL7 */ }; }; + + reg_gmac_3v3: gmac-3v3 { + compatible = "regulator-fixed"; + regulator-name = "vcc-gmac-3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + startup-delay-us = <100000>; + gpio = <&pio 2 16 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; +}; + +&emac { + pinctrl-names = "default"; + pinctrl-0 = <&ext_rgmii_pins>; + phy-mode = "rgmii"; + phy-handle = <&ext_rgmii_phy>; + phy-supply = <®_gmac_3v3>; + allwinner,rx-delay-ps = <200>; + allwinner,tx-delay-ps = <200>; + status = "okay"; +}; + +&mdio { + ext_rgmii_phy: ethernet-phy@1 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <1>; + }; }; &mmc0 {