k210 spi flash regression

Niklas Cassel Niklas.Cassel at wdc.com
Mon Feb 7 13:23:14 CET 2022


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")


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


More information about the U-Boot mailing list