blob: c4d0d0cd69a208c5c45e1805a6e56c27495169bf [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"),
75};
76
77static struct regulator_consumer_supply ab8500_vaux2_consumers[] = {
78 /* On-board eMMC power */
79 REGULATOR_SUPPLY("vmmc", "sdi4"),
80 /* AB8500 audio codec */
81 REGULATOR_SUPPLY("vcc-N2158", "ab8500-codec.0"),
82};
83
84static struct regulator_consumer_supply ab8500_vaux3_consumers[] = {
85 /* External MMC slot power */
86 REGULATOR_SUPPLY("vmmc", "sdi0"),
87};
88
89static struct regulator_consumer_supply ab8500_vtvout_consumers[] = {
90 /* TV-out DENC supply */
91 REGULATOR_SUPPLY("vtvout", "ab8500-denc.0"),
92 /* Internal general-purpose ADC */
93 REGULATOR_SUPPLY("vddadc", "ab8500-gpadc.0"),
94};
95
Ola Lilja29bd2ab2012-02-01 14:18:10 +010096static struct regulator_consumer_supply ab8500_vaud_consumers[] = {
97 /* AB8500 audio-codec main supply */
98 REGULATOR_SUPPLY("vaud", "ab8500-codec.0"),
99};
100
101static struct regulator_consumer_supply ab8500_vamic1_consumers[] = {
102 /* AB8500 audio-codec Mic1 supply */
103 REGULATOR_SUPPLY("vamic1", "ab8500-codec.0"),
104};
105
106static struct regulator_consumer_supply ab8500_vamic2_consumers[] = {
107 /* AB8500 audio-codec Mic2 supply */
108 REGULATOR_SUPPLY("vamic2", "ab8500-codec.0"),
109};
110
111static struct regulator_consumer_supply ab8500_vdmic_consumers[] = {
112 /* AB8500 audio-codec DMic supply */
113 REGULATOR_SUPPLY("vdmic", "ab8500-codec.0"),
114};
115
Linus Walleijd1de85a2010-12-02 17:10:14 +0100116static struct regulator_consumer_supply ab8500_vintcore_consumers[] = {
117 /* SoC core supply, no device */
118 REGULATOR_SUPPLY("v-intcore", NULL),
Joe Perches7c9d4402011-06-23 11:39:20 -0700119 /* USB Transceiver */
Linus Walleijd1de85a2010-12-02 17:10:14 +0100120 REGULATOR_SUPPLY("vddulpivio18", "ab8500-usb.0"),
121};
122
123static struct regulator_consumer_supply ab8500_vana_consumers[] = {
124 /* External displays, connector on board, 1v8 power supply */
125 REGULATOR_SUPPLY("vsmps2", "mcde.0"),
126};
Sundar Iyer4f724be2010-09-15 10:50:59 +0100127
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100128/* ab8500 regulator register initialization */
Bengt Jonsson732805a2013-03-21 15:59:03 +0000129static struct ab8500_regulator_reg_init ab8500_reg_init[] = {
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100130 /*
131 * VanaRequestCtrl = HP/LP depending on VxRequest
Lee Jonesd79df322013-03-21 15:58:58 +0000132 * VpllRequestCtrl = HP/LP depending on VxRequest
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100133 * VextSupply1RequestCtrl = HP/LP depending on VxRequest
134 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000135 INIT_REGULATOR_REGISTER(AB8500_REGUREQUESTCTRL2, 0xfc, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100136 /*
137 * VextSupply2RequestCtrl = HP/LP depending on VxRequest
138 * VextSupply3RequestCtrl = HP/LP depending on VxRequest
139 * Vaux1RequestCtrl = HP/LP depending on VxRequest
140 * Vaux2RequestCtrl = HP/LP depending on VxRequest
141 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000142 INIT_REGULATOR_REGISTER(AB8500_REGUREQUESTCTRL3, 0xff, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100143 /*
144 * Vaux3RequestCtrl = HP/LP depending on VxRequest
145 * SwHPReq = Control through SWValid disabled
146 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000147 INIT_REGULATOR_REGISTER(AB8500_REGUREQUESTCTRL4, 0x07, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100148 /*
Lee Jonesd79df322013-03-21 15:58:58 +0000149 * Vsmps1SysClkReq1HPValid = enabled
150 * Vsmps2SysClkReq1HPValid = enabled
151 * Vsmps3SysClkReq1HPValid = enabled
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100152 * VanaSysClkReq1HPValid = disabled
Lee Jonesd79df322013-03-21 15:58:58 +0000153 * VpllSysClkReq1HPValid = enabled
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100154 * Vaux1SysClkReq1HPValid = disabled
155 * Vaux2SysClkReq1HPValid = disabled
156 * Vaux3SysClkReq1HPValid = disabled
157 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000158 INIT_REGULATOR_REGISTER(AB8500_REGUSYSCLKREQ1HPVALID1, 0xff, 0x17),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100159 /*
160 * VextSupply1SysClkReq1HPValid = disabled
161 * VextSupply2SysClkReq1HPValid = disabled
162 * VextSupply3SysClkReq1HPValid = SysClkReq1 controlled
163 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000164 INIT_REGULATOR_REGISTER(AB8500_REGUSYSCLKREQ1HPVALID2, 0x70, 0x40),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100165 /*
166 * VanaHwHPReq1Valid = disabled
167 * Vaux1HwHPreq1Valid = disabled
168 * Vaux2HwHPReq1Valid = disabled
169 * Vaux3HwHPReqValid = disabled
170 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000171 INIT_REGULATOR_REGISTER(AB8500_REGUHWHPREQ1VALID1, 0xe8, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100172 /*
173 * VextSupply1HwHPReq1Valid = disabled
174 * VextSupply2HwHPReq1Valid = disabled
175 * VextSupply3HwHPReq1Valid = disabled
176 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000177 INIT_REGULATOR_REGISTER(AB8500_REGUHWHPREQ1VALID2, 0x07, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100178 /*
179 * VanaHwHPReq2Valid = disabled
180 * Vaux1HwHPReq2Valid = disabled
181 * Vaux2HwHPReq2Valid = disabled
182 * Vaux3HwHPReq2Valid = disabled
183 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000184 INIT_REGULATOR_REGISTER(AB8500_REGUHWHPREQ2VALID1, 0xe8, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100185 /*
186 * VextSupply1HwHPReq2Valid = disabled
187 * VextSupply2HwHPReq2Valid = disabled
188 * VextSupply3HwHPReq2Valid = HWReq2 controlled
189 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000190 INIT_REGULATOR_REGISTER(AB8500_REGUHWHPREQ2VALID2, 0x07, 0x04),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100191 /*
192 * VanaSwHPReqValid = disabled
193 * Vaux1SwHPReqValid = disabled
194 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000195 INIT_REGULATOR_REGISTER(AB8500_REGUSWHPREQVALID1, 0xa0, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100196 /*
197 * Vaux2SwHPReqValid = disabled
198 * Vaux3SwHPReqValid = disabled
199 * VextSupply1SwHPReqValid = disabled
200 * VextSupply2SwHPReqValid = disabled
201 * VextSupply3SwHPReqValid = disabled
202 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000203 INIT_REGULATOR_REGISTER(AB8500_REGUSWHPREQVALID2, 0x1f, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100204 /*
205 * SysClkReq2Valid1 = SysClkReq2 controlled
206 * SysClkReq3Valid1 = disabled
207 * SysClkReq4Valid1 = SysClkReq4 controlled
208 * SysClkReq5Valid1 = disabled
209 * SysClkReq6Valid1 = SysClkReq6 controlled
210 * SysClkReq7Valid1 = disabled
211 * SysClkReq8Valid1 = disabled
212 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000213 INIT_REGULATOR_REGISTER(AB8500_REGUSYSCLKREQVALID1, 0xfe, 0x2a),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100214 /*
215 * SysClkReq2Valid2 = disabled
216 * SysClkReq3Valid2 = disabled
217 * SysClkReq4Valid2 = disabled
218 * SysClkReq5Valid2 = disabled
219 * SysClkReq6Valid2 = SysClkReq6 controlled
220 * SysClkReq7Valid2 = disabled
221 * SysClkReq8Valid2 = disabled
222 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000223 INIT_REGULATOR_REGISTER(AB8500_REGUSYSCLKREQVALID2, 0xfe, 0x20),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100224 /*
225 * VTVoutEna = disabled
226 * Vintcore12Ena = disabled
227 * Vintcore12Sel = 1.25 V
228 * Vintcore12LP = inactive (HP)
229 * VTVoutLP = inactive (HP)
230 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000231 INIT_REGULATOR_REGISTER(AB8500_REGUMISC1, 0xfe, 0x10),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100232 /*
233 * VaudioEna = disabled
234 * VdmicEna = disabled
235 * Vamic1Ena = disabled
236 * Vamic2Ena = disabled
237 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000238 INIT_REGULATOR_REGISTER(AB8500_VAUDIOSUPPLY, 0x1e, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100239 /*
240 * Vamic1_dzout = high-Z when Vamic1 is disabled
241 * Vamic2_dzout = high-Z when Vamic2 is disabled
242 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000243 INIT_REGULATOR_REGISTER(AB8500_REGUCTRL1VAMIC, 0x03, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100244 /*
Lee Jonesd79df322013-03-21 15:58:58 +0000245 * Vsmps1Regu = HW control
246 * Vsmps1SelCtrl = Vsmps1 voltage defined by Vsmsp1Sel2
247 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000248 INIT_REGULATOR_REGISTER(AB8500_VSMPS1REGU, 0x0f, 0x06),
Lee Jonesd79df322013-03-21 15:58:58 +0000249 /*
250 * Vsmps2Regu = HW control
251 * Vsmps2SelCtrl = Vsmps2 voltage defined by Vsmsp2Sel2
252 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000253 INIT_REGULATOR_REGISTER(AB8500_VSMPS2REGU, 0x0f, 0x06),
Lee Jonesd79df322013-03-21 15:58:58 +0000254 /*
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100255 * VPll = Hw controlled
256 * VanaRegu = force off
257 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000258 INIT_REGULATOR_REGISTER(AB8500_VPLLVANAREGU, 0x0f, 0x02),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100259 /*
260 * VrefDDREna = disabled
261 * VrefDDRSleepMode = inactive (no pulldown)
262 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000263 INIT_REGULATOR_REGISTER(AB8500_VREFDDR, 0x03, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100264 /*
265 * VextSupply1Regu = HW control
266 * VextSupply2Regu = HW control
267 * VextSupply3Regu = HW control
268 * ExtSupply2Bypass = ExtSupply12LPn ball is 0 when Ena is 0
269 * ExtSupply3Bypass = ExtSupply3LPn ball is 0 when Ena is 0
270 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000271 INIT_REGULATOR_REGISTER(AB8500_EXTSUPPLYREGU, 0xff, 0x1a),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100272 /*
273 * Vaux1Regu = force HP
274 * Vaux2Regu = force off
275 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000276 INIT_REGULATOR_REGISTER(AB8500_VAUX12REGU, 0x0f, 0x01),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100277 /*
Lee Jonesd79df322013-03-21 15:58:58 +0000278 * Vrf1Regu = HW control
279 * Vaux3Regu = force off
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100280 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000281 INIT_REGULATOR_REGISTER(AB8500_VRF1VAUX3REGU, 0x0f, 0x08),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100282 /*
283 * Vsmps1 = 1.15V
284 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000285 INIT_REGULATOR_REGISTER(AB8500_VSMPS1SEL1, 0x3f, 0x24),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100286 /*
287 * Vaux1Sel = 2.5 V
288 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000289 INIT_REGULATOR_REGISTER(AB8500_VAUX1SEL, 0x0f, 0x08),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100290 /*
291 * Vaux2Sel = 2.9 V
292 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000293 INIT_REGULATOR_REGISTER(AB8500_VAUX2SEL, 0x0f, 0x0d),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100294 /*
295 * Vaux3Sel = 2.91 V
296 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000297 INIT_REGULATOR_REGISTER(AB8500_VRF1VAUX3SEL, 0x07, 0x07),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100298 /*
299 * VextSupply12LP = disabled (no LP)
300 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000301 INIT_REGULATOR_REGISTER(AB8500_REGUCTRL2SPARE, 0x01, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100302 /*
303 * Vaux1Disch = short discharge time
304 * Vaux2Disch = short discharge time
305 * Vaux3Disch = short discharge time
306 * Vintcore12Disch = short discharge time
307 * VTVoutDisch = short discharge time
308 * VaudioDisch = short discharge time
309 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000310 INIT_REGULATOR_REGISTER(AB8500_REGUCTRLDISCH, 0xfc, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100311 /*
312 * VanaDisch = short discharge time
313 * VdmicPullDownEna = pulldown disabled when Vdmic is disabled
314 * VdmicDisch = short discharge time
315 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000316 INIT_REGULATOR_REGISTER(AB8500_REGUCTRLDISCH2, 0x16, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100317};
318
Bengt Jonssona1e516e2010-12-10 11:08:48 +0100319/* AB8500 regulators */
Bengt Jonsson732805a2013-03-21 15:59:03 +0000320static struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = {
Bengt Jonssona1e516e2010-12-10 11:08:48 +0100321 /* supplies to the display/camera */
322 [AB8500_LDO_AUX1] = {
323 .constraints = {
324 .name = "V-DISPLAY",
325 .min_uV = 2500000,
326 .max_uV = 2900000,
327 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
328 REGULATOR_CHANGE_STATUS,
Linus Walleijdb245202011-04-04 10:44:51 +0200329 .boot_on = 1, /* display is on at boot */
330 /*
331 * This voltage cannot be disabled right now because
332 * it is somehow affecting the external MMC
333 * functionality, though that typically will use
334 * AUX3.
335 */
336 .always_on = 1,
Bengt Jonssona1e516e2010-12-10 11:08:48 +0100337 },
Linus Walleijd1de85a2010-12-02 17:10:14 +0100338 .num_consumer_supplies = ARRAY_SIZE(ab8500_vaux1_consumers),
339 .consumer_supplies = ab8500_vaux1_consumers,
Bengt Jonssona1e516e2010-12-10 11:08:48 +0100340 },
341 /* supplies to the on-board eMMC */
342 [AB8500_LDO_AUX2] = {
343 .constraints = {
344 .name = "V-eMMC1",
345 .min_uV = 1100000,
346 .max_uV = 3300000,
347 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
348 REGULATOR_CHANGE_STATUS,
349 },
Linus Walleijd1de85a2010-12-02 17:10:14 +0100350 .num_consumer_supplies = ARRAY_SIZE(ab8500_vaux2_consumers),
351 .consumer_supplies = ab8500_vaux2_consumers,
Bengt Jonssona1e516e2010-12-10 11:08:48 +0100352 },
353 /* supply for VAUX3, supplies to SDcard slots */
354 [AB8500_LDO_AUX3] = {
355 .constraints = {
356 .name = "V-MMC-SD",
357 .min_uV = 1100000,
358 .max_uV = 3300000,
359 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
360 REGULATOR_CHANGE_STATUS,
361 },
Linus Walleijd1de85a2010-12-02 17:10:14 +0100362 .num_consumer_supplies = ARRAY_SIZE(ab8500_vaux3_consumers),
363 .consumer_supplies = ab8500_vaux3_consumers,
Bengt Jonssona1e516e2010-12-10 11:08:48 +0100364 },
365 /* supply for tvout, gpadc, TVOUT LDO */
366 [AB8500_LDO_TVOUT] = {
367 .constraints = {
368 .name = "V-TVOUT",
369 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
370 },
Linus Walleijd1de85a2010-12-02 17:10:14 +0100371 .num_consumer_supplies = ARRAY_SIZE(ab8500_vtvout_consumers),
372 .consumer_supplies = ab8500_vtvout_consumers,
Bengt Jonssona1e516e2010-12-10 11:08:48 +0100373 },
374 /* supply for ab8500-vaudio, VAUDIO LDO */
375 [AB8500_LDO_AUDIO] = {
376 .constraints = {
377 .name = "V-AUD",
378 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
379 },
Ola Lilja29bd2ab2012-02-01 14:18:10 +0100380 .num_consumer_supplies = ARRAY_SIZE(ab8500_vaud_consumers),
381 .consumer_supplies = ab8500_vaud_consumers,
Bengt Jonssona1e516e2010-12-10 11:08:48 +0100382 },
383 /* supply for v-anamic1 VAMic1-LDO */
384 [AB8500_LDO_ANAMIC1] = {
385 .constraints = {
386 .name = "V-AMIC1",
387 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
388 },
Ola Lilja29bd2ab2012-02-01 14:18:10 +0100389 .num_consumer_supplies = ARRAY_SIZE(ab8500_vamic1_consumers),
390 .consumer_supplies = ab8500_vamic1_consumers,
Bengt Jonssona1e516e2010-12-10 11:08:48 +0100391 },
392 /* supply for v-amic2, VAMIC2 LDO, reuse constants for AMIC1 */
393 [AB8500_LDO_ANAMIC2] = {
394 .constraints = {
395 .name = "V-AMIC2",
396 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
397 },
Ola Lilja29bd2ab2012-02-01 14:18:10 +0100398 .num_consumer_supplies = ARRAY_SIZE(ab8500_vamic2_consumers),
399 .consumer_supplies = ab8500_vamic2_consumers,
Bengt Jonssona1e516e2010-12-10 11:08:48 +0100400 },
401 /* supply for v-dmic, VDMIC LDO */
402 [AB8500_LDO_DMIC] = {
403 .constraints = {
404 .name = "V-DMIC",
405 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
406 },
Ola Lilja29bd2ab2012-02-01 14:18:10 +0100407 .num_consumer_supplies = ARRAY_SIZE(ab8500_vdmic_consumers),
408 .consumer_supplies = ab8500_vdmic_consumers,
Bengt Jonssona1e516e2010-12-10 11:08:48 +0100409 },
410 /* supply for v-intcore12, VINTCORE12 LDO */
411 [AB8500_LDO_INTCORE] = {
412 .constraints = {
413 .name = "V-INTCORE",
414 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
415 },
Linus Walleijd1de85a2010-12-02 17:10:14 +0100416 .num_consumer_supplies = ARRAY_SIZE(ab8500_vintcore_consumers),
417 .consumer_supplies = ab8500_vintcore_consumers,
Bengt Jonssona1e516e2010-12-10 11:08:48 +0100418 },
419 /* supply for U8500 CSI/DSI, VANA LDO */
420 [AB8500_LDO_ANA] = {
421 .constraints = {
422 .name = "V-CSI/DSI",
423 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
424 },
Linus Walleijd1de85a2010-12-02 17:10:14 +0100425 .num_consumer_supplies = ARRAY_SIZE(ab8500_vana_consumers),
426 .consumer_supplies = ab8500_vana_consumers,
Sundar Iyer4f724be2010-09-15 10:50:59 +0100427 },
428};
Bengt Jonsson732805a2013-03-21 15:59:03 +0000429
430struct ab8500_regulator_platform_data ab8500_regulator_plat_data = {
431 .reg_init = ab8500_reg_init,
432 .num_reg_init = ARRAY_SIZE(ab8500_reg_init),
433 .regulator = ab8500_regulators,
434 .num_regulator = ARRAY_SIZE(ab8500_regulators),
435};