aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c6410
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2009-11-03 09:42:06 -0500
committerBen Dooks <ben-linux@fluff.org>2009-11-30 20:35:37 -0500
commit42015c133b74f2f483798d58683ac17b587f7bbb (patch)
tree84a4e10c3f52ad607e731f4b5d4782866ff78e99 /arch/arm/mach-s3c6410
parent1a71e4ade19d51bab03b6837d4d33a953e4e1206 (diff)
ARM: SMDK6410: Hook up regulator supplies for WM8580
DVDD is supplied by supplies derived from the PMIC, AVDD and PVDD are supplied from the main wall supply on the base board which runs at 5V. No option is currently supported for running without a PMIC card, the assumption is that the regulator API will be built out when no soft PMIC card is in use. To ease merge issues since this uses the newly added dev_name supply configuration from the regulator API (currently in -next only) the fixed voltage regulator is ifdefed out when the regulator API is not enabled. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/mach-s3c6410')
-rw-r--r--arch/arm/mach-s3c6410/mach-smdk6410.c52
1 files changed, 52 insertions, 0 deletions
diff --git a/arch/arm/mach-s3c6410/mach-smdk6410.c b/arch/arm/mach-s3c6410/mach-smdk6410.c
index 9f1a21462620..480d297c1de2 100644
--- a/arch/arm/mach-s3c6410/mach-smdk6410.c
+++ b/arch/arm/mach-s3c6410/mach-smdk6410.c
@@ -25,6 +25,7 @@
25#include <linux/gpio.h> 25#include <linux/gpio.h>
26#include <linux/delay.h> 26#include <linux/delay.h>
27#include <linux/smsc911x.h> 27#include <linux/smsc911x.h>
28#include <linux/regulator/fixed.h>
28 29
29#ifdef CONFIG_SMDK6410_WM1190_EV1 30#ifdef CONFIG_SMDK6410_WM1190_EV1
30#include <linux/mfd/wm8350/core.h> 31#include <linux/mfd/wm8350/core.h>
@@ -184,6 +185,43 @@ static struct platform_device smdk6410_smsc911x = {
184 }, 185 },
185}; 186};
186 187
188#ifdef CONFIG_REGULATOR
189static struct regulator_consumer_supply smdk6410_b_pwr_5v_consumers[] = {
190 {
191 /* WM8580 */
192 .supply = "PVDD",
193 .dev_name = "0-001b",
194 },
195 {
196 /* WM8580 */
197 .supply = "AVDD",
198 .dev_name = "0-001b",
199 },
200};
201
202static struct regulator_init_data smdk6410_b_pwr_5v_data = {
203 .constraints = {
204 .always_on = 1,
205 },
206 .num_consumer_supplies = ARRAY_SIZE(smdk6410_b_pwr_5v_consumers),
207 .consumer_supplies = smdk6410_b_pwr_5v_consumers,
208};
209
210static struct fixed_voltage_config smdk6410_b_pwr_5v_pdata = {
211 .supply_name = "B_PWR_5V",
212 .microvolts = 5000000,
213 .init_data = &smdk6410_b_pwr_5v_data,
214};
215
216static struct platform_device smdk6410_b_pwr_5v = {
217 .name = "reg-fixed-voltage",
218 .id = -1,
219 .dev = {
220 .platform_data = &smdk6410_b_pwr_5v_pdata,
221 },
222};
223#endif
224
187static struct map_desc smdk6410_iodesc[] = {}; 225static struct map_desc smdk6410_iodesc[] = {};
188 226
189static struct platform_device *smdk6410_devices[] __initdata = { 227static struct platform_device *smdk6410_devices[] __initdata = {
@@ -198,6 +236,10 @@ static struct platform_device *smdk6410_devices[] __initdata = {
198 &s3c_device_fb, 236 &s3c_device_fb,
199 &s3c_device_usb, 237 &s3c_device_usb,
200 &s3c_device_usb_hsotg, 238 &s3c_device_usb_hsotg,
239
240#ifdef CONFIG_REGULATOR
241 &smdk6410_b_pwr_5v,
242#endif
201 &smdk6410_lcd_powerdev, 243 &smdk6410_lcd_powerdev,
202 244
203 &smdk6410_smsc911x, 245 &smdk6410_smsc911x,
@@ -232,6 +274,14 @@ static struct regulator_init_data wm8350_dcdc3_data = {
232}; 274};
233 275
234/* USB, EXT, PCM, ADC/DAC, USB, MMC */ 276/* USB, EXT, PCM, ADC/DAC, USB, MMC */
277static struct regulator_consumer_supply wm8350_dcdc4_consumers[] = {
278 {
279 /* WM8580 */
280 .supply = "DVDD",
281 .dev_name = "0-001b",
282 },
283};
284
235static struct regulator_init_data wm8350_dcdc4_data = { 285static struct regulator_init_data wm8350_dcdc4_data = {
236 .constraints = { 286 .constraints = {
237 .name = "PVDD_HI/PVDD_EXT/PVDD_SYS/PVCCM2MTV", 287 .name = "PVDD_HI/PVDD_EXT/PVDD_SYS/PVCCM2MTV",
@@ -239,6 +289,8 @@ static struct regulator_init_data wm8350_dcdc4_data = {
239 .max_uV = 3000000, 289 .max_uV = 3000000,
240 .always_on = 1, 290 .always_on = 1,
241 }, 291 },
292 .num_consumer_supplies = ARRAY_SIZE(wm8350_dcdc4_consumers),
293 .consumer_supplies = wm8350_dcdc4_consumers,
242}; 294};
243 295
244/* ARM core */ 296/* ARM core */