sandbox: Switch over to generic board
[platform/kernel/u-boot.git] / include / dialog_pmic.h
1 /*
2  * da9053 register declarations.
3  *
4  * Copyright(c) 2009 Dialog Semiconductor Ltd.
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19  *
20  */
21
22 #ifndef __DIALOG_PMIC_H__
23 #define __DIALOG_PMIC_H__
24
25 enum {
26         DA9053_PAGECON0_REG = 0,
27         DA9053_STATUSA_REG,
28         DA9053_STATUSB_REG,
29         DA9053_STATUSC_REG,
30         DA9053_STATUSD_REG,
31         DA9053_EVENTA_REG,
32         DA9053_EVENTB_REG,
33         DA9053_EVENTC_REG,
34         DA9053_EVENTD_REG,
35         DA9053_FAULTLOG_REG,
36         DA9053_IRQMASKA_REG,
37         DA9053_IRQMASKB_REG,
38         DA9053_IRQMASKC_REG,
39         DA9053_IRQMASKD_REG,
40         DA9053_CONTROLA_REG,
41         DA9053_CONTROLB_REG,
42         DA9053_CONTROLC_REG,
43         DA9053_CONTROLD_REG,
44         DA9053_PDDIS_REG,
45         DA9053_INTERFACE_REG,
46         DA9053_RESET_REG,
47         DA9053_GPIO0001_REG,
48         DA9053_GPIO0203_REG,
49         DA9053_GPIO0405_REG,
50         DA9053_GPIO0607_REG,
51         DA9053_GPIO0809_REG,
52         DA9053_GPIO1011_REG,
53         DA9053_GPIO1213_REG,
54         DA9053_GPIO1415_REG,
55         DA9053_ID01_REG,
56         DA9053_ID23_REG,
57         DA9053_ID45_REG,
58         DA9053_ID67_REG,
59         DA9053_ID89_REG,
60         DA9053_ID1011_REG,
61         DA9053_ID1213_REG,
62         DA9053_ID1415_REG,
63         DA9053_ID1617_REG,
64         DA9053_ID1819_REG,
65         DA9053_ID2021_REG,
66         DA9053_SEQSTATUS_REG,
67         DA9053_SEQA_REG,
68         DA9053_SEQB_REG,
69         DA9053_SEQTIMER_REG,
70         DA9053_BUCKA_REG,
71         DA9053_BUCKB_REG,
72         DA9053_BUCKCORE_REG,
73         DA9053_BUCKPRO_REG,
74         DA9053_BUCKMEM_REG,
75         DA9053_BUCKPERI_REG,
76         DA9053_LDO1_REG,
77         DA9053_LDO2_REG,
78         DA9053_LDO3_REG,
79         DA9053_LDO4_REG,
80         DA9053_LDO5_REG,
81         DA9053_LDO6_REG,
82         DA9053_LDO7_REG,
83         DA9053_LDO8_REG,
84         DA9053_LDO9_REG,
85         DA9053_LDO10_REG,
86         DA9053_SUPPLY_REG,
87         DA9053_PULLDOWN_REG,
88         DA9053_CHGBUCK_REG,
89         DA9053_WAITCONT_REG,
90         DA9053_ISET_REG,
91         DA9053_BATCHG_REG,
92         DA9053_CHGCONT_REG,
93         DA9053_INPUTCONT_REG,
94         DA9053_CHGTIME_REG,
95         DA9053_BBATCONT_REG,
96         DA9053_BOOST_REG,
97         DA9053_LEDCONT_REG,
98         DA9053_LEDMIN123_REG,
99         DA9053_LED1CONF_REG,
100         DA9053_LED2CONF_REG,
101         DA9053_LED3CONF_REG,
102         DA9053_LED1CONT_REG,
103         DA9053_LED2CONT_REG,
104         DA9053_LED3CONT_REG,
105         DA9053_LED4CONT_REG,
106         DA9053_LED5CONT_REG,
107         DA9053_ADCMAN_REG,
108         DA9053_ADCCONT_REG,
109         DA9053_ADCRESL_REG,
110         DA9053_ADCRESH_REG,
111         DA9053_VDDRES_REG,
112         DA9053_VDDMON_REG,
113         DA9053_ICHGAV_REG,
114         DA9053_ICHGTHD_REG,
115         DA9053_ICHGEND_REG,
116         DA9053_TBATRES_REG,
117         DA9053_TBATHIGHP_REG,
118         DA9053_TBATHIGHIN_REG,
119         DA9053_TBATLOW_REG,
120         DA9053_TOFFSET_REG,
121         DA9053_ADCIN4RES_REG,
122         DA9053_AUTO4HIGH_REG,
123         DA9053_AUTO4LOW_REG,
124         DA9053_ADCIN5RES_REG,
125         DA9053_AUTO5HIGH_REG,
126         DA9053_AUTO5LOW_REG,
127         DA9053_ADCIN6RES_REG,
128         DA9053_AUTO6HIGH_REG,
129         DA9053_AUTO6LOW_REG,
130         DA9053_TJUNCRES_REG,
131         DA9053_TSICONTA_REG,
132         DA9053_TSICONTB_REG,
133         DA9053_TSIXMSB_REG,
134         DA9053_TSIYMSB_REG,
135         DA9053_TSILSB_REG,
136         DA9053_TSIZMSB_REG,
137         DA9053_COUNTS_REG,
138         DA9053_COUNTMI_REG,
139         DA9053_COUNTH_REG,
140         DA9053_COUNTD_REG,
141         DA9053_COUNTMO_REG,
142         DA9053_COUNTY_REG,
143         DA9053_ALARMMI_REG,
144         DA9053_ALARMH_REG,
145         DA9053_ALARMD_REG,
146         DA9053_ALARMMO_REG,
147         DA9053_ALARMY_REG,
148         DA9053_SECONDA_REG,
149         DA9053_SECONDB_REG,
150         DA9053_SECONDC_REG,
151         DA9053_SECONDD_REG,
152         DA9053_PAGECON128_REG,
153         DA9053_CHIPID_REG,
154         DA9053_CONFIGID_REG,
155         DA9053_OTPCONT_REG,
156         DA9053_OSCTRIM_REG,
157         DA9053_GPID0_REG,
158         DA9053_GPID1_REG,
159         DA9053_GPID2_REG,
160         DA9053_GPID3_REG,
161         DA9053_GPID4_REG,
162         DA9053_GPID5_REG,
163         DA9053_GPID6_REG,
164         DA9053_GPID7_REG,
165         DA9053_GPID8_REG,
166         DA9053_GPID9_REG,
167         DIALOG_NUM_OF_REGS,
168 };
169
170 #define DA_BUCKCORE_VBCORE_1_250V               0x1E
171
172 /* BUCKCORE REGISTER */
173 #define DA9052_BUCKCORE_BCORECONF               (1 << 7)
174 #define DA9052_BUCKCORE_BCOREEN                 (1 << 6)
175 #define DA9052_BUCKCORE_VBCORE                  63
176
177 /* SUPPLY REGISTER */
178 #define DA9052_SUPPLY_VLOCK                     (1 << 7)
179 #define DA9052_SUPPLY_VMEMSWEN                  (1 << 6)
180 #define DA9052_SUPPLY_VPERISWEN                 (1 << 5)
181 #define DA9052_SUPPLY_VLDO3GO                   (1 << 4)
182 #define DA9052_SUPPLY_VLDO2GO                   (1 << 3)
183 #define DA9052_SUPPLY_VBMEMGO                   (1 << 2)
184 #define DA9052_SUPPLY_VBPROGO                   (1 << 1)
185 #define DA9052_SUPPLY_VBCOREGO                  (1 << 0)
186
187 #endif /* __DIALOG_PMIC_H__ */