diff options
Diffstat (limited to 'arch/arm/mach-s3c64xx/mach-crag6410.c')
-rw-r--r-- | arch/arm/mach-s3c64xx/mach-crag6410.c | 106 |
1 files changed, 26 insertions, 80 deletions
diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c index f32ec68002ef..30afaa537fcf 100644 --- a/arch/arm/mach-s3c64xx/mach-crag6410.c +++ b/arch/arm/mach-s3c64xx/mach-crag6410.c | |||
@@ -47,6 +47,7 @@ | |||
47 | #include <mach/regs-sys.h> | 47 | #include <mach/regs-sys.h> |
48 | #include <mach/regs-gpio.h> | 48 | #include <mach/regs-gpio.h> |
49 | #include <mach/regs-modem.h> | 49 | #include <mach/regs-modem.h> |
50 | #include <mach/crag6410.h> | ||
50 | 51 | ||
51 | #include <mach/regs-gpio-memport.h> | 52 | #include <mach/regs-gpio-memport.h> |
52 | 53 | ||
@@ -65,17 +66,6 @@ | |||
65 | #include <plat/iic.h> | 66 | #include <plat/iic.h> |
66 | #include <plat/pm.h> | 67 | #include <plat/pm.h> |
67 | 68 | ||
68 | #include <sound/wm8996.h> | ||
69 | #include <sound/wm8962.h> | ||
70 | #include <sound/wm9081.h> | ||
71 | |||
72 | #define BANFF_PMIC_IRQ_BASE IRQ_BOARD_START | ||
73 | #define GLENFARCLAS_PMIC_IRQ_BASE (IRQ_BOARD_START + 64) | ||
74 | |||
75 | #define PCA935X_GPIO_BASE GPIO_BOARD_START | ||
76 | #define CODEC_GPIO_BASE (GPIO_BOARD_START + 8) | ||
77 | #define GLENFARCLAS_PMIC_GPIO_BASE (GPIO_BOARD_START + 16) | ||
78 | |||
79 | /* serial port setup */ | 69 | /* serial port setup */ |
80 | 70 | ||
81 | #define UCON (S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK) | 71 | #define UCON (S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK) |
@@ -287,6 +277,11 @@ static struct platform_device speyside_device = { | |||
287 | .id = -1, | 277 | .id = -1, |
288 | }; | 278 | }; |
289 | 279 | ||
280 | static struct platform_device lowland_device = { | ||
281 | .name = "lowland", | ||
282 | .id = -1, | ||
283 | }; | ||
284 | |||
290 | static struct platform_device speyside_wm8962_device = { | 285 | static struct platform_device speyside_wm8962_device = { |
291 | .name = "speyside-wm8962", | 286 | .name = "speyside-wm8962", |
292 | .id = -1, | 287 | .id = -1, |
@@ -295,6 +290,8 @@ static struct platform_device speyside_wm8962_device = { | |||
295 | static struct regulator_consumer_supply wallvdd_consumers[] = { | 290 | static struct regulator_consumer_supply wallvdd_consumers[] = { |
296 | REGULATOR_SUPPLY("SPKVDD1", "1-001a"), | 291 | REGULATOR_SUPPLY("SPKVDD1", "1-001a"), |
297 | REGULATOR_SUPPLY("SPKVDD2", "1-001a"), | 292 | REGULATOR_SUPPLY("SPKVDD2", "1-001a"), |
293 | REGULATOR_SUPPLY("SPKVDDL", "1-001a"), | ||
294 | REGULATOR_SUPPLY("SPKVDDR", "1-001a"), | ||
298 | }; | 295 | }; |
299 | 296 | ||
300 | static struct regulator_init_data wallvdd_data = { | 297 | static struct regulator_init_data wallvdd_data = { |
@@ -342,6 +339,7 @@ static struct platform_device *crag6410_devices[] __initdata = { | |||
342 | &crag6410_backlight_device, | 339 | &crag6410_backlight_device, |
343 | &speyside_device, | 340 | &speyside_device, |
344 | &speyside_wm8962_device, | 341 | &speyside_wm8962_device, |
342 | &lowland_device, | ||
345 | &wallvdd_device, | 343 | &wallvdd_device, |
346 | }; | 344 | }; |
347 | 345 | ||
@@ -350,6 +348,12 @@ static struct pca953x_platform_data crag6410_pca_data = { | |||
350 | .irq_base = 0, | 348 | .irq_base = 0, |
351 | }; | 349 | }; |
352 | 350 | ||
351 | /* VDDARM is controlled by DVS1 connected to GPK(0) */ | ||
352 | static struct wm831x_buckv_pdata vddarm_pdata = { | ||
353 | .dvs_control_src = 1, | ||
354 | .dvs_gpio = S3C64XX_GPK(0), | ||
355 | }; | ||
356 | |||
353 | static struct regulator_consumer_supply vddarm_consumers[] __initdata = { | 357 | static struct regulator_consumer_supply vddarm_consumers[] __initdata = { |
354 | REGULATOR_SUPPLY("vddarm", NULL), | 358 | REGULATOR_SUPPLY("vddarm", NULL), |
355 | }; | 359 | }; |
@@ -365,6 +369,7 @@ static struct regulator_init_data vddarm __initdata = { | |||
365 | .num_consumer_supplies = ARRAY_SIZE(vddarm_consumers), | 369 | .num_consumer_supplies = ARRAY_SIZE(vddarm_consumers), |
366 | .consumer_supplies = vddarm_consumers, | 370 | .consumer_supplies = vddarm_consumers, |
367 | .supply_regulator = "WALLVDD", | 371 | .supply_regulator = "WALLVDD", |
372 | .driver_data = &vddarm_pdata, | ||
368 | }; | 373 | }; |
369 | 374 | ||
370 | static struct regulator_init_data vddint __initdata = { | 375 | static struct regulator_init_data vddint __initdata = { |
@@ -500,6 +505,8 @@ static struct wm831x_pdata crag_pmic_pdata __initdata = { | |||
500 | .backup = &banff_backup_pdata, | 505 | .backup = &banff_backup_pdata, |
501 | 506 | ||
502 | .gpio_defaults = { | 507 | .gpio_defaults = { |
508 | /* GPIO5: DVS1_REQ - CMOS, DBVDD, active high */ | ||
509 | [4] = WM831X_GPN_DIR | WM831X_GPN_POL | WM831X_GPN_ENA | 0x8, | ||
503 | /* GPIO11: Touchscreen data - CMOS, DBVDD, active high*/ | 510 | /* GPIO11: Touchscreen data - CMOS, DBVDD, active high*/ |
504 | [10] = WM831X_GPN_POL | WM831X_GPN_ENA | 0x6, | 511 | [10] = WM831X_GPN_POL | WM831X_GPN_ENA | 0x6, |
505 | /* GPIO12: Touchscreen pen down - CMOS, DBVDD, active high*/ | 512 | /* GPIO12: Touchscreen pen down - CMOS, DBVDD, active high*/ |
@@ -557,8 +564,12 @@ static struct regulator_init_data pvdd_1v2 __initdata = { | |||
557 | }; | 564 | }; |
558 | 565 | ||
559 | static struct regulator_consumer_supply pvdd_1v8_consumers[] __initdata = { | 566 | static struct regulator_consumer_supply pvdd_1v8_consumers[] __initdata = { |
567 | REGULATOR_SUPPLY("LDOVDD", "1-001a"), | ||
560 | REGULATOR_SUPPLY("PLLVDD", "1-001a"), | 568 | REGULATOR_SUPPLY("PLLVDD", "1-001a"), |
561 | REGULATOR_SUPPLY("DBVDD", "1-001a"), | 569 | REGULATOR_SUPPLY("DBVDD", "1-001a"), |
570 | REGULATOR_SUPPLY("DBVDD1", "1-001a"), | ||
571 | REGULATOR_SUPPLY("DBVDD2", "1-001a"), | ||
572 | REGULATOR_SUPPLY("DBVDD3", "1-001a"), | ||
562 | REGULATOR_SUPPLY("CPVDD", "1-001a"), | 573 | REGULATOR_SUPPLY("CPVDD", "1-001a"), |
563 | REGULATOR_SUPPLY("AVDD2", "1-001a"), | 574 | REGULATOR_SUPPLY("AVDD2", "1-001a"), |
564 | REGULATOR_SUPPLY("DCVDD", "1-001a"), | 575 | REGULATOR_SUPPLY("DCVDD", "1-001a"), |
@@ -611,81 +622,16 @@ static struct wm831x_pdata glenfarclas_pmic_pdata __initdata = { | |||
611 | .disable_touch = true, | 622 | .disable_touch = true, |
612 | }; | 623 | }; |
613 | 624 | ||
614 | static struct wm8996_retune_mobile_config wm8996_retune[] = { | ||
615 | { | ||
616 | .name = "Sub LPF", | ||
617 | .rate = 48000, | ||
618 | .regs = { | ||
619 | 0x6318, 0x6300, 0x1000, 0x0000, 0x0004, 0x2000, 0xF000, | ||
620 | 0x0000, 0x0004, 0x2000, 0xF000, 0x0000, 0x0004, 0x2000, | ||
621 | 0xF000, 0x0000, 0x0004, 0x1000, 0x0800, 0x4000 | ||
622 | }, | ||
623 | }, | ||
624 | { | ||
625 | .name = "Sub HPF", | ||
626 | .rate = 48000, | ||
627 | .regs = { | ||
628 | 0x000A, 0x6300, 0x1000, 0x0000, 0x0004, 0x2000, 0xF000, | ||
629 | 0x0000, 0x0004, 0x2000, 0xF000, 0x0000, 0x0004, 0x2000, | ||
630 | 0xF000, 0x0000, 0x0004, 0x1000, 0x0800, 0x4000 | ||
631 | }, | ||
632 | }, | ||
633 | }; | ||
634 | |||
635 | static struct wm8996_pdata wm8996_pdata __initdata = { | ||
636 | .ldo_ena = S3C64XX_GPN(7), | ||
637 | .gpio_base = CODEC_GPIO_BASE, | ||
638 | .micdet_def = 1, | ||
639 | .inl_mode = WM8996_DIFFERRENTIAL_1, | ||
640 | .inr_mode = WM8996_DIFFERRENTIAL_1, | ||
641 | |||
642 | .irq_flags = IRQF_TRIGGER_RISING, | ||
643 | |||
644 | .gpio_default = { | ||
645 | 0x8001, /* GPIO1 == ADCLRCLK1 */ | ||
646 | 0x8001, /* GPIO2 == ADCLRCLK2, input due to CPU */ | ||
647 | 0x0141, /* GPIO3 == HP_SEL */ | ||
648 | 0x0002, /* GPIO4 == IRQ */ | ||
649 | 0x020e, /* GPIO5 == CLKOUT */ | ||
650 | }, | ||
651 | |||
652 | .retune_mobile_cfgs = wm8996_retune, | ||
653 | .num_retune_mobile_cfgs = ARRAY_SIZE(wm8996_retune), | ||
654 | }; | ||
655 | |||
656 | static struct wm8962_pdata wm8962_pdata __initdata = { | ||
657 | .gpio_init = { | ||
658 | 0, | ||
659 | WM8962_GPIO_FN_OPCLK, | ||
660 | WM8962_GPIO_FN_DMICCLK, | ||
661 | 0, | ||
662 | 0x8000 | WM8962_GPIO_FN_DMICDAT, | ||
663 | WM8962_GPIO_FN_IRQ, /* Open drain mode */ | ||
664 | }, | ||
665 | .irq_active_low = true, | ||
666 | }; | ||
667 | |||
668 | static struct wm9081_pdata wm9081_pdata __initdata = { | ||
669 | .irq_high = false, | ||
670 | .irq_cmos = false, | ||
671 | }; | ||
672 | |||
673 | static struct i2c_board_info i2c_devs1[] __initdata = { | 625 | static struct i2c_board_info i2c_devs1[] __initdata = { |
674 | { I2C_BOARD_INFO("wm8311", 0x34), | 626 | { I2C_BOARD_INFO("wm8311", 0x34), |
675 | .irq = S3C_EINT(0), | 627 | .irq = S3C_EINT(0), |
676 | .platform_data = &glenfarclas_pmic_pdata }, | 628 | .platform_data = &glenfarclas_pmic_pdata }, |
677 | 629 | ||
630 | { I2C_BOARD_INFO("wlf-gf-module", 0x24) }, | ||
631 | { I2C_BOARD_INFO("wlf-gf-module", 0x25) }, | ||
632 | { I2C_BOARD_INFO("wlf-gf-module", 0x26) }, | ||
633 | |||
678 | { I2C_BOARD_INFO("wm1250-ev1", 0x27) }, | 634 | { I2C_BOARD_INFO("wm1250-ev1", 0x27) }, |
679 | { I2C_BOARD_INFO("wm8996", 0x1a), | ||
680 | .platform_data = &wm8996_pdata, | ||
681 | .irq = GLENFARCLAS_PMIC_IRQ_BASE + WM831X_IRQ_GPIO_2, | ||
682 | }, | ||
683 | { I2C_BOARD_INFO("wm9081", 0x6c), | ||
684 | .platform_data = &wm9081_pdata, }, | ||
685 | { I2C_BOARD_INFO("wm8962", 0x1a), | ||
686 | .platform_data = &wm8962_pdata, | ||
687 | .irq = GLENFARCLAS_PMIC_IRQ_BASE + WM831X_IRQ_GPIO_2, | ||
688 | }, | ||
689 | }; | 635 | }; |
690 | 636 | ||
691 | static void __init crag6410_map_io(void) | 637 | static void __init crag6410_map_io(void) |