2 * Copyright (C) ST-Ericsson SA 2010
4 * License Terms: GNU General Public License v2
6 * Authors: Sundar Iyer <sundar.iyer@stericsson.com>
7 * Bengt Jonsson <bengt.g.jonsson@stericsson.com>
9 * MOP500 board specific initialization for regulators
11 #include <linux/kernel.h>
12 #include <linux/regulator/machine.h>
13 #include <linux/regulator/ab8500.h>
14 #include "board-mop500-regulators.h"
16 static struct regulator_consumer_supply ab8500_vaux1_consumers[] = {
17 /* External displays, connector on board 2v5 power supply */
18 REGULATOR_SUPPLY("vaux12v5", "mcde.0"),
19 /* SFH7741 proximity sensor */
20 REGULATOR_SUPPLY("vcc", "gpio-keys.0"),
21 /* BH1780GLS ambient light sensor */
22 REGULATOR_SUPPLY("vcc", "2-0029"),
23 /* lsm303dlh accelerometer */
24 REGULATOR_SUPPLY("vdd", "3-0018"),
25 /* lsm303dlh magnetometer */
26 REGULATOR_SUPPLY("vdd", "3-001e"),
27 /* Rohm BU21013 Touchscreen devices */
28 REGULATOR_SUPPLY("avdd", "3-005c"),
29 REGULATOR_SUPPLY("avdd", "3-005d"),
30 /* Synaptics RMI4 Touchscreen device */
31 REGULATOR_SUPPLY("vdd", "3-004b"),
34 static struct regulator_consumer_supply ab8500_vaux2_consumers[] = {
35 /* On-board eMMC power */
36 REGULATOR_SUPPLY("vmmc", "sdi4"),
37 /* AB8500 audio codec */
38 REGULATOR_SUPPLY("vcc-N2158", "ab8500-codec.0"),
41 static struct regulator_consumer_supply ab8500_vaux3_consumers[] = {
42 /* External MMC slot power */
43 REGULATOR_SUPPLY("vmmc", "sdi0"),
46 static struct regulator_consumer_supply ab8500_vtvout_consumers[] = {
47 /* TV-out DENC supply */
48 REGULATOR_SUPPLY("vtvout", "ab8500-denc.0"),
49 /* Internal general-purpose ADC */
50 REGULATOR_SUPPLY("vddadc", "ab8500-gpadc.0"),
53 static struct regulator_consumer_supply ab8500_vintcore_consumers[] = {
54 /* SoC core supply, no device */
55 REGULATOR_SUPPLY("v-intcore", NULL),
57 REGULATOR_SUPPLY("vddulpivio18", "ab8500-usb.0"),
60 static struct regulator_consumer_supply ab8500_vana_consumers[] = {
61 /* External displays, connector on board, 1v8 power supply */
62 REGULATOR_SUPPLY("vsmps2", "mcde.0"),
65 /* AB8500 regulators */
66 struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = {
67 /* supplies to the display/camera */
73 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
74 REGULATOR_CHANGE_STATUS,
76 .num_consumer_supplies = ARRAY_SIZE(ab8500_vaux1_consumers),
77 .consumer_supplies = ab8500_vaux1_consumers,
79 /* supplies to the on-board eMMC */
85 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
86 REGULATOR_CHANGE_STATUS,
88 .num_consumer_supplies = ARRAY_SIZE(ab8500_vaux2_consumers),
89 .consumer_supplies = ab8500_vaux2_consumers,
91 /* supply for VAUX3, supplies to SDcard slots */
97 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
98 REGULATOR_CHANGE_STATUS,
100 .num_consumer_supplies = ARRAY_SIZE(ab8500_vaux3_consumers),
101 .consumer_supplies = ab8500_vaux3_consumers,
103 /* supply for tvout, gpadc, TVOUT LDO */
104 [AB8500_LDO_TVOUT] = {
107 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
109 .num_consumer_supplies = ARRAY_SIZE(ab8500_vtvout_consumers),
110 .consumer_supplies = ab8500_vtvout_consumers,
112 /* supply for ab8500-vaudio, VAUDIO LDO */
113 [AB8500_LDO_AUDIO] = {
116 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
119 /* supply for v-anamic1 VAMic1-LDO */
120 [AB8500_LDO_ANAMIC1] = {
123 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
126 /* supply for v-amic2, VAMIC2 LDO, reuse constants for AMIC1 */
127 [AB8500_LDO_ANAMIC2] = {
130 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
133 /* supply for v-dmic, VDMIC LDO */
134 [AB8500_LDO_DMIC] = {
137 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
140 /* supply for v-intcore12, VINTCORE12 LDO */
141 [AB8500_LDO_INTCORE] = {
144 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
146 .num_consumer_supplies = ARRAY_SIZE(ab8500_vintcore_consumers),
147 .consumer_supplies = ab8500_vintcore_consumers,
149 /* supply for U8500 CSI/DSI, VANA LDO */
153 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
155 .num_consumer_supplies = ARRAY_SIZE(ab8500_vana_consumers),
156 .consumer_supplies = ab8500_vana_consumers,