k210 spi flash regression

Pratyush Yadav p.yadav at ti.com
Tue Feb 8 20:10:44 CET 2022


On 07/02/22 12:23PM, Niklas Cassel wrote:
> Hello Pratyush,
> 
> I upgraded u-boot on my k210 maix bit board, and the SPI flash is no longer
> detected.
> 
> 
> I bisected the problem to commit:
> d15de623013c ("spi: spi-mem: allow specifying a command's extension")

Hm, this commit is not supposed to make any changes to how things work. 
It should just add a new field to struct spi_mem_op.cmd.

Can you dump the spi_mem_op passed to spi_mem_exec_op() for reading the 
ID? Let's see what changed before and after that commit.

> 
> 
> Before the commit in question, the following was printed:
> Loading Environment from SPIFlash... SF: Detected gd25lq128 with page size 256 Bytes, 
> erase size 4 KiB, total 16 MiB
> *** Warning - bad CRC, using default environment
> 
> 
> After the commit in question, the following is printed:
> Loading Environment from SPIFlash... jedec_spi_nor spi-flash at 0: unrecognized JEDEC id 
> bytes: 60, 18, c8                                                                     
> *** Warning - spi_flash_probe_bus_cs() failed, using default environment
> 
> 
> Looking at spi-nor-ids.c, the flash is defined like this:
> INFO("gd25lq128", 0xc86018, 0, 64 * 1024, 256,
>      SECT_4K | SPI_NOR_DUAL_READ |
>      SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
> 
> 
> So it appears that after your patch, the bytes are coming in the wrong order.
> 
> 
> Any suggestions?
> 
> 
> Kind regards,
> Niklas

-- 
Regards,
Pratyush Yadav
Texas Instruments Inc.


More information about the U-Boot mailing list