Definition for flash w25q128 is wrong

e9hack e9hack at gmail.com
Mon Apr 1 01:32:12 PDT 2024


Am 01.04.2024 um 10:14 schrieb Robert Marko:
> On Mon, 1 Apr 2024 at 06:29, e9hack <e9hack at gmail.com> wrote:
>>
>> Hi,
>>
>> I'm using a TP-LINK WDR3600 with a bigger flash. Since some time the router hangs in an endless boot loop. I see the following message:
>>
>> ...
>> [    0.402716] spi-nor spi0.0: BFPT parsing failed. Please consider using SPI_NOR_SKIP_SFDP when declaring the flash
>> [    0.413217] spi-nor: probe of spi0.0 failed with error -22
>> ...
>> [    0.926180] /dev/root: Can't open blockdev
>> [    0.930427] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
>> [    0.938037] Please append a correct "root=" boot option; here are the available partitions:
>> [    0.946520] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
>> [    0.954914] Rebooting in 1 seconds..
>>
>> It looks like the definition for the flash is wrong:
>>
>> --- a/drivers/mtd/spi-nor/winbond.c     2024-03-15 19:27:50.000000000 +0100
>> +++ b/drivers/mtd/spi-nor/winbond.c     2024-04-01 05:59:17.166780732 +0200
>> @@ -120,8 +120,8 @@ static const struct flash_info winbond_n
>>                  NO_SFDP_FLAGS(SECT_4K) },
>>          { "w25q80bl", INFO(0xef4014, 0, 64 * 1024,  16)
>>                  NO_SFDP_FLAGS(SECT_4K) },
>> -       { "w25q128", INFO(0xef4018, 0, 0, 0)
>> -               PARSE_SFDP
>> +       { "w25q128", INFO(0xef4018, 0, 64 * 1024, 256)
>> +               NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ)
>>                  FLAGS(SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB) },
>>          { "w25q256", INFO(0xef4019, 0, 64 * 1024, 512)
>>                  NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ)
>>
>> With these changes, the flash will be detected properly.
> 
> Yeah, I am not so sure this is correct as all w25q128 versions have
> SFDP table so skipping SFDP parsing
> isn't really correct.
> Can you check what is the exact model you have?

The chip (SOIC8) is marked with:

winbond
25Q128FVSG
1327

> 
> Regards,
> Robert
>>
>> Regards,
>> Hartmut
>>
>> _______________________________________________
>> openwrt-devel mailing list
>> openwrt-devel at lists.openwrt.org
>> https://lists.openwrt.org/mailman/listinfo/openwrt-devel




More information about the openwrt-devel mailing list