From patchwork Mon May 1 12:45:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 9706517 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 ADE7B60387 for ; Mon, 1 May 2017 12:55:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9C6D522B27 for ; Mon, 1 May 2017 12:55:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 90CF52807E; Mon, 1 May 2017 12:55:30 +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 369F022B27 for ; Mon, 1 May 2017 12:55:30 +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=SLYdNpdV/ey9pjNfwaBZ44Kf9trNadxu9fx9BTCH2bY=; b=ot356snNAR3eBwLQFegCahRDKs BGLswWB+uTBCgHaWFmqPemUmMr4kRA4KRSyGLdrdm/pWLfQabvNxCozf+CrJXTEnFFZdmK0hKlQO9 KryspB2OeBF0JIUe3KaaU46SHLxrDUe89UKcS72Cm56njLxy0gjFWWZZYFXkWk5nxTZsN9MLH3stG 89/sSsTvQ915iv1fDtrjoyLDP4VgPMGW7iyceXYHQrSPo14hhTYb2q3W6yqpyzE4MoBtIjF5MNI6v pHcIpeND0chRvHoieNZABU4At59cffnCDuqqANCLvT/DOnpMMuBlNFXQwvcB+TGhle9jsqsoe4iV8 b2FfUWTQ==; 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 1d5ArP-0002Fp-Op; Mon, 01 May 2017 12:55:27 +0000 Received: from mail-wr0-x243.google.com ([2a00:1450:400c:c0c::243]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1d5Akg-0002Jy-TN for linux-arm-kernel@lists.infradead.org; Mon, 01 May 2017 12:48:33 +0000 Received: by mail-wr0-x243.google.com with SMTP id 6so13735822wrb.1 for ; Mon, 01 May 2017 05:48:15 -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=MgHWjMnO0CViTEMYANl8Qmg2Bi6wz+7No1KK7FyLpxI=; b=uJkbnR21b0hXjVHWnuzLdaO9UtK9ENruU1+13RpCH6jV4bKOQxjqs1mdLQwf+mXMdH BRYTF4dghcK3w6WAd8ShKWIfJqXPt4b0I27jop9whbFn3jYB6XawVrvaV8g0vO/U7ufj gcDIqYAqFDPLAbwPE/p++lnxLu2lVzAK+l5UdUSYi3xmYaZlUz8tDKRRf8tjtJooQn3d ma8jWLAbMzX110bqcLoeHp1/6XKEJxiG+0qdtCks37c/IJCFWXL5pC79WRenp82H++ZJ Kl+Ru2G2Zl+YEupJmWUpN35Na+EAcWoF/yD+C5cAfzwowrosXHgpoPMXEph8h3GRin6B 2pUw== 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=MgHWjMnO0CViTEMYANl8Qmg2Bi6wz+7No1KK7FyLpxI=; b=GeMOWT8+lhHzxSGVJ+3ALjLriIs2+5P91gPMDwaEt5nCBZqV6vUlvRAvgaO0++qmBr RPO5hKz9cbYnISPc4WhSEiIfCvEIxSZGY7DCfpVPQ70Pcn0In84TqbWA2KxfHOsObWMq oW2xQr7OsvH0TzJW737j3Dt8iuZNXCO1Hk1pxtA6MJaEObUCQSvW72Ulhz+rwXOcWS4B e/sfhKrTvyp/VbzgHoPpwvYaiNhP4kL/sgyHNihh6OGKYEeuvoDCxeLMA+6ADilT3See dXY+zsdXkKxdPLvG5tHJSymDoYUlRtriTjp6d7Eypd6G53f2nNGhNARX8Y+w705MgOjN /0HQ== X-Gm-Message-State: AN3rC/7JwE9QF3EvgrnhACIVOglMlFh5l+n4vznPig6rq8VOw4XPvHsX D/7hO7ItX5JeVA== X-Received: by 10.223.152.175 with SMTP id w44mr15109518wrb.122.1493642894227; Mon, 01 May 2017 05:48:14 -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 4sm3364514wrv.33.2017.05.01.05.48.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 01 May 2017 05:48:13 -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 v5 07/20] arm: sun8i: sunxi-h3-h5: add dwmac-sun8i ethernet driver Date: Mon, 1 May 2017 14:45:07 +0200 Message-Id: <20170501124520.3769-8-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170501124520.3769-1-clabbe.montjoie@gmail.com> References: <20170501124520.3769-1-clabbe.montjoie@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170501_054831_122844_8627CC4D X-CRM114-Status: UNSURE ( 9.07 ) 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 is an ethernet MAC hardware that support 10/100/1000 speed. This patch enable the dwmac-sun8i on Allwinner H3/H5 SoC Device-tree. SoC H3/H5 have an internal PHY, so optionals syscon and ephy are set. Signed-off-by: Corentin Labbe --- arch/arm/boot/dts/sunxi-h3-h5.dtsi | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/arch/arm/boot/dts/sunxi-h3-h5.dtsi b/arch/arm/boot/dts/sunxi-h3-h5.dtsi index d9691fc..45a9a30 100644 --- a/arch/arm/boot/dts/sunxi-h3-h5.dtsi +++ b/arch/arm/boot/dts/sunxi-h3-h5.dtsi @@ -285,6 +285,14 @@ interrupt-controller; #interrupt-cells = <3>; + emac_rgmii_pins: emac0 { + pins = "PD0", "PD1", "PD2", "PD3", "PD4", + "PD5", "PD7", "PD8", "PD9", "PD10", + "PD12", "PD13", "PD15", "PD16", "PD17"; + function = "emac"; + drive-strength = <40>; + }; + i2c0_pins: i2c0 { pins = "PA11", "PA12"; function = "i2c0"; @@ -381,6 +389,32 @@ clocks = <&osc24M>; }; + emac: ethernet@1c30000 { + compatible = "allwinner,sun8i-h3-emac"; + syscon = <&syscon>; + reg = <0x01c30000 0x104>; + interrupts = ; + interrupt-names = "macirq"; + resets = <&ccu RST_BUS_EMAC>; + reset-names = "stmmaceth"; + clocks = <&ccu CLK_BUS_EMAC>; + clock-names = "stmmaceth"; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + + mdio: mdio { + #address-cells = <1>; + #size-cells = <0>; + int_mii_phy: ethernet-phy@1 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <1>; + clocks = <&ccu CLK_BUS_EPHY>; + resets = <&ccu RST_BUS_EPHY>; + }; + }; + }; + spi0: spi@01c68000 { compatible = "allwinner,sun8i-h3-spi"; reg = <0x01c68000 0x1000>;