From patchwork Sat Nov 25 05:08:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen-Yu Tsai X-Patchwork-Id: 841207 X-Patchwork-Delegate: jagannadh.teki@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3ykLks3zLMz9s7F for ; Sat, 25 Nov 2017 16:11:33 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 07ED7C21D76; Sat, 25 Nov 2017 05:10:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 4E756C21DF4; Sat, 25 Nov 2017 05:09:07 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 85465C21E35; Sat, 25 Nov 2017 05:08:48 +0000 (UTC) Received: from wens.csie.org (mirror2.csie.ntu.edu.tw [140.112.30.76]) by lists.denx.de (Postfix) with ESMTPS id C4008C21DA5 for ; Sat, 25 Nov 2017 05:08:44 +0000 (UTC) Received: by wens.csie.org (Postfix, from userid 1000) id 9992860019; Sat, 25 Nov 2017 13:08:36 +0800 (CST) From: Chen-Yu Tsai To: u-boot@lists.denx.de Date: Sat, 25 Nov 2017 13:08:32 +0800 Message-Id: <20171125050832.11803-6-wens@csie.org> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20171125050832.11803-1-wens@csie.org> References: <20171125050832.11803-1-wens@csie.org> Cc: Joe Hershberger , Maxime Ripard Subject: [U-Boot] [PATCH v2 5/5] sunxi: Enable EMAC on the Bananapi M64 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" The Bananapi M64 has an RTL8211E PHY connected to the EMAC using RGMII. The PHY is powered by DCDC1 through SW @ 3.3V. The EMAC driver is already enabled in the defconfig. This patch adds a U-boot specific dtsi file for the board adding an enabled EMAC node. The binding used here is the old revision currently supported in U-boot. The U-boot driver has not been updated to support the new binding. Signed-off-by: Chen-Yu Tsai --- arch/arm/dts/sun50i-a64-bananapi-m64-u-boot.dtsi | 39 ++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 arch/arm/dts/sun50i-a64-bananapi-m64-u-boot.dtsi diff --git a/arch/arm/dts/sun50i-a64-bananapi-m64-u-boot.dtsi b/arch/arm/dts/sun50i-a64-bananapi-m64-u-boot.dtsi new file mode 100644 index 000000000000..f80a4255c0c1 --- /dev/null +++ b/arch/arm/dts/sun50i-a64-bananapi-m64-u-boot.dtsi @@ -0,0 +1,39 @@ +#include "sunxi-u-boot.dtsi" + +/ { + aliases { + ethernet0 = &emac; + }; + + soc { + emac: ethernet@01c30000 { + compatible = "allwinner,sun50i-a64-emac"; + reg = <0x01c30000 0x2000>, <0x01c00030 0x4>; + reg-names = "emac", "syscon"; + interrupts = ; + #address-cells = <1>; + #size-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&rgmii_pins>; + phy-mode = "rgmii"; + phy = <&phy1>; + status = "okay"; + + phy1: ethernet-phy@1 { + reg = <1>; + }; + }; + }; +}; + +&pio { + rgmii_pins: rgmii_pins { + allwinner,pins = "PD8", "PD9", "PD10", "PD11", + "PD12", "PD13", "PD15", + "PD16", "PD17", "PD18", "PD19", + "PD20", "PD21", "PD22", "PD23"; + allwinner,function = "emac"; + allwinner,drive = <3>; + allwinner,pull = <0>; + }; +};