mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-25 08:21:14 +00:00
b9d58f7e06
generic: Add/rename patches for upstream consistency ipq40xx: generic-level patch replaces same-source patches-4.19/ 082-v4.20-mtd-spinand-winbond-Add-support-for-W25N01GV.patch The SPI-NAND framework from Linux uses common driver code that is then "tuned" by a tiny struct of chip-specific data that describes available commands, timing, and layout (data and OOB data). Several manufacturers and chips have been added since 4.19, several of which are used in devices already supported by OpenWrt (typically with no or "legacy" access to their NAND memory). This commit catches up the supported-chip definitions through Linux 5.2-rc6 and linux/next. The driver is only compiled for platforms with CONFIG_MTD_SPI_NAND=y. This presently includes ipq40xx and pistachio, with the addition of ath79-nand in these commits (and not ath79-generic or ath79-tiny). Upstream patches refreshed against 4.19.75 Build-tested-on: ipq40xx Run-tested-on: ath79-nand Signed-off-by: Jeff Kletsky <git-commits@allycomm.com>
38 lines
1.3 KiB
Diff
38 lines
1.3 KiB
Diff
From 9a4d83074769d6ecf1f5c3fef0f183b09abf3726 Mon Sep 17 00:00:00 2001
|
|
From: Robert Marko <robimarko@gmail.com>
|
|
Date: Sat, 6 Oct 2018 17:36:42 +0200
|
|
Subject: [PATCH 1/8] mtd: spinand: winbond: Add support for W25N01GV
|
|
|
|
W25N01GV is a single die version of the already supported
|
|
W25M02GV with half the capacity. Everything else is the
|
|
same so introduce support for W25N01GV.
|
|
|
|
Datasheet:http://www.winbond.com/resource-files/w25n01gv%20revl%20050918%20unsecured.pdf
|
|
|
|
Tested on 8devices Jalapeno dev board under OpenWrt running 4.19-rc5.
|
|
|
|
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
|
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
|
|
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
|
|
---
|
|
drivers/mtd/nand/spi/winbond.c | 8 ++++++++
|
|
1 file changed, 8 insertions(+)
|
|
|
|
--- a/drivers/mtd/nand/spi/winbond.c
|
|
+++ b/drivers/mtd/nand/spi/winbond.c
|
|
@@ -84,6 +84,14 @@ static const struct spinand_info winbond
|
|
0,
|
|
SPINAND_ECCINFO(&w25m02gv_ooblayout, NULL),
|
|
SPINAND_SELECT_TARGET(w25m02gv_select_target)),
|
|
+ SPINAND_INFO("W25N01GV", 0xAA,
|
|
+ NAND_MEMORG(1, 2048, 64, 64, 1024, 1, 1, 1),
|
|
+ NAND_ECCREQ(1, 512),
|
|
+ SPINAND_INFO_OP_VARIANTS(&read_cache_variants,
|
|
+ &write_cache_variants,
|
|
+ &update_cache_variants),
|
|
+ 0,
|
|
+ SPINAND_ECCINFO(&w25m02gv_ooblayout, NULL)),
|
|
};
|
|
|
|
/**
|