From patchwork Tue Mar 14 14:18:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 9623561 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 D2A07604CC for ; Tue, 14 Mar 2017 14:28:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C3846285A1 for ; Tue, 14 Mar 2017 14:28:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B85FD285B1; Tue, 14 Mar 2017 14:28:16 +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 1DDF0285A1 for ; Tue, 14 Mar 2017 14:28:15 +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=gV1Od+Ai+ZdbTgfKkzgjBOEhPrY78gB2xcAZGxUk12Y=; b=Mjxzz+VjfMWokI5ixHruBx5Xul hua4hkIt/IKDOeMVeB5SQPGvgV6hOvihFCJVqmg43WnGfCBql8Xtklc+MwncsUdRj2xxN2RR4AHUA 2vBalCNCUpstIsYGPmWSnCuGSDrTE1cErKH+swlFBbn4+l5CqePmi8IIIJllxBrUzVuMicl7vMmqa nkINWe5ek4W0HJIhFkPOa5HeXF0+dNOTtNI5kUfVwdhFqtD6ns009iy263RPvUBEjnSzFu0r9AdGf c6PKcbXfSSxIn3xVSlia5j1eiZrRVigeSGW/YMleAm4zjO3Lh39iBe8gzdOhbeLip+tGSR7xSonU8 F3qh8a8A==; 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 1cnnQs-0003oe-R4; Tue, 14 Mar 2017 14:28:14 +0000 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cnnKY-0006sj-87 for linux-arm-kernel@lists.infradead.org; Tue, 14 Mar 2017 14:21:45 +0000 Received: by mail-wm0-x243.google.com with SMTP id z63so39277wmg.2 for ; Tue, 14 Mar 2017 07:21:21 -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=MQawSV25OZTXOIoi5Dzpf4plNm8nEt6HSYrjx4bUmhs=; b=Y0MyJX88JBBV7t47arFNHttWYztJu10bVlL0pQbjsjD2+cMZd4mRphFeiVZxnWfn25 RjSJ9lTE5dfEz3xcLZwy/3bEBbQkjbp3NvalWZQZCkEhzge2IrMz9JALfU5hGMhnE2Yl 2L5BctNj3zI4Ch0WE10vS5nMFtZ1TeCGvBjcXcO18JkjxsEGZ46YF1nHQm6EfGR+up8z yxQRjjylBaMEbRk+//VIETanaNSUSeqQQAl6wn3wTZe8svvalPHIG7y3OG6NQkCRag3f jzrrnh0W7I0rSOItLCyAUoaHsv1Dr0kIoT4khpEcvOLwJ2Eue2GX1tpCNmbrG/HuMnsH T2Lg== 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=MQawSV25OZTXOIoi5Dzpf4plNm8nEt6HSYrjx4bUmhs=; b=dzHFzOo3aaqsq9B2h3ZttdN8lqMSIdxu56BdsV9GTl3pLitEpunXxzTdiEayeCRjeh 0n0dJHQGsQOgUgmcBepXCovbfj4pQ/C62gOS96aEFh1EKysOEnabmBD93QxhG1MosyVB /Y/eZ8JnRZ1E7rGJJP7qK3Jg7dx18fYsY5yTpfFdGlUCKAhdDBfSilWELMYFAa9r+DNV p2cLXCEfl2pMlGmgAaXVly1i/IgZiKIiZ+xiwF4Gp8TxjPyF3sO3jfZ/4kFO3rGSC4Kf 6MHsioaC3aJoNY3rasAcvUo+XmW79f0SJs6gCCxoUDZ60RCKqHttxe7F3hxMn+9dlYUA qwQQ== X-Gm-Message-State: AFeK/H1Il2iedQ8j95tJ+YmjSIrxHCbPrVdQRotTWSh6KuKK+ap7f0vdbN49w32O9rCd9g== X-Received: by 10.28.65.196 with SMTP id o187mr15247923wma.9.1489501280324; Tue, 14 Mar 2017 07:21: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 o143sm49526wmd.3.2017.03.14.07.21.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 14 Mar 2017 07:21:19 -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, davem@davemloft.net Subject: [PATCH v2 07/20] ARM: dts: sunxi-h3-h5: add dwmac-sun8i ethernet driver Date: Tue, 14 Mar 2017 15:18:43 +0100 Message-Id: <20170314141856.24560-8-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170314141856.24560-1-clabbe.montjoie@gmail.com> References: <20170314141856.24560-1-clabbe.montjoie@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170314_072142_638554_F0956DE8 X-CRM114-Status: UNSURE ( 9.32 ) 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, f.fainelli@gmail.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, 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 | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/arch/arm/boot/dts/sunxi-h3-h5.dtsi b/arch/arm/boot/dts/sunxi-h3-h5.dtsi index 07e4f36..c35af5e 100644 --- a/arch/arm/boot/dts/sunxi-h3-h5.dtsi +++ b/arch/arm/boot/dts/sunxi-h3-h5.dtsi @@ -272,6 +272,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"; @@ -368,6 +376,31 @@ 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 { + reg = <1>; + clocks = <&ccu CLK_BUS_EPHY>; + resets = <&ccu RST_BUS_EPHY>; + }; + }; + }; + spi0: spi@01c68000 { compatible = "allwinner,sun8i-h3-spi"; reg = <0x01c68000 0x1000>;