128-3-mtd-nand-add-H27UBG8T2BTR-BC.patch 1.7 KB

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