From patchwork Wed Feb 21 08:59:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niklas Cassel X-Patchwork-Id: 10231521 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 869EF60385 for ; Wed, 21 Feb 2018 09:14:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 865EE28AA1 for ; Wed, 21 Feb 2018 09:14:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7B18A28AA6; Wed, 21 Feb 2018 09:14: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_SIGNED, DKIM_VALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 8EABF28AA1 for ; Wed, 21 Feb 2018 09:13:57 +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=gYb3RHUGyOeA9zIETU8fCVDCmxtAUBGjzlCgn8S05Sk=; b=pJVDE3heoRlFjILtMm2BrLgirH zdlWhQ9i+2NJ3a2fj0wC7XJH4yCqzFWB+qS/mxnFo7ZesZrxOb8+yaImVbxFvSqmUptP34V7d/uXQ YGQPHilveezSYVbAzXmApid80yox10Nrcw0ERyZL4st1BCRqLDAljZ1aDydWoHafbsQ3Fsr0KWAsD W0IBqvAW2Aizy57cwJMkgMuwdkIakk6N26dla0z7ive1KkkY6GfynI0yWt3dd0ArgF8EpDvMSxssJ y26tCCttovBwNf625wG9dPL4zdKOQC7gAtDksN0qeuYmfI2LJp/wv/Vd1vH5tUIGZasuhNsvqu2g3 JVOiieZQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eoQT9-0000fN-Gf; Wed, 21 Feb 2018 09:13:43 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eoQT7-0000Uq-00 for linux-arm-kernel@bombadil.infradead.org; Wed, 21 Feb 2018 09:13:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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=wRKjRAHTxyVtRqg0uS+8mIrFCTvhjHEqpQ/3ApRvV/M=; b=j2miWHvVaDL4m6rPe782W0HCS G0/KzqUo5MePJPdai2Z6mU3o83WoB616HDXXjN4FU2/V9UYF9B1tNJ5T7pqJa/nGtQgu6HT4ZPhNl 9pUUW5WqAY/nidvDEy5Oi60wL9rJZFRqHJZNovygbyaDrlQQ0WM6cOcm7n4U3wr4hsYwiQm4XaZ25 jhW4342tJLuTmyQpu2LsVOTwuxPB+5QeNDgyZiWY60/IzkdC5/IjEHb10LwEZs1HFzR2UA79BPbYK sIRwSYA54C6WKQFD9nVqBjj4x0U1W7Tls3jOO32UZ7cmqRbcFtXm9rgrFD0GU3iuCHKbVSmqwqQ0d NDpIxz5cg==; Received: from bastet.se.axis.com ([195.60.68.11]) by casper.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eoQGr-00025I-HO for linux-arm-kernel@lists.infradead.org; Wed, 21 Feb 2018 09:01:09 +0000 Received: from localhost (localhost [127.0.0.1]) by bastet.se.axis.com (Postfix) with ESMTP id 9D09C18435; Wed, 21 Feb 2018 10:00:31 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at bastet.se.axis.com Received: from bastet.se.axis.com ([IPv6:::ffff:127.0.0.1]) by localhost (bastet.se.axis.com [::ffff:127.0.0.1]) (amavisd-new, port 10024) with LMTP id h7Yr2ASG1IHs; Wed, 21 Feb 2018 10:00:30 +0100 (CET) Received: from boulder03.se.axis.com (boulder03.se.axis.com [10.0.8.17]) by bastet.se.axis.com (Postfix) with ESMTPS id 0C87218305; Wed, 21 Feb 2018 10:00:30 +0100 (CET) Received: from boulder03.se.axis.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EEDC41E088; Wed, 21 Feb 2018 10:00:29 +0100 (CET) Received: from boulder03.se.axis.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E2E801E087; Wed, 21 Feb 2018 10:00:29 +0100 (CET) Received: from thoth.se.axis.com (unknown [10.0.2.173]) by boulder03.se.axis.com (Postfix) with ESMTP; Wed, 21 Feb 2018 10:00:29 +0100 (CET) Received: from lnxartpec1.se.axis.com (lnxartpec1.se.axis.com [10.88.4.10]) by thoth.se.axis.com (Postfix) with ESMTP id D50E31D1D; Wed, 21 Feb 2018 10:00:29 +0100 (CET) Received: by lnxartpec1.se.axis.com (Postfix, from userid 20283) id CFFFD401B8; Wed, 21 Feb 2018 10:00:29 +0100 (CET) From: Niklas Cassel To: arm@kernel.org, Jesper Nilsson , Lars Persson , Niklas Cassel , Rob Herring , Mark Rutland , Russell King Subject: [PATCH v2 4/8] ARM: dts: artpec: migrate ethernet to stmmac binding Date: Wed, 21 Feb 2018 09:59:56 +0100 Message-Id: <20180221090000.18091-5-niklas.cassel@axis.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180221090000.18091-1-niklas.cassel@axis.com> References: <20180221090000.18091-1-niklas.cassel@axis.com> X-TM-AS-GCONF: 00 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180221_090101_776767_B2BE8D00 X-CRM114-Status: GOOD ( 12.45 ) 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, linux-arm-kernel@lists.infradead.org, linux-arm-kernel@axis.com, linux-kernel@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 snps,dwc-qos-ethernet binding is still supported as a glue layer in the stmmac driver. However, since the snps,dwc-qos-ethernet binding is now deprecated, migrate to stmmac's native binding. At the same time, enable features supported by the stmmac driver, such as PTP, LPI, and an additional tx queue. Signed-off-by: Niklas Cassel --- arch/arm/boot/dts/artpec6-devboard.dts | 1 + arch/arm/boot/dts/artpec6.dtsi | 42 ++++++++++++++++++++++++++++------ 2 files changed, 36 insertions(+), 7 deletions(-) diff --git a/arch/arm/boot/dts/artpec6-devboard.dts b/arch/arm/boot/dts/artpec6-devboard.dts index 502f3de6dc5b..d20d95359b28 100644 --- a/arch/arm/boot/dts/artpec6-devboard.dts +++ b/arch/arm/boot/dts/artpec6-devboard.dts @@ -59,6 +59,7 @@ mdio { #address-cells = <0x1>; #size-cells = <0x0>; + compatible = "snps,dwmac-mdio"; phy1: phy@0 { compatible = "ethernet-phy-ieee802.3-c22"; device_type = "ethernet-phy"; diff --git a/arch/arm/boot/dts/artpec6.dtsi b/arch/arm/boot/dts/artpec6.dtsi index f4b39738f1ac..981aecd27b0b 100644 --- a/arch/arm/boot/dts/artpec6.dtsi +++ b/arch/arm/boot/dts/artpec6.dtsi @@ -188,19 +188,47 @@ dma-ranges; ethernet: ethernet@f8010000 { - clock-names = "phy_ref_clk", "apb_pclk"; - clocks = <ð_phy_ref_clk>, - <&clkctrl ARTPEC6_CLK_ETH_ACLK>; - compatible = "snps,dwc-qos-ethernet-4.10"; - interrupts = ; + clock-names = "stmmaceth", "ptp_ref"; + clocks = <&clkctrl ARTPEC6_CLK_ETH_ACLK>, + <&clkctrl ARTPEC6_CLK_PTP_REF>; + compatible = "snps,dwmac-4.10a", "snps,dwmac"; + interrupts = , + ; + interrupt-names = "macirq", "eth_lpi"; reg = <0xf8010000 0x4000>; - snps,write-requests = <2>; - snps,read-requests = <16>; + snps,axi-config = <&stmmac_axi_setup>; + snps,mtl-rx-config = <&mtl_rx_setup>; + snps,mtl-tx-config = <&mtl_tx_setup>; + snps,txpbl = <8>; snps,rxpbl = <2>; + snps,aal; + snps,tso; status = "disabled"; + + stmmac_axi_setup: stmmac-axi-config { + snps,wr_osr_lmt = <1>; + snps,rd_osr_lmt = <15>; + /* If FB is disabled, the AXI master chooses + * a burst length of any value less than the + * maximum enabled burst length + * (all lesser burst length enables are redundant). + */ + snps,blen = <0 0 0 0 16 0 0>; + }; + + mtl_rx_setup: rx-queues-config { + snps,rx-queues-to-use = <1>; + queue0 {}; + }; + + mtl_tx_setup: tx-queues-config { + snps,tx-queues-to-use = <2>; + queue0 {}; + queue1 {}; + }; }; uart0: serial@f8036000 {