opp2430_data.c 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. /*
  2. * opp2430_data.c - old-style "OPP" table for OMAP2430
  3. *
  4. * Copyright (C) 2005-2009 Texas Instruments, Inc.
  5. * Copyright (C) 2004-2009 Nokia Corporation
  6. *
  7. * Richard Woodruff <r-woodruff2@ti.com>
  8. *
  9. * The OMAP2 processor can be run at several discrete 'PRCM configurations'.
  10. * These configurations are characterized by voltage and speed for clocks.
  11. * The device is only validated for certain combinations. One way to express
  12. * these combinations is via the 'ratios' which the clocks operate with
  13. * respect to each other. These ratio sets are for a given voltage/DPLL
  14. * setting. All configurations can be described by a DPLL setting and a ratio.
  15. *
  16. * 2430 differs from 2420 in that there are no more phase synchronizers used.
  17. * They both have a slightly different clock domain setup. 2420(iva1,dsp) vs
  18. * 2430 (iva2.1, NOdsp, mdm)
  19. *
  20. * XXX Missing voltage data.
  21. * XXX Missing 19.2MHz sys_clk rate sets.
  22. *
  23. * THe format described in this file is deprecated. Once a reasonable
  24. * OPP API exists, the data in this file should be converted to use it.
  25. *
  26. * This is technically part of the OMAP2xxx clock code.
  27. */
  28. #include "opp2xxx.h"
  29. #include "sdrc.h"
  30. #include "clock.h"
  31. /*
  32. * Key dividers which make up a PRCM set. Ratios for a PRCM are mandated.
  33. * xtal_speed, dpll_speed, mpu_speed, CM_CLKSEL_MPU,
  34. * CM_CLKSEL_DSP, CM_CLKSEL_GFX, CM_CLKSEL1_CORE, CM_CLKSEL1_PLL,
  35. * CM_CLKSEL2_PLL, CM_CLKSEL_MDM
  36. *
  37. * Filling in table based on 2430-SDPs variants available. There are
  38. * quite a few more rate combinations which could be defined.
  39. *
  40. * When multiple values are defined the start up will try and choose
  41. * the fastest one. If a 'fast' value is defined, then automatically,
  42. * the /2 one should be included as it can be used. Generally having
  43. * more than one fast set does not make sense, as static timings need
  44. * to be changed to change the set. The exception is the bypass
  45. * setting which is available for low power bypass.
  46. *
  47. * Note: This table needs to be sorted, fastest to slowest.
  48. */
  49. const struct prcm_config omap2430_rate_table[] = {
  50. /* PRCM #4 - ratio2 (ES2.1) - FAST */
  51. {S13M, S798M, S399M, R2_CM_CLKSEL_MPU_VAL, /* 399MHz ARM */
  52. R2_CM_CLKSEL_DSP_VAL, R2_CM_CLKSEL_GFX_VAL,
  53. R2_CM_CLKSEL1_CORE_VAL, M4_CM_CLKSEL1_PLL_13_VAL,
  54. MX_CLKSEL2_PLL_2x_VAL, R2_CM_CLKSEL_MDM_VAL,
  55. SDRC_RFR_CTRL_133MHz,
  56. RATE_IN_243X},
  57. /* PRCM #2 - ratio1 (ES2) - FAST */
  58. {S13M, S658M, S329M, R1_CM_CLKSEL_MPU_VAL, /* 330MHz ARM */
  59. R1_CM_CLKSEL_DSP_VAL, R1_CM_CLKSEL_GFX_VAL,
  60. R1_CM_CLKSEL1_CORE_VAL, M2_CM_CLKSEL1_PLL_13_VAL,
  61. MX_CLKSEL2_PLL_2x_VAL, R1_CM_CLKSEL_MDM_VAL,
  62. SDRC_RFR_CTRL_165MHz,
  63. RATE_IN_243X},
  64. /* PRCM #5a - ratio1 - FAST */
  65. {S13M, S532M, S266M, R1_CM_CLKSEL_MPU_VAL, /* 266MHz ARM */
  66. R1_CM_CLKSEL_DSP_VAL, R1_CM_CLKSEL_GFX_VAL,
  67. R1_CM_CLKSEL1_CORE_VAL, M5A_CM_CLKSEL1_PLL_13_VAL,
  68. MX_CLKSEL2_PLL_2x_VAL, R1_CM_CLKSEL_MDM_VAL,
  69. SDRC_RFR_CTRL_133MHz,
  70. RATE_IN_243X},
  71. /* PRCM #5b - ratio1 - FAST */
  72. {S13M, S400M, S200M, R1_CM_CLKSEL_MPU_VAL, /* 200MHz ARM */
  73. R1_CM_CLKSEL_DSP_VAL, R1_CM_CLKSEL_GFX_VAL,
  74. R1_CM_CLKSEL1_CORE_VAL, M5B_CM_CLKSEL1_PLL_13_VAL,
  75. MX_CLKSEL2_PLL_2x_VAL, R1_CM_CLKSEL_MDM_VAL,
  76. SDRC_RFR_CTRL_100MHz,
  77. RATE_IN_243X},
  78. /* PRCM #4 - ratio1 (ES2.1) - SLOW */
  79. {S13M, S399M, S199M, R2_CM_CLKSEL_MPU_VAL, /* 200MHz ARM */
  80. R2_CM_CLKSEL_DSP_VAL, R2_CM_CLKSEL_GFX_VAL,
  81. R2_CM_CLKSEL1_CORE_VAL, M4_CM_CLKSEL1_PLL_13_VAL,
  82. MX_CLKSEL2_PLL_1x_VAL, R2_CM_CLKSEL_MDM_VAL,
  83. SDRC_RFR_CTRL_133MHz,
  84. RATE_IN_243X},
  85. /* PRCM #2 - ratio1 (ES2) - SLOW */
  86. {S13M, S329M, S164M, R1_CM_CLKSEL_MPU_VAL, /* 165MHz ARM */
  87. R1_CM_CLKSEL_DSP_VAL, R1_CM_CLKSEL_GFX_VAL,
  88. R1_CM_CLKSEL1_CORE_VAL, M2_CM_CLKSEL1_PLL_13_VAL,
  89. MX_CLKSEL2_PLL_1x_VAL, R1_CM_CLKSEL_MDM_VAL,
  90. SDRC_RFR_CTRL_165MHz,
  91. RATE_IN_243X},
  92. /* PRCM #5a - ratio1 - SLOW */
  93. {S13M, S266M, S133M, R1_CM_CLKSEL_MPU_VAL, /* 133MHz ARM */
  94. R1_CM_CLKSEL_DSP_VAL, R1_CM_CLKSEL_GFX_VAL,
  95. R1_CM_CLKSEL1_CORE_VAL, M5A_CM_CLKSEL1_PLL_13_VAL,
  96. MX_CLKSEL2_PLL_1x_VAL, R1_CM_CLKSEL_MDM_VAL,
  97. SDRC_RFR_CTRL_133MHz,
  98. RATE_IN_243X},
  99. /* PRCM #5b - ratio1 - SLOW*/
  100. {S13M, S200M, S100M, R1_CM_CLKSEL_MPU_VAL, /* 100MHz ARM */
  101. R1_CM_CLKSEL_DSP_VAL, R1_CM_CLKSEL_GFX_VAL,
  102. R1_CM_CLKSEL1_CORE_VAL, M5B_CM_CLKSEL1_PLL_13_VAL,
  103. MX_CLKSEL2_PLL_1x_VAL, R1_CM_CLKSEL_MDM_VAL,
  104. SDRC_RFR_CTRL_100MHz,
  105. RATE_IN_243X},
  106. /* PRCM-boot/bypass */
  107. {S13M, S13M, S13M, RB_CM_CLKSEL_MPU_VAL, /* 13Mhz */
  108. RB_CM_CLKSEL_DSP_VAL, RB_CM_CLKSEL_GFX_VAL,
  109. RB_CM_CLKSEL1_CORE_VAL, MB_CM_CLKSEL1_PLL_13_VAL,
  110. MX_CLKSEL2_PLL_2x_VAL, RB_CM_CLKSEL_MDM_VAL,
  111. SDRC_RFR_CTRL_BYPASS,
  112. RATE_IN_243X},
  113. /* PRCM-boot/bypass */
  114. {S12M, S12M, S12M, RB_CM_CLKSEL_MPU_VAL, /* 12Mhz */
  115. RB_CM_CLKSEL_DSP_VAL, RB_CM_CLKSEL_GFX_VAL,
  116. RB_CM_CLKSEL1_CORE_VAL, MB_CM_CLKSEL1_PLL_12_VAL,
  117. MX_CLKSEL2_PLL_2x_VAL, RB_CM_CLKSEL_MDM_VAL,
  118. SDRC_RFR_CTRL_BYPASS,
  119. RATE_IN_243X},
  120. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  121. };