diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-18 12:22:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-18 12:22:36 -0400 |
commit | 6f130478e24d810078c3f0ee292bcc4ec034dcce (patch) | |
tree | 1c782ccceaf998e9e23862094588c125ee6f38af /arch | |
parent | 6f128fa344833bf8bf076a51d14401661c146470 (diff) | |
parent | 75f2ba8f0006440e720e47ae14c917e07c452d72 (diff) |
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: (55 commits)
regulator: Voltage count for AB3100
mfd: Convert WM8350 to use request_threaded_irq()
mfd: Update MAINTAINERS patterns for WM831x
mfd: Fix twl4030-power warnings
regulator: AB3100 support
rtc: AB3100 RTC support
mfd: Fix ab3100-otp build failure
mfd: OMAP: Board-specifc twl4030 DPS scripts for RX51 board
mfd: Print warning for twl4030 out-of-order script loading
mfd: Add support for TWL4030/5030 dynamic power switching
mfd: AB3100 OTP readout
regulator: Add Freescale MC13783 driver
mfd: Add Freescale MC13783 driver
mfd: AB3100 disable irq nosync
mfd: AB3100 alter default setting
mfd: AB3100 propagate error
mfd: AB3100 accessor function cleanups
rtc: Add support for RTCs on Wolfson WM831x devices
regulator: get pcap data from the parent device
input: PCAP2 misc input driver
...
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-omap2/board-rx51-peripherals.c | 122 |
1 files changed, 120 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index 56d931a425f7..e70baa799018 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/arch/arm/mach-omap2/board-rx51-flash.c | 2 | * linux/arch/arm/mach-omap2/board-rx51-peripherals.c |
3 | * | 3 | * |
4 | * Copyright (C) 2008-2009 Nokia | 4 | * Copyright (C) 2008-2009 Nokia |
5 | * | 5 | * |
@@ -282,7 +282,124 @@ static struct twl4030_usb_data rx51_usb_data = { | |||
282 | .usb_mode = T2_USB_MODE_ULPI, | 282 | .usb_mode = T2_USB_MODE_ULPI, |
283 | }; | 283 | }; |
284 | 284 | ||
285 | static struct twl4030_platform_data rx51_twldata = { | 285 | static struct twl4030_ins sleep_on_seq[] __initdata = { |
286 | /* | ||
287 | * Turn off VDD1 and VDD2. | ||
288 | */ | ||
289 | {MSG_SINGULAR(DEV_GRP_P1, 0xf, RES_STATE_OFF), 4}, | ||
290 | {MSG_SINGULAR(DEV_GRP_P1, 0x10, RES_STATE_OFF), 2}, | ||
291 | /* | ||
292 | * And also turn off the OMAP3 PLLs and the sysclk output. | ||
293 | */ | ||
294 | {MSG_SINGULAR(DEV_GRP_P1, 0x7, RES_STATE_OFF), 3}, | ||
295 | {MSG_SINGULAR(DEV_GRP_P1, 0x17, RES_STATE_OFF), 3}, | ||
296 | }; | ||
297 | |||
298 | static struct twl4030_script sleep_on_script __initdata = { | ||
299 | .script = sleep_on_seq, | ||
300 | .size = ARRAY_SIZE(sleep_on_seq), | ||
301 | .flags = TWL4030_SLEEP_SCRIPT, | ||
302 | }; | ||
303 | |||
304 | static struct twl4030_ins wakeup_seq[] __initdata = { | ||
305 | /* | ||
306 | * Reenable the OMAP3 PLLs. | ||
307 | * Wakeup VDD1 and VDD2. | ||
308 | * Reenable sysclk output. | ||
309 | */ | ||
310 | {MSG_SINGULAR(DEV_GRP_P1, 0x7, RES_STATE_ACTIVE), 0x30}, | ||
311 | {MSG_SINGULAR(DEV_GRP_P1, 0xf, RES_STATE_ACTIVE), 0x30}, | ||
312 | {MSG_SINGULAR(DEV_GRP_P1, 0x10, RES_STATE_ACTIVE), 0x37}, | ||
313 | {MSG_SINGULAR(DEV_GRP_P1, 0x19, RES_STATE_ACTIVE), 3}, | ||
314 | }; | ||
315 | |||
316 | static struct twl4030_script wakeup_script __initdata = { | ||
317 | .script = wakeup_seq, | ||
318 | .size = ARRAY_SIZE(wakeup_seq), | ||
319 | .flags = TWL4030_WAKEUP12_SCRIPT, | ||
320 | }; | ||
321 | |||
322 | static struct twl4030_ins wakeup_p3_seq[] __initdata = { | ||
323 | /* | ||
324 | * Wakeup VDD1 (dummy to be able to insert a delay) | ||
325 | * Enable CLKEN | ||
326 | */ | ||
327 | {MSG_SINGULAR(DEV_GRP_P1, 0x17, RES_STATE_ACTIVE), 3}, | ||
328 | }; | ||
329 | |||
330 | static struct twl4030_script wakeup_p3_script __initdata = { | ||
331 | .script = wakeup_p3_seq, | ||
332 | .size = ARRAY_SIZE(wakeup_p3_seq), | ||
333 | .flags = TWL4030_WAKEUP3_SCRIPT, | ||
334 | }; | ||
335 | |||
336 | static struct twl4030_ins wrst_seq[] __initdata = { | ||
337 | /* | ||
338 | * Reset twl4030. | ||
339 | * Reset VDD1 regulator. | ||
340 | * Reset VDD2 regulator. | ||
341 | * Reset VPLL1 regulator. | ||
342 | * Enable sysclk output. | ||
343 | * Reenable twl4030. | ||
344 | */ | ||
345 | {MSG_SINGULAR(DEV_GRP_NULL, RES_RESET, RES_STATE_OFF), 2}, | ||
346 | {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_ALL, 0, 1, RES_STATE_ACTIVE), | ||
347 | 0x13}, | ||
348 | {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_PP, 0, 2, RES_STATE_WRST), 0x13}, | ||
349 | {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_PP, 0, 3, RES_STATE_OFF), 0x13}, | ||
350 | {MSG_SINGULAR(DEV_GRP_NULL, RES_VDD1, RES_STATE_WRST), 0x13}, | ||
351 | {MSG_SINGULAR(DEV_GRP_NULL, RES_VDD2, RES_STATE_WRST), 0x13}, | ||
352 | {MSG_SINGULAR(DEV_GRP_NULL, RES_VPLL1, RES_STATE_WRST), 0x35}, | ||
353 | {MSG_SINGULAR(DEV_GRP_P1, RES_HFCLKOUT, RES_STATE_ACTIVE), 2}, | ||
354 | {MSG_SINGULAR(DEV_GRP_NULL, RES_RESET, RES_STATE_ACTIVE), 2}, | ||
355 | }; | ||
356 | |||
357 | static struct twl4030_script wrst_script __initdata = { | ||
358 | .script = wrst_seq, | ||
359 | .size = ARRAY_SIZE(wrst_seq), | ||
360 | .flags = TWL4030_WRST_SCRIPT, | ||
361 | }; | ||
362 | |||
363 | static struct twl4030_script *twl4030_scripts[] __initdata = { | ||
364 | /* wakeup12 script should be loaded before sleep script, otherwise a | ||
365 | board might hit retention before loading of wakeup script is | ||
366 | completed. This can cause boot failures depending on timing issues. | ||
367 | */ | ||
368 | &wakeup_script, | ||
369 | &sleep_on_script, | ||
370 | &wakeup_p3_script, | ||
371 | &wrst_script, | ||
372 | }; | ||
373 | |||
374 | static struct twl4030_resconfig twl4030_rconfig[] __initdata = { | ||
375 | { .resource = RES_VINTANA1, .devgroup = -1, .type = -1, .type2 = 1 }, | ||
376 | { .resource = RES_VINTANA2, .devgroup = -1, .type = -1, .type2 = 1 }, | ||
377 | { .resource = RES_VINTDIG, .devgroup = -1, .type = -1, .type2 = 1 }, | ||
378 | { .resource = RES_VMMC1, .devgroup = -1, .type = -1, .type2 = 3}, | ||
379 | { .resource = RES_VMMC2, .devgroup = DEV_GRP_NULL, .type = -1, | ||
380 | .type2 = 3}, | ||
381 | { .resource = RES_VAUX1, .devgroup = -1, .type = -1, .type2 = 3}, | ||
382 | { .resource = RES_VAUX2, .devgroup = -1, .type = -1, .type2 = 3}, | ||
383 | { .resource = RES_VAUX3, .devgroup = -1, .type = -1, .type2 = 3}, | ||
384 | { .resource = RES_VAUX4, .devgroup = -1, .type = -1, .type2 = 3}, | ||
385 | { .resource = RES_VPLL2, .devgroup = -1, .type = -1, .type2 = 3}, | ||
386 | { .resource = RES_VDAC, .devgroup = -1, .type = -1, .type2 = 3}, | ||
387 | { .resource = RES_VSIM, .devgroup = DEV_GRP_NULL, .type = -1, | ||
388 | .type2 = 3}, | ||
389 | { .resource = RES_CLKEN, .devgroup = DEV_GRP_P3, .type = -1, | ||
390 | .type2 = 1 }, | ||
391 | { 0, 0}, | ||
392 | }; | ||
393 | |||
394 | static struct twl4030_power_data rx51_t2scripts_data __initdata = { | ||
395 | .scripts = twl4030_scripts, | ||
396 | .num = ARRAY_SIZE(twl4030_scripts), | ||
397 | .resource_config = twl4030_rconfig, | ||
398 | }; | ||
399 | |||
400 | |||
401 | |||
402 | static struct twl4030_platform_data rx51_twldata __initdata = { | ||
286 | .irq_base = TWL4030_IRQ_BASE, | 403 | .irq_base = TWL4030_IRQ_BASE, |
287 | .irq_end = TWL4030_IRQ_END, | 404 | .irq_end = TWL4030_IRQ_END, |
288 | 405 | ||
@@ -291,6 +408,7 @@ static struct twl4030_platform_data rx51_twldata = { | |||
291 | .keypad = &rx51_kp_data, | 408 | .keypad = &rx51_kp_data, |
292 | .madc = &rx51_madc_data, | 409 | .madc = &rx51_madc_data, |
293 | .usb = &rx51_usb_data, | 410 | .usb = &rx51_usb_data, |
411 | .power = &rx51_t2scripts_data, | ||
294 | 412 | ||
295 | .vaux1 = &rx51_vaux1, | 413 | .vaux1 = &rx51_vaux1, |
296 | .vaux2 = &rx51_vaux2, | 414 | .vaux2 = &rx51_vaux2, |