From patchwork Tue Nov 7 20:13:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 10047213 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 43E326031B for ; Tue, 7 Nov 2017 20:16:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 35CAD292AD for ; Tue, 7 Nov 2017 20:16:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2A5C829307; Tue, 7 Nov 2017 20:16:14 +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=-4.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_MED 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 B2D10292AD for ; Tue, 7 Nov 2017 20:16:13 +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: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:In-Reply-To: References:List-Owner; bh=FDy09Vcmn8JEiDURExas2nFQWEaFIXfFVjxYlC888PA=; b=gKi Lm3I8LsjD/AfDUzb2bNuBJ2lKZ0QRKCH6OrB4BRbfwMxZQvBB08PSWgff/xIMhtJOeBePakHffiTR PMMnnnedvdgjp9jZ1N7eEAIYbJZTMu7jjUHTYZ5ddJHuzb09QYgSNRk3Pu3gNInOGpwVSzodZbDuZ Nvj/x5skPw+zYg4KOJ5g/rHKeckui0zDud/n7ZyxZgT4NrrSl8vTEe2FNT4uuuiqz3L6nVmD0+89t ye0NuWPmzaFo8Am8UNV5dtOBXscBxdH4uEgxlnEoTWXAv9tuBfx8POuzZfBy27nik5FnvEO9TXCUh w+RGOQw8ei+xi9994k9jVcrRAyGYvvQ==; 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 1eCAI9-0006YD-3R; Tue, 07 Nov 2017 20:16:13 +0000 Received: from mail-wr0-x241.google.com ([2a00:1450:400c:c0c::241]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eCAHr-0005ko-0I for linux-arm-kernel@lists.infradead.org; Tue, 07 Nov 2017 20:15:56 +0000 Received: by mail-wr0-x241.google.com with SMTP id k61so388735wrc.4 for ; Tue, 07 Nov 2017 12:15:33 -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; bh=Mj7eUGZQ73pa+9ZueZADDmbpQdvu7O068UdhsOB7obc=; b=hIxUemSDxQUUERc0sfGadzLsGz50xVkxC1JwomUB51GiljEEmQgoit1lJ3jGUk2Wcp cS6TM/XKE36WgVs/WjZ6Wt8SXQiZvpInQyBi/9UZicri075kDCtxzq9mJxLpz3OwNt41 vB9N6cT3kNWwG5RyGc7kTlmwXP4JXRph5ZJ8aaY9qkgTTJb12S57q95ld+k9oJGrhDVY TzxHJK4Tg3OLhcwliHLWKe7yVTn3j5en31DystU844r/329ls61x7eYc01Jfgbc77ESO DK5pSH5DIYOaMAgiftREgW40kANIpRkiqQniM2sY7KFydQixSPLkkpdLpkre++97+Q5q z0iw== 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; bh=Mj7eUGZQ73pa+9ZueZADDmbpQdvu7O068UdhsOB7obc=; b=jcdlWmI2DWqIRAQ/FkksIyeQfQ8bK6WmMsTflRIio5uxDgLgEpFK63L7wCvuSbkaCm zA5sfXwvlaHq0hxC0ZEOUS/AP0dZa5uIJiy0kQHgCJtePDsJ277Eqyr77YSvXIOTAvDw EsGJbeTe5GSd4dCva7OABLGYgmy3O62rnk5ynIQbWZqrLMpXA+9txj4TgfIXLzKpL4lz TJDO7a6pRqG4eAICIBnth0ICP4hintS0Ga3IfRLJscptaqpqJ+bNhtYVghY/738Of9Px EtK1AVQogkuja9Ls8QRit5lDp6jZG+RXz9YJEOEV1HJyquilvkqlPpbDNAnXjvb6af37 50Ug== X-Gm-Message-State: AMCzsaUB457ccP7/eRhP7BMLIS3cOYiTGzWTmQO8MwwymiqoBKHijV1K 1fCA0R3/Q1EwoxeeDkQ4B8M= X-Google-Smtp-Source: ABhQp+RK+4L81grKNLWZLhMadxYXWXWFRG74OuEs8fqE8zp4K3HmJLWKg9eXvPOw/gkgHtcRDKYUgg== X-Received: by 10.223.199.137 with SMTP id l9mr17588108wrg.113.1510085732369; Tue, 07 Nov 2017 12:15:32 -0800 (PST) Received: from Red.local (LFbn-MAR-1-580-96.w90-118.abo.wanadoo.fr. [90.118.159.96]) by smtp.googlemail.com with ESMTPSA id u7sm1714595wmf.15.2017.11.07.12.15.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Nov 2017 12:15:31 -0800 (PST) From: Corentin Labbe To: robh+dt@kernel.org, mark.rutland@arm.com, linux@armlinux.org.uk, maxime.ripard@free-electrons.com, wens@csie.org Subject: [PATCH 1/2] ARM: sun8i: a83t: add dwmac-sun8i ethernet driver Date: Tue, 7 Nov 2017 21:13:25 +0100 Message-Id: <20171107201326.17401-1-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.13.6 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171107_121555_228321_9BC9DE24 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, Corentin Labbe , linux-kernel@vger.kernel.org, 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 the Allwinner a83t SoC Device-tree. Signed-off-by: Corentin Labbe Reviewed-by: Chen-Yu Tsai --- arch/arm/boot/dts/sun8i-a83t.dtsi | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-a83t.dtsi b/arch/arm/boot/dts/sun8i-a83t.dtsi index 19acae1b4089..68e5135410ec 100644 --- a/arch/arm/boot/dts/sun8i-a83t.dtsi +++ b/arch/arm/boot/dts/sun8i-a83t.dtsi @@ -336,6 +336,14 @@ #interrupt-cells = <3>; #gpio-cells = <3>; + emac_rgmii_pins: emac-rgmii-pins { + pins = "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", + "PD11", "PD12", "PD13", "PD14", "PD18", + "PD19", "PD21", "PD22", "PD23"; + function = "gmac"; + drive-strength = <40>; + }; + mmc0_pins: mmc0-pins { pins = "PF0", "PF1", "PF2", "PF3", "PF4", "PF5"; @@ -440,6 +448,27 @@ status = "disabled"; }; + emac: ethernet@1c30000 { + compatible = "allwinner,sun8i-a83t-emac"; + syscon = <&syscon>; + reg = <0x01c30000 0x104>; + interrupts = ; + interrupt-names = "macirq"; + resets = <&ccu 13>; + reset-names = "stmmaceth"; + clocks = <&ccu 27>; + clock-names = "stmmaceth"; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + + mdio: mdio { + compatible = "snps,dwmac-mdio"; + #address-cells = <1>; + #size-cells = <0>; + }; + }; + gic: interrupt-controller@1c81000 { compatible = "arm,cortex-a7-gic", "arm,cortex-a15-gic"; reg = <0x01c81000 0x1000>,