diff options
author | Vishwanath BS <vishwanath.bs@ti.com> | 2011-07-24 15:57:45 -0400 |
---|---|---|
committer | Paolo Pisati <paolo.pisati@canonical.com> | 2012-08-17 04:18:03 -0400 |
commit | c4210b69286bea72b1c4e973d32a285b69f13ca8 (patch) | |
tree | 036dd4a203b66ff4f9fb62b1b6291b37b6ff6445 /arch/arm | |
parent | 4e8d07b62e70b352f38a7d083cfdc5547f98a9c6 (diff) |
OMAP4: OPP: add OMAP4460 definitions
Add OMAP4460 OPP definitions for voltage and frequencies based on
OMAP4460 ES1.0 DM Operating Condition Addendum Version 0.1
The following exceptions are present:
* Smartreflex support is still on experimental mode: the gains and min
limits are currently pending characterization data. The values are picked
up currently from TI's Kernel 2.6.35:
git://git.omapzoom.org/kernel/omap.git p-android-omap-2.6.35-4460-wip dcfa2a4
* Efuse offset for core OPP100-OV setting is not clear in documentation and
seems to be not supported in K35
* IVA OPPs beyond OPP100 are disabled due to the delta between max OMAP4460
current requirements and Phoenix Max supply on VCORE2 in the default
configuration - boards which have supply which can support this should
explicitly call opp_enable and enable the same.
* MPU OPPs > OPPTURBO can easily be detected using a efuse burnt - currently
disabled pending clock cleanups.
[nm@ti.com: cleanups and updates from Datamanual and k35 source]
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Vishwanath BS <vishwanath.bs@ti.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-omap2/control.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap_opp_data.h | 9 | ||||
-rw-r--r-- | arch/arm/mach-omap2/opp4xxx_data.c | 96 | ||||
-rw-r--r-- | arch/arm/mach-omap2/voltagedomains44xx_data.c | 14 |
4 files changed, 105 insertions, 15 deletions
diff --git a/arch/arm/mach-omap2/control.h b/arch/arm/mach-omap2/control.h index a016c8b59e0..a41b9a7dd51 100644 --- a/arch/arm/mach-omap2/control.h +++ b/arch/arm/mach-omap2/control.h | |||
@@ -195,6 +195,7 @@ | |||
195 | #define OMAP44XX_CONTROL_FUSE_MPU_OPPNITRO 0x249 | 195 | #define OMAP44XX_CONTROL_FUSE_MPU_OPPNITRO 0x249 |
196 | #define OMAP44XX_CONTROL_FUSE_CORE_OPP50 0x254 | 196 | #define OMAP44XX_CONTROL_FUSE_CORE_OPP50 0x254 |
197 | #define OMAP44XX_CONTROL_FUSE_CORE_OPP100 0x257 | 197 | #define OMAP44XX_CONTROL_FUSE_CORE_OPP100 0x257 |
198 | #define OMAP44XX_CONTROL_FUSE_CORE_OPP100OV 0x25A | ||
198 | 199 | ||
199 | /* AM35XX only CONTROL_GENERAL register offsets */ | 200 | /* AM35XX only CONTROL_GENERAL register offsets */ |
200 | #define AM35XX_CONTROL_MSUSPENDMUX_6 (OMAP2_CONTROL_GENERAL + 0x0038) | 201 | #define AM35XX_CONTROL_MSUSPENDMUX_6 (OMAP2_CONTROL_GENERAL + 0x0038) |
diff --git a/arch/arm/mach-omap2/omap_opp_data.h b/arch/arm/mach-omap2/omap_opp_data.h index c784c12f98a..18a750e296a 100644 --- a/arch/arm/mach-omap2/omap_opp_data.h +++ b/arch/arm/mach-omap2/omap_opp_data.h | |||
@@ -89,8 +89,11 @@ extern struct omap_volt_data omap34xx_vddcore_volt_data[]; | |||
89 | extern struct omap_volt_data omap36xx_vddmpu_volt_data[]; | 89 | extern struct omap_volt_data omap36xx_vddmpu_volt_data[]; |
90 | extern struct omap_volt_data omap36xx_vddcore_volt_data[]; | 90 | extern struct omap_volt_data omap36xx_vddcore_volt_data[]; |
91 | 91 | ||
92 | extern struct omap_volt_data omap44xx_vdd_mpu_volt_data[]; | 92 | extern struct omap_volt_data omap443x_vdd_mpu_volt_data[]; |
93 | extern struct omap_volt_data omap44xx_vdd_iva_volt_data[]; | 93 | extern struct omap_volt_data omap443x_vdd_iva_volt_data[]; |
94 | extern struct omap_volt_data omap44xx_vdd_core_volt_data[]; | 94 | extern struct omap_volt_data omap443x_vdd_core_volt_data[]; |
95 | extern struct omap_volt_data omap446x_vdd_mpu_volt_data[]; | ||
96 | extern struct omap_volt_data omap446x_vdd_iva_volt_data[]; | ||
97 | extern struct omap_volt_data omap446x_vdd_core_volt_data[]; | ||
95 | 98 | ||
96 | #endif /* __ARCH_ARM_MACH_OMAP2_OMAP_OPP_DATA_H */ | 99 | #endif /* __ARCH_ARM_MACH_OMAP2_OMAP_OPP_DATA_H */ |
diff --git a/arch/arm/mach-omap2/opp4xxx_data.c b/arch/arm/mach-omap2/opp4xxx_data.c index 2293ba27101..8c285e4bfef 100644 --- a/arch/arm/mach-omap2/opp4xxx_data.c +++ b/arch/arm/mach-omap2/opp4xxx_data.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * OMAP4 OPP table definitions. | 2 | * OMAP4 OPP table definitions. |
3 | * | 3 | * |
4 | * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/ | 4 | * Copyright (C) 2010-2011 Texas Instruments Incorporated - http://www.ti.com/ |
5 | * Nishanth Menon | 5 | * Nishanth Menon |
6 | * Kevin Hilman | 6 | * Kevin Hilman |
7 | * Thara Gopinath | 7 | * Thara Gopinath |
@@ -36,7 +36,7 @@ | |||
36 | #define OMAP4430_VDD_MPU_OPPTURBO_UV 1313000 | 36 | #define OMAP4430_VDD_MPU_OPPTURBO_UV 1313000 |
37 | #define OMAP4430_VDD_MPU_OPPNITRO_UV 1375000 | 37 | #define OMAP4430_VDD_MPU_OPPNITRO_UV 1375000 |
38 | 38 | ||
39 | struct omap_volt_data omap44xx_vdd_mpu_volt_data[] = { | 39 | struct omap_volt_data omap443x_vdd_mpu_volt_data[] = { |
40 | VOLT_DATA_DEFINE(OMAP4430_VDD_MPU_OPP50_UV, OMAP44XX_CONTROL_FUSE_MPU_OPP50, 0xf4, 0x0c), | 40 | VOLT_DATA_DEFINE(OMAP4430_VDD_MPU_OPP50_UV, OMAP44XX_CONTROL_FUSE_MPU_OPP50, 0xf4, 0x0c), |
41 | VOLT_DATA_DEFINE(OMAP4430_VDD_MPU_OPP100_UV, OMAP44XX_CONTROL_FUSE_MPU_OPP100, 0xf9, 0x16), | 41 | VOLT_DATA_DEFINE(OMAP4430_VDD_MPU_OPP100_UV, OMAP44XX_CONTROL_FUSE_MPU_OPP100, 0xf9, 0x16), |
42 | VOLT_DATA_DEFINE(OMAP4430_VDD_MPU_OPPTURBO_UV, OMAP44XX_CONTROL_FUSE_MPU_OPPTURBO, 0xfa, 0x23), | 42 | VOLT_DATA_DEFINE(OMAP4430_VDD_MPU_OPPTURBO_UV, OMAP44XX_CONTROL_FUSE_MPU_OPPTURBO, 0xfa, 0x23), |
@@ -48,7 +48,7 @@ struct omap_volt_data omap44xx_vdd_mpu_volt_data[] = { | |||
48 | #define OMAP4430_VDD_IVA_OPP100_UV 1188000 | 48 | #define OMAP4430_VDD_IVA_OPP100_UV 1188000 |
49 | #define OMAP4430_VDD_IVA_OPPTURBO_UV 1300000 | 49 | #define OMAP4430_VDD_IVA_OPPTURBO_UV 1300000 |
50 | 50 | ||
51 | struct omap_volt_data omap44xx_vdd_iva_volt_data[] = { | 51 | struct omap_volt_data omap443x_vdd_iva_volt_data[] = { |
52 | VOLT_DATA_DEFINE(OMAP4430_VDD_IVA_OPP50_UV, OMAP44XX_CONTROL_FUSE_IVA_OPP50, 0xf4, 0x0c), | 52 | VOLT_DATA_DEFINE(OMAP4430_VDD_IVA_OPP50_UV, OMAP44XX_CONTROL_FUSE_IVA_OPP50, 0xf4, 0x0c), |
53 | VOLT_DATA_DEFINE(OMAP4430_VDD_IVA_OPP100_UV, OMAP44XX_CONTROL_FUSE_IVA_OPP100, 0xf9, 0x16), | 53 | VOLT_DATA_DEFINE(OMAP4430_VDD_IVA_OPP100_UV, OMAP44XX_CONTROL_FUSE_IVA_OPP100, 0xf9, 0x16), |
54 | VOLT_DATA_DEFINE(OMAP4430_VDD_IVA_OPPTURBO_UV, OMAP44XX_CONTROL_FUSE_IVA_OPPTURBO, 0xfa, 0x23), | 54 | VOLT_DATA_DEFINE(OMAP4430_VDD_IVA_OPPTURBO_UV, OMAP44XX_CONTROL_FUSE_IVA_OPPTURBO, 0xfa, 0x23), |
@@ -58,14 +58,14 @@ struct omap_volt_data omap44xx_vdd_iva_volt_data[] = { | |||
58 | #define OMAP4430_VDD_CORE_OPP50_UV 1025000 | 58 | #define OMAP4430_VDD_CORE_OPP50_UV 1025000 |
59 | #define OMAP4430_VDD_CORE_OPP100_UV 1200000 | 59 | #define OMAP4430_VDD_CORE_OPP100_UV 1200000 |
60 | 60 | ||
61 | struct omap_volt_data omap44xx_vdd_core_volt_data[] = { | 61 | struct omap_volt_data omap443x_vdd_core_volt_data[] = { |
62 | VOLT_DATA_DEFINE(OMAP4430_VDD_CORE_OPP50_UV, OMAP44XX_CONTROL_FUSE_CORE_OPP50, 0xf4, 0x0c), | 62 | VOLT_DATA_DEFINE(OMAP4430_VDD_CORE_OPP50_UV, OMAP44XX_CONTROL_FUSE_CORE_OPP50, 0xf4, 0x0c), |
63 | VOLT_DATA_DEFINE(OMAP4430_VDD_CORE_OPP100_UV, OMAP44XX_CONTROL_FUSE_CORE_OPP100, 0xf9, 0x16), | 63 | VOLT_DATA_DEFINE(OMAP4430_VDD_CORE_OPP100_UV, OMAP44XX_CONTROL_FUSE_CORE_OPP100, 0xf9, 0x16), |
64 | VOLT_DATA_DEFINE(0, 0, 0, 0), | 64 | VOLT_DATA_DEFINE(0, 0, 0, 0), |
65 | }; | 65 | }; |
66 | 66 | ||
67 | 67 | ||
68 | static struct omap_opp_def __initdata omap44xx_opp_def_list[] = { | 68 | static struct omap_opp_def __initdata omap443x_opp_def_list[] = { |
69 | /* MPU OPP1 - OPP50 */ | 69 | /* MPU OPP1 - OPP50 */ |
70 | OPP_INITIALIZER("mpu", true, 300000000, OMAP4430_VDD_MPU_OPP50_UV), | 70 | OPP_INITIALIZER("mpu", true, 300000000, OMAP4430_VDD_MPU_OPP50_UV), |
71 | /* MPU OPP2 - OPP100 */ | 71 | /* MPU OPP2 - OPP100 */ |
@@ -87,6 +87,82 @@ static struct omap_opp_def __initdata omap44xx_opp_def_list[] = { | |||
87 | /* TODO: add DSP, aess, fdif, gpu */ | 87 | /* TODO: add DSP, aess, fdif, gpu */ |
88 | }; | 88 | }; |
89 | 89 | ||
90 | #define OMAP4460_VDD_MPU_OPP50_UV 1025000 | ||
91 | #define OMAP4460_VDD_MPU_OPP100_UV 1200000 | ||
92 | #define OMAP4460_VDD_MPU_OPPTURBO_UV 1313000 | ||
93 | #define OMAP4460_VDD_MPU_OPPNITRO_UV 1375000 | ||
94 | |||
95 | struct omap_volt_data omap446x_vdd_mpu_volt_data[] = { | ||
96 | VOLT_DATA_DEFINE(OMAP4460_VDD_MPU_OPP50_UV, OMAP44XX_CONTROL_FUSE_MPU_OPP50, 0xf4, 0x0c), | ||
97 | VOLT_DATA_DEFINE(OMAP4460_VDD_MPU_OPP100_UV, OMAP44XX_CONTROL_FUSE_MPU_OPP100, 0xf9, 0x16), | ||
98 | VOLT_DATA_DEFINE(OMAP4460_VDD_MPU_OPPTURBO_UV, OMAP44XX_CONTROL_FUSE_MPU_OPPTURBO, 0xfa, 0x23), | ||
99 | VOLT_DATA_DEFINE(OMAP4460_VDD_MPU_OPPNITRO_UV, OMAP44XX_CONTROL_FUSE_MPU_OPPNITRO, 0xfa, 0x27), | ||
100 | VOLT_DATA_DEFINE(0, 0, 0, 0), | ||
101 | }; | ||
102 | |||
103 | #define OMAP4460_VDD_IVA_OPP50_UV 1025000 | ||
104 | #define OMAP4460_VDD_IVA_OPP100_UV 1200000 | ||
105 | #define OMAP4460_VDD_IVA_OPPTURBO_UV 1313000 | ||
106 | #define OMAP4460_VDD_IVA_OPPNITRO_UV 1375000 | ||
107 | |||
108 | struct omap_volt_data omap446x_vdd_iva_volt_data[] = { | ||
109 | VOLT_DATA_DEFINE(OMAP4460_VDD_IVA_OPP50_UV, OMAP44XX_CONTROL_FUSE_IVA_OPP50, 0xf4, 0x0c), | ||
110 | VOLT_DATA_DEFINE(OMAP4460_VDD_IVA_OPP100_UV, OMAP44XX_CONTROL_FUSE_IVA_OPP100, 0xf9, 0x16), | ||
111 | VOLT_DATA_DEFINE(OMAP4460_VDD_IVA_OPPTURBO_UV, OMAP44XX_CONTROL_FUSE_IVA_OPPTURBO, 0xfa, 0x23), | ||
112 | VOLT_DATA_DEFINE(OMAP4460_VDD_IVA_OPPNITRO_UV, OMAP44XX_CONTROL_FUSE_IVA_OPPNITRO, 0xfa, 0x23), | ||
113 | VOLT_DATA_DEFINE(0, 0, 0, 0), | ||
114 | }; | ||
115 | |||
116 | #define OMAP4460_VDD_CORE_OPP50_UV 1025000 | ||
117 | #define OMAP4460_VDD_CORE_OPP100_UV 1200000 | ||
118 | #define OMAP4460_VDD_CORE_OPP100_OV_UV 1250000 | ||
119 | |||
120 | struct omap_volt_data omap446x_vdd_core_volt_data[] = { | ||
121 | VOLT_DATA_DEFINE(OMAP4460_VDD_CORE_OPP50_UV, OMAP44XX_CONTROL_FUSE_CORE_OPP50, 0xf4, 0x0c), | ||
122 | VOLT_DATA_DEFINE(OMAP4460_VDD_CORE_OPP100_UV, OMAP44XX_CONTROL_FUSE_CORE_OPP100, 0xf9, 0x16), | ||
123 | VOLT_DATA_DEFINE(OMAP4460_VDD_CORE_OPP100_OV_UV, OMAP44XX_CONTROL_FUSE_CORE_OPP100OV, 0xf9, 0x16), | ||
124 | VOLT_DATA_DEFINE(0, 0, 0, 0), | ||
125 | }; | ||
126 | |||
127 | static struct omap_opp_def __initdata omap446x_opp_def_list[] = { | ||
128 | /* MPU OPP1 - OPP50 */ | ||
129 | OPP_INITIALIZER("mpu", true, 350000000, OMAP4460_VDD_MPU_OPP50_UV), | ||
130 | /* MPU OPP2 - OPP100 */ | ||
131 | OPP_INITIALIZER("mpu", true, 700000000, OMAP4460_VDD_MPU_OPP100_UV), | ||
132 | /* MPU OPP3 - OPP-Turbo */ | ||
133 | OPP_INITIALIZER("mpu", true, 920000000, OMAP4460_VDD_MPU_OPPTURBO_UV), | ||
134 | /* | ||
135 | * MPU OPP4 - OPP-Nitro + Disabled as the reference schematics | ||
136 | * recommends TPS623631 - confirm and enable the opp in board file | ||
137 | * XXX: May be we should enable these based on mpu capability and | ||
138 | * Exception board files disable it... | ||
139 | */ | ||
140 | OPP_INITIALIZER("mpu", false, 1200000000, OMAP4460_VDD_MPU_OPPNITRO_UV), | ||
141 | /* MPU OPP4 - OPP-Nitro SpeedBin */ | ||
142 | OPP_INITIALIZER("mpu", false, 1500000000, OMAP4460_VDD_MPU_OPPNITRO_UV), | ||
143 | /* L3 OPP1 - OPP50 */ | ||
144 | OPP_INITIALIZER("l3_main_1", true, 100000000, OMAP4460_VDD_CORE_OPP50_UV), | ||
145 | /* L3 OPP2 - OPP100 */ | ||
146 | OPP_INITIALIZER("l3_main_1", true, 200000000, OMAP4460_VDD_CORE_OPP100_UV), | ||
147 | /* IVA OPP1 - OPP50 */ | ||
148 | OPP_INITIALIZER("iva", true, 133000000, OMAP4460_VDD_IVA_OPP50_UV), | ||
149 | /* IVA OPP2 - OPP100 */ | ||
150 | OPP_INITIALIZER("iva", true, 266100000, OMAP4460_VDD_IVA_OPP100_UV), | ||
151 | /* | ||
152 | * IVA OPP3 - OPP-Turbo + Disabled as the reference schematics | ||
153 | * recommends Phoenix VCORE2 which can supply only 600mA - so the ones | ||
154 | * above this OPP frequency, even though OMAP is capable, should be | ||
155 | * enabled by board file which is sure of the chip power capability | ||
156 | */ | ||
157 | OPP_INITIALIZER("iva", false, 332000000, OMAP4460_VDD_IVA_OPPTURBO_UV), | ||
158 | /* IVA OPP4 - OPP-Nitro */ | ||
159 | OPP_INITIALIZER("iva", false, 430000000, OMAP4460_VDD_IVA_OPPNITRO_UV), | ||
160 | /* IVA OPP5 - OPP-Nitro SpeedBin*/ | ||
161 | OPP_INITIALIZER("iva", false, 500000000, OMAP4460_VDD_IVA_OPPNITRO_UV), | ||
162 | |||
163 | /* TODO: add DSP, aess, fdif, gpu */ | ||
164 | }; | ||
165 | |||
90 | /** | 166 | /** |
91 | * omap4_opp_init() - initialize omap4 opp table | 167 | * omap4_opp_init() - initialize omap4 opp table |
92 | */ | 168 | */ |
@@ -96,10 +172,12 @@ int __init omap4_opp_init(void) | |||
96 | 172 | ||
97 | if (!cpu_is_omap44xx()) | 173 | if (!cpu_is_omap44xx()) |
98 | return r; | 174 | return r; |
99 | 175 | if (cpu_is_omap443x()) | |
100 | r = omap_init_opp_table(omap44xx_opp_def_list, | 176 | r = omap_init_opp_table(omap443x_opp_def_list, |
101 | ARRAY_SIZE(omap44xx_opp_def_list)); | 177 | ARRAY_SIZE(omap443x_opp_def_list)); |
102 | 178 | else if (cpu_is_omap446x()) | |
179 | r = omap_init_opp_table(omap446x_opp_def_list, | ||
180 | ARRAY_SIZE(omap446x_opp_def_list)); | ||
103 | return r; | 181 | return r; |
104 | } | 182 | } |
105 | device_initcall(omap4_opp_init); | 183 | device_initcall(omap4_opp_init); |
diff --git a/arch/arm/mach-omap2/voltagedomains44xx_data.c b/arch/arm/mach-omap2/voltagedomains44xx_data.c index cb64996de0e..f516cfe81d0 100644 --- a/arch/arm/mach-omap2/voltagedomains44xx_data.c +++ b/arch/arm/mach-omap2/voltagedomains44xx_data.c | |||
@@ -91,9 +91,17 @@ static int __init omap44xx_voltage_early_init(void) | |||
91 | * XXX Will depend on the process, validation, and binning | 91 | * XXX Will depend on the process, validation, and binning |
92 | * for the currently-running IC | 92 | * for the currently-running IC |
93 | */ | 93 | */ |
94 | omap4_vdd_mpu_info.volt_data = omap44xx_vdd_mpu_volt_data; | 94 | if (cpu_is_omap443x()) { |
95 | omap4_vdd_iva_info.volt_data = omap44xx_vdd_iva_volt_data; | 95 | omap4_vdd_mpu_info.volt_data = omap443x_vdd_mpu_volt_data; |
96 | omap4_vdd_core_info.volt_data = omap44xx_vdd_core_volt_data; | 96 | omap4_vdd_iva_info.volt_data = omap443x_vdd_iva_volt_data; |
97 | omap4_vdd_core_info.volt_data = omap443x_vdd_core_volt_data; | ||
98 | } else if (cpu_is_omap446x()) { | ||
99 | omap4_vdd_mpu_info.volt_data = omap446x_vdd_mpu_volt_data; | ||
100 | omap4_vdd_iva_info.volt_data = omap446x_vdd_iva_volt_data; | ||
101 | omap4_vdd_core_info.volt_data = omap446x_vdd_core_volt_data; | ||
102 | } else { | ||
103 | return -ENODATA; | ||
104 | } | ||
97 | 105 | ||
98 | return omap_voltage_early_init(prm_mod, prm_irqst_ocp_mod, | 106 | return omap_voltage_early_init(prm_mod, prm_irqst_ocp_mod, |
99 | omap4_vdd_info, | 107 | omap4_vdd_info, |