From patchwork Wed May 31 07:18:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 9756015 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 3B036602CC for ; Wed, 31 May 2017 07:24:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2D31320453 for ; Wed, 31 May 2017 07:24:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 21D62269E2; Wed, 31 May 2017 07:24: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 9902A20453 for ; Wed, 31 May 2017 07:24:29 +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=ZtEyCGcMm/1jRM2hd4Yewgq1okPqPoLouDzg1ecj7Is=; b=FDnbZHCfld8XZmSnfUKgjGtih2 GgfIigi0IWXt7c6Iqvx2ODiLKB1+27yi8rXQNZIcinfr/jMZrZxBiq5KrmcNPMAmcB2gZ48/Mib7c 2C3VH/A4gvY2hdMUy7Kt2KRtyUkBoDOvCBqUMLBeiuRvMf+T0/CxIm3Dh0pRYNRbcspotScDKUc1J lbvZwAGjXOs9IxKtYEpuHISIzDYV+ohzlQXN9BqyFSdsAJwfiupBmp9NbJHTKGDJFj3VvC5DvE6Io CXtghDq4CncKgopXMAlF7ZKamhau9uzqhcG0PnhyLBaqxaGdtn+DkzIFaN+DZAUOZzKPvQGFlQf6b BN3CTAjA==; 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 1dFxzY-0000p8-8P; Wed, 31 May 2017 07:24:28 +0000 Received: from merlin.infradead.org ([2001:4978:20e::2]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dFxxf-0007Im-Lz for linux-arm-kernel@bombadil.infradead.org; Wed, 31 May 2017 07:22:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=YVttgwonrqySpgK9sP+1yMA1k7l0rwWByUaS70TRASM=; b=CpA4aBe8bKaFDW0dK3Z09AUcJ 4oqllNf8/Sct8z4ZwDoFEJw7dyKue1htvgONRz8Wp0MGPm5Xal0qeGhcq3zBharKm42rtu4sw/IdE mOXsKCesc1+XmYVnvsCcUj5HolORldQCypGhsW4Eacr+OPG3DgsKnNdvdY4JyvFC01e+jzo3Yj+VX /hqQYsrZNKRcsPGGQP/HdirFvMLRHuFPjzi8FmRYjuA238OvU/zkqt8g9YljZJfKzucLAY8B4SeXb SDO8wFOeJp28JGzLAVE0w4pK3pn/bTeXXY8a/swMKakzgC/eERh2t5pncU3rc189A8R4tb4idohR0 7CgNQKh/A==; Received: from mail-wr0-x243.google.com ([2a00:1450:400c:c0c::243]) by merlin.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dFxxd-0007Nx-TT for linux-arm-kernel@lists.infradead.org; Wed, 31 May 2017 07:22:30 +0000 Received: by mail-wr0-x243.google.com with SMTP id n104so686860wrb.3 for ; Wed, 31 May 2017 00:22:09 -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=YVttgwonrqySpgK9sP+1yMA1k7l0rwWByUaS70TRASM=; b=JFL3x3Kl03OFUNFTQjwt4GBLL1MJ4fA4q05NAkcpS4udXauC0nnu2TV/5K7twC63nT 3ahh2uZe3KGILewMXmNt2u0fWW7yDb1bA8xtrVZkk5BLIsgqFQsz+qntrlM/vDFCnYLt aQMQXFbRaKctTNUT73gFjDoah7vwJt+tqegb8evU5VCafpW53d2eQ8h8HUgxymkcLnFr NZwOPpNN2YH4oy5q5YEPKIuW+iWxAgppYgMpm08lYwYDzXc5txyjdYIROooCY4+CAwrk tiqyZmhftN/cz7jQlF0zV5+TjC8E7Q/n2zhst32s01XJNUg2iHK8Op+/WgLbCkrSpJSn oBxg== 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=YVttgwonrqySpgK9sP+1yMA1k7l0rwWByUaS70TRASM=; b=NyaBhVgwcoE1cO/9h5tUy/BfFeT/wpqOOsXVzYJ28yGbsjJ31jdUCyVJ9FBzjA1yrK ZVqFUtrjY2OsI5GkXoShI87JbFdrWmVx9FcSxZn38KN+HfsKOOphCVMR3p7+BQn/CBdB dn9S/G8ShlbTBDnGxN3m4oLo2nnFlDMX2YdDIlXetjKbpnHD9VxxEdZ2txOwYdfBNNEC AY5rKJO1aqavPZR+N9BkEwzW2Pubj2STFY0RyYFkCRHajNe8kg0ZBf4cwAWIWIKLvklE yYiCwvjmzvvVVjBp+jA7TMLGD7ZShGKg2iKMsCG1J96LOE6tkwCVP7ttVDWUVhSUyInW DIfg== X-Gm-Message-State: AODbwcBk47eQQvQU0T8wh9WO9biFplU5WSY0tdx3L28JVYoeNwZcomcS 4BBHHLz3ZHdzjw== X-Received: by 10.223.174.202 with SMTP id y68mr9214748wrc.142.1496215327793; Wed, 31 May 2017 00:22:07 -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 r130sm12528169wmg.4.2017.05.31.00.22.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 31 May 2017 00:22:07 -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 v6 15/21] arm64: allwinner: sun50i-a64: add dwmac-sun8i Ethernet driver Date: Wed, 31 May 2017 09:18:46 +0200 Message-Id: <20170531071852.12422-16-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170531071852.12422-1-clabbe.montjoie@gmail.com> References: <20170531071852.12422-1-clabbe.montjoie@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170531_032230_103416_7F8058D3 X-CRM114-Status: GOOD ( 10.00 ) 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 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 | 35 +++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi index 2eeba0d44074..7a07353ac1f6 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi @@ -309,6 +309,21 @@ 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"; @@ -433,6 +448,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>,