* [PATCH v1] add support for is25wp256d spi-nor device.
@ 2019-04-19 12:12 Sagar Shrikant Kadam
2019-04-19 12:12 ` [PATCH v1] mtd: spi-nor: add support for is25wp256d Sagar Shrikant Kadam
0 siblings, 1 reply; 2+ messages in thread
From: Sagar Shrikant Kadam @ 2019-04-19 12:12 UTC (permalink / raw)
To: marek.vasut, tudor.ambarus, dwmw2, computersforpeace, bbrezillon,
richard
Cc: palmer, linux-mtd, linux-kernel, linux-riscv, Sagar Shrikant Kadam
The patch is tested on HiFive Unleashed board and is based on mainline 5.1-rc5 kernel.
Its intended to add support for 32MB snor flash mounted on the board.
The memory supports 64Kbyte sectors size as added into id table.
Flash parameter table for ISSI device is set to use macronix_quad_enable
procedure to set the QE (quad-enable) bit of Status register.
Sagar Shrikant Kadam (1):
mtd: spi-nor: add support for is25wp256d
drivers/mtd/spi-nor/spi-nor.c | 8 ++++++++
include/linux/mtd/spi-nor.h | 1 +
2 files changed, 9 insertions(+)
--
1.9.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH v1] mtd: spi-nor: add support for is25wp256d
2019-04-19 12:12 [PATCH v1] add support for is25wp256d spi-nor device Sagar Shrikant Kadam
@ 2019-04-19 12:12 ` Sagar Shrikant Kadam
0 siblings, 0 replies; 2+ messages in thread
From: Sagar Shrikant Kadam @ 2019-04-19 12:12 UTC (permalink / raw)
To: marek.vasut, tudor.ambarus, dwmw2, computersforpeace, bbrezillon,
richard
Cc: palmer, linux-mtd, linux-kernel, linux-riscv,
Sagar Shrikant Kadam, Wesley W. Terpstra
Add support for is25wp256d device from ISSI, present on HiFive
Unleashed dev board (Rev: A00).
Enable quad mode for ISSI device in flash parameters
table.
Signed-off-by: Wesley W. Terpstra <wesley@sifive.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
Signed-off-by: Sagar Shrikant Kadam <sagar.kadam@sifive.com>
---
drivers/mtd/spi-nor/spi-nor.c | 8 ++++++++
include/linux/mtd/spi-nor.h | 1 +
2 files changed, 9 insertions(+)
diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
index fae1474..cec26a9 100644
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -1834,6 +1834,10 @@ static int sr2_bit7_quad_enable(struct spi_nor *nor)
SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
{ "is25wp128", INFO(0x9d7018, 0, 64 * 1024, 256,
SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
+ { "is25wp256d", INFO(0x9d7019, 0, 64 * 1024, 1024,
+ SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
+ SPI_NOR_4B_OPCODES)
+ },
/* Macronix */
{ "mx25l512e", INFO(0xc22010, 0, 64 * 1024, 1, SECT_4K) },
@@ -3650,6 +3654,10 @@ static int spi_nor_init_params(struct spi_nor *nor,
case SNOR_MFR_MACRONIX:
params->quad_enable = macronix_quad_enable;
break;
+ case SNOR_MFR_ISSI:
+ params->quad_enable = macronix_quad_enable;
+ break;
+
case SNOR_MFR_ST:
case SNOR_MFR_MICRON:
diff --git a/include/linux/mtd/spi-nor.h b/include/linux/mtd/spi-nor.h
index b3d360b..ff13297 100644
--- a/include/linux/mtd/spi-nor.h
+++ b/include/linux/mtd/spi-nor.h
@@ -19,6 +19,7 @@
#define SNOR_MFR_ATMEL CFI_MFR_ATMEL
#define SNOR_MFR_GIGADEVICE 0xc8
#define SNOR_MFR_INTEL CFI_MFR_INTEL
+#define SNOR_MFR_ISSI 0x9d /* ISSI */
#define SNOR_MFR_ST CFI_MFR_ST /* ST Micro */
#define SNOR_MFR_MICRON CFI_MFR_MICRON /* Micron */
#define SNOR_MFR_MACRONIX CFI_MFR_MACRONIX
--
1.9.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-04-19 19:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-19 12:12 [PATCH v1] add support for is25wp256d spi-nor device Sagar Shrikant Kadam
2019-04-19 12:12 ` [PATCH v1] mtd: spi-nor: add support for is25wp256d Sagar Shrikant Kadam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®