From patchwork Thu Feb 16 12:48:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 9577139 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 A0BF2600C5 for ; Thu, 16 Feb 2017 13:12:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8EC402018F for ; Thu, 16 Feb 2017 13:12:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 835C22654B; Thu, 16 Feb 2017 13:12:22 +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 09CF0205AD for ; Thu, 16 Feb 2017 13:12:22 +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=7lfVkWUIXkCUPnIdaxGwqyKBO4Wl/S75qFm3t8/Yew0=; b=MeuM5radFXwKSnUnMq7DAgsKRL x4f4vKJ1fmf5gi+SMwr3EjcGywkhPZESkT380KjQbKwqWnR+cwUAFc3Y+nTs0h7mbXMPQR/WiLj/B gOoVMXSCHvXEQOedl2pXt9FGW4YZ4igdJiYKMzD5qvnrTBZKGVErq5BKiZ3OMyHBO/JtRG+RuN22i rnYBO2xX8m0miwDzd0zPJqSny/6k02XC437cjMKAR4E1oDyNIjFKzSefmKcbTQM2NxeAkQDZhMH2w jyR675aXVbkq/FbsxjKYqBX2TstJ6b+cig2KeuYA1OlH65BQIN6gyWzbcB7/CXFtWOo1lfOreiDiF 0eLVUytA==; 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 1ceLrA-0006YA-Lv; Thu, 16 Feb 2017 13:12:20 +0000 Received: from mail-wr0-x244.google.com ([2a00:1450:400c:c0c::244]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1ceLXS-0001Mg-QG for linux-arm-kernel@lists.infradead.org; Thu, 16 Feb 2017 12:52:09 +0000 Received: by mail-wr0-x244.google.com with SMTP id z61so1158162wrc.3 for ; Thu, 16 Feb 2017 04:51:38 -0800 (PST) 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=YWj2nTIzW+cawo1VfVK/xS/57KZrry7y58wTwx211rg=; b=B8ERAHUOyitsaLoEEZOOVPHUm1pCuTQveHC1yc8qe+F08f+u+aQg5ejBOkJzam+O42 vyupWUrpgGkx/CP8gX67+T7lAy5m1X7iUzLE1BVNun35CKaxUUOZoSyf1yyP7QU3latX uZdM51K2cBqY/SN0RjnjTRuHdNBBU1B+bi3MpJ9CjjQlC1c97QudMzgBDUYDQyF1UlEF e8jXPAYBLdebEsO6JKO/R17NaJn5AMpShikr13ljD6PNbGBiSa13IbQd6YDMOTmc8/Vt ko5gBfHkRXQri1da9wvFTNujlDpn1TKYxMu3AzgwKRBWRu9pYHXnQB/14dYWnuFDDCxj eL9g== 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=YWj2nTIzW+cawo1VfVK/xS/57KZrry7y58wTwx211rg=; b=NOVjD4KUHjKwxJurKpjuLmJ16l1f3rd0+pExBWMazSBPYkUosFjJ92giBBH1iwAQws scYznNA2SwTzNWEUKncIpL1449rXALmrqdcwEDRc8s8KB1kFUhUZAFvcavsObANxlqaZ R4CpT7yuA7h+LUEnJm3q7XRMSsFjR/HBBveO/4FHtCrcHSXDMTevv7Px8mZRyx074CWh D70Dl0+iz6xhFibYtnj0DqlpKtXrmP+UBVQWeG3yTmkWU9n5kYfktvVbuSdfu/DlrrLX 1JafLGQeDpzpcnxYfPz7cQVlAXW0arIGW5E+yIsjvRYx97Xq073mNwAd4lHKt287KVA7 /mvQ== X-Gm-Message-State: AMke39l550NfbmyQXkrOpNacn5dh2SH2O9F/aCmx+IQ21TAP/FZuUpsj5fOmdpbAE9PBdQ== X-Received: by 10.223.149.39 with SMTP id 36mr2143623wrs.125.1487249497100; Thu, 16 Feb 2017 04:51:37 -0800 (PST) Received: from Red.local (LFbn-1-7035-57.w90-116.abo.wanadoo.fr. [90.116.208.57]) by smtp.googlemail.com with ESMTPSA id o143sm144705wmd.3.2017.02.16.04.51.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 16 Feb 2017 04:51:36 -0800 (PST) From: Corentin Labbe To: peppe.cavallaro@st.com, 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, alexandre.torgue@st.com Subject: [PATCH 16/21] ARM64: dts: sun50i-a64: add dwmac-sun8i Ethernet driver Date: Thu, 16 Feb 2017 13:48:54 +0100 Message-Id: <20170216124859.14346-17-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170216124859.14346-1-clabbe.montjoie@gmail.com> References: <20170216124859.14346-1-clabbe.montjoie@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170216_045159_730479_FB648462 X-CRM114-Status: UNSURE ( 8.93 ) 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 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 3b09af2..57d69e5 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>,