ARM: tegra: name the supply name of regulator rails
[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(_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 max77663_regulator_platform_data max77663_regulator_pdata_##_id =\
137 {                                                                       \
138         .init_data = {                                                  \
139                         .constraints = {                                \
140                                 .name = max77663_rails(_id),            \
141                                 .min_uV = _min_uV,                      \
142                                 .max_uV = _max_uV,                      \
143                                 .valid_modes_mask = (REGULATOR_MODE_NORMAL |  \
144                                                      REGULATOR_MODE_STANDBY), \
145                                 .valid_ops_mask = (REGULATOR_CHANGE_MODE |    \
146                                                    REGULATOR_CHANGE_STATUS |  \
147                                                    REGULATOR_CHANGE_VOLTAGE), \
148                                 .always_on = _always_on,                \
149                                 .boot_on = _boot_on,                    \
150                                 .apply_uV = _apply_uV,                  \
151                         },                                              \
152                         .num_consumer_supplies =                        \
153                                 ARRAY_SIZE(max77663_##_id##_supply),    \
154                         .consumer_supplies = max77663_##_id##_supply,   \
155                         .supply_regulator = _supply_reg,                \
156                 },                                                      \
157                 .init_apply = _init_apply,                              \
158                 .init_enable = _init_enable,                            \
159                 .init_uV = _init_uV,                                    \
160                 .fps_src = _fps_src,                                    \
161                 .fps_pu_period = _fps_pu_period,                        \
162                 .fps_pd_period = _fps_pd_period,                        \
163                 .fps_cfgs = max77663_fps_cfgs,                          \
164                 .flags = _flags,                                        \
165         }
166
167 MAX77663_PDATA_INIT(sd0,  600000, 3387500, NULL, 1, 0, 0,
168                     1, 1, -1, FPS_SRC_1, -1, -1, SD_FSRADE_DISABLE);
169
170 MAX77663_PDATA_INIT(sd1,  800000, 1587500, NULL, 1, 0, 0,
171                     1, 1, -1, FPS_SRC_1, -1, -1, SD_FSRADE_DISABLE);
172
173 MAX77663_PDATA_INIT(sd2,  1800000, 1800000, NULL, 1, 0, 0,
174                     1, 1, -1, FPS_SRC_0, -1, -1, 0);
175
176 MAX77663_PDATA_INIT(sd3,  600000, 3387500, NULL, 1, 0, 0,
177                     1, 1, -1, FPS_SRC_NONE, -1, -1, 0);
178
179 MAX77663_PDATA_INIT(ldo0, 800000, 2350000, max77663_rails(sd2), 1, 0, 0,
180                     1, 1, -1, FPS_SRC_1, -1, -1, 0);
181
182 MAX77663_PDATA_INIT(ldo1, 800000, 2350000, max77663_rails(sd2), 0, 0, 0,
183                     0, 0, -1, FPS_SRC_NONE, -1, -1, 0);
184
185 MAX77663_PDATA_INIT(ldo2, 2850000, 2850000, NULL, 1, 0, 0,
186                     1, 1, -1, FPS_SRC_1, -1, -1, 0);
187
188 MAX77663_PDATA_INIT(ldo3, 800000, 3950000, max77663_rails(sd2), 1, 0, 0,
189                     1, 1, -1, FPS_SRC_NONE, -1, -1, 0);
190
191 MAX77663_PDATA_INIT(ldo4, 800000, 1587500, NULL, 0, 0, 0,
192                     1, 1, 1000000, FPS_SRC_NONE, -1, -1, LDO4_EN_TRACKING);
193
194 MAX77663_PDATA_INIT(ldo5, 800000, 2800000, max77663_rails(sd2), 0, 0, 0,
195                     1, 1, -1, FPS_SRC_NONE, -1, -1, 0);
196
197 MAX77663_PDATA_INIT(ldo6, 800000, 3950000, NULL, 0, 0, 0,
198                     0, 0, -1, FPS_SRC_NONE, -1, -1, 0);
199
200 MAX77663_PDATA_INIT(ldo7, 800000, 3950000, NULL, 0, 0, 0,
201                     0, 0, -1, FPS_SRC_NONE, -1, -1, 0);
202
203 MAX77663_PDATA_INIT(ldo8, 800000, 3950000, NULL, 0, 0, 0,
204                     1, 1, -1, FPS_SRC_1, -1, -1, 0);
205
206 #define MAX77663_REG(_id, _data)                                        \
207         {                                                               \
208                 .name = "max77663-regulator",                           \
209                 .id = MAX77663_REGULATOR_ID_##_id,                      \
210                 .platform_data = &max77663_regulator_pdata_##_data,     \
211                 .pdata_size = sizeof(max77663_regulator_pdata_##_data), \
212         }
213
214 static struct mfd_cell max77663_subdevs[] = {
215         MAX77663_REG(SD0, sd0),
216         MAX77663_REG(SD1, sd1),
217         MAX77663_REG(SD2, sd2),
218         MAX77663_REG(SD3, sd3),
219         MAX77663_REG(LDO0, ldo0),
220         MAX77663_REG(LDO1, ldo1),
221         MAX77663_REG(LDO2, ldo2),
222         MAX77663_REG(LDO3, ldo3),
223         MAX77663_REG(LDO4, ldo4),
224         MAX77663_REG(LDO5, ldo5),
225         MAX77663_REG(LDO6, ldo6),
226         MAX77663_REG(LDO7, ldo7),
227         MAX77663_REG(LDO8, ldo8),
228 };
229
230 static struct max77663_gpio_config max77663_gpio_cfgs[] = {
231         {
232                 .gpio = MAX77663_GPIO0,
233                 .dir = GPIO_DIR_OUT,
234                 .dout = GPIO_DOUT_LOW,
235                 .out_drv = GPIO_OUT_DRV_PUSH_PULL,
236                 .alternate = GPIO_ALT_DISABLE,
237         },
238         {
239                 .gpio = MAX77663_GPIO1,
240                 .dir = GPIO_DIR_IN,
241                 .dout = GPIO_DOUT_HIGH,
242                 .out_drv = GPIO_OUT_DRV_OPEN_DRAIN,
243                 .pull_up = GPIO_PU_ENABLE,
244                 .alternate = GPIO_ALT_DISABLE,
245         },
246         {
247                 .gpio = MAX77663_GPIO2,
248                 .dir = GPIO_DIR_OUT,
249                 .dout = GPIO_DOUT_HIGH,
250                 .out_drv = GPIO_OUT_DRV_OPEN_DRAIN,
251                 .pull_up = GPIO_PU_ENABLE,
252                 .alternate = GPIO_ALT_DISABLE,
253         },
254         {
255                 .gpio = MAX77663_GPIO3,
256                 .dir = GPIO_DIR_OUT,
257                 .dout = GPIO_DOUT_HIGH,
258                 .out_drv = GPIO_OUT_DRV_OPEN_DRAIN,
259                 .pull_up = GPIO_PU_ENABLE,
260                 .alternate = GPIO_ALT_DISABLE,
261         },
262         {
263                 .gpio = MAX77663_GPIO4,
264                 .dir = GPIO_DIR_OUT,
265                 .dout = GPIO_DOUT_HIGH,
266                 .out_drv = GPIO_OUT_DRV_PUSH_PULL,
267                 .alternate = GPIO_ALT_ENABLE,
268         },
269         {
270                 .gpio = MAX77663_GPIO5,
271                 .dir = GPIO_DIR_OUT,
272                 .dout = GPIO_DOUT_LOW,
273                 .out_drv = GPIO_OUT_DRV_PUSH_PULL,
274                 .alternate = GPIO_ALT_DISABLE,
275         },
276         {
277                 .gpio = MAX77663_GPIO6,
278                 .dir = GPIO_DIR_OUT,
279                 .dout = GPIO_DOUT_LOW,
280                 .out_drv = GPIO_OUT_DRV_OPEN_DRAIN,
281                 .alternate = GPIO_ALT_DISABLE,
282         },
283         {
284                 .gpio = MAX77663_GPIO7,
285                 .dir = GPIO_DIR_OUT,
286                 .dout = GPIO_DOUT_LOW,
287                 .out_drv = GPIO_OUT_DRV_OPEN_DRAIN,
288                 .alternate = GPIO_ALT_DISABLE,
289         },
290 };
291
292 static struct max77663_platform_data max7763_pdata = {
293         .irq_base       = MAX77663_IRQ_BASE,
294         .gpio_base      = MAX77663_GPIO_BASE,
295
296         .num_gpio_cfgs  = ARRAY_SIZE(max77663_gpio_cfgs),
297         .gpio_cfgs      = max77663_gpio_cfgs,
298
299
300         .num_subdevs    = ARRAY_SIZE(max77663_subdevs),
301         .sub_devices    = max77663_subdevs,
302
303         .rtc_i2c_addr   = 0x68,
304
305         .use_power_off  = false,
306 };
307
308
309 /* EN_AVDD_USB_HDMI From PMU GP1 */
310 static struct regulator_consumer_supply fixed_reg_en_avdd_hdmi_usb_supply[] = {
311         REGULATOR_SUPPLY("avdd_hdmi", NULL),
312         REGULATOR_SUPPLY("avdd_usb", NULL),
313         REGULATOR_SUPPLY("hvdd_usb3", NULL),
314 };
315
316 /* EN_3V3 From PMU GP2 */
317 static struct regulator_consumer_supply fixed_reg_en_3v3_sys_supply[] = {
318         REGULATOR_SUPPLY("vdd_3v3_sys", NULL),
319 };
320
321 /* EN_5V0 From PMU GP3 */
322 static struct regulator_consumer_supply fixed_reg_en_5v0_supply[] = {
323         REGULATOR_SUPPLY("vdd_5v0_sys", NULL),
324         REGULATOR_SUPPLY("vdd_hdmi_con", NULL),
325         REGULATOR_SUPPLY("vdd_spk", NULL),
326 };
327
328 /* EN_CAM_1v8 From PMU GP5 */
329 static struct regulator_consumer_supply fixed_reg_en_1v8_cam_supply[] = {
330         REGULATOR_SUPPLY("dvdd_cam", NULL),
331 };
332
333 #ifdef CONFIG_ARCH_TEGRA_11x_SOC
334 /* EN_3V3_FUSE From TEGRA GPIO PX4 */
335 static struct regulator_consumer_supply fixed_reg_en_3v3_fuse_supply[] = {
336         REGULATOR_SUPPLY("vpp_fuse", NULL),
337 };
338
339 /* EN_USB1_VBUS From TEGRA GPIO PN4 */
340 static struct regulator_consumer_supply fixed_reg_en_usb1_vbus_supply[] = {
341         REGULATOR_SUPPLY("vdd_vbus_micro_usb", NULL),
342 };
343
344 /* EN_USB3_VBUS From TEGRA GPIO PM5 */
345 static struct regulator_consumer_supply fixed_reg_en_usb3_vbus_supply[] = {
346         REGULATOR_SUPPLY("usb3_vbus_con", NULL),
347 };
348 #endif
349
350 static struct regulator_consumer_supply fixed_reg_en_vddio_hv_supply[] = {
351         REGULATOR_SUPPLY("vddio_hv", NULL),
352 };
353
354 /* Macro for defining fixed regulator sub device data */
355 #define FIXED_SUPPLY(_name) "fixed_reg_"#_name
356 #define FIXED_REG(_id, _var, _name, _in_supply, _always_on, _boot_on,   \
357         _gpio_nr, _active_high, _boot_state, _millivolts)       \
358         static struct regulator_init_data ri_data_##_var =              \
359         {                                                               \
360                 .supply_regulator = _in_supply,                         \
361                 .num_consumer_supplies =                                \
362                         ARRAY_SIZE(fixed_reg_##_name##_supply),         \
363                 .consumer_supplies = fixed_reg_##_name##_supply,        \
364                 .constraints = {                                        \
365                         .valid_modes_mask = (REGULATOR_MODE_NORMAL |    \
366                                         REGULATOR_MODE_STANDBY),        \
367                         .valid_ops_mask = (REGULATOR_CHANGE_MODE |      \
368                                         REGULATOR_CHANGE_STATUS |       \
369                                         REGULATOR_CHANGE_VOLTAGE),      \
370                         .always_on = _always_on,                        \
371                         .boot_on = _boot_on,                            \
372                 },                                                      \
373         };                                                              \
374         static struct fixed_voltage_config fixed_reg_##_var##_pdata =   \
375         {                                                               \
376                 .supply_name = FIXED_SUPPLY(_name),                     \
377                 .microvolts = _millivolts * 1000,                       \
378                 .gpio = _gpio_nr,                                       \
379                 .enable_high = _active_high,                            \
380                 .enabled_at_boot = _boot_state,                         \
381                 .init_data = &ri_data_##_var,                           \
382         };                                                              \
383         static struct platform_device fixed_reg_##_var##_dev = {        \
384                 .name = "reg-fixed-voltage",                            \
385                 .id = _id,                                              \
386                 .dev = {                                                \
387                         .platform_data = &fixed_reg_##_var##_pdata,     \
388                 },                                                      \
389         }
390
391 FIXED_REG(1,    en_3v3_sys,     en_3v3_sys,
392         NULL,   1,      0,
393         MAX77663_GPIO_BASE + MAX77663_GPIO2,    true,   1,      3300);
394 FIXED_REG(2,    en_avdd_hdmi_usb,       en_avdd_hdmi_usb,
395         FIXED_SUPPLY(en_3v3_sys),       0,      0,
396         MAX77663_GPIO_BASE + MAX77663_GPIO1,    true,   1,      3300);
397 FIXED_REG(3,    en_1v8_cam,     en_1v8_cam,
398         max77663_rails(sd2),    0,      0,
399         MAX77663_GPIO_BASE + MAX77663_GPIO5,    true,   0,      1800);
400 FIXED_REG(4,    en_5v0, en_5v0,
401         NULL,   0,      0,
402         MAX77663_GPIO_BASE + MAX77663_GPIO3,    true,   0,      5000);
403 FIXED_REG(5,    en_vddio_hv,    en_vddio_hv,
404         FIXED_SUPPLY(en_3v3_sys),       0,      0,
405         -1,     true,   0,      3300);
406 #ifdef CONFIG_ARCH_TEGRA_11x_SOC
407 FIXED_REG(6,    en_3v3_fuse,    en_3v3_fuse,
408         max77663_rails(sd2),    0,      0,
409         TEGRA_GPIO_PX4, true,   0,      3300);
410 FIXED_REG(7,    en_usb1_vbus,   en_usb1_vbus,
411         FIXED_SUPPLY(en_5v0),   0,      0,
412         TEGRA_GPIO_PN4, true,   0,      5000);
413 FIXED_REG(8,    en_usb3_vbus,   en_usb3_vbus,
414         FIXED_SUPPLY(en_5v0),   0,      0,
415         TEGRA_GPIO_PM5, true,   0,      5000);
416 #endif
417
418 /*
419  * Creating the fixed regulator device tables
420  */
421
422 #define ADD_FIXED_REG(_name)    (&fixed_reg_##_name##_dev)
423
424 #define E1612_COMMON_FIXED_REG                  \
425         ADD_FIXED_REG(en_3v3_sys),              \
426         ADD_FIXED_REG(en_avdd_hdmi_usb),        \
427         ADD_FIXED_REG(en_1v8_cam),              \
428         ADD_FIXED_REG(en_5v0),                  \
429         ADD_FIXED_REG(en_vddio_hv),             \
430
431 #ifdef CONFIG_ARCH_TEGRA_11x_SOC
432
433 #define E1612_T114_FIXED_REG                    \
434         ADD_FIXED_REG(en_3v3_fuse),             \
435         ADD_FIXED_REG(en_usb1_vbus),            \
436         ADD_FIXED_REG(en_usb3_vbus),            \
437
438 #endif
439
440 /* Gpio switch regulator platform data for Dalmore E1612 */
441 static struct platform_device *fixed_reg_devs_a00[] = {
442 #ifdef CONFIG_ARCH_TEGRA_11x_SOC
443         E1612_T114_FIXED_REG,
444 #endif
445         E1612_COMMON_FIXED_REG
446
447 };
448
449 static struct i2c_board_info __initdata max77663_regulators[] = {
450         {
451                 /* The I2C address was determined by OTP factory setting */
452                 I2C_BOARD_INFO("max77663", 0x3c),
453                 .irq            = INT_EXTERNAL_PMU,
454                 .platform_data  = &max7763_pdata,
455         },
456 };
457
458 /* TPS51632 DC-DC converter */
459 static struct regulator_consumer_supply tps51632_dcdc_supply[] = {
460         REGULATOR_SUPPLY("vdd_cpu", NULL),
461 };
462
463 static struct regulator_init_data tps51632_init_data = {
464         .constraints = {                                                \
465                 .min_uV = 500000,                                       \
466                         .max_uV = 1520000,                              \
467                         .valid_modes_mask = (REGULATOR_MODE_NORMAL |    \
468                                         REGULATOR_MODE_STANDBY),        \
469                         .valid_ops_mask = (REGULATOR_CHANGE_MODE |      \
470                                         REGULATOR_CHANGE_STATUS |       \
471                                         REGULATOR_CHANGE_VOLTAGE),      \
472                         .always_on = 1,                                 \
473                         .boot_on =  1,                                  \
474                         .apply_uV = 0,                                  \
475         },                                                              \
476         .num_consumer_supplies = ARRAY_SIZE(tps51632_dcdc_supply),      \
477                 .consumer_supplies = tps51632_dcdc_supply,              \
478 };
479
480 static struct tps51632_regulator_platform_data tps51632_pdata = {
481         .reg_init_data = &tps51632_init_data,           \
482         .enable_pwm = false,                            \
483         .max_voltage_uV = 1520000,                      \
484         .base_voltage_uV = 500000,                      \
485         .slew_rate_uv_per_us = 6000,                    \
486 };
487
488 static struct i2c_board_info __initdata tps51632_boardinfo[] = {
489         {
490                 I2C_BOARD_INFO("tps51632", 0x43),
491                 .platform_data  = &tps51632_pdata,
492         },
493 };
494
495 static int ac_online(void)
496 {
497         return 1;
498 }
499
500 static struct resource dalmore_pda_resources[] = {
501         [0] = {
502                 .name   = "ac",
503         },
504 };
505
506 static struct pda_power_pdata dalmore_pda_data = {
507         .is_ac_online   = ac_online,
508 };
509
510 static struct platform_device dalmore_pda_power_device = {
511         .name           = "pda-power",
512         .id             = -1,
513         .resource       = dalmore_pda_resources,
514         .num_resources  = ARRAY_SIZE(dalmore_pda_resources),
515         .dev    = {
516                 .platform_data  = &dalmore_pda_data,
517         },
518 };
519
520 static struct tegra_suspend_platform_data dalmore_suspend_data = {
521         .cpu_timer      = 2000,
522         .cpu_off_timer  = 0,
523         .suspend_mode   = TEGRA_SUSPEND_NONE,
524         .core_timer     = 0x7e7e,
525         .core_off_timer = 0,
526         .corereq_high   = false,
527         .sysclkreq_high = true,
528 };
529
530 static int __init dalmore_max77663_regulator_init(void)
531 {
532         void __iomem *pmc = IO_ADDRESS(TEGRA_PMC_BASE);
533         u32 pmc_ctrl;
534
535         /* configure the power management controller to trigger PMU
536          * interrupts when low */
537         pmc_ctrl = readl(pmc + PMC_CTRL);
538         writel(pmc_ctrl | PMC_CTRL_INTR_LOW, pmc + PMC_CTRL);
539
540         i2c_register_board_info(4, max77663_regulators,
541                                 ARRAY_SIZE(max77663_regulators));
542
543         return 0;
544 }
545
546 static int __init dalmore_fixed_regulator_init(void)
547 {
548         int i;
549         struct board_info board_info;
550         struct platform_device **fixed_reg_devs;
551         int nfixreg_devs;
552
553         tegra_get_board_info(&board_info);
554         fixed_reg_devs = fixed_reg_devs_a00;
555         nfixreg_devs = ARRAY_SIZE(fixed_reg_devs_a00);
556
557         if (!machine_is_dalmore())
558                 return 0;
559
560         for (i = 0; i < nfixreg_devs; ++i) {
561                 int gpio_nr;
562                 struct fixed_voltage_config *fixed_reg_pdata =
563                         fixed_reg_devs[i]->dev.platform_data;
564                 gpio_nr = fixed_reg_pdata->gpio;
565
566         }
567
568         return platform_add_devices(fixed_reg_devs, nfixreg_devs);
569 }
570 subsys_initcall_sync(dalmore_fixed_regulator_init);
571
572
573 int __init dalmore_regulator_init(void)
574 {
575         dalmore_max77663_regulator_init();
576         i2c_register_board_info(4, tps51632_boardinfo, 1);
577         platform_device_register(&dalmore_pda_power_device);
578         return 0;
579 }
580
581 int __init dalmore_suspend_init(void)
582 {
583         tegra_init_suspend(&dalmore_suspend_data);
584         return 0;
585 }
586