From patchwork Mon Apr 3 09:14:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 9659125 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 A31386016C for ; Mon, 3 Apr 2017 09:37:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9C6F4283A6 for ; Mon, 3 Apr 2017 09:37:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8F2EC2843B; Mon, 3 Apr 2017 09:37:28 +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.4 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_SORBS_SPAM autolearn=no 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 5A98D283A6 for ; Mon, 3 Apr 2017 09:37:28 +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=DRdr+wU49Z/qWmodz8p9Au8w2J6QvELt9lm9k6AYzPg=; b=GIzPLYsibRUmbVZm9dRoT+30Qm 2sAsjpIaMQUxWk7boQ51bRrx6EzWKtnffwcTjlHXp61MUl2xyg0OsxaVwZo5LWBn1ZoLFrEYdh+7g 91l2lPYEluNY7ktDRiS8NOMC09z1/45HuCexknxP2azMoIwt2WqROXHKZq+Gwr3J626SigjvoY/2G MJC54XkOYcTFM9dteLDvqk49YLYceWmW3xEk/fwBtuy6ADDZUfAsbph060zU6ezXjJuupnw6z1RU6 BIvVK4xk6Rd8WPVMJvgcgTZqMU6WXKnSWwMybijhW4tltF9ZdiaUC9DGgcHktOj7+tZMpqwuHhtka KJ5XEMEA==; 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 1cuyQR-0001hU-KS; Mon, 03 Apr 2017 09:37:27 +0000 Received: from mail-wr0-f196.google.com ([209.85.128.196]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cuy7K-00034g-3u for linux-arm-kernel@lists.infradead.org; Mon, 03 Apr 2017 09:17:49 +0000 Received: by mail-wr0-f196.google.com with SMTP id w43so31663854wrb.1 for ; Mon, 03 Apr 2017 02:17:21 -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=B6SbcMGRR8YsW06gDrsvZspjVT+xroAHiq6xOjf52SA=; b=dI1BXZqlj0lKTtI6puX5m83JMOYc4jJ1KzYPO5AphD9v/LuZM5iBnN8f9AUeUKndKm oQNu0doxJ3fpu6BdUg+8qcuY38xBiajAxJkdwg6i86DYd6/b5uuI3F5N+Oz/xk6edObT FbLlQDP3PKPY7fhEuE2NQfDpdNh8D7ZKTeXD+3T/eBtfGKYDZOY3EWiOXNtSSpCk4HQH 3ADQt6A2vTo2Ea4b9TYRIvNyDKjLjHtRQkKOZiP7qzuTlBC1tdljuEJEMGwIc5HWhHpu tIIqGnffrHYkeMyVxj13Si0DSo9kEaplSuVvSSjCIAiREdTVIjCf+oXBm4vi+AaEzKPX 027g== 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=B6SbcMGRR8YsW06gDrsvZspjVT+xroAHiq6xOjf52SA=; b=l6uy/Ket5sSOr3lbAOhzNHWpsfZkQCph83wuWMMJX2BjiVT3tRWZKsZdq3WAxCpTmz qlxgovJvpHEpQSiIJ+wMEHkjUhyclUFslisCA0JIHXAgA32BBYhRnOLRUUyTBcnAeiWn RX30uLAHx9ZiXoBE2wxBfBE4xWn1yeRy64C8wz3SsogOGT/XsQI7VuGaoBNFhjZSwm82 5GobsEzpVhqqBj/XIPpAn0owMd2+9JNoizKkRnHc0n8OuBANl5ANRhBLQuyjC34Tb3RV sTb3HEiAxN9ABir2is6r0M2GvyJ9Dq8YboMSQstxiSjfeaTInWC9PULJvdcSZQ1L+ztc q9og== X-Gm-Message-State: AFeK/H1yjMlaf4vQm5AVMTQy/EdXMDTy/PiO9GHziE6fgg0yjUEYItsfudHALHe3ynBB/w== X-Received: by 10.223.157.11 with SMTP id k11mr14401021wre.28.1491211040102; Mon, 03 Apr 2017 02:17:20 -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 v14sm13457558wmv.24.2017.04.03.02.17.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 03 Apr 2017 02:17:19 -0700 (PDT) From: Corentin Labbe To: 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, peppe.cavallaro@st.com, alexandre.torgue@st.com Subject: [PATCH v3 12/20] ARM: dts: sun8i: Enable dwmac-sun8i on the Orange Pi plus Date: Mon, 3 Apr 2017 11:14:36 +0200 Message-Id: <20170403091444.29876-13-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170403091444.29876-1-clabbe.montjoie@gmail.com> References: <20170403091444.29876-1-clabbe.montjoie@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170403_021742_918069_C1A4D6C5 X-CRM114-Status: UNSURE ( 8.58 ) 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, Corentin Labbe , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.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 plus. 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-orangepi-plus.dts | 36 ++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts index 8c40ab7..6852006 100644 --- a/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts +++ b/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts @@ -58,6 +58,18 @@ enable-active-high; gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>; }; + + 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>; + }; }; &ehci3 { @@ -86,8 +98,32 @@ pins = "PG11"; function = "gpio_out"; }; + + gmac_power_pin_orangepi: gmac_power_pin@0 { + pins = "PD6"; + function = "gpio_out"; + drive-strength = <10>; + }; }; &usbphy { usb3_vbus-supply = <®_usb3_vbus>; }; + +&mdio { + ext_rgmii_phy: ethernet-phy@1 { + compatible = "ethernet-phy-ieee802.3-c22"; + 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"; +};