From patchwork Mon Apr 3 09:14:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 9659073 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 3F90D60352 for ; Mon, 3 Apr 2017 09:19:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 31C4D28437 for ; Mon, 3 Apr 2017 09:19:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2662E284BC; Mon, 3 Apr 2017 09:19:10 +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 8616E28437 for ; Mon, 3 Apr 2017 09:19:09 +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=MoW7JHH+C3t1lRmbooaNwNNmEulmfIQ29dOB3C1EmJc=; b=o/ZBvUtRN/moj8AKX4BGByx63R VR+3mxiPdphTCy8U52BmcJ6is6vIpsosxsVG1lmHaWL6UiAQVH5Gxap0bCK+ZwnnRDw7hgeejNxdr u85jEiRul1rBAWNGbP2GY97JVsr+C5xqSVLm1Lzsjo7rtngmzeUU6tEyaRAPvBmkYFVz86uOBGJPY sL9giRrL1RpR7lWY18iBea+SfJK61vqeAcq+VYlyGRPoMEEzzJ9N//xMgj4znRCqpXix7iyR3OC86 RGf9yhVQiLies70LzqaxLIcm45SU813WylzjTV4JPLy3w1BMki2pfeGeWkNnzbAzivFYgs1yBQWC/ nAN+AP1A==; 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 1cuy8i-00053U-O6; Mon, 03 Apr 2017 09:19:08 +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 1cuy7D-00032O-6p for linux-arm-kernel@lists.infradead.org; Mon, 03 Apr 2017 09:17:45 +0000 Received: by mail-wr0-x241.google.com with SMTP id u18so31666408wrc.0 for ; Mon, 03 Apr 2017 02:17:16 -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=Bb7OhtyuRkJ+oh6V5zA0r/ZSAGEsyh57E3MmhyOz6yI=; b=quBqcnD3rbsFz39AeEhjaPDYGgMm1CkotzCpRJPPEWlnA64MUyDL+PdhAB/0Ziav8M cZ2aPifZ9ivLRrNPY+oHI+b7Acj3lGFbNj+Bwn2C7B9gw409yXxLjWTqXRlVVSd7w5xj OWTh8HsrullYh92zhRgStkOvIbWPcJUv+Z8f5exFKHuxIZW15Y6VOVfUs7g7tnX6k3D3 fJzXTdcXiNCxtzNCsRLOBUamL/lyEU88pAr2fSpY+9cJ6ZHj2+jjFVa4hRLsaTvLJsrg cSvbBZ72Up7o8CACfSgOVOKvWlc4DwF126Cd+3OPlFNLouiBq+n89bScuLRvaAVGSjch RVWw== 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=Bb7OhtyuRkJ+oh6V5zA0r/ZSAGEsyh57E3MmhyOz6yI=; b=K2uNLOwyelEd3XwEBe+Xpbl+pwHONO9mGsG6vaTv0/OABeNUI2uI2bQdW3Kv1+AGNe goloMkw+CgDP20WskqYUAiIvvEUBb4ry5SdXBiDJwC4ipigoSJy9Q8YPeKEmI+NpT4FL aqA68spuYM2b047U+84oHJitB7JFMxNyFrZE/wWlG/buQlZBN9fIkgb+it5CNGLcHf06 woxA+Oj11YuMxlcrEOXi7qScW5mZK7X7HVd2S6s6ics4fjct06SHM/tETVVQNWpu2+vp +XTbHffY9Nr0xLrYwQ58a8s01sKcKrv0eisluaA5ckuY89CiL6U4rgT1FDJbtxwgI85O 9IEA== X-Gm-Message-State: AFeK/H27v9hlnL9DhelulNedRiwSDspHViV08/tu9APLVnuC4fmcHnpny7Z0qExS0cEZWQ== X-Received: by 10.28.218.197 with SMTP id r188mr8771014wmg.0.1491211035051; Mon, 03 Apr 2017 02:17:15 -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 v14sm13457558wmv.24.2017.04.03.02.17.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 03 Apr 2017 02:17:14 -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 v3 07/20] ARM: dts: sunxi-h3-h5: add dwmac-sun8i ethernet driver Date: Mon, 3 Apr 2017 11:14:31 +0200 Message-Id: <20170403091444.29876-8-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170403091444.29876-1-clabbe.montjoie@gmail.com> References: <20170403091444.29876-1-clabbe.montjoie@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170403_021735_649231_AD6D36CA X-CRM114-Status: UNSURE ( 9.33 ) 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 0815c00..c55e8b0 100644 --- a/arch/arm/boot/dts/sunxi-h3-h5.dtsi +++ b/arch/arm/boot/dts/sunxi-h3-h5.dtsi @@ -304,6 +304,14 @@ interrupt-controller; #interrupt-cells = <3>; + emac_rgmii_pins: emac0@0 { + 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"; @@ -400,6 +408,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>;