diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2012-06-26 18:32:29 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2012-06-30 16:50:14 -0400 |
commit | f185c21485eba6aef11b9432eda97f28ed62dbc9 (patch) | |
tree | 199be00aa04ca1ac0337f2cf03dc18ef3f3f8b04 /arch/arm/mach-shmobile | |
parent | 21503a86db5015b74cceb54c41ed8862107ddaec (diff) |
ARM: mach-shmobile: add fixed voltage regulators to kota2
On kota2 provide 1.8V and 3.3V supplies for its SD/MMC-card interfaces
and a dummy regulator for the smsc911x driver.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'arch/arm/mach-shmobile')
-rw-r--r-- | arch/arm/mach-shmobile/board-kota2.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/board-kota2.c b/arch/arm/mach-shmobile/board-kota2.c index f60f1b281cc4..21dbe54304d5 100644 --- a/arch/arm/mach-shmobile/board-kota2.c +++ b/arch/arm/mach-shmobile/board-kota2.c | |||
@@ -27,6 +27,8 @@ | |||
27 | #include <linux/platform_device.h> | 27 | #include <linux/platform_device.h> |
28 | #include <linux/delay.h> | 28 | #include <linux/delay.h> |
29 | #include <linux/io.h> | 29 | #include <linux/io.h> |
30 | #include <linux/regulator/fixed.h> | ||
31 | #include <linux/regulator/machine.h> | ||
30 | #include <linux/smsc911x.h> | 32 | #include <linux/smsc911x.h> |
31 | #include <linux/gpio.h> | 33 | #include <linux/gpio.h> |
32 | #include <linux/input.h> | 34 | #include <linux/input.h> |
@@ -49,6 +51,12 @@ | |||
49 | #include <asm/hardware/cache-l2x0.h> | 51 | #include <asm/hardware/cache-l2x0.h> |
50 | #include <asm/traps.h> | 52 | #include <asm/traps.h> |
51 | 53 | ||
54 | /* Dummy supplies, where voltage doesn't matter */ | ||
55 | static struct regulator_consumer_supply dummy_supplies[] = { | ||
56 | REGULATOR_SUPPLY("vddvario", "smsc911x"), | ||
57 | REGULATOR_SUPPLY("vdd33a", "smsc911x"), | ||
58 | }; | ||
59 | |||
52 | /* SMSC 9220 */ | 60 | /* SMSC 9220 */ |
53 | static struct resource smsc9220_resources[] = { | 61 | static struct resource smsc9220_resources[] = { |
54 | [0] = { | 62 | [0] = { |
@@ -288,6 +296,13 @@ static struct platform_device leds_tpu30_device = { | |||
288 | .resource = tpu30_resources, | 296 | .resource = tpu30_resources, |
289 | }; | 297 | }; |
290 | 298 | ||
299 | /* Fixed 1.8V regulator to be used by MMCIF */ | ||
300 | static struct regulator_consumer_supply fixed1v8_power_consumers[] = | ||
301 | { | ||
302 | REGULATOR_SUPPLY("vmmc", "sh_mmcif.0"), | ||
303 | REGULATOR_SUPPLY("vqmmc", "sh_mmcif.0"), | ||
304 | }; | ||
305 | |||
291 | /* MMCIF */ | 306 | /* MMCIF */ |
292 | static struct resource mmcif_resources[] = { | 307 | static struct resource mmcif_resources[] = { |
293 | [0] = { | 308 | [0] = { |
@@ -321,6 +336,15 @@ static struct platform_device mmcif_device = { | |||
321 | .resource = mmcif_resources, | 336 | .resource = mmcif_resources, |
322 | }; | 337 | }; |
323 | 338 | ||
339 | /* Fixed 3.3V regulator to be used by SDHI0 and SDHI1 */ | ||
340 | static struct regulator_consumer_supply fixed3v3_power_consumers[] = | ||
341 | { | ||
342 | REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.0"), | ||
343 | REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.0"), | ||
344 | REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.1"), | ||
345 | REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.1"), | ||
346 | }; | ||
347 | |||
324 | /* SDHI0 */ | 348 | /* SDHI0 */ |
325 | static struct sh_mobile_sdhi_info sdhi0_info = { | 349 | static struct sh_mobile_sdhi_info sdhi0_info = { |
326 | .tmio_caps = MMC_CAP_SD_HIGHSPEED, | 350 | .tmio_caps = MMC_CAP_SD_HIGHSPEED, |
@@ -411,6 +435,12 @@ static struct platform_device *kota2_devices[] __initdata = { | |||
411 | 435 | ||
412 | static void __init kota2_init(void) | 436 | static void __init kota2_init(void) |
413 | { | 437 | { |
438 | regulator_register_always_on(0, "fixed-1.8V", fixed1v8_power_consumers, | ||
439 | ARRAY_SIZE(fixed1v8_power_consumers), 1800000); | ||
440 | regulator_register_always_on(1, "fixed-3.3V", fixed3v3_power_consumers, | ||
441 | ARRAY_SIZE(fixed3v3_power_consumers), 3300000); | ||
442 | regulator_register_fixed(2, dummy_supplies, ARRAY_SIZE(dummy_supplies)); | ||
443 | |||
414 | sh73a0_pinmux_init(); | 444 | sh73a0_pinmux_init(); |
415 | 445 | ||
416 | /* SCIFA2 (UART2) */ | 446 | /* SCIFA2 (UART2) */ |