From patchwork Thu Feb 16 12:48:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 9577081 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 94688600F6 for ; Thu, 16 Feb 2017 12:55:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7A859285C3 for ; Thu, 16 Feb 2017 12:55:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6EEEA285C5; Thu, 16 Feb 2017 12:55:10 +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 09343285C3 for ; Thu, 16 Feb 2017 12:55:10 +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=wsiHiw2sKtE/DCV5MgDuCtIGklalPrT64Qrcd9skJW4=; b=qm2YshRZzLuAI0RuBVVApeznmw 6rjViDdLVhVSsDWJSUu9JOW74zyHueNYXUj2f5S41wcpAICNBvZG/dvFfFWYzi02lp6a7L96X5lHt ivyio3+rFqc/e7A1JN2jA8jSVtbYToioWn6pQEENfE2CZrBEEhYY4xRL2rBms245i78HlySPyTAZi 8qknCM5z88pNwatUcLqeBM1X+aw//T7F6Hb0JaEkySyFXyCKOsdatc83LiZqmWK/F6CGFWdssi+ly yUxwpzIilMQuPOP0MMOi/FnmvieISeRgrb0/+dGF0TFCsaqig9QWIuBz/990s1KuFgjlNO92vJfHQ k6yZN7mw==; 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 1ceLaW-0004ZC-VV; Thu, 16 Feb 2017 12:55:08 +0000 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1ceLXJ-0001Ll-CM for linux-arm-kernel@lists.infradead.org; Thu, 16 Feb 2017 12:52:01 +0000 Received: by mail-wm0-x244.google.com with SMTP id v77so2993078wmv.0 for ; Thu, 16 Feb 2017 04:51:28 -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=DloPBRqvpklm9lvCxo2IiblCyoX2y4YubvYI4lfkBj8=; b=dA9zLY0BohAUt2IXqpS3GftKdLYHo6WHsEzSx8YawZo+cNMHsPsa/0et7ox8fRUiri q9a9fDI3Qy1vLKe7K2oVNTzCxCSTS4QiZxZHm3Ms1XFMsETAuT7RuxRq6B59CDrz3YrM x+Kf2F65kZYkuPbmJuAwp2KHSRBUCCPxkEuMeb25eMIBQC1X6gSkUdPw2TET6yG1s3US fW5evlWxIY0+WyD7xz1qW1D0JgINop97jzsz4uHyCEEPsD4rY1ddeIBPtpO+ZloRCKxk C2zHrzg5syg8PeiBm6MvBDnXOji1nq90ytUNW3jqa8gj1WXASIRJrI2Ya961WfMsg/3W WJsA== 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=DloPBRqvpklm9lvCxo2IiblCyoX2y4YubvYI4lfkBj8=; b=ZLYj18+8/10HRrQ3DDrqSFixjj7j+g4g/g7y4oB0wikG/T+zn55gvSUUpWSLTWaq+5 KcC8EIPGfElIL2cqxdoOOV7tMSYH+FbSR9t/Yy0NyEkoBEKaYRCfYZg8zSE+v7+nK1Av PG19uEd/fi/PfvuAFtCNfjwg9DmUQ2LYuYyk2698jYAHiHTB4JTbUz2OxzIULHDABQbp 9//7j5jmZ6UvyO5gtb0KQ7I1MaXcHJ/MVpc17MiualvcJOfbZdcVx5zge6ZCBha8V8Xw xl3AQM6/rtSHCejoqvGxqWREoYJQTTtbs5XblSroWjefwZEgxNi4LMjfDp4kICiwlH0l jdmg== X-Gm-Message-State: AMke39m+lOIkjCB/ljgDwb5tilj4GRZDcsNI6DT5s8r0YBYEq1PQZu+rTMyY7qFu92ApoA== X-Received: by 10.28.56.134 with SMTP id f128mr2235671wma.29.1487249487671; Thu, 16 Feb 2017 04:51:27 -0800 (PST) Received: from Red.local (LFbn-1-7035-57.w90-116.abo.wanadoo.fr. [90.116.208.57]) by smtp.googlemail.com with ESMTPSA id o143sm144705wmd.3.2017.02.16.04.51.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 16 Feb 2017 04:51:26 -0800 (PST) From: Corentin Labbe To: peppe.cavallaro@st.com, robh+dt@kernel.org, mark.rutland@arm.com, maxime.ripard@free-electrons.com, wens@csie.org, linux@armlinux.org.uk, catalin.marinas@arm.com, will.deacon@arm.com, alexandre.torgue@st.com Subject: [PATCH 09/21] ARM: dts: sun8i: Enable dwmac-sun8i on the Banana Pi M2+ Date: Thu, 16 Feb 2017 13:48:47 +0100 Message-Id: <20170216124859.14346-10-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170216124859.14346-1-clabbe.montjoie@gmail.com> References: <20170216124859.14346-1-clabbe.montjoie@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170216_045150_137495_E33DAD9B X-CRM114-Status: GOOD ( 10.21 ) 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, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, LABBE Corentin , 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 From: LABBE Corentin The dwmac-sun8i hardware is present on the Banana Pi M2+ It uses an external PHY rtl8211e via RGMII. This patch create the needed regulator, emac and phy nodes. Signed-off-by: Corentin Labbe --- arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts | 38 +++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts b/arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts index c0c49dd..a4f7b99 100644 --- a/arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts +++ b/arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts @@ -91,6 +91,18 @@ pinctrl-0 = <&wifi_en_bpi_m2p>; reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */ }; + + reg_gmac_3v3: gmac-3v3 { + compatible = "regulator-fixed"; + pinctrl-names = "default"; + pinctrl-0 = <&gmac_power_pin_orangepi>; + 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>; + }; }; &ehci1 { @@ -187,3 +199,29 @@ /* USB VBUS is on as long as VCC-IO is on */ status = "okay"; }; + +&pio { + gmac_power_pin_orangepi: gmac_power_pin@0 { + allwinner,pins = "PD6"; + allwinner,function = "gpio_out"; + allwinner,drive = ; + allwinner,pull = ; + }; +}; + +&mdio { + ext_rgmii_phy: ethernet-phy@1 { + reg = <0>; + }; +}; + +&emac { + pinctrl-names = "default"; + pinctrl-0 = <&emac_rgmii_pins>; + phy-supply = <®_gmac_3v3>; + phy-handle = <&ext_rgmii_phy>; + phy-mode = "rgmii"; + + allwinner,leds-active-low; + status = "okay"; +};