aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile/board-kzm9g.c
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2012-06-26 18:32:31 -0400
committerRafael J. Wysocki <rjw@sisk.pl>2012-06-30 16:56:39 -0400
commit44a4244e4a0cab17c8ddcec78f6fc9dd92cef247 (patch)
tree933d686731e23b97f1869eec4756b163033fff8e /arch/arm/mach-shmobile/board-kzm9g.c
parentd50baf9ef514e58d855bafd18050ccd4e4ba52b4 (diff)
ARM: mach-shmobile: add fixed voltage regulators to kzm9g
On kzm9g provide 1.8V and 2.8V 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/board-kzm9g.c')
-rw-r--r--arch/arm/mach-shmobile/board-kzm9g.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/board-kzm9g.c b/arch/arm/mach-shmobile/board-kzm9g.c
index a16c970ee377..256aa8dce66b 100644
--- a/arch/arm/mach-shmobile/board-kzm9g.c
+++ b/arch/arm/mach-shmobile/board-kzm9g.c
@@ -30,6 +30,8 @@
30#include <linux/mmc/sh_mobile_sdhi.h> 30#include <linux/mmc/sh_mobile_sdhi.h>
31#include <linux/mfd/tmio.h> 31#include <linux/mfd/tmio.h>
32#include <linux/platform_device.h> 32#include <linux/platform_device.h>
33#include <linux/regulator/fixed.h>
34#include <linux/regulator/machine.h>
33#include <linux/smsc911x.h> 35#include <linux/smsc911x.h>
34#include <linux/usb/r8a66597.h> 36#include <linux/usb/r8a66597.h>
35#include <linux/usb/renesas_usbhs.h> 37#include <linux/usb/renesas_usbhs.h>
@@ -57,6 +59,12 @@
57#define GPIO_PCF8575_PORT15 (GPIO_NR + 13) 59#define GPIO_PCF8575_PORT15 (GPIO_NR + 13)
58#define GPIO_PCF8575_PORT16 (GPIO_NR + 14) 60#define GPIO_PCF8575_PORT16 (GPIO_NR + 14)
59 61
62/* Dummy supplies, where voltage doesn't matter */
63static struct regulator_consumer_supply dummy_supplies[] = {
64 REGULATOR_SUPPLY("vddvario", "smsc911x"),
65 REGULATOR_SUPPLY("vdd33a", "smsc911x"),
66};
67
60/* 68/*
61 * FSI-AK4648 69 * FSI-AK4648
62 * 70 *
@@ -322,6 +330,13 @@ static struct platform_device lcdc_device = {
322 }, 330 },
323}; 331};
324 332
333/* Fixed 1.8V regulator to be used by MMCIF */
334static struct regulator_consumer_supply fixed1v8_power_consumers[] =
335{
336 REGULATOR_SUPPLY("vmmc", "sh_mmcif.0"),
337 REGULATOR_SUPPLY("vqmmc", "sh_mmcif.0"),
338};
339
325/* MMCIF */ 340/* MMCIF */
326static struct resource sh_mmcif_resources[] = { 341static struct resource sh_mmcif_resources[] = {
327 [0] = { 342 [0] = {
@@ -358,6 +373,13 @@ static struct platform_device mmc_device = {
358 .resource = sh_mmcif_resources, 373 .resource = sh_mmcif_resources,
359}; 374};
360 375
376/* Fixed 2.8V regulators to be used by SDHI0 */
377static struct regulator_consumer_supply fixed2v8_power_consumers[] =
378{
379 REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.0"),
380 REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.0"),
381};
382
361/* SDHI */ 383/* SDHI */
362static struct sh_mobile_sdhi_info sdhi0_info = { 384static struct sh_mobile_sdhi_info sdhi0_info = {
363 .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT, 385 .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT,
@@ -619,6 +641,12 @@ device_initcall(as3711_enable_lcdc_backlight);
619 641
620static void __init kzm_init(void) 642static void __init kzm_init(void)
621{ 643{
644 regulator_register_always_on(0, "fixed-1.8V", fixed1v8_power_consumers,
645 ARRAY_SIZE(fixed1v8_power_consumers), 1800000);
646 regulator_register_always_on(1, "fixed-2.8V", fixed2v8_power_consumers,
647 ARRAY_SIZE(fixed2v8_power_consumers), 2800000);
648 regulator_register_fixed(2, dummy_supplies, ARRAY_SIZE(dummy_supplies));
649
622 sh73a0_pinmux_init(); 650 sh73a0_pinmux_init();
623 651
624 /* enable SCIFA4 */ 652 /* enable SCIFA4 */