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