1 From 7efa7cc5b807cb840c62b5bf54bf47181c9b95a6 Mon Sep 17 00:00:00 2001
2 From: Koen Kooi <koen@openembedded.org>
3 Date: Mon, 30 Mar 2009 15:21:37 +0200
4 Subject: [PATCH v2] ARM: OMAP: board-ldp: add regulator info to get the microSD slot working again
6 The ldp board was left behind when other boards got updated. The ldp info was copied from the beagleboard board file and s/beagle/ldp/g
9 * dropped vsim portion since only 4 pins are hooked up
11 Signed-off-by: Koen Kooi <koen@beagleboard.org>
13 arch/arm/mach-omap2/board-ldp.c | 32 ++++++++++++++++++++++++++++++++
14 1 files changed, 32 insertions(+), 0 deletions(-)
16 diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
17 index 30926b0..19a5c15 100644
18 --- a/arch/arm/mach-omap2/board-ldp.c
19 +++ b/arch/arm/mach-omap2/board-ldp.c
21 #include <linux/clk.h>
22 #include <linux/spi/spi.h>
23 #include <linux/spi/ads7846.h>
24 +#include <linux/regulator/machine.h>
25 #include <linux/i2c/twl4030.h>
27 #include <mach/hardware.h>
28 @@ -450,7 +451,16 @@ static struct twl4030_script *twl4030_scripts[] __initdata = {
32 +static const struct twl4030_resconfig ldp_resconfig[] = {
33 + /* disable regulators that u-boot left enabled; the
34 + * devices' drivers should be managing these.
36 + { .resource = RES_VMMC1, },
40 static struct twl4030_power_data sdp3430_t2scripts_data __initdata = {
41 + .resource_config = ldp_resconfig,
42 .scripts = twl4030_scripts,
43 .size = ARRAY_SIZE(twl4030_scripts),
45 @@ -474,6 +484,25 @@ static struct twl4030_madc_platform_data ldp_madc_data = {
49 +static struct regulator_consumer_supply ldp_vmmc1_supply = {
53 +/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
54 +static struct regulator_init_data ldp_vmmc1 = {
58 + .valid_modes_mask = REGULATOR_MODE_NORMAL
59 + | REGULATOR_MODE_STANDBY,
60 + .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
61 + | REGULATOR_CHANGE_MODE
62 + | REGULATOR_CHANGE_STATUS,
64 + .num_consumer_supplies = 1,
65 + .consumer_supplies = &ldp_vmmc1_supply,
68 static struct twl4030_platform_data ldp_twldata = {
69 .irq_base = TWL4030_IRQ_BASE,
70 .irq_end = TWL4030_IRQ_END,
71 @@ -483,6 +512,7 @@ static struct twl4030_platform_data ldp_twldata = {
72 .madc = &ldp_madc_data,
74 .power = &sdp3430_t2scripts_data,
75 + .vmmc1 = &ldp_vmmc1,
76 .gpio = &ldp_gpio_data,
77 .keypad = &ldp_kp_twl4030_data,
79 @@ -530,6 +560,8 @@ static void __init omap_ldp_init(void)
82 twl4030_mmc_init(mmc);
83 + /* link regulators to MMC adapters */
84 + ldp_vmmc1_supply.dev = mmc[0].dev;
87 static void __init omap_ldp_map_io(void)