linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 0/3] mtd: spi-nor: add support for is25wp256 spi-nor flash
@ 2019-06-12 10:47 Sagar Shrikant Kadam
  2019-06-12 10:47 ` [PATCH v5 1/3] mtd: spi-nor: add support for is25wp256 Sagar Shrikant Kadam
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Sagar Shrikant Kadam @ 2019-06-12 10:47 UTC (permalink / raw)
  To: marek.vasut, tudor.ambarus, dwmw2, computersforpeace,
	miquel.raynal, richard, vigneshr, linux-mtd, linux-kernel,
	linux-riscv
  Cc: palmer, aou, paul.walmsley, wesley, Sagar Shrikant Kadam

The patch set is tested on HiFive Unleashed A00 board and is based on mainline
kernel v5.2-rc1. Its intended to add support for 32 MB spi-nor flash
mounted on the board. Memory Device supports 4/32/ and 64 KB sectors size.
The device id table is updated accordingly.

Flash parameter table for ISSI device is set to use macronix_quad_enable
procedure to set the QE (quad-enable) bit of Status register.

A unilaterlay block unlocking scheme is added in patch 2.

These patches are based on original work done by Wesley Terpstra and/or Palmer Dabbelt:
https://github.com/riscv/riscv-linux/commit/c94e267766d62bc9a669611c3d0c8ed5ea26569b

Erase/Read/Write operations are verified on HiFive Unleashed board using  mtd and flash utils (v1.5.2):
1. mtd_debug  	:Options available are : erase/read/write.
2. flashcp	:Single utility that erases flash, writes a file to flash and verifies the data back.
3. flash_unlock: Unlock flash memory blocks.Arguments: are offset and number of blocks.
3. flash_lock: 	 Lock flash memory blocks. Arguments: are offset and number of blocks. 

Unlock scheme clears the protection bits of all blocks in the Status register.

Lock scheme:
A basic implementation based on stm_lock scheme and is validated for different number of blocks passed
to flash_lock. ISSI devices have Top/Bottom area selection in "function register" which is OTP memory.
 

Revision history:

V4<->V5:
-Rebased to linux version v5.2-rc1.
-Updated heading of this cover letter with sub-system, instead of just plain "add support for is25wp256..."

V3<->V4:
-Extracted comman code and renamed few stm functions so that it can be reused for issi lock implementation.
-Added function's to read and write FR register, for selecting Top/Bottom area.

V2<->V3:
-Rebased patch to mainline v5.1 from earlier v5.1-rc5.
-Updated commit messages, and cover letter with reference to git URL and author information.
-Deferred flash_lock mechanism and can go as separate patch. 

V1<-> V2:
-Incorporated changes suggested by reviewers regarding patch/cover letter versioning, references of patch.
-Updated cover letter with description for flash operations verified with these changes.
-Add support for unlocking is25xxxxxx device.
-Add support for locking is25xxxxxx device.

v1:
-Add support for is25wp256 device.


Sagar Shrikant Kadam (3):
  mtd: spi-nor: add support for is25wp256
  mtd: spi-nor: add support to unlock flash device
  mtd: spi-nor: add locking support for is25xxxxx device

 drivers/mtd/spi-nor/spi-nor.c | 348 +++++++++++++++++++++++++++++++++++-------
 include/linux/mtd/spi-nor.h   |   7 +
 2 files changed, 304 insertions(+), 51 deletions(-)

-- 
1.9.1


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2019-06-24 15:22 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-12 10:47 [PATCH v5 0/3] mtd: spi-nor: add support for is25wp256 spi-nor flash Sagar Shrikant Kadam
2019-06-12 10:47 ` [PATCH v5 1/3] mtd: spi-nor: add support for is25wp256 Sagar Shrikant Kadam
2019-06-16 12:44   ` Vignesh Raghavendra
2019-06-17 15:18     ` Sagar Kadam
2019-06-21  6:04       ` Vignesh Raghavendra
2019-06-21 10:28         ` Sagar Kadam
2019-06-24  9:34           ` Vignesh Raghavendra
2019-06-24 12:40             ` Sagar Kadam
2019-06-24 13:08               ` Vignesh Raghavendra
2019-06-24 15:22                 ` Sagar Kadam
2019-06-12 10:47 ` [PATCH v5 2/3] mtd: spi-nor: add support to unlock flash device Sagar Shrikant Kadam
2019-06-16 13:05   ` Vignesh Raghavendra
2019-06-17 15:40     ` Sagar Kadam
2019-06-18  0:25       ` Joe Perches
2019-06-18  3:55         ` Sagar Kadam
2019-06-12 10:47 ` [PATCH v5 3/3] mtd: spi-nor: add locking support for is25xxxxx device Sagar Shrikant Kadam
2019-06-18  4:24   ` Vignesh Raghavendra
2019-06-18 11:44     ` Sagar Kadam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).