From patchwork Mon Jun 5 19:21:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 9767313 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 F0BC160364 for ; Mon, 5 Jun 2017 19:24:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E0A5C252D5 for ; Mon, 5 Jun 2017 19:24:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D545627569; Mon, 5 Jun 2017 19:24:15 +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 7427C252D5 for ; Mon, 5 Jun 2017 19:24:15 +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=DTnCUmCUmY/wedT4RTWfut1br+wYHz5OfvwVITWER84=; b=mnNZapoUOKnF+NY2FabPsm72W5 L4/q6+Env4dyJQVAxlPTUArnIEVEck6W44cI5AiiabGgiWTaF5weqbW/MwW2uEMzoLXTQfPbKCMab GpOPnsMJEepY96D/tVxOq46SRO9wkqyqVW9mEHoZGGaZGj/3R5rdXHfGKa6EAtmSkpQGFLgYiwzeY 3JnYb7+V6uVv8ADxlZq+FwyKjOke9rQKbGtbBdo6g1CfwOt6m7JL2IfnucGrlW4A67lLTPhGRHC2M rhodVM4m6LTh2RnTCwOQ0wxOYVQkMOvSHwg9z9n5qIpIwPZZvzW5/QBZr7z3Q25URBgEfUfImnqrC uO2fr8cg==; 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 1dHxbp-0000dN-4f; Mon, 05 Jun 2017 19:24:13 +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 1dHxbd-0000Kk-JZ for linux-arm-kernel@lists.infradead.org; Mon, 05 Jun 2017 19:24:03 +0000 Received: by mail-wm0-x241.google.com with SMTP id x3so4202441wme.0 for ; Mon, 05 Jun 2017 12:23:41 -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=t+lVEiv3V3++dNdU3LXXi/P70LnMVOu9SXKtyY/HbUw=; b=QB+oA2+wl8u4ke0F//nDK3W0Z7ABw2nq5GP0MIN6aVRnUdiQxxkaANPKMp9f2wboGN ss0VxkKpH9jf7SbsgzpueQMcEEuPhSgiILapV+uwscJoDkShLYskZ2+gXE4E1xx/564r UpaVB84Fw43qFKauXMpOKCdUOa9yYqKMTC7Vzr48CKCtuiMCL4JEgmm8ZWU+qrGJUBXu ovScg/CyacolONnVSqL8XADYDjC9FTTaizJpY0n83oKKZabndgqLAKNU8O7kgThDcMse IjUR1uvS7ZlLVE+5ycPWkc6nfuEmVNnzFs7kEnu/1uUZNS79PTLfnLTxVIOjdALUiX6c f9+g== 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=t+lVEiv3V3++dNdU3LXXi/P70LnMVOu9SXKtyY/HbUw=; b=B6nSyWEsvBIJeuK0Utt8DKMkJU2OTtt9OBaAMVRElrY38sg+qh18IsVJ41fK01Qp7+ SXTATb6tOW3dvhlLBXCEImE50StiMlG+ea3LYZctHNMKhLJK8iZFuTMc0dz86QQMlfuV U2/HpQftL5Xqoai+lTs1AbiRcf5djrzI7BEjSQ8ubvOo+jQaI91S8KBtdC0tk8oMdpEb R2s0+WY5/X1dY11DlJDATjIgVBGSlgeionpBpOMHTwRqngFvnsg0FxtO4ZFF3cNDP0M2 R7emNK23F9FgINpH4Sc581myhl2mYXzNF03n+C8ACcBO1x+v8VUJcpxlvc2dg/XilXMb a37w== X-Gm-Message-State: AODbwcBtU3fk/wklq5056cgQcO9hsqiTLTGsKxeNANyuBAyH37hEBKyW sN4AHpO+fxIZ3Q== X-Received: by 10.28.136.201 with SMTP id k192mr5212941wmd.122.1496690619876; Mon, 05 Jun 2017 12:23:39 -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.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 05 Jun 2017 12:23:39 -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 1/5] ARM: sun8i: orangepi-plus: Enable dwmac-sun8i Date: Mon, 5 Jun 2017 21:21:26 +0200 Message-Id: <20170605192130.25320-2-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_122401_805435_7CD46CAA X-CRM114-Status: UNSURE ( 8.97 ) 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 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 | 32 ++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts index 8c40ab7bfa72..331ed683ac62 100644 --- a/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts +++ b/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts @@ -47,6 +47,20 @@ model = "Xunlong Orange Pi Plus / Plus 2"; compatible = "xunlong,orangepi-plus", "allwinner,sun8i-h3"; + aliases { + ethernet0 = &emac; + }; + + 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_usb3_vbus: usb3-vbus { compatible = "regulator-fixed"; pinctrl-names = "default"; @@ -64,6 +78,24 @@ status = "okay"; }; +&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"; +}; + +&mdio { + ext_rgmii_phy: ethernet-phy@1 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <0>; + }; +}; + &mmc2 { pinctrl-names = "default"; pinctrl-0 = <&mmc2_8bit_pins>;