aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c64xx
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2011-12-16 17:56:37 -0500
committerOlof Johansson <olof@lixom.net>2011-12-16 17:56:37 -0500
commit8df97495c1d2c87f98574522cbeb8bd0453076cb (patch)
tree4c251b839980fec7b1a6e7f80a14885e06c54bb7 /arch/arm/mach-s3c64xx
parent578bd83d7e2bbf533c6968291abb36850c6eaff8 (diff)
parent39cb263eccc974765eed1100d48ac6f0986ef257 (diff)
Merge branch 'samsung/board' into next/boards
* samsung/board: ARM: S3C64XX: Hook up VDDINT on Cragganmore ARM: S3C2440: Add new LCD (W35i) support for Mini2440 board ARM: S3C64XX: Power gate unused domains ARM: S3C64XX: Hook up Littlemill audio card on Cragganmore ARM: S3C64XX: Hook up platform data for Kilchomin module on Cragganmore ARM: S3C64XX: Run Tobermory interrupts in the default mode ARM: S3C64XX: Improve logging of unknown Cragganmore module types ARM: S3C64XX: Configure WM1250 EV1 GPIOs on Cragganmore ARM: S3C64XX: Use software initiated powerdown for Cragganmore ARM: S3C64XX: Raise the frequency of the second I2C bus on Cragganmore ARM: S3C64XX: Correct reservation of GPIOs for CPU module on Cragganmore ARM: SAMSUNG: Fix GPIO space reservation for S3C64xx platforms ARM: S3C64XX: Update for conversion to SAMSUNG_GPIO_EXTRA Conflicts: arch/arm/mach-s3c64xx/mach-crag6410.c
Diffstat (limited to 'arch/arm/mach-s3c64xx')
-rw-r--r--arch/arm/mach-s3c64xx/Kconfig6
-rw-r--r--arch/arm/mach-s3c64xx/include/mach/crag6410.h6
-rw-r--r--arch/arm/mach-s3c64xx/include/mach/gpio.h2
-rw-r--r--arch/arm/mach-s3c64xx/include/mach/irqs.h2
-rw-r--r--arch/arm/mach-s3c64xx/mach-crag6410-module.c56
-rw-r--r--arch/arm/mach-s3c64xx/mach-crag6410.c39
-rw-r--r--arch/arm/mach-s3c64xx/pm.c15
7 files changed, 113 insertions, 13 deletions
diff --git a/arch/arm/mach-s3c64xx/Kconfig b/arch/arm/mach-s3c64xx/Kconfig
index 5552e048c2be..4d8c489edc04 100644
--- a/arch/arm/mach-s3c64xx/Kconfig
+++ b/arch/arm/mach-s3c64xx/Kconfig
@@ -188,7 +188,7 @@ config SMDK6410_WM1190_EV1
188 depends on MACH_SMDK6410 188 depends on MACH_SMDK6410
189 select REGULATOR 189 select REGULATOR
190 select REGULATOR_WM8350 190 select REGULATOR_WM8350
191 select S3C24XX_GPIO_EXTRA64 191 select SAMSUNG_GPIO_EXTRA64
192 select MFD_WM8350_I2C 192 select MFD_WM8350_I2C
193 select MFD_WM8350_CONFIG_MODE_0 193 select MFD_WM8350_CONFIG_MODE_0
194 select MFD_WM8350_CONFIG_MODE_3 194 select MFD_WM8350_CONFIG_MODE_3
@@ -206,7 +206,7 @@ config SMDK6410_WM1192_EV1
206 depends on MACH_SMDK6410 206 depends on MACH_SMDK6410
207 select REGULATOR 207 select REGULATOR
208 select REGULATOR_WM831X 208 select REGULATOR_WM831X
209 select S3C24XX_GPIO_EXTRA64 209 select SAMSUNG_GPIO_EXTRA64
210 select MFD_WM831X 210 select MFD_WM831X
211 select MFD_WM831X_I2C 211 select MFD_WM831X_I2C
212 help 212 help
@@ -287,7 +287,7 @@ config MACH_WLF_CRAGG_6410
287 select S3C_DEV_WDT 287 select S3C_DEV_WDT
288 select S3C_DEV_RTC 288 select S3C_DEV_RTC
289 select S3C64XX_DEV_SPI 289 select S3C64XX_DEV_SPI
290 select S3C24XX_GPIO_EXTRA128 290 select SAMSUNG_GPIO_EXTRA128
291 select I2C 291 select I2C
292 help 292 help
293 Machine support for the Wolfson Cragganmore S3C6410 variant. 293 Machine support for the Wolfson Cragganmore S3C6410 variant.
diff --git a/arch/arm/mach-s3c64xx/include/mach/crag6410.h b/arch/arm/mach-s3c64xx/include/mach/crag6410.h
index be9074e17dfd..5d55ab018b6b 100644
--- a/arch/arm/mach-s3c64xx/include/mach/crag6410.h
+++ b/arch/arm/mach-s3c64xx/include/mach/crag6410.h
@@ -15,9 +15,11 @@
15 15
16#define BANFF_PMIC_IRQ_BASE IRQ_BOARD_START 16#define BANFF_PMIC_IRQ_BASE IRQ_BOARD_START
17#define GLENFARCLAS_PMIC_IRQ_BASE (IRQ_BOARD_START + 64) 17#define GLENFARCLAS_PMIC_IRQ_BASE (IRQ_BOARD_START + 64)
18#define CODEC_IRQ_BASE (IRQ_BOARD_START + 128)
18 19
19#define PCA935X_GPIO_BASE GPIO_BOARD_START 20#define PCA935X_GPIO_BASE GPIO_BOARD_START
20#define CODEC_GPIO_BASE (GPIO_BOARD_START + 8) 21#define CODEC_GPIO_BASE (GPIO_BOARD_START + 8)
21#define GLENFARCLAS_PMIC_GPIO_BASE (GPIO_BOARD_START + 16) 22#define GLENFARCLAS_PMIC_GPIO_BASE (GPIO_BOARD_START + 32)
23#define BANFF_PMIC_GPIO_BASE (GPIO_BOARD_START + 64)
22 24
23#endif 25#endif
diff --git a/arch/arm/mach-s3c64xx/include/mach/gpio.h b/arch/arm/mach-s3c64xx/include/mach/gpio.h
index 6e34c2f6e670..8b540c42d5dd 100644
--- a/arch/arm/mach-s3c64xx/include/mach/gpio.h
+++ b/arch/arm/mach-s3c64xx/include/mach/gpio.h
@@ -88,6 +88,6 @@ enum s3c_gpio_number {
88/* define the number of gpios we need to the one after the GPQ() range */ 88/* define the number of gpios we need to the one after the GPQ() range */
89#define GPIO_BOARD_START (S3C64XX_GPQ(S3C64XX_GPIO_Q_NR) + 1) 89#define GPIO_BOARD_START (S3C64XX_GPQ(S3C64XX_GPIO_Q_NR) + 1)
90 90
91#define BOARD_NR_GPIOS 16 91#define BOARD_NR_GPIOS (16 + CONFIG_SAMSUNG_GPIO_EXTRA)
92 92
93#define ARCH_NR_GPIOS (GPIO_BOARD_START + BOARD_NR_GPIOS) 93#define ARCH_NR_GPIOS (GPIO_BOARD_START + BOARD_NR_GPIOS)
diff --git a/arch/arm/mach-s3c64xx/include/mach/irqs.h b/arch/arm/mach-s3c64xx/include/mach/irqs.h
index 443f85b3c203..96d60e0d9372 100644
--- a/arch/arm/mach-s3c64xx/include/mach/irqs.h
+++ b/arch/arm/mach-s3c64xx/include/mach/irqs.h
@@ -169,7 +169,7 @@
169#define IRQ_BOARD_START (IRQ_EINT_GROUP9_BASE + IRQ_EINT_GROUP9_NR + 1) 169#define IRQ_BOARD_START (IRQ_EINT_GROUP9_BASE + IRQ_EINT_GROUP9_NR + 1)
170 170
171#ifdef CONFIG_MACH_WLF_CRAGG_6410 171#ifdef CONFIG_MACH_WLF_CRAGG_6410
172#define IRQ_BOARD_NR 128 172#define IRQ_BOARD_NR 160
173#elif defined(CONFIG_SMDK6410_WM1190_EV1) 173#elif defined(CONFIG_SMDK6410_WM1190_EV1)
174#define IRQ_BOARD_NR 64 174#define IRQ_BOARD_NR 64
175#elif defined(CONFIG_SMDK6410_WM1192_EV1) 175#elif defined(CONFIG_SMDK6410_WM1192_EV1)
diff --git a/arch/arm/mach-s3c64xx/mach-crag6410-module.c b/arch/arm/mach-s3c64xx/mach-crag6410-module.c
index f208154b1382..cd3c97e2ee75 100644
--- a/arch/arm/mach-s3c64xx/mach-crag6410-module.c
+++ b/arch/arm/mach-s3c64xx/mach-crag6410-module.c
@@ -14,13 +14,43 @@
14 14
15#include <linux/mfd/wm831x/irq.h> 15#include <linux/mfd/wm831x/irq.h>
16#include <linux/mfd/wm831x/gpio.h> 16#include <linux/mfd/wm831x/gpio.h>
17#include <linux/mfd/wm8994/pdata.h>
17 18
19#include <sound/wm5100.h>
18#include <sound/wm8996.h> 20#include <sound/wm8996.h>
19#include <sound/wm8962.h> 21#include <sound/wm8962.h>
20#include <sound/wm9081.h> 22#include <sound/wm9081.h>
21 23
22#include <mach/crag6410.h> 24#include <mach/crag6410.h>
23 25
26static struct wm5100_pdata wm5100_pdata = {
27 .ldo_ena = S3C64XX_GPN(7),
28 .irq_flags = IRQF_TRIGGER_HIGH,
29 .gpio_base = CODEC_GPIO_BASE,
30
31 .in_mode = {
32 WM5100_IN_DIFF,
33 WM5100_IN_DIFF,
34 WM5100_IN_DIFF,
35 WM5100_IN_SE,
36 },
37
38 .hp_pol = CODEC_GPIO_BASE + 3,
39 .jack_modes = {
40 { WM5100_MICDET_MICBIAS3, 0, 0 },
41 { WM5100_MICDET_MICBIAS2, 1, 1 },
42 },
43
44 .gpio_defaults = {
45 0,
46 0,
47 0,
48 0,
49 0x2, /* IRQ: CMOS output */
50 0x3, /* CLKOUT: CMOS output */
51 },
52};
53
24static struct wm8996_retune_mobile_config wm8996_retune[] = { 54static struct wm8996_retune_mobile_config wm8996_retune[] = {
25 { 55 {
26 .name = "Sub LPF", 56 .name = "Sub LPF",
@@ -72,7 +102,6 @@ static struct wm8962_pdata wm8962_pdata __initdata = {
72 0x8000 | WM8962_GPIO_FN_DMICDAT, 102 0x8000 | WM8962_GPIO_FN_DMICDAT,
73 WM8962_GPIO_FN_IRQ, /* Open drain mode */ 103 WM8962_GPIO_FN_IRQ, /* Open drain mode */
74 }, 104 },
75 .irq_active_low = true,
76}; 105};
77 106
78static struct wm9081_pdata wm9081_pdata __initdata = { 107static struct wm9081_pdata wm9081_pdata __initdata = {
@@ -91,6 +120,7 @@ static const struct i2c_board_info wm1254_devs[] = {
91 120
92static const struct i2c_board_info wm1255_devs[] = { 121static const struct i2c_board_info wm1255_devs[] = {
93 { I2C_BOARD_INFO("wm5100", 0x1a), 122 { I2C_BOARD_INFO("wm5100", 0x1a),
123 .platform_data = &wm5100_pdata,
94 .irq = GLENFARCLAS_PMIC_IRQ_BASE + WM831X_IRQ_GPIO_2, 124 .irq = GLENFARCLAS_PMIC_IRQ_BASE + WM831X_IRQ_GPIO_2,
95 }, 125 },
96 { I2C_BOARD_INFO("wm9081", 0x6c), 126 { I2C_BOARD_INFO("wm9081", 0x6c),
@@ -104,6 +134,24 @@ static const struct i2c_board_info wm1259_devs[] = {
104 }, 134 },
105}; 135};
106 136
137static struct wm8994_pdata wm8994_pdata = {
138 .gpio_base = CODEC_GPIO_BASE,
139 .gpio_defaults = {
140 0x3, /* IRQ out, active high, CMOS */
141 },
142 .irq_base = CODEC_IRQ_BASE,
143 .ldo = {
144 { .supply = "WALLVDD" },
145 { .supply = "WALLVDD" },
146 },
147};
148
149static const struct i2c_board_info wm1277_devs[] = {
150 { I2C_BOARD_INFO("wm8958", 0x1a), /* WM8958 is the superset */
151 .platform_data = &wm8994_pdata,
152 .irq = GLENFARCLAS_PMIC_IRQ_BASE + WM831X_IRQ_GPIO_2,
153 },
154};
107 155
108static __devinitdata const struct { 156static __devinitdata const struct {
109 u8 id; 157 u8 id;
@@ -125,6 +173,8 @@ static __devinitdata const struct {
125 { .id = 0x3b, .name = "1255-EV1 Kilchoman", 173 { .id = 0x3b, .name = "1255-EV1 Kilchoman",
126 .i2c_devs = wm1255_devs, .num_i2c_devs = ARRAY_SIZE(wm1255_devs) }, 174 .i2c_devs = wm1255_devs, .num_i2c_devs = ARRAY_SIZE(wm1255_devs) },
127 { .id = 0x3c, .name = "1273-EV1 Longmorn" }, 175 { .id = 0x3c, .name = "1273-EV1 Longmorn" },
176 { .id = 0x3d, .name = "1277-EV1 Littlemill",
177 .i2c_devs = wm1277_devs, .num_i2c_devs = ARRAY_SIZE(wm1277_devs) },
128}; 178};
129 179
130static __devinit int wlf_gf_module_probe(struct i2c_client *i2c, 180static __devinit int wlf_gf_module_probe(struct i2c_client *i2c,
@@ -154,8 +204,8 @@ static __devinit int wlf_gf_module_probe(struct i2c_client *i2c,
154 "Failed to register dev: %d\n", ret); 204 "Failed to register dev: %d\n", ret);
155 } 205 }
156 } else { 206 } else {
157 dev_warn(&i2c->dev, "Unknown module ID %d revision %d\n", 207 dev_warn(&i2c->dev, "Unknown module ID 0x%x revision %d\n",
158 id, rev); 208 id, rev + 1);
159 } 209 }
160 210
161 return 0; 211 return 0;
diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c
index 988ac2e48f08..799558c15b4e 100644
--- a/arch/arm/mach-s3c64xx/mach-crag6410.c
+++ b/arch/arm/mach-s3c64xx/mach-crag6410.c
@@ -37,6 +37,8 @@
37#include <linux/mfd/wm831x/irq.h> 37#include <linux/mfd/wm831x/irq.h>
38#include <linux/mfd/wm831x/gpio.h> 38#include <linux/mfd/wm831x/gpio.h>
39 39
40#include <sound/wm1250-ev1.h>
41
40#include <asm/hardware/vic.h> 42#include <asm/hardware/vic.h>
41#include <asm/mach/arch.h> 43#include <asm/mach/arch.h>
42#include <asm/mach-types.h> 44#include <asm/mach-types.h>
@@ -288,6 +290,11 @@ static struct platform_device speyside_wm8962_device = {
288 .id = -1, 290 .id = -1,
289}; 291};
290 292
293static struct platform_device littlemill_device = {
294 .name = "littlemill",
295 .id = -1,
296};
297
291static struct regulator_consumer_supply wallvdd_consumers[] = { 298static struct regulator_consumer_supply wallvdd_consumers[] = {
292 REGULATOR_SUPPLY("SPKVDD1", "1-001a"), 299 REGULATOR_SUPPLY("SPKVDD1", "1-001a"),
293 REGULATOR_SUPPLY("SPKVDD2", "1-001a"), 300 REGULATOR_SUPPLY("SPKVDD2", "1-001a"),
@@ -340,6 +347,7 @@ static struct platform_device *crag6410_devices[] __initdata = {
340 &crag6410_backlight_device, 347 &crag6410_backlight_device,
341 &speyside_device, 348 &speyside_device,
342 &speyside_wm8962_device, 349 &speyside_wm8962_device,
350 &littlemill_device,
343 &lowland_device, 351 &lowland_device,
344 &wallvdd_device, 352 &wallvdd_device,
345}; 353};
@@ -373,6 +381,10 @@ static struct regulator_init_data vddarm __initdata = {
373 .driver_data = &vddarm_pdata, 381 .driver_data = &vddarm_pdata,
374}; 382};
375 383
384static struct regulator_consumer_supply vddint_consumers[] __initdata = {
385 REGULATOR_SUPPLY("vddint", NULL),
386};
387
376static struct regulator_init_data vddint __initdata = { 388static struct regulator_init_data vddint __initdata = {
377 .constraints = { 389 .constraints = {
378 .name = "VDDINT", 390 .name = "VDDINT",
@@ -381,6 +393,9 @@ static struct regulator_init_data vddint __initdata = {
381 .always_on = 1, 393 .always_on = 1,
382 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, 394 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
383 }, 395 },
396 .num_consumer_supplies = ARRAY_SIZE(vddint_consumers),
397 .consumer_supplies = vddint_consumers,
398 .supply_regulator = "WALLVDD",
384}; 399};
385 400
386static struct regulator_init_data vddmem __initdata = { 401static struct regulator_init_data vddmem __initdata = {
@@ -501,7 +516,8 @@ static struct wm831x_touch_pdata touch_pdata __initdata = {
501static struct wm831x_pdata crag_pmic_pdata __initdata = { 516static struct wm831x_pdata crag_pmic_pdata __initdata = {
502 .wm831x_num = 1, 517 .wm831x_num = 1,
503 .irq_base = BANFF_PMIC_IRQ_BASE, 518 .irq_base = BANFF_PMIC_IRQ_BASE,
504 .gpio_base = GPIO_BOARD_START + 8, 519 .gpio_base = BANFF_PMIC_GPIO_BASE,
520 .soft_shutdown = true,
505 521
506 .backup = &banff_backup_pdata, 522 .backup = &banff_backup_pdata,
507 523
@@ -606,6 +622,7 @@ static struct wm831x_pdata glenfarclas_pmic_pdata __initdata = {
606 .wm831x_num = 2, 622 .wm831x_num = 2,
607 .irq_base = GLENFARCLAS_PMIC_IRQ_BASE, 623 .irq_base = GLENFARCLAS_PMIC_IRQ_BASE,
608 .gpio_base = GLENFARCLAS_PMIC_GPIO_BASE, 624 .gpio_base = GLENFARCLAS_PMIC_GPIO_BASE,
625 .soft_shutdown = true,
609 626
610 .gpio_defaults = { 627 .gpio_defaults = {
611 /* GPIO1-3: IRQ inputs, rising edge triggered, CMOS */ 628 /* GPIO1-3: IRQ inputs, rising edge triggered, CMOS */
@@ -623,6 +640,16 @@ static struct wm831x_pdata glenfarclas_pmic_pdata __initdata = {
623 .disable_touch = true, 640 .disable_touch = true,
624}; 641};
625 642
643static struct wm1250_ev1_pdata wm1250_ev1_pdata = {
644 .gpios = {
645 [WM1250_EV1_GPIO_CLK_ENA] = S3C64XX_GPN(12),
646 [WM1250_EV1_GPIO_CLK_SEL0] = S3C64XX_GPL(12),
647 [WM1250_EV1_GPIO_CLK_SEL1] = S3C64XX_GPL(13),
648 [WM1250_EV1_GPIO_OSR] = S3C64XX_GPL(14),
649 [WM1250_EV1_GPIO_MASTER] = S3C64XX_GPL(8),
650 },
651};
652
626static struct i2c_board_info i2c_devs1[] __initdata = { 653static struct i2c_board_info i2c_devs1[] __initdata = {
627 { I2C_BOARD_INFO("wm8311", 0x34), 654 { I2C_BOARD_INFO("wm8311", 0x34),
628 .irq = S3C_EINT(0), 655 .irq = S3C_EINT(0),
@@ -632,7 +659,13 @@ static struct i2c_board_info i2c_devs1[] __initdata = {
632 { I2C_BOARD_INFO("wlf-gf-module", 0x25) }, 659 { I2C_BOARD_INFO("wlf-gf-module", 0x25) },
633 { I2C_BOARD_INFO("wlf-gf-module", 0x26) }, 660 { I2C_BOARD_INFO("wlf-gf-module", 0x26) },
634 661
635 { I2C_BOARD_INFO("wm1250-ev1", 0x27) }, 662 { I2C_BOARD_INFO("wm1250-ev1", 0x27),
663 .platform_data = &wm1250_ev1_pdata },
664};
665
666static struct s3c2410_platform_i2c i2c1_pdata = {
667 .frequency = 400000,
668 .bus_num = 1,
636}; 669};
637 670
638static void __init crag6410_map_io(void) 671static void __init crag6410_map_io(void)
@@ -693,7 +726,7 @@ static void __init crag6410_machine_init(void)
693 s3c_sdhci2_set_platdata(&crag6410_hsmmc2_pdata); 726 s3c_sdhci2_set_platdata(&crag6410_hsmmc2_pdata);
694 727
695 s3c_i2c0_set_platdata(&i2c0_pdata); 728 s3c_i2c0_set_platdata(&i2c0_pdata);
696 s3c_i2c1_set_platdata(NULL); 729 s3c_i2c1_set_platdata(&i2c1_pdata);
697 s3c_fb_set_platdata(&crag6410_lcd_pdata); 730 s3c_fb_set_platdata(&crag6410_lcd_pdata);
698 731
699 i2c_register_board_info(0, i2c_devs0, ARRAY_SIZE(i2c_devs0)); 732 i2c_register_board_info(0, i2c_devs0, ARRAY_SIZE(i2c_devs0));
diff --git a/arch/arm/mach-s3c64xx/pm.c b/arch/arm/mach-s3c64xx/pm.c
index b375cd5c47cb..0868d1331912 100644
--- a/arch/arm/mach-s3c64xx/pm.c
+++ b/arch/arm/mach-s3c64xx/pm.c
@@ -89,6 +89,8 @@ static struct sleep_save misc_save[] = {
89 89
90 SAVE_ITEM(S3C64XX_SDMA_SEL), 90 SAVE_ITEM(S3C64XX_SDMA_SEL),
91 SAVE_ITEM(S3C64XX_MODEM_MIFPCON), 91 SAVE_ITEM(S3C64XX_MODEM_MIFPCON),
92
93 SAVE_ITEM(S3C64XX_NORMAL_CFG),
92}; 94};
93 95
94void s3c_pm_configure_extint(void) 96void s3c_pm_configure_extint(void)
@@ -181,10 +183,23 @@ static void s3c64xx_pm_prepare(void)
181 183
182static int s3c64xx_pm_init(void) 184static int s3c64xx_pm_init(void)
183{ 185{
186 u32 val;
187
184 pm_cpu_prep = s3c64xx_pm_prepare; 188 pm_cpu_prep = s3c64xx_pm_prepare;
185 pm_cpu_sleep = s3c64xx_cpu_suspend; 189 pm_cpu_sleep = s3c64xx_cpu_suspend;
186 pm_uart_udivslot = 1; 190 pm_uart_udivslot = 1;
187 191
192 /*
193 * Unconditionally disable power domains that contain only
194 * blocks which have no mainline driver support.
195 */
196 val = __raw_readl(S3C64XX_NORMAL_CFG);
197 val &= ~(S3C64XX_NORMALCFG_DOMAIN_G_ON |
198 S3C64XX_NORMALCFG_DOMAIN_V_ON |
199 S3C64XX_NORMALCFG_DOMAIN_I_ON |
200 S3C64XX_NORMALCFG_DOMAIN_P_ON);
201 __raw_writel(val, S3C64XX_NORMAL_CFG);
202
188#ifdef CONFIG_S3C_PM_DEBUG_LED_SMDK 203#ifdef CONFIG_S3C_PM_DEBUG_LED_SMDK
189 gpio_request(S3C64XX_GPN(12), "DEBUG_LED0"); 204 gpio_request(S3C64XX_GPN(12), "DEBUG_LED0");
190 gpio_request(S3C64XX_GPN(13), "DEBUG_LED1"); 205 gpio_request(S3C64XX_GPN(13), "DEBUG_LED1");