Skip to contentSkip to conversation

mtd: spi-nor: Enable QE bit for ISSI flash

PATCH New Jagan Teki 2 participants 6 messages Apr 20, 2020

Subsystems (2)
lore
Share & tools
lore

Jagan Teki

author
#0 lore raw

PATCH 1/2 mtd: spi-nor: Enable QE bit for ISSI flash

Enable QE bit for ISSI flash chips.

QE enablement logic is similar to what Micromax
has, so reuse the existing code itself.

Cc Sagar Shrikant Kadam <[email protected]>
---
 drivers/mtd/spi/spi-nor-core.c | 1 +
 include/linux/mtd/spi-nor.h    | 1 +
 2 files changed, 2 insertions(+)
drivers/mtd/spi/spi-nor-core.c +1 -0
index 7b6ad495ac..e0f6e4d6c3 100644
@@ -325,6 +325,7 @@ static int set_4byte(struct spi_nor *nor, const struct flash_info *info,
 	case SNOR_MFR_MICRON:
 		/* Some Micron need WREN command; all will accept it */
 		need_wren = true;
+	case SNOR_MFR_ISSI:
 	case SNOR_MFR_MACRONIX:
 	case SNOR_MFR_WINBOND:
 		if (need_wren)
include/linux/mtd/spi-nor.h +1 -0
index ec144a08d8..233fdc341a 100644
@@ -22,6 +22,7 @@
 #define SNOR_MFR_INTEL		CFI_MFR_INTEL
 #define SNOR_MFR_ST		CFI_MFR_ST /* ST Micro <--> Micron */
 #define SNOR_MFR_MICRON		CFI_MFR_MICRON /* ST Micro <--> Micron */
+#define SNOR_MFR_ISSI		CFI_MFR_PMC
 #define SNOR_MFR_MACRONIX	CFI_MFR_MACRONIX
 #define SNOR_MFR_SPANSION	CFI_MFR_AMD
 #define SNOR_MFR_SST		CFI_MFR_SST
Signature · 1 line
2.17.1
author
#1 lore raw

PATCH 2/2 mtd: spi-nor-ids: Enable 4B_OPCODES for is25wp256

IS25WP256 flash chips do support 4byte address opcodes, so enable support for it.

Cc Sagar Shrikant Kadam <[email protected]>
---
 drivers/mtd/spi/spi-nor-ids.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/mtd/spi/spi-nor-ids.c +2 -1
index 973b6f86c9..f95bfb59e6 100644
@@ -135,7 +135,8 @@ const struct flash_info spi_nor_ids[] = {
 	{ INFO("is25wp128",  0x9d7018, 0, 64 * 1024, 256,
 			SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
 	{ INFO("is25wp256",  0x9d7019, 0, 64 * 1024, 512,
-			SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
+			SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
+			SPI_NOR_4B_OPCODES) },
 #endif
 #ifdef CONFIG_SPI_FLASH_MACRONIX	/* MACRONIX */
 	/* Macronix */
Signature · 1 line
2.17.1
#2 lore raw

PATCH 2/2 mtd: spi-nor-ids: Enable 4B_OPCODES for is25wp256

Hi Jagan,

Quoted 26 lines

-----Original Message-----
From: Jagan Teki <[email protected]>
Sent: Monday, April 20, 2020 3:36 PM
To: Vignesh R <[email protected]>; u-boot at lists.denx.de
Cc: Bin Meng <[email protected]>; linux-
amarula at amarulasolutions.com; Jagan Teki <[email protected]>; Sagar Kadam <[email protected]>
Subject: [PATCH 2/2] mtd: spi-nor-ids: Enable 4B_OPCODES for is25wp256

[External Email] Do not click links or attachments unless you recognize the sender and know the content is safe

IS25WP256 flash chips do support 4byte address opcodes, so enable support for it.

Cc Sagar Shrikant Kadam <[email protected]>
---
 drivers/mtd/spi/spi-nor-ids.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/mtd/spi/spi-nor-ids.c +0 -0
index 973b6f86c9..f95bfb59e6 100644

drivers/mtd/spi/spi-nor-ids.c const struct flash_info spi_nor_ids[] = { · line 139

Quoted 6 lines
drivers/mtd/spi/spi-nor-ids.c +2 -1
@@ -135,7 +135,8 @@ const struct flash_info spi_nor_ids[] = {
        { INFO("is25wp128",  0x9d7018, 0, 64 * 1024, 256,
                        SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
        { INFO("is25wp256",  0x9d7019, 0, 64 * 1024, 512,
-                       SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
+                       SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
+                       SPI_NOR_4B_OPCODES) },

Looks good thanks for including.

Thanks & BR,
Sagar Kadam

Quoted 5 lines
drivers/mtd/spi/spi-nor-ids.c +0 -1
 #endif
 #ifdef CONFIG_SPI_FLASH_MACRONIX       /* MACRONIX */
        /* Macronix */
--

2.17.1

#3 lore raw

PATCH 1/2 mtd: spi-nor: Enable QE bit for ISSI flash

In reply to Jagan Teki

Hi Jagan,

Quoted 9 lines

-----Original Message-----
From: Jagan Teki <[email protected]>
Sent: Monday, April 20, 2020 3:36 PM
To: Vignesh R <[email protected]>; u-boot at lists.denx.de
Cc: Bin Meng <[email protected]>; linux-
amarula at amarulasolutions.com; Jagan Teki <[email protected]>; Sagar Kadam <[email protected]>
Subject: [PATCH 1/2] mtd: spi-nor: Enable QE bit for ISSI flash

Quoted 7 lines

[External Email] Do not click links or attachments unless you recognize the sender and know the content is safe

Enable QE bit for ISSI flash chips.

QE enablement logic is similar to what Micromax has, so reuse the existing code itself.

nits: s/Micromax/Macronix

Thanks,
Sagar Kadam

Quoted 36 lines
Cc Sagar Shrikant Kadam <[email protected]>
---
 drivers/mtd/spi/spi-nor-core.c | 1 +
 include/linux/mtd/spi-nor.h    | 1 +
 2 files changed, 2 insertions(+)
drivers/mtd/spi/spi-nor-core.c +1 -0
index 7b6ad495ac..e0f6e4d6c3 100644
@@ -325,6 +325,7 @@ static int set_4byte(struct spi_nor *nor, const struct
 flash_info *info,
        case SNOR_MFR_MICRON:
                /* Some Micron need WREN command; all will accept it */
                need_wren = true;
+       case SNOR_MFR_ISSI:
        case SNOR_MFR_MACRONIX:
        case SNOR_MFR_WINBOND:

if (need_wren)

include/linux/mtd/spi-nor.h index renamed from include/linux/mtd/spi-nor.h +0 -0

ec144a08d8..233fdc341a 100644

include/linux/mtd/spi-nor.h +0 -0
@@ -22,6 +22,7 @@
 #define SNOR_MFR_INTEL         CFI_MFR_INTEL
 #define SNOR_MFR_ST            CFI_MFR_ST /* ST Micro <--> Micron */
 #define SNOR_MFR_MICRON                CFI_MFR_MICRON /* ST Micro <-->

Micron */

+#define SNOR_MFR_ISSI          CFI_MFR_PMC
 #define SNOR_MFR_MACRONIX      CFI_MFR_MACRONIX
 #define SNOR_MFR_SPANSION      CFI_MFR_AMD
 #define SNOR_MFR_SST           CFI_MFR_SST

--
2.17.1

author
#4 lore raw

PATCH 1/2 mtd: spi-nor: Enable QE bit for ISSI flash

Quoted 15 lines · Sagar Kadam

Hi Jagan,

Quoted 12 lines

-----Original Message-----
From: Jagan Teki <[email protected]>
Sent: Monday, April 20, 2020 3:36 PM
To: Vignesh R <[email protected]>; u-boot at lists.denx.de
Cc: Bin Meng <[email protected]>; linux-
amarula at amarulasolutions.com; Jagan Teki <[email protected]>; Sagar Kadam <[email protected]>
Subject: [PATCH 1/2] mtd: spi-nor: Enable QE bit for ISSI flash

[External Email] Do not click links or attachments unless you recognize the sender and know the content is safe

Quoted 6 lines
Quoted 4 lines

Enable QE bit for ISSI flash chips.

QE enablement logic is similar to what Micromax has, so reuse the existing code itself.

nits: s/Micromax/Macronix

Will update while applying, thanks.

#5 lore raw

PATCH 1/2 mtd: spi-nor: Enable QE bit for ISSI flash

Hi Jagan,

Quoted 29 lines

-----Original Message-----
From: Jagan Teki <[email protected]>
Sent: Monday, April 20, 2020 9:58 PM
To: Sagar Kadam <[email protected]>
Cc: Vignesh R <[email protected]>; u-boot at lists.denx.de; Bin Meng <[email protected]>; linux-amarula at amarulasolutions.com
Subject: Re: [PATCH 1/2] mtd: spi-nor: Enable QE bit for ISSI flash

[External Email] Do not click links or attachments unless you recognize the sender and know the content is safe

Quoted 10 lines · Sagar Kadam

Hi Jagan,

Quoted 7 lines

-----Original Message-----
From: Jagan Teki <[email protected]>
Sent: Monday, April 20, 2020 3:36 PM
To: Vignesh R <[email protected]>; u-boot at lists.denx.de
Cc: Bin Meng <[email protected]>; linux- amarula at amarulasolutions.com; Jagan Teki <[email protected]>; Sagar Kadam

<[email protected]>

Quoted 5 lines
Quoted 5 lines

Subject: [PATCH 1/2] mtd: spi-nor: Enable QE bit for ISSI flash

[External Email] Do not click links or attachments unless you recognize the sender and know the content is safe

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

Enable QE bit for ISSI flash chips.

QE enablement logic is similar to what Micromax has, so reuse the existing code itself.

nits: s/Micromax/Macronix

Will update while applying, thanks.

Sure, no issues.

Thanks & BR,
Sagar Kadam