From patchwork Mon May 1 12:45:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 9706497 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 BAD5F60387 for ; Mon, 1 May 2017 12:52:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A8EC122B27 for ; Mon, 1 May 2017 12:52:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9AADF2807E; Mon, 1 May 2017 12:52:01 +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 1CE1E22B27 for ; Mon, 1 May 2017 12:52:01 +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=l2fibSztkfR+TLO17kZKaLpeMlmpDpBIRr3cpcDFJ4I=; b=aBJm4L8P89Lb7BslD0qHprwHg1 KFbUuDtyn50RwQB61qE9E9szWEdQhv8dFgus8e9TPtzR2FgUfT8con+QxkTO0qZ7+DYIS5YQCbd9k dNU/IU5Go8zKjqr1hbOGzBtcN9q6QBJj1avzD16wNNoUchUb7EelwBUzvvuoLwnWqXzY3uPstE7lZ 7/mrrYCD90V0F/pKBvoMykYLdJ2phuaITqJjLghAT1q5GGtV/hG+eINKVNbQEDU1Vq0Sp+zrdLyX3 5JuCj9pYE6OYnzcolFLA/H6HAVA6ohSX8au/+NAscWAYfz73kiAClLVFV0euoed8lMBOtQxTP7P9B W+kqAKiQ==; 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 1d5Ao3-0007kP-Pm; Mon, 01 May 2017 12:51:59 +0000 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1d5Aks-0002LH-Kd for linux-arm-kernel@lists.infradead.org; Mon, 01 May 2017 12:48:46 +0000 Received: by mail-wm0-x242.google.com with SMTP id u65so23230249wmu.3 for ; Mon, 01 May 2017 05:48:22 -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=pwbQdk1TlGnNUuL6vNQjduavvWTkcspSX2Rx17/LFjc=; b=tw8rI1AFrEuLTOhuGYy0R12YyoS/0eQTGttVQf30ZkXEwJ3EzBECeVi29zpTxSZRi1 2zXWuNpAc6xX8vbmMRy76t/wtSfCZpZCHaVFLnqusdTYpeg1nOZZdWyCOI4SBaP2SlNy y7eEtVtecbNHaEds9MQPgtX4vmM22Zo79xwJ9srls9K8xsEXeKmZAHQRouNg8ktHHWrh Z346g+ezItgWdpaHRg6PgNyF8q0/zhsHtFb/Aqr9fnp+/E/W38WBEEYvKtU7GiJB76pG RfNbS/y8V056bCSOia7JUUEuP5yPnTwLN7bwHam9sNbWDVmbMTIoYCI9ynztnzL9TGZt zniw== 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=pwbQdk1TlGnNUuL6vNQjduavvWTkcspSX2Rx17/LFjc=; b=DOGnKqOr17OZWMf1quSqEaumZvSTgC6+mDzfRyQQmdIU9IYoampZsjZVzdWXZR0yfO dJ8mBZQtpdBd1De/0Jb10I9F7XQvOsd2KVou5KRQfJ4K2SGjnAnJnY6qpoDMzZMr63Lh plYeSKadPnqdKOcrOkEuMBn61nTsdqRcqwspeuRms4mtAirm5jRn5pWHABeJClhVO4tQ x+VIevyTlWeoGAJZZECEQBCpm40FfEIgA3tQ5j3CDHkoMDiA3BQn8K4UTDC3ASW2Jos+ d+3YRvcb94xWUe0MFlAmc5LVihHheo6WC3Dv0THBH76ddrB89AUi6NSKI0lDAY7Buog+ 2LPQ== X-Gm-Message-State: AN3rC/543zDsqxII0Yb2q3OVuul4fGTlmKUexGMUq5cftH3VHNGUgwx1 L1XuBfam8N/nNg== X-Received: by 10.28.56.1 with SMTP id f1mr520817wma.20.1493642900973; Mon, 01 May 2017 05:48:20 -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 4sm3364514wrv.33.2017.05.01.05.48.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 01 May 2017 05:48:20 -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 v5 14/20] arm64: allwinner: sun50i-a64: add dwmac-sun8i Ethernet driver Date: Mon, 1 May 2017 14:45:14 +0200 Message-Id: <20170501124520.3769-15-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170501124520.3769-1-clabbe.montjoie@gmail.com> References: <20170501124520.3769-1-clabbe.montjoie@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170501_054843_310916_6536DFB0 X-CRM114-Status: UNSURE ( 9.23 ) 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 | 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 d7341ba..18b3642 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi @@ -287,6 +287,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"; @@ -391,6 +406,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>,