opp2420_data.c 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  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 '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. * XXX Missing voltage data.
  17. * XXX Missing 19.2MHz sys_clk rate sets (needed for N800/N810)
  18. *
  19. * THe format described in this file is deprecated. Once a reasonable
  20. * OPP API exists, the data in this file should be converted to use it.
  21. *
  22. * This is technically part of the OMAP2xxx clock code.
  23. *
  24. * Considerable work is still needed to fully support dynamic frequency
  25. * changes on OMAP2xxx-series chips. Readers interested in such a
  26. * project are encouraged to review the Maemo Diablo RX-34 and RX-44
  27. * kernel source at:
  28. * http://repository.maemo.org/pool/diablo/free/k/kernel-source-diablo/
  29. */
  30. #include <linux/kernel.h>
  31. #include "opp2xxx.h"
  32. #include "sdrc.h"
  33. #include "clock.h"
  34. /*
  35. * Key dividers which make up a PRCM set. Ratios for a PRCM are mandated.
  36. * xtal_speed, dpll_speed, mpu_speed, CM_CLKSEL_MPU,
  37. * CM_CLKSEL_DSP, CM_CLKSEL_GFX, CM_CLKSEL1_CORE, CM_CLKSEL1_PLL,
  38. * CM_CLKSEL2_PLL, CM_CLKSEL_MDM
  39. *
  40. * Filling in table based on H4 boards available. There are quite a
  41. * few more rate combinations which could be defined.
  42. *
  43. * When multiple values are defined the start up will try and choose
  44. * the fastest one. If a 'fast' value is defined, then automatically,
  45. * the /2 one should be included as it can be used. Generally having
  46. * more than one fast set does not make sense, as static timings need
  47. * to be changed to change the set. The exception is the bypass
  48. * setting which is available for low power bypass.
  49. *
  50. * Note: This table needs to be sorted, fastest to slowest.
  51. **/
  52. const struct prcm_config omap2420_rate_table[] = {
  53. /* PRCM I - FAST */
  54. {S12M, S660M, S330M, RI_CM_CLKSEL_MPU_VAL, /* 330MHz ARM */
  55. RI_CM_CLKSEL_DSP_VAL, RI_CM_CLKSEL_GFX_VAL,
  56. RI_CM_CLKSEL1_CORE_VAL, MI_CM_CLKSEL1_PLL_12_VAL,
  57. MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_165MHz,
  58. RATE_IN_242X},
  59. /* PRCM II - FAST */
  60. {S12M, S600M, S300M, RII_CM_CLKSEL_MPU_VAL, /* 300MHz ARM */
  61. RII_CM_CLKSEL_DSP_VAL, RII_CM_CLKSEL_GFX_VAL,
  62. RII_CM_CLKSEL1_CORE_VAL, MII_CM_CLKSEL1_PLL_12_VAL,
  63. MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_100MHz,
  64. RATE_IN_242X},
  65. {S13M, S600M, S300M, RII_CM_CLKSEL_MPU_VAL, /* 300MHz ARM */
  66. RII_CM_CLKSEL_DSP_VAL, RII_CM_CLKSEL_GFX_VAL,
  67. RII_CM_CLKSEL1_CORE_VAL, MII_CM_CLKSEL1_PLL_13_VAL,
  68. MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_100MHz,
  69. RATE_IN_242X},
  70. /* PRCM III - FAST */
  71. {S12M, S532M, S266M, RIII_CM_CLKSEL_MPU_VAL, /* 266MHz ARM */
  72. RIII_CM_CLKSEL_DSP_VAL, RIII_CM_CLKSEL_GFX_VAL,
  73. RIII_CM_CLKSEL1_CORE_VAL, MIII_CM_CLKSEL1_PLL_12_VAL,
  74. MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_133MHz,
  75. RATE_IN_242X},
  76. {S13M, S532M, S266M, RIII_CM_CLKSEL_MPU_VAL, /* 266MHz ARM */
  77. RIII_CM_CLKSEL_DSP_VAL, RIII_CM_CLKSEL_GFX_VAL,
  78. RIII_CM_CLKSEL1_CORE_VAL, MIII_CM_CLKSEL1_PLL_13_VAL,
  79. MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_133MHz,
  80. RATE_IN_242X},
  81. /* PRCM II - SLOW */
  82. {S12M, S300M, S150M, RII_CM_CLKSEL_MPU_VAL, /* 150MHz ARM */
  83. RII_CM_CLKSEL_DSP_VAL, RII_CM_CLKSEL_GFX_VAL,
  84. RII_CM_CLKSEL1_CORE_VAL, MII_CM_CLKSEL1_PLL_12_VAL,
  85. MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_100MHz,
  86. RATE_IN_242X},
  87. {S13M, S300M, S150M, RII_CM_CLKSEL_MPU_VAL, /* 150MHz ARM */
  88. RII_CM_CLKSEL_DSP_VAL, RII_CM_CLKSEL_GFX_VAL,
  89. RII_CM_CLKSEL1_CORE_VAL, MII_CM_CLKSEL1_PLL_13_VAL,
  90. MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_100MHz,
  91. RATE_IN_242X},
  92. /* PRCM III - SLOW */
  93. {S12M, S266M, S133M, RIII_CM_CLKSEL_MPU_VAL, /* 133MHz ARM */
  94. RIII_CM_CLKSEL_DSP_VAL, RIII_CM_CLKSEL_GFX_VAL,
  95. RIII_CM_CLKSEL1_CORE_VAL, MIII_CM_CLKSEL1_PLL_12_VAL,
  96. MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_133MHz,
  97. RATE_IN_242X},
  98. {S13M, S266M, S133M, RIII_CM_CLKSEL_MPU_VAL, /* 133MHz ARM */
  99. RIII_CM_CLKSEL_DSP_VAL, RIII_CM_CLKSEL_GFX_VAL,
  100. RIII_CM_CLKSEL1_CORE_VAL, MIII_CM_CLKSEL1_PLL_13_VAL,
  101. MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_133MHz,
  102. RATE_IN_242X},
  103. /* PRCM-VII (boot-bypass) */
  104. {S12M, S12M, S12M, RVII_CM_CLKSEL_MPU_VAL, /* 12MHz ARM*/
  105. RVII_CM_CLKSEL_DSP_VAL, RVII_CM_CLKSEL_GFX_VAL,
  106. RVII_CM_CLKSEL1_CORE_VAL, MVII_CM_CLKSEL1_PLL_12_VAL,
  107. MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_BYPASS,
  108. RATE_IN_242X},
  109. /* PRCM-VII (boot-bypass) */
  110. {S13M, S13M, S13M, RVII_CM_CLKSEL_MPU_VAL, /* 13MHz ARM */
  111. RVII_CM_CLKSEL_DSP_VAL, RVII_CM_CLKSEL_GFX_VAL,
  112. RVII_CM_CLKSEL1_CORE_VAL, MVII_CM_CLKSEL1_PLL_13_VAL,
  113. MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_BYPASS,
  114. RATE_IN_242X},
  115. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  116. };