[PATCH v3 3/4] spi-nor: Adapt soft reset to XTX25F32B in Rock Pi 4 rev 1.4

Xavier Drudis Ferran xdrudis at tinet.cat
Tue Jul 26 10:27:01 CEST 2022

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 

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.

More information about the U-Boot mailing list