2023-07-17 16:15:07

by Sridharan S N

[permalink] [raw]
Subject: [PATCH 0/2] Add support for gigadevice and macronix SPI-NOR

This series add support for SPI NOR devices mentioned below:

gigadevice:
gd25lb256e - This supports quad read and uniform 4K-byte erase.
gd25d{2,4}0c - These supports dual read and uniform 4K-byte erase.

macronix:
mx66u1g45g - This chip supports stateless 4-byte opcodes, dual and quad
read and uniform 4K-byte erase.
Sridharan S N (2):
mtd: spi-nor: gigadevice: Add support for gd25lb256e and gd25d{2,4}0c
mtd: spi-nor: macronix: Add support for mx66u1g45g

drivers/mtd/spi-nor/gigadevice.c | 6 ++++++
drivers/mtd/spi-nor/macronix.c | 3 +++
2 files changed, 9 insertions(+)

--
2.17.1



2023-07-17 16:20:21

by Sridharan S N

[permalink] [raw]
Subject: [PATCH 1/2] mtd: spi-nor: gigadevice: Add support for gd25lb256e and gd25d{2,4}0c

Add support for:
gd25lb256e
gd25d{2,4}0c

All these chips supports uniform 4K-byte erase.

Signed-off-by: Sridharan S N <[email protected]>
Signed-off-by: Md Sadre Alam <[email protected]>
---
drivers/mtd/spi-nor/gigadevice.c | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/drivers/mtd/spi-nor/gigadevice.c b/drivers/mtd/spi-nor/gigadevice.c
index d57ddaf1525b..aca3b2362bfd 100644
--- a/drivers/mtd/spi-nor/gigadevice.c
+++ b/drivers/mtd/spi-nor/gigadevice.c
@@ -67,6 +67,12 @@ static const struct flash_info gigadevice_nor_parts[] = {
FLAGS(SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB | SPI_NOR_TB_SR_BIT6)
FIXUP_FLAGS(SPI_NOR_4B_OPCODES)
.fixups = &gd25q256_fixups },
+ { "gd25lb256e", INFO(0xc86719, 0, 64 * 1024, 512)
+ NO_SFDP_FLAGS(SECT_4K | SPI_NOR_QUAD_READ) },
+ { "gd25d20c", INFO(0xc84012, 0, 64 * 1024, 4)
+ NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ) },
+ { "gd25d40c", INFO(0xc84013, 0, 64 * 1024, 8)
+ NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ) },
};

const struct spi_nor_manufacturer spi_nor_gigadevice = {
--
2.17.1


2023-07-17 16:27:40

by Tudor Ambarus

[permalink] [raw]
Subject: Re: [PATCH 0/2] Add support for gigadevice and macronix SPI-NOR



On 17.07.2023 18:35, Sridharan S N wrote:
> This series add support for SPI NOR devices mentioned below:
>
> gigadevice:
> gd25lb256e - This supports quad read and uniform 4K-byte erase.
> gd25d{2,4}0c - These supports dual read and uniform 4K-byte erase.
>
> macronix:
> mx66u1g45g - This chip supports stateless 4-byte opcodes, dual and quad
> read and uniform 4K-byte erase.
> Sridharan S N (2):
> mtd: spi-nor: gigadevice: Add support for gd25lb256e and gd25d{2,4}0c
> mtd: spi-nor: macronix: Add support for mx66u1g45g
>
> drivers/mtd/spi-nor/gigadevice.c | 6 ++++++
> drivers/mtd/spi-nor/macronix.c | 3 +++
> 2 files changed, 9 insertions(+)
>

All these flashes should support SFDP, thus you don't need to explicitly
define them. See
https://lore.kernel.org/linux-mtd/[email protected]/T/#mf79010e7031b03bda31690b4229a4f27f712f3a7