summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/linux/linux-omap-2.6.29/0001-board-ldp-add-regulator-info-to-get-the-microSD-slo.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-kernel/linux/linux-omap-2.6.29/0001-board-ldp-add-regulator-info-to-get-the-microSD-slo.patch')
-rw-r--r--meta/recipes-kernel/linux/linux-omap-2.6.29/0001-board-ldp-add-regulator-info-to-get-the-microSD-slo.patch90
1 files changed, 90 insertions, 0 deletions
diff --git a/meta/recipes-kernel/linux/linux-omap-2.6.29/0001-board-ldp-add-regulator-info-to-get-the-microSD-slo.patch b/meta/recipes-kernel/linux/linux-omap-2.6.29/0001-board-ldp-add-regulator-info-to-get-the-microSD-slo.patch
new file mode 100644
index 0000000000..49045f7bb1
--- /dev/null
+++ b/meta/recipes-kernel/linux/linux-omap-2.6.29/0001-board-ldp-add-regulator-info-to-get-the-microSD-slo.patch
@@ -0,0 +1,90 @@
1From 7efa7cc5b807cb840c62b5bf54bf47181c9b95a6 Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@openembedded.org>
3Date: Mon, 30 Mar 2009 15:21:37 +0200
4Subject: [PATCH v2] ARM: OMAP: board-ldp: add regulator info to get the microSD slot working again
5
6The 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
7
8Changes since v1:
9 * dropped vsim portion since only 4 pins are hooked up
10
11Signed-off-by: Koen Kooi <koen@beagleboard.org>
12---
13 arch/arm/mach-omap2/board-ldp.c | 32 ++++++++++++++++++++++++++++++++
14 1 files changed, 32 insertions(+), 0 deletions(-)
15
16diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
17index 30926b0..19a5c15 100644
18--- a/arch/arm/mach-omap2/board-ldp.c
19+++ b/arch/arm/mach-omap2/board-ldp.c
20@@ -22,6 +22,7 @@
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>
26
27 #include <mach/hardware.h>
28@@ -450,7 +451,16 @@ static struct twl4030_script *twl4030_scripts[] __initdata = {
29 &wrst_script,
30 };
31
32+static const struct twl4030_resconfig ldp_resconfig[] = {
33+ /* disable regulators that u-boot left enabled; the
34+ * devices' drivers should be managing these.
35+ */
36+ { .resource = RES_VMMC1, },
37+ { 0, },
38+};
39+
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),
44 };
45@@ -474,6 +484,25 @@ static struct twl4030_madc_platform_data ldp_madc_data = {
46 .irq_line = 1,
47 };
48
49+static struct regulator_consumer_supply ldp_vmmc1_supply = {
50+ .supply = "vmmc",
51+};
52+
53+/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
54+static struct regulator_init_data ldp_vmmc1 = {
55+ .constraints = {
56+ .min_uV = 1850000,
57+ .max_uV = 3150000,
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,
63+ },
64+ .num_consumer_supplies = 1,
65+ .consumer_supplies = &ldp_vmmc1_supply,
66+};
67+
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,
73 .usb = &ldp_usb_data,
74 .power = &sdp3430_t2scripts_data,
75+ .vmmc1 = &ldp_vmmc1,
76 .gpio = &ldp_gpio_data,
77 .keypad = &ldp_kp_twl4030_data,
78 };
79@@ -530,6 +560,8 @@ static void __init omap_ldp_init(void)
80 omap_serial_init();
81 usb_musb_init();
82 twl4030_mmc_init(mmc);
83+ /* link regulators to MMC adapters */
84+ ldp_vmmc1_supply.dev = mmc[0].dev;
85 }
86
87 static void __init omap_ldp_map_io(void)
88--
891.6.2
90