From patchwork Mon Jun 5 19:21:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 9767347 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 41152602BF for ; Mon, 5 Jun 2017 19:36:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 318B6283CD for ; Mon, 5 Jun 2017 19:36:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 25B7D283E7; Mon, 5 Jun 2017 19:36:17 +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=-1.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM 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 AD07D283CD for ; Mon, 5 Jun 2017 19:36:16 +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=vYMNkdRN8PvDsX4NMxXlsabQ/QzzyqW4GgAyWUunK1U=; b=XskLCsU22bCWxySslH5s22KkDK bVY5jE5o7aLrYdPDq5TYvG6LrPw1TxYZ3lotW8LJa1puzd7sPUrOBrUUxA0OKdjX/C7QWXcHLXfH1 LCBLZzN3pfTRn/NeY+WBlTu3QOm4L6WMsuoWKsEt62E86CNFJr6OFD3qkiJvQPgGRS+DutgAWL3om m6er4Yh0C+ijmRjpikRWyRJM/j9tZBI6MaTQWkMieUnjU5pm79qIrhXWnVpmqp9aat7mRWWgKcW4A HRT35IWiSgFE7Librqwpwu1lb5uonm92oFrdgMc0pfbkRtC3ckdEMztQCWQ1/zmlxh9mWWOD28bPw KNhZ50UA==; 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 1dHxnT-0007Au-Ku; Mon, 05 Jun 2017 19:36:15 +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 1dHxbe-0000Kv-Jb for linux-arm-kernel@lists.infradead.org; Mon, 05 Jun 2017 19:24:05 +0000 Received: by mail-wm0-x242.google.com with SMTP id k15so31444147wmh.3 for ; Mon, 05 Jun 2017 12:23:43 -0700 (PDT) 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=hcZWC4YTot1l8lAKWv0vrb8pwt7eFyVcPyJ17fnryMY=; b=o0w/Ek1+fJZmbTobl8ZNSTrzWeLRD1LkI+x771thk8d2NexJt1ciNr+/OYtsTCNs+0 9OtQh73ipkr33rdUSbR6ojXDSrnPABXAiZQwmKqSTO4PeKAwnniPQ7SQO/+trbm6IkWb MqlTqVrMlhXuiucC+2nDpX2TGySTJ29vW4m5vGgDyJn9f6sZS/YFEu0XV/u6hA2RpjOE qJEMyE61RDj8K0m1cvZLNG8b/IQwuzbVlMhBFhhUamsx6lpz9Y2GNM2Z49clCoCacHUu LQ3xnfw/6SzbkANjqhVICjRhOwRwNciiqZCttjaOb3Nj/2/wC0n+tSzfItLfaqua6y9D jSDQ== 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=hcZWC4YTot1l8lAKWv0vrb8pwt7eFyVcPyJ17fnryMY=; b=V52ozYucxY1UoWKjyg3R5wdepv6eboR4bgXkxTK2X2etgEtskthq502s5liNW8Nrva MuI0VJoimAeCOY9JmBhtACqu11L6sL3vYiZ4NA67KFJIG75/8ke6Wj7VbJvPjFh7xr1x rJO4FhL46eiZvgxeY9o34iREzYDeQygIZF3fY1v7mJCuow5gGVm3Qq9E95VM/yh7nvvc t900zLZcdbWFePCOcCyBUmeemfnFILwrZCNXtWQyg149lXlozSrx+WfQZAqhVZ51gkYy UvOXNNY/QStf+gyPF0QpcJndyq7FELOxt3t862C1im53lyY3ZEeb72J8jqK0ijF4Gi4Y 2lEg== X-Gm-Message-State: AODbwcBIgHKaDgJiVL/QojR90rymORMQbqS86sml+ycXxUl8YWUF+/J3 a9viITGODn4p8A== X-Received: by 10.28.134.133 with SMTP id i127mr8853198wmd.1.1496690621896; Mon, 05 Jun 2017 12:23:41 -0700 (PDT) Received: from Red.local (LFbn-1-7035-57.w90-116.abo.wanadoo.fr. [90.116.208.57]) by smtp.googlemail.com with ESMTPSA id e21sm12927933wma.24.2017.06.05.12.23.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 05 Jun 2017 12:23:41 -0700 (PDT) From: Corentin Labbe To: robh+dt@kernel.org, mark.rutland@arm.com, linux@armlinux.org.uk, maxime.ripard@free-electrons.com, wens@csie.org, catalin.marinas@arm.com, will.deacon@arm.com Subject: [PATCH 3/5] ARM: sun50i: orangepi-pc2: Enable dwmac-sun8i Date: Mon, 5 Jun 2017 21:21:28 +0200 Message-Id: <20170605192130.25320-4-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170605192130.25320-1-clabbe.montjoie@gmail.com> References: <20170605192130.25320-1-clabbe.montjoie@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170605_122402_817582_ED1DB102 X-CRM114-Status: UNSURE ( 8.98 ) 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 Orange PI PC2. It uses an external PHY rtl8211e via RGMII. This patch create the needed regulator, emac and phy nodes. Signed-off-by: Corentin Labbe --- .../boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts index dfecc17dcc92..a8296feee884 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts @@ -59,6 +59,7 @@ }; aliases { + ethernet0 = &emac; serial0 = &uart0; }; @@ -91,6 +92,16 @@ }; }; + reg_gmac_3v3: gmac-3v3 { + compatible = "regulator-fixed"; + regulator-name = "gmac-3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + startup-delay-us = <100000>; + enable-active-high; + gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; + }; + reg_usb0_vbus: usb0-vbus { compatible = "regulator-fixed"; regulator-name = "usb0-vbus"; @@ -126,12 +137,28 @@ status = "okay"; }; +&emac { + pinctrl-names = "default"; + pinctrl-0 = <&emac_rgmii_pins>; + phy-supply = <®_gmac_3v3>; + phy-handle = <&ext_rgmii_phy>; + phy-mode = "rgmii"; + status = "okay"; +}; + &ir { pinctrl-names = "default"; pinctrl-0 = <&ir_pins_a>; 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_a>, <&mmc0_cd_pin>;