public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Xavier Drudis Ferran <xdrudis@tinet.cat>
To: Pratyush Yadav <p.yadav@ti.com>
Cc: Xavier Drudis Ferran <xdrudis@tinet.cat>,
	u-boot@lists.denx.de, Jagan Teki <jagan@amarulasolutions.com>,
	Vignesh R <vigneshr@ti.com>
Subject: Re: [PATCH v3 3/4] spi-nor: Adapt soft reset to XTX25F32B in Rock Pi 4 rev 1.4
Date: Tue, 26 Jul 2022 10:27:01 +0200	[thread overview]
Message-ID: <20220726082701.GA1772@begut> (raw)
In-Reply-To: <20220726071306.pvtuaauachpdvkyu@ti.com>


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.

  reply	other threads:[~2022-07-26  8:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-20 15:36 [PATCH v3 0/4] mtd: spi: spi-nor: rk3399: rock-pi-4: u-boot/next Support SPI NOR Flash in Rock Pi 4 (XTX xt25f32b) Xavier Drudis Ferran
2022-07-20 15:39 ` [PATCH v3 1/4] mtd: spi: spi-nor: Add Rock pi 4b new flash chip Xavier Drudis Ferran
2022-07-20 15:41 ` [PATCH v3 2/4] rockchip: rk-3399: rock-pi-4: dts: Add XTX SPI NOR 4MiB Flash chip in Rock Pi 4 boards from rev 1.4 on Xavier Drudis Ferran
2022-08-27  4:02   ` Kever Yang
2022-07-20 15:42 ` [PATCH v3 3/4] spi-nor: Adapt soft reset to XTX25F32B in Rock Pi 4 rev 1.4 Xavier Drudis Ferran
2022-07-26  7:13   ` Pratyush Yadav
2022-07-26  8:27     ` Xavier Drudis Ferran [this message]
2022-07-26  9:09       ` Pratyush Yadav
2022-07-26 11:19         ` [SPAM] " Xavier Drudis Ferran
2022-09-01 12:17   ` Kever Yang
2022-07-20 15:43 ` [PATCH v3 4/4] spi: spi-mem: Allow address 0 for SPI mem operations Xavier Drudis Ferran

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220726082701.GA1772@begut \
    --to=xdrudis@tinet.cat \
    --cc=jagan@amarulasolutions.com \
    --cc=p.yadav@ti.com \
    --cc=u-boot@lists.denx.de \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox