Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 119 lines (94 sloc) 3.487 kb
4bc042b initial public release v1.50
Patrick Titiano authored
1 /*
2 *
3 * @Component OMAPCONF
4 * @Filename voltdm44xx.h
5 * @Description OMAP4 Voltage Domain Definitions & APIs
6 * @Author Patrick Titiano (p-titiano@ti.com)
7 * @Date 2011
8 * @Copyright Texas Instruments Incorporated
9 *
10 *
11 * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
12 *
13 *
14 * Redistribution and use in source and binary forms, with or without
15 * modification, are permitted provided that the following conditions
16 * are met:
17 *
18 * Redistributions of source code must retain the above copyright
19 * notice, this list of conditions and the following disclaimer.
20 *
21 * Redistributions in binary form must reproduce the above copyright
22 * notice, this list of conditions and the following disclaimer in the
23 * documentation and/or other materials provided with the
24 * distribution.
25 *
26 * Neither the name of Texas Instruments Incorporated nor the names of
27 * its contributors may be used to endorse or promote products derived
28 * from this software without specific prior written permission.
29 *
30 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
31 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
32 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
33 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
34 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
35 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
36 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
37 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
38 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
39 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
40 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
41 *
42 */
43
44
45 #ifndef __VOLTDM44XX_H__
46 #define __VOLTDM44XX_H__
47
48
49 #define VOLTDM44XX_MAX_NAME_LENGTH 12
50 #define OPP44XX_MAX_NAME_LENGTH 16
51
52 typedef enum {
53 OMAP4_LDO_WKUP,
54 OMAP4_VDD_MPU,
55 OMAP4_VDD_IVA,
56 OMAP4_VDD_CORE,
57 OMAP4_VD_ID_MAX
58 } voltdm44xx_id;
59
60
61 typedef enum {
62 OMAP4_OPPDPLL_CASC,
63 OMAP4_OPP50,
64 OMAP4_OPP100,
65 OMAP4_OPP_TURBO,
66 OMAP4_OPP_NITRO,
67 OMAP4_OPP_NITRO_SB,
68 OPP44XX_ID_MAX
69 } opp44xx_id;
70
71 typedef enum {
72 OMAP447X_OPPDPLL_CASC,
73 OMAP447X_OPP50_LOW,
74 OMAP447X_OPP50_HIGH,
75 OMAP447X_OPP100_LOW,
76 OMAP447X_OPP119_LOW,
77 OMAP447X_OPP119_HIGH
78 } omap447X_opp_id;
79
80 typedef enum {
81 OMAP4_OFF_VOLTAGE = 0,
82 OMAP4_RETENTION_VOLTAGE = 8,
83 OMAP4_ON_LOW_POWER_VOLTAGE = 16,
84 OMAP4_ON_VOLTAGE = 24,
85 OMAP4_VOLTAGE_TYPE_MAX
86 } voltdm44xx_voltage_type;
87
88
89 char *voltdm44xx_get_name(voltdm44xx_id id,
90 char name[VOLTDM44XX_MAX_NAME_LENGTH]);
91
92
93 voltdm44xx_id voltdm44xx_s2id(char *s);
94
95
96 double voltdm44xx_retention_voltage_get(voltdm44xx_id id);
97 double voltdm44xx_nominal_voltage_get(voltdm44xx_id id, opp44xx_id opp);
98
99 const char *opp44xx_name_get(unsigned short opp_id, voltdm44xx_id vdd_id);
100
101 int voltdm44xx_get_opp(voltdm44xx_id id, opp44xx_id *opp);
102 int voltdm44xx_get_voltage(voltdm44xx_id id, double *volt);
103 int voltdm44xx_get_voltage_by_type(voltdm44xx_id id,
104 voltdm44xx_voltage_type type, double *volt);
105
106
107 unsigned int opp44xx_s2id(char *s);
108
109 int voltdm44xx_opp_show(void);
110 int voltdm44xx_vminsearch(voltdm44xx_id vdd_id, double v, unsigned int ms);
111
112
113 /* WARNING: DEPRECATED (use opp44xx_name_get() instead) */
114 int voltdm44xx_opp2string(char s[OPP44XX_MAX_NAME_LENGTH],
115 unsigned short opp, voltdm44xx_id vd_id);
116
117
118 #endif
Something went wrong with that request. Please try again.