blob: ba8808096c02b913bab4b4173e71a4bdb766bc8d [file] [log] [blame]
Sundar Iyer4f724be2010-09-15 10:50:59 +01001/*
2 * Copyright (C) ST-Ericsson SA 2010
3 *
4 * License Terms: GNU General Public License v2
5 *
Bengt Jonssona1e516e2010-12-10 11:08:48 +01006 * Authors: Sundar Iyer <sundar.iyer@stericsson.com>
7 * Bengt Jonsson <bengt.g.jonsson@stericsson.com>
Sundar Iyer4f724be2010-09-15 10:50:59 +01008 *
9 * MOP500 board specific initialization for regulators
10 */
11#include <linux/kernel.h>
12#include <linux/regulator/machine.h>
Bengt Jonssona1e516e2010-12-10 11:08:48 +010013#include <linux/regulator/ab8500.h>
Linus Walleijd1de85a2010-12-02 17:10:14 +010014#include "board-mop500-regulators.h"
15
Lee Jones0b5ea1e2012-09-03 14:33:39 +010016static struct regulator_consumer_supply gpio_en_3v3_consumers[] = {
17 REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
18};
19
20struct regulator_init_data gpio_en_3v3_regulator = {
21 .constraints = {
22 .name = "EN-3V3",
23 .min_uV = 3300000,
24 .max_uV = 3300000,
25 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
26 },
27 .num_consumer_supplies = ARRAY_SIZE(gpio_en_3v3_consumers),
28 .consumer_supplies = gpio_en_3v3_consumers,
29};
30
Linus Walleijfe67dfc2011-03-07 11:48:15 +010031/*
32 * TPS61052 regulator
33 */
34static struct regulator_consumer_supply tps61052_vaudio_consumers[] = {
35 /*
36 * Boost converter supply to raise voltage on audio speaker, this
37 * is actually connected to three pins, VInVhfL (left amplifier)
38 * VInVhfR (right amplifier) and VIntDClassInt - all three must
39 * be connected to the same voltage.
40 */
41 REGULATOR_SUPPLY("vintdclassint", "ab8500-codec.0"),
42};
43
44struct regulator_init_data tps61052_regulator = {
45 .constraints = {
46 .name = "vaudio-hf",
47 .min_uV = 4500000,
48 .max_uV = 4500000,
49 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
50 },
51 .num_consumer_supplies = ARRAY_SIZE(tps61052_vaudio_consumers),
52 .consumer_supplies = tps61052_vaudio_consumers,
53};
54
Linus Walleijd1de85a2010-12-02 17:10:14 +010055static struct regulator_consumer_supply ab8500_vaux1_consumers[] = {
Lee Jones27f26de2013-03-21 15:59:05 +000056 /* Main display, u8500 R3 uib */
57 REGULATOR_SUPPLY("vddi", "mcde_disp_sony_acx424akp.0"),
58 /* Main display, u8500 uib and ST uib */
59 REGULATOR_SUPPLY("vdd1", "samsung_s6d16d0.0"),
60 /* Secondary display, ST uib */
61 REGULATOR_SUPPLY("vdd1", "samsung_s6d16d0.1"),
Linus Walleijd1de85a2010-12-02 17:10:14 +010062 /* SFH7741 proximity sensor */
63 REGULATOR_SUPPLY("vcc", "gpio-keys.0"),
64 /* BH1780GLS ambient light sensor */
65 REGULATOR_SUPPLY("vcc", "2-0029"),
66 /* lsm303dlh accelerometer */
67 REGULATOR_SUPPLY("vdd", "3-0018"),
68 /* lsm303dlh magnetometer */
69 REGULATOR_SUPPLY("vdd", "3-001e"),
70 /* Rohm BU21013 Touchscreen devices */
71 REGULATOR_SUPPLY("avdd", "3-005c"),
72 REGULATOR_SUPPLY("avdd", "3-005d"),
73 /* Synaptics RMI4 Touchscreen device */
74 REGULATOR_SUPPLY("vdd", "3-004b"),
Lee Jonesefb34d22013-03-21 15:59:10 +000075 /* L3G4200D Gyroscope device */
76 REGULATOR_SUPPLY("vdd", "2-0068"),
Lee Jones2d0266a2013-03-21 15:59:11 +000077 /* Ambient light sensor device */
78 REGULATOR_SUPPLY("vdd", "3-0029"),
Linus Walleijd1de85a2010-12-02 17:10:14 +010079};
80
81static struct regulator_consumer_supply ab8500_vaux2_consumers[] = {
82 /* On-board eMMC power */
83 REGULATOR_SUPPLY("vmmc", "sdi4"),
84 /* AB8500 audio codec */
85 REGULATOR_SUPPLY("vcc-N2158", "ab8500-codec.0"),
86};
87
88static struct regulator_consumer_supply ab8500_vaux3_consumers[] = {
89 /* External MMC slot power */
90 REGULATOR_SUPPLY("vmmc", "sdi0"),
91};
92
93static struct regulator_consumer_supply ab8500_vtvout_consumers[] = {
94 /* TV-out DENC supply */
95 REGULATOR_SUPPLY("vtvout", "ab8500-denc.0"),
96 /* Internal general-purpose ADC */
97 REGULATOR_SUPPLY("vddadc", "ab8500-gpadc.0"),
98};
99
Ola Lilja29bd2ab2012-02-01 14:18:10 +0100100static struct regulator_consumer_supply ab8500_vaud_consumers[] = {
101 /* AB8500 audio-codec main supply */
102 REGULATOR_SUPPLY("vaud", "ab8500-codec.0"),
103};
104
105static struct regulator_consumer_supply ab8500_vamic1_consumers[] = {
106 /* AB8500 audio-codec Mic1 supply */
107 REGULATOR_SUPPLY("vamic1", "ab8500-codec.0"),
108};
109
110static struct regulator_consumer_supply ab8500_vamic2_consumers[] = {
111 /* AB8500 audio-codec Mic2 supply */
112 REGULATOR_SUPPLY("vamic2", "ab8500-codec.0"),
113};
114
115static struct regulator_consumer_supply ab8500_vdmic_consumers[] = {
116 /* AB8500 audio-codec DMic supply */
117 REGULATOR_SUPPLY("vdmic", "ab8500-codec.0"),
118};
119
Linus Walleijd1de85a2010-12-02 17:10:14 +0100120static struct regulator_consumer_supply ab8500_vintcore_consumers[] = {
121 /* SoC core supply, no device */
122 REGULATOR_SUPPLY("v-intcore", NULL),
Joe Perches7c9d4402011-06-23 11:39:20 -0700123 /* USB Transceiver */
Linus Walleijd1de85a2010-12-02 17:10:14 +0100124 REGULATOR_SUPPLY("vddulpivio18", "ab8500-usb.0"),
125};
126
127static struct regulator_consumer_supply ab8500_vana_consumers[] = {
128 /* External displays, connector on board, 1v8 power supply */
129 REGULATOR_SUPPLY("vsmps2", "mcde.0"),
130};
Sundar Iyer4f724be2010-09-15 10:50:59 +0100131
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100132/* ab8500 regulator register initialization */
Bengt Jonsson732805a2013-03-21 15:59:03 +0000133static struct ab8500_regulator_reg_init ab8500_reg_init[] = {
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100134 /*
135 * VanaRequestCtrl = HP/LP depending on VxRequest
Lee Jonesd79df322013-03-21 15:58:58 +0000136 * VpllRequestCtrl = HP/LP depending on VxRequest
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100137 * VextSupply1RequestCtrl = HP/LP depending on VxRequest
138 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000139 INIT_REGULATOR_REGISTER(AB8500_REGUREQUESTCTRL2, 0xfc, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100140 /*
141 * VextSupply2RequestCtrl = HP/LP depending on VxRequest
142 * VextSupply3RequestCtrl = HP/LP depending on VxRequest
143 * Vaux1RequestCtrl = HP/LP depending on VxRequest
144 * Vaux2RequestCtrl = HP/LP depending on VxRequest
145 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000146 INIT_REGULATOR_REGISTER(AB8500_REGUREQUESTCTRL3, 0xff, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100147 /*
148 * Vaux3RequestCtrl = HP/LP depending on VxRequest
149 * SwHPReq = Control through SWValid disabled
150 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000151 INIT_REGULATOR_REGISTER(AB8500_REGUREQUESTCTRL4, 0x07, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100152 /*
Lee Jonesd79df322013-03-21 15:58:58 +0000153 * Vsmps1SysClkReq1HPValid = enabled
154 * Vsmps2SysClkReq1HPValid = enabled
155 * Vsmps3SysClkReq1HPValid = enabled
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100156 * VanaSysClkReq1HPValid = disabled
Lee Jonesd79df322013-03-21 15:58:58 +0000157 * VpllSysClkReq1HPValid = enabled
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100158 * Vaux1SysClkReq1HPValid = disabled
159 * Vaux2SysClkReq1HPValid = disabled
160 * Vaux3SysClkReq1HPValid = disabled
161 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000162 INIT_REGULATOR_REGISTER(AB8500_REGUSYSCLKREQ1HPVALID1, 0xff, 0x17),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100163 /*
164 * VextSupply1SysClkReq1HPValid = disabled
165 * VextSupply2SysClkReq1HPValid = disabled
166 * VextSupply3SysClkReq1HPValid = SysClkReq1 controlled
167 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000168 INIT_REGULATOR_REGISTER(AB8500_REGUSYSCLKREQ1HPVALID2, 0x70, 0x40),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100169 /*
170 * VanaHwHPReq1Valid = disabled
171 * Vaux1HwHPreq1Valid = disabled
172 * Vaux2HwHPReq1Valid = disabled
173 * Vaux3HwHPReqValid = disabled
174 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000175 INIT_REGULATOR_REGISTER(AB8500_REGUHWHPREQ1VALID1, 0xe8, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100176 /*
177 * VextSupply1HwHPReq1Valid = disabled
178 * VextSupply2HwHPReq1Valid = disabled
179 * VextSupply3HwHPReq1Valid = disabled
180 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000181 INIT_REGULATOR_REGISTER(AB8500_REGUHWHPREQ1VALID2, 0x07, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100182 /*
183 * VanaHwHPReq2Valid = disabled
184 * Vaux1HwHPReq2Valid = disabled
185 * Vaux2HwHPReq2Valid = disabled
186 * Vaux3HwHPReq2Valid = disabled
187 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000188 INIT_REGULATOR_REGISTER(AB8500_REGUHWHPREQ2VALID1, 0xe8, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100189 /*
190 * VextSupply1HwHPReq2Valid = disabled
191 * VextSupply2HwHPReq2Valid = disabled
192 * VextSupply3HwHPReq2Valid = HWReq2 controlled
193 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000194 INIT_REGULATOR_REGISTER(AB8500_REGUHWHPREQ2VALID2, 0x07, 0x04),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100195 /*
196 * VanaSwHPReqValid = disabled
197 * Vaux1SwHPReqValid = disabled
198 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000199 INIT_REGULATOR_REGISTER(AB8500_REGUSWHPREQVALID1, 0xa0, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100200 /*
201 * Vaux2SwHPReqValid = disabled
202 * Vaux3SwHPReqValid = disabled
203 * VextSupply1SwHPReqValid = disabled
204 * VextSupply2SwHPReqValid = disabled
205 * VextSupply3SwHPReqValid = disabled
206 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000207 INIT_REGULATOR_REGISTER(AB8500_REGUSWHPREQVALID2, 0x1f, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100208 /*
209 * SysClkReq2Valid1 = SysClkReq2 controlled
210 * SysClkReq3Valid1 = disabled
211 * SysClkReq4Valid1 = SysClkReq4 controlled
212 * SysClkReq5Valid1 = disabled
213 * SysClkReq6Valid1 = SysClkReq6 controlled
214 * SysClkReq7Valid1 = disabled
215 * SysClkReq8Valid1 = disabled
216 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000217 INIT_REGULATOR_REGISTER(AB8500_REGUSYSCLKREQVALID1, 0xfe, 0x2a),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100218 /*
219 * SysClkReq2Valid2 = disabled
220 * SysClkReq3Valid2 = disabled
221 * SysClkReq4Valid2 = disabled
222 * SysClkReq5Valid2 = disabled
223 * SysClkReq6Valid2 = SysClkReq6 controlled
224 * SysClkReq7Valid2 = disabled
225 * SysClkReq8Valid2 = disabled
226 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000227 INIT_REGULATOR_REGISTER(AB8500_REGUSYSCLKREQVALID2, 0xfe, 0x20),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100228 /*
229 * VTVoutEna = disabled
230 * Vintcore12Ena = disabled
231 * Vintcore12Sel = 1.25 V
232 * Vintcore12LP = inactive (HP)
233 * VTVoutLP = inactive (HP)
234 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000235 INIT_REGULATOR_REGISTER(AB8500_REGUMISC1, 0xfe, 0x10),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100236 /*
237 * VaudioEna = disabled
238 * VdmicEna = disabled
239 * Vamic1Ena = disabled
240 * Vamic2Ena = disabled
241 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000242 INIT_REGULATOR_REGISTER(AB8500_VAUDIOSUPPLY, 0x1e, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100243 /*
244 * Vamic1_dzout = high-Z when Vamic1 is disabled
245 * Vamic2_dzout = high-Z when Vamic2 is disabled
246 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000247 INIT_REGULATOR_REGISTER(AB8500_REGUCTRL1VAMIC, 0x03, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100248 /*
Lee Jonesd79df322013-03-21 15:58:58 +0000249 * Vsmps1Regu = HW control
250 * Vsmps1SelCtrl = Vsmps1 voltage defined by Vsmsp1Sel2
251 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000252 INIT_REGULATOR_REGISTER(AB8500_VSMPS1REGU, 0x0f, 0x06),
Lee Jonesd79df322013-03-21 15:58:58 +0000253 /*
254 * Vsmps2Regu = HW control
255 * Vsmps2SelCtrl = Vsmps2 voltage defined by Vsmsp2Sel2
256 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000257 INIT_REGULATOR_REGISTER(AB8500_VSMPS2REGU, 0x0f, 0x06),
Lee Jonesd79df322013-03-21 15:58:58 +0000258 /*
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100259 * VPll = Hw controlled
260 * VanaRegu = force off
261 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000262 INIT_REGULATOR_REGISTER(AB8500_VPLLVANAREGU, 0x0f, 0x02),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100263 /*
264 * VrefDDREna = disabled
265 * VrefDDRSleepMode = inactive (no pulldown)
266 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000267 INIT_REGULATOR_REGISTER(AB8500_VREFDDR, 0x03, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100268 /*
269 * VextSupply1Regu = HW control
270 * VextSupply2Regu = HW control
271 * VextSupply3Regu = HW control
272 * ExtSupply2Bypass = ExtSupply12LPn ball is 0 when Ena is 0
273 * ExtSupply3Bypass = ExtSupply3LPn ball is 0 when Ena is 0
274 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000275 INIT_REGULATOR_REGISTER(AB8500_EXTSUPPLYREGU, 0xff, 0x1a),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100276 /*
277 * Vaux1Regu = force HP
278 * Vaux2Regu = force off
279 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000280 INIT_REGULATOR_REGISTER(AB8500_VAUX12REGU, 0x0f, 0x01),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100281 /*
Lee Jonesd79df322013-03-21 15:58:58 +0000282 * Vrf1Regu = HW control
283 * Vaux3Regu = force off
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100284 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000285 INIT_REGULATOR_REGISTER(AB8500_VRF1VAUX3REGU, 0x0f, 0x08),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100286 /*
287 * Vsmps1 = 1.15V
288 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000289 INIT_REGULATOR_REGISTER(AB8500_VSMPS1SEL1, 0x3f, 0x24),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100290 /*
291 * Vaux1Sel = 2.5 V
292 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000293 INIT_REGULATOR_REGISTER(AB8500_VAUX1SEL, 0x0f, 0x08),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100294 /*
295 * Vaux2Sel = 2.9 V
296 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000297 INIT_REGULATOR_REGISTER(AB8500_VAUX2SEL, 0x0f, 0x0d),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100298 /*
299 * Vaux3Sel = 2.91 V
300 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000301 INIT_REGULATOR_REGISTER(AB8500_VRF1VAUX3SEL, 0x07, 0x07),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100302 /*
303 * VextSupply12LP = disabled (no LP)
304 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000305 INIT_REGULATOR_REGISTER(AB8500_REGUCTRL2SPARE, 0x01, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100306 /*
307 * Vaux1Disch = short discharge time
308 * Vaux2Disch = short discharge time
309 * Vaux3Disch = short discharge time
310 * Vintcore12Disch = short discharge time
311 * VTVoutDisch = short discharge time
312 * VaudioDisch = short discharge time
313 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000314 INIT_REGULATOR_REGISTER(AB8500_REGUCTRLDISCH, 0xfc, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100315 /*
316 * VanaDisch = short discharge time
317 * VdmicPullDownEna = pulldown disabled when Vdmic is disabled
318 * VdmicDisch = short discharge time
319 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000320 INIT_REGULATOR_REGISTER(AB8500_REGUCTRLDISCH2, 0x16, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100321};
322
Bengt Jonssona1e516e2010-12-10 11:08:48 +0100323/* AB8500 regulators */
Bengt Jonsson732805a2013-03-21 15:59:03 +0000324static struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = {
Bengt Jonssona1e516e2010-12-10 11:08:48 +0100325 /* supplies to the display/camera */
326 [AB8500_LDO_AUX1] = {
327 .constraints = {
328 .name = "V-DISPLAY",
329 .min_uV = 2500000,
330 .max_uV = 2900000,
331 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
332 REGULATOR_CHANGE_STATUS,
Linus Walleijdb245202011-04-04 10:44:51 +0200333 .boot_on = 1, /* display is on at boot */
334 /*
335 * This voltage cannot be disabled right now because
336 * it is somehow affecting the external MMC
337 * functionality, though that typically will use
338 * AUX3.
339 */
340 .always_on = 1,
Bengt Jonssona1e516e2010-12-10 11:08:48 +0100341 },
Linus Walleijd1de85a2010-12-02 17:10:14 +0100342 .num_consumer_supplies = ARRAY_SIZE(ab8500_vaux1_consumers),
343 .consumer_supplies = ab8500_vaux1_consumers,
Bengt Jonssona1e516e2010-12-10 11:08:48 +0100344 },
345 /* supplies to the on-board eMMC */
346 [AB8500_LDO_AUX2] = {
347 .constraints = {
348 .name = "V-eMMC1",
349 .min_uV = 1100000,
350 .max_uV = 3300000,
351 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
352 REGULATOR_CHANGE_STATUS,
353 },
Linus Walleijd1de85a2010-12-02 17:10:14 +0100354 .num_consumer_supplies = ARRAY_SIZE(ab8500_vaux2_consumers),
355 .consumer_supplies = ab8500_vaux2_consumers,
Bengt Jonssona1e516e2010-12-10 11:08:48 +0100356 },
357 /* supply for VAUX3, supplies to SDcard slots */
358 [AB8500_LDO_AUX3] = {
359 .constraints = {
360 .name = "V-MMC-SD",
361 .min_uV = 1100000,
362 .max_uV = 3300000,
363 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
364 REGULATOR_CHANGE_STATUS,
365 },
Linus Walleijd1de85a2010-12-02 17:10:14 +0100366 .num_consumer_supplies = ARRAY_SIZE(ab8500_vaux3_consumers),
367 .consumer_supplies = ab8500_vaux3_consumers,
Bengt Jonssona1e516e2010-12-10 11:08:48 +0100368 },
369 /* supply for tvout, gpadc, TVOUT LDO */
370 [AB8500_LDO_TVOUT] = {
371 .constraints = {
372 .name = "V-TVOUT",
373 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
374 },
Linus Walleijd1de85a2010-12-02 17:10:14 +0100375 .num_consumer_supplies = ARRAY_SIZE(ab8500_vtvout_consumers),
376 .consumer_supplies = ab8500_vtvout_consumers,
Bengt Jonssona1e516e2010-12-10 11:08:48 +0100377 },
378 /* supply for ab8500-vaudio, VAUDIO LDO */
379 [AB8500_LDO_AUDIO] = {
380 .constraints = {
381 .name = "V-AUD",
382 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
383 },
Ola Lilja29bd2ab2012-02-01 14:18:10 +0100384 .num_consumer_supplies = ARRAY_SIZE(ab8500_vaud_consumers),
385 .consumer_supplies = ab8500_vaud_consumers,
Bengt Jonssona1e516e2010-12-10 11:08:48 +0100386 },
387 /* supply for v-anamic1 VAMic1-LDO */
388 [AB8500_LDO_ANAMIC1] = {
389 .constraints = {
390 .name = "V-AMIC1",
391 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
392 },
Ola Lilja29bd2ab2012-02-01 14:18:10 +0100393 .num_consumer_supplies = ARRAY_SIZE(ab8500_vamic1_consumers),
394 .consumer_supplies = ab8500_vamic1_consumers,
Bengt Jonssona1e516e2010-12-10 11:08:48 +0100395 },
396 /* supply for v-amic2, VAMIC2 LDO, reuse constants for AMIC1 */
397 [AB8500_LDO_ANAMIC2] = {
398 .constraints = {
399 .name = "V-AMIC2",
400 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
401 },
Ola Lilja29bd2ab2012-02-01 14:18:10 +0100402 .num_consumer_supplies = ARRAY_SIZE(ab8500_vamic2_consumers),
403 .consumer_supplies = ab8500_vamic2_consumers,
Bengt Jonssona1e516e2010-12-10 11:08:48 +0100404 },
405 /* supply for v-dmic, VDMIC LDO */
406 [AB8500_LDO_DMIC] = {
407 .constraints = {
408 .name = "V-DMIC",
409 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
410 },
Ola Lilja29bd2ab2012-02-01 14:18:10 +0100411 .num_consumer_supplies = ARRAY_SIZE(ab8500_vdmic_consumers),
412 .consumer_supplies = ab8500_vdmic_consumers,
Bengt Jonssona1e516e2010-12-10 11:08:48 +0100413 },
414 /* supply for v-intcore12, VINTCORE12 LDO */
415 [AB8500_LDO_INTCORE] = {
416 .constraints = {
417 .name = "V-INTCORE",
418 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
419 },
Linus Walleijd1de85a2010-12-02 17:10:14 +0100420 .num_consumer_supplies = ARRAY_SIZE(ab8500_vintcore_consumers),
421 .consumer_supplies = ab8500_vintcore_consumers,
Bengt Jonssona1e516e2010-12-10 11:08:48 +0100422 },
423 /* supply for U8500 CSI/DSI, VANA LDO */
424 [AB8500_LDO_ANA] = {
425 .constraints = {
426 .name = "V-CSI/DSI",
427 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
428 },
Linus Walleijd1de85a2010-12-02 17:10:14 +0100429 .num_consumer_supplies = ARRAY_SIZE(ab8500_vana_consumers),
430 .consumer_supplies = ab8500_vana_consumers,
Sundar Iyer4f724be2010-09-15 10:50:59 +0100431 },
432};
Bengt Jonsson732805a2013-03-21 15:59:03 +0000433
434struct ab8500_regulator_platform_data ab8500_regulator_plat_data = {
435 .reg_init = ab8500_reg_init,
436 .num_reg_init = ARRAY_SIZE(ab8500_reg_init),
437 .regulator = ab8500_regulators,
438 .num_regulator = ARRAY_SIZE(ab8500_regulators),
439};