aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c64xx/mach-crag6410.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-s3c64xx/mach-crag6410.c')
-rw-r--r--arch/arm/mach-s3c64xx/mach-crag6410.c71
1 files changed, 70 insertions, 1 deletions
diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c
index 8077f650eb0e..e20bf5835365 100644
--- a/arch/arm/mach-s3c64xx/mach-crag6410.c
+++ b/arch/arm/mach-s3c64xx/mach-crag6410.c
@@ -19,7 +19,9 @@
19#include <linux/io.h> 19#include <linux/io.h>
20#include <linux/init.h> 20#include <linux/init.h>
21#include <linux/gpio.h> 21#include <linux/gpio.h>
22#include <linux/leds.h>
22#include <linux/delay.h> 23#include <linux/delay.h>
24#include <linux/mmc/host.h>
23#include <linux/regulator/machine.h> 25#include <linux/regulator/machine.h>
24#include <linux/regulator/fixed.h> 26#include <linux/regulator/fixed.h>
25#include <linux/pwm_backlight.h> 27#include <linux/pwm_backlight.h>
@@ -59,6 +61,7 @@
59#include <plat/sdhci.h> 61#include <plat/sdhci.h>
60#include <plat/gpio-cfg.h> 62#include <plat/gpio-cfg.h>
61#include <plat/s3c64xx-spi.h> 63#include <plat/s3c64xx-spi.h>
64#include <plat/udc-hs.h>
62 65
63#include <plat/keypad.h> 66#include <plat/keypad.h>
64#include <plat/clock.h> 67#include <plat/clock.h>
@@ -298,6 +301,7 @@ static struct platform_device littlemill_device = {
298}; 301};
299 302
300static struct regulator_consumer_supply wallvdd_consumers[] = { 303static struct regulator_consumer_supply wallvdd_consumers[] = {
304 REGULATOR_SUPPLY("SPKVDD", "1-001a"),
301 REGULATOR_SUPPLY("SPKVDD1", "1-001a"), 305 REGULATOR_SUPPLY("SPKVDD1", "1-001a"),
302 REGULATOR_SUPPLY("SPKVDD2", "1-001a"), 306 REGULATOR_SUPPLY("SPKVDD2", "1-001a"),
303 REGULATOR_SUPPLY("SPKVDDL", "1-001a"), 307 REGULATOR_SUPPLY("SPKVDDL", "1-001a"),
@@ -574,11 +578,19 @@ static struct s3c2410_platform_i2c i2c0_pdata = {
574 .frequency = 400000, 578 .frequency = 400000,
575}; 579};
576 580
581static struct regulator_consumer_supply pvdd_1v2_consumers[] __initdata = {
582 REGULATOR_SUPPLY("DCVDD", "spi0.0"),
583 REGULATOR_SUPPLY("AVDD", "spi0.0"),
584};
585
577static struct regulator_init_data pvdd_1v2 __initdata = { 586static struct regulator_init_data pvdd_1v2 __initdata = {
578 .constraints = { 587 .constraints = {
579 .name = "PVDD_1V2", 588 .name = "PVDD_1V2",
580 .always_on = 1, 589 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
581 }, 590 },
591
592 .consumer_supplies = pvdd_1v2_consumers,
593 .num_consumer_supplies = ARRAY_SIZE(pvdd_1v2_consumers),
582}; 594};
583 595
584static struct regulator_consumer_supply pvdd_1v8_consumers[] __initdata = { 596static struct regulator_consumer_supply pvdd_1v8_consumers[] __initdata = {
@@ -592,6 +604,7 @@ static struct regulator_consumer_supply pvdd_1v8_consumers[] __initdata = {
592 REGULATOR_SUPPLY("AVDD2", "1-001a"), 604 REGULATOR_SUPPLY("AVDD2", "1-001a"),
593 REGULATOR_SUPPLY("DCVDD", "1-001a"), 605 REGULATOR_SUPPLY("DCVDD", "1-001a"),
594 REGULATOR_SUPPLY("AVDD", "1-001a"), 606 REGULATOR_SUPPLY("AVDD", "1-001a"),
607 REGULATOR_SUPPLY("DBVDD", "spi0.0"),
595}; 608};
596 609
597static struct regulator_init_data pvdd_1v8 __initdata = { 610static struct regulator_init_data pvdd_1v8 __initdata = {
@@ -681,6 +694,7 @@ static void __init crag6410_map_io(void)
681static struct s3c_sdhci_platdata crag6410_hsmmc2_pdata = { 694static struct s3c_sdhci_platdata crag6410_hsmmc2_pdata = {
682 .max_width = 4, 695 .max_width = 4,
683 .cd_type = S3C_SDHCI_CD_PERMANENT, 696 .cd_type = S3C_SDHCI_CD_PERMANENT,
697 .host_caps = MMC_CAP_POWER_OFF_CARD,
684}; 698};
685 699
686static void crag6410_cfg_sdhci0(struct platform_device *dev, int width) 700static void crag6410_cfg_sdhci0(struct platform_device *dev, int width)
@@ -696,8 +710,59 @@ static struct s3c_sdhci_platdata crag6410_hsmmc0_pdata = {
696 .max_width = 4, 710 .max_width = 4,
697 .cd_type = S3C_SDHCI_CD_INTERNAL, 711 .cd_type = S3C_SDHCI_CD_INTERNAL,
698 .cfg_gpio = crag6410_cfg_sdhci0, 712 .cfg_gpio = crag6410_cfg_sdhci0,
713 .host_caps = MMC_CAP_POWER_OFF_CARD,
714};
715
716static const struct gpio_led gpio_leds[] = {
717 {
718 .name = "d13:green:",
719 .gpio = MMGPIO_GPIO_BASE + 0,
720 .default_state = LEDS_GPIO_DEFSTATE_ON,
721 },
722 {
723 .name = "d14:green:",
724 .gpio = MMGPIO_GPIO_BASE + 1,
725 .default_state = LEDS_GPIO_DEFSTATE_ON,
726 },
727 {
728 .name = "d15:green:",
729 .gpio = MMGPIO_GPIO_BASE + 2,
730 .default_state = LEDS_GPIO_DEFSTATE_ON,
731 },
732 {
733 .name = "d16:green:",
734 .gpio = MMGPIO_GPIO_BASE + 3,
735 .default_state = LEDS_GPIO_DEFSTATE_ON,
736 },
737 {
738 .name = "d17:green:",
739 .gpio = MMGPIO_GPIO_BASE + 4,
740 .default_state = LEDS_GPIO_DEFSTATE_ON,
741 },
742 {
743 .name = "d18:green:",
744 .gpio = MMGPIO_GPIO_BASE + 5,
745 .default_state = LEDS_GPIO_DEFSTATE_ON,
746 },
747 {
748 .name = "d19:green:",
749 .gpio = MMGPIO_GPIO_BASE + 6,
750 .default_state = LEDS_GPIO_DEFSTATE_ON,
751 },
752 {
753 .name = "d20:green:",
754 .gpio = MMGPIO_GPIO_BASE + 7,
755 .default_state = LEDS_GPIO_DEFSTATE_ON,
756 },
699}; 757};
700 758
759static const struct gpio_led_platform_data gpio_leds_pdata = {
760 .leds = gpio_leds,
761 .num_leds = ARRAY_SIZE(gpio_leds),
762};
763
764static struct s3c_hsotg_plat crag6410_hsotg_pdata;
765
701static void __init crag6410_machine_init(void) 766static void __init crag6410_machine_init(void)
702{ 767{
703 /* Open drain IRQs need pullups */ 768 /* Open drain IRQs need pullups */
@@ -722,14 +787,18 @@ static void __init crag6410_machine_init(void)
722 s3c_i2c0_set_platdata(&i2c0_pdata); 787 s3c_i2c0_set_platdata(&i2c0_pdata);
723 s3c_i2c1_set_platdata(&i2c1_pdata); 788 s3c_i2c1_set_platdata(&i2c1_pdata);
724 s3c_fb_set_platdata(&crag6410_lcd_pdata); 789 s3c_fb_set_platdata(&crag6410_lcd_pdata);
790 s3c_hsotg_set_platdata(&crag6410_hsotg_pdata);
725 791
726 i2c_register_board_info(0, i2c_devs0, ARRAY_SIZE(i2c_devs0)); 792 i2c_register_board_info(0, i2c_devs0, ARRAY_SIZE(i2c_devs0));
727 i2c_register_board_info(1, i2c_devs1, ARRAY_SIZE(i2c_devs1)); 793 i2c_register_board_info(1, i2c_devs1, ARRAY_SIZE(i2c_devs1));
728 794
729 samsung_keypad_set_platdata(&crag6410_keypad_data); 795 samsung_keypad_set_platdata(&crag6410_keypad_data);
796 s3c64xx_spi0_set_platdata(&s3c64xx_spi0_pdata, 0, 1);
730 797
731 platform_add_devices(crag6410_devices, ARRAY_SIZE(crag6410_devices)); 798 platform_add_devices(crag6410_devices, ARRAY_SIZE(crag6410_devices));
732 799
800 gpio_led_register_device(-1, &gpio_leds_pdata);
801
733 regulator_has_full_constraints(); 802 regulator_has_full_constraints();
734 803
735 s3c64xx_pm_init(); 804 s3c64xx_pm_init();