diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2012-06-26 18:50:04 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2012-06-28 05:00:54 -0400 |
commit | 9c158b15e73ff301cee1ae7345e04225ac358c2a (patch) | |
tree | d5577f8b165a9cc232f7dc4e16b9659a160acfcb /arch/sh/boards | |
parent | 2db73c9badbf701c9407d1ddb96e946ca460b027 (diff) |
sh: add fixed voltage regulators to ap325rxa
On ap325rxa provide a 3.3V supply for its SD/MMC-card interfaces and a
dummy regulator for the smsc911x driver.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/boards')
-rw-r--r-- | arch/sh/boards/mach-ap325rxa/setup.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/sh/boards/mach-ap325rxa/setup.c b/arch/sh/boards/mach-ap325rxa/setup.c index f33ebf447073..9e963c1d1447 100644 --- a/arch/sh/boards/mach-ap325rxa/setup.c +++ b/arch/sh/boards/mach-ap325rxa/setup.c | |||
@@ -20,6 +20,8 @@ | |||
20 | #include <linux/mtd/sh_flctl.h> | 20 | #include <linux/mtd/sh_flctl.h> |
21 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
22 | #include <linux/i2c.h> | 22 | #include <linux/i2c.h> |
23 | #include <linux/regulator/fixed.h> | ||
24 | #include <linux/regulator/machine.h> | ||
23 | #include <linux/smsc911x.h> | 25 | #include <linux/smsc911x.h> |
24 | #include <linux/gpio.h> | 26 | #include <linux/gpio.h> |
25 | #include <linux/videodev2.h> | 27 | #include <linux/videodev2.h> |
@@ -34,6 +36,12 @@ | |||
34 | #include <asm/suspend.h> | 36 | #include <asm/suspend.h> |
35 | #include <cpu/sh7723.h> | 37 | #include <cpu/sh7723.h> |
36 | 38 | ||
39 | /* Dummy supplies, where voltage doesn't matter */ | ||
40 | static struct regulator_consumer_supply dummy_supplies[] = { | ||
41 | REGULATOR_SUPPLY("vddvario", "smsc911x"), | ||
42 | REGULATOR_SUPPLY("vdd33a", "smsc911x"), | ||
43 | }; | ||
44 | |||
37 | static struct smsc911x_platform_config smsc911x_config = { | 45 | static struct smsc911x_platform_config smsc911x_config = { |
38 | .phy_interface = PHY_INTERFACE_MODE_MII, | 46 | .phy_interface = PHY_INTERFACE_MODE_MII, |
39 | .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, | 47 | .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, |
@@ -423,6 +431,15 @@ static struct platform_device ceu_device = { | |||
423 | }, | 431 | }, |
424 | }; | 432 | }; |
425 | 433 | ||
434 | /* Fixed 3.3V regulators to be used by SDHI0, SDHI1 */ | ||
435 | static struct regulator_consumer_supply fixed3v3_power_consumers[] = | ||
436 | { | ||
437 | REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.0"), | ||
438 | REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.0"), | ||
439 | REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.1"), | ||
440 | REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.1"), | ||
441 | }; | ||
442 | |||
426 | static struct resource sdhi0_cn3_resources[] = { | 443 | static struct resource sdhi0_cn3_resources[] = { |
427 | [0] = { | 444 | [0] = { |
428 | .name = "SDHI0", | 445 | .name = "SDHI0", |
@@ -544,6 +561,10 @@ static int __init ap325rxa_devices_setup(void) | |||
544 | &ap325rxa_sdram_leave_start, | 561 | &ap325rxa_sdram_leave_start, |
545 | &ap325rxa_sdram_leave_end); | 562 | &ap325rxa_sdram_leave_end); |
546 | 563 | ||
564 | regulator_register_always_on(0, "fixed-3.3V", fixed3v3_power_consumers, | ||
565 | ARRAY_SIZE(fixed3v3_power_consumers), 3300000); | ||
566 | regulator_register_fixed(1, dummy_supplies, ARRAY_SIZE(dummy_supplies)); | ||
567 | |||
547 | /* LD3 and LD4 LEDs */ | 568 | /* LD3 and LD4 LEDs */ |
548 | gpio_request(GPIO_PTX5, NULL); /* RUN */ | 569 | gpio_request(GPIO_PTX5, NULL); /* RUN */ |
549 | gpio_direction_output(GPIO_PTX5, 1); | 570 | gpio_direction_output(GPIO_PTX5, 1); |