From patchwork Thu Feb 16 12:48:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 9577107 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 5CD80600F6 for ; Thu, 16 Feb 2017 12:57:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4481C285C2 for ; Thu, 16 Feb 2017 12:57:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 39325285C4; Thu, 16 Feb 2017 12:57:56 +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 C36B4285C2 for ; Thu, 16 Feb 2017 12:57:55 +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=/rd7fOSdMkoIjIt6PspicDSqHGGFGjluFVRHBrjl6pY=; b=e52BoCQpHCwup/FaEuJRz+dNbQ SDBOlkjrgitiDtwDtlx2YxKrwaywtEXwam3ZK5pSK7NWqPrI/NI0OLhz6c8xM+1V+KicZFLA5uUQL m2J20MNxq2nCQsqnLxj6yac8QZWoeNIMQP0U1TFZod4GEUTFxm1GaIwt3lbn3UofyJmRF8dbFaHrx EgkaRSsq71rnCJUrRaVABUBsSjxg0hWB+MNvphec7+EGSpCQ9WZZlaZwb7pC+HWCpvu4Y8z/V26jb hzyjhVKO5u02L9QbFvg6+ibmemwYBSJBHSjr/tD/TSkF2l5tMSiXDJBChgPzOghRjnx4QS5XbJGk7 /aCJlEoA==; 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 1ceLdC-0007uL-Aa; Thu, 16 Feb 2017 12:57:54 +0000 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1ceLXM-0001Md-ME for linux-arm-kernel@lists.infradead.org; Thu, 16 Feb 2017 12:52:02 +0000 Received: by mail-wm0-x241.google.com with SMTP id v77so2993497wmv.0 for ; Thu, 16 Feb 2017 04:51:34 -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=AawgQoQpsVpq6MqhjuU8WDjwVDGKmN3VHSKZo2Z9YUs=; b=vUp0/USyYqsR33jcyvAd0qt1QjJ3YlivKr2OFqf7gVcEHZAhUmLzUrpvsW8OO/g4f3 Mcgfrg+OBNiLpH462woUH/j6b0hD8sRDwmFBzYd2YIkGgNVc9vKtKNhe25Px+K1cwEvT 2eA5ybK+dE40lMrHSw6SQjhVL6FcusI6PDeUOlQjMQOev5YhvQEvyvUGSo4mpnXILYew foAeJLRDaUoqV4XR9wUWX5ztzU8QUadgr63FKgIZjIPA5tCXWDkIXV3yEN0EWwWyIz8A txzkXI1vOG6BpbvtD77RtKeIqBhc4XixSRzsxRNl9je+MY6g1Ym2hYcLC5rKmWKyWJ8a PaWg== 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=AawgQoQpsVpq6MqhjuU8WDjwVDGKmN3VHSKZo2Z9YUs=; b=tYOjQvO6d4ePHH+z9Xs/6BmkhNqs/m9LfJj7H8/c+yuY7l8k+WLI2I1rD2S5ZOYykb qIhWvdU4rbSDtFLzSm5CNodIjg7yZIo+5fC7C1FAvZX6SXoCxL8C/Gqq1nq3F6pD2cAt QznbIALCNeQSm1be5NBKrPeORZ1n+8LZEJMibw7wKqraRlA0Ux4Djlj3rmxhxKENv2wx mBHYAP6woLdSYx0EL+BTKrCaelCZNCwCY90/edu60CM+EdjwCacsvgu8pF6wSDtQdqYm AWhhYLseUyhjpzvdm38zV+2jWVh/dFfbYHaPMmjcKRwqsnTuw/eVHe+RJSCkJ3yDxxg2 RvKQ== X-Gm-Message-State: AMke39k0yrdfeSlCc515a4LdK0baWKd55orKQ8taGe9f4EJOWh7eJnk1kCsYqVU2jW6wKA== X-Received: by 10.28.234.193 with SMTP id g62mr2262265wmi.36.1487249492856; Thu, 16 Feb 2017 04:51:32 -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.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 16 Feb 2017 04:51:32 -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 13/21] ARM: dts: sun8i: Enable dwmac-sun8i on the Orange Pi plus Date: Thu, 16 Feb 2017 13:48:51 +0100 Message-Id: <20170216124859.14346-14-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_045153_302919_0843618D X-CRM114-Status: UNSURE ( 8.52 ) 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, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, Corentin Labbe , 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 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..17b2b92 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 { + allwinner,pins = "PD6"; + allwinner,function = "gpio_out"; + allwinner,drive = ; + allwinner,pull = ; + }; }; &usbphy { usb3_vbus-supply = <®_usb3_vbus>; }; + +&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"; +};