From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AFA84C43334 for ; Tue, 26 Jul 2022 08:27:20 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EE1D7841DF; Tue, 26 Jul 2022 10:27:18 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=tinet.cat Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 5B85A841F6; Tue, 26 Jul 2022 10:27:16 +0200 (CEST) Received: from mx1.tinet.cat (mx1.tinet.cat [195.77.216.146]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 619D4841DD for ; Tue, 26 Jul 2022 10:27:13 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=tinet.cat Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=xdrudis@tinet.cat X-ASG-Debug-ID: 1658824031-163e7b7d2112410001-4l7tJC Received: from smtp01.tinet.cat (smtp01.tinet.cat [195.77.216.131]) by mx1.tinet.cat with ESMTP id LpaQfj9TdKs9C9ao; Tue, 26 Jul 2022 10:27:11 +0200 (CEST) X-Barracuda-Envelope-From: xdrudis@tinet.cat X-Barracuda-Effective-Source-IP: smtp01.tinet.cat[195.77.216.131] X-Barracuda-Apparent-Source-IP: 195.77.216.131 Received: from begut (99.red-79-152-185.dynamicip.rima-tde.net [79.152.185.99]) by smtp01.tinet.cat (Postfix) with ESMTPSA id C45A6605D0AC; Tue, 26 Jul 2022 10:27:11 +0200 (CEST) Date: Tue, 26 Jul 2022 10:27:01 +0200 From: Xavier Drudis Ferran To: Pratyush Yadav Cc: Xavier Drudis Ferran , u-boot@lists.denx.de, Jagan Teki , Vignesh R Subject: Re: [PATCH v3 3/4] spi-nor: Adapt soft reset to XTX25F32B in Rock Pi 4 rev 1.4 Message-ID: <20220726082701.GA1772@begut> X-ASG-Orig-Subj: Re: [PATCH v3 3/4] spi-nor: Adapt soft reset to XTX25F32B in Rock Pi 4 rev 1.4 References: <20220720153610.GD2049@begut> <20220720154237.GG2049@begut> <20220726071306.pvtuaauachpdvkyu@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220726071306.pvtuaauachpdvkyu@ti.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Barracuda-Connect: smtp01.tinet.cat[195.77.216.131] X-Barracuda-Start-Time: 1658824031 X-Barracuda-URL: https://webmail.tinet.cat:443/cgi-mod/mark.cgi X-Barracuda-Scan-Msg-Size: 1488 X-Barracuda-BRTS-Status: 1 X-Barracuda-Bayes: INNOCENT GLOBAL 0.6215 1.0000 0.8559 X-Barracuda-Spam-Score: 0.86 X-Barracuda-Spam-Status: No, SCORE=0.86 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=6.0 KILL_LEVEL=8.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.99639 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean Thank you for your time looking at the patch. El Tue, Jul 26, 2022 at 12:43:06PM +0530, Pratyush Yadav deia: > > Please don't put the changelog in the commit message. Put it below the 3 > dashed lines below. > Sorry. Will try to remember it next time. Not sure there's a next version of this patch, though. > > This only tells if the _controller_ supports the op. There is no way to > find out if the flash supports the op without reading SFDP, which would > need you to either reset the flash or know which mode it is in. Correct. But you can't always read the SFDP if you get the flash in some wrong state and try to reset it through a mode that the controller doesn't support. > So this patch is all wrong. Then I won't send a 4th version unless someone else thinks it's worth it and I have more time for it. > The only way to find out what the flash supports is to read its ID or > SFDP. > Chicken and egg ? The soft_reset is done before reading SFDP. It was done always in octal mode before my patch ("always" means whenever CONFIG_SPI_FLASH_SOFT_RESET_ON_BOOT was enabled). My patch tries to do it in a mode that the controller supports. In my experiments this helps being able to program /dev/mtd0 from linux with flashrom. If that is working in mainstream U-Boot on a Rock Pi 4B version 1.4 or later (with XTX flash) for the rest of people, then I must be testing wrong, what do I know? Thanks. Have a nice day.