aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c64xx
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-03-27 19:27:28 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-27 19:27:28 -0400
commit1bfecd935849a45b6b47d9f011e1c278ff880512 (patch)
tree23c08a9c103c92e5a4a4cd3311823426c9d2bdf9 /arch/arm/mach-s3c64xx
parent281b05392fc2cb26209b4d85abaf4889ab1991f3 (diff)
parenta754a87ce8b17024358c1be8ee0232ef09a7055f (diff)
Merge tag 'boards' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull "ARM: board specific updates" from Arnd Bergmann/Olof Johansson: "These changes are all specific to one board only. We're trying to keep the number of board files low, but generally board level updates are ok on platforms that are working on moving towards DT based probing, which will eventually lead to removing them. The board-ams-delta.c board file gets a conflict between the removal of ams_delta_config and the addition of a lot of other data. The Kconfig file has two changes in the same line, and in exynos, the power domain cleanup conflicts with the addition of the image sensor device. Signed-off-by: Arnd Bergmann <arnd@arndb.de> [olof: Amended a fix for a mismerge to board-omap4panda.c] Signed-off-by: Olof Johansson <olof@lixom.net>" Fixed up some fairly trivial conflicts manually. * tag 'boards' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (82 commits) i.MX35-PDK: Add Camera support ARM : mx35: 3ds-board: add framebuffer device pxa/hx4700: Remove pcmcia platform_device structure ARM: pxa/hx4700: Reduce sleep mode battery discharge by 35% ARM: pxa/hx4700: Remove unwanted request for GPIO105 ARM: EXYNOS: support Exynos4210-bus Devfreq driver on Nuri board ARM: EXYNOS: Register JPEG on nuri ARM: EXYNOS: Register JPEG on universal_c210 ARM: S5PV210: Enable JPEG on SMDKV210 ARM: S5PV210: Add JPEG board definition ARM: EXYNOS: Enable JPEG on Origen ARM: EXYNOS: Enable JPEG on SMDKV310 ARM: EXYNOS: Add __init attribute to universal_camera_init() ARM: EXYNOS: Add __init attribute to nuri_camera_init() ARM: S5PV210: Enable FIMC on SMDKC110 ARM: S5PV210: Enable FIMC on SMDKV210 ARM: S5PV210: Enable MFC on SMDKC110 ARM: S5PV210: Enable MFC on SMDKV210 ARM: EXYNOS: Enable G2D on SMDKV310 ARM: tegra: update defconfig ...
Diffstat (limited to 'arch/arm/mach-s3c64xx')
-rw-r--r--arch/arm/mach-s3c64xx/Kconfig1
-rw-r--r--arch/arm/mach-s3c64xx/mach-crag6410-module.c31
-rw-r--r--arch/arm/mach-s3c64xx/mach-crag6410.c67
3 files changed, 97 insertions, 2 deletions
diff --git a/arch/arm/mach-s3c64xx/Kconfig b/arch/arm/mach-s3c64xx/Kconfig
index 326ea3a98725..82c0915729ee 100644
--- a/arch/arm/mach-s3c64xx/Kconfig
+++ b/arch/arm/mach-s3c64xx/Kconfig
@@ -304,5 +304,6 @@ config MACH_WLF_CRAGG_6410
304 select S3C64XX_DEV_SPI0 304 select S3C64XX_DEV_SPI0
305 select SAMSUNG_GPIO_EXTRA128 305 select SAMSUNG_GPIO_EXTRA128
306 select I2C 306 select I2C
307 select LEDS_GPIO_REGISTER
307 help 308 help
308 Machine support for the Wolfson Cragganmore S3C6410 variant. 309 Machine support for the Wolfson Cragganmore S3C6410 variant.
diff --git a/arch/arm/mach-s3c64xx/mach-crag6410-module.c b/arch/arm/mach-s3c64xx/mach-crag6410-module.c
index 32a30f38ba0c..b6a67728cc88 100644
--- a/arch/arm/mach-s3c64xx/mach-crag6410-module.c
+++ b/arch/arm/mach-s3c64xx/mach-crag6410-module.c
@@ -11,6 +11,7 @@
11#include <linux/export.h> 11#include <linux/export.h>
12#include <linux/interrupt.h> 12#include <linux/interrupt.h>
13#include <linux/i2c.h> 13#include <linux/i2c.h>
14#include <linux/spi/spi.h>
14 15
15#include <linux/mfd/wm831x/irq.h> 16#include <linux/mfd/wm831x/irq.h>
16#include <linux/mfd/wm831x/gpio.h> 17#include <linux/mfd/wm831x/gpio.h>
@@ -21,8 +22,25 @@
21#include <sound/wm8962.h> 22#include <sound/wm8962.h>
22#include <sound/wm9081.h> 23#include <sound/wm9081.h>
23 24
25#include <plat/s3c64xx-spi.h>
26
24#include <mach/crag6410.h> 27#include <mach/crag6410.h>
25 28
29static struct s3c64xx_spi_csinfo wm0010_spi_csinfo = {
30 .set_level = gpio_set_value,
31 .line = S3C64XX_GPC(3),
32};
33
34static struct spi_board_info wm1253_devs[] = {
35 [0] = {
36 .modalias = "wm0010",
37 .bus_num = 0,
38 .chip_select = 0,
39 .mode = SPI_MODE_0,
40 .controller_data = &wm0010_spi_csinfo,
41 },
42};
43
26static struct wm5100_pdata wm5100_pdata = { 44static struct wm5100_pdata wm5100_pdata = {
27 .ldo_ena = S3C64XX_GPN(7), 45 .ldo_ena = S3C64XX_GPN(7),
28 .irq_flags = IRQF_TRIGGER_HIGH, 46 .irq_flags = IRQF_TRIGGER_HIGH,
@@ -159,14 +177,21 @@ static __devinitdata const struct {
159 const char *name; 177 const char *name;
160 const struct i2c_board_info *i2c_devs; 178 const struct i2c_board_info *i2c_devs;
161 int num_i2c_devs; 179 int num_i2c_devs;
180 const struct spi_board_info *spi_devs;
181 int num_spi_devs;
162} gf_mods[] = { 182} gf_mods[] = {
163 { .id = 0x01, .name = "1250-EV1 Springbank" }, 183 { .id = 0x01, .name = "1250-EV1 Springbank" },
164 { .id = 0x02, .name = "1251-EV1 Jura" }, 184 { .id = 0x02, .name = "1251-EV1 Jura" },
165 { .id = 0x03, .name = "1252-EV1 Glenlivet" }, 185 { .id = 0x03, .name = "1252-EV1 Glenlivet" },
166 { .id = 0x11, .name = "6249-EV2 Glenfarclas", }, 186 { .id = 0x11, .name = "6249-EV2 Glenfarclas", },
187 { .id = 0x14, .name = "6271-EV1 Lochnagar" },
188 { .id = 0x15, .name = "XXXX-EV1 Bells" },
167 { .id = 0x21, .name = "1275-EV1 Mortlach" }, 189 { .id = 0x21, .name = "1275-EV1 Mortlach" },
168 { .id = 0x25, .name = "1274-EV1 Glencadam" }, 190 { .id = 0x25, .name = "1274-EV1 Glencadam" },
169 { .id = 0x31, .name = "1253-EV1 Tomatin", }, 191 { .id = 0x31, .name = "1253-EV1 Tomatin",
192 .spi_devs = wm1253_devs, .num_spi_devs = ARRAY_SIZE(wm1253_devs) },
193 { .id = 0x32, .name = "XXXX-EV1 Caol Illa" },
194 { .id = 0x33, .name = "XXXX-EV1 Oban" },
170 { .id = 0x39, .name = "1254-EV1 Dallas Dhu", 195 { .id = 0x39, .name = "1254-EV1 Dallas Dhu",
171 .i2c_devs = wm1254_devs, .num_i2c_devs = ARRAY_SIZE(wm1254_devs) }, 196 .i2c_devs = wm1254_devs, .num_i2c_devs = ARRAY_SIZE(wm1254_devs) },
172 { .id = 0x3a, .name = "1259-EV1 Tobermory", 197 { .id = 0x3a, .name = "1259-EV1 Tobermory",
@@ -198,12 +223,16 @@ static __devinit int wlf_gf_module_probe(struct i2c_client *i2c,
198 if (i < ARRAY_SIZE(gf_mods)) { 223 if (i < ARRAY_SIZE(gf_mods)) {
199 dev_info(&i2c->dev, "%s revision %d\n", 224 dev_info(&i2c->dev, "%s revision %d\n",
200 gf_mods[i].name, rev + 1); 225 gf_mods[i].name, rev + 1);
226
201 for (j = 0; j < gf_mods[i].num_i2c_devs; j++) { 227 for (j = 0; j < gf_mods[i].num_i2c_devs; j++) {
202 if (!i2c_new_device(i2c->adapter, 228 if (!i2c_new_device(i2c->adapter,
203 &(gf_mods[i].i2c_devs[j]))) 229 &(gf_mods[i].i2c_devs[j])))
204 dev_err(&i2c->dev, 230 dev_err(&i2c->dev,
205 "Failed to register dev: %d\n", ret); 231 "Failed to register dev: %d\n", ret);
206 } 232 }
233
234 spi_register_board_info(gf_mods[i].spi_devs,
235 gf_mods[i].num_spi_devs);
207 } else { 236 } else {
208 dev_warn(&i2c->dev, "Unknown module ID 0x%x revision %d\n", 237 dev_warn(&i2c->dev, "Unknown module ID 0x%x revision %d\n",
209 id, rev + 1); 238 id, rev + 1);
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
301static struct regulator_consumer_supply wallvdd_consumers[] = { 303static 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
581static struct regulator_consumer_supply pvdd_1v2_consumers[] __initdata = {
582 REGULATOR_SUPPLY("DCVDD", "spi0.0"),
583 REGULATOR_SUPPLY("AVDD", "spi0.0"),
584};
585
578static struct regulator_init_data pvdd_1v2 __initdata = { 586static 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
585static struct regulator_consumer_supply pvdd_1v8_consumers[] __initdata = { 596static 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
598static struct regulator_init_data pvdd_1v8 __initdata = { 610static struct regulator_init_data pvdd_1v8 __initdata = {
@@ -682,6 +694,7 @@ static void __init crag6410_map_io(void)
682static struct s3c_sdhci_platdata crag6410_hsmmc2_pdata = { 694static 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
687static void crag6410_cfg_sdhci0(struct platform_device *dev, int width) 700static 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
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 },
757};
758
759static const struct gpio_led_platform_data gpio_leds_pdata = {
760 .leds = gpio_leds,
761 .num_leds = ARRAY_SIZE(gpio_leds),
700}; 762};
701 763
702static struct s3c_hsotg_plat crag6410_hsotg_pdata; 764static 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();