Blame view

arch/arm/mach-omap2/opp4xxx_data.c 3.65 KB
f5a6422d4   Nishanth Menon   omap4: opp: add O...
1
2
3
4
5
6
7
  /*
   * OMAP4 OPP table definitions.
   *
   * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/
   *	Nishanth Menon
   *	Kevin Hilman
   *	Thara Gopinath
c0718df4d   Paul Walmsley   OMAP2+: voltage: ...
8
   * Copyright (C) 2010-2011 Nokia Corporation.
f5a6422d4   Nishanth Menon   omap4: opp: add O...
9
   *      Eduardo Valentin
c0718df4d   Paul Walmsley   OMAP2+: voltage: ...
10
   *      Paul Walmsley
f5a6422d4   Nishanth Menon   omap4: opp: add O...
11
12
13
14
15
16
17
18
19
20
21
22
23
   *
   * This program is free software; you can redistribute it and/or modify
   * it under the terms of the GNU General Public License version 2 as
   * published by the Free Software Foundation.
   *
   * This program is distributed "as is" WITHOUT ANY WARRANTY of any
   * kind, whether express or implied; without even the implied warranty
   * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   * GNU General Public License for more details.
   */
  #include <linux/module.h>
  
  #include <plat/cpu.h>
c0718df4d   Paul Walmsley   OMAP2+: voltage: ...
24
  #include "control.h"
f5a6422d4   Nishanth Menon   omap4: opp: add O...
25
  #include "omap_opp_data.h"
eb05ead90   Menon, Nishanth   OMAP3|4: OPP: mak...
26
  #include "pm.h"
f5a6422d4   Nishanth Menon   omap4: opp: add O...
27

c0718df4d   Paul Walmsley   OMAP2+: voltage: ...
28
29
30
31
  /*
   * Structures containing OMAP4430 voltage supported and various
   * voltage dependent data for each VDD.
   */
d9a2012d3   Shweta Gulati   OMAP4: Update Vol...
32
33
34
35
  #define OMAP4430_VDD_MPU_OPP50_UV		1025000
  #define OMAP4430_VDD_MPU_OPP100_UV		1200000
  #define OMAP4430_VDD_MPU_OPPTURBO_UV		1313000
  #define OMAP4430_VDD_MPU_OPPNITRO_UV		1375000
c0718df4d   Paul Walmsley   OMAP2+: voltage: ...
36
37
38
39
40
41
42
43
  
  struct omap_volt_data omap44xx_vdd_mpu_volt_data[] = {
  	VOLT_DATA_DEFINE(OMAP4430_VDD_MPU_OPP50_UV, OMAP44XX_CONTROL_FUSE_MPU_OPP50, 0xf4, 0x0c),
  	VOLT_DATA_DEFINE(OMAP4430_VDD_MPU_OPP100_UV, OMAP44XX_CONTROL_FUSE_MPU_OPP100, 0xf9, 0x16),
  	VOLT_DATA_DEFINE(OMAP4430_VDD_MPU_OPPTURBO_UV, OMAP44XX_CONTROL_FUSE_MPU_OPPTURBO, 0xfa, 0x23),
  	VOLT_DATA_DEFINE(OMAP4430_VDD_MPU_OPPNITRO_UV, OMAP44XX_CONTROL_FUSE_MPU_OPPNITRO, 0xfa, 0x27),
  	VOLT_DATA_DEFINE(0, 0, 0, 0),
  };
d9a2012d3   Shweta Gulati   OMAP4: Update Vol...
44
45
46
  #define OMAP4430_VDD_IVA_OPP50_UV		1013000
  #define OMAP4430_VDD_IVA_OPP100_UV		1188000
  #define OMAP4430_VDD_IVA_OPPTURBO_UV		1300000
c0718df4d   Paul Walmsley   OMAP2+: voltage: ...
47
48
49
50
51
52
53
  
  struct omap_volt_data omap44xx_vdd_iva_volt_data[] = {
  	VOLT_DATA_DEFINE(OMAP4430_VDD_IVA_OPP50_UV, OMAP44XX_CONTROL_FUSE_IVA_OPP50, 0xf4, 0x0c),
  	VOLT_DATA_DEFINE(OMAP4430_VDD_IVA_OPP100_UV, OMAP44XX_CONTROL_FUSE_IVA_OPP100, 0xf9, 0x16),
  	VOLT_DATA_DEFINE(OMAP4430_VDD_IVA_OPPTURBO_UV, OMAP44XX_CONTROL_FUSE_IVA_OPPTURBO, 0xfa, 0x23),
  	VOLT_DATA_DEFINE(0, 0, 0, 0),
  };
d9a2012d3   Shweta Gulati   OMAP4: Update Vol...
54
55
  #define OMAP4430_VDD_CORE_OPP50_UV		1025000
  #define OMAP4430_VDD_CORE_OPP100_UV		1200000
c0718df4d   Paul Walmsley   OMAP2+: voltage: ...
56
57
58
59
60
61
  
  struct omap_volt_data omap44xx_vdd_core_volt_data[] = {
  	VOLT_DATA_DEFINE(OMAP4430_VDD_CORE_OPP50_UV, OMAP44XX_CONTROL_FUSE_CORE_OPP50, 0xf4, 0x0c),
  	VOLT_DATA_DEFINE(OMAP4430_VDD_CORE_OPP100_UV, OMAP44XX_CONTROL_FUSE_CORE_OPP100, 0xf9, 0x16),
  	VOLT_DATA_DEFINE(0, 0, 0, 0),
  };
f5a6422d4   Nishanth Menon   omap4: opp: add O...
62
63
  static struct omap_opp_def __initdata omap44xx_opp_def_list[] = {
  	/* MPU OPP1 - OPP50 */
15f13e23e   Vishwanath BS   OMAP3+: OPP: Repl...
64
  	OPP_INITIALIZER("mpu", true, 300000000, OMAP4430_VDD_MPU_OPP50_UV),
f5a6422d4   Nishanth Menon   omap4: opp: add O...
65
  	/* MPU OPP2 - OPP100 */
15f13e23e   Vishwanath BS   OMAP3+: OPP: Repl...
66
  	OPP_INITIALIZER("mpu", true, 600000000, OMAP4430_VDD_MPU_OPP100_UV),
f5a6422d4   Nishanth Menon   omap4: opp: add O...
67
  	/* MPU OPP3 - OPP-Turbo */
273032f78   Shweta Gulati   OMAP4: Enable 800...
68
  	OPP_INITIALIZER("mpu", true, 800000000, OMAP4430_VDD_MPU_OPPTURBO_UV),
f5a6422d4   Nishanth Menon   omap4: opp: add O...
69
  	/* MPU OPP4 - OPP-SB */
273032f78   Shweta Gulati   OMAP4: Enable 800...
70
  	OPP_INITIALIZER("mpu", true, 1008000000, OMAP4430_VDD_MPU_OPPNITRO_UV),
f5a6422d4   Nishanth Menon   omap4: opp: add O...
71
  	/* L3 OPP1 - OPP50 */
15f13e23e   Vishwanath BS   OMAP3+: OPP: Repl...
72
  	OPP_INITIALIZER("l3_main_1", true, 100000000, OMAP4430_VDD_CORE_OPP50_UV),
f5a6422d4   Nishanth Menon   omap4: opp: add O...
73
  	/* L3 OPP2 - OPP100, OPP-Turbo, OPP-SB */
15f13e23e   Vishwanath BS   OMAP3+: OPP: Repl...
74
  	OPP_INITIALIZER("l3_main_1", true, 200000000, OMAP4430_VDD_CORE_OPP100_UV),
a271e58cf   Shweta Gulati   OMAP4: Add IVA OP...
75
76
77
78
79
80
81
  	/* IVA OPP1 - OPP50 */
  	OPP_INITIALIZER("iva", true, 133000000, OMAP4430_VDD_IVA_OPP50_UV),
  	/* IVA OPP2 - OPP100 */
  	OPP_INITIALIZER("iva", true, 266100000, OMAP4430_VDD_IVA_OPP100_UV),
  	/* IVA OPP3 - OPP-Turbo */
  	OPP_INITIALIZER("iva", false, 332000000, OMAP4430_VDD_IVA_OPPTURBO_UV),
  	/* TODO: add DSP, aess, fdif, gpu */
f5a6422d4   Nishanth Menon   omap4: opp: add O...
82
83
84
85
86
  };
  
  /**
   * omap4_opp_init() - initialize omap4 opp table
   */
eb05ead90   Menon, Nishanth   OMAP3|4: OPP: mak...
87
  int __init omap4_opp_init(void)
f5a6422d4   Nishanth Menon   omap4: opp: add O...
88
89
90
91
92
93
94
95
96
97
98
99
  {
  	int r = -ENODEV;
  
  	if (!cpu_is_omap44xx())
  		return r;
  
  	r = omap_init_opp_table(omap44xx_opp_def_list,
  			ARRAY_SIZE(omap44xx_opp_def_list));
  
  	return r;
  }
  device_initcall(omap4_opp_init);