Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp539822imd; Sat, 3 Nov 2018 05:37:14 -0700 (PDT) X-Google-Smtp-Source: AJdET5ctmIsN1X+aUJCnkMkqgFcXMKqTIfur0TXDKOX4vuF6e47pN7IduM3ON8rq0ML3YR+RTv6/ X-Received: by 2002:a62:1c1:: with SMTP id 184-v6mr15423564pfb.242.1541248633980; Sat, 03 Nov 2018 05:37:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541248633; cv=none; d=google.com; s=arc-20160816; b=A8uyIXGfjfHYtACK8RyVw/3kL2Mld00OGdgzKHUBKqlJyRGWp7uvRZw3Q1zsNF+Mfa JAOW1sWTRzAGejjqbB639d/TalrTBPorazkhKwD8yRsxPHf52X4GtGMe7Z70X3pJ+i3Z Bo2bdnePUt311djtUkvmebIXCXH+pX51zdk0tHxHM6bVoAqttYdv3yWyeFwG4yI1DsxL fCrzENoNcOPkYXtsXj90rnhWhddThmUXlPK1zB+zjRIF+RwJzTym7IriLgfdKRD5PQOK V34bSMkkkoSrMjD9Nm2sUjJ8WeW5ca4yHvptxiOkj2opGSgp1AG8/C2Q1WSUiYZ2Lgof UwUg== 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; bh=l1TscC5bw+ughIhDRX07k2GWq/7HHy0/jY7v3EFuLe8=; b=w6RJVeXtHQK/I8TPVnSPbLFYKXc6X9OztxKGXL38UnzHMAfR5razrBbPuo9eG/WNmt uETd4Q5Hod/DUJxjCm7/UKf9x847wH4MU2WKN3ylfc4RGjIYq4muM6Q92JPnEjiS56MW Rk5tSJp22j8fvswh2H1UAvs9kR81ii0bKW0e1++pRPi79ssaRdOX0sTeE4Bax//d2/Yw gsb9c8mTHeFwAfR+acNfo+K3l8IRG+EI2WMk4o6gxUuXcN0vHftLHnB6KN2QM4CwAdxE 16mC6bvAK6fyt8gYDsaSos0ARDIU7BZT/LrHAhPcdHKxu/6d8lI6ig4uKw4uBB3biNkw GmBQ== 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 n32si9951513pgm.439.2018.11.03.05.36.58; Sat, 03 Nov 2018 05:37:13 -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 S1728623AbeKCVov (ORCPT + 99 others); Sat, 3 Nov 2018 17:44:51 -0400 Received: from hermes.aosc.io ([199.195.250.187]:58420 "EHLO hermes.aosc.io" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727256AbeKCVou (ORCPT ); Sat, 3 Nov 2018 17:44:50 -0400 Received: from localhost (localhost [127.0.0.1]) (Authenticated sender: icenowy@aosc.io) by hermes.aosc.io (Postfix) with ESMTPSA id 1AEEA2160D1; Sat, 3 Nov 2018 12:33:34 +0000 (UTC) From: Icenowy Zheng To: Maxime Ripard , Chen-Yu Tsai , Corentin Labbe , Rob Herring , "David S . Miller" 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 v2 3/3] arm64: allwinner: h6: add support for the Ethernet on Pine H64 Date: Sat, 3 Nov 2018 20:32:38 +0800 Message-Id: <20181103123238.4665-4-icenowy@aosc.io> In-Reply-To: <20181103123238.4665-1-icenowy@aosc.io> References: <20181103123238.4665-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. The PHY needs some time to start up, and the time is modelled as enable ramp delay of the regulator. Signed-off-by: Icenowy Zheng --- Changes in v2: - Adapted the decision by Pine64 on the final version of Pine H64 (the current scheme on model B's). .../boot/dts/allwinner/sun50i-h6-pine-h64.dts | 20 +++++++++++++++++++ 1 file changed, 20 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 48daec7f78ba..fcf3c1de4aa2 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; }; @@ -41,6 +42,24 @@ }; }; +&emac { + pinctrl-names = "default"; + pinctrl-0 = <&ext_rgmii_pins>; + phy-mode = "rgmii"; + phy-handle = <&ext_rgmii_phy>; + phy-supply = <®_aldo2>; + 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 { pinctrl-names = "default"; pinctrl-0 = <&mmc0_pins>; @@ -85,6 +104,7 @@ regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; regulator-name = "vcc-ac200"; + regulator-enable-ramp-delay = <100000>; }; reg_aldo3: aldo3 { -- 2.18.1