diff options
Diffstat (limited to 'arch/arm/mach-s3c64xx/mach-crag6410.c')
-rw-r--r-- | arch/arm/mach-s3c64xx/mach-crag6410.c | 67 |
1 files changed, 66 insertions, 1 deletions
diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c index 3b56bd9cb880..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> |
@@ -299,6 +301,7 @@ static struct platform_device littlemill_device = { | |||
299 | }; | 301 | }; |
300 | 302 | ||
301 | static struct regulator_consumer_supply wallvdd_consumers[] = { | 303 | static struct regulator_consumer_supply wallvdd_consumers[] = { |
304 | REGULATOR_SUPPLY("SPKVDD", "1-001a"), | ||
302 | REGULATOR_SUPPLY("SPKVDD1", "1-001a"), | 305 | REGULATOR_SUPPLY("SPKVDD1", "1-001a"), |
303 | REGULATOR_SUPPLY("SPKVDD2", "1-001a"), | 306 | REGULATOR_SUPPLY("SPKVDD2", "1-001a"), |
304 | REGULATOR_SUPPLY("SPKVDDL", "1-001a"), | 307 | REGULATOR_SUPPLY("SPKVDDL", "1-001a"), |
@@ -575,11 +578,19 @@ static struct s3c2410_platform_i2c i2c0_pdata = { | |||
575 | .frequency = 400000, | 578 | .frequency = 400000, |
576 | }; | 579 | }; |
577 | 580 | ||
581 | static struct regulator_consumer_supply pvdd_1v2_consumers[] __initdata = { | ||
582 | REGULATOR_SUPPLY("DCVDD", "spi0.0"), | ||
583 | REGULATOR_SUPPLY("AVDD", "spi0.0"), | ||
584 | }; | ||
585 | |||
578 | static struct regulator_init_data pvdd_1v2 __initdata = { | 586 | static struct regulator_init_data pvdd_1v2 __initdata = { |
579 | .constraints = { | 587 | .constraints = { |
580 | .name = "PVDD_1V2", | 588 | .name = "PVDD_1V2", |
581 | .always_on = 1, | 589 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, |
582 | }, | 590 | }, |
591 | |||
592 | .consumer_supplies = pvdd_1v2_consumers, | ||
593 | .num_consumer_supplies = ARRAY_SIZE(pvdd_1v2_consumers), | ||
583 | }; | 594 | }; |
584 | 595 | ||
585 | static struct regulator_consumer_supply pvdd_1v8_consumers[] __initdata = { | 596 | static struct regulator_consumer_supply pvdd_1v8_consumers[] __initdata = { |
@@ -593,6 +604,7 @@ static struct regulator_consumer_supply pvdd_1v8_consumers[] __initdata = { | |||
593 | REGULATOR_SUPPLY("AVDD2", "1-001a"), | 604 | REGULATOR_SUPPLY("AVDD2", "1-001a"), |
594 | REGULATOR_SUPPLY("DCVDD", "1-001a"), | 605 | REGULATOR_SUPPLY("DCVDD", "1-001a"), |
595 | REGULATOR_SUPPLY("AVDD", "1-001a"), | 606 | REGULATOR_SUPPLY("AVDD", "1-001a"), |
607 | REGULATOR_SUPPLY("DBVDD", "spi0.0"), | ||
596 | }; | 608 | }; |
597 | 609 | ||
598 | static struct regulator_init_data pvdd_1v8 __initdata = { | 610 | static struct regulator_init_data pvdd_1v8 __initdata = { |
@@ -682,6 +694,7 @@ static void __init crag6410_map_io(void) | |||
682 | static struct s3c_sdhci_platdata crag6410_hsmmc2_pdata = { | 694 | static struct s3c_sdhci_platdata crag6410_hsmmc2_pdata = { |
683 | .max_width = 4, | 695 | .max_width = 4, |
684 | .cd_type = S3C_SDHCI_CD_PERMANENT, | 696 | .cd_type = S3C_SDHCI_CD_PERMANENT, |
697 | .host_caps = MMC_CAP_POWER_OFF_CARD, | ||
685 | }; | 698 | }; |
686 | 699 | ||
687 | static void crag6410_cfg_sdhci0(struct platform_device *dev, int width) | 700 | static void crag6410_cfg_sdhci0(struct platform_device *dev, int width) |
@@ -697,6 +710,55 @@ static struct s3c_sdhci_platdata crag6410_hsmmc0_pdata = { | |||
697 | .max_width = 4, | 710 | .max_width = 4, |
698 | .cd_type = S3C_SDHCI_CD_INTERNAL, | 711 | .cd_type = S3C_SDHCI_CD_INTERNAL, |
699 | .cfg_gpio = crag6410_cfg_sdhci0, | 712 | .cfg_gpio = crag6410_cfg_sdhci0, |
713 | .host_caps = MMC_CAP_POWER_OFF_CARD, | ||
714 | }; | ||
715 | |||
716 | static 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 | }, | ||
757 | }; | ||
758 | |||
759 | static const struct gpio_led_platform_data gpio_leds_pdata = { | ||
760 | .leds = gpio_leds, | ||
761 | .num_leds = ARRAY_SIZE(gpio_leds), | ||
700 | }; | 762 | }; |
701 | 763 | ||
702 | static struct s3c_hsotg_plat crag6410_hsotg_pdata; | 764 | static struct s3c_hsotg_plat crag6410_hsotg_pdata; |
@@ -731,9 +793,12 @@ static void __init crag6410_machine_init(void) | |||
731 | i2c_register_board_info(1, i2c_devs1, ARRAY_SIZE(i2c_devs1)); | 793 | i2c_register_board_info(1, i2c_devs1, ARRAY_SIZE(i2c_devs1)); |
732 | 794 | ||
733 | 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); | ||
734 | 797 | ||
735 | platform_add_devices(crag6410_devices, ARRAY_SIZE(crag6410_devices)); | 798 | platform_add_devices(crag6410_devices, ARRAY_SIZE(crag6410_devices)); |
736 | 799 | ||
800 | gpio_led_register_device(-1, &gpio_leds_pdata); | ||
801 | |||
737 | regulator_has_full_constraints(); | 802 | regulator_has_full_constraints(); |
738 | 803 | ||
739 | s3c64xx_pm_init(); | 804 | s3c64xx_pm_init(); |