opp2430_data.c 4.9 KB

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