linux/drivers/mtd
Miquel Raynal f0a499acb4
mtd: spi-nor: macronix: Add support for mx25uw51245g with RWW
Describe this new part and provide the RWW flag for it.

There is no public datasheet, but here are the sfdp tables plus base
testing to show it works.

$ cat /sys/bus/spi/devices/spi0.0/spi-nor/partname
mx25uw51245g
$ cat /sys/bus/spi/devices/spi0.0/spi-nor/jedec_id
c2813a
$ cat /sys/bus/spi/devices/spi0.0/spi-nor/manufacturer
macronix
$ xxd -p /sys/bus/spi/devices/spi0.0/spi-nor/sfdp
53464450080104fd00070114400000ff8701011c900000ff0a0001080001
00ff05000105200100ff84000102340100ff0000000000000000ffffffff
ffffffffe5208affffffff1f00ff00ff00ff00ffeeffffffffff00ffffff
00ff0c2010d800ff00ff87790100821200e27704674630b030b0f4bdd55c
000000ff101000200000000000007ca14800000000008888000000000000
00400fd1fff30fd1fff300050090000500b1002b0095002b0096727103b8
727103b80000000090a3188200c069960000000000000000727100987271
00b8727100990000000072710098727100f872710099727100f900000000
00000000011501d0727106d8000086500000060100000000020001030002
00000000060100000000000072060002000000eec0697272717100d8f7f6
000a00001445988043060f0021dcffff
$ md5sum /sys/bus/spi/devices/spi0.0/spi-nor/sfdp
047a884cf44d9ffc2a94d3ab37b48c63  /sys/bus/spi/devices/spi0.0/spi-nor/sfdp

$ dd if=/dev/urandom of=./qspi_test bs=1M count=6
6+0 records in
6+0 records out
$ mtd_debug write /dev/mtd1 0 6291456 qspi_test
Copied 6291456 bytes from qspi_test to address 0x00000000 in flash
$ mtd_debug erase /dev/mtd1 0 6291456
Erased 6291456 bytes from address 0x00000000 in flash
$ mtd_debug read /dev/mtd1 0 6291456 qspi_read
Copied 6291456 bytes from address 0x00000000 in flash to qspi_read
$ hexdump qspi_read
0000000 ffff ffff ffff ffff ffff ffff ffff ffff
*
0600000
$ mtd_debug write /dev/mtd1 0 6291456 qspi_test
Copied 6291456 bytes from qspi_test to address 0x00000000 in flash
$ mtd_debug read /dev/mtd1 0 6291456 qspi_read
Copied 6291456 bytes from address 0x00000000 in flash to qspi_read
$ sha1sum qspi_test qspi_read
d24a9523db829a0df688f34b8dc76a1383b74024  qspi_test
d24a9523db829a0df688f34b8dc76a1383b74024  qspi_read

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/r/20230331194620.839899-2-miquel.raynal@bootlin.com
Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
2023-04-04 09:42:07 +03:00
..
chips mtd: cfi_cmdset_0002: Rename chip_ready variables 2022-04-28 10:17:22 +02:00
devices mtd: dataflash: remove duplicate SPI ID table 2023-01-02 12:15:57 +01:00
hyperbus memory: renesas-rpc-if: Remove Runtime PM wrappers 2023-01-23 11:48:00 +01:00
lpddr mtd: lpddr2_nvm: Fix possible null-ptr-deref 2022-11-17 21:59:03 +01:00
maps mtd: maps: pismo: Convert to i2c's .probe_new() 2023-03-09 21:58:49 +01:00
nand MTD changes: 2023-02-25 15:05:08 -08:00
parsers SPI NOR changes: 2023-02-23 10:27:32 +01:00
spi-nor mtd: spi-nor: macronix: Add support for mx25uw51245g with RWW 2023-04-04 09:42:07 +03:00
tests treewide: use get_random_u32_below() instead of deprecated function 2022-11-18 02:15:15 +01:00
ubi ubi: block: Fix missing blk_mq_end_request 2023-03-11 09:00:25 -08:00
ftl.c mtd: ftl: use container_of() rather than cast 2022-09-19 18:14:53 +02:00
inftlcore.c mtd: inftlcore: fix repeated words in comments 2022-11-07 17:14:21 +01:00
inftlmount.c mtd: inftl: remove unnecessary oom message 2021-06-11 20:44:21 +02:00
Kconfig mtdblock: Add comment about UBI block devices 2021-08-06 22:05:13 +02:00
Makefile mtd: Support kmsg dumper based on pstore/blk 2020-05-31 19:49:01 -07:00
mtd_blkdevs.c block: remove blk_cleanup_disk 2022-06-28 06:33:15 -06:00
mtdblock_ro.c mtdblock: Warn if added for a NAND device 2021-08-17 18:41:59 +02:00
mtdblock.c mtdblock: warn if opened on NAND 2022-04-25 10:43:12 +02:00
mtdchar.c mtdchar: add MEMREAD ioctl 2022-09-21 10:38:11 +02:00
mtdconcat.c mtd: fix repeated word in comment 2022-09-20 10:40:30 +02:00
mtdcore.c mtd: core: Fix refcount error in del_mtd_device() 2022-11-24 12:32:16 +01:00
mtdcore.h mtd: Provide fs_context-aware mount_mtd() replacement 2019-09-05 14:34:23 -04:00
mtdoops.c mtd: mtdoops: panic caused mtdoops to call mtdoops_erase function immediately 2022-11-07 17:08:00 +01:00
mtdpart.c mtd: mtdpart: Don't create platform device that'll never probe 2023-02-08 13:37:55 +01:00
mtdpstore.c mtd: Fix a typo in a comment 2022-09-19 18:14:53 +02:00
mtdsuper.c mm: don't include <linux/blkdev.h> in <linux/backing-dev.h> 2021-10-18 06:17:01 -06:00
mtdswap.c mtd: always initialize 'stats' in struct mtd_oob_ops 2022-09-21 10:38:07 +02:00
nftlcore.c mtd: always initialize 'stats' in struct mtd_oob_ops 2022-09-21 10:38:07 +02:00
nftlmount.c mtd: nftl: remove unnecessary oom message 2021-06-11 20:43:26 +02:00
rfd_ftl.c mtd/rfd_ftl: don't cast away the type when calling add_mtd_blktrans_dev 2021-08-23 10:01:06 +02:00
sm_ftl.c mtd: always initialize 'stats' in struct mtd_oob_ops 2022-09-21 10:38:07 +02:00
sm_ftl.h
ssfdc.c mtd: always initialize 'stats' in struct mtd_oob_ops 2022-09-21 10:38:07 +02:00