[Feature][task-view-1126]add T106EL-M44-A --1.add zxw nand patch
Only Configure: No
Affected branch: master
Affected module: unknow
Is it affected on both ZXIC and MTK: only ZXIC
Self-test: Yes
Doc Update: No
Change-Id: I34a40259fa39e9f0a419292dfefbde76e9a8ab89
diff --git a/boot/common/src/loader/drivers/spifc.c b/boot/common/src/loader/drivers/spifc.c
index b41effc..a05604e 100755
--- a/boot/common/src/loader/drivers/spifc.c
+++ b/boot/common/src/loader/drivers/spifc.c
@@ -79,6 +79,8 @@
{0x0B, 0x53, 0x77, 4096, 12, 256, 18, 2048, 0x40000, 1},
/*UNIM UM19A0LISW 128M SPI-NAND*/
{0xB0, 0x15, 0x77, 2048, 11, 64, 17, 1024, 0x20000, 1},
+ /* GD5F4GM8RExxG 512MB SPI-NAND */
+ {0xC8, 0x85, 0x77, 2048, 11, 64, 17, 4096, 0x20000, 1},
{0}
};
diff --git a/boot/common/src/uboot/drivers/mtd/nand/nand_ids.c b/boot/common/src/uboot/drivers/mtd/nand/nand_ids.c
index 6d54c1e..a992337 100755
--- a/boot/common/src/uboot/drivers/mtd/nand/nand_ids.c
+++ b/boot/common/src/uboot/drivers/mtd/nand/nand_ids.c
@@ -94,6 +94,9 @@
{0x0B,0x53,0x00,0,4096,256,0,0,0x40000,64,2048,1,1,0,{2,1,1,9,0,0,0,0,0,0},{0,0}},
/*UNIM UM19A0LISW 128M SPI-NAND*/
{0xB0,0x15,0x00,0,2048,64,0,0,0x20000,64,1024,1,1,0,{2,1,1,9,0,0,0,0,0,0},{0,0}},
+ /*GD5F4GM8XEXXG 512M SPI-NAND*/
+ {0xC8,0x85,0x00,0,2048,128,0,0,0x20000,64,4096,1,1,0,{2,1,1,9,0,0,0,0,0,0},{0,0}},
+
{0,}
};
/*
@@ -136,6 +139,7 @@
{"SPI-NAND 512MiB 1,8V", 0x45, 2048, 512, 0x20000, 0}, //GD5F4GQ6REY2G
{"SPI-NAND 512MiB 1,8V", 0x53, 4096, 512, 0x40000, 0}, //XT26Q04D-B
{"SPI-NAND 128MiB 1,8V", 0x15, 2048, 128, 0x20000, 0}, //UM19A0LISW
+ {"SPI-NAND 512MiB 1,8V", 0x85, 2048, 512, 0x20000, 0}, //GD5F4GM8XEXXG
{NULL,}
};
diff --git a/boot/common/src/uboot/drivers/mtd/nand/spi_nand_devices.c b/boot/common/src/uboot/drivers/mtd/nand/spi_nand_devices.c
index 4062428..ad98144 100755
--- a/boot/common/src/uboot/drivers/mtd/nand/spi_nand_devices.c
+++ b/boot/common/src/uboot/drivers/mtd/nand/spi_nand_devices.c
@@ -43,6 +43,12 @@
.eccbytes = 64,
.oobfree = {{4,12},{20,12},{36,12},{52,12}}
};
+
+static struct nand_ecclayout nand_gd5f4gm8_oob_128 = {
+ .eccbytes = 64,
+ .oobfree = {{2,62}}
+};
+
static struct nand_ecclayout nand_gd_oob_256 = {
.eccbytes = 128,
.oobfree = {{2,2},{16,4},{32,4},{48,4},{64,4},{80,4},{96,4},{112,4}}
@@ -273,6 +279,10 @@
chip->ecc.layout =&nand_emst_oob_64;
}
}
+ else if(dev_id == NAND_DEVID_GD5F4GM8)
+ {
+ chip->ecc.layout =&nand_gd5f4gm8_oob_128;
+ }
else
{
if(mtd->oobsize==64 && mtd->writesize==2048)
diff --git a/boot/common/src/uboot/include/linux/mtd/nand.h b/boot/common/src/uboot/include/linux/mtd/nand.h
index f1c4aa1..a3c0a30 100755
--- a/boot/common/src/uboot/include/linux/mtd/nand.h
+++ b/boot/common/src/uboot/include/linux/mtd/nand.h
@@ -529,6 +529,7 @@
#define NAND_DEVID_GD5F1GQ5R_1G 0x41
#define NAND_DEVID_EMST_F50D1G41LB_1G 0x11
+#define NAND_DEVID_GD5F4GM8 0x85
#define NAND_DEVID_PARAGON_1G 0xC1
#define NAND_DEVID_PARAGON_2G 0xC2