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>
This commit is contained in:
Guennadi Liakhovetski 2012-06-27 00:50:03 +02:00 коммит произвёл Paul Mundt
Родитель 9d5be6acd8
Коммит 2db73c9bad
1 изменённых файлов: 14 добавлений и 0 удалений

Просмотреть файл

@ -12,6 +12,8 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/regulator/fixed.h>
#include <linux/regulator/machine.h>
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <linux/spi/flash.h> #include <linux/spi/flash.h>
#include <linux/io.h> #include <linux/io.h>
@ -199,6 +201,15 @@ static struct platform_device sh7757_eth_giga1_device = {
}, },
}; };
/* Fixed 3.3V regulator to be used by SDHI0, MMCIF */
static struct regulator_consumer_supply fixed3v3_power_consumers[] =
{
REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.0"),
REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.0"),
REGULATOR_SUPPLY("vmmc", "sh_mmcif.0"),
REGULATOR_SUPPLY("vqmmc", "sh_mmcif.0"),
};
/* SH_MMCIF */ /* SH_MMCIF */
static struct resource sh_mmcif_resources[] = { static struct resource sh_mmcif_resources[] = {
[0] = { [0] = {
@ -329,6 +340,9 @@ static struct spi_board_info spi_board_info[] = {
static int __init sh7757lcr_devices_setup(void) static int __init sh7757lcr_devices_setup(void)
{ {
regulator_register_always_on(0, "fixed-3.3V", fixed3v3_power_consumers,
ARRAY_SIZE(fixed3v3_power_consumers), 3300000);
/* RGMII (PTA) */ /* RGMII (PTA) */
gpio_request(GPIO_FN_ET0_MDC, NULL); gpio_request(GPIO_FN_ET0_MDC, NULL);
gpio_request(GPIO_FN_ET0_MDIO, NULL); gpio_request(GPIO_FN_ET0_MDIO, NULL);