69bade0cf89517e71caddbdf8d18fbfc16974703
[openwrt/openwrt.git] / target / linux / generic / pending-4.14 / 478-mtd-spi-nor-Add-support-for-XM25QH64A-and-XM25QH128A.patch
1 From b02f3405c935a28200db26b63e42086057565cf4 Mon Sep 17 00:00:00 2001
2 From: Hauke Mehrtens <hauke@hauke-m.de>
3 Date: Sat, 31 Mar 2018 20:09:54 +0200
4 Subject: [PATCH] mtd: spi-nor: Add support for XM25QH64A and XM25QH128A
5
6 These devices are produced by Wuhan Xinxin Semiconductor Manufacturing
7 Corp. (XMC) and found on some routers from Chinese manufactures.
8
9 The data sheets can be found here:
10 http://www.xmcwh.com/Uploads/2018-03-01/5a9799e4cb355.pdf
11 http://www.xmcwh.com/Uploads/2018-02-05/5a77e6dbe968b.pdf
12
13 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 ---
15 drivers/mtd/spi-nor/spi-nor.c | 4 ++++
16 1 file changed, 4 insertions(+)
17
18 --- a/drivers/mtd/spi-nor/spi-nor.c
19 +++ b/drivers/mtd/spi-nor/spi-nor.c
20 @@ -1186,6 +1186,10 @@ static const struct flash_info spi_nor_i
21 { "3S400AN", S3AN_INFO(0x1f2400, 256, 264) },
22 { "3S700AN", S3AN_INFO(0x1f2500, 512, 264) },
23 { "3S1400AN", S3AN_INFO(0x1f2600, 512, 528) },
24 +
25 + /* XMC (Wuhan Xinxin Semiconductor Manufacturing Corp.) */
26 + { "XM25QH64A", INFO(0x207017, 0, 64 * 1024, 128, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
27 + { "XM25QH128A", INFO(0x207018, 0, 64 * 1024, 256, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
28 { },
29 };
30