aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2012-06-26 18:50:03 -0400
committerPaul Mundt <lethal@linux-sh.org>2012-06-28 05:00:53 -0400
commit2db73c9badbf701c9407d1ddb96e946ca460b027 (patch)
tree198fedd5055fa501e9833b0b24d9c339ab0751ed
parent9d5be6acd832097eee53d0778a89b39ee72f8f2a (diff)
sh: add fixed voltage regulators to sh7757lcr
On sh7757lcr provide a 3.3V supply for its SD/MMC-card interfaces. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
-rw-r--r--arch/sh/boards/board-sh7757lcr.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/sh/boards/board-sh7757lcr.c b/arch/sh/boards/board-sh7757lcr.c
index 5087f8bb4cff..41f86702eb9f 100644
--- a/arch/sh/boards/board-sh7757lcr.c
+++ b/arch/sh/boards/board-sh7757lcr.c
@@ -12,6 +12,8 @@
12#include <linux/platform_device.h> 12#include <linux/platform_device.h>
13#include <linux/gpio.h> 13#include <linux/gpio.h>
14#include <linux/irq.h> 14#include <linux/irq.h>
15#include <linux/regulator/fixed.h>
16#include <linux/regulator/machine.h>
15#include <linux/spi/spi.h> 17#include <linux/spi/spi.h>
16#include <linux/spi/flash.h> 18#include <linux/spi/flash.h>
17#include <linux/io.h> 19#include <linux/io.h>
@@ -199,6 +201,15 @@ static struct platform_device sh7757_eth_giga1_device = {
199 }, 201 },
200}; 202};
201 203
204/* Fixed 3.3V regulator to be used by SDHI0, MMCIF */
205static struct regulator_consumer_supply fixed3v3_power_consumers[] =
206{
207 REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.0"),
208 REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.0"),
209 REGULATOR_SUPPLY("vmmc", "sh_mmcif.0"),
210 REGULATOR_SUPPLY("vqmmc", "sh_mmcif.0"),
211};
212
202/* SH_MMCIF */ 213/* SH_MMCIF */
203static struct resource sh_mmcif_resources[] = { 214static struct resource sh_mmcif_resources[] = {
204 [0] = { 215 [0] = {
@@ -329,6 +340,9 @@ static struct spi_board_info spi_board_info[] = {
329 340
330static int __init sh7757lcr_devices_setup(void) 341static int __init sh7757lcr_devices_setup(void)
331{ 342{
343 regulator_register_always_on(0, "fixed-3.3V", fixed3v3_power_consumers,
344 ARRAY_SIZE(fixed3v3_power_consumers), 3300000);
345
332 /* RGMII (PTA) */ 346 /* RGMII (PTA) */
333 gpio_request(GPIO_FN_ET0_MDC, NULL); 347 gpio_request(GPIO_FN_ET0_MDC, NULL);
334 gpio_request(GPIO_FN_ET0_MDIO, NULL); 348 gpio_request(GPIO_FN_ET0_MDIO, NULL);