regulator: max77663: register all regulators in single probe
[linux-3.10.git] / arch / arm / mach-tegra / board-dalmore-power.c
1 /*
2  * arch/arm/mach-tegra/board-dalmore-power.c
3  *
4  * Copyright (C) 2012 NVIDIA Corporation.
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License along
16  * with this program; if not, write to the Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
18  */
19
20 #include <linux/i2c.h>
21 #include <linux/pda_power.h>
22 #include <linux/platform_device.h>
23 #include <linux/resource.h>
24 #include <linux/io.h>
25 #include <linux/regulator/machine.h>
26 #include <linux/regulator/driver.h>
27 #include <linux/regulator/fixed.h>
28 #include <linux/mfd/max77663-core.h>
29 #include <linux/regulator/max77663-regulator.h>
30 #include <linux/regulator/tps51632-regulator.h>
31
32 #include <asm/mach-types.h>
33
34 #include <mach/iomap.h>
35 #include <mach/irqs.h>
36 #include <mach/gpio-tegra.h>
37
38 #include "pm.h"
39 #include "board.h"
40 #include "board-dalmore.h"
41
42 #define PMC_CTRL                0x0
43 #define PMC_CTRL_INTR_LOW       (1 << 17)
44
45 static struct regulator_consumer_supply max77663_sd0_supply[] = {
46         REGULATOR_SUPPLY("vdd_core", NULL),
47 };
48
49 static struct regulator_consumer_supply max77663_sd1_supply[] = {
50         REGULATOR_SUPPLY("vddio_ddr", NULL),
51 };
52
53 static struct regulator_consumer_supply max77663_sd2_supply[] = {
54         REGULATOR_SUPPLY("avdd_usb_pll", NULL),
55         REGULATOR_SUPPLY("vddio_cam", NULL),
56         REGULATOR_SUPPLY("avdd_osc", NULL),
57         REGULATOR_SUPPLY("vddio_sys", NULL),
58         REGULATOR_SUPPLY("vddio_bb", NULL),
59         REGULATOR_SUPPLY("vddio_sdmmc", "sdhci-tegra.0"),
60         REGULATOR_SUPPLY("vddio_sdmmc", "sdhci-tegra.3"),
61         REGULATOR_SUPPLY("vddio_audio", NULL),
62         REGULATOR_SUPPLY("vddio_uart", NULL),
63         REGULATOR_SUPPLY("vddio_gmi", NULL),
64 };
65
66 static struct regulator_consumer_supply max77663_sd3_supply[] = {
67         REGULATOR_SUPPLY("vdd_emmc_core", NULL),
68 };
69
70 static struct regulator_consumer_supply max77663_ldo0_supply[] = {
71         REGULATOR_SUPPLY("avdd_plla_p_c_s", NULL),
72         REGULATOR_SUPPLY("avdd_pllx", NULL),
73         REGULATOR_SUPPLY("avdd_pllm", NULL),
74         REGULATOR_SUPPLY("avdd_pllu", NULL),
75         REGULATOR_SUPPLY("avdd_hdmmi_pll", NULL),
76         REGULATOR_SUPPLY("avdd_csi_dsi_pll", NULL),
77 };
78
79 static struct regulator_consumer_supply max77663_ldo1_supply[] = {
80         REGULATOR_SUPPLY("vdd_ddr_hs", NULL),
81 };
82
83 static struct regulator_consumer_supply max77663_ldo2_supply[] = {
84         REGULATOR_SUPPLY("vdd_sensor_2v8", NULL),
85 };
86
87 static struct regulator_consumer_supply max77663_ldo3_supply[] = {
88         REGULATOR_SUPPLY("avdd_hdmi_pll", NULL),
89         REGULATOR_SUPPLY("avdd_usb3_pll", NULL),
90         REGULATOR_SUPPLY("avddio_usb3", NULL),
91 };
92
93 static struct regulator_consumer_supply max77663_ldo4_supply[] = {
94         REGULATOR_SUPPLY("vdd_rtc", NULL),
95 };
96
97 static struct regulator_consumer_supply max77663_ldo5_supply[] = {
98         REGULATOR_SUPPLY("avdd_dsi_csi", NULL),
99         REGULATOR_SUPPLY("vddio_hsic", NULL),
100 };
101
102 static struct regulator_consumer_supply max77663_ldo6_supply[] = {
103         REGULATOR_SUPPLY("vddio_sdmmc", "sdhci-tegra.2"),
104 };
105
106 static struct regulator_consumer_supply max77663_ldo7_supply[] = {
107         REGULATOR_SUPPLY("avdd_cam1", NULL),
108 };
109
110 static struct regulator_consumer_supply max77663_ldo8_supply[] = {
111         REGULATOR_SUPPLY("avdd_cam2", NULL),
112 };
113
114 static struct max77663_regulator_fps_cfg max77663_fps_cfgs[] = {
115         {
116                 .src = FPS_SRC_0,
117                 .en_src = FPS_EN_SRC_EN0,
118                 .time_period = FPS_TIME_PERIOD_DEF,
119         },
120         {
121                 .src = FPS_SRC_1,
122                 .en_src = FPS_EN_SRC_EN1,
123                 .time_period = FPS_TIME_PERIOD_DEF,
124         },
125         {
126                 .src = FPS_SRC_2,
127                 .en_src = FPS_EN_SRC_EN0,
128                 .time_period = FPS_TIME_PERIOD_DEF,
129         },
130 };
131
132 #define MAX77663_PDATA_INIT(_rid, _id, _min_uV, _max_uV, _supply_reg,   \
133                 _always_on, _boot_on, _apply_uV,                        \
134                 _init_apply, _init_enable, _init_uV,                    \
135                 _fps_src, _fps_pu_period, _fps_pd_period, _flags)       \
136         static struct regulator_init_data max77663_regulator_idata_##_id = {   \
137                 .supply_regulator = _supply_reg,                        \
138                 .constraints = {                                        \
139                         .name = max77663_rails(_id),                    \
140                         .min_uV = _min_uV,                              \
141                         .max_uV = _max_uV,                              \
142                         .valid_modes_mask = (REGULATOR_MODE_NORMAL |    \
143                                              REGULATOR_MODE_STANDBY),   \
144                         .valid_ops_mask = (REGULATOR_CHANGE_MODE |      \
145                                            REGULATOR_CHANGE_STATUS |    \
146                                            REGULATOR_CHANGE_VOLTAGE),   \
147                         .always_on = _always_on,                        \
148                         .boot_on = _boot_on,                            \
149                         .apply_uV = _apply_uV,                          \
150                 },                                                      \
151                 .num_consumer_supplies =                                \
152                         ARRAY_SIZE(max77663_##_id##_supply),            \
153                 .consumer_supplies = max77663_##_id##_supply,           \
154         };                                                              \
155 static struct max77663_regulator_platform_data max77663_regulator_pdata_##_id =\
156 {                                                                       \
157                 .reg_init_data = &max77663_regulator_idata_##_id,       \
158                 .id = MAX77663_REGULATOR_ID_##_rid,                     \
159                 .init_apply = _init_apply,                              \
160                 .init_enable = _init_enable,                            \
161                 .init_uV = _init_uV,                                    \
162                 .fps_src = _fps_src,                                    \
163                 .fps_pu_period = _fps_pu_period,                        \
164                 .fps_pd_period = _fps_pd_period,                        \
165                 .fps_cfgs = max77663_fps_cfgs,                          \
166                 .flags = _flags,                                        \
167         }
168
169 MAX77663_PDATA_INIT(SD0, sd0,  600000, 3387500, NULL, 1, 0, 0,
170                     1, 1, -1, FPS_SRC_1, -1, -1, SD_FSRADE_DISABLE);
171
172 MAX77663_PDATA_INIT(SD1, sd1,  800000, 1587500, NULL, 1, 0, 0,
173                     1, 1, -1, FPS_SRC_1, -1, -1, SD_FSRADE_DISABLE);
174
175 MAX77663_PDATA_INIT(SD2, sd2,  1800000, 1800000, NULL, 1, 0, 0,
176                     1, 1, -1, FPS_SRC_0, -1, -1, 0);
177
178 MAX77663_PDATA_INIT(SD3, sd3,  600000, 3387500, NULL, 1, 0, 0,
179                     1, 1, -1, FPS_SRC_NONE, -1, -1, 0);
180
181 MAX77663_PDATA_INIT(LDO0, ldo0, 800000, 2350000, max77663_rails(sd2), 1, 0, 0,
182                     1, 1, -1, FPS_SRC_1, -1, -1, 0);
183
184 MAX77663_PDATA_INIT(LDO1, ldo1, 800000, 2350000, max77663_rails(sd2), 0, 0, 0,
185                     0, 0, -1, FPS_SRC_NONE, -1, -1, 0);
186
187 MAX77663_PDATA_INIT(LDO2, ldo2, 2850000, 2850000, NULL, 1, 0, 0,
188                     1, 1, -1, FPS_SRC_1, -1, -1, 0);
189
190 MAX77663_PDATA_INIT(LDO3, ldo3, 800000, 3950000, max77663_rails(sd2), 1, 0, 0,
191                     1, 1, -1, FPS_SRC_NONE, -1, -1, 0);
192
193 MAX77663_PDATA_INIT(LDO4, ldo4, 800000, 1587500, NULL, 0, 0, 0,
194                     1, 1, 1000000, FPS_SRC_NONE, -1, -1, LDO4_EN_TRACKING);
195
196 MAX77663_PDATA_INIT(LDO5, ldo5, 800000, 2800000, max77663_rails(sd2), 0, 0, 0,
197                     1, 1, -1, FPS_SRC_NONE, -1, -1, 0);
198
199 MAX77663_PDATA_INIT(LDO6, ldo6, 800000, 3950000, NULL, 0, 0, 0,
200                     0, 0, -1, FPS_SRC_NONE, -1, -1, 0);
201
202 MAX77663_PDATA_INIT(LDO7, ldo7, 800000, 3950000, NULL, 0, 0, 0,
203                     0, 0, -1, FPS_SRC_NONE, -1, -1, 0);
204
205 MAX77663_PDATA_INIT(LDO8, ldo8, 800000, 3950000, NULL, 0, 0, 0,
206                     1, 1, -1, FPS_SRC_1, -1, -1, 0);
207
208 #define MAX77663_REG(_id, _data) &max77663_regulator_pdata_##_data
209
210 static struct max77663_regulator_platform_data *max77663_reg_pdata[] = {
211         MAX77663_REG(SD0, sd0),
212         MAX77663_REG(SD1, sd1),
213         MAX77663_REG(SD2, sd2),
214         MAX77663_REG(SD3, sd3),
215         MAX77663_REG(LDO0, ldo0),
216         MAX77663_REG(LDO1, ldo1),
217         MAX77663_REG(LDO2, ldo2),
218         MAX77663_REG(LDO3, ldo3),
219         MAX77663_REG(LDO4, ldo4),
220         MAX77663_REG(LDO5, ldo5),
221         MAX77663_REG(LDO6, ldo6),
222         MAX77663_REG(LDO7, ldo7),
223         MAX77663_REG(LDO8, ldo8),
224 };
225
226 static struct max77663_gpio_config max77663_gpio_cfgs[] = {
227         {
228                 .gpio = MAX77663_GPIO0,
229                 .dir = GPIO_DIR_OUT,
230                 .dout = GPIO_DOUT_LOW,
231                 .out_drv = GPIO_OUT_DRV_PUSH_PULL,
232                 .alternate = GPIO_ALT_DISABLE,
233         },
234         {
235                 .gpio = MAX77663_GPIO1,
236                 .dir = GPIO_DIR_IN,
237                 .dout = GPIO_DOUT_HIGH,
238                 .out_drv = GPIO_OUT_DRV_OPEN_DRAIN,
239                 .pull_up = GPIO_PU_ENABLE,
240                 .alternate = GPIO_ALT_DISABLE,
241         },
242         {
243                 .gpio = MAX77663_GPIO2,
244                 .dir = GPIO_DIR_OUT,
245                 .dout = GPIO_DOUT_HIGH,
246                 .out_drv = GPIO_OUT_DRV_OPEN_DRAIN,
247                 .pull_up = GPIO_PU_ENABLE,
248                 .alternate = GPIO_ALT_DISABLE,
249         },
250         {
251                 .gpio = MAX77663_GPIO3,
252                 .dir = GPIO_DIR_OUT,
253                 .dout = GPIO_DOUT_HIGH,
254                 .out_drv = GPIO_OUT_DRV_OPEN_DRAIN,
255                 .pull_up = GPIO_PU_ENABLE,
256                 .alternate = GPIO_ALT_DISABLE,
257         },
258         {
259                 .gpio = MAX77663_GPIO4,
260                 .dir = GPIO_DIR_OUT,
261                 .dout = GPIO_DOUT_HIGH,
262                 .out_drv = GPIO_OUT_DRV_PUSH_PULL,
263                 .alternate = GPIO_ALT_ENABLE,
264         },
265         {
266                 .gpio = MAX77663_GPIO5,
267                 .dir = GPIO_DIR_OUT,
268                 .dout = GPIO_DOUT_LOW,
269                 .out_drv = GPIO_OUT_DRV_PUSH_PULL,
270                 .alternate = GPIO_ALT_DISABLE,
271         },
272         {
273                 .gpio = MAX77663_GPIO6,
274                 .dir = GPIO_DIR_OUT,
275                 .dout = GPIO_DOUT_LOW,
276                 .out_drv = GPIO_OUT_DRV_OPEN_DRAIN,
277                 .alternate = GPIO_ALT_DISABLE,
278         },
279         {
280                 .gpio = MAX77663_GPIO7,
281                 .dir = GPIO_DIR_OUT,
282                 .dout = GPIO_DOUT_LOW,
283                 .out_drv = GPIO_OUT_DRV_OPEN_DRAIN,
284                 .alternate = GPIO_ALT_DISABLE,
285         },
286 };
287
288 static struct max77663_platform_data max7763_pdata = {
289         .irq_base       = MAX77663_IRQ_BASE,
290         .gpio_base      = MAX77663_GPIO_BASE,
291
292         .num_gpio_cfgs  = ARRAY_SIZE(max77663_gpio_cfgs),
293         .gpio_cfgs      = max77663_gpio_cfgs,
294
295         .regulator_pdata = max77663_reg_pdata,
296         .num_regulator_pdata = ARRAY_SIZE(max77663_reg_pdata),
297
298         .rtc_i2c_addr   = 0x68,
299
300         .use_power_off  = false,
301 };
302
303
304 /* EN_AVDD_USB_HDMI From PMU GP1 */
305 static struct regulator_consumer_supply fixed_reg_en_avdd_hdmi_usb_supply[] = {
306         REGULATOR_SUPPLY("avdd_hdmi", NULL),
307         REGULATOR_SUPPLY("avdd_usb", NULL),
308         REGULATOR_SUPPLY("hvdd_usb3", NULL),
309 };
310
311 /* EN_3V3 From PMU GP2 */
312 static struct regulator_consumer_supply fixed_reg_en_3v3_sys_supply[] = {
313         REGULATOR_SUPPLY("vdd_3v3_sys", NULL),
314 };
315
316 /* EN_5V0 From PMU GP3 */
317 static struct regulator_consumer_supply fixed_reg_en_5v0_supply[] = {
318         REGULATOR_SUPPLY("vdd_5v0_sys", NULL),
319         REGULATOR_SUPPLY("vdd_hdmi_con", NULL),
320         REGULATOR_SUPPLY("vdd_spk", NULL),
321 };
322
323 /* EN_CAM_1v8 From PMU GP5 */
324 static struct regulator_consumer_supply fixed_reg_en_1v8_cam_supply[] = {
325         REGULATOR_SUPPLY("dvdd_cam", NULL),
326 };
327
328 #ifdef CONFIG_ARCH_TEGRA_11x_SOC
329 /* EN_3V3_FUSE From TEGRA GPIO PX4 */
330 static struct regulator_consumer_supply fixed_reg_en_3v3_fuse_supply[] = {
331         REGULATOR_SUPPLY("vpp_fuse", NULL),
332 };
333
334 /* EN_USB1_VBUS From TEGRA GPIO PN4 */
335 static struct regulator_consumer_supply fixed_reg_en_usb1_vbus_supply[] = {
336         REGULATOR_SUPPLY("vdd_vbus_micro_usb", NULL),
337 };
338
339 /* EN_USB3_VBUS From TEGRA GPIO PM5 */
340 static struct regulator_consumer_supply fixed_reg_en_usb3_vbus_supply[] = {
341         REGULATOR_SUPPLY("usb3_vbus_con", NULL),
342 };
343 #endif
344
345 static struct regulator_consumer_supply fixed_reg_en_vddio_hv_supply[] = {
346         REGULATOR_SUPPLY("vddio_hv", NULL),
347 };
348
349 /* Macro for defining fixed regulator sub device data */
350 #define FIXED_SUPPLY(_name) "fixed_reg_"#_name
351 #define FIXED_REG(_id, _var, _name, _in_supply, _always_on, _boot_on,   \
352         _gpio_nr, _active_high, _boot_state, _millivolts)       \
353         static struct regulator_init_data ri_data_##_var =              \
354         {                                                               \
355                 .supply_regulator = _in_supply,                         \
356                 .num_consumer_supplies =                                \
357                         ARRAY_SIZE(fixed_reg_##_name##_supply),         \
358                 .consumer_supplies = fixed_reg_##_name##_supply,        \
359                 .constraints = {                                        \
360                         .valid_modes_mask = (REGULATOR_MODE_NORMAL |    \
361                                         REGULATOR_MODE_STANDBY),        \
362                         .valid_ops_mask = (REGULATOR_CHANGE_MODE |      \
363                                         REGULATOR_CHANGE_STATUS |       \
364                                         REGULATOR_CHANGE_VOLTAGE),      \
365                         .always_on = _always_on,                        \
366                         .boot_on = _boot_on,                            \
367                 },                                                      \
368         };                                                              \
369         static struct fixed_voltage_config fixed_reg_##_var##_pdata =   \
370         {                                                               \
371                 .supply_name = FIXED_SUPPLY(_name),                     \
372                 .microvolts = _millivolts * 1000,                       \
373                 .gpio = _gpio_nr,                                       \
374                 .enable_high = _active_high,                            \
375                 .enabled_at_boot = _boot_state,                         \
376                 .init_data = &ri_data_##_var,                           \
377         };                                                              \
378         static struct platform_device fixed_reg_##_var##_dev = {        \
379                 .name = "reg-fixed-voltage",                            \
380                 .id = _id,                                              \
381                 .dev = {                                                \
382                         .platform_data = &fixed_reg_##_var##_pdata,     \
383                 },                                                      \
384         }
385
386 FIXED_REG(1,    en_3v3_sys,     en_3v3_sys,
387         NULL,   1,      0,
388         MAX77663_GPIO_BASE + MAX77663_GPIO2,    true,   1,      3300);
389 FIXED_REG(2,    en_avdd_hdmi_usb,       en_avdd_hdmi_usb,
390         FIXED_SUPPLY(en_3v3_sys),       0,      0,
391         MAX77663_GPIO_BASE + MAX77663_GPIO1,    true,   1,      3300);
392 FIXED_REG(3,    en_1v8_cam,     en_1v8_cam,
393         max77663_rails(sd2),    0,      0,
394         MAX77663_GPIO_BASE + MAX77663_GPIO5,    true,   0,      1800);
395 FIXED_REG(4,    en_5v0, en_5v0,
396         NULL,   0,      0,
397         MAX77663_GPIO_BASE + MAX77663_GPIO3,    true,   0,      5000);
398 FIXED_REG(5,    en_vddio_hv,    en_vddio_hv,
399         FIXED_SUPPLY(en_3v3_sys),       0,      0,
400         -1,     true,   0,      3300);
401 #ifdef CONFIG_ARCH_TEGRA_11x_SOC
402 FIXED_REG(6,    en_3v3_fuse,    en_3v3_fuse,
403         max77663_rails(sd2),    0,      0,
404         TEGRA_GPIO_PX4, true,   0,      3300);
405 FIXED_REG(7,    en_usb1_vbus,   en_usb1_vbus,
406         FIXED_SUPPLY(en_5v0),   0,      0,
407         TEGRA_GPIO_PN4, true,   0,      5000);
408 FIXED_REG(8,    en_usb3_vbus,   en_usb3_vbus,
409         FIXED_SUPPLY(en_5v0),   0,      0,
410         TEGRA_GPIO_PM5, true,   0,      5000);
411 #endif
412
413 /*
414  * Creating the fixed regulator device tables
415  */
416
417 #define ADD_FIXED_REG(_name)    (&fixed_reg_##_name##_dev)
418
419 #define E1612_COMMON_FIXED_REG                  \
420         ADD_FIXED_REG(en_3v3_sys),              \
421         ADD_FIXED_REG(en_avdd_hdmi_usb),        \
422         ADD_FIXED_REG(en_1v8_cam),              \
423         ADD_FIXED_REG(en_5v0),                  \
424         ADD_FIXED_REG(en_vddio_hv),             \
425
426 #ifdef CONFIG_ARCH_TEGRA_11x_SOC
427
428 #define E1612_T114_FIXED_REG                    \
429         ADD_FIXED_REG(en_3v3_fuse),             \
430         ADD_FIXED_REG(en_usb1_vbus),            \
431         ADD_FIXED_REG(en_usb3_vbus),            \
432
433 #endif
434
435 /* Gpio switch regulator platform data for Dalmore E1612 */
436 static struct platform_device *fixed_reg_devs_a00[] = {
437 #ifdef CONFIG_ARCH_TEGRA_11x_SOC
438         E1612_T114_FIXED_REG,
439 #endif
440         E1612_COMMON_FIXED_REG
441
442 };
443
444 static struct i2c_board_info __initdata max77663_regulators[] = {
445         {
446                 /* The I2C address was determined by OTP factory setting */
447                 I2C_BOARD_INFO("max77663", 0x3c),
448                 .irq            = INT_EXTERNAL_PMU,
449                 .platform_data  = &max7763_pdata,
450         },
451 };
452
453 /* TPS51632 DC-DC converter */
454 static struct regulator_consumer_supply tps51632_dcdc_supply[] = {
455         REGULATOR_SUPPLY("vdd_cpu", NULL),
456 };
457
458 static struct regulator_init_data tps51632_init_data = {
459         .constraints = {                                                \
460                 .min_uV = 500000,                                       \
461                         .max_uV = 1520000,                              \
462                         .valid_modes_mask = (REGULATOR_MODE_NORMAL |    \
463                                         REGULATOR_MODE_STANDBY),        \
464                         .valid_ops_mask = (REGULATOR_CHANGE_MODE |      \
465                                         REGULATOR_CHANGE_STATUS |       \
466                                         REGULATOR_CHANGE_VOLTAGE),      \
467                         .always_on = 1,                                 \
468                         .boot_on =  1,                                  \
469                         .apply_uV = 0,                                  \
470         },                                                              \
471         .num_consumer_supplies = ARRAY_SIZE(tps51632_dcdc_supply),      \
472                 .consumer_supplies = tps51632_dcdc_supply,              \
473 };
474
475 static struct tps51632_regulator_platform_data tps51632_pdata = {
476         .reg_init_data = &tps51632_init_data,           \
477         .enable_pwm = false,                            \
478         .max_voltage_uV = 1520000,                      \
479         .base_voltage_uV = 500000,                      \
480         .slew_rate_uv_per_us = 6000,                    \
481 };
482
483 static struct i2c_board_info __initdata tps51632_boardinfo[] = {
484         {
485                 I2C_BOARD_INFO("tps51632", 0x43),
486                 .platform_data  = &tps51632_pdata,
487         },
488 };
489
490 static int ac_online(void)
491 {
492         return 1;
493 }
494
495 static struct resource dalmore_pda_resources[] = {
496         [0] = {
497                 .name   = "ac",
498         },
499 };
500
501 static struct pda_power_pdata dalmore_pda_data = {
502         .is_ac_online   = ac_online,
503 };
504
505 static struct platform_device dalmore_pda_power_device = {
506         .name           = "pda-power",
507         .id             = -1,
508         .resource       = dalmore_pda_resources,
509         .num_resources  = ARRAY_SIZE(dalmore_pda_resources),
510         .dev    = {
511                 .platform_data  = &dalmore_pda_data,
512         },
513 };
514
515 static struct tegra_suspend_platform_data dalmore_suspend_data = {
516         .cpu_timer      = 2000,
517         .cpu_off_timer  = 0,
518         .suspend_mode   = TEGRA_SUSPEND_NONE,
519         .core_timer     = 0x7e7e,
520         .core_off_timer = 0,
521         .corereq_high   = false,
522         .sysclkreq_high = true,
523 };
524
525 static int __init dalmore_max77663_regulator_init(void)
526 {
527         void __iomem *pmc = IO_ADDRESS(TEGRA_PMC_BASE);
528         u32 pmc_ctrl;
529
530         /* configure the power management controller to trigger PMU
531          * interrupts when low */
532         pmc_ctrl = readl(pmc + PMC_CTRL);
533         writel(pmc_ctrl | PMC_CTRL_INTR_LOW, pmc + PMC_CTRL);
534
535         i2c_register_board_info(4, max77663_regulators,
536                                 ARRAY_SIZE(max77663_regulators));
537
538         return 0;
539 }
540
541 static int __init dalmore_fixed_regulator_init(void)
542 {
543         int i;
544         struct board_info board_info;
545         struct platform_device **fixed_reg_devs;
546         int nfixreg_devs;
547
548         tegra_get_board_info(&board_info);
549         fixed_reg_devs = fixed_reg_devs_a00;
550         nfixreg_devs = ARRAY_SIZE(fixed_reg_devs_a00);
551
552         if (!machine_is_dalmore())
553                 return 0;
554
555         for (i = 0; i < nfixreg_devs; ++i) {
556                 int gpio_nr;
557                 struct fixed_voltage_config *fixed_reg_pdata =
558                         fixed_reg_devs[i]->dev.platform_data;
559                 gpio_nr = fixed_reg_pdata->gpio;
560
561         }
562
563         return platform_add_devices(fixed_reg_devs, nfixreg_devs);
564 }
565 subsys_initcall_sync(dalmore_fixed_regulator_init);
566
567
568 int __init dalmore_regulator_init(void)
569 {
570         dalmore_max77663_regulator_init();
571         i2c_register_board_info(4, tps51632_boardinfo, 1);
572         platform_device_register(&dalmore_pda_power_device);
573         return 0;
574 }
575
576 int __init dalmore_suspend_init(void)
577 {
578         tegra_init_suspend(&dalmore_suspend_data);
579         return 0;
580 }
581