aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic
diff options
context:
space:
mode:
authorJihoon Han <rapid_renard@renard.ga>2021-10-01 14:52:19 +0900
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2021-10-31 21:56:56 +0100
commita61a41d4aac6765544961aa9ea303af2a3a9634c (patch)
tree913a9084b49466af0c8ad9a1f321bf3f86a4281a /target/linux/generic
parent323bd7b0f576bf83a5f72a97f2169d7e50ad046b (diff)
downloadupstream-a61a41d4aac6765544961aa9ea303af2a3a9634c.tar.gz
upstream-a61a41d4aac6765544961aa9ea303af2a3a9634c.tar.bz2
upstream-a61a41d4aac6765544961aa9ea303af2a3a9634c.zip
kernel: add support for ESMT F25L16PA(2S) SPI-NOR
This fixes support for Dongwon T&I DW02-412H which uses F25L16PA(2S) flash. Signed-off-by: Jihoon Han <rapid_renard@renard.ga> Reviewed-by: Sungbo Eo <mans0n@gorani.run> [refresh patches] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'target/linux/generic')
-rw-r--r--target/linux/generic/hack-5.4/400-unlock_mx25l6406e_with_4bit_block_protect.patch4
-rw-r--r--target/linux/generic/pending-5.10/484-mtd-spi-nor-add-esmt-f25l16pa.patch11
-rw-r--r--target/linux/generic/pending-5.4/484-mtd-spi-nor-add-esmt-f25l16pa.patch10
3 files changed, 23 insertions, 2 deletions
diff --git a/target/linux/generic/hack-5.4/400-unlock_mx25l6406e_with_4bit_block_protect.patch b/target/linux/generic/hack-5.4/400-unlock_mx25l6406e_with_4bit_block_protect.patch
index af0a14948c..8112fa7e13 100644
--- a/target/linux/generic/hack-5.4/400-unlock_mx25l6406e_with_4bit_block_protect.patch
+++ b/target/linux/generic/hack-5.4/400-unlock_mx25l6406e_with_4bit_block_protect.patch
@@ -30,7 +30,7 @@
ret = read_sr(nor);
if (ret < 0) {
dev_err(nor->dev, "error while reading status register\n");
-@@ -2337,7 +2344,7 @@ static const struct flash_info spi_nor_i
+@@ -2338,7 +2345,7 @@ static const struct flash_info spi_nor_i
{ "mx25l1606e", INFO(0xc22015, 0, 64 * 1024, 32, SECT_4K) },
{ "mx25l3205d", INFO(0xc22016, 0, 64 * 1024, 64, SECT_4K) },
{ "mx25l3255e", INFO(0xc29e16, 0, 64 * 1024, 64, SECT_4K) },
@@ -39,7 +39,7 @@
{ "mx25u2033e", INFO(0xc22532, 0, 64 * 1024, 4, SECT_4K) },
{ "mx25u3235f", INFO(0xc22536, 0, 64 * 1024, 64,
SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
-@@ -5025,6 +5032,9 @@ int spi_nor_scan(struct spi_nor *nor, co
+@@ -5026,6 +5033,9 @@ int spi_nor_scan(struct spi_nor *nor, co
if (info->flags & USE_CLSR)
nor->flags |= SNOR_F_USE_CLSR;
diff --git a/target/linux/generic/pending-5.10/484-mtd-spi-nor-add-esmt-f25l16pa.patch b/target/linux/generic/pending-5.10/484-mtd-spi-nor-add-esmt-f25l16pa.patch
new file mode 100644
index 0000000000..ce3857d511
--- /dev/null
+++ b/target/linux/generic/pending-5.10/484-mtd-spi-nor-add-esmt-f25l16pa.patch
@@ -0,0 +1,11 @@
+--- a/drivers/mtd/spi-nor/esmt.c
++++ b/drivers/mtd/spi-nor/esmt.c
+@@ -10,6 +10,8 @@
+
+ static const struct flash_info esmt_parts[] = {
+ /* ESMT */
++ { "f25l16pa-2s", INFO(0x8c2115, 0, 64 * 1024, 32,
++ SECT_4K | SPI_NOR_HAS_LOCK) },
+ { "f25l32pa", INFO(0x8c2016, 0, 64 * 1024, 64,
+ SECT_4K | SPI_NOR_HAS_LOCK) },
+ { "f25l32qa", INFO(0x8c4116, 0, 64 * 1024, 64,
diff --git a/target/linux/generic/pending-5.4/484-mtd-spi-nor-add-esmt-f25l16pa.patch b/target/linux/generic/pending-5.4/484-mtd-spi-nor-add-esmt-f25l16pa.patch
new file mode 100644
index 0000000000..0a7d4f86d5
--- /dev/null
+++ b/target/linux/generic/pending-5.4/484-mtd-spi-nor-add-esmt-f25l16pa.patch
@@ -0,0 +1,10 @@
+--- a/drivers/mtd/spi-nor/spi-nor.c
++++ b/drivers/mtd/spi-nor/spi-nor.c
+@@ -2243,6 +2243,7 @@ static const struct flash_info spi_nor_i
+ { "en25s64", INFO(0x1c3817, 0, 64 * 1024, 128, SECT_4K) },
+
+ /* ESMT */
++ { "f25l16pa-2s", INFO(0x8c2115, 0, 64 * 1024, 32, SECT_4K | SPI_NOR_HAS_LOCK) },
+ { "f25l32pa", INFO(0x8c2016, 0, 64 * 1024, 64, SECT_4K | SPI_NOR_HAS_LOCK) },
+ { "f25l32qa", INFO(0x8c4116, 0, 64 * 1024, 64, SECT_4K | SPI_NOR_HAS_LOCK) },
+ { "f25l64qa", INFO(0x8c4117, 0, 64 * 1024, 128, SECT_4K | SPI_NOR_HAS_LOCK) },