linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: linux-mtd@lists.infradead.org
Cc: Richard Weinberger <richard@nod.at>,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	kernel@pengutronix.de,
	Tudor Ambarus <tudor.ambarus@microchip.com>
Subject: Re: [PATCH v3] mtd: spi-nor: Add support for Cypress cy15x104q
Date: Tue, 12 May 2020 11:47:13 +0200	[thread overview]
Message-ID: <20200512094713.GH5877@pengutronix.de> (raw)
In-Reply-To: <20200424065626.8196-1-s.hauer@pengutronix.de>

On Fri, Apr 24, 2020 at 08:56:26AM +0200, Sascha Hauer wrote:
> The Cypress cy15b104q and cy15v104q are 4Mbit serial SPI F-RAM devices.
> Add support for them to the spi-nor driver.
> 
> The actual Device ID of this chip is 7f 7f 7f 7f 7f 7f c2 2c 04. That is
> six times the continuation code 7f followed by c2 for Ramtron.
> Unfortunately the chip sends the Device ID in reversed order, so the
> continuation code is not at the beginning, but instead at the end. Even
> more unfortunate is that when reading further the chip sends more 7f
> codes which means we are not even able to count the continuation codes.
> We can only hope that this reversed Device ID will never match any other
> devices ID.

Any idea how to continue here? The patch is wrong, I know that, but I
have no idea what to do instead. Should we just skip support for this
chip?

Sascha

> 
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
> 
> Changes since v2:
> - Add explanation of the reversed order of the Device ID to the commit message
> Changes since v1:
> - Instead of specifying 1024 sectors with a sector size of 512 specify
>   512 * 1024 sectos with a sector size of 1. The device has no idea of
>   sectors and is not erasable, so a sector size of 1 seems to better
>   reflect reality.
> 
>  drivers/mtd/spi-nor/spansion.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/mtd/spi-nor/spansion.c b/drivers/mtd/spi-nor/spansion.c
> index 6756202ace4b..3e8ac602e36b 100644
> --- a/drivers/mtd/spi-nor/spansion.c
> +++ b/drivers/mtd/spi-nor/spansion.c
> @@ -70,6 +70,7 @@ static const struct flash_info spansion_parts[] = {
>  	{ "s25fl256l",  INFO(0x016019,      0,  64 * 1024, 512,
>  			     SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
>  			     SPI_NOR_4B_OPCODES) },
> +	{ "cy15x104q",  INFO6(0x042cc2, 0x7f7f7f, 512 * 1024, 1, SPI_NOR_NO_ERASE) },
>  };
>  
>  static void spansion_post_sfdp_fixups(struct spi_nor *nor)
> -- 
> 2.26.1
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

  reply	other threads:[~2020-05-12  9:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-24  6:56 [PATCH v3] mtd: spi-nor: Add support for Cypress cy15x104q Sascha Hauer
2020-05-12  9:47 ` Sascha Hauer [this message]
2020-05-28  8:12 ` Tudor.Ambarus
2020-11-05 18:54   ` Tim Harvey
2020-11-09 15:01     ` Vignesh Raghavendra

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=20200512094713.GH5877@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=kernel@pengutronix.de \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=richard@nod.at \
    --cc=tudor.ambarus@microchip.com \
    --cc=vigneshr@ti.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;
as well as URLs for NNTP newsgroup(s).