From patchwork Tue Mar 14 14:18:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 9623569 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 8719D604CC for ; Tue, 14 Mar 2017 14:28:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 778FB285A1 for ; Tue, 14 Mar 2017 14:28:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6C342285B1; Tue, 14 Mar 2017 14:28:29 +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 8F2CF285A3 for ; Tue, 14 Mar 2017 14:28: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=uCGQSXeJk+0iM9WFS32E5RABmrHe9cRRSRQapTO4wio=; b=U2BdXMnIdprzX1zAmlV8LmjsO1 8HAsxkwTz1qMS2UT4g0JaXmcIpGaEXSDG7TubSaP36oFSLMYO0BCUsWmneMaBSC2nekNs6rENRSwT vO7ctYpM+HRQtu8ikCjJrk0TNnrGg/5HxOZQ3Fcrbwz/BpenKtmH27cNEvtsdR0JNtmOitVjjAJu6 JQupAJm5sVjwYAZVql5acCer900hN/P4qT/uSMvEQ1881hO8dJ5bqeGO6kD8aauzxX2fAz0iQxy7P tPYYtp5MfGSAi1K1WLRqpoRwUqTEhn+xlNLz6wHh/TKrPw5UtiFDEANY20v6elVTh9Thg53d2jbOi M/Xbl3yA==; 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 1cnnR3-0004IK-3v; Tue, 14 Mar 2017 14:28:25 +0000 Received: from mail-wr0-x241.google.com ([2a00:1450:400c:c0c::241]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cnnKZ-0006tH-7Y for linux-arm-kernel@lists.infradead.org; Tue, 14 Mar 2017 14:21:45 +0000 Received: by mail-wr0-x241.google.com with SMTP id l37so24064284wrc.3 for ; Tue, 14 Mar 2017 07:21:27 -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=lnH79BhrYZrObMoBUc6lFnQSmORte1jq54okhcF1fOc=; b=FfolE/aGazG2WFqfd/uh/hrvk25yHoep2Ab16Lo7dkldfY7Pc+RLqlBL6BOrsj5iXL 3zeeagDGG0KLx97leU63LdN5dKUWrGTnppSCxnXsAl6PqjB38g8G28msODGgqqSyo2DY jNqocl8wrg1v6p4T229OUS4I+VCYuRQHxjPmogL02Z6WcVnJ1dxXUtxCquIP2nCdJtq1 fgtCtJwhZpf87dWiKO8DkB+76KTadt16eSWV/0qS0jWL2gaVReGXch3bprfEGY151Z3H EoI9bWbeCyJWkcDRkZ1ik6b0GUlti17ZjuEHI3Wkih9Y8lt2RZcCDO0S1I750Cc3u1No qx5g== 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=lnH79BhrYZrObMoBUc6lFnQSmORte1jq54okhcF1fOc=; b=c27ewcPRpYOKK4tjwMljf5TLKMKUtY2T9fpXAJrk+xgU8sl6ONu+p1tpJngNRM2Iq3 DBgkqeg4jr9Sse3HS1Vfc6qF66w4NtYWRSatVycfGS0EYQ2ZDqz61Y0v8gVi9Jy8NrnQ bv7cZ2KbRIqEUqXicsY7YKL/Puuk9kPS2M5KDpKT0zu+HpWXIzCuMvS59RfCb40pJUsC e6kpHTtMx01XWdPj+kCxiTw2epmZsV0P0hM6hiet0YDIeWBmqtSXAtcSXXYUn1d9c29C nyL5LA8ckuEsS9eVMiEK7vFuX2/Ol/5qjEo+VfKkbZp8S3qZRCZvk7mQsInjcaRyBIUp vFTg== X-Gm-Message-State: AMke39mAq/EInrIKJG8607fKRJXSOCTeGEPheHj9rcafZS8riPJoy68ULpQpZKO3gN6w2w== X-Received: by 10.223.131.3 with SMTP id 3mr33566291wrd.153.1489501286551; Tue, 14 Mar 2017 07:21:26 -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 o143sm49526wmd.3.2017.03.14.07.21.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 14 Mar 2017 07:21:25 -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, davem@davemloft.net Subject: [PATCH v2 12/20] ARM: dts: sun8i: Enable dwmac-sun8i on the Orange Pi plus Date: Tue, 14 Mar 2017 15:18:48 +0100 Message-Id: <20170314141856.24560-13-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170314141856.24560-1-clabbe.montjoie@gmail.com> References: <20170314141856.24560-1-clabbe.montjoie@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170314_072143_467269_6B7EE4A5 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, f.fainelli@gmail.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, 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 | 35 ++++++++++++++++++++++++++++ 1 file changed, 35 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..4e075a2 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,31 @@ 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 { + 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"; +};