From patchwork Thu Nov 9 08:29:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 10050493 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 F3222601EB for ; Thu, 9 Nov 2017 08:33:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DF3802ABC2 for ; Thu, 9 Nov 2017 08:33:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D403F2ABC6; Thu, 9 Nov 2017 08:33:25 +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.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.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 6D2FC2ABC2 for ; Thu, 9 Nov 2017 08:33:25 +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=rgkKQZnWeS1Qdsx0xsEMViitDHg9QYqZdskKg5qk7dg=; b=hdFWxdoyUJadDV+L3Zz9SXj9CR gD0q1cusMIcPg9y9cTODSchJ8dlgRMNT2se0YGvCdEWa+GItAiSOL1YjKiQRkfMJ+1h/uC4WWdgCL /U2htMfWui4/gg4Vk2gkzC234ORzibrx3QifI7yGC1YIIKuAWCW7/WHfs+LYWyz044/LXxHKaS6Y0 ZMsHfv6nb02Eh0e/oWzeBvjFo9U3gvtI45GUIDI6cDdZ9XjCZUsdJLA7mmb6vl//NUVKq+hBx9Svs DyT+JWLj2tUmLzEyUHcrApCooWCEgkRkfMzl2ZPJN591czBuFOQpOcgtsZ07lEgybYbZF3F2MaM3a GW6KPA1w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eCiGy-0002QA-K7; Thu, 09 Nov 2017 08:33:16 +0000 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eCiGK-0001lv-4L for linux-arm-kernel@lists.infradead.org; Thu, 09 Nov 2017 08:32:37 +0000 Received: by mail-wm0-x242.google.com with SMTP id p75so15309070wmg.3 for ; Thu, 09 Nov 2017 00:32:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=kXSz2eBfi+VFeJfS84M0UVP4mfx6KNOIaPgCOyFNmxo=; b=TCxg4/ys1/jfw6+Rk59hNBdk3mUg7muZjTdenh+WDfY7VS/EFyZruY2CdgjtYMVMZ+ hpX57XuukChhhuD8VbyxR0txXNFfaiv6PUG0QjOJCsRZ5xyIE5H2Jeafotd22Jv/bE+y sHIBn1gW0f10wru1lKlTJxlrPwapnbdiv3NG5qgagboOg/Q4KIHuJ3cwMMPlei6Q35ib /R+QjVxeHC1ME7V7O5f812xUsLGviZhgYZ0qtdOkLw9Lowyj06EgJk4sMGOrboTRt7cj a3qxvszCsx/8rkMeqYV4Ie8rDnOuIyCQLb5LCTmZOYGRxKAQHZ+WdNiiKHtfpjH4sI8f khKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=kXSz2eBfi+VFeJfS84M0UVP4mfx6KNOIaPgCOyFNmxo=; b=Wl3yDK+Qas/AJ6BGNLfELDOQnsVzZH8cGu1e/khjN2xNMWOwDw9ysUiKTZSRneTtY/ 5Tq13bunHtE7XOtJrEhVyZl+bL8xPSH83G6bFcFJn0Q/9zXChHyhCJvCFxnMhMC+qDH6 wMYLBGYBVGugsL5V5jcok5VsYp/lYsbCmn7uMOLOgGKtKnOeUL1TSSi3Lw3lYoRaHL7+ i86eHoGCzYXf1WhX0hXiOwPkU4091fTTvkFSglpvYJCKyJ3hrrknzG+61KepJH4lQwqq EQ5HT+D9tH2jCnhbrQSd/KtWmxrNperliMyCG2MXDOtRiGuydEQ7XgSTTHPqHXYnzEFn blCw== X-Gm-Message-State: AJaThX4ua1Ey3/I1jRmPP2+ikX3Iq5YimqNVxbGdhepq4uoX9DKYst+B L6eahpiSRofVrRP7YEqApug= X-Google-Smtp-Source: ABhQp+SBAL3y4SQJJCJkRGTwiCLrfzLaEp+1vRXk0SCTj3ioO0aVtUjoHOFyo4NBP/XKm7tXx81slQ== X-Received: by 10.28.93.200 with SMTP id r191mr2531966wmb.19.1510216334535; Thu, 09 Nov 2017 00:32:14 -0800 (PST) Received: from Red.local (LFbn-MAR-1-580-96.w90-118.abo.wanadoo.fr. [90.118.159.96]) by smtp.googlemail.com with ESMTPSA id 195sm2813960wmj.3.2017.11.09.00.32.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Nov 2017 00:32:13 -0800 (PST) From: Corentin Labbe To: linux@armlinux.org.uk, mark.rutland@arm.com, maxime.ripard@free-electrons.com, robh+dt@kernel.org, wens@csie.org Subject: [PATCH v2 2/2] ARM: sun8i: bananapi-m3: Enable dwmac-sun8i Date: Thu, 9 Nov 2017 09:29:50 +0100 Message-Id: <20171109082950.21124-3-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171109082950.21124-1-clabbe.montjoie@gmail.com> References: <20171109082950.21124-1-clabbe.montjoie@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171109_003236_425241_966324DC X-CRM114-Status: UNSURE ( 9.82 ) X-CRM114-Notice: Please train this message. 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, linux-sunxi@googlegroups.com, Corentin Labbe , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org 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 dwmac-sun8i hardware is present on the bananapi m3 It uses an external PHY rtl8211e via RGMII. This patch create the needed emac and phy nodes. Signed-off-by: Corentin Labbe --- arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts b/arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts index c606af3dbfed..45bdd5c17829 100644 --- a/arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts +++ b/arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts @@ -52,6 +52,7 @@ compatible = "sinovoip,bpi-m3", "allwinner,sun8i-a83t"; aliases { + ethernet0 = &emac; serial0 = &uart0; }; @@ -88,6 +89,23 @@ /* TODO GL830 USB-to-SATA bridge downstream w/ GPIO power controls */ }; +&emac { + pinctrl-names = "default"; + pinctrl-0 = <&emac_rgmii_pins>; + phy-handle = <&ext_rgmii_phy>; + phy-mode = "rgmii"; + allwinner,rx-delay-ps = <700>; + allwinner,tx-delay-ps = <700>; + + status = "okay"; +}; + +&mdio { + ext_rgmii_phy: ethernet-phy@1 { + reg = <1>; + }; +}; + &mmc0 { pinctrl-names = "default"; pinctrl-0 = <&mmc0_pins>;