aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/vpac270.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-pxa/vpac270.c')
-rw-r--r--arch/arm/mach-pxa/vpac270.c126
1 files changed, 119 insertions, 7 deletions
diff --git a/arch/arm/mach-pxa/vpac270.c b/arch/arm/mach-pxa/vpac270.c
index 9884fa978f16..c9b747cedea8 100644
--- a/arch/arm/mach-pxa/vpac270.c
+++ b/arch/arm/mach-pxa/vpac270.c
@@ -25,6 +25,7 @@
25#include <linux/dm9000.h> 25#include <linux/dm9000.h>
26#include <linux/ucb1400.h> 26#include <linux/ucb1400.h>
27#include <linux/ata_platform.h> 27#include <linux/ata_platform.h>
28#include <linux/regulator/max1586.h>
28 29
29#include <asm/mach-types.h> 30#include <asm/mach-types.h>
30#include <asm/mach/arch.h> 31#include <asm/mach/arch.h>
@@ -37,6 +38,7 @@
37#include <mach/ohci.h> 38#include <mach/ohci.h>
38#include <mach/pxa27x-udc.h> 39#include <mach/pxa27x-udc.h>
39#include <mach/udc.h> 40#include <mach/udc.h>
41#include <mach/pata_pxa.h>
40 42
41#include <plat/i2c.h> 43#include <plat/i2c.h>
42 44
@@ -464,7 +466,6 @@ static struct i2c_board_info __initdata vpac270_i2c_devs[] = {
464 466
465static void __init vpac270_rtc_init(void) 467static void __init vpac270_rtc_init(void)
466{ 468{
467 pxa_set_i2c_info(NULL);
468 i2c_register_board_info(0, ARRAY_AND_SIZE(vpac270_i2c_devs)); 469 i2c_register_board_info(0, ARRAY_AND_SIZE(vpac270_i2c_devs));
469} 470}
470#else 471#else
@@ -492,7 +493,55 @@ static struct pxafb_mode_info vpac270_lcd_modes[] = {
492 .vsync_len = 2, 493 .vsync_len = 2,
493 494
494 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, 495 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
495}, 496}, { /* CRT 640x480 */
497 .pixclock = 35000,
498 .xres = 640,
499 .yres = 480,
500 .bpp = 16,
501 .depth = 16,
502
503 .left_margin = 96,
504 .right_margin = 48,
505 .upper_margin = 33,
506 .lower_margin = 10,
507
508 .hsync_len = 48,
509 .vsync_len = 1,
510
511 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
512}, { /* CRT 800x600 H=30kHz V=48HZ */
513 .pixclock = 25000,
514 .xres = 800,
515 .yres = 600,
516 .bpp = 16,
517 .depth = 16,
518
519 .left_margin = 50,
520 .right_margin = 1,
521 .upper_margin = 21,
522 .lower_margin = 12,
523
524 .hsync_len = 8,
525 .vsync_len = 1,
526
527 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
528}, { /* CRT 1024x768 H=40kHz V=50Hz */
529 .pixclock = 15000,
530 .xres = 1024,
531 .yres = 768,
532 .bpp = 16,
533 .depth = 16,
534
535 .left_margin = 220,
536 .right_margin = 8,
537 .upper_margin = 33,
538 .lower_margin = 2,
539
540 .hsync_len = 48,
541 .vsync_len = 1,
542
543 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
544}
496}; 545};
497 546
498static struct pxafb_mach_info vpac270_lcd_screen = { 547static struct pxafb_mach_info vpac270_lcd_screen = {
@@ -538,9 +587,10 @@ static inline void vpac270_lcd_init(void) {}
538/****************************************************************************** 587/******************************************************************************
539 * PATA IDE 588 * PATA IDE
540 ******************************************************************************/ 589 ******************************************************************************/
541#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 590#if defined(CONFIG_PATA_PXA) || defined(CONFIG_PATA_PXA_MODULE)
542static struct pata_platform_info vpac270_pata_pdata = { 591static struct pata_pxa_pdata vpac270_pata_pdata = {
543 .ioport_shift = 1, 592 .reg_shift = 1,
593 .dma_dreq = 1,
544 .irq_flags = IRQF_TRIGGER_RISING, 594 .irq_flags = IRQF_TRIGGER_RISING,
545}; 595};
546 596
@@ -555,7 +605,12 @@ static struct resource vpac270_ide_resources[] = {
555 .end = PXA_CS3_PHYS + 0x15f, 605 .end = PXA_CS3_PHYS + 0x15f,
556 .flags = IORESOURCE_MEM 606 .flags = IORESOURCE_MEM
557 }, 607 },
558 [2] = { /* IDE IRQ pin */ 608 [2] = { /* DMA Base address */
609 .start = PXA_CS3_PHYS + 0x20,
610 .end = PXA_CS3_PHYS + 0x2f,
611 .flags = IORESOURCE_DMA
612 },
613 [3] = { /* IDE IRQ pin */
559 .start = gpio_to_irq(GPIO36_VPAC270_IDE_IRQ), 614 .start = gpio_to_irq(GPIO36_VPAC270_IDE_IRQ),
560 .end = gpio_to_irq(GPIO36_VPAC270_IDE_IRQ), 615 .end = gpio_to_irq(GPIO36_VPAC270_IDE_IRQ),
561 .flags = IORESOURCE_IRQ 616 .flags = IORESOURCE_IRQ
@@ -563,11 +618,12 @@ static struct resource vpac270_ide_resources[] = {
563}; 618};
564 619
565static struct platform_device vpac270_ide_device = { 620static struct platform_device vpac270_ide_device = {
566 .name = "pata_platform", 621 .name = "pata_pxa",
567 .num_resources = ARRAY_SIZE(vpac270_ide_resources), 622 .num_resources = ARRAY_SIZE(vpac270_ide_resources),
568 .resource = vpac270_ide_resources, 623 .resource = vpac270_ide_resources,
569 .dev = { 624 .dev = {
570 .platform_data = &vpac270_pata_pdata, 625 .platform_data = &vpac270_pata_pdata,
626 .coherent_dma_mask = 0xffffffff,
571 } 627 }
572}; 628};
573 629
@@ -580,6 +636,59 @@ static inline void vpac270_ide_init(void) {}
580#endif 636#endif
581 637
582/****************************************************************************** 638/******************************************************************************
639 * Core power regulator
640 ******************************************************************************/
641#if defined(CONFIG_REGULATOR_MAX1586) || \
642 defined(CONFIG_REGULATOR_MAX1586_MODULE)
643static struct regulator_consumer_supply vpac270_max1587a_consumers[] = {
644 {
645 .supply = "vcc_core",
646 }
647};
648
649static struct regulator_init_data vpac270_max1587a_v3_info = {
650 .constraints = {
651 .name = "vcc_core range",
652 .min_uV = 900000,
653 .max_uV = 1705000,
654 .always_on = 1,
655 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
656 },
657 .consumer_supplies = vpac270_max1587a_consumers,
658 .num_consumer_supplies = ARRAY_SIZE(vpac270_max1587a_consumers),
659};
660
661static struct max1586_subdev_data vpac270_max1587a_subdevs[] = {
662 {
663 .name = "vcc_core",
664 .id = MAX1586_V3,
665 .platform_data = &vpac270_max1587a_v3_info,
666 }
667};
668
669static struct max1586_platform_data vpac270_max1587a_info = {
670 .subdevs = vpac270_max1587a_subdevs,
671 .num_subdevs = ARRAY_SIZE(vpac270_max1587a_subdevs),
672 .v3_gain = MAX1586_GAIN_R24_3k32, /* 730..1550 mV */
673};
674
675static struct i2c_board_info __initdata vpac270_pi2c_board_info[] = {
676 {
677 I2C_BOARD_INFO("max1586", 0x14),
678 .platform_data = &vpac270_max1587a_info,
679 },
680};
681
682static void __init vpac270_pmic_init(void)
683{
684 i2c_register_board_info(1, ARRAY_AND_SIZE(vpac270_pi2c_board_info));
685}
686#else
687static inline void vpac270_pmic_init(void) {}
688#endif
689
690
691/******************************************************************************
583 * Machine init 692 * Machine init
584 ******************************************************************************/ 693 ******************************************************************************/
585static void __init vpac270_init(void) 694static void __init vpac270_init(void)
@@ -589,7 +698,10 @@ static void __init vpac270_init(void)
589 pxa_set_ffuart_info(NULL); 698 pxa_set_ffuart_info(NULL);
590 pxa_set_btuart_info(NULL); 699 pxa_set_btuart_info(NULL);
591 pxa_set_stuart_info(NULL); 700 pxa_set_stuart_info(NULL);
701 pxa_set_i2c_info(NULL);
702 pxa27x_set_i2c_power_info(NULL);
592 703
704 vpac270_pmic_init();
593 vpac270_lcd_init(); 705 vpac270_lcd_init();
594 vpac270_mmc_init(); 706 vpac270_mmc_init();
595 vpac270_nor_init(); 707 vpac270_nor_init();