ipq40xx: switch default to 6.6
[openwrt/openwrt.git] / target / linux / ipq40xx / patches-6.1 / 444-mtd-nand-rawnand-add-support-for-Toshiba-TC58NVG0S3H.patch
1 From 35ca7e3e6ccd120d694a3425f37fc6374ad2e11e Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Andreas=20B=C3=B6hler?= <dev@aboehler.at>
3 Date: Wed, 20 Apr 2022 12:08:38 +0200
4 Subject: [PATCH] mtd: rawnand: add support for Toshiba TC58NVG0S3HTA00
5 NAND flash
6 MIME-Version: 1.0
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
9
10 The Toshiba TC58NVG0S3HTA00 is detected with 64 byte OOB while the flash
11 has 128 bytes OOB. This adds a static NAND ID entry to correct this.
12
13 Tested on FRITZ!Box 7530 flashed with OpenWrt.
14
15 Signed-off-by: Andreas Böhler <dev@aboehler.at>
16 (changed id_len to 8, added comment about possible counterfeits)
17 ---
18 --- a/drivers/mtd/nand/raw/nand_ids.c
19 +++ b/drivers/mtd/nand/raw/nand_ids.c
20 @@ -29,6 +29,9 @@ struct nand_flash_dev nand_flash_ids[] =
21 {"TC58NVG0S3E 1G 3.3V 8-bit",
22 { .id = {0x98, 0xd1, 0x90, 0x15, 0x76, 0x14, 0x01, 0x00} },
23 SZ_2K, SZ_128, SZ_128K, 0, 8, 64, NAND_ECC_INFO(1, SZ_512), },
24 + {"TC58NVG0S3HTA00 1G 3.3V 8-bit", /* possibly counterfeit chip - see commit */
25 + { .id = {0x98, 0xf1, 0x80, 0x15} }, /* should be more bytes */
26 + SZ_2K, SZ_128, SZ_128K, 0, 8, 128, NAND_ECC_INFO(8, SZ_512), },
27 {"TC58NVG2S0F 4G 3.3V 8-bit",
28 { .id = {0x98, 0xdc, 0x90, 0x26, 0x76, 0x15, 0x01, 0x08} },
29 SZ_4K, SZ_512, SZ_256K, 0, 8, 224, NAND_ECC_INFO(4, SZ_512) },