Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4518735imm; Sat, 21 Jul 2018 22:43:59 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfzuFFWc8Jnnv4Pyv6EC0TG6l2BuxKu7yVSTUNXx+jNTjVy0m4RB4CEqGCNyTQQObceiLcO X-Received: by 2002:a17:902:8207:: with SMTP id x7-v6mr7927149pln.57.1532238239848; Sat, 21 Jul 2018 22:43:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532238239; cv=none; d=google.com; s=arc-20160816; b=K7gEKphP/HLnOClv3UIl+yscP/1rH4L6IqjCWpVvMJRiA0e3JlH7v0MrcNaK7sVjHp FeK6ONPUcJLpJgRNjeVOixHWrfdysRtz3Ju7sGrBOuoPTvU1yZuF5ZFcDWdFCgdiG8vN ixDF0+QFLxdy9ruRTzkRbBi/MzkSL9GpLrxQhP+e+9L1JfZQBiBYRcEYH1ab4FX+DKAH u1N530Vz+49tLCJdA+uKlH1sxhKYU6auzYNIticOuCrjOrr3D2oM4IQUTeAFCahajUDP XVDk+JfR9/C5cLwyF82OxRx/XE3M14xSobL2ij8ElLRE6hW/jQl04FBRlk5gZjvKLlvn ooJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=DqPYQdgk+zHHml2dYiB+pWdnnRwUNTMfjLZBfiW2sIU=; b=AGFwI3fEc2A53Prxa9tYFTL2QikS/k69oHipITU5p3vx7bS/Q+uBmd3cTwR5k1VXf9 ac0dL7wvhKB0U1BggH4eVj0/Z6UN6M8pLgA1iPU5BiDhWG1KwLgwB9587Z+OSBh1iyzx sUKPuls9cBChH73uu6kseMnhoTwf79aYq9cqp4cLZ+N5UPQYiHoT/gED70htW8Agpaxl g4H/gF81BcU8c8et4+uvCaJgyRfIavzXyjzp1p150TxrJmr+uhb9/Alyy4M/mYkRAhqS i1uONEPcgqY4rA1OqXgpm6qij7FkCnO8XQd7jSCIdwlTO91/Ecdb+pyzqbqeST3BibYs mk6w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y67-v6si5805858pfa.47.2018.07.21.22.43.45; Sat, 21 Jul 2018 22:43:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728527AbeGVGhS (ORCPT + 99 others); Sun, 22 Jul 2018 02:37:18 -0400 Received: from hermes.aosc.io ([199.195.250.187]:44904 "EHLO hermes.aosc.io" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727880AbeGVGhS (ORCPT ); Sun, 22 Jul 2018 02:37:18 -0400 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 Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, Icenowy Zheng 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 { -- 2.18.0