blob: 6abf0a85b8643673431fdf89100335a425b6c7e8 [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"),
Lee Jones5379f022013-03-21 15:59:13 +000081 /* Cypress TrueTouch Touchscreen device */
82 REGULATOR_SUPPLY("vcpin", "spi8.0"),
Linus Walleijd1de85a2010-12-02 17:10:14 +010083};
84
85static struct regulator_consumer_supply ab8500_vaux2_consumers[] = {
86 /* On-board eMMC power */
87 REGULATOR_SUPPLY("vmmc", "sdi4"),
88 /* AB8500 audio codec */
89 REGULATOR_SUPPLY("vcc-N2158", "ab8500-codec.0"),
90};
91
92static struct regulator_consumer_supply ab8500_vaux3_consumers[] = {
93 /* External MMC slot power */
94 REGULATOR_SUPPLY("vmmc", "sdi0"),
95};
96
97static struct regulator_consumer_supply ab8500_vtvout_consumers[] = {
98 /* TV-out DENC supply */
99 REGULATOR_SUPPLY("vtvout", "ab8500-denc.0"),
100 /* Internal general-purpose ADC */
101 REGULATOR_SUPPLY("vddadc", "ab8500-gpadc.0"),
102};
103
Ola Lilja29bd2ab2012-02-01 14:18:10 +0100104static struct regulator_consumer_supply ab8500_vaud_consumers[] = {
105 /* AB8500 audio-codec main supply */
106 REGULATOR_SUPPLY("vaud", "ab8500-codec.0"),
107};
108
109static struct regulator_consumer_supply ab8500_vamic1_consumers[] = {
110 /* AB8500 audio-codec Mic1 supply */
111 REGULATOR_SUPPLY("vamic1", "ab8500-codec.0"),
112};
113
114static struct regulator_consumer_supply ab8500_vamic2_consumers[] = {
115 /* AB8500 audio-codec Mic2 supply */
116 REGULATOR_SUPPLY("vamic2", "ab8500-codec.0"),
117};
118
119static struct regulator_consumer_supply ab8500_vdmic_consumers[] = {
120 /* AB8500 audio-codec DMic supply */
121 REGULATOR_SUPPLY("vdmic", "ab8500-codec.0"),
122};
123
Linus Walleijd1de85a2010-12-02 17:10:14 +0100124static struct regulator_consumer_supply ab8500_vintcore_consumers[] = {
125 /* SoC core supply, no device */
126 REGULATOR_SUPPLY("v-intcore", NULL),
Joe Perches7c9d4402011-06-23 11:39:20 -0700127 /* USB Transceiver */
Linus Walleijd1de85a2010-12-02 17:10:14 +0100128 REGULATOR_SUPPLY("vddulpivio18", "ab8500-usb.0"),
129};
130
131static struct regulator_consumer_supply ab8500_vana_consumers[] = {
132 /* External displays, connector on board, 1v8 power supply */
133 REGULATOR_SUPPLY("vsmps2", "mcde.0"),
134};
Sundar Iyer4f724be2010-09-15 10:50:59 +0100135
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100136/* ab8500 regulator register initialization */
Bengt Jonsson732805a2013-03-21 15:59:03 +0000137static struct ab8500_regulator_reg_init ab8500_reg_init[] = {
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100138 /*
139 * VanaRequestCtrl = HP/LP depending on VxRequest
Lee Jonesd79df322013-03-21 15:58:58 +0000140 * VpllRequestCtrl = HP/LP depending on VxRequest
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100141 * VextSupply1RequestCtrl = HP/LP depending on VxRequest
142 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000143 INIT_REGULATOR_REGISTER(AB8500_REGUREQUESTCTRL2, 0xfc, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100144 /*
145 * VextSupply2RequestCtrl = HP/LP depending on VxRequest
146 * VextSupply3RequestCtrl = HP/LP depending on VxRequest
147 * Vaux1RequestCtrl = HP/LP depending on VxRequest
148 * Vaux2RequestCtrl = HP/LP depending on VxRequest
149 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000150 INIT_REGULATOR_REGISTER(AB8500_REGUREQUESTCTRL3, 0xff, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100151 /*
152 * Vaux3RequestCtrl = HP/LP depending on VxRequest
153 * SwHPReq = Control through SWValid disabled
154 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000155 INIT_REGULATOR_REGISTER(AB8500_REGUREQUESTCTRL4, 0x07, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100156 /*
Lee Jonesd79df322013-03-21 15:58:58 +0000157 * Vsmps1SysClkReq1HPValid = enabled
158 * Vsmps2SysClkReq1HPValid = enabled
159 * Vsmps3SysClkReq1HPValid = enabled
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100160 * VanaSysClkReq1HPValid = disabled
Lee Jonesd79df322013-03-21 15:58:58 +0000161 * VpllSysClkReq1HPValid = enabled
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100162 * Vaux1SysClkReq1HPValid = disabled
163 * Vaux2SysClkReq1HPValid = disabled
164 * Vaux3SysClkReq1HPValid = disabled
165 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000166 INIT_REGULATOR_REGISTER(AB8500_REGUSYSCLKREQ1HPVALID1, 0xff, 0x17),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100167 /*
168 * VextSupply1SysClkReq1HPValid = disabled
169 * VextSupply2SysClkReq1HPValid = disabled
170 * VextSupply3SysClkReq1HPValid = SysClkReq1 controlled
171 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000172 INIT_REGULATOR_REGISTER(AB8500_REGUSYSCLKREQ1HPVALID2, 0x70, 0x40),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100173 /*
174 * VanaHwHPReq1Valid = disabled
175 * Vaux1HwHPreq1Valid = disabled
176 * Vaux2HwHPReq1Valid = disabled
177 * Vaux3HwHPReqValid = disabled
178 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000179 INIT_REGULATOR_REGISTER(AB8500_REGUHWHPREQ1VALID1, 0xe8, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100180 /*
181 * VextSupply1HwHPReq1Valid = disabled
182 * VextSupply2HwHPReq1Valid = disabled
183 * VextSupply3HwHPReq1Valid = disabled
184 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000185 INIT_REGULATOR_REGISTER(AB8500_REGUHWHPREQ1VALID2, 0x07, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100186 /*
187 * VanaHwHPReq2Valid = disabled
188 * Vaux1HwHPReq2Valid = disabled
189 * Vaux2HwHPReq2Valid = disabled
190 * Vaux3HwHPReq2Valid = disabled
191 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000192 INIT_REGULATOR_REGISTER(AB8500_REGUHWHPREQ2VALID1, 0xe8, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100193 /*
194 * VextSupply1HwHPReq2Valid = disabled
195 * VextSupply2HwHPReq2Valid = disabled
196 * VextSupply3HwHPReq2Valid = HWReq2 controlled
197 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000198 INIT_REGULATOR_REGISTER(AB8500_REGUHWHPREQ2VALID2, 0x07, 0x04),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100199 /*
200 * VanaSwHPReqValid = disabled
201 * Vaux1SwHPReqValid = disabled
202 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000203 INIT_REGULATOR_REGISTER(AB8500_REGUSWHPREQVALID1, 0xa0, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100204 /*
205 * Vaux2SwHPReqValid = disabled
206 * Vaux3SwHPReqValid = disabled
207 * VextSupply1SwHPReqValid = disabled
208 * VextSupply2SwHPReqValid = disabled
209 * VextSupply3SwHPReqValid = disabled
210 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000211 INIT_REGULATOR_REGISTER(AB8500_REGUSWHPREQVALID2, 0x1f, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100212 /*
213 * SysClkReq2Valid1 = SysClkReq2 controlled
214 * SysClkReq3Valid1 = disabled
215 * SysClkReq4Valid1 = SysClkReq4 controlled
216 * SysClkReq5Valid1 = disabled
217 * SysClkReq6Valid1 = SysClkReq6 controlled
218 * SysClkReq7Valid1 = disabled
219 * SysClkReq8Valid1 = disabled
220 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000221 INIT_REGULATOR_REGISTER(AB8500_REGUSYSCLKREQVALID1, 0xfe, 0x2a),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100222 /*
223 * SysClkReq2Valid2 = disabled
224 * SysClkReq3Valid2 = disabled
225 * SysClkReq4Valid2 = disabled
226 * SysClkReq5Valid2 = disabled
227 * SysClkReq6Valid2 = SysClkReq6 controlled
228 * SysClkReq7Valid2 = disabled
229 * SysClkReq8Valid2 = disabled
230 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000231 INIT_REGULATOR_REGISTER(AB8500_REGUSYSCLKREQVALID2, 0xfe, 0x20),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100232 /*
233 * VTVoutEna = disabled
234 * Vintcore12Ena = disabled
235 * Vintcore12Sel = 1.25 V
236 * Vintcore12LP = inactive (HP)
237 * VTVoutLP = inactive (HP)
238 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000239 INIT_REGULATOR_REGISTER(AB8500_REGUMISC1, 0xfe, 0x10),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100240 /*
241 * VaudioEna = disabled
242 * VdmicEna = disabled
243 * Vamic1Ena = disabled
244 * Vamic2Ena = disabled
245 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000246 INIT_REGULATOR_REGISTER(AB8500_VAUDIOSUPPLY, 0x1e, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100247 /*
248 * Vamic1_dzout = high-Z when Vamic1 is disabled
249 * Vamic2_dzout = high-Z when Vamic2 is disabled
250 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000251 INIT_REGULATOR_REGISTER(AB8500_REGUCTRL1VAMIC, 0x03, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100252 /*
Lee Jonesd79df322013-03-21 15:58:58 +0000253 * Vsmps1Regu = HW control
254 * Vsmps1SelCtrl = Vsmps1 voltage defined by Vsmsp1Sel2
255 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000256 INIT_REGULATOR_REGISTER(AB8500_VSMPS1REGU, 0x0f, 0x06),
Lee Jonesd79df322013-03-21 15:58:58 +0000257 /*
258 * Vsmps2Regu = HW control
259 * Vsmps2SelCtrl = Vsmps2 voltage defined by Vsmsp2Sel2
260 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000261 INIT_REGULATOR_REGISTER(AB8500_VSMPS2REGU, 0x0f, 0x06),
Lee Jonesd79df322013-03-21 15:58:58 +0000262 /*
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100263 * VPll = Hw controlled
264 * VanaRegu = force off
265 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000266 INIT_REGULATOR_REGISTER(AB8500_VPLLVANAREGU, 0x0f, 0x02),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100267 /*
268 * VrefDDREna = disabled
269 * VrefDDRSleepMode = inactive (no pulldown)
270 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000271 INIT_REGULATOR_REGISTER(AB8500_VREFDDR, 0x03, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100272 /*
273 * VextSupply1Regu = HW control
274 * VextSupply2Regu = HW control
275 * VextSupply3Regu = HW control
276 * ExtSupply2Bypass = ExtSupply12LPn ball is 0 when Ena is 0
277 * ExtSupply3Bypass = ExtSupply3LPn ball is 0 when Ena is 0
278 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000279 INIT_REGULATOR_REGISTER(AB8500_EXTSUPPLYREGU, 0xff, 0x1a),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100280 /*
281 * Vaux1Regu = force HP
282 * Vaux2Regu = force off
283 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000284 INIT_REGULATOR_REGISTER(AB8500_VAUX12REGU, 0x0f, 0x01),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100285 /*
Lee Jonesd79df322013-03-21 15:58:58 +0000286 * Vrf1Regu = HW control
287 * Vaux3Regu = force off
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100288 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000289 INIT_REGULATOR_REGISTER(AB8500_VRF1VAUX3REGU, 0x0f, 0x08),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100290 /*
291 * Vsmps1 = 1.15V
292 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000293 INIT_REGULATOR_REGISTER(AB8500_VSMPS1SEL1, 0x3f, 0x24),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100294 /*
295 * Vaux1Sel = 2.5 V
296 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000297 INIT_REGULATOR_REGISTER(AB8500_VAUX1SEL, 0x0f, 0x08),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100298 /*
299 * Vaux2Sel = 2.9 V
300 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000301 INIT_REGULATOR_REGISTER(AB8500_VAUX2SEL, 0x0f, 0x0d),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100302 /*
303 * Vaux3Sel = 2.91 V
304 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000305 INIT_REGULATOR_REGISTER(AB8500_VRF1VAUX3SEL, 0x07, 0x07),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100306 /*
307 * VextSupply12LP = disabled (no LP)
308 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000309 INIT_REGULATOR_REGISTER(AB8500_REGUCTRL2SPARE, 0x01, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100310 /*
311 * Vaux1Disch = short discharge time
312 * Vaux2Disch = short discharge time
313 * Vaux3Disch = short discharge time
314 * Vintcore12Disch = short discharge time
315 * VTVoutDisch = short discharge time
316 * VaudioDisch = short discharge time
317 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000318 INIT_REGULATOR_REGISTER(AB8500_REGUCTRLDISCH, 0xfc, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100319 /*
320 * VanaDisch = short discharge time
321 * VdmicPullDownEna = pulldown disabled when Vdmic is disabled
322 * VdmicDisch = short discharge time
323 */
Lee Jones3c1b8432013-03-21 15:59:01 +0000324 INIT_REGULATOR_REGISTER(AB8500_REGUCTRLDISCH2, 0x16, 0x00),
Bengt Jonssondfa3a822011-03-09 13:34:17 +0100325};
326
Bengt Jonssona1e516e2010-12-10 11:08:48 +0100327/* AB8500 regulators */
Bengt Jonsson732805a2013-03-21 15:59:03 +0000328static struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = {
Bengt Jonssona1e516e2010-12-10 11:08:48 +0100329 /* supplies to the display/camera */
330 [AB8500_LDO_AUX1] = {
331 .constraints = {
332 .name = "V-DISPLAY",
333 .min_uV = 2500000,
334 .max_uV = 2900000,
335 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
336 REGULATOR_CHANGE_STATUS,
Linus Walleijdb245202011-04-04 10:44:51 +0200337 .boot_on = 1, /* display is on at boot */
338 /*
339 * This voltage cannot be disabled right now because
340 * it is somehow affecting the external MMC
341 * functionality, though that typically will use
342 * AUX3.
343 */
344 .always_on = 1,
Bengt Jonssona1e516e2010-12-10 11:08:48 +0100345 },
Linus Walleijd1de85a2010-12-02 17:10:14 +0100346 .num_consumer_supplies = ARRAY_SIZE(ab8500_vaux1_consumers),
347 .consumer_supplies = ab8500_vaux1_consumers,
Bengt Jonssona1e516e2010-12-10 11:08:48 +0100348 },
349 /* supplies to the on-board eMMC */
350 [AB8500_LDO_AUX2] = {
351 .constraints = {
352 .name = "V-eMMC1",
353 .min_uV = 1100000,
354 .max_uV = 3300000,
355 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
356 REGULATOR_CHANGE_STATUS,
357 },
Linus Walleijd1de85a2010-12-02 17:10:14 +0100358 .num_consumer_supplies = ARRAY_SIZE(ab8500_vaux2_consumers),
359 .consumer_supplies = ab8500_vaux2_consumers,
Bengt Jonssona1e516e2010-12-10 11:08:48 +0100360 },
361 /* supply for VAUX3, supplies to SDcard slots */
362 [AB8500_LDO_AUX3] = {
363 .constraints = {
364 .name = "V-MMC-SD",
365 .min_uV = 1100000,
366 .max_uV = 3300000,
367 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
368 REGULATOR_CHANGE_STATUS,
369 },
Linus Walleijd1de85a2010-12-02 17:10:14 +0100370 .num_consumer_supplies = ARRAY_SIZE(ab8500_vaux3_consumers),
371 .consumer_supplies = ab8500_vaux3_consumers,
Bengt Jonssona1e516e2010-12-10 11:08:48 +0100372 },
373 /* supply for tvout, gpadc, TVOUT LDO */
374 [AB8500_LDO_TVOUT] = {
375 .constraints = {
376 .name = "V-TVOUT",
377 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
378 },
Linus Walleijd1de85a2010-12-02 17:10:14 +0100379 .num_consumer_supplies = ARRAY_SIZE(ab8500_vtvout_consumers),
380 .consumer_supplies = ab8500_vtvout_consumers,
Bengt Jonssona1e516e2010-12-10 11:08:48 +0100381 },
382 /* supply for ab8500-vaudio, VAUDIO LDO */
383 [AB8500_LDO_AUDIO] = {
384 .constraints = {
385 .name = "V-AUD",
386 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
387 },
Ola Lilja29bd2ab2012-02-01 14:18:10 +0100388 .num_consumer_supplies = ARRAY_SIZE(ab8500_vaud_consumers),
389 .consumer_supplies = ab8500_vaud_consumers,
Bengt Jonssona1e516e2010-12-10 11:08:48 +0100390 },
391 /* supply for v-anamic1 VAMic1-LDO */
392 [AB8500_LDO_ANAMIC1] = {
393 .constraints = {
394 .name = "V-AMIC1",
395 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
396 },
Ola Lilja29bd2ab2012-02-01 14:18:10 +0100397 .num_consumer_supplies = ARRAY_SIZE(ab8500_vamic1_consumers),
398 .consumer_supplies = ab8500_vamic1_consumers,
Bengt Jonssona1e516e2010-12-10 11:08:48 +0100399 },
400 /* supply for v-amic2, VAMIC2 LDO, reuse constants for AMIC1 */
401 [AB8500_LDO_ANAMIC2] = {
402 .constraints = {
403 .name = "V-AMIC2",
404 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
405 },
Ola Lilja29bd2ab2012-02-01 14:18:10 +0100406 .num_consumer_supplies = ARRAY_SIZE(ab8500_vamic2_consumers),
407 .consumer_supplies = ab8500_vamic2_consumers,
Bengt Jonssona1e516e2010-12-10 11:08:48 +0100408 },
409 /* supply for v-dmic, VDMIC LDO */
410 [AB8500_LDO_DMIC] = {
411 .constraints = {
412 .name = "V-DMIC",
413 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
414 },
Ola Lilja29bd2ab2012-02-01 14:18:10 +0100415 .num_consumer_supplies = ARRAY_SIZE(ab8500_vdmic_consumers),
416 .consumer_supplies = ab8500_vdmic_consumers,
Bengt Jonssona1e516e2010-12-10 11:08:48 +0100417 },
418 /* supply for v-intcore12, VINTCORE12 LDO */
419 [AB8500_LDO_INTCORE] = {
420 .constraints = {
421 .name = "V-INTCORE",
422 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
423 },
Linus Walleijd1de85a2010-12-02 17:10:14 +0100424 .num_consumer_supplies = ARRAY_SIZE(ab8500_vintcore_consumers),
425 .consumer_supplies = ab8500_vintcore_consumers,
Bengt Jonssona1e516e2010-12-10 11:08:48 +0100426 },
427 /* supply for U8500 CSI/DSI, VANA LDO */
428 [AB8500_LDO_ANA] = {
429 .constraints = {
430 .name = "V-CSI/DSI",
431 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
432 },
Linus Walleijd1de85a2010-12-02 17:10:14 +0100433 .num_consumer_supplies = ARRAY_SIZE(ab8500_vana_consumers),
434 .consumer_supplies = ab8500_vana_consumers,
Sundar Iyer4f724be2010-09-15 10:50:59 +0100435 },
436};
Bengt Jonsson732805a2013-03-21 15:59:03 +0000437
438struct ab8500_regulator_platform_data ab8500_regulator_plat_data = {
439 .reg_init = ab8500_reg_init,
440 .num_reg_init = ARRAY_SIZE(ab8500_reg_init),
441 .regulator = ab8500_regulators,
442 .num_regulator = ARRAY_SIZE(ab8500_regulators),
443};