aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c6410/mach-smdk6410.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2009-02-17 10:59:38 -0500
committerBen Dooks <ben-linux@fluff.org>2009-05-01 06:38:45 -0400
commitecc558acaba9ca1c6e2e7b54a1edb73ee391ae17 (patch)
tree53eba5554e7e39f2128505dd3bd23cbd30f67815 /arch/arm/mach-s3c6410/mach-smdk6410.c
parent3056ea0afba83d19af5f1f3daf6ed7211f0717da (diff)
[ARM] SMDK6410: Support WM1190-EV1 PMIC board
The SMDK6410 supports pluggable PMIC boards. One such board is the Wolfson Microelectronics 1190-EV1 for the WM8350 PMICs. This patch introduces initial support for this module. Further patches will add additional integration with the system as support for the S3C6410 and other devices on the system improves. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/mach-s3c6410/mach-smdk6410.c')
-rw-r--r--arch/arm/mach-s3c6410/mach-smdk6410.c131
1 files changed, 131 insertions, 0 deletions
diff --git a/arch/arm/mach-s3c6410/mach-smdk6410.c b/arch/arm/mach-s3c6410/mach-smdk6410.c
index dfd84d00f8d0..466dee0954f4 100644
--- a/arch/arm/mach-s3c6410/mach-smdk6410.c
+++ b/arch/arm/mach-s3c6410/mach-smdk6410.c
@@ -26,6 +26,11 @@
26#include <linux/delay.h> 26#include <linux/delay.h>
27#include <linux/smsc911x.h> 27#include <linux/smsc911x.h>
28 28
29#ifdef CONFIG_SMDK6410_WM1190_EV1
30#include <linux/mfd/wm8350/core.h>
31#include <linux/mfd/wm8350/pmic.h>
32#endif
33
29#include <video/platform_lcd.h> 34#include <video/platform_lcd.h>
30 35
31#include <asm/mach/arch.h> 36#include <asm/mach/arch.h>
@@ -182,9 +187,135 @@ static struct platform_device *smdk6410_devices[] __initdata = {
182 &smdk6410_smsc911x, 187 &smdk6410_smsc911x,
183}; 188};
184 189
190#ifdef CONFIG_SMDK6410_WM1190_EV1
191/* S3C64xx internal logic & PLL */
192static struct regulator_init_data wm8350_dcdc1_data = {
193 .constraints = {
194 .name = "PVDD_INT/PVDD_PLL",
195 .min_uV = 1200000,
196 .max_uV = 1200000,
197 .always_on = 1,
198 .apply_uV = 1,
199 },
200};
201
202/* Memory */
203static struct regulator_init_data wm8350_dcdc3_data = {
204 .constraints = {
205 .name = "PVDD_MEM",
206 .min_uV = 1800000,
207 .max_uV = 1800000,
208 .always_on = 1,
209 .state_mem = {
210 .uV = 1800000,
211 .mode = REGULATOR_MODE_NORMAL,
212 .enabled = 1,
213 },
214 .initial_state = PM_SUSPEND_MEM,
215 },
216};
217
218/* USB, EXT, PCM, ADC/DAC, USB, MMC */
219static struct regulator_init_data wm8350_dcdc4_data = {
220 .constraints = {
221 .name = "PVDD_HI/PVDD_EXT/PVDD_SYS/PVCCM2MTV",
222 .min_uV = 3000000,
223 .max_uV = 3000000,
224 .always_on = 1,
225 },
226};
227
228/* ARM core */
229static struct regulator_init_data wm8350_dcdc6_data = {
230 .constraints = {
231 .name = "PVDD_ARM",
232 .min_uV = 1000000,
233 .max_uV = 1300000,
234 .always_on = 1,
235 },
236};
237
238/* Alive */
239static struct regulator_init_data wm8350_ldo1_data = {
240 .constraints = {
241 .name = "PVDD_ALIVE",
242 .min_uV = 1200000,
243 .max_uV = 1200000,
244 .always_on = 1,
245 .apply_uV = 1,
246 },
247};
248
249/* OTG */
250static struct regulator_init_data wm8350_ldo2_data = {
251 .constraints = {
252 .name = "PVDD_OTG",
253 .min_uV = 3300000,
254 .max_uV = 3300000,
255 },
256};
257
258/* LCD */
259static struct regulator_init_data wm8350_ldo3_data = {
260 .constraints = {
261 .name = "PVDD_LCD",
262 .min_uV = 3000000,
263 .max_uV = 3000000,
264 },
265};
266
267/* OTGi/1190-EV1 HPVDD & AVDD */
268static struct regulator_init_data wm8350_ldo4_data = {
269 .constraints = {
270 .name = "PVDD_OTGI/HPVDD/AVDD",
271 .min_uV = 1200000,
272 .max_uV = 1200000,
273 .apply_uV = 1,
274 },
275};
276
277static struct {
278 int regulator;
279 struct regulator_init_data *initdata;
280} wm1190_regulators[] = {
281 { WM8350_DCDC_1, &wm8350_dcdc1_data },
282 { WM8350_DCDC_3, &wm8350_dcdc3_data },
283 { WM8350_DCDC_4, &wm8350_dcdc4_data },
284 { WM8350_DCDC_6, &wm8350_dcdc6_data },
285 { WM8350_LDO_1, &wm8350_ldo1_data },
286 { WM8350_LDO_2, &wm8350_ldo2_data },
287 { WM8350_LDO_3, &wm8350_ldo3_data },
288 { WM8350_LDO_4, &wm8350_ldo4_data },
289};
290
291static int __init smdk6410_wm8350_init(struct wm8350 *wm8350)
292{
293 int i;
294
295 /* Instantiate the regulators */
296 for (i = 0; i < ARRAY_SIZE(wm1190_regulators); i++)
297 wm8350_register_regulator(wm8350,
298 wm1190_regulators[i].regulator,
299 wm1190_regulators[i].initdata);
300
301 return 0;
302}
303
304static struct wm8350_platform_data __initdata smdk6410_wm8350_pdata = {
305 .init = smdk6410_wm8350_init,
306};
307#endif
308
185static struct i2c_board_info i2c_devs0[] __initdata = { 309static struct i2c_board_info i2c_devs0[] __initdata = {
186 { I2C_BOARD_INFO("24c08", 0x50), }, 310 { I2C_BOARD_INFO("24c08", 0x50), },
187 { I2C_BOARD_INFO("wm8580", 0x1b), }, 311 { I2C_BOARD_INFO("wm8580", 0x1b), },
312
313#ifdef CONFIG_SMDK6410_WM1190_EV1
314 { I2C_BOARD_INFO("wm8350", 0x1a),
315 .platform_data = &smdk6410_wm8350_pdata,
316 .irq = S3C_EINT(12),
317 },
318#endif
188}; 319};
189 320
190static struct i2c_board_info i2c_devs1[] __initdata = { 321static struct i2c_board_info i2c_devs1[] __initdata = {