From patchwork Wed Apr 12 11:13:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 9677201 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 016BA60325 for ; Wed, 12 Apr 2017 11:17:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E66772861C for ; Wed, 12 Apr 2017 11:17:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DB17F28636; Wed, 12 Apr 2017 11:17:55 +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 6100E2861C for ; Wed, 12 Apr 2017 11:17:55 +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=hcEQ34kpe5SjOMFDg6mTJWhAnN7vVCFiVbl+1GDa2S0=; b=tVSQoTH9a6QUo6fBPVHacUI8+X FrF6RhPPGfq5C9qzfKuBOERcttoBw5xzUJgqyWo3OOjQhnwl5GWZzUzQyk+5qjx56pHraFsufIJDc zN4P6nhQwJZjNPlnYfPon/cf9ZxHzmX2Nyzk47jqXDfw1edoCfQP0UquA2xn7p/DC8afFBbp+Ety6 Ve4LRRUL8XCNZH7YzlZsoBHaDr1tLzEcJq697PpXsqeTyOAKqZP+Mul97thrcvEH6wevBMlUk5fa6 /OPwoTKHbJu6kAhZ5ZHLdXkFTW1N/iSvGAStDKUyW6VKWeQA72fgfhfVan7wotlMIKm9Z1Nhxz8e+ ucWmhk+g==; 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 1cyGHZ-0005T1-FJ; Wed, 12 Apr 2017 11:17:53 +0000 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cyGGG-0003mY-OL for linux-arm-kernel@lists.infradead.org; Wed, 12 Apr 2017 11:16:37 +0000 Received: by mail-wm0-x244.google.com with SMTP id x75so5713023wma.1 for ; Wed, 12 Apr 2017 04:16: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=YJq5uUw5k0GHopc6Ch/QF1t6Tb4yo0rHLTRGCVeULqY=; b=TiDW9LMsGcSKJopHsRmxsMYS/IOO9nW6P1zw/hQxKg84su1p7IwzhjAU3Tk46kZU44 6E4SIlr40QtuX1jEWk1Kbaz7c/t8YPuRUkzPkdANvPX400OROpdO598bqtx4ATAMedLx 9tAZX6LV+vHy04gsb9nAH1ok2FWFur1W7jNw04tz7Gjh2DJCaehofqRJbc4126JDwAaQ m9xhXA2sa2UfZ7LZ66qX37p3luT23i1aJ3GGBc0Jl8Dm7oJSlGIxcAe0Z3N3U+w9YnmJ +cu1475O9SjQBPk4A+M2xrXXTXL0R1KwJDg8VfX7fYP/05xDyOAPkXzp9uwPyTTAsvzK zoNw== 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=YJq5uUw5k0GHopc6Ch/QF1t6Tb4yo0rHLTRGCVeULqY=; b=k2eSp0UOU+LY74H12pXPPhjhdTfDKi/hR0uAN4SppYqYQzOQ/H5bLC9mp33X7wD9NE XUe28sQHs0A6H6YJNouo4CEzccAKaPFpFNLLifdvggPtOS+tgTpVQ1L7kxoWnK9B0cmG F7YlNBhNR12lUVj9+XjYtBmeaJNyQ0Q2LY8Lq+qhz83XTOp5QdRPlI6klYbOJOYD+2R8 TgDXcf/+CUtdnFnpbGm37TX5j12a7gI+2TXyTtWUWgsSsy01uGKateGm7Nd34MlGHwS5 EenWnzOctsD1jSujsTwq0CBd19X0QEyqmG+LyZZ9ethpxpmDdIfx4z/UEm6DD+JsUaHd 9COw== X-Gm-Message-State: AN3rC/5nID05d+1+EUXhhlSHKr/yHTAilMkvrwssb+0I0v5nWcUCeZtVEf/jk98vra/xYQ== X-Received: by 10.28.234.84 with SMTP id i81mr2312912wmh.80.1491995774803; Wed, 12 Apr 2017 04:16: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 z84sm4727104wmh.27.2017.04.12.04.16.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 12 Apr 2017 04:16: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 v4 07/18] arm: sun8i: sunxi-h3-h5: add dwmac-sun8i ethernet driver Date: Wed, 12 Apr 2017 13:13:49 +0200 Message-Id: <20170412111400.2296-8-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170412111400.2296-1-clabbe.montjoie@gmail.com> References: <20170412111400.2296-1-clabbe.montjoie@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170412_041633_197851_9984A468 X-CRM114-Status: UNSURE ( 9.47 ) 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, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, 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 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 78d1d61..34ec227 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@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"; @@ -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>;