[PATCH] mtd: spi-nor: spansion: Add support for infineon cy15v102qsn

Hui Wang hui.wang at canonical.com
Tue Apr 9 06:22:57 PDT 2024


On 4/9/24 16:41, Michael Walle wrote:
> Hi,
>
>>>> It is 2Mbit F-RAM which is logically organized as 256K x 8.
>>> Please have a look at drivers/misc/at25.c. I'm trying to get rid of
>>> the NO_ERASE flag. This is more of an EEPROM like device. The at25
>>> driver already have some kind of FRAM type support.
>> After reading your comment, I checked the drivers/misc/at25.c, I found
>> It couldn't work on my hardware. In my case, the F-RAM is under a spi
>> bus (spi-nxp-fspi.c) which only supports spi_mem transfer mode. So
>> currently, the mtd/spi-nor is the only choice.
> Then it will be a great opportunity to make the at25 driver spi-mem
> ready :)
OK. :-)
>>>> Signed-off-by: Hui Wang <hui.wang at canonical.com>
>>>> ---
>>>>    drivers/mtd/spi-nor/spansion.c | 6 ++++++
>>>>    1 file changed, 6 insertions(+)
>>>>
>>>> diff --git a/drivers/mtd/spi-nor/spansion.c b/drivers/mtd/spi-nor/spansion.c
>>>> index 6cc237c24e07..5dc94926b2cb 100644
>>>> --- a/drivers/mtd/spi-nor/spansion.c
>>>> +++ b/drivers/mtd/spi-nor/spansion.c
>>>> @@ -981,6 +981,12 @@ static const struct flash_info spansion_nor_parts[] = {
>>>>    		.name = "s28hs02gt",
>>>>    		.mfr_flags = USE_CLPEF,
>>>>    		.fixups = &s28hx_t_fixups,
>>>> +	}, {
>>>> +		.id = SNOR_ID(0x48, 0x51, 0x80, 0x06, 0x00, 0x00),
>>> This doesn't look like a JEDEC id. The datasheet says it is a 11bit
>>> manufacturer id?
>>>
>>> -michael
>>   From the page 82 of datasheet, the Device ID is 0000000006805148, and
>> the ID read by spi_nor_read_id() matches it (id[0] is 0x48, id[1] is
>> 0x51, ...).
> JEDEC manufacturer IDs are not 11bit wide.
Have no idea here. I thought it is same as the cy15x104q and the 
spansion.c has the support for cy15x104q.
>
> -michael



More information about the linux-mtd mailing list