summaryrefslogtreecommitdiffstats
path: root/extras/recipes-kernel/linux/linux-omap/base/0003-omap3-beaglexm-fix-power-on-of-DVI.patch
diff options
context:
space:
mode:
Diffstat (limited to 'extras/recipes-kernel/linux/linux-omap/base/0003-omap3-beaglexm-fix-power-on-of-DVI.patch')
-rw-r--r--extras/recipes-kernel/linux/linux-omap/base/0003-omap3-beaglexm-fix-power-on-of-DVI.patch94
1 files changed, 94 insertions, 0 deletions
diff --git a/extras/recipes-kernel/linux/linux-omap/base/0003-omap3-beaglexm-fix-power-on-of-DVI.patch b/extras/recipes-kernel/linux/linux-omap/base/0003-omap3-beaglexm-fix-power-on-of-DVI.patch
new file mode 100644
index 00000000..90446e40
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/base/0003-omap3-beaglexm-fix-power-on-of-DVI.patch
@@ -0,0 +1,94 @@
1From 4004c3e68b973f4cb736048b1e90ee3b511f5865 Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@beagleboard.org>
3Date: Wed, 12 Jan 2011 00:23:29 +0000
4Subject: [PATCH 03/28] omap3: beaglexm: fix power on of DVI
5
6TFP410 DVI chip is used to provide display out.
7This chip is controlled by 2 lines:
8LDO which supplies the power is controlled over gpio + 2
9and the enable of the chip itself is done over gpio + 1
10NOTE: the LDO is necessary for LED, serial blocks as well.
11
12gpio + 1 was used to sense USB overcurrent in vanilla beagle.
13
14Without this fix, the display would not function as the LDO
15remains shut down.
16
17[nm@ti.com: split up, added descriptive changelogs]
18Signed-off-by: Nishanth Menon <nm@ti.com>
19Signed-off-by: Koen Kooi <koen@beagleboard.org>
20Signed-off-by: Tony Lindgren <tony@atomide.com>
21---
22 arch/arm/mach-omap2/board-omap3beagle.c | 42 ++++++++++++++++++++++++++++--
23 1 files changed, 39 insertions(+), 3 deletions(-)
24
25diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
26index 673deb9..2ed8040 100644
27--- a/arch/arm/mach-omap2/board-omap3beagle.c
28+++ b/arch/arm/mach-omap2/board-omap3beagle.c
29@@ -273,6 +273,8 @@ static struct gpio_led gpio_leds[];
30 static int beagle_twl_gpio_setup(struct device *dev,
31 unsigned gpio, unsigned ngpio)
32 {
33+ int r;
34+
35 if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
36 mmc[0].gpio_wp = -EINVAL;
37 } else if ((omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_C1_3) ||
38@@ -293,9 +295,16 @@ static int beagle_twl_gpio_setup(struct device *dev,
39 /* REVISIT: need ehci-omap hooks for external VBUS
40 * power switch and overcurrent detect
41 */
42-
43- gpio_request(gpio + 1, "EHCI_nOC");
44- gpio_direction_input(gpio + 1);
45+ if (omap3_beagle_get_rev() != OMAP3BEAGLE_BOARD_XM) {
46+ r = gpio_request(gpio + 1, "EHCI_nOC");
47+ if (!r) {
48+ r = gpio_direction_input(gpio + 1);
49+ if (r)
50+ gpio_free(gpio + 1);
51+ }
52+ if (r)
53+ pr_err("%s: unable to configure EHCI_nOC\n", __func__);
54+ }
55
56 /*
57 * TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, XM active
58@@ -316,6 +325,33 @@ static int beagle_twl_gpio_setup(struct device *dev,
59 /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
60 gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
61
62+ /*
63+ * gpio + 1 on Xm controls the TFP410's enable line (active low)
64+ * gpio + 2 control varies depending on the board rev as follows:
65+ * P7/P8 revisions(prototype): Camera EN
66+ * A2+ revisions (production): LDO (supplies DVI, serial, led blocks)
67+ */
68+ if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
69+ r = gpio_request(gpio + 1, "nDVI_PWR_EN");
70+ if (!r) {
71+ r = gpio_direction_output(gpio + 1, 0);
72+ if (r)
73+ gpio_free(gpio + 1);
74+ }
75+ if (r)
76+ pr_err("%s: unable to configure nDVI_PWR_EN\n",
77+ __func__);
78+ r = gpio_request(gpio + 2, "DVI_LDO_EN");
79+ if (!r) {
80+ r = gpio_direction_output(gpio + 2, 1);
81+ if (r)
82+ gpio_free(gpio + 2);
83+ }
84+ if (r)
85+ pr_err("%s: unable to configure DVI_LDO_EN\n",
86+ __func__);
87+ }
88+
89 return 0;
90 }
91
92--
931.6.6.1
94