opp3xxx_data.c 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. /*
  2. * OMAP3 OPP table definitions.
  3. *
  4. * Copyright (C) 2009-2010 Texas Instruments Incorporated - http://www.ti.com/
  5. * Nishanth Menon
  6. * Kevin Hilman
  7. * Copyright (C) 2010 Nokia Corporation.
  8. * Eduardo Valentin
  9. *
  10. * This program is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License version 2 as
  12. * published by the Free Software Foundation.
  13. *
  14. * This program is distributed "as is" WITHOUT ANY WARRANTY of any
  15. * kind, whether express or implied; without even the implied warranty
  16. * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. */
  19. #include <linux/module.h>
  20. #include <plat/cpu.h>
  21. #include "omap_opp_data.h"
  22. #include "pm.h"
  23. static struct omap_opp_def __initdata omap34xx_opp_def_list[] = {
  24. /* MPU OPP1 */
  25. OPP_INITIALIZER("mpu", true, 125000000, 975000),
  26. /* MPU OPP2 */
  27. OPP_INITIALIZER("mpu", true, 250000000, 1075000),
  28. /* MPU OPP3 */
  29. OPP_INITIALIZER("mpu", true, 500000000, 1200000),
  30. /* MPU OPP4 */
  31. OPP_INITIALIZER("mpu", true, 550000000, 1270000),
  32. /* MPU OPP5 */
  33. OPP_INITIALIZER("mpu", true, 600000000, 1350000),
  34. /*
  35. * L3 OPP1 - 41.5 MHz is disabled because: The voltage for that OPP is
  36. * almost the same than the one at 83MHz thus providing very little
  37. * gain for the power point of view. In term of energy it will even
  38. * increase the consumption due to the very negative performance
  39. * impact that frequency will do to the MPU and the whole system in
  40. * general.
  41. */
  42. OPP_INITIALIZER("l3_main", false, 41500000, 975000),
  43. /* L3 OPP2 */
  44. OPP_INITIALIZER("l3_main", true, 83000000, 1050000),
  45. /* L3 OPP3 */
  46. OPP_INITIALIZER("l3_main", true, 166000000, 1150000),
  47. /* DSP OPP1 */
  48. OPP_INITIALIZER("iva", true, 90000000, 975000),
  49. /* DSP OPP2 */
  50. OPP_INITIALIZER("iva", true, 180000000, 1075000),
  51. /* DSP OPP3 */
  52. OPP_INITIALIZER("iva", true, 360000000, 1200000),
  53. /* DSP OPP4 */
  54. OPP_INITIALIZER("iva", true, 400000000, 1270000),
  55. /* DSP OPP5 */
  56. OPP_INITIALIZER("iva", true, 430000000, 1350000),
  57. };
  58. static struct omap_opp_def __initdata omap36xx_opp_def_list[] = {
  59. /* MPU OPP1 - OPP50 */
  60. OPP_INITIALIZER("mpu", true, 300000000, 1012500),
  61. /* MPU OPP2 - OPP100 */
  62. OPP_INITIALIZER("mpu", true, 600000000, 1200000),
  63. /* MPU OPP3 - OPP-Turbo */
  64. OPP_INITIALIZER("mpu", false, 800000000, 1325000),
  65. /* MPU OPP4 - OPP-SB */
  66. OPP_INITIALIZER("mpu", false, 1000000000, 1375000),
  67. /* L3 OPP1 - OPP50 */
  68. OPP_INITIALIZER("l3_main", true, 100000000, 1000000),
  69. /* L3 OPP2 - OPP100, OPP-Turbo, OPP-SB */
  70. OPP_INITIALIZER("l3_main", true, 200000000, 1200000),
  71. /* DSP OPP1 - OPP50 */
  72. OPP_INITIALIZER("iva", true, 260000000, 1012500),
  73. /* DSP OPP2 - OPP100 */
  74. OPP_INITIALIZER("iva", true, 520000000, 1200000),
  75. /* DSP OPP3 - OPP-Turbo */
  76. OPP_INITIALIZER("iva", false, 660000000, 1325000),
  77. /* DSP OPP4 - OPP-SB */
  78. OPP_INITIALIZER("iva", false, 800000000, 1375000),
  79. };
  80. /**
  81. * omap3_opp_init() - initialize omap3 opp table
  82. */
  83. int __init omap3_opp_init(void)
  84. {
  85. int r = -ENODEV;
  86. if (!cpu_is_omap34xx())
  87. return r;
  88. if (cpu_is_omap3630())
  89. r = omap_init_opp_table(omap36xx_opp_def_list,
  90. ARRAY_SIZE(omap36xx_opp_def_list));
  91. else
  92. r = omap_init_opp_table(omap34xx_opp_def_list,
  93. ARRAY_SIZE(omap34xx_opp_def_list));
  94. return r;
  95. }
  96. device_initcall(omap3_opp_init);