public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: LECOINTRE Philippe <philippe.lecointre@thalesgroup.com>
To: Tudor Ambarus <tudor.ambarus@linaro.org>,
	Pratyush Yadav <pratyush@kernel.org>,
	Michael Walle <mwalle@kernel.org>,
	"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>
Cc: LEJEUNE Sebastien <sebastien.lejeune@thalesgroup.com>,
	LENAIN Simon <simon.lenain@thalesgroup.com>,
	RENAULT Xavier <xavier.renault@thalesgroup.com>
Subject: RE: [PATCH] mtd: spi-nor: spansion: Add support for CY15V104QSN
Date: Wed, 19 Mar 2025 15:02:56 +0000	[thread overview]
Message-ID: <ba593d13fad2419c9dba03fc001d599a@thalesgroup.com> (raw)
In-Reply-To: <9ae9eaf4-bd5d-4902-9ca8-d83b9f326245@linaro.org>

Classified as: {OPEN}

Hello,

Thank you for your feedback.

I encounter some issue attempting to use the at25 driver.
I am not able to read the flash ID with at25 driver because the chipselect appear to be deselected between the RDID command and the read data. The RDID command is not taken into account and the chip only reply with 0xff.
With at25 driver, it use a spi_message containing two spi_transfer, one spi_transfer for the command and one spi_transfer for the read data. For some reason, this end up in .transfer_one() in the spi_controller driver of my SoC.
With spi-nor driver, it use spi_mem_exec_op() which work well in my case.
It appear at25 driver can currently be used with Cypress FM25 chip and from some of the datasheet of this family it seems that the chipselect need to be driven low during the entire RDID sequence.
Am I missing something here ?

Currently, the at25 driver assume a lot of property from the ID data (manufacturer and size) which don't seems to be relevant with the CY15V104QSN model.
This chip is similar to cy15b104q and cy15v104q currently supported by spi-nor driver.
https://web.git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/drivers/mtd/spi-nor/spansion.c?id=8a2644d5f3608822925c9204a3d19a8e3025fd4a
Also, I don't have access to at25 spi eeprom to validate any deep modifications on this driver if we need to do so according to the thread you are pointing to.

How can we handle this ?

Regards,
Philippe


{OPEN}

> -----Original Message-----
> From: Tudor Ambarus <tudor.ambarus@linaro.org>
> Sent: Thursday, March 6, 2025 11:54 AM
> To: LECOINTRE Philippe <philippe.lecointre@thalesgroup.com>; Pratyush
> Yadav <pratyush@kernel.org>; Michael Walle <mwalle@kernel.org>; linux-
> mtd@lists.infradead.org
> Cc: LEJEUNE Sebastien <sebastien.lejeune@thalesgroup.com>; LENAIN
> Simon <simon.lenain@thalesgroup.com>; RENAULT Xavier
> <xavier.renault@thalesgroup.com>
> Subject: Re: [PATCH] mtd: spi-nor: spansion: Add support for CY15V104QSN
> 
> 
> 
> On 2/28/25 2:01 PM, LECOINTRE Philippe wrote:
> > Infineon CY15V104QSN is 4Mbit serial SPI F-RAM device.
> 
> Please consider moving this flash to the at25 EEPROM driver:
> https://lore.kernel.org/linux-mtd/20240604074231.1874972-1-
> mwalle@kernel.org/
> 
> Cheers,
> ta
> >
> > Signed-off-by: Philippe Lecointre <philippe.lecointre@thalesgroup.com>
> > Acked-by: Simon Lenain <simon.lenain@thalesgroup.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 bf08dbf5e742..32f8892d7afe
> > 100644
> > --- a/drivers/mtd/spi-nor/spansion.c
> > +++ b/drivers/mtd/spi-nor/spansion.c
> > @@ -922,6 +922,12 @@ static const struct flash_info spansion_nor_parts[]
> = {
> >  		.size = SZ_512K,
> >  		.sector_size = SZ_512K,
> >  		.flags = SPI_NOR_NO_ERASE,
> > +	}, {
> > +		.id = SNOR_ID(0x50, 0x51, 0x80, 0x06, 0x00, 0x00),
> > +		.name = "cy15v104qsn",
> > +		.size = SZ_512K,
> > +		.sector_size = SZ_512K,
> > +		.flags = SPI_NOR_NO_ERASE,
> >  	}, {
> >  		.id = SNOR_ID(0x34, 0x2a, 0x1a, 0x0f, 0x03, 0x90),
> >  		.name = "s25hl512t",
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

  reply	other threads:[~2025-03-19 15:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-28 14:01 [PATCH] mtd: spi-nor: spansion: Add support for CY15V104QSN LECOINTRE Philippe
2025-03-06 10:54 ` Tudor Ambarus
2025-03-19 15:02   ` LECOINTRE Philippe [this message]
2025-03-20  8:46     ` Tudor Ambarus
2025-03-20 16:55       ` LECOINTRE Philippe
2025-03-21  7:10         ` Tudor Ambarus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ba593d13fad2419c9dba03fc001d599a@thalesgroup.com \
    --to=philippe.lecointre@thalesgroup.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=mwalle@kernel.org \
    --cc=pratyush@kernel.org \
    --cc=sebastien.lejeune@thalesgroup.com \
    --cc=simon.lenain@thalesgroup.com \
    --cc=tudor.ambarus@linaro.org \
    --cc=xavier.renault@thalesgroup.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox