blob: 00a7133727758bfcccef0e1e34d4bb91d3b37278 [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"),
Lee Jones4336c1d2013-03-21 15:59:12 +000079 /* Pressure sensor device */
80 REGULATOR_SUPPLY("vdd", "2-005c"),
Linus Walleijd1de85a2010-12-02 17:10:14 +010081};
82
83static struct regulator_consumer_supply ab8500_vaux2_consumers[] = {
84 /* On-board eMMC power */
85 REGULATOR_SUPPLY("vmmc", "sdi4"),
86 /* AB8500 audio codec */
87 REGULATOR_SUPPLY("vcc-N2158", "ab8500-codec.0"),
88};
89
90static struct regulator_consumer_supply ab8500_vaux3_consumers[] = {
91 /* External MMC slot power */
92 REGULATOR_SUPPLY("vmmc", "sdi0"),
93};
94
95static struct regulator_consumer_supply ab8500_vtvout_consumers[] = {
96 /* TV-out DENC supply */
97 REGULATOR_SUPPLY("vtvout", "ab8500-denc.0"),
98 /* Internal general-purpose ADC */
99 REGULATOR_SUPPLY("vddadc", "ab8500-gpadc.0"),
100};
101
Ola Lilja29bd2ab2012-02-01 14:18:10 +0100102static struct regulator_consumer_supply ab8500_vaud_consumers[] = {
103 /* AB8500 audio-codec main supply */
104 REGULATOR_SUPPLY("vaud", "ab8500-codec.0"),
105};
106
107static struct regulator_consumer_supply ab8500_vamic1_consumers[] = {
108 /* AB8500 audio-codec Mic1 supply */
109 REGULATOR_SUPPLY("vamic1", "ab8500-codec.0"),
110};
111
112static struct regulator_consumer_supply ab8500_vamic2_consumers[] = {
113 /* AB8500 audio-codec Mic2 supply */
114 REGULATOR_SUPPLY("vamic2", "ab8500-codec.0"),
115};
116
117static struct regulator_consumer_supply ab8500_vdmic_consumers[] = {
118 /* AB8500 audio-codec DMic supply */
119 REGULATOR_SUPPLY("vdmic", "ab8500-codec.0"),
120};
121
Linus Walleijd1de85a2010-12-02 17:10:14 +0100122static struct regulator_consumer_supply ab8500_vintcore_consumers[] = {
123 /* SoC core supply, no device */
124 REGULATOR_SUPPLY("v-intcore", NULL),
Joe Perches7c9d4402011-06-23 11:39:20 -0700125 /* USB Transceiver */
Linus Walleijd1de85a2010-12-02 17:10:14 +0100126 REGULATOR_SUPPLY("vddulpivio18", "ab8500-usb.0"),
127};
128
129static struct regulator_consumer_supply ab8500_vana_consumers[] = {
130 /* External displays, connector on board, 1v8 power supply */
131 REGULATOR_SUPPLY("vsmps2", "mcde.0"),
132};
Sundar Iyer4f724be2010-09-15 10:50:59 +0100133
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100134/* ab8500 regulator register initialization */
Bengt Jonsson732805a2013-03-21 15:59:03 +0000135static struct ab8500_regulator_reg_init ab8500_reg_init[] = {
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100136 /*
137 * VanaRequestCtrl = HP/LP depending on VxRequest
Lee Jonesd79df322013-03-21 15:58:58 +0000138 * VpllRequestCtrl = HP/LP depending on VxRequest
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100139 * VextSupply1RequestCtrl = HP/LP depending on VxRequest
140 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000141 INIT_REGULATOR_REGISTER(AB8500_REGUREQUESTCTRL2, 0xfc, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100142 /*
143 * VextSupply2RequestCtrl = HP/LP depending on VxRequest
144 * VextSupply3RequestCtrl = HP/LP depending on VxRequest
145 * Vaux1RequestCtrl = HP/LP depending on VxRequest
146 * Vaux2RequestCtrl = HP/LP depending on VxRequest
147 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000148 INIT_REGULATOR_REGISTER(AB8500_REGUREQUESTCTRL3, 0xff, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100149 /*
150 * Vaux3RequestCtrl = HP/LP depending on VxRequest
151 * SwHPReq = Control through SWValid disabled
152 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000153 INIT_REGULATOR_REGISTER(AB8500_REGUREQUESTCTRL4, 0x07, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100154 /*
Lee Jonesd79df322013-03-21 15:58:58 +0000155 * Vsmps1SysClkReq1HPValid = enabled
156 * Vsmps2SysClkReq1HPValid = enabled
157 * Vsmps3SysClkReq1HPValid = enabled
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100158 * VanaSysClkReq1HPValid = disabled
Lee Jonesd79df322013-03-21 15:58:58 +0000159 * VpllSysClkReq1HPValid = enabled
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100160 * Vaux1SysClkReq1HPValid = disabled
161 * Vaux2SysClkReq1HPValid = disabled
162 * Vaux3SysClkReq1HPValid = disabled
163 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000164 INIT_REGULATOR_REGISTER(AB8500_REGUSYSCLKREQ1HPVALID1, 0xff, 0x17),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100165 /*
166 * VextSupply1SysClkReq1HPValid = disabled
167 * VextSupply2SysClkReq1HPValid = disabled
168 * VextSupply3SysClkReq1HPValid = SysClkReq1 controlled
169 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000170 INIT_REGULATOR_REGISTER(AB8500_REGUSYSCLKREQ1HPVALID2, 0x70, 0x40),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100171 /*
172 * VanaHwHPReq1Valid = disabled
173 * Vaux1HwHPreq1Valid = disabled
174 * Vaux2HwHPReq1Valid = disabled
175 * Vaux3HwHPReqValid = disabled
176 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000177 INIT_REGULATOR_REGISTER(AB8500_REGUHWHPREQ1VALID1, 0xe8, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100178 /*
179 * VextSupply1HwHPReq1Valid = disabled
180 * VextSupply2HwHPReq1Valid = disabled
181 * VextSupply3HwHPReq1Valid = disabled
182 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000183 INIT_REGULATOR_REGISTER(AB8500_REGUHWHPREQ1VALID2, 0x07, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100184 /*
185 * VanaHwHPReq2Valid = disabled
186 * Vaux1HwHPReq2Valid = disabled
187 * Vaux2HwHPReq2Valid = disabled
188 * Vaux3HwHPReq2Valid = disabled
189 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000190 INIT_REGULATOR_REGISTER(AB8500_REGUHWHPREQ2VALID1, 0xe8, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100191 /*
192 * VextSupply1HwHPReq2Valid = disabled
193 * VextSupply2HwHPReq2Valid = disabled
194 * VextSupply3HwHPReq2Valid = HWReq2 controlled
195 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000196 INIT_REGULATOR_REGISTER(AB8500_REGUHWHPREQ2VALID2, 0x07, 0x04),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100197 /*
198 * VanaSwHPReqValid = disabled
199 * Vaux1SwHPReqValid = disabled
200 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000201 INIT_REGULATOR_REGISTER(AB8500_REGUSWHPREQVALID1, 0xa0, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100202 /*
203 * Vaux2SwHPReqValid = disabled
204 * Vaux3SwHPReqValid = disabled
205 * VextSupply1SwHPReqValid = disabled
206 * VextSupply2SwHPReqValid = disabled
207 * VextSupply3SwHPReqValid = disabled
208 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000209 INIT_REGULATOR_REGISTER(AB8500_REGUSWHPREQVALID2, 0x1f, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100210 /*
211 * SysClkReq2Valid1 = SysClkReq2 controlled
212 * SysClkReq3Valid1 = disabled
213 * SysClkReq4Valid1 = SysClkReq4 controlled
214 * SysClkReq5Valid1 = disabled
215 * SysClkReq6Valid1 = SysClkReq6 controlled
216 * SysClkReq7Valid1 = disabled
217 * SysClkReq8Valid1 = disabled
218 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000219 INIT_REGULATOR_REGISTER(AB8500_REGUSYSCLKREQVALID1, 0xfe, 0x2a),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100220 /*
221 * SysClkReq2Valid2 = disabled
222 * SysClkReq3Valid2 = disabled
223 * SysClkReq4Valid2 = disabled
224 * SysClkReq5Valid2 = disabled
225 * SysClkReq6Valid2 = SysClkReq6 controlled
226 * SysClkReq7Valid2 = disabled
227 * SysClkReq8Valid2 = disabled
228 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000229 INIT_REGULATOR_REGISTER(AB8500_REGUSYSCLKREQVALID2, 0xfe, 0x20),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100230 /*
231 * VTVoutEna = disabled
232 * Vintcore12Ena = disabled
233 * Vintcore12Sel = 1.25 V
234 * Vintcore12LP = inactive (HP)
235 * VTVoutLP = inactive (HP)
236 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000237 INIT_REGULATOR_REGISTER(AB8500_REGUMISC1, 0xfe, 0x10),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100238 /*
239 * VaudioEna = disabled
240 * VdmicEna = disabled
241 * Vamic1Ena = disabled
242 * Vamic2Ena = disabled
243 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000244 INIT_REGULATOR_REGISTER(AB8500_VAUDIOSUPPLY, 0x1e, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100245 /*
246 * Vamic1_dzout = high-Z when Vamic1 is disabled
247 * Vamic2_dzout = high-Z when Vamic2 is disabled
248 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000249 INIT_REGULATOR_REGISTER(AB8500_REGUCTRL1VAMIC, 0x03, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100250 /*
Lee Jonesd79df322013-03-21 15:58:58 +0000251 * Vsmps1Regu = HW control
252 * Vsmps1SelCtrl = Vsmps1 voltage defined by Vsmsp1Sel2
253 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000254 INIT_REGULATOR_REGISTER(AB8500_VSMPS1REGU, 0x0f, 0x06),
Lee Jonesd79df322013-03-21 15:58:58 +0000255 /*
256 * Vsmps2Regu = HW control
257 * Vsmps2SelCtrl = Vsmps2 voltage defined by Vsmsp2Sel2
258 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000259 INIT_REGULATOR_REGISTER(AB8500_VSMPS2REGU, 0x0f, 0x06),
Lee Jonesd79df322013-03-21 15:58:58 +0000260 /*
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100261 * VPll = Hw controlled
262 * VanaRegu = force off
263 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000264 INIT_REGULATOR_REGISTER(AB8500_VPLLVANAREGU, 0x0f, 0x02),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100265 /*
266 * VrefDDREna = disabled
267 * VrefDDRSleepMode = inactive (no pulldown)
268 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000269 INIT_REGULATOR_REGISTER(AB8500_VREFDDR, 0x03, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100270 /*
271 * VextSupply1Regu = HW control
272 * VextSupply2Regu = HW control
273 * VextSupply3Regu = HW control
274 * ExtSupply2Bypass = ExtSupply12LPn ball is 0 when Ena is 0
275 * ExtSupply3Bypass = ExtSupply3LPn ball is 0 when Ena is 0
276 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000277 INIT_REGULATOR_REGISTER(AB8500_EXTSUPPLYREGU, 0xff, 0x1a),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100278 /*
279 * Vaux1Regu = force HP
280 * Vaux2Regu = force off
281 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000282 INIT_REGULATOR_REGISTER(AB8500_VAUX12REGU, 0x0f, 0x01),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100283 /*
Lee Jonesd79df322013-03-21 15:58:58 +0000284 * Vrf1Regu = HW control
285 * Vaux3Regu = force off
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100286 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000287 INIT_REGULATOR_REGISTER(AB8500_VRF1VAUX3REGU, 0x0f, 0x08),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100288 /*
289 * Vsmps1 = 1.15V
290 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000291 INIT_REGULATOR_REGISTER(AB8500_VSMPS1SEL1, 0x3f, 0x24),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100292 /*
293 * Vaux1Sel = 2.5 V
294 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000295 INIT_REGULATOR_REGISTER(AB8500_VAUX1SEL, 0x0f, 0x08),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100296 /*
297 * Vaux2Sel = 2.9 V
298 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000299 INIT_REGULATOR_REGISTER(AB8500_VAUX2SEL, 0x0f, 0x0d),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100300 /*
301 * Vaux3Sel = 2.91 V
302 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000303 INIT_REGULATOR_REGISTER(AB8500_VRF1VAUX3SEL, 0x07, 0x07),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100304 /*
305 * VextSupply12LP = disabled (no LP)
306 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000307 INIT_REGULATOR_REGISTER(AB8500_REGUCTRL2SPARE, 0x01, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100308 /*
309 * Vaux1Disch = short discharge time
310 * Vaux2Disch = short discharge time
311 * Vaux3Disch = short discharge time
312 * Vintcore12Disch = short discharge time
313 * VTVoutDisch = short discharge time
314 * VaudioDisch = short discharge time
315 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000316 INIT_REGULATOR_REGISTER(AB8500_REGUCTRLDISCH, 0xfc, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100317 /*
318 * VanaDisch = short discharge time
319 * VdmicPullDownEna = pulldown disabled when Vdmic is disabled
320 * VdmicDisch = short discharge time
321 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000322 INIT_REGULATOR_REGISTER(AB8500_REGUCTRLDISCH2, 0x16, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100323};
324
Bengt Jonssona1e516e2010-12-10 11:08:48 +0100325/* AB8500 regulators */
Bengt Jonsson732805a2013-03-21 15:59:03 +0000326static struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = {
Bengt Jonssona1e516e2010-12-10 11:08:48 +0100327 /* supplies to the display/camera */
328 [AB8500_LDO_AUX1] = {
329 .constraints = {
330 .name = "V-DISPLAY",
331 .min_uV = 2500000,
332 .max_uV = 2900000,
333 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
334 REGULATOR_CHANGE_STATUS,
Linus Walleijdb245202011-04-04 10:44:51 +0200335 .boot_on = 1, /* display is on at boot */
336 /*
337 * This voltage cannot be disabled right now because
338 * it is somehow affecting the external MMC
339 * functionality, though that typically will use
340 * AUX3.
341 */
342 .always_on = 1,
Bengt Jonssona1e516e2010-12-10 11:08:48 +0100343 },
Linus Walleijd1de85a2010-12-02 17:10:14 +0100344 .num_consumer_supplies = ARRAY_SIZE(ab8500_vaux1_consumers),
345 .consumer_supplies = ab8500_vaux1_consumers,
Bengt Jonssona1e516e2010-12-10 11:08:48 +0100346 },
347 /* supplies to the on-board eMMC */
348 [AB8500_LDO_AUX2] = {
349 .constraints = {
350 .name = "V-eMMC1",
351 .min_uV = 1100000,
352 .max_uV = 3300000,
353 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
354 REGULATOR_CHANGE_STATUS,
355 },
Linus Walleijd1de85a2010-12-02 17:10:14 +0100356 .num_consumer_supplies = ARRAY_SIZE(ab8500_vaux2_consumers),
357 .consumer_supplies = ab8500_vaux2_consumers,
Bengt Jonssona1e516e2010-12-10 11:08:48 +0100358 },
359 /* supply for VAUX3, supplies to SDcard slots */
360 [AB8500_LDO_AUX3] = {
361 .constraints = {
362 .name = "V-MMC-SD",
363 .min_uV = 1100000,
364 .max_uV = 3300000,
365 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
366 REGULATOR_CHANGE_STATUS,
367 },
Linus Walleijd1de85a2010-12-02 17:10:14 +0100368 .num_consumer_supplies = ARRAY_SIZE(ab8500_vaux3_consumers),
369 .consumer_supplies = ab8500_vaux3_consumers,
Bengt Jonssona1e516e2010-12-10 11:08:48 +0100370 },
371 /* supply for tvout, gpadc, TVOUT LDO */
372 [AB8500_LDO_TVOUT] = {
373 .constraints = {
374 .name = "V-TVOUT",
375 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
376 },
Linus Walleijd1de85a2010-12-02 17:10:14 +0100377 .num_consumer_supplies = ARRAY_SIZE(ab8500_vtvout_consumers),
378 .consumer_supplies = ab8500_vtvout_consumers,
Bengt Jonssona1e516e2010-12-10 11:08:48 +0100379 },
380 /* supply for ab8500-vaudio, VAUDIO LDO */
381 [AB8500_LDO_AUDIO] = {
382 .constraints = {
383 .name = "V-AUD",
384 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
385 },
Ola Lilja29bd2ab2012-02-01 14:18:10 +0100386 .num_consumer_supplies = ARRAY_SIZE(ab8500_vaud_consumers),
387 .consumer_supplies = ab8500_vaud_consumers,
Bengt Jonssona1e516e2010-12-10 11:08:48 +0100388 },
389 /* supply for v-anamic1 VAMic1-LDO */
390 [AB8500_LDO_ANAMIC1] = {
391 .constraints = {
392 .name = "V-AMIC1",
393 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
394 },
Ola Lilja29bd2ab2012-02-01 14:18:10 +0100395 .num_consumer_supplies = ARRAY_SIZE(ab8500_vamic1_consumers),
396 .consumer_supplies = ab8500_vamic1_consumers,
Bengt Jonssona1e516e2010-12-10 11:08:48 +0100397 },
398 /* supply for v-amic2, VAMIC2 LDO, reuse constants for AMIC1 */
399 [AB8500_LDO_ANAMIC2] = {
400 .constraints = {
401 .name = "V-AMIC2",
402 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
403 },
Ola Lilja29bd2ab2012-02-01 14:18:10 +0100404 .num_consumer_supplies = ARRAY_SIZE(ab8500_vamic2_consumers),
405 .consumer_supplies = ab8500_vamic2_consumers,
Bengt Jonssona1e516e2010-12-10 11:08:48 +0100406 },
407 /* supply for v-dmic, VDMIC LDO */
408 [AB8500_LDO_DMIC] = {
409 .constraints = {
410 .name = "V-DMIC",
411 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
412 },
Ola Lilja29bd2ab2012-02-01 14:18:10 +0100413 .num_consumer_supplies = ARRAY_SIZE(ab8500_vdmic_consumers),
414 .consumer_supplies = ab8500_vdmic_consumers,
Bengt Jonssona1e516e2010-12-10 11:08:48 +0100415 },
416 /* supply for v-intcore12, VINTCORE12 LDO */
417 [AB8500_LDO_INTCORE] = {
418 .constraints = {
419 .name = "V-INTCORE",
420 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
421 },
Linus Walleijd1de85a2010-12-02 17:10:14 +0100422 .num_consumer_supplies = ARRAY_SIZE(ab8500_vintcore_consumers),
423 .consumer_supplies = ab8500_vintcore_consumers,
Bengt Jonssona1e516e2010-12-10 11:08:48 +0100424 },
425 /* supply for U8500 CSI/DSI, VANA LDO */
426 [AB8500_LDO_ANA] = {
427 .constraints = {
428 .name = "V-CSI/DSI",
429 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
430 },
Linus Walleijd1de85a2010-12-02 17:10:14 +0100431 .num_consumer_supplies = ARRAY_SIZE(ab8500_vana_consumers),
432 .consumer_supplies = ab8500_vana_consumers,
Sundar Iyer4f724be2010-09-15 10:50:59 +0100433 },
434};
Bengt Jonsson732805a2013-03-21 15:59:03 +0000435
436struct ab8500_regulator_platform_data ab8500_regulator_plat_data = {
437 .reg_init = ab8500_reg_init,
438 .num_reg_init = ARRAY_SIZE(ab8500_reg_init),
439 .regulator = ab8500_regulators,
440 .num_regulator = ARRAY_SIZE(ab8500_regulators),
441};