diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2012-06-26 18:32:25 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2012-06-30 16:40:35 -0400 |
commit | 8778b8f46a7c567fc5b19b0eb4a47f51e5064e3c (patch) | |
tree | 3617adbffdc2d1e0298dd06eb04c7ff6894e9288 /arch/arm/mach-shmobile/board-ap4evb.c | |
parent | 44e1b142fe7c7e04b2d319b17e32a0371a062fed (diff) |
ARM: mach-shmobile: add fixed voltage regulators to ap4evb
On ap4evb 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/board-ap4evb.c')
-rw-r--r-- | arch/arm/mach-shmobile/board-ap4evb.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c index d7417f3bc3b3..3a8548a622ee 100644 --- a/arch/arm/mach-shmobile/board-ap4evb.c +++ b/arch/arm/mach-shmobile/board-ap4evb.c | |||
@@ -34,6 +34,8 @@ | |||
34 | #include <linux/i2c.h> | 34 | #include <linux/i2c.h> |
35 | #include <linux/i2c/tsc2007.h> | 35 | #include <linux/i2c/tsc2007.h> |
36 | #include <linux/io.h> | 36 | #include <linux/io.h> |
37 | #include <linux/regulator/fixed.h> | ||
38 | #include <linux/regulator/machine.h> | ||
37 | #include <linux/smsc911x.h> | 39 | #include <linux/smsc911x.h> |
38 | #include <linux/sh_intc.h> | 40 | #include <linux/sh_intc.h> |
39 | #include <linux/sh_clk.h> | 41 | #include <linux/sh_clk.h> |
@@ -159,6 +161,27 @@ | |||
159 | * CN12: 3.3v | 161 | * CN12: 3.3v |
160 | */ | 162 | */ |
161 | 163 | ||
164 | /* Dummy supplies, where voltage doesn't matter */ | ||
165 | static struct regulator_consumer_supply fixed1v8_power_consumers[] = | ||
166 | { | ||
167 | /* J22 default position: 1.8V */ | ||
168 | REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.1"), | ||
169 | REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.1"), | ||
170 | REGULATOR_SUPPLY("vmmc", "sh_mmcif.0"), | ||
171 | REGULATOR_SUPPLY("vqmmc", "sh_mmcif.0"), | ||
172 | }; | ||
173 | |||
174 | static struct regulator_consumer_supply fixed3v3_power_consumers[] = | ||
175 | { | ||
176 | REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.0"), | ||
177 | REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.0"), | ||
178 | }; | ||
179 | |||
180 | static struct regulator_consumer_supply dummy_supplies[] = { | ||
181 | REGULATOR_SUPPLY("vddvario", "smsc911x"), | ||
182 | REGULATOR_SUPPLY("vdd33a", "smsc911x"), | ||
183 | }; | ||
184 | |||
162 | /* MTD */ | 185 | /* MTD */ |
163 | static struct mtd_partition nor_flash_partitions[] = { | 186 | static struct mtd_partition nor_flash_partitions[] = { |
164 | { | 187 | { |
@@ -1209,6 +1232,12 @@ static void __init ap4evb_init(void) | |||
1209 | u32 srcr4; | 1232 | u32 srcr4; |
1210 | struct clk *clk; | 1233 | struct clk *clk; |
1211 | 1234 | ||
1235 | regulator_register_always_on(0, "fixed-1.8V", fixed1v8_power_consumers, | ||
1236 | ARRAY_SIZE(fixed1v8_power_consumers), 1800000); | ||
1237 | regulator_register_always_on(1, "fixed-3.3V", fixed3v3_power_consumers, | ||
1238 | ARRAY_SIZE(fixed3v3_power_consumers), 3300000); | ||
1239 | regulator_register_fixed(2, dummy_supplies, ARRAY_SIZE(dummy_supplies)); | ||
1240 | |||
1212 | /* External clock source */ | 1241 | /* External clock source */ |
1213 | clk_set_rate(&sh7372_dv_clki_clk, 27000000); | 1242 | clk_set_rate(&sh7372_dv_clki_clk, 27000000); |
1214 | 1243 | ||