Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp377036img; Thu, 28 Mar 2019 01:23:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqxp89N6Oaq+ellhP/AZFddfBTJNyJ2T45nalkCMy2sLXWORmh2ZJPg7gfTs99/fUMZeaLco X-Received: by 2002:aa7:818a:: with SMTP id g10mr39344956pfi.178.1553761424705; Thu, 28 Mar 2019 01:23:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553761424; cv=none; d=google.com; s=arc-20160816; b=R0R+g2X/rquwNRF42lvZvbZXsoQOGEHdtilN275XNURfnCHd2UQiX6owsIlRt6KhgZ ntml/58j7OKQgSGOw6oirrZM+8kkwDCNxI/S/lgjn6TwocuNbdX36Ywe5ZFozHzdYZT9 QAj5P6sciZTuoM6HOvVHN+hr/sZfJlBwAEWJvU+bpT+Z1buk6nm/hq3WqRv7YTPNFgVk ycasSSxSjyFICKLdUR6VmmhjYzXMuBEzUxFP9GAijeIIZsUyv8mPRKysXl/+CAu4bwEd Wpif2wG+9UxaEdnKQvPMeuFsTjzqSoTSUsh9n/PuG88oNYJ1+h+PLZRBkKd9nlTHDYlD 094g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=Tz/qghcpr97MFr6XHmFEdJGGN1HtPIUMahStJoL7jwQ=; b=V4HWutrXNmaGo4J0tJw4+oJ4LDIIAK27v+LBPxMO/tqQG3KXuucEACm3HixofRRJrb CyIpIMcvpk8+Yg3Cv4fFupyIUsjtwSo36MBYM56piAD1JF3PrtVykR3WD8LKzkUf9IpJ Y+kwpl8G2SFuhG01MxHpWX5HwFzI/Ap3fuK2elticae7oYWNuz5MFcdY+s5xT9RZmUlv BTBk15XUPv9hUeFn8XiXmmvy1AnkUsl/q8dbwu7Q3tdjs9jXVScxFfPzsg718EJPM/RB JhastW4oQuoDI39CWM3tW4EWSOsRNJdTArHR8uXd3Vg40QjqAo+CO7wrjSsIEf9uwhB7 Y3fw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l7si23304704plg.320.2019.03.28.01.23.29; Thu, 28 Mar 2019 01:23:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726472AbfC1IWi (ORCPT + 99 others); Thu, 28 Mar 2019 04:22:38 -0400 Received: from metis.ext.pengutronix.de ([85.220.165.71]:43483 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725779AbfC1IWh (ORCPT ); Thu, 28 Mar 2019 04:22:37 -0400 Received: from pty.hi.pengutronix.de ([2001:67c:670:100:1d::c5]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1h9QIy-0006T6-Tn; Thu, 28 Mar 2019 09:22:32 +0100 Received: from ukl by pty.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1h9QIx-0007I8-8G; Thu, 28 Mar 2019 09:22:31 +0100 Date: Thu, 28 Mar 2019 09:22:31 +0100 From: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= To: Igor Plyatov Cc: Andy Duan , Shawn Guo , Sascha Hauer , linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, Vinod Koul , Mark Brown , Clark Wang , NXP Linux Team , Pengutronix Kernel Team , dmaengine@vger.kernel.org, Han Xu , Dan Williams , Robin Gong , Fabio Estevam , linux-arm-kernel@lists.infradead.org Subject: Re: Issues with i.MX SPI DMA transfers Message-ID: <20190328082231.zg4emm66mpbbfb6c@pengutronix.de> References: <08fcbd65-510f-84f8-d6d6-ff56aa9ca9ad@gmail.com> <20190328065247.uz73lap7ljf5q3tb@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c5 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 28, 2019 at 10:04:21AM +0300, Igor Plyatov wrote: > Dear Uwe, > > > > Hello Igor, > > > > On Wed, Mar 27, 2019 at 08:40:00PM +0300, Igor Plyatov wrote: > > > please, help to resolve two issues with SPI DMA transfers at i.MX6Q > > > platform. > > > > > > First issue is > > > ?[ 4465.008003] spi_master spi0: I/O Error in DMA RX > > > > > > Second issue is duplication for one of received bytes. > > > > > > Probably, these issues related to each one. > > This is probably the same problem I hit some time ago. Check ERR009165 > > in the errata. You either need to disable DMA or need a fixed > > sdma-Script. > > disabling of DMA is not an option, because high throughput required for SPI > bus to communicate with DSPs. Is this a theoretical reasoning, or is that backed by testing? People here on the list already said things like: The eCSPI appears to insert a 4 bit pause after each word in DMA mode, not done in PIO mode, which can make DMA transfers 50% slower than PIO. You might want to read the thread https://marc.info/?l=linux-spi&m=155191201208766&w=2 . > I'm aware of ERR009165, but as I write some minutes earlier to list, spi0 > (alias for ecspi1) and spi1 (alias for ecspi2) work flawless, while spi4 > (alias for ecspi5) fails very fast. As the issue is a timing race, it might depend on things like length of the SPI lines, load on the data lines and other electrical properties. So you might just be happy that spi0 and spi1 don't show the issue for you. Or you didn't apply the "right" work load yet. > Does same SDMA script used for all SPI interfaces or scripts are different? As answered already before: The same script is used for all interfaces. Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |