Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp2403846rdh; Sun, 26 Nov 2023 05:28:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IHm9ggE+oUJpKmT7WOaxh57F1wEhpYLWtTmosS/2AYedZ2qIXX+Oy6TPGoyx/rzZHrp5Uu7 X-Received: by 2002:a17:902:f814:b0:1cf:bf00:e8b1 with SMTP id ix20-20020a170902f81400b001cfbf00e8b1mr1849297plb.17.1701005310398; Sun, 26 Nov 2023 05:28:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701005310; cv=none; d=google.com; s=arc-20160816; b=fnRpcBasmYfXcfp93PtfPznPHjbrpwK12Hn1iW581taeKETc2z9X4cOBMhW9XaFp/o eBEXliG0ypVl7OLGNIs5cyb9xrscpZqGTqu4jX972YuJ2obzL4lnS42bKFCizMb6/cgp er/5t4v8GoVjFlAGLaWEC579oQV+4bMKG1Am/oNdlpGpY9DvB/2DgVp/7UyYkGlfR+W8 IRZ4MfZcG1wLALHwqYxAGVoRK8QCdLzjo/0EgEKcYfutOX2fN24HW4m266L38yWpFRjW BInKwZ3lBfP01SEB+BDcjjZKtbi8Nr/YbvE54fiWU5iRq2V+MZOtyGDAc7h7TframrXa bclw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=VwEBzwkCQomL/Maholp5C1Tjqos2qMullgtadN2CxmY=; fh=Xz3aO+xvorrqfAuqkfY+8sDtg1mdNTaHg7yq51HRhDI=; b=eEdlFk6xaiEbuKfn3xJdOKxAtB0xmKlKlusrqWAN0ObrDQ1iqr9kRosmZX8nm284Ka N/Z8B11aKvNZ33ret3sbyfpe+80Gub5W/w15WINFhqLP0p5w1IEmVDTn+4i+hE2blvbG ovvn91DkMX5MsSxot7Cu3h4Ij8jrx4eV0YHF82EnmjcMYAXez7qqGjct4uA8Nq+WvnIl ovxrYr8U3Ixyi9k0hxBUhvXRTXcmNnQEmgWfkCUMFo6hsnNLoP/SB8snlUrx7T1hGsu5 Guwa0eBiyTqHFpoXHsD9vF8PpUUUYiyAo+TDuVGLr2jshtLpuMPEb1RKximxAJLVW9Qk rtZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bigler.one header.s=key2 header.b="Qsz8/KJW"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id q13-20020a170902dacd00b001cfbdaa3ac8si2305815plx.213.2023.11.26.05.28.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Nov 2023 05:28:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@bigler.one header.s=key2 header.b="Qsz8/KJW"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id EA09B805F3D4; Sun, 26 Nov 2023 05:28:27 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229754AbjKZN1x (ORCPT + 99 others); Sun, 26 Nov 2023 08:27:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229437AbjKZN1v (ORCPT ); Sun, 26 Nov 2023 08:27:51 -0500 X-Greylist: delayed 473 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Sun, 26 Nov 2023 05:27:56 PST Received: from relay.yourmailgateway.de (relay.yourmailgateway.de [188.68.61.103]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57039CB; Sun, 26 Nov 2023 05:27:56 -0800 (PST) Received: from mors-relay-8403.netcup.net (localhost [127.0.0.1]) by mors-relay-8403.netcup.net (Postfix) with ESMTPS id 4SdTpp1VJkz7yTy; Sun, 26 Nov 2023 14:20:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=bigler.one; s=key2; t=1701004802; bh=uVRzzBCF4paLxzieeLLtTwlIaakwDhPEHY3e2Bh7tG4=; h=Subject:From:To:Cc:Date:In-Reply-To:From; b=Qsz8/KJWo3SBW7W1lXOhGiTa9bO/X1Ps9BA1+df9oYyX+g96m2liuR3QHDXwe85oF 6ur5SoRZX5Sz1tLtrZCr58lCaFhV4AhE6TtJyhvaix1l3DjFJxNrnUSV+u+TZ7Fh4v 4AmYrOcJJj9WejrVSF2V7/zDTIXcR3LTCHALLoLZeVXvXZkhtLAjP43fXO2JGhdVpl Vo5IyvASDOn7lzjzz9G2bD0Y9NMJ4lOBeQkUGpsBTegUPDwwnkwJV9gTvlGf2S6OJz xwzj2Cvv+/+eFmbRrLkBIJvxVFhRHK2CEhmwS2voLTjUgLZp3wFj9xZ/h2LI0BaxuO TinMd5A3KO79w== Received: from policy02-mors.netcup.net (unknown [46.38.225.35]) by mors-relay-8403.netcup.net (Postfix) with ESMTPS id 4SdTpp16Rnz7yTr; Sun, 26 Nov 2023 14:20:02 +0100 (CET) Received: from mx2fc6.netcup.net (unknown [10.243.12.53]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by policy02-mors.netcup.net (Postfix) with ESMTPS id 4SdTpn51W7z8sb3; Sun, 26 Nov 2023 14:20:01 +0100 (CET) Received: from [192.168.1.24] (xdsl-188-155-37-14.adslplus.ch [188.155.37.14]) by mx2fc6.netcup.net (Postfix) with ESMTPSA id 527D045332; Sun, 26 Nov 2023 14:19:56 +0100 (CET) Authentication-Results: mx2fc6; spf=pass (sender IP is 188.155.37.14) smtp.mailfrom=benjamin@bigler.one smtp.helo=[192.168.1.24] Received-SPF: pass (mx2fc6: connection is authenticated) Message-ID: Subject: Re: spi: imx: Increase imx51 ecspi burst length fails on imx6dl and imx8mm From: Benjamin Bigler To: benjamin@bigler.one Cc: broonie@kernel.org, francesco@dolcini.it, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, linux@bigler.io, regressions@lists.linux.dev, stefan.moring@technolution.nl Date: Sun, 26 Nov 2023 14:19:56 +0100 In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.0 MIME-Version: 1.0 X-PPP-Message-ID: <170100479677.15558.18148883779792436293@mx2fc6.netcup.net> X-Rspamd-Queue-Id: 527D045332 X-Rspamd-Server: rspamd-worker-8404 X-NC-CID: kYRkZ2AOFCC+H9Oy2v18BeW7JhyV9AINPEWKK4erKCUhXdA= X-Spam-Status: No, score=1.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SORTED_RECIPS,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Sun, 26 Nov 2023 05:28:28 -0800 (PST) X-Spam-Level: * Hi I did some debugging and I think the problem is that in this case bits_per_= word is 8. So in spi_imx_dma_configure the buswidth is set to DMA_SLAVE_BUSWIDTH_1_BYTE. But= in mx51_ecspi_prepare_transfer the BURST_LENGTH is now set to (spi_imx->count = * spi_imx->bits_per_word - 1) before 15a6af94a2779d5dfb42ee4bfac858ea8e964a3f it was (spi_imx->bits_per_w= ord - 1). Now the spi transmits 4 byte per byte except for the first word. I added the following = patch and it worked again diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c index 498e35c8db2c..f514966e2ada 100644 --- a/drivers/spi/spi-imx.c +++ b/drivers/spi/spi-imx.c @@ -659,11 +659,22 @@ static int mx51_ecspi_prepare_transfer(struct spi_imx= _data *spi_imx, ctrl |=3D (spi_imx->target_burst * 8 - 1) << MX51_ECSPI_CTRL_BL_OFFSET; else { - if (spi_imx->count >=3D 512) - ctrl |=3D 0xFFF << MX51_ECSPI_CTRL_BL_OFFSET; - else - ctrl |=3D (spi_imx->count * spi_imx->bits_per_word - 1) + if (spi_imx->usedma) + ctrl |=3D (spi_imx->bits_per_word * + spi_imx_bytes_per_word( + spi_imx->bits_per_word) - + 1) << MX51_ECSPI_CTRL_BL_OFFSET; + else { + if (spi_imx->count >=3D MX51_ECSPI_CTRL_MAX_BURST) + ctrl |=3D (MX51_ECSPI_CTRL_MAX_BURST - 1) + << MX51_ECSPI_CTRL_BL_OFFSET; + else + ctrl |=3D (spi_imx->count * + spi_imx->bits_per_word - + 1) + << MX51_ECSPI_CTRL_BL_OFFSET; + } } =20 /* set clock speed */ Best regards, Benjamin Bigler