From patchwork Mon Apr 3 09:14:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 9659103 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 4C1BF60352 for ; Mon, 3 Apr 2017 09:21:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4125828435 for ; Mon, 3 Apr 2017 09:21:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 35FC3284A5; Mon, 3 Apr 2017 09:21:24 +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.4 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_SORBS_SPAM autolearn=no 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 B893E28435 for ; Mon, 3 Apr 2017 09:21:23 +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=8lUhAzEqqPG6FQy3qR/6zKZCWQSg0nsbEw4e730Mf98=; b=rwO2PnuXtCA8jiwnveTxHdDw2u yqH983SO1Q/e7QW0JKaIDfjUKRv17cUqVOfzsvCCYKmi1F+0Wu9AaLFwLvqe8pC/RByBit9RHzQAI 3A7al8TkYvTLbp/RXIMakL2ruhatHyR8W9snJQoGcwSHqtEOYTV2BRdeiRo+d7bshBTJ7Zb52UsmZ UohAgL/EJ5hqfsHSOXu0e2W8T26YAEE/iCJhiRhnV3abwaItJPe8g9rYyEFaTVbu+yI59WfiloIJA zlnh4tB8zGm+PjkqBZVrjzRZFgURdmegLUr2xqpoBs+hMZljLSsKJqZD4yqr0/IpYbOT6S3Ri4Xbq wbqyuEHA==; 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 1cuyAr-0000VX-PZ; Mon, 03 Apr 2017 09:21:21 +0000 Received: from mail-wr0-f196.google.com ([209.85.128.196]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cuy7K-00036K-3q for linux-arm-kernel@lists.infradead.org; Mon, 03 Apr 2017 09:17:51 +0000 Received: by mail-wr0-f196.google.com with SMTP id k6so30362610wre.3 for ; Mon, 03 Apr 2017 02:17:24 -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=wNthxjNuEX7gZE7FCbttcB0oi5leCeqvU6ObMhDnDus=; b=mcS60pUaNPU5W033HBVhxM4LhGZQ8hBNHvZQprZ4GhEZR4aBRvrytxfZhlTbGNTtIk JUbGLiZHlZrfxyOHFwykmez4VfIZ3hW13b1IV6pjARJqpWqIDH77c3KREtj4PorfFE/8 brtQesCRSqcrmygT1b19k9BqsAPuDh60T8uiga6ewDgaT3NY0cvKMtwN7ht47bQIn5w+ RkUxHhswAX4CZ0KwQmsod+RalrLtuVZZpOwL+hw2nQHlMQUO+Ppzsa03udrx6u9HxHqI 5i/tAkHry4DAENGobNFfiKiTBF7QwkAQlQeXyQtk8xmIM2B7E4BNVbyEAd3AppDVrsJS /9Lg== 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=wNthxjNuEX7gZE7FCbttcB0oi5leCeqvU6ObMhDnDus=; b=cAV7vMqTHHP7WQkRPMEnf6Tesh74bm89Lq61VUeXJQTl7dYDYdUxpIJV+XX2QaEuPI +KymiJNvB8LaCgP9ChDcoFPE9YpN3pIT2pi8lOVJc1Ul6bp9Yc14dBIPyU90g9AaEH4n XccKYIVkLBe6dEoHmeAN21C+I8MSLyDHv5vr2uCAKZEJo46LeMnoIsD03fNz2V4iTErm U6BUxp9ky5yvdWzdE7Ua6Rhnfq1PfuYYXENQyGgRRJBDZNxN2TMoEhaqBfa77zjw6LS/ B7cZQUqmULpq1rQBBJod1IDhZ57iTPW/Q9mdtuJRiHulcQqMzhL2L10eFYiJJtmXedfd QMTw== X-Gm-Message-State: AFeK/H3xcRL0behsnI45G0EMkfA/i1bEXafTAZMj2A4gbQmu93uWwsNERWGZyM2NRhNL3A== X-Received: by 10.223.136.125 with SMTP id e58mr14766756wre.14.1491211043117; Mon, 03 Apr 2017 02:17:23 -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.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 03 Apr 2017 02:17:22 -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 15/20] ARM64: dts: sun50i-a64: add dwmac-sun8i Ethernet driver Date: Mon, 3 Apr 2017 11:14:39 +0200 Message-Id: <20170403091444.29876-16-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_021742_886067_BF41AF22 X-CRM114-Status: UNSURE ( 8.91 ) 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 that supports 10/100/1000 Mbit connections. It is very similar to the device found in the Allwinner H3, but lacks the internal 100 Mbit PHY and its associated control bits. This adds the necessary bits to the Allwinner A64 SoC .dtsi, but keeps it disabled at this level. Signed-off-by: Corentin Labbe --- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 37 +++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi index 1683a1f..dcf9ca4 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi @@ -277,6 +277,23 @@ bias-pull-up; }; + rmii_pins: rmii_pins { + pins = "PD10", "PD11", "PD13", "PD14", + "PD17", "PD18", "PD19", "PD20", + "PD22", "PD23"; + function = "emac"; + drive-strength = <40>; + }; + + rgmii_pins: rgmii_pins { + pins = "PD8", "PD9", "PD10", "PD11", + "PD12", "PD13", "PD15", + "PD16", "PD17", "PD18", "PD19", + "PD20", "PD21", "PD22", "PD23"; + function = "emac"; + drive-strength = <40>; + }; + uart0_pins_a: uart0@0 { pins = "PB8", "PB9"; function = "uart0"; @@ -381,6 +398,26 @@ #size-cells = <0>; }; + emac: ethernet@1c30000 { + compatible = "allwinner,sun50i-a64-emac"; + syscon = <&syscon>; + reg = <0x01c30000 0x100>; + interrupts = ; + interrupt-names = "macirq"; + resets = <&ccu RST_BUS_EMAC>; + reset-names = "stmmaceth"; + clocks = <&ccu CLK_BUS_EMAC>; + clock-names = "stmmaceth"; + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + + mdio: mdio { + #address-cells = <1>; + #size-cells = <0>; + }; + }; + gic: interrupt-controller@1c81000 { compatible = "arm,gic-400"; reg = <0x01c81000 0x1000>,