[PATCH] mtd: spi-nor-ids: add flags for mx25u12835f

David Lechner dlechner at baylibre.com
Fri Apr 10 15:56:09 CEST 2026


On 4/10/26 3:42 AM, Takahiro.Kuwano at infineon.com wrote:
> Hi,
> 
>>
>> Add some capability flags for mx25u12835f.
>>
>> In particular, we are interested in using the lock feature. According to
>> the datasheet, dual/quad read is also supported.
>>
>> Signed-off-by: David Lechner <dlechner at baylibre.com>
>> ---
>>  drivers/mtd/spi/spi-nor-ids.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/mtd/spi/spi-nor-ids.c b/drivers/mtd/spi/spi-nor-ids.c
>> index e7fea375706..4930fa84685 100644
>> --- a/drivers/mtd/spi/spi-nor-ids.c
>> +++ b/drivers/mtd/spi/spi-nor-ids.c
>> @@ -272,7 +272,8 @@ const struct flash_info spi_nor_ids[] = {
>>         { INFO("mx25u3235f",  0xc22536, 0, 4 * 1024,  1024, SECT_4K) },
>>         { INFO("mx25u6435f",  0xc22537, 0, 64 * 1024, 128, SECT_4K) },
>>         { INFO("mx25l12805d", 0xc22018, 0, 64 * 1024, 256, SECT_4K) },
>> -       { INFO("mx25u12835f", 0xc22538, 0, 64 * 1024, 256, SECT_4K) },
>> +       { INFO("mx25u12835f", 0xc22538, 0, 64 * 1024, 256, SECT_4K |
>> +              SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
> 
> Did you test with controller that supports quad ops?

No, the controller I have is only dual so I can't test quad.

Should we just drop the SPI_NOR_QUAD_READ flag for now?

> 
> In spi-nor-core.c: spi_nor_init_params():
> ...
> 	if (info->flags & SPI_NOR_QUAD_READ) {
> 		params->hwcaps.mask |= SNOR_HWCAPS_PP_1_1_4;
> 		spi_nor_set_pp_settings(&params->page_programs[SNOR_CMD_PP_1_1_4],
> 					SPINOR_OP_PP_1_1_4, SNOR_PROTO_1_1_4);
> 	}
> ...
> SPINOR_OP_PP_1_1_4 (0x32) is set as candidate of page program opcode, but
> according to mx25u12835f datasheet, that opcode is not supported.
> 
> This is a problem in core side and we need to fix it.
> In Linux, a dedicated flag named SPI_NOR_QUAD_PP is checked.
> https://lore.kernel.org/all/20220920184808.44876-2-sudip.mukherjee@sifive.com/
> 
> Thanks,
> Takahiro
> 
>>         { INFO("mx25u51245g", 0xc2253a, 0, 64 * 1024, 1024, SECT_4K |
>>                SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) },
>>         { INFO("mx25l12855e", 0xc22618, 0, 64 * 1024, 256, 0) },
>>
>> ---
>> base-commit: 1c1bfb1cf34bbb2a5717eb6995c55093279f9341
>> change-id: 20260403-spi-nor-mx25u12835f-f7328a631436
>>
>> Best regards,
>> --
>> David Lechner <dlechner at baylibre.com>
> 



More information about the U-Boot mailing list