Skip to contentSkip to conversation

mtd: spi-nor: Enable locking for n25q00/n25q00a

PATCH In review Jungseung Lee 2 participants 4 messages Apr 21, 2020 – Apr 29, 2020 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): CGME20200421063317epcas1p388256ada10113b38b92dca757cd11e41@epcas1p3.samsung.com

#1 lore raw

PATCH 1/1 mtd: spi-nor: Enable locking for n25q00/n25q00a

n25q00 and n25q00a use the 4 bit Block Protection scheme and support Top/Bottom protection via the BP and TB bits of the Status Register.

This patch enables the locking for n25q00/n25q00a.

Tested on n25q00 with cirrus controller. The other is modified according to the datasheet.

---
 drivers/mtd/spi-nor/micron-st.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/mtd/spi-nor/micron-st.c +4 -0
index 6c034b9718e2..51d677844480 100644
@@ -59,9 +59,13 @@ static const struct flash_info st_parts[] = {
 			      SPI_NOR_4BIT_BP | SPI_NOR_BP3_SR_BIT6) },
 	{ "n25q00",      INFO(0x20ba21, 0, 64 * 1024, 2048,
 			      SECT_4K | USE_FSR | SPI_NOR_QUAD_READ |
+			      SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB |
+			      SPI_NOR_4BIT_BP | SPI_NOR_BP3_SR_BIT6 |
 			      NO_CHIP_ERASE) },
 	{ "n25q00a",     INFO(0x20bb21, 0, 64 * 1024, 2048,
 			      SECT_4K | USE_FSR | SPI_NOR_QUAD_READ |
+			      SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB |
+			      SPI_NOR_4BIT_BP | SPI_NOR_BP3_SR_BIT6 |
 			      NO_CHIP_ERASE) },
 	{ "mt25ql02g",   INFO(0x20ba22, 0, 64 * 1024, 4096,
 			      SECT_4K | USE_FSR | SPI_NOR_QUAD_READ |
Signature · 6 lines
2.17.1


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
#2 lore raw

Hi, Jungseung,

Quoted 2 lines · EEST Jungseung Lee

Tested on n25q00 with cirrus controller. The other is modified according to the datasheet.

What is the difference between n25q00 and n25q00a? I'm reluctant to add flags to flashes solely by datasheet info, without testing. I saw too many faults in the past.

Let me know if you're ok with applying just the changes for n25q00, they look fine.

Cheers,
ta

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

#3 lore raw

Hi, Tudor,

Quoted 12 lines · On Tue, 2020-04-28 at 07:34 +0000, [email protected] wrote:

Hi, Jungseung,

Quoted 2 lines · EEST Jungseung Lee

Tested on n25q00 with cirrus controller. The other is modified according to the datasheet.

What is the difference between n25q00 and n25q00a? I'm reluctant to add flags
to flashes solely by datasheet info, without testing. I saw too many faults in
the past.

The device ID of n25q00 is 0x20ba21, and the the device ID of n25q00a is 0x20bb21. BAh = 3V, BBh = 1.8V.

The Vcc they are using is differ. That's only one I could find in their datasheet and they are also sharing their datasheet.

Quoted 4 lines

Let me know if you're ok with applying just the changes for n25q00, they look
fine.

I understand. It's also good for me.

Thanks,

Quoted 5 lines

Cheers,
ta

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

#4 lore raw
Quoted 21 lines · EEST Jungseung Lee

EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe

Hi, Tudor,

Quoted 11 lines · On Tue, 2020-04-28 at 07:34 +0000, [email protected] wrote:

Hi, Jungseung,

Quoted 2 lines · EEST Jungseung Lee

Tested on n25q00 with cirrus controller. The other is modified according to the datasheet.

What is the difference between n25q00 and n25q00a? I'm reluctant to add flags
to flashes solely by datasheet info, without testing. I saw too many faults in
the past.

The device ID of n25q00 is 0x20ba21, and the the device ID of n25q00a is 0x20bb21. BAh = 3V, BBh = 1.8V.

Quoted 9 lines

The Vcc they are using is differ. That's only one I could find in their datasheet and they are also sharing their datasheet.

Quoted 3 lines

Let me know if you're ok with applying just the changes for n25q00, they look
fine.

I understand. It's also good for me.

I updated the patch to enable locking just for n25q00. Applied to spi-nor/ next.

Cheers,
ta

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/