aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c64xx
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-01-11 21:04:56 -0500
committerKukjin Kim <kgene.kim@samsung.com>2012-01-19 19:39:37 -0500
commitcda2349a9b63fc51f3ca2953020e0f5ea9e2965c (patch)
treec854087a14adb478a5f910ac852b4008846f428e /arch/arm/mach-s3c64xx
parenta9294cdc17d4f9d16eac3bc42afba9e96c6ad4e4 (diff)
ARM: S3C64XX: Add hookup for Tomatin module on Cragganmore
The Tomatin module carries a WM0010 audio DSP. Provide basic hookup for this, though additional platform data will be needed to fully integrate with the driver. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/mach-s3c64xx')
-rw-r--r--arch/arm/mach-s3c64xx/mach-crag6410-module.c27
-rw-r--r--arch/arm/mach-s3c64xx/mach-crag6410.c11
2 files changed, 36 insertions, 2 deletions
diff --git a/arch/arm/mach-s3c64xx/mach-crag6410-module.c b/arch/arm/mach-s3c64xx/mach-crag6410-module.c
index cd3c97e2ee75..b4ed351e701d 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,
@@ -158,6 +176,8 @@ static __devinitdata const struct {
158 const char *name; 176 const char *name;
159 const struct i2c_board_info *i2c_devs; 177 const struct i2c_board_info *i2c_devs;
160 int num_i2c_devs; 178 int num_i2c_devs;
179 const struct spi_board_info *spi_devs;
180 int num_spi_devs;
161} gf_mods[] = { 181} gf_mods[] = {
162 { .id = 0x01, .name = "1250-EV1 Springbank" }, 182 { .id = 0x01, .name = "1250-EV1 Springbank" },
163 { .id = 0x02, .name = "1251-EV1 Jura" }, 183 { .id = 0x02, .name = "1251-EV1 Jura" },
@@ -165,7 +185,8 @@ static __devinitdata const struct {
165 { .id = 0x11, .name = "6249-EV2 Glenfarclas", }, 185 { .id = 0x11, .name = "6249-EV2 Glenfarclas", },
166 { .id = 0x21, .name = "1275-EV1 Mortlach" }, 186 { .id = 0x21, .name = "1275-EV1 Mortlach" },
167 { .id = 0x25, .name = "1274-EV1 Glencadam" }, 187 { .id = 0x25, .name = "1274-EV1 Glencadam" },
168 { .id = 0x31, .name = "1253-EV1 Tomatin", }, 188 { .id = 0x31, .name = "1253-EV1 Tomatin",
189 .spi_devs = wm1253_devs, .num_spi_devs = ARRAY_SIZE(wm1253_devs) },
169 { .id = 0x39, .name = "1254-EV1 Dallas Dhu", 190 { .id = 0x39, .name = "1254-EV1 Dallas Dhu",
170 .i2c_devs = wm1254_devs, .num_i2c_devs = ARRAY_SIZE(wm1254_devs) }, 191 .i2c_devs = wm1254_devs, .num_i2c_devs = ARRAY_SIZE(wm1254_devs) },
171 { .id = 0x3a, .name = "1259-EV1 Tobermory", 192 { .id = 0x3a, .name = "1259-EV1 Tobermory",
@@ -197,12 +218,16 @@ static __devinit int wlf_gf_module_probe(struct i2c_client *i2c,
197 if (i < ARRAY_SIZE(gf_mods)) { 218 if (i < ARRAY_SIZE(gf_mods)) {
198 dev_info(&i2c->dev, "%s revision %d\n", 219 dev_info(&i2c->dev, "%s revision %d\n",
199 gf_mods[i].name, rev + 1); 220 gf_mods[i].name, rev + 1);
221
200 for (j = 0; j < gf_mods[i].num_i2c_devs; j++) { 222 for (j = 0; j < gf_mods[i].num_i2c_devs; j++) {
201 if (!i2c_new_device(i2c->adapter, 223 if (!i2c_new_device(i2c->adapter,
202 &(gf_mods[i].i2c_devs[j]))) 224 &(gf_mods[i].i2c_devs[j])))
203 dev_err(&i2c->dev, 225 dev_err(&i2c->dev,
204 "Failed to register dev: %d\n", ret); 226 "Failed to register dev: %d\n", ret);
205 } 227 }
228
229 spi_register_board_info(gf_mods[i].spi_devs,
230 gf_mods[i].num_spi_devs);
206 } else { 231 } else {
207 dev_warn(&i2c->dev, "Unknown module ID 0x%x revision %d\n", 232 dev_warn(&i2c->dev, "Unknown module ID 0x%x revision %d\n",
208 id, rev + 1); 233 id, rev + 1);
diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c
index 7539a2999178..f93caad1dd9b 100644
--- a/arch/arm/mach-s3c64xx/mach-crag6410.c
+++ b/arch/arm/mach-s3c64xx/mach-crag6410.c
@@ -576,11 +576,19 @@ static struct s3c2410_platform_i2c i2c0_pdata = {
576 .frequency = 400000, 576 .frequency = 400000,
577}; 577};
578 578
579static struct regulator_consumer_supply pvdd_1v2_consumers[] __initdata = {
580 REGULATOR_SUPPLY("DCVDD", "spi0.0"),
581 REGULATOR_SUPPLY("AVDD", "spi0.0"),
582};
583
579static struct regulator_init_data pvdd_1v2 __initdata = { 584static struct regulator_init_data pvdd_1v2 __initdata = {
580 .constraints = { 585 .constraints = {
581 .name = "PVDD_1V2", 586 .name = "PVDD_1V2",
582 .always_on = 1, 587 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
583 }, 588 },
589
590 .consumer_supplies = pvdd_1v2_consumers,
591 .num_consumer_supplies = ARRAY_SIZE(pvdd_1v2_consumers),
584}; 592};
585 593
586static struct regulator_consumer_supply pvdd_1v8_consumers[] __initdata = { 594static struct regulator_consumer_supply pvdd_1v8_consumers[] __initdata = {
@@ -594,6 +602,7 @@ static struct regulator_consumer_supply pvdd_1v8_consumers[] __initdata = {
594 REGULATOR_SUPPLY("AVDD2", "1-001a"), 602 REGULATOR_SUPPLY("AVDD2", "1-001a"),
595 REGULATOR_SUPPLY("DCVDD", "1-001a"), 603 REGULATOR_SUPPLY("DCVDD", "1-001a"),
596 REGULATOR_SUPPLY("AVDD", "1-001a"), 604 REGULATOR_SUPPLY("AVDD", "1-001a"),
605 REGULATOR_SUPPLY("DBVDD", "spi0.0"),
597}; 606};
598 607
599static struct regulator_init_data pvdd_1v8 __initdata = { 608static struct regulator_init_data pvdd_1v8 __initdata = {