mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michael Walle <michael@walle.cc>
To: niravkumar.l.rabara@intel.com
Cc: Tudor Ambarus <tudor.ambarus@microchip.com>,
	Pratyush Yadav <pratyush@kernel.org>,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	Richard Weinberger <richard@nod.at>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] mtd: spi-nor: macronix: Add support for mx66u1g45g
Date: Thu, 22 Sep 2022 16:55:32 +0200	[thread overview]
Message-ID: <c09cd1c3c74582e90e3fe8633da2aaa0@walle.cc> (raw)
In-Reply-To: <20220917111640.977243-1-niravkumar.l.rabara@intel.com>

Am 2022-09-17 13:16, schrieb niravkumar.l.rabara@intel.com:
> From: Niravkumar L Rabara <niravkumar.l.rabara@intel.com>
> 
> The MX66U1G45G is the smaller sibling (128MB) of the MX66U2G45G (256MB)
> that is already supported.
> 
> Tested on Intel N5X socdk board,
> - random data write, erase, read   - verified erase operations
> - random data write, read and compare  - verified write/read operations
> 
> Signed-off-by: Niravkumar L Rabara <niravkumar.l.rabara@intel.com>
> ---
> root@n5x:~# find / -iname spi-nor
> /sys/kernel/debug/spi-nor
> /sys/devices/platform/soc/ff8d2000.spi/spi_master/spi0/spi0.0/spi-nor
> /sys/bus/spi/drivers/spi-nor
> root@n5x:~# ls -al
> /sys/devices/platform/soc/ff8d2000.spi/spi_master/spi0/spi0.0/spi-nor/
> drwxr-xr-x    2 root     root             0 Dec 16 17:26 .
> drwxr-xr-x    6 root     root             0 Dec 16 17:25 ..
> -r--r--r--    1 root     root          4096 Dec 16 17:26 jedec_id
> -r--r--r--    1 root     root          4096 Dec 16 17:26 manufacturer
> -r--r--r--    1 root     root          4096 Dec 16 17:26 partname
> -r--r--r--    1 root     root             0 Dec 16 17:26 sfdp
> root@n5x:~#  cat
> /sys/devices/platform/soc/ff8d2000.spi/spi_master/spi0/spi0.0/spi-nor/jedec_id
> c2253b
> root@n5x:~# cat
> /sys/devices/platform/soc/ff8d2000.spi/spi_master/spi0/spi0.0/spi-nor/manufacturer
> macronix
> root@n5x:~# cat
> /sys/devices/platform/soc/ff8d2000.spi/spi_master/spi0/spi0.0/spi-nor/partname
> mx66u1g45g
> root@n5x:~# cat
> /sys/devices/platform/soc/ff8d2000.spi/spi_master/spi0/spi0.0/spi-nor/sfdp
> > mx66u1g45g-sfdp
> root@n5x:~# hexdump mx66u1g45g-sfdp
> 0000000 4653 5044 0106 ff02 0600 1001 0030 ff00
> 0000010 00c2 0401 0110 ff00 0084 0201 00c0 ff00
> 0000020 ffff ffff ffff ffff ffff ffff ffff ffff
> 0000030 20e5 fffb ffff 3fff eb44 6b08 3b08 bb04
> 0000040 fffe ffff ffff ff00 ffff eb44 200c 520f
> 0000050 d810 ff00 4987 00b5 d282 e204 0344 3867
> 0000060 b030 b030 bdf7 5cd5 9e4a ff29 50f0 85f9
> 0000070 ffff ffff ffff ffff ffff ffff ffff ffff
> *
> 00000c0 8f7f ffff 5c21 ffdc ffff ffff ffff ffff
> 00000d0 ffff ffff ffff ffff ffff ffff ffff ffff
> *
> 0000110 2000 1600 f99d 64c0 cb85 ffff ffff ffff
> 0000120

md5sum of this is missing.

> ---
>  drivers/mtd/spi-nor/macronix.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/mtd/spi-nor/macronix.c 
> b/drivers/mtd/spi-nor/macronix.c
> index d81a4cb2812b..07ace9da74b7 100644
> --- a/drivers/mtd/spi-nor/macronix.c
> +++ b/drivers/mtd/spi-nor/macronix.c
> @@ -97,6 +97,10 @@ static const struct flash_info macronix_nor_parts[] 
> = {
>  			      SPI_NOR_QUAD_READ) },
>  	{ "mx66l1g55g",  INFO(0xc2261b, 0, 64 * 1024, 2048)
>  		NO_SFDP_FLAGS(SPI_NOR_QUAD_READ) },
> +	{ "mx66u1g45g",  INFO(0xc2253b, 0, 64 * 1024, 2048)
> +		PARSE_SFDP
> +		FLAGS(SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ)

With PARSE_SFDP this shouldn't be needed.

Also, could you try with INFO(0xc2253b, 0, 0, 0), this information
should come from the SFDP, too.

-michael

> +		FIXUP_FLAGS(SPI_NOR_4B_OPCODES) },
>  	{ "mx66u2g45g",	 INFO(0xc2253c, 0, 64 * 1024, 4096)
>  		NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ)
>  		FIXUP_FLAGS(SPI_NOR_4B_OPCODES) },

      reply	other threads:[~2022-09-22 14:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-16  8:22 [PATCH] " niravkumar.l.rabara
2022-09-17 11:16 ` [PATCH v2] " niravkumar.l.rabara
2022-09-22 14:55   ` Michael Walle [this message]

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=c09cd1c3c74582e90e3fe8633da2aaa0@walle.cc \
    --to=michael@walle.cc \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=niravkumar.l.rabara@intel.com \
    --cc=pratyush@kernel.org \
    --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

Powered by JetHome