From patchwork Mon Jun 5 19:21:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 9767321 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 1715460353 for ; Mon, 5 Jun 2017 19:24:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0429624B5B for ; Mon, 5 Jun 2017 19:24:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ECF37274D1; Mon, 5 Jun 2017 19:24:39 +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 96B8824B5B for ; Mon, 5 Jun 2017 19:24:39 +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=0FFiLzssq53Ll9jiSJuQeqwCxtsmDV8dYNwY2YSC2l4=; b=I7b8/3ZK/vQ5wUta44KzWZa+Ha pRgEyYtMB1wh/N97kv52liXRULqnudkdhqw242TKFxVaL/43S4JBWU+zegrX6VihdS8wCzen5nL+c wJGdFn8ThFZ5a/xkObt9rqED5eORpBnOU0/NiUwii6/fzJt4p03TOu97P+kGXp2L9jVJfegxJA3Mx sMTgw/yG90XrlSoEs5jGKuECxaPanEaHpKup7EIvFYViZNIg2+3+SbG6ILbuREaC+4k3+7FXQeDjx JidDgdwih1h0khe4I6Y9MwjWEc3GDK38cErt1Hn9Hnh9zhR2wPPD3HXolw4YWPqs/K+5PWeuxBGUZ B9kB1ucg==; 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 1dHxcE-0001Ek-76; Mon, 05 Jun 2017 19:24:38 +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-0000Ko-JW 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 x3so4202532wme.0 for ; Mon, 05 Jun 2017 12:23:42 -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=K7y5WULGZyP/U3/qAq9wRWCZPSmEAzThJBVBk6C/vQA=; b=T/FWIrbScfRpinCKper6Ae/o+25XEwh6GEYXPr693vQSbIb+eCCfULWD8lWZv2fwUi 1Q7dlAf+lK2whQcShu3Kz1kIMM6Xsc2R4qceLUsIlbO8jUbK1ItUPpv2ERtuhNxI40tC FlExu0DWHa53gqD1MIl2R17jBFe3s2OjA99SwyJEuKN4ugKNDG8V8MQLgoUoEqFSWvSM iZ9P71/XrCa8tw3Qjd9MajvYsoR/8Jzv8uqX1KoPMhu2pdn2eDoamFgKhNg+XjRNXOnF RyUm/+r2nYPvBU5c1C05QM6bu2kZqUXSIF0KQW2WirFg4/31nA2DVHwf92lDs4bcjEkC 74dw== 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=K7y5WULGZyP/U3/qAq9wRWCZPSmEAzThJBVBk6C/vQA=; b=XBHI6qeYEydBBnMecDnPYS08e9BQPyGSIQHaJ8jo8YjoLz1Rlwpk6HmvNEly3upV2u Z0Muh7VMc9ckg4oQxtWgSo34k6r2/Vhl69/VwL+Kb60F+O3gMh4K3V7tC+fw+MaCf0LV c1m5g4R1vulBVfvp2M5ITtEXYk0fSAgr/xkkzKWsNl9rp/5hEWgOO6/x53kJpBN0VpCO aEBK+QwJuAMNqlpcq2vMMPCL3gOUMUuMLybfbrv4zUt8ak84rpbDguCG/XebYHdZwsIY vEmpm5+tKPIFyBqGanrGzjbcKdp8tColwyaiwlVCg6/l4pw946KmUsMnLC7XIU8whJOW 8wlA== X-Gm-Message-State: AODbwcBK+cvsc4S+tjcybMMyGCg5FqH7OkQtu75v3mOJpaF+bKc6Jwo1 2ybOPY0/WjmUyw== X-Received: by 10.28.72.7 with SMTP id v7mr2710567wma.125.1496690620945; Mon, 05 Jun 2017 12:23:40 -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.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 05 Jun 2017 12:23:40 -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 2/5] ARM: sun8i: bananapi-m2-plus: Enable dwmac-sun8i Date: Mon, 5 Jun 2017 21:21:27 +0200 Message-Id: <20170605192130.25320-3-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_804445_A5550B2D X-CRM114-Status: UNSURE ( 9.06 ) 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 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 | 29 +++++++++++++++++++++++++ 1 file changed, 29 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 883072b611fa..d756ff825116 100644 --- a/arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts +++ b/arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts @@ -52,6 +52,7 @@ compatible = "sinovoip,bpi-m2-plus", "allwinner,sun8i-h3"; aliases { + ethernet0 = &emac; serial0 = &uart0; serial1 = &uart1; }; @@ -84,6 +85,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>; + }; + wifi_pwrseq: wifi_pwrseq { compatible = "mmc-pwrseq-simple"; pinctrl-names = "default"; @@ -104,12 +115,30 @@ 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"; +}; + &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 = <0>; + }; +}; + &mmc0 { pinctrl-names = "default"; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;