opp2420_data.c 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. /*
  2. * opp2420_data.c - old-style "OPP" table for OMAP2420
  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 'ratio's' 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. * There are 3 ratio sets for the 2430 and X ratio sets for 2420.
  16. *
  17. * 2430 differs from 2420 in that there are no more phase synchronizers used.
  18. * They both have a slightly different clock domain setup. 2420(iva1,dsp) vs
  19. * 2430 (iva2.1, NOdsp, mdm)
  20. *
  21. * XXX Missing voltage data.
  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. Ratio's 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 H4 boards and 2430-SDPs variants available.
  38. * There are quite a few more rates combinations which could be defined.
  39. *
  40. * When multiple values are defined the start up will try and choose the
  41. * fastest one. If a 'fast' value is defined, then automatically, the /2
  42. * one should be included as it can be used. Generally having more that
  43. * one fast set does not make sense, as static timings need to be changed
  44. * to change the set. The exception is the bypass setting which is
  45. * availble for low power bypass.
  46. *
  47. * Note: This table needs to be sorted, fastest to slowest.
  48. *-------------------------------------------------------------------------*/
  49. const struct prcm_config omap2420_rate_table[] = {
  50. /* PRCM I - FAST */
  51. {S12M, S660M, S330M, RI_CM_CLKSEL_MPU_VAL, /* 330MHz ARM */
  52. RI_CM_CLKSEL_DSP_VAL, RI_CM_CLKSEL_GFX_VAL,
  53. RI_CM_CLKSEL1_CORE_VAL, MI_CM_CLKSEL1_PLL_12_VAL,
  54. MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_165MHz,
  55. RATE_IN_242X},
  56. /* PRCM II - FAST */
  57. {S12M, S600M, S300M, RII_CM_CLKSEL_MPU_VAL, /* 300MHz ARM */
  58. RII_CM_CLKSEL_DSP_VAL, RII_CM_CLKSEL_GFX_VAL,
  59. RII_CM_CLKSEL1_CORE_VAL, MII_CM_CLKSEL1_PLL_12_VAL,
  60. MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_100MHz,
  61. RATE_IN_242X},
  62. {S13M, S600M, S300M, RII_CM_CLKSEL_MPU_VAL, /* 300MHz ARM */
  63. RII_CM_CLKSEL_DSP_VAL, RII_CM_CLKSEL_GFX_VAL,
  64. RII_CM_CLKSEL1_CORE_VAL, MII_CM_CLKSEL1_PLL_13_VAL,
  65. MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_100MHz,
  66. RATE_IN_242X},
  67. /* PRCM III - FAST */
  68. {S12M, S532M, S266M, RIII_CM_CLKSEL_MPU_VAL, /* 266MHz ARM */
  69. RIII_CM_CLKSEL_DSP_VAL, RIII_CM_CLKSEL_GFX_VAL,
  70. RIII_CM_CLKSEL1_CORE_VAL, MIII_CM_CLKSEL1_PLL_12_VAL,
  71. MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_133MHz,
  72. RATE_IN_242X},
  73. {S13M, S532M, S266M, RIII_CM_CLKSEL_MPU_VAL, /* 266MHz ARM */
  74. RIII_CM_CLKSEL_DSP_VAL, RIII_CM_CLKSEL_GFX_VAL,
  75. RIII_CM_CLKSEL1_CORE_VAL, MIII_CM_CLKSEL1_PLL_13_VAL,
  76. MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_133MHz,
  77. RATE_IN_242X},
  78. /* PRCM II - SLOW */
  79. {S12M, S300M, S150M, RII_CM_CLKSEL_MPU_VAL, /* 150MHz ARM */
  80. RII_CM_CLKSEL_DSP_VAL, RII_CM_CLKSEL_GFX_VAL,
  81. RII_CM_CLKSEL1_CORE_VAL, MII_CM_CLKSEL1_PLL_12_VAL,
  82. MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_100MHz,
  83. RATE_IN_242X},
  84. {S13M, S300M, S150M, RII_CM_CLKSEL_MPU_VAL, /* 150MHz ARM */
  85. RII_CM_CLKSEL_DSP_VAL, RII_CM_CLKSEL_GFX_VAL,
  86. RII_CM_CLKSEL1_CORE_VAL, MII_CM_CLKSEL1_PLL_13_VAL,
  87. MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_100MHz,
  88. RATE_IN_242X},
  89. /* PRCM III - SLOW */
  90. {S12M, S266M, S133M, RIII_CM_CLKSEL_MPU_VAL, /* 133MHz ARM */
  91. RIII_CM_CLKSEL_DSP_VAL, RIII_CM_CLKSEL_GFX_VAL,
  92. RIII_CM_CLKSEL1_CORE_VAL, MIII_CM_CLKSEL1_PLL_12_VAL,
  93. MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_133MHz,
  94. RATE_IN_242X},
  95. {S13M, S266M, S133M, RIII_CM_CLKSEL_MPU_VAL, /* 133MHz ARM */
  96. RIII_CM_CLKSEL_DSP_VAL, RIII_CM_CLKSEL_GFX_VAL,
  97. RIII_CM_CLKSEL1_CORE_VAL, MIII_CM_CLKSEL1_PLL_13_VAL,
  98. MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_133MHz,
  99. RATE_IN_242X},
  100. /* PRCM-VII (boot-bypass) */
  101. {S12M, S12M, S12M, RVII_CM_CLKSEL_MPU_VAL, /* 12MHz ARM*/
  102. RVII_CM_CLKSEL_DSP_VAL, RVII_CM_CLKSEL_GFX_VAL,
  103. RVII_CM_CLKSEL1_CORE_VAL, MVII_CM_CLKSEL1_PLL_12_VAL,
  104. MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_BYPASS,
  105. RATE_IN_242X},
  106. /* PRCM-VII (boot-bypass) */
  107. {S13M, S13M, S13M, RVII_CM_CLKSEL_MPU_VAL, /* 13MHz ARM */
  108. RVII_CM_CLKSEL_DSP_VAL, RVII_CM_CLKSEL_GFX_VAL,
  109. RVII_CM_CLKSEL1_CORE_VAL, MVII_CM_CLKSEL1_PLL_13_VAL,
  110. MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_BYPASS,
  111. RATE_IN_242X},
  112. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  113. };