kernel: update kernel 3.18 to version 3.18.23
[openwrt/staging/chunkeey.git] / target / linux / sunxi / patches-4.1 / 128-3-mtd-nand-add-H27UBG8T2BTR-BC.patch
1 --- a/drivers/mtd/nand/nand_ids.c
2 +++ b/drivers/mtd/nand/nand_ids.c
3 @@ -19,6 +19,49 @@
4 #define SP_OPTIONS16 (SP_OPTIONS | NAND_BUSWIDTH_16)
5
6 /*
7 + * Hynix H27UBG8T2BTR timings
8 + * This chip has an exceptionally large tADL, which results in only supporting
9 + * ONFI timing mode 0. Using these timings, the clock can be raised from
10 + * 12.5MHz to 50MHz.
11 + */
12 +const struct nand_sdr_timings hynix_h27ubg8t2btr_sdr_timing = {
13 + .tADL_min = 200000,
14 + .tALH_min = 5000,
15 + .tALS_min = 10000,
16 + .tAR_min = 10000,
17 + .tCEA_max = 100000,
18 + .tCEH_min = 20000,
19 + .tCH_min = 5000,
20 + .tCHZ_max = 50000,
21 + .tCLH_min = 5000,
22 + .tCLR_min = 10000,
23 + .tCLS_min = 10000,
24 + .tCOH_min = 15000,
25 + .tCS_min = 20000,
26 + .tDH_min = 5000,
27 + .tDS_min = 10000,
28 + .tFEAT_max = 1000000,
29 + .tIR_min = 0,
30 + .tITC_max = 1000000,
31 + .tRC_min = 20000,
32 + .tREA_max = 16000,
33 + .tREH_min = 8000,
34 + .tRHOH_min = 15000,
35 + .tRHW_min = 100000,
36 + .tRHZ_max = 100000,
37 + .tRLOH_min = 5000,
38 + .tRP_min = 10000,
39 + .tRST_max = 500000000,
40 + .tWB_max = 100000,
41 + .tRR_min = 20000,
42 + .tWC_min = 20000,
43 + .tWH_min = 10000,
44 + .tWHR_min = 80000,
45 + .tWP_min = 8000,
46 + .tWW_min = 100000,
47 +};
48 +
49 +/*
50 * The chip ID list:
51 * name, device ID, page size, chip size in MiB, eraseblock size, options
52 *
53 @@ -50,6 +93,10 @@ struct nand_flash_dev nand_flash_ids[] =
54 { .id = {0xad, 0xde, 0x94, 0xda, 0x74, 0xc4} },
55 SZ_8K, SZ_8K, SZ_2M, 0, 6, 640, NAND_ECC_INFO(40, SZ_1K),
56 4 },
57 + {"H27UBG8T2BTR-BC 64G 3.3V 8-bit",
58 + { .id = {0xad, 0xd7, 0x94, 0xda, 0x74, 0xc3} },
59 + SZ_8K, SZ_4K, SZ_2M, 0, 6, 640, NAND_ECC_INFO(40, SZ_1K),
60 + 0, &hynix_h27ubg8t2btr_sdr_timing },
61
62 LEGACY_ID_NAND("NAND 4MiB 5V 8-bit", 0x6B, 4, SZ_8K, SP_OPTIONS),
63 LEGACY_ID_NAND("NAND 4MiB 3,3V 8-bit", 0xE3, 4, SZ_8K, SP_OPTIONS),