flash_delaytran_table.c 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. #define CHIP_ID_TBL_NUM 5
  2. struct nor_delaychain_tbl {
  3. uint16_t vdd_volt;
  4. uint8_t delay;
  5. };
  6. struct id_nor_delaychain_tbl {
  7. uint32_t chip_id;
  8. uint32_t max_clk; //MHZ
  9. const struct nor_delaychain_tbl tbl[CHIP_ID_TBL_NUM];
  10. };
  11. static const struct id_nor_delaychain_tbl chipid_dl_tbl[] = {
  12. {
  13. .chip_id = 0x0, /*default use*/
  14. .max_clk = CONFIG_SPI_FLASH_FREQ_MHZ,
  15. .tbl = {
  16. {950, CONFIG_SPI_FLASH_DELAY_CHAIN},
  17. {1000, CONFIG_SPI_FLASH_DELAY_CHAIN},
  18. {1100, CONFIG_SPI_FLASH_DELAY_CHAIN},
  19. {1150, CONFIG_SPI_FLASH_DELAY_CHAIN},
  20. {1200, CONFIG_SPI_FLASH_DELAY_CHAIN},
  21. },
  22. },
  23. {
  24. .chip_id = 0x1840c8, /*MD25Q128E*/
  25. .max_clk = CONFIG_SPI_FLASH_FREQ_MHZ,
  26. .tbl = {
  27. {950, CONFIG_SPI_FLASH_DELAY_CHAIN},
  28. {1000, CONFIG_SPI_FLASH_DELAY_CHAIN},
  29. {1100, CONFIG_SPI_FLASH_DELAY_CHAIN},
  30. {1150, CONFIG_SPI_FLASH_DELAY_CHAIN},
  31. {1200, CONFIG_SPI_FLASH_DELAY_CHAIN},
  32. },
  33. },
  34. {
  35. .chip_id = 0x1940c8, /*GD25Q256E*/
  36. .max_clk = CONFIG_SPI_FLASH_FREQ_MHZ,
  37. .tbl = {
  38. {950, 29},
  39. {1000, 29},
  40. {1100, 30},
  41. {1150, 30},
  42. {1200, 31},
  43. },
  44. },
  45. {
  46. .chip_id = 0x1a47c8, /*GD25B512M*/
  47. .max_clk = 84,
  48. .tbl = {
  49. {950, 30},
  50. {1000, 30},
  51. {1100, 35},
  52. {1150, 35},
  53. {1200, 35},
  54. },
  55. },
  56. {
  57. .chip_id = 0x18405e, /*ZB25VQ128DWJG*/
  58. .max_clk = CONFIG_SPI_FLASH_FREQ_MHZ,
  59. .tbl = {
  60. {950, 36},
  61. {1000, 38},
  62. {1100, 41},
  63. {1150, 43},
  64. {1200, 45},
  65. },
  66. },
  67. {
  68. .chip_id = 0x17405e, /*ZB25VQ64CWJG*/
  69. .max_clk = CONFIG_SPI_FLASH_FREQ_MHZ,
  70. .tbl = {
  71. {950, 36},
  72. {1000, 38},
  73. {1100, 41},
  74. {1150, 43},
  75. {1200, 45},
  76. },
  77. },
  78. {
  79. .chip_id = 0x16405e, /*ZB25VQ32DSJG*/
  80. .max_clk = CONFIG_SPI_FLASH_FREQ_MHZ,
  81. .tbl = {
  82. {950, 36},
  83. {1000, 38},
  84. {1100, 41},
  85. {1150, 43},
  86. {1200, 46},
  87. },
  88. },
  89. };