aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c64xx
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-01-09 17:37:41 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-01-09 17:37:41 -0500
commit6d889d03ab1417645e76e129834f76204bae37c0 (patch)
tree577e37b5597b27f6de25bbbc634a0f17ccfb15f7 /arch/arm/mach-s3c64xx
parent7400c12eb069df781894a94dfa5c865f3fe3e2d4 (diff)
parent421b759b86eb8a914cbbd11f6d09a74f411762c6 (diff)
Merge tag 'boards' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Board-level changes This adds and extends support for specific boards on a number of ARM platforms: omap, imx, samsung, tegra, ... * tag 'boards' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (49 commits) Enable 32 bit flash support for iMX21ADS board ARM: mx31pdk: Add MC13783 RTC support iomux-mx25: configuration to support CSPI3 on CSI pins MX1:apf9328: Add i2c support mioa701: add newly available DoC G3 chip arm/tegra: remove __initdata annotation from pinmux tables arm/tegra: Use bus notifiers to trigger pinmux setup arm/tegra: Refactor board-*-pinmux.c to share code arm/tegra: Fix mistake in Trimslice's pinmux arm/tegra: Rework Seaboard-vs-Ventana pinmux table arm/tegra: Remove useless entries from ventana_pinmux[] arm/tegra: PCIe: Remove include of mach/pinmux.h arm/tegra: Harmony PCIe: Don't touch pinmux arm/tegra: Add AUXDATA for tegra-pinmux and tegra-gpio arm/tegra: Split Seaboard GPIO table to allow for Ventana ARM: imx6q: generate imx6q dtb files arm/imx6q: Rename Sabreauto to Armadillo2 arm/imx6q-sabrelite: add enet phy ksz9021rn fixup arm/imx6: add imx6q sabrelite board support dts/imx: rename uart labels to consistent with hw spec ...
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.c13
7 files changed, 111 insertions, 13 deletions
diff --git a/arch/arm/mach-s3c64xx/Kconfig b/arch/arm/mach-s3c64xx/Kconfig
index e42e26d7fd38..dd20c66cd700 100644
--- a/arch/arm/mach-s3c64xx/Kconfig
+++ b/arch/arm/mach-s3c64xx/Kconfig
@@ -194,7 +194,7 @@ config SMDK6410_WM1190_EV1
194 depends on MACH_SMDK6410 194 depends on MACH_SMDK6410
195 select REGULATOR 195 select REGULATOR
196 select REGULATOR_WM8350 196 select REGULATOR_WM8350
197 select S3C24XX_GPIO_EXTRA64 197 select SAMSUNG_GPIO_EXTRA64
198 select MFD_WM8350_I2C 198 select MFD_WM8350_I2C
199 select MFD_WM8350_CONFIG_MODE_0 199 select MFD_WM8350_CONFIG_MODE_0
200 select MFD_WM8350_CONFIG_MODE_3 200 select MFD_WM8350_CONFIG_MODE_3
@@ -212,7 +212,7 @@ config SMDK6410_WM1192_EV1
212 depends on MACH_SMDK6410 212 depends on MACH_SMDK6410
213 select REGULATOR 213 select REGULATOR
214 select REGULATOR_WM831X 214 select REGULATOR_WM831X
215 select S3C24XX_GPIO_EXTRA64 215 select SAMSUNG_GPIO_EXTRA64
216 select MFD_WM831X 216 select MFD_WM831X
217 select MFD_WM831X_I2C 217 select MFD_WM831X_I2C
218 help 218 help
@@ -294,7 +294,7 @@ config MACH_WLF_CRAGG_6410
294 select S3C_DEV_WDT 294 select S3C_DEV_WDT
295 select S3C_DEV_RTC 295 select S3C_DEV_RTC
296 select S3C64XX_DEV_SPI0 296 select S3C64XX_DEV_SPI0
297 select S3C24XX_GPIO_EXTRA128 297 select SAMSUNG_GPIO_EXTRA128
298 select I2C 298 select I2C
299 help 299 help
300 Machine support for the Wolfson Cragganmore S3C6410 variant. 300 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 fb786b6a2eae..680fd758ff2d 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>
@@ -289,6 +291,11 @@ static struct platform_device speyside_wm8962_device = {
289 .id = -1, 291 .id = -1,
290}; 292};
291 293
294static struct platform_device littlemill_device = {
295 .name = "littlemill",
296 .id = -1,
297};
298
292static struct regulator_consumer_supply wallvdd_consumers[] = { 299static struct regulator_consumer_supply wallvdd_consumers[] = {
293 REGULATOR_SUPPLY("SPKVDD1", "1-001a"), 300 REGULATOR_SUPPLY("SPKVDD1", "1-001a"),
294 REGULATOR_SUPPLY("SPKVDD2", "1-001a"), 301 REGULATOR_SUPPLY("SPKVDD2", "1-001a"),
@@ -341,6 +348,7 @@ static struct platform_device *crag6410_devices[] __initdata = {
341 &crag6410_backlight_device, 348 &crag6410_backlight_device,
342 &speyside_device, 349 &speyside_device,
343 &speyside_wm8962_device, 350 &speyside_wm8962_device,
351 &littlemill_device,
344 &lowland_device, 352 &lowland_device,
345 &wallvdd_device, 353 &wallvdd_device,
346}; 354};
@@ -374,6 +382,10 @@ static struct regulator_init_data vddarm __initdata = {
374 .driver_data = &vddarm_pdata, 382 .driver_data = &vddarm_pdata,
375}; 383};
376 384
385static struct regulator_consumer_supply vddint_consumers[] __initdata = {
386 REGULATOR_SUPPLY("vddint", NULL),
387};
388
377static struct regulator_init_data vddint __initdata = { 389static struct regulator_init_data vddint __initdata = {
378 .constraints = { 390 .constraints = {
379 .name = "VDDINT", 391 .name = "VDDINT",
@@ -382,6 +394,9 @@ static struct regulator_init_data vddint __initdata = {
382 .always_on = 1, 394 .always_on = 1,
383 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, 395 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
384 }, 396 },
397 .num_consumer_supplies = ARRAY_SIZE(vddint_consumers),
398 .consumer_supplies = vddint_consumers,
399 .supply_regulator = "WALLVDD",
385}; 400};
386 401
387static struct regulator_init_data vddmem __initdata = { 402static struct regulator_init_data vddmem __initdata = {
@@ -502,7 +517,8 @@ static struct wm831x_touch_pdata touch_pdata __initdata = {
502static struct wm831x_pdata crag_pmic_pdata __initdata = { 517static struct wm831x_pdata crag_pmic_pdata __initdata = {
503 .wm831x_num = 1, 518 .wm831x_num = 1,
504 .irq_base = BANFF_PMIC_IRQ_BASE, 519 .irq_base = BANFF_PMIC_IRQ_BASE,
505 .gpio_base = GPIO_BOARD_START + 8, 520 .gpio_base = BANFF_PMIC_GPIO_BASE,
521 .soft_shutdown = true,
506 522
507 .backup = &banff_backup_pdata, 523 .backup = &banff_backup_pdata,
508 524
@@ -607,6 +623,7 @@ static struct wm831x_pdata glenfarclas_pmic_pdata __initdata = {
607 .wm831x_num = 2, 623 .wm831x_num = 2,
608 .irq_base = GLENFARCLAS_PMIC_IRQ_BASE, 624 .irq_base = GLENFARCLAS_PMIC_IRQ_BASE,
609 .gpio_base = GLENFARCLAS_PMIC_GPIO_BASE, 625 .gpio_base = GLENFARCLAS_PMIC_GPIO_BASE,
626 .soft_shutdown = true,
610 627
611 .gpio_defaults = { 628 .gpio_defaults = {
612 /* GPIO1-3: IRQ inputs, rising edge triggered, CMOS */ 629 /* GPIO1-3: IRQ inputs, rising edge triggered, CMOS */
@@ -624,6 +641,16 @@ static struct wm831x_pdata glenfarclas_pmic_pdata __initdata = {
624 .disable_touch = true, 641 .disable_touch = true,
625}; 642};
626 643
644static struct wm1250_ev1_pdata wm1250_ev1_pdata = {
645 .gpios = {
646 [WM1250_EV1_GPIO_CLK_ENA] = S3C64XX_GPN(12),
647 [WM1250_EV1_GPIO_CLK_SEL0] = S3C64XX_GPL(12),
648 [WM1250_EV1_GPIO_CLK_SEL1] = S3C64XX_GPL(13),
649 [WM1250_EV1_GPIO_OSR] = S3C64XX_GPL(14),
650 [WM1250_EV1_GPIO_MASTER] = S3C64XX_GPL(8),
651 },
652};
653
627static struct i2c_board_info i2c_devs1[] __initdata = { 654static struct i2c_board_info i2c_devs1[] __initdata = {
628 { I2C_BOARD_INFO("wm8311", 0x34), 655 { I2C_BOARD_INFO("wm8311", 0x34),
629 .irq = S3C_EINT(0), 656 .irq = S3C_EINT(0),
@@ -633,7 +660,13 @@ static struct i2c_board_info i2c_devs1[] __initdata = {
633 { I2C_BOARD_INFO("wlf-gf-module", 0x25) }, 660 { I2C_BOARD_INFO("wlf-gf-module", 0x25) },
634 { I2C_BOARD_INFO("wlf-gf-module", 0x26) }, 661 { I2C_BOARD_INFO("wlf-gf-module", 0x26) },
635 662
636 { I2C_BOARD_INFO("wm1250-ev1", 0x27) }, 663 { I2C_BOARD_INFO("wm1250-ev1", 0x27),
664 .platform_data = &wm1250_ev1_pdata },
665};
666
667static struct s3c2410_platform_i2c i2c1_pdata = {
668 .frequency = 400000,
669 .bus_num = 1,
637}; 670};
638 671
639static void __init crag6410_map_io(void) 672static void __init crag6410_map_io(void)
@@ -694,7 +727,7 @@ static void __init crag6410_machine_init(void)
694 s3c_sdhci2_set_platdata(&crag6410_hsmmc2_pdata); 727 s3c_sdhci2_set_platdata(&crag6410_hsmmc2_pdata);
695 728
696 s3c_i2c0_set_platdata(&i2c0_pdata); 729 s3c_i2c0_set_platdata(&i2c0_pdata);
697 s3c_i2c1_set_platdata(NULL); 730 s3c_i2c1_set_platdata(&i2c1_pdata);
698 s3c_fb_set_platdata(&crag6410_lcd_pdata); 731 s3c_fb_set_platdata(&crag6410_lcd_pdata);
699 732
700 i2c_register_board_info(0, i2c_devs0, ARRAY_SIZE(i2c_devs0)); 733 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 7d3e81b9dd06..055dac90e0e2 100644
--- a/arch/arm/mach-s3c64xx/pm.c
+++ b/arch/arm/mach-s3c64xx/pm.c
@@ -346,10 +346,23 @@ int __init s3c64xx_pm_init(void)
346 346
347static __init int s3c64xx_pm_initcall(void) 347static __init int s3c64xx_pm_initcall(void)
348{ 348{
349 u32 val;
350
349 pm_cpu_prep = s3c64xx_pm_prepare; 351 pm_cpu_prep = s3c64xx_pm_prepare;
350 pm_cpu_sleep = s3c64xx_cpu_suspend; 352 pm_cpu_sleep = s3c64xx_cpu_suspend;
351 pm_uart_udivslot = 1; 353 pm_uart_udivslot = 1;
352 354
355 /*
356 * Unconditionally disable power domains that contain only
357 * blocks which have no mainline driver support.
358 */
359 val = __raw_readl(S3C64XX_NORMAL_CFG);
360 val &= ~(S3C64XX_NORMALCFG_DOMAIN_G_ON |
361 S3C64XX_NORMALCFG_DOMAIN_V_ON |
362 S3C64XX_NORMALCFG_DOMAIN_I_ON |
363 S3C64XX_NORMALCFG_DOMAIN_P_ON);
364 __raw_writel(val, S3C64XX_NORMAL_CFG);
365
353#ifdef CONFIG_S3C_PM_DEBUG_LED_SMDK 366#ifdef CONFIG_S3C_PM_DEBUG_LED_SMDK
354 gpio_request(S3C64XX_GPN(12), "DEBUG_LED0"); 367 gpio_request(S3C64XX_GPN(12), "DEBUG_LED0");
355 gpio_request(S3C64XX_GPN(13), "DEBUG_LED1"); 368 gpio_request(S3C64XX_GPN(13), "DEBUG_LED1");