Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp219159lqt; Thu, 6 Jun 2024 01:12:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWekgknVLczybwd3+yNUklRtlm35M0wewQY6GwbddGkhDUapNyeiM80AHTaUjtaTKa1tGqH9imvjR/1+z7dRhxWSOwks4LxOJfIFAaQKA== X-Google-Smtp-Source: AGHT+IEIQPPi4ty/2vwztcmoXCcNLcFo2FHxyNKtVxoZyBCbQtDA4u3d0xdTvUi5n7EsE3TQo0BJ X-Received: by 2002:a05:6e02:1fce:b0:374:b01e:b7d5 with SMTP id e9e14a558f8ab-374b1ee2949mr58635605ab.2.1717661575004; Thu, 06 Jun 2024 01:12:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717661574; cv=pass; d=google.com; s=arc-20160816; b=qTtSCzQNMFsDQJZ+UFqSfXfbzCfxpiqINZVNlbkadGkPyVKDgDNQeyb5AOpYof5cm5 cfRFa3NrjzJOzkJU9KJyB7NoYv3kXRXlBKuzAkXVhPBehR9NPVFzMJ7am3THTe6RLK6h xYGw2U25xKl3+O/SI2HJSaMZ1BH9DNtgD8a+kt0QTN88w6beUgCPVnwTr2tUv0x/h4ZQ yRq6ZUV+ZHINV2xyPctbdWD/HLMCkFDSE81/05OgQNuM4gqPvsSuA1j0R1hbLvNQOhQa u+PT7L5EXMYIV/pcdy/NIcFqV7D2uW6yj8rPMTPkiQUp2zZIMRCglL3vzos7jnnz2oJJ or7g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:mail-followup-to:message-id:subject:cc:to:from:date :dkim-signature; bh=4R7MAaaiy+puAV8iRoQQ8CDB5EbvlOFDbc9iX3EQi4o=; fh=LgIUp14uR/CDHHlqwao/qUHBXyDEAgdfwK1FyZ/AuuQ=; b=iRrbz4I19cnzBnbQQcqZWp7+E9zXfbwlauVpvR9rlhhjmZPQrCOZzfuZVtburSyg3X aOGa8a7IerhPs1rEfJtfua4bjU1oGnnkqWqEKBAOCLafwQQ6IZd5Vv4OUXLBb8q6nUqa 2nVsteI7Nfa7WD5RygkYwP1qkWzNr6KvXOidI4wKFeRHAcUmxx5KuCaHEDqzctuACugO KZ2gxHXyPiiviDMu6X+bcuki0vc+t1vFf2lHQyFkJ3mUFzH5Rj31bGosp7F4ydAtfVJL /k1vScN8IzwqJYE5w5MgKD5z5394JL4ztHRXByYhzP+Jnv91/wzkgjX8lJkWe7UcNYoS mjDg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=GBq0ELG7; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-203792-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-203792-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 41be03b00d2f7-6de261cace1si727253a12.298.2024.06.06.01.12.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 01:12:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-203792-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=GBq0ELG7; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-203792-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-203792-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id AF3BFB25856 for ; Thu, 6 Jun 2024 08:06:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A73DC13BC2F; Thu, 6 Jun 2024 08:06:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="GBq0ELG7" Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4D3C97346A; Thu, 6 Jun 2024 08:06:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.195 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717661173; cv=none; b=nWJpVPe6aWN7m+VGyXpuJfsk6xWWaPMwKa/GFiry4R0QefSz+mYSgTl0F5mrbI4Ns3Ob9SfQRBhOT0CASZG6U4blW9/Ry8INJx+fTSnvW3lg/rs+Cn25592SN8BBou3+gW4I537ecFwWw8ywxREJWbdVr5ZkzOObNFqDRFbf9og= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717661173; c=relaxed/simple; bh=MlXYoE4S46u3YGijpQWCnlS+8eWfmxXXUZ+JW4oQcL8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=GxUw7AAtSPX0AHCbE8LEyXRvuMrj81QzHdE+4PDfA2pmn6QaYyihxYszDsukDmxNrx4PGU2+/f39I7Wr38/87rwSw+f3sJ2cFPSvmJApQAOaqILOJUYgS7R0M0sTwCahqNAX2lAuNLwiRNe/BKdBBiRmoZLgcSqHgB2j0tJYv1o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=GBq0ELG7; arc=none smtp.client-ip=217.70.183.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 477D060006; Thu, 6 Jun 2024 08:06:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1717661169; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4R7MAaaiy+puAV8iRoQQ8CDB5EbvlOFDbc9iX3EQi4o=; b=GBq0ELG7UU/VB2lJMHg0p7k8pKcz1Bvlz2PvUHKLBUcfGOjKfEsWdWJdtPXytcBb5lYxLP kWoeSxG673+eUjBmQlAjeMZpxfNGG4nvQD5+Gu2PNzvdV+5/FHY94yQ1SuWe8xk7tli4KT W4+NWWrdCa4MQCmmaPijZDMw+Ez7/v1sV7j5TKaVZ1+i5Mp/uL30lhZVhrHPQALw8mbPSS 6c7tXc4X/pB2LKJ1rp3NAxguGQTXYl6Kkr4feN6gSHmPXvn1s2+E5Kt4LFKnO1QY6q+t0O mP9wo0wPNED+3t1tfMtje9/z7QnwrpX9LUZe8SPDhnJyVMuqzqxwEoNAObLHGg== Date: Thu, 6 Jun 2024 10:06:07 +0200 From: Louis Chauvet To: Colin Foster Cc: Mark Brown , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, miquel.raynal@bootlin.com Subject: Re: omap2-mcspi multi mode Message-ID: Mail-Followup-To: Colin Foster , Mark Brown , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, miquel.raynal@bootlin.com References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-GND-Sasl: louis.chauvet@bootlin.com Le 04/06/24 - 22:04, Colin Foster a ?crit : > Hi Louis, Hi, > I found that commit e64d3b6fc9a3 ("spi: omap2-mcpsi: Enable MULTI-mode > in more situations") caused a regression in the ocelot_mfd driver. It > essentially causes the boot to hang during probe of the SPI device. I don't know what can cause this. My patch can "compact" few words into only a bigger one, so the signal on the cable can change, but it follows the SPI specification and the device should have the same behavior. Instead of two very distinct words (for example two 8 bits words): <-- first word --> <-- second word --> _ _ _ _ _ _ _ _ _ _ __| |_| |_| ... |_| |____________| |_| |_| ... |_| |_ The signal on the wire will be merged into one bigger (one 16 bits word): <-- first word --> <-- second word --> _ _ _ _ _ _ _ _ _ _ __| |_| |_| ... |_| |_| |_| |_| ... |_| |_ > The following patch restores functionality. I can hook up a logic > analyzer tomorrow to get some more info, but I wanted to see if you had > any ideas. I don't understand the link between the solution and my patch, can you share the logic analyzer results? Maybe the issue is the same as [1]? Does it solves the issue? [1]: https://lore.kernel.org/all/20240506-fix-omap2-mcspi-v2-1-d9c77ba8b9c7@bootlin.com/ > --- a/drivers/mfd/ocelot-spi.c > +++ b/drivers/mfd/ocelot-spi.c > @@ -225,6 +228,8 @@ static int ocelot_spi_probe(struct spi_device *spi) > } > > spi->bits_per_word = 8; > + spi->word_delay.value = 1; > + spi->word_delay.unit = SPI_DELAY_UNIT_NSECS; > > err = spi_setup(spi); > if (err) > > > Colin Foster > > -- Louis Chauvet, Bootlin Embedded Linux and Kernel engineering https://bootlin.com