blob: 3775bfe1b76b9ae1841f082838fa0a4e362ff330 [file] [log] [blame]
Jay Chokshiea67c622011-07-29 17:12:26 -07001/*
Vikram Mulukutlabc2e9572011-11-04 03:41:38 -07002 * Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved.
Jay Chokshiea67c622011-07-29 17:12:26 -07003 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 and
6 * only version 2 as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 */
13
David Collins75016742011-12-02 15:04:25 -080014#include <linux/regulator/pm8xxx-regulator.h>
Jay Chokshiea67c622011-07-29 17:12:26 -070015
Stepan Moskovchenko5a83dba2011-12-05 17:30:17 -080016#include "board-8064.h"
Jay Chokshiea67c622011-07-29 17:12:26 -070017
18#define VREG_CONSUMERS(_id) \
19 static struct regulator_consumer_supply vreg_consumers_##_id[]
20
21/*
22 * Consumer specific regulator names:
23 * regulator name consumer dev_name
24 */
25VREG_CONSUMERS(L1) = {
26 REGULATOR_SUPPLY("8921_l1", NULL),
27};
28VREG_CONSUMERS(L2) = {
29 REGULATOR_SUPPLY("8921_l2", NULL),
Jeyaprakash Soundrapandianf0d4d012012-01-16 15:12:20 -080030 REGULATOR_SUPPLY("mipi_csi_vdd", "4-001a"),
31 REGULATOR_SUPPLY("mipi_csi_vdd", "4-006c"),
Jay Chokshiea67c622011-07-29 17:12:26 -070032};
33VREG_CONSUMERS(L3) = {
34 REGULATOR_SUPPLY("8921_l3", NULL),
Hemant Kumar6ddad592011-08-03 19:31:56 -070035 REGULATOR_SUPPLY("HSUSB_3p3", "msm_otg"),
Manu Gautamdccbca42011-11-08 15:13:38 +053036 REGULATOR_SUPPLY("HSUSB_3p3", "msm_ehci_host.0"),
37 REGULATOR_SUPPLY("HSUSB_3p3", "msm_ehci_host.1"),
Jay Chokshiea67c622011-07-29 17:12:26 -070038};
39VREG_CONSUMERS(L4) = {
40 REGULATOR_SUPPLY("8921_l4", NULL),
Hemant Kumar6ddad592011-08-03 19:31:56 -070041 REGULATOR_SUPPLY("HSUSB_1p8", "msm_otg"),
Manu Gautamdccbca42011-11-08 15:13:38 +053042 REGULATOR_SUPPLY("HSUSB_1p8", "msm_ehci_host.0"),
43 REGULATOR_SUPPLY("HSUSB_1p8", "msm_ehci_host.1"),
Subramanian Srinivasan04d2c832012-01-17 11:26:36 -080044 REGULATOR_SUPPLY("iris_vddxo", "wcnss_wlan.0"),
Jay Chokshiea67c622011-07-29 17:12:26 -070045};
46VREG_CONSUMERS(L5) = {
47 REGULATOR_SUPPLY("8921_l5", NULL),
Sahitya Tummalab4d883f2011-08-23 10:44:51 +053048 REGULATOR_SUPPLY("sdc_vdd", "msm_sdcc.1"),
Jay Chokshiea67c622011-07-29 17:12:26 -070049};
50VREG_CONSUMERS(L6) = {
51 REGULATOR_SUPPLY("8921_l6", NULL),
Sahitya Tummalab4d883f2011-08-23 10:44:51 +053052 REGULATOR_SUPPLY("sdc_vdd", "msm_sdcc.3"),
Jay Chokshiea67c622011-07-29 17:12:26 -070053};
54VREG_CONSUMERS(L7) = {
55 REGULATOR_SUPPLY("8921_l7", NULL),
Sahitya Tummalab4d883f2011-08-23 10:44:51 +053056 REGULATOR_SUPPLY("sdc_vddp", "msm_sdcc.3"),
Jay Chokshiea67c622011-07-29 17:12:26 -070057};
58VREG_CONSUMERS(L8) = {
59 REGULATOR_SUPPLY("8921_l8", NULL),
Jeyaprakash Soundrapandianf0d4d012012-01-16 15:12:20 -080060 REGULATOR_SUPPLY("cam_vana", "4-001a"),
61 REGULATOR_SUPPLY("cam_vana", "4-006c"),
Jay Chokshiea67c622011-07-29 17:12:26 -070062};
63VREG_CONSUMERS(L9) = {
64 REGULATOR_SUPPLY("8921_l9", NULL),
65};
66VREG_CONSUMERS(L10) = {
67 REGULATOR_SUPPLY("8921_l10", NULL),
Subramanian Srinivasan04d2c832012-01-17 11:26:36 -080068 REGULATOR_SUPPLY("iris_vddpa", "wcnss_wlan.0"),
Jay Chokshiea67c622011-07-29 17:12:26 -070069};
70VREG_CONSUMERS(L11) = {
71 REGULATOR_SUPPLY("8921_l11", NULL),
72};
73VREG_CONSUMERS(L12) = {
Jeyaprakash Soundrapandianf0d4d012012-01-16 15:12:20 -080074 REGULATOR_SUPPLY("cam_vdig", "4-001a"),
75 REGULATOR_SUPPLY("cam_vdig", "4-006c"),
Jay Chokshiea67c622011-07-29 17:12:26 -070076 REGULATOR_SUPPLY("8921_l12", NULL),
77};
78VREG_CONSUMERS(L14) = {
79 REGULATOR_SUPPLY("8921_l14", NULL),
80};
81VREG_CONSUMERS(L15) = {
82 REGULATOR_SUPPLY("8921_l15", NULL),
83};
84VREG_CONSUMERS(L16) = {
85 REGULATOR_SUPPLY("8921_l16", NULL),
Jeyaprakash Soundrapandianf0d4d012012-01-16 15:12:20 -080086 REGULATOR_SUPPLY("cam_vaf", "4-001a"),
87 REGULATOR_SUPPLY("cam_vaf", "4-006c"),
Jay Chokshiea67c622011-07-29 17:12:26 -070088};
89VREG_CONSUMERS(L17) = {
90 REGULATOR_SUPPLY("8921_l17", NULL),
91};
92VREG_CONSUMERS(L18) = {
93 REGULATOR_SUPPLY("8921_l18", NULL),
94};
95VREG_CONSUMERS(L22) = {
96 REGULATOR_SUPPLY("8921_l22", NULL),
97};
98VREG_CONSUMERS(L23) = {
99 REGULATOR_SUPPLY("8921_l23", NULL),
100};
101VREG_CONSUMERS(L24) = {
102 REGULATOR_SUPPLY("8921_l24", NULL),
Subramanian Srinivasan04d2c832012-01-17 11:26:36 -0800103 REGULATOR_SUPPLY("riva_vddmx", "wcnss_wlan.0"),
Jay Chokshiea67c622011-07-29 17:12:26 -0700104};
105VREG_CONSUMERS(L25) = {
106 REGULATOR_SUPPLY("8921_l25", NULL),
Swaminathan Sathappan2f51a752011-12-05 12:51:19 -0800107 REGULATOR_SUPPLY("VDDD_CDC_D", "tabla-slim"),
108 REGULATOR_SUPPLY("CDC_VDDA_A_1P2V", "tabla-slim"),
Jay Chokshiea67c622011-07-29 17:12:26 -0700109};
110VREG_CONSUMERS(L26) = {
111 REGULATOR_SUPPLY("8921_l26", NULL),
Matt Wagantallb94b9a52012-02-02 21:59:54 -0800112 REGULATOR_SUPPLY("core_vdd", "pil_qdsp6v4.0"),
Jay Chokshiea67c622011-07-29 17:12:26 -0700113};
114VREG_CONSUMERS(L27) = {
115 REGULATOR_SUPPLY("8921_l27", NULL),
116};
117VREG_CONSUMERS(L28) = {
118 REGULATOR_SUPPLY("8921_l28", NULL),
119};
120VREG_CONSUMERS(S1) = {
121 REGULATOR_SUPPLY("8921_s1", NULL),
122};
123VREG_CONSUMERS(S2) = {
124 REGULATOR_SUPPLY("8921_s2", NULL),
Subramanian Srinivasan04d2c832012-01-17 11:26:36 -0800125 REGULATOR_SUPPLY("iris_vddrfa", "wcnss_wlan.0"),
Jay Chokshiea67c622011-07-29 17:12:26 -0700126};
127VREG_CONSUMERS(S3) = {
128 REGULATOR_SUPPLY("8921_s3", NULL),
Hemant Kumar6ddad592011-08-03 19:31:56 -0700129 REGULATOR_SUPPLY("HSUSB_VDDCX", "msm_otg"),
Manu Gautamdccbca42011-11-08 15:13:38 +0530130 REGULATOR_SUPPLY("HSUSB_VDDCX", "msm_ehci_host.0"),
131 REGULATOR_SUPPLY("HSUSB_VDDCX", "msm_ehci_host.1"),
Hemant Kumara945b472012-01-25 15:08:06 -0800132 REGULATOR_SUPPLY("HSIC_VDDCX", "msm_hsic_host"),
Subramanian Srinivasan04d2c832012-01-17 11:26:36 -0800133 REGULATOR_SUPPLY("riva_vddcx", "wcnss_wlan.0"),
Jay Chokshiea67c622011-07-29 17:12:26 -0700134};
135VREG_CONSUMERS(S4) = {
136 REGULATOR_SUPPLY("8921_s4", NULL),
Sahitya Tummalab4d883f2011-08-23 10:44:51 +0530137 REGULATOR_SUPPLY("sdc_vccq", "msm_sdcc.1"),
Swaminathan Sathappan2f51a752011-12-05 12:51:19 -0800138 REGULATOR_SUPPLY("VDDIO_CDC", "tabla-slim"),
139 REGULATOR_SUPPLY("CDC_VDD_CP", "tabla-slim"),
140 REGULATOR_SUPPLY("CDC_VDDA_TX", "tabla-slim"),
141 REGULATOR_SUPPLY("CDC_VDDA_RX", "tabla-slim"),
Subramanian Srinivasan04d2c832012-01-17 11:26:36 -0800142 REGULATOR_SUPPLY("riva_vddpx", "wcnss_wlan.0"),
Jay Chokshiea67c622011-07-29 17:12:26 -0700143};
144VREG_CONSUMERS(S5) = {
145 REGULATOR_SUPPLY("8921_s5", NULL),
Vikram Mulukutlabc2e9572011-11-04 03:41:38 -0700146 REGULATOR_SUPPLY("krait0", NULL),
Jay Chokshiea67c622011-07-29 17:12:26 -0700147};
148VREG_CONSUMERS(S6) = {
149 REGULATOR_SUPPLY("8921_s6", NULL),
Vikram Mulukutlabc2e9572011-11-04 03:41:38 -0700150 REGULATOR_SUPPLY("krait1", NULL),
Jay Chokshiea67c622011-07-29 17:12:26 -0700151};
152VREG_CONSUMERS(S7) = {
153 REGULATOR_SUPPLY("8921_s7", NULL),
154};
155VREG_CONSUMERS(LVS1) = {
156 REGULATOR_SUPPLY("8921_lvs1", NULL),
Subramanian Srinivasan04d2c832012-01-17 11:26:36 -0800157 REGULATOR_SUPPLY("iris_vddio", "wcnss_wlan.0"),
Jay Chokshiea67c622011-07-29 17:12:26 -0700158};
159VREG_CONSUMERS(LVS2) = {
160 REGULATOR_SUPPLY("8921_lvs2", NULL),
Subramanian Srinivasan04d2c832012-01-17 11:26:36 -0800161 REGULATOR_SUPPLY("iris_vdddig", "wcnss_wlan.0"),
Jay Chokshiea67c622011-07-29 17:12:26 -0700162};
163VREG_CONSUMERS(LVS3) = {
164 REGULATOR_SUPPLY("8921_lvs3", NULL),
165};
166VREG_CONSUMERS(LVS4) = {
167 REGULATOR_SUPPLY("8921_lvs4", NULL),
168};
169VREG_CONSUMERS(LVS5) = {
170 REGULATOR_SUPPLY("8921_lvs5", NULL),
Jeyaprakash Soundrapandianf0d4d012012-01-16 15:12:20 -0800171 REGULATOR_SUPPLY("cam_vio", "4-001a"),
172 REGULATOR_SUPPLY("cam_vio", "4-006c"),
Jay Chokshiea67c622011-07-29 17:12:26 -0700173};
174VREG_CONSUMERS(LVS6) = {
175 REGULATOR_SUPPLY("8921_lvs6", NULL),
176};
177VREG_CONSUMERS(LVS7) = {
178 REGULATOR_SUPPLY("8921_lvs7", NULL),
Matt Wagantall52dd0622012-02-02 18:26:16 -0800179 REGULATOR_SUPPLY("pll_vdd", "pil_riva"),
Jay Chokshiea67c622011-07-29 17:12:26 -0700180};
181VREG_CONSUMERS(USB_OTG) = {
182 REGULATOR_SUPPLY("8921_usb_otg", NULL),
Hemant Kumard86c4882012-01-24 19:39:37 -0800183 REGULATOR_SUPPLY("vbus_otg", "msm_otg"),
Jay Chokshiea67c622011-07-29 17:12:26 -0700184};
185VREG_CONSUMERS(HDMI_MVS) = {
186 REGULATOR_SUPPLY("8921_hdmi_mvs", NULL),
187};
188VREG_CONSUMERS(NCP) = {
189 REGULATOR_SUPPLY("8921_ncp", NULL),
190};
Jay Chokshi7805b5a2011-11-07 15:55:30 -0800191VREG_CONSUMERS(8821_S0) = {
192 REGULATOR_SUPPLY("8821_s0", NULL),
Vikram Mulukutlabc2e9572011-11-04 03:41:38 -0700193 REGULATOR_SUPPLY("krait2", NULL),
Jay Chokshi7805b5a2011-11-07 15:55:30 -0800194};
195VREG_CONSUMERS(8821_S1) = {
196 REGULATOR_SUPPLY("8821_s1", NULL),
Vikram Mulukutlabc2e9572011-11-04 03:41:38 -0700197 REGULATOR_SUPPLY("krait3", NULL),
Jay Chokshi7805b5a2011-11-07 15:55:30 -0800198};
David Collinsf0d00732012-01-25 15:46:50 -0800199VREG_CONSUMERS(EXT_5V) = {
200 REGULATOR_SUPPLY("ext_5v", NULL),
201};
202VREG_CONSUMERS(EXT_3P3V) = {
203 REGULATOR_SUPPLY("ext_3p3v", NULL),
Stepan Moskovchenkoc71c9792012-01-31 18:12:44 -0800204 REGULATOR_SUPPLY("vdd_io", "spi0.2"),
David Collinsf0d00732012-01-25 15:46:50 -0800205};
Jay Chokshiea67c622011-07-29 17:12:26 -0700206
David Collins75016742011-12-02 15:04:25 -0800207#define PM8XXX_VREG_INIT(_id, _name, _min_uV, _max_uV, _modes, _ops, \
208 _apply_uV, _pull_down, _always_on, _supply_regulator, \
209 _system_uA, _enable_time, _reg_id) \
Jay Chokshiea67c622011-07-29 17:12:26 -0700210 { \
211 .init_data = { \
212 .constraints = { \
213 .valid_modes_mask = _modes, \
214 .valid_ops_mask = _ops, \
215 .min_uV = _min_uV, \
216 .max_uV = _max_uV, \
217 .input_uV = _max_uV, \
218 .apply_uV = _apply_uV, \
219 .always_on = _always_on, \
David Collins75016742011-12-02 15:04:25 -0800220 .name = _name, \
Jay Chokshiea67c622011-07-29 17:12:26 -0700221 }, \
222 .num_consumer_supplies = \
223 ARRAY_SIZE(vreg_consumers_##_id), \
224 .consumer_supplies = vreg_consumers_##_id, \
225 .supply_regulator = _supply_regulator, \
226 }, \
David Collins75016742011-12-02 15:04:25 -0800227 .id = _reg_id, \
Jay Chokshiea67c622011-07-29 17:12:26 -0700228 .pull_down_enable = _pull_down, \
229 .system_uA = _system_uA, \
230 .enable_time = _enable_time, \
231 }
232
David Collins75016742011-12-02 15:04:25 -0800233#define PM8XXX_LDO(_id, _name, _always_on, _pull_down, _min_uV, _max_uV, \
234 _enable_time, _supply_regulator, _system_uA, _reg_id) \
235 PM8XXX_VREG_INIT(_id, _name, _min_uV, _max_uV, REGULATOR_MODE_NORMAL \
Jay Chokshiea67c622011-07-29 17:12:26 -0700236 | REGULATOR_MODE_IDLE, REGULATOR_CHANGE_VOLTAGE | \
237 REGULATOR_CHANGE_STATUS | REGULATOR_CHANGE_MODE | \
238 REGULATOR_CHANGE_DRMS, 0, _pull_down, _always_on, \
David Collins75016742011-12-02 15:04:25 -0800239 _supply_regulator, _system_uA, _enable_time, _reg_id)
Jay Chokshiea67c622011-07-29 17:12:26 -0700240
David Collins75016742011-12-02 15:04:25 -0800241#define PM8XXX_NLDO1200(_id, _name, _always_on, _pull_down, _min_uV, \
242 _max_uV, _enable_time, _supply_regulator, _system_uA, _reg_id) \
243 PM8XXX_VREG_INIT(_id, _name, _min_uV, _max_uV, REGULATOR_MODE_NORMAL \
Jay Chokshiea67c622011-07-29 17:12:26 -0700244 | REGULATOR_MODE_IDLE, REGULATOR_CHANGE_VOLTAGE | \
245 REGULATOR_CHANGE_STATUS | REGULATOR_CHANGE_MODE | \
246 REGULATOR_CHANGE_DRMS, 0, _pull_down, _always_on, \
David Collins75016742011-12-02 15:04:25 -0800247 _supply_regulator, _system_uA, _enable_time, _reg_id)
Jay Chokshiea67c622011-07-29 17:12:26 -0700248
David Collins75016742011-12-02 15:04:25 -0800249#define PM8XXX_SMPS(_id, _name, _always_on, _pull_down, _min_uV, _max_uV, \
250 _enable_time, _supply_regulator, _system_uA, _reg_id) \
251 PM8XXX_VREG_INIT(_id, _name, _min_uV, _max_uV, REGULATOR_MODE_NORMAL \
Jay Chokshiea67c622011-07-29 17:12:26 -0700252 | REGULATOR_MODE_IDLE, REGULATOR_CHANGE_VOLTAGE | \
253 REGULATOR_CHANGE_STATUS | REGULATOR_CHANGE_MODE | \
254 REGULATOR_CHANGE_DRMS, 0, _pull_down, _always_on, \
David Collins75016742011-12-02 15:04:25 -0800255 _supply_regulator, _system_uA, _enable_time, _reg_id)
Jay Chokshiea67c622011-07-29 17:12:26 -0700256
David Collins75016742011-12-02 15:04:25 -0800257#define PM8XXX_FTSMPS(_id, _name, _always_on, _pull_down, _min_uV, _max_uV, \
258 _enable_time, _supply_regulator, _system_uA, _reg_id) \
259 PM8XXX_VREG_INIT(_id, _name, _min_uV, _max_uV, REGULATOR_MODE_NORMAL, \
Jay Chokshiea67c622011-07-29 17:12:26 -0700260 REGULATOR_CHANGE_VOLTAGE | REGULATOR_CHANGE_STATUS \
261 | REGULATOR_CHANGE_MODE, 0, _pull_down, _always_on, \
David Collins75016742011-12-02 15:04:25 -0800262 _supply_regulator, _system_uA, _enable_time, _reg_id)
Jay Chokshiea67c622011-07-29 17:12:26 -0700263
David Collins75016742011-12-02 15:04:25 -0800264#define PM8XXX_VS(_id, _name, _always_on, _pull_down, _enable_time, \
265 _supply_regulator, _reg_id) \
266 PM8XXX_VREG_INIT(_id, _name, 0, 0, 0, REGULATOR_CHANGE_STATUS, 0, \
267 _pull_down, _always_on, _supply_regulator, 0, _enable_time, \
268 _reg_id)
Jay Chokshiea67c622011-07-29 17:12:26 -0700269
David Collins75016742011-12-02 15:04:25 -0800270#define PM8XXX_VS300(_id, _name, _always_on, _pull_down, _enable_time, \
271 _supply_regulator, _reg_id) \
272 PM8XXX_VREG_INIT(_id, _name, 0, 0, 0, REGULATOR_CHANGE_STATUS, 0, \
273 _pull_down, _always_on, _supply_regulator, 0, _enable_time, \
274 _reg_id)
Jay Chokshiea67c622011-07-29 17:12:26 -0700275
David Collins75016742011-12-02 15:04:25 -0800276#define PM8XXX_NCP(_id, _name, _always_on, _min_uV, _max_uV, _enable_time, \
277 _supply_regulator, _reg_id) \
278 PM8XXX_VREG_INIT(_id, _name, _min_uV, _max_uV, 0, \
279 REGULATOR_CHANGE_VOLTAGE | REGULATOR_CHANGE_STATUS, 0, 0, \
280 _always_on, _supply_regulator, 0, _enable_time, _reg_id)
Jay Chokshiea67c622011-07-29 17:12:26 -0700281
282/* Pin control initialization */
David Collins75016742011-12-02 15:04:25 -0800283#define PM8XXX_PC(_id, _name, _always_on, _pin_fn, _pin_ctrl, \
284 _supply_regulator, _reg_id) \
Jay Chokshiea67c622011-07-29 17:12:26 -0700285 { \
286 .init_data = { \
287 .constraints = { \
288 .valid_ops_mask = REGULATOR_CHANGE_STATUS, \
289 .always_on = _always_on, \
David Collins75016742011-12-02 15:04:25 -0800290 .name = _name, \
Jay Chokshiea67c622011-07-29 17:12:26 -0700291 }, \
292 .num_consumer_supplies = \
293 ARRAY_SIZE(vreg_consumers_##_id##_PC), \
294 .consumer_supplies = vreg_consumers_##_id##_PC, \
295 .supply_regulator = _supply_regulator, \
296 }, \
David Collins75016742011-12-02 15:04:25 -0800297 .id = _reg_id, \
298 .pin_fn = PM8XXX_VREG_PIN_FN_##_pin_fn, \
299 .pin_ctrl = _pin_ctrl, \
Jay Chokshiea67c622011-07-29 17:12:26 -0700300 }
301
David Collinsf0d00732012-01-25 15:46:50 -0800302#define GPIO_VREG(_id, _reg_name, _gpio_label, _gpio, _supply_regulator) \
303 [GPIO_VREG_ID_##_id] = { \
304 .init_data = { \
305 .constraints = { \
306 .valid_ops_mask = REGULATOR_CHANGE_STATUS, \
307 }, \
308 .num_consumer_supplies = \
309 ARRAY_SIZE(vreg_consumers_##_id), \
310 .consumer_supplies = vreg_consumers_##_id, \
311 .supply_regulator = _supply_regulator, \
312 }, \
313 .regulator_name = _reg_name, \
314 .gpio_label = _gpio_label, \
315 .gpio = _gpio, \
316 }
317
Jay Chokshiea67c622011-07-29 17:12:26 -0700318#define SAW_VREG_INIT(_id, _name, _min_uV, _max_uV) \
319 { \
320 .constraints = { \
321 .name = _name, \
322 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, \
323 .min_uV = _min_uV, \
324 .max_uV = _max_uV, \
325 }, \
326 .num_consumer_supplies = ARRAY_SIZE(vreg_consumers_##_id), \
327 .consumer_supplies = vreg_consumers_##_id, \
328 }
329
David Collinsf0d00732012-01-25 15:46:50 -0800330/* GPIO regulator constraints */
331struct gpio_regulator_platform_data
332apq8064_gpio_regulator_pdata[] __devinitdata = {
333 /* ID vreg_name gpio_label gpio supply */
334 GPIO_VREG(EXT_5V, "ext_5v", "ext_5v_en", PM8921_MPP_PM_TO_SYS(7), NULL),
335 GPIO_VREG(EXT_3P3V, "ext_3p3v", "ext_3p3v_en",
336 APQ8064_EXT_3P3V_REG_EN_GPIO, NULL),
337};
338
Jay Chokshiea67c622011-07-29 17:12:26 -0700339/* SAW regulator constraints */
Jay Chokshi7805b5a2011-11-07 15:55:30 -0800340struct regulator_init_data msm8064_saw_regulator_pdata_8921_s5 =
Jay Chokshiea67c622011-07-29 17:12:26 -0700341 /* ID vreg_name min_uV max_uV */
Jay Chokshi7805b5a2011-11-07 15:55:30 -0800342 SAW_VREG_INIT(S5, "8921_s5", 950000, 1150000);
343struct regulator_init_data msm8064_saw_regulator_pdata_8921_s6 =
344 SAW_VREG_INIT(S6, "8921_s6", 950000, 1150000);
345
346struct regulator_init_data msm8064_saw_regulator_pdata_8821_s0 =
347 /* ID vreg_name min_uV max_uV */
348 SAW_VREG_INIT(8821_S0, "8821_s0", 950000, 1150000);
349struct regulator_init_data msm8064_saw_regulator_pdata_8821_s1 =
350 SAW_VREG_INIT(8821_S1, "8821_s1", 950000, 1150000);
Jay Chokshiea67c622011-07-29 17:12:26 -0700351
352/* PM8921 regulator constraints */
David Collins75016742011-12-02 15:04:25 -0800353struct pm8xxx_regulator_platform_data
Jay Chokshiea67c622011-07-29 17:12:26 -0700354msm8064_pm8921_regulator_pdata[] __devinitdata = {
David Collins75016742011-12-02 15:04:25 -0800355 /*
356 * ID name always_on pd min_uV max_uV en_t supply
357 * system_uA reg_ID
358 */
359 PM8XXX_SMPS(S1, "8921_s1", 1, 1, 1225000, 1225000, 500, NULL, 100000,
360 1),
361 PM8XXX_SMPS(S2, "8921_s2", 0, 1, 1300000, 1300000, 500, NULL, 0, 2),
362 PM8XXX_SMPS(S3, "8921_s3", 1, 1, 1150000, 1150000, 500, NULL, 100000,
363 3),
364 PM8XXX_SMPS(S4, "8921_s4", 1, 1, 1800000, 1800000, 500, NULL, 100000,
365 4),
David Collins584ba452012-02-01 10:52:51 -0800366 PM8XXX_SMPS(S7, "8921_s7", 0, 1, 1300000, 1300000, 500, NULL, 100000,
David Collins75016742011-12-02 15:04:25 -0800367 5),
Jay Chokshiea67c622011-07-29 17:12:26 -0700368
David Collins75016742011-12-02 15:04:25 -0800369 PM8XXX_LDO(L1, "8921_l1", 1, 1, 1100000, 1100000, 200, "8921_s4", 0,
370 6),
371 PM8XXX_LDO(L2, "8921_l2", 0, 1, 1200000, 1200000, 200, "8921_s4", 0,
372 7),
373 PM8XXX_LDO(L3, "8921_l3", 0, 1, 3075000, 3075000, 200, NULL, 0, 8),
David Collins584ba452012-02-01 10:52:51 -0800374 PM8XXX_LDO(L4, "8921_l4", 1, 1, 1800000, 1800000, 200, NULL, 10000,
375 9),
David Collins75016742011-12-02 15:04:25 -0800376 PM8XXX_LDO(L5, "8921_l5", 0, 1, 2950000, 2950000, 200, NULL, 0, 10),
377 PM8XXX_LDO(L6, "8921_l6", 0, 1, 2950000, 2950000, 200, NULL, 0, 11),
David Collins584ba452012-02-01 10:52:51 -0800378 PM8XXX_LDO(L7, "8921_l7", 0, 1, 1850000, 2950000, 200, NULL, 0, 12),
David Collins75016742011-12-02 15:04:25 -0800379 PM8XXX_LDO(L8, "8921_l8", 0, 1, 2800000, 2800000, 200, NULL, 0, 13),
380 PM8XXX_LDO(L9, "8921_l9", 0, 1, 2850000, 2850000, 200, NULL, 0, 14),
381 PM8XXX_LDO(L10, "8921_l10", 0, 1, 2900000, 2900000, 200, NULL, 0, 15),
382 PM8XXX_LDO(L11, "8921_l11", 0, 1, 3000000, 3000000, 200, NULL, 0, 16),
383 PM8XXX_LDO(L12, "8921_l12", 0, 1, 1200000, 1200000, 200, "8921_s4", 0,
384 17),
385 PM8XXX_LDO(L14, "8921_l14", 0, 1, 1800000, 1800000, 200, NULL, 0, 18),
386 PM8XXX_LDO(L15, "8921_l15", 0, 1, 1800000, 2950000, 200, NULL, 0, 19),
387 PM8XXX_LDO(L16, "8921_l16", 0, 1, 2800000, 2800000, 200, NULL, 0, 20),
388 PM8XXX_LDO(L17, "8921_l17", 0, 1, 2000000, 2000000, 200, NULL, 0, 21),
389 PM8XXX_LDO(L18, "8921_l18", 0, 1, 1300000, 1800000, 200, "8921_s4", 0,
390 22),
391 PM8XXX_LDO(L22, "8921_l22", 0, 1, 2600000, 2600000, 200, NULL, 0, 23),
392 PM8XXX_LDO(L23, "8921_l23", 0, 1, 1800000, 1800000, 200, NULL, 0, 24),
393 PM8XXX_NLDO1200(L24, "8921_l24", 1, 1, 1150000, 1150000, 200, "8921_s1",
394 10000, 25),
395 PM8XXX_NLDO1200(L25, "8921_l25", 1, 1, 1225000, 1225000, 200, "8921_s1",
David Collins584ba452012-02-01 10:52:51 -0800396 10000, 26),
David Collins75016742011-12-02 15:04:25 -0800397 PM8XXX_NLDO1200(L26, "8921_l26", 0, 1, 1050000, 1050000, 200, "8921_s7",
398 0, 27),
David Collins584ba452012-02-01 10:52:51 -0800399 PM8XXX_NLDO1200(L27, "8921_l27", 0, 1, 1100000, 1100000, 200, "8921_s7",
David Collins75016742011-12-02 15:04:25 -0800400 0, 28),
401 PM8XXX_NLDO1200(L28, "8921_l28", 0, 1, 1050000, 1050000, 200, "8921_s7",
402 0, 29),
Jay Chokshiea67c622011-07-29 17:12:26 -0700403
David Collins75016742011-12-02 15:04:25 -0800404 /* ID name always_on pd en_t supply reg_ID */
405 PM8XXX_VS(LVS1, "8921_lvs1", 0, 1, 0, "8921_s4", 30),
406 PM8XXX_VS300(LVS2, "8921_lvs2", 0, 1, 0, "8921_s1", 31),
407 PM8XXX_VS(LVS3, "8921_lvs3", 0, 1, 0, "8921_s4", 32),
408 PM8XXX_VS(LVS4, "8921_lvs4", 0, 1, 0, "8921_s4", 33),
409 PM8XXX_VS(LVS5, "8921_lvs5", 0, 1, 0, "8921_s4", 34),
410 PM8XXX_VS(LVS6, "8921_lvs6", 0, 1, 0, "8921_s4", 35),
411 PM8XXX_VS(LVS7, "8921_lvs7", 1, 1, 0, "8921_s4", 36),
Jay Chokshiea67c622011-07-29 17:12:26 -0700412
David Collinsf0d00732012-01-25 15:46:50 -0800413 PM8XXX_VS300(USB_OTG, "8921_usb_otg", 0, 0, 0, "ext_5v", 37),
414 PM8XXX_VS300(HDMI_MVS, "8921_hdmi_mvs", 0, 1, 0, "ext_5v", 38),
Jay Chokshiea67c622011-07-29 17:12:26 -0700415
David Collins75016742011-12-02 15:04:25 -0800416 /* ID name always_on min_uV max_uV en_t supply reg_ID */
417 PM8XXX_NCP(NCP, "8921_ncp", 0, 1800000, 1800000, 200, "8921_l6", 39),
Jay Chokshiea67c622011-07-29 17:12:26 -0700418};
419
420int msm8064_pm8921_regulator_pdata_len __devinitdata =
421 ARRAY_SIZE(msm8064_pm8921_regulator_pdata);