[processor-sdk/pdk.git] / packages / ti / boot / sbl / tools / omapl13x_boot_utils / OMAP-L138 / Common / include / tps65070.h
1 /*
2 * TI Booting and Flashing Utilities
3 *
4 * Provides device differentiation for the project files. This file MUST be
5 * modified to match the device specifics.
6 *
7 * Copyright (C) 2009 Texas Instruments Incorporated - http://www.ti.com/
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation version 2.
12 *
13 * This program is distributed "as is" WITHOUT ANY WARRANTY of any
14 * kind, whether express or implied; without even the implied warranty
15 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 */
19 /* --------------------------------------------------------------------------
20 AUTHOR : Platform Support Group
21 --------------------------------------------------------------------------- */
22 //I2C functions
23 #include "i2c.h"
25 /******************************************************
26 * Global Typedef declarations *
27 ******************************************************/
29 //Structure to hold the TPS 65023 related details
30 typedef struct tps65070_pmic {
31 I2C_ConfigObj i2cConfig;
32 I2C_InfoHandle hI2cInfo;
33 }TPS_ConfigObj;
35 #define TPS_MAX_NUM_DEVICES 1u
36 #define TPS_REG_OFFSET_PPATH1 0x01u
37 #define TPS_REG_OFFSET_INT 0x02u
38 #define TPS_REG_OFFSET_CHGCONFIG0 0x03u
39 #define TPS_REG_OFFSET_CHGCONFIG1 0x04u
40 #define TPS_REG_OFFSET_CHGCONFIG2 0x05u
41 #define TPS_REG_OFFSET_CHGCONFIG3 0x06u
42 #define TPS_REG_OFFSET_ADCCONFIG 0x07u
43 #define TPS_REG_OFFSET_TSCMODE 0x08u
44 #define TPS_REG_OFFSET_ADRESULT_1 0x09u
45 #define TPS_REG_OFFSET_ADRESULT_2 0x0Au
46 #define TPS_REG_OFFSET_PGOOD 0x0Bu
47 #define TPS_REG_OFFSET_PGOODMASK 0x0Cu
48 #define TPS_REG_OFFSET_CONCTRL1 0x0Du
49 #define TPS_REG_OFFSET_CONCTRL2 0x0Eu
50 #define TPS_REG_OFFSET_CONCTRL3 0x0Fu
51 #define TPS_REG_OFFSET_DEFDCDC1 0x10u
52 #define TPS_REG_OFFSET_DEFDCDC2_LOW 0x11u
53 #define TPS_REG_OFFSET_DEFDCDC2_HIGH 0x12u
54 #define TPS_REG_OFFSET_DEFDCDC3_LOW 0x13u
55 #define TPS_REG_OFFSET_DEFDCDC3_HIGH 0x14u
56 #define TPS_REG_OFFSET_DEFSLEW 0x15u
57 #define TPS_REG_OFFSET_LDOCTRL1 0x16u
58 #define TPS_REG_OFFSET_DEFLDO2 0x17u
59 #define TPS_REG_OFFSET_WLED_CTRL1 0x18u
60 #define TPS_REG_OFFSET_WLED_CTRL2 0x19u
65 /* Valid voltage ranges for DEFCORE VDCDC1 */
66 #define TPS_VDCDC3_MILLIVOLT_725 0x00u
67 #define TPS_VDCDC3_MILLIVOLT_750 0x01u
68 #define TPS_VDCDC3_MILLIVOLT_775 0x02u
69 #define TPS_VDCDC3_MILLIVOLT_800 0x03u
70 #define TPS_VDCDC3_MILLIVOLT_825 0x04u
71 #define TPS_VDCDC3_MILLIVOLT_850 0x05u
72 #define TPS_VDCDC3_MILLIVOLT_875 0x06u
73 #define TPS_VDCDC3_MILLIVOLT_900 0x07u
74 #define TPS_VDCDC3_MILLIVOLT_925 0x08u
75 #define TPS_VDCDC3_MILLIVOLT_950 0x09u
76 #define TPS_VDCDC3_MILLIVOLT_975 0x0Au
77 #define TPS_VDCDC3_MILLIVOLT_1000 0x0Bu
78 #define TPS_VDCDC3_MILLIVOLT_1025 0x0Cu
79 #define TPS_VDCDC3_MILLIVOLT_1050 0x0Du
80 #define TPS_VDCDC3_MILLIVOLT_1075 0x0Eu
81 #define TPS_VDCDC3_MILLIVOLT_1100 0x0Fu
82 #define TPS_VDCDC3_MILLIVOLT_1125 0x10u
83 #define TPS_VDCDC3_MILLIVOLT_1150 0x11u
84 #define TPS_VDCDC3_MILLIVOLT_1175 0x12u
85 #define TPS_VDCDC3_MILLIVOLT_1200 0x13u
86 #define TPS_VDCDC3_MILLIVOLT_1225 0x14u
87 #define TPS_VDCDC3_MILLIVOLT_1250 0x15u
88 #define TPS_VDCDC3_MILLIVOLT_1275 0x16u
89 #define TPS_VDCDC3_MILLIVOLT_1300 0x17u
90 #define TPS_VDCDC3_MILLIVOLT_1325 0x18u
91 #define TPS_VDCDC3_MILLIVOLT_1350 0x19u
92 #define TPS_VDCDC3_MILLIVOLT_1375 0x1Au
93 #define TPS_VDCDC3_MILLIVOLT_1400 0x1Bu
94 #define TPS_VDCDC3_MILLIVOLT_1425 0x1Cu
95 #define TPS_VDCDC3_MILLIVOLT_1450 0x1Du
96 #define TPS_VDCDC3_MILLIVOLT_1475 0x1Eu
97 #define TPS_VDCDC3_MILLIVOLT_1500 0x1Fu
98 #define TPS_VDCDC3_MILLIVOLT_1550 0x20u
99 #define TPS_VDCDC3_MILLIVOLT_1600 0x21u
100 #define TPS_VDCDC3_MILLIVOLT_1650 0x22u
101 #define TPS_VDCDC3_MILLIVOLT_1700 0x23u
102 #define TPS_VDCDC3_MILLIVOLT_1750 0x24u
103 #define TPS_VDCDC3_MILLIVOLT_1800 0x25u
104 #define TPS_VDCDC3_MILLIVOLT_1850 0x26u
105 #define TPS_VDCDC3_MILLIVOLT_1900 0x27u
106 #define TPS_VDCDC3_MILLIVOLT_1950 0x28u
107 #define TPS_VDCDC3_MILLIVOLT_2000 0x29u
108 #define TPS_VDCDC3_MILLIVOLT_2050 0x2Au
109 #define TPS_VDCDC3_MILLIVOLT_2100 0x2Bu
110 #define TPS_VDCDC3_MILLIVOLT_2150 0x2Cu
111 #define TPS_VDCDC3_MILLIVOLT_2200 0x2Du
112 #define TPS_VDCDC3_MILLIVOLT_2250 0x2Eu
113 #define TPS_VDCDC3_MILLIVOLT_2300 0x2Fu
114 #define TPS_VDCDC3_MILLIVOLT_2350 0x30u
115 #define TPS_VDCDC3_MILLIVOLT_2400 0x31u
116 #define TPS_VDCDC3_MILLIVOLT_2450 0x32u
117 #define TPS_VDCDC3_MILLIVOLT_2500 0x33u
118 #define TPS_VDCDC3_MILLIVOLT_2550 0x34u
119 #define TPS_VDCDC3_MILLIVOLT_2600 0x35u
120 #define TPS_VDCDC3_MILLIVOLT_2650 0x36u
121 #define TPS_VDCDC3_MILLIVOLT_2700 0x37u
122 #define TPS_VDCDC3_MILLIVOLT_2750 0x38u
123 #define TPS_VDCDC3_MILLIVOLT_2800 0x39u
124 #define TPS_VDCDC3_MILLIVOLT_2850 0x3Au
125 #define TPS_VDCDC3_MILLIVOLT_2900 0x3Bu
126 #define TPS_VDCDC3_MILLIVOLT_3000 0x3Cu
127 #define TPS_VDCDC3_MILLIVOLT_3100 0x3Du
128 #define TPS_VDCDC3_MILLIVOLT_3200 0x3Eu
129 #define TPS_VDCDC3_MILLIVOLT_3300 0x3Fu
138 /***********************************************************
139 * Global Function Declarations *
140 ***********************************************************/
141 Uint32 TPS65070_open(Uint32 instance);
142 Uint8 TPS65070_reg_read(Uint32 instance, Uint8 regOffset, Uint8 *buf );
143 Uint32 TPS65070_reg_write(Uint32 instance, Uint8 regOffset, Uint8 regVal);
144 Uint32 TPS65070_set_DCDC3_voltage(Uint32 instance, Uint16 volt);