* [PATCH] OMAP: Beagle: fix TFP410 powerdown GPIO init
@ 2012-06-13 9:20 Tomi Valkeinen
2012-06-14 6:58 ` Russ Dill
0 siblings, 1 reply; 10+ messages in thread
From: Tomi Valkeinen @ 2012-06-13 9:20 UTC (permalink / raw)
To: Tony Lindgren, linux-omap
Cc: Russ Dill, Robert Nelson, Jason Kridner, Tomi Valkeinen
Commit e813a55eb9c9bc6c8039fb16332cf43402125b30 ("OMAP: board-files:
remove custom PD GPIO handling for DVI output") moved TFP410 chip's
powerdown-gpio handling from the board files to the tfp410 driver. One
gpio_request_one(powerdown-gpio, ...) was mistakenly left unremoved in
the Beagle board file. This causes the tfp410 driver to fail to request
the gpio on Beagle, causing the driver to fail and thus the DVI output
doesn't work.
Looking more closely to beagle board file, there seems to be other
problems also:
- The powerdown-gpio is initialized as OMAP_PIN_INPUT, whereas it's an
output.
- The GPIO number 170 was used directly in the pin muxing above, even
though the gpio number is different on some versions of beagle.
- The field for the gpio is named "reset_gpio" in the beagle_config
struct, which is a bit confusing name for the gpio.
This patch does the following:
- Remove the gpio_request_one() for the gpio from the board file
- Use the gpio value from beagle_config for the pin muxing.
- Changes the pin to OMAP_PIN_OUTPUT
- Rename "reset_gpio" to "tfp410_pd_gpio"
Tested on BeagleBoard C3.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
arch/arm/mach-omap2/board-omap3beagle.c | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index 79c6909..1bc8cea 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -81,13 +81,13 @@ static u8 omap3_beagle_version;
static struct {
int mmc1_gpio_wp;
int usb_pwr_level;
- int reset_gpio;
+ int tfp410_pd_gpio;
int usr_button_gpio;
int mmc_caps;
} beagle_config = {
.mmc1_gpio_wp = -EINVAL,
.usb_pwr_level = GPIOF_OUT_INIT_LOW,
- .reset_gpio = 129,
+ .tfp410_pd_gpio = 129,
.usr_button_gpio = 4,
.mmc_caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
};
@@ -126,21 +126,21 @@ static void __init omap3_beagle_init_rev(void)
printk(KERN_INFO "OMAP3 Beagle Rev: Ax/Bx\n");
omap3_beagle_version = OMAP3BEAGLE_BOARD_AXBX;
beagle_config.mmc1_gpio_wp = 29;
- beagle_config.reset_gpio = 170;
+ beagle_config.tfp410_pd_gpio = 170;
beagle_config.usr_button_gpio = 7;
break;
case 6:
printk(KERN_INFO "OMAP3 Beagle Rev: C1/C2/C3\n");
omap3_beagle_version = OMAP3BEAGLE_BOARD_C1_3;
beagle_config.mmc1_gpio_wp = 23;
- beagle_config.reset_gpio = 170;
+ beagle_config.tfp410_pd_gpio = 170;
beagle_config.usr_button_gpio = 7;
break;
case 5:
printk(KERN_INFO "OMAP3 Beagle Rev: C4\n");
omap3_beagle_version = OMAP3BEAGLE_BOARD_C4;
beagle_config.mmc1_gpio_wp = 23;
- beagle_config.reset_gpio = 170;
+ beagle_config.tfp410_pd_gpio = 170;
beagle_config.usr_button_gpio = 7;
break;
case 0:
@@ -287,7 +287,6 @@ static int beagle_twl_gpio_setup(struct device *dev,
if (gpio_request_one(gpio + 1, GPIOF_IN, "EHCI_nOC"))
pr_err("%s: unable to configure EHCI_nOC\n", __func__);
}
- dvi_panel.power_down_gpio = beagle_config.reset_gpio;
gpio_request_one(gpio + TWL4030_GPIO_MAX, beagle_config.usb_pwr_level,
"nEN_USB_PWR");
@@ -515,9 +514,8 @@ static void __init omap3_beagle_init(void)
omap_sdrc_init(mt46h32m32lf6_sdrc_params,
mt46h32m32lf6_sdrc_params);
- omap_mux_init_gpio(170, OMAP_PIN_INPUT);
- /* REVISIT leave DVI powered down until it's needed ... */
- gpio_request_one(170, GPIOF_OUT_INIT_HIGH, "DVI_nPD");
+ dvi_panel.power_down_gpio = beagle_config.tfp410_pd_gpio;
+ omap_mux_init_gpio(dvi_panel.power_down_gpio, OMAP_PIN_OUTPUT);
usb_musb_init(NULL);
usbhs_init(&usbhs_bdata);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH] OMAP: Beagle: fix TFP410 powerdown GPIO init 2012-06-13 9:20 [PATCH] OMAP: Beagle: fix TFP410 powerdown GPIO init Tomi Valkeinen @ 2012-06-14 6:58 ` Russ Dill 2012-06-14 7:18 ` Tomi Valkeinen 0 siblings, 1 reply; 10+ messages in thread From: Russ Dill @ 2012-06-14 6:58 UTC (permalink / raw) To: Tomi Valkeinen; +Cc: Tony Lindgren, linux-omap, Robert Nelson, Jason Kridner On Wed, Jun 13, 2012 at 2:20 AM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote: > Commit e813a55eb9c9bc6c8039fb16332cf43402125b30 ("OMAP: board-files: > remove custom PD GPIO handling for DVI output") moved TFP410 chip's > powerdown-gpio handling from the board files to the tfp410 driver. One > gpio_request_one(powerdown-gpio, ...) was mistakenly left unremoved in > the Beagle board file. This causes the tfp410 driver to fail to request > the gpio on Beagle, causing the driver to fail and thus the DVI output > doesn't work. Can you take the one I sent earlier instead? http://www.spinics.net/lists/linux-omap/msg69913.html ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] OMAP: Beagle: fix TFP410 powerdown GPIO init 2012-06-14 6:58 ` Russ Dill @ 2012-06-14 7:18 ` Tomi Valkeinen 2012-06-14 7:59 ` Russ Dill 0 siblings, 1 reply; 10+ messages in thread From: Tomi Valkeinen @ 2012-06-14 7:18 UTC (permalink / raw) To: Russ Dill; +Cc: Tony Lindgren, linux-omap, Robert Nelson, Jason Kridner [-- Attachment #1: Type: text/plain, Size: 1043 bytes --] On Wed, 2012-06-13 at 23:58 -0700, Russ Dill wrote: > On Wed, Jun 13, 2012 at 2:20 AM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote: > > Commit e813a55eb9c9bc6c8039fb16332cf43402125b30 ("OMAP: board-files: > > remove custom PD GPIO handling for DVI output") moved TFP410 chip's > > powerdown-gpio handling from the board files to the tfp410 driver. One > > gpio_request_one(powerdown-gpio, ...) was mistakenly left unremoved in > > the Beagle board file. This causes the tfp410 driver to fail to request > > the gpio on Beagle, causing the driver to fail and thus the DVI output > > doesn't work. > > Can you take the one I sent earlier instead? > > http://www.spinics.net/lists/linux-omap/msg69913.html Hmm, that probably doesn't apply. The power-down GPIO is now handled in the tfp410 driver, not in the board files. Looking more closely at the board file, what are these nDVI_PWR_EN, DVI_LDO_EN and DVI_PU gpios? There's no "enable line" on tfp410. Only the power-down gpio, which is none of the above... Tomi [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] OMAP: Beagle: fix TFP410 powerdown GPIO init 2012-06-14 7:18 ` Tomi Valkeinen @ 2012-06-14 7:59 ` Russ Dill 2012-06-14 8:13 ` Tomi Valkeinen 0 siblings, 1 reply; 10+ messages in thread From: Russ Dill @ 2012-06-14 7:59 UTC (permalink / raw) To: Tomi Valkeinen; +Cc: Tony Lindgren, linux-omap, Robert Nelson, Jason Kridner On Thu, Jun 14, 2012 at 12:18 AM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote: > On Wed, 2012-06-13 at 23:58 -0700, Russ Dill wrote: >> On Wed, Jun 13, 2012 at 2:20 AM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote: >> > Commit e813a55eb9c9bc6c8039fb16332cf43402125b30 ("OMAP: board-files: >> > remove custom PD GPIO handling for DVI output") moved TFP410 chip's >> > powerdown-gpio handling from the board files to the tfp410 driver. One >> > gpio_request_one(powerdown-gpio, ...) was mistakenly left unremoved in >> > the Beagle board file. This causes the tfp410 driver to fail to request >> > the gpio on Beagle, causing the driver to fail and thus the DVI output >> > doesn't work. >> >> Can you take the one I sent earlier instead? >> >> http://www.spinics.net/lists/linux-omap/msg69913.html > > Hmm, that probably doesn't apply. The power-down GPIO is now handled in > the tfp410 driver, not in the board files. Give me a branch to rebase it onto and I will. > Looking more closely at the board file, what are these nDVI_PWR_EN, > DVI_LDO_EN and DVI_PU gpios? There's no "enable line" on tfp410. Only > the power-down gpio, which is none of the above... On my schematic, DVI_LDO_EN is labeled more sanely, DVI_PU. I'm not sure of the history of that. My patch does remove any reference to DVI_LDO_EN. nDVI_PWR_EN is labeled AUX_3V3_DIS on my schematic. AUX_3V3_DIS is connected to the disable pin of an LDO that provides power for the DVI transceiver. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] OMAP: Beagle: fix TFP410 powerdown GPIO init 2012-06-14 7:59 ` Russ Dill @ 2012-06-14 8:13 ` Tomi Valkeinen 2012-06-14 8:17 ` Russ Dill 2012-06-14 11:40 ` Russ Dill 0 siblings, 2 replies; 10+ messages in thread From: Tomi Valkeinen @ 2012-06-14 8:13 UTC (permalink / raw) To: Russ Dill; +Cc: Tony Lindgren, linux-omap, Robert Nelson, Jason Kridner [-- Attachment #1: Type: text/plain, Size: 2058 bytes --] On Thu, 2012-06-14 at 00:59 -0700, Russ Dill wrote: > On Thu, Jun 14, 2012 at 12:18 AM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote: > > On Wed, 2012-06-13 at 23:58 -0700, Russ Dill wrote: > >> On Wed, Jun 13, 2012 at 2:20 AM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote: > >> > Commit e813a55eb9c9bc6c8039fb16332cf43402125b30 ("OMAP: board-files: > >> > remove custom PD GPIO handling for DVI output") moved TFP410 chip's > >> > powerdown-gpio handling from the board files to the tfp410 driver. One > >> > gpio_request_one(powerdown-gpio, ...) was mistakenly left unremoved in > >> > the Beagle board file. This causes the tfp410 driver to fail to request > >> > the gpio on Beagle, causing the driver to fail and thus the DVI output > >> > doesn't work. > >> > >> Can you take the one I sent earlier instead? > >> > >> http://www.spinics.net/lists/linux-omap/msg69913.html > > > > Hmm, that probably doesn't apply. The power-down GPIO is now handled in > > the tfp410 driver, not in the board files. > > Give me a branch to rebase it onto and I will. v3.5-rc2 > > Looking more closely at the board file, what are these nDVI_PWR_EN, > > DVI_LDO_EN and DVI_PU gpios? There's no "enable line" on tfp410. Only > > the power-down gpio, which is none of the above... > > On my schematic, DVI_LDO_EN is labeled more sanely, DVI_PU. I'm not > sure of the history of that. My patch does remove any reference to > DVI_LDO_EN. > > nDVI_PWR_EN is labeled AUX_3V3_DIS on my schematic. AUX_3V3_DIS is > connected to the disable pin of an LDO that provides power for the DVI > transceiver. Okay. These are a bit problematic, because we're in the process of removing these kinds of things from the board file, as they cannot be supported with device tree. The tfp410 driver in v3.5 doesn't even have the platform_enable/disable callback anymore. Those do not belong to tfp410 driver, but I don't really know how they should be handled. This is one of the questions about device tree that is unclear to me... Tomi [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] OMAP: Beagle: fix TFP410 powerdown GPIO init 2012-06-14 8:13 ` Tomi Valkeinen @ 2012-06-14 8:17 ` Russ Dill 2012-06-14 8:20 ` Tomi Valkeinen 2012-06-14 11:40 ` Russ Dill 1 sibling, 1 reply; 10+ messages in thread From: Russ Dill @ 2012-06-14 8:17 UTC (permalink / raw) To: Tomi Valkeinen; +Cc: Tony Lindgren, linux-omap, Robert Nelson, Jason Kridner On Thu, Jun 14, 2012 at 1:13 AM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote: > On Thu, 2012-06-14 at 00:59 -0700, Russ Dill wrote: >> On Thu, Jun 14, 2012 at 12:18 AM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote: >> > On Wed, 2012-06-13 at 23:58 -0700, Russ Dill wrote: >> >> On Wed, Jun 13, 2012 at 2:20 AM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote: >> >> > Commit e813a55eb9c9bc6c8039fb16332cf43402125b30 ("OMAP: board-files: >> >> > remove custom PD GPIO handling for DVI output") moved TFP410 chip's >> >> > powerdown-gpio handling from the board files to the tfp410 driver. One >> >> > gpio_request_one(powerdown-gpio, ...) was mistakenly left unremoved in >> >> > the Beagle board file. This causes the tfp410 driver to fail to request >> >> > the gpio on Beagle, causing the driver to fail and thus the DVI output >> >> > doesn't work. >> >> >> >> Can you take the one I sent earlier instead? >> >> >> >> http://www.spinics.net/lists/linux-omap/msg69913.html >> > >> > Hmm, that probably doesn't apply. The power-down GPIO is now handled in >> > the tfp410 driver, not in the board files. >> >> Give me a branch to rebase it onto and I will. > > v3.5-rc2 > >> > Looking more closely at the board file, what are these nDVI_PWR_EN, >> > DVI_LDO_EN and DVI_PU gpios? There's no "enable line" on tfp410. Only >> > the power-down gpio, which is none of the above... >> >> On my schematic, DVI_LDO_EN is labeled more sanely, DVI_PU. I'm not >> sure of the history of that. My patch does remove any reference to >> DVI_LDO_EN. >> >> nDVI_PWR_EN is labeled AUX_3V3_DIS on my schematic. AUX_3V3_DIS is >> connected to the disable pin of an LDO that provides power for the DVI >> transceiver. > > Okay. These are a bit problematic, because we're in the process of > removing these kinds of things from the board file, as they cannot be > supported with device tree. The tfp410 driver in v3.5 doesn't even have > the platform_enable/disable callback anymore. > > Those do not belong to tfp410 driver, but I don't really know how they > should be handled. This is one of the questions about device tree that > is unclear to me... Are you talking about the AUX_3V3_DIS pin? The boardfile currently just initializes that low, that should be too much of a problem to put into DT, or if someone is so inclined assign it to a regulator via DT. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] OMAP: Beagle: fix TFP410 powerdown GPIO init 2012-06-14 8:17 ` Russ Dill @ 2012-06-14 8:20 ` Tomi Valkeinen 0 siblings, 0 replies; 10+ messages in thread From: Tomi Valkeinen @ 2012-06-14 8:20 UTC (permalink / raw) To: Russ Dill; +Cc: Tony Lindgren, linux-omap, Robert Nelson, Jason Kridner [-- Attachment #1: Type: text/plain, Size: 1036 bytes --] On Thu, 2012-06-14 at 01:17 -0700, Russ Dill wrote: > On Thu, Jun 14, 2012 at 1:13 AM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote: > > Okay. These are a bit problematic, because we're in the process of > > removing these kinds of things from the board file, as they cannot be > > supported with device tree. The tfp410 driver in v3.5 doesn't even have > > the platform_enable/disable callback anymore. > > > > Those do not belong to tfp410 driver, but I don't really know how they > > should be handled. This is one of the questions about device tree that > > is unclear to me... > > > Are you talking about the AUX_3V3_DIS pin? The boardfile currently > just initializes that low, that should be too much of a problem to put > into DT, or if someone is so inclined assign it to a regulator via DT. Ah, sorry. You are right. The only gpio handled in the platform_enable/disable calls is the power-down gpio, and that is handled by the tfp410 driver properly. So there shouldn't be a problem there. Tomi [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] OMAP: Beagle: fix TFP410 powerdown GPIO init 2012-06-14 8:13 ` Tomi Valkeinen 2012-06-14 8:17 ` Russ Dill @ 2012-06-14 11:40 ` Russ Dill 2012-06-14 12:20 ` Tomi Valkeinen 1 sibling, 1 reply; 10+ messages in thread From: Russ Dill @ 2012-06-14 11:40 UTC (permalink / raw) To: Tomi Valkeinen; +Cc: Tony Lindgren, linux-omap, Robert Nelson, Jason Kridner On Thu, Jun 14, 2012 at 1:13 AM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote: > On Thu, 2012-06-14 at 00:59 -0700, Russ Dill wrote: >> On Thu, Jun 14, 2012 at 12:18 AM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote: >> > On Wed, 2012-06-13 at 23:58 -0700, Russ Dill wrote: >> >> On Wed, Jun 13, 2012 at 2:20 AM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote: >> >> > Commit e813a55eb9c9bc6c8039fb16332cf43402125b30 ("OMAP: board-files: >> >> > remove custom PD GPIO handling for DVI output") moved TFP410 chip's >> >> > powerdown-gpio handling from the board files to the tfp410 driver. One >> >> > gpio_request_one(powerdown-gpio, ...) was mistakenly left unremoved in >> >> > the Beagle board file. This causes the tfp410 driver to fail to request >> >> > the gpio on Beagle, causing the driver to fail and thus the DVI output >> >> > doesn't work. >> >> >> >> Can you take the one I sent earlier instead? >> >> >> >> http://www.spinics.net/lists/linux-omap/msg69913.html >> > >> > Hmm, that probably doesn't apply. The power-down GPIO is now handled in >> > the tfp410 driver, not in the board files. >> >> Give me a branch to rebase it onto and I will. > > v3.5-rc2 This one (v4) already applies to v3.5-rc2 http://www.spinics.net/lists/linux-omap/msg70042.html ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] OMAP: Beagle: fix TFP410 powerdown GPIO init 2012-06-14 11:40 ` Russ Dill @ 2012-06-14 12:20 ` Tomi Valkeinen 2012-06-20 13:48 ` Tony Lindgren 0 siblings, 1 reply; 10+ messages in thread From: Tomi Valkeinen @ 2012-06-14 12:20 UTC (permalink / raw) To: Russ Dill; +Cc: Tony Lindgren, linux-omap, Robert Nelson, Jason Kridner [-- Attachment #1: Type: text/plain, Size: 1718 bytes --] On Thu, 2012-06-14 at 04:40 -0700, Russ Dill wrote: > On Thu, Jun 14, 2012 at 1:13 AM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote: > > On Thu, 2012-06-14 at 00:59 -0700, Russ Dill wrote: > >> On Thu, Jun 14, 2012 at 12:18 AM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote: > >> > On Wed, 2012-06-13 at 23:58 -0700, Russ Dill wrote: > >> >> On Wed, Jun 13, 2012 at 2:20 AM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote: > >> >> > Commit e813a55eb9c9bc6c8039fb16332cf43402125b30 ("OMAP: board-files: > >> >> > remove custom PD GPIO handling for DVI output") moved TFP410 chip's > >> >> > powerdown-gpio handling from the board files to the tfp410 driver. One > >> >> > gpio_request_one(powerdown-gpio, ...) was mistakenly left unremoved in > >> >> > the Beagle board file. This causes the tfp410 driver to fail to request > >> >> > the gpio on Beagle, causing the driver to fail and thus the DVI output > >> >> > doesn't work. > >> >> > >> >> Can you take the one I sent earlier instead? > >> >> > >> >> http://www.spinics.net/lists/linux-omap/msg69913.html > >> > > >> > Hmm, that probably doesn't apply. The power-down GPIO is now handled in > >> > the tfp410 driver, not in the board files. > >> > >> Give me a branch to rebase it onto and I will. > > > > v3.5-rc2 > > This one (v4) already applies to v3.5-rc2 > > http://www.spinics.net/lists/linux-omap/msg70042.html My ack for v4: Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com> And I'd reword the description, "fix" instead of cleanup. The "boot warnings" are errors. I don't think the DVI output works at all with beagle in the current mainline. Btw, please cc me when sending patches related to display. Tomi [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] OMAP: Beagle: fix TFP410 powerdown GPIO init 2012-06-14 12:20 ` Tomi Valkeinen @ 2012-06-20 13:48 ` Tony Lindgren 0 siblings, 0 replies; 10+ messages in thread From: Tony Lindgren @ 2012-06-20 13:48 UTC (permalink / raw) To: Tomi Valkeinen; +Cc: Russ Dill, linux-omap, Robert Nelson, Jason Kridner * Tomi Valkeinen <tomi.valkeinen@ti.com> [120614 05:25]: > On Thu, 2012-06-14 at 04:40 -0700, Russ Dill wrote: > > On Thu, Jun 14, 2012 at 1:13 AM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote: > > > On Thu, 2012-06-14 at 00:59 -0700, Russ Dill wrote: > > >> On Thu, Jun 14, 2012 at 12:18 AM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote: > > >> > On Wed, 2012-06-13 at 23:58 -0700, Russ Dill wrote: > > >> >> On Wed, Jun 13, 2012 at 2:20 AM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote: > > >> >> > Commit e813a55eb9c9bc6c8039fb16332cf43402125b30 ("OMAP: board-files: > > >> >> > remove custom PD GPIO handling for DVI output") moved TFP410 chip's > > >> >> > powerdown-gpio handling from the board files to the tfp410 driver. One > > >> >> > gpio_request_one(powerdown-gpio, ...) was mistakenly left unremoved in > > >> >> > the Beagle board file. This causes the tfp410 driver to fail to request > > >> >> > the gpio on Beagle, causing the driver to fail and thus the DVI output > > >> >> > doesn't work. > > >> >> > > >> >> Can you take the one I sent earlier instead? > > >> >> > > >> >> http://www.spinics.net/lists/linux-omap/msg69913.html > > >> > > > >> > Hmm, that probably doesn't apply. The power-down GPIO is now handled in > > >> > the tfp410 driver, not in the board files. > > >> > > >> Give me a branch to rebase it onto and I will. > > > > > > v3.5-rc2 > > > > This one (v4) already applies to v3.5-rc2 > > > > http://www.spinics.net/lists/linux-omap/msg70042.html > > My ack for v4: > > Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com> > > And I'd reword the description, "fix" instead of cleanup. The "boot > warnings" are errors. I don't think the DVI output works at all with > beagle in the current mainline. > > Btw, please cc me when sending patches related to display. Applying the following version into fixes. Took the first paragraph with the regression info from Tomi's patch. Regards, Tony From: Russ Dill <Russ.Dill@ti.com> Date: Wed, 9 May 2012 15:15:03 -0700 Subject: [PATCH] ARM: OMAP: Fix Beagleboard DVI reset gpio Commit e813a55eb9c9bc6c8039fb16332cf43402125b30 ("OMAP: board-files: remove custom PD GPIO handling for DVI output") moved TFP410 chip's powerdown-gpio handling from the board files to the tfp410 driver. One gpio_request_one(powerdown-gpio, ...) was mistakenly left unremoved in the Beagle board file. This causes the tfp410 driver to fail to request the gpio on Beagle, causing the driver to fail and thus the DVI output doesn't work. This patch removes several boot errors from board-omap3beagle.c: - gpio_request: gpio--22 (DVI reset) status -22 - Unable to get DVI reset GPIO There is a combination of leftover code and revision confusion. Additionally, xM support is currently a hack. For original Beagleboard this removes the double initialization of GPIO 170, properly configures it as an output, and wraps the initialization in an if block so that xM does not attempt to request it. For Beagleboard xM it removes reference to GPIO 129 which was part of rev A1 and A2 designs, but never functioned. It then properly assigns beagle_dvi_device.reset_gpio in beagle_twl_gpio_setup and removes the hack of initializing it high. Additionally, it uses gpio_set_value_cansleep since this GPIO is connected through i2c. Unfortunately, there is no way to tell the difference between xM A2 and A3. However, GPIO 129 does not function on rev A1 and A2, and the TWL GPIO used on A3 and beyond is not used on rev A1 and A2, there are no problems created by this fix. Tested on Beagleboard-xM Rev C1 and Beagleboard Rev B4. Signed-off-by: Russ Dill <Russ.Dill@ti.com> Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com> diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index 79c6909..580fd17 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c @@ -81,13 +81,13 @@ static u8 omap3_beagle_version; static struct { int mmc1_gpio_wp; int usb_pwr_level; - int reset_gpio; + int dvi_pd_gpio; int usr_button_gpio; int mmc_caps; } beagle_config = { .mmc1_gpio_wp = -EINVAL, .usb_pwr_level = GPIOF_OUT_INIT_LOW, - .reset_gpio = 129, + .dvi_pd_gpio = -EINVAL, .usr_button_gpio = 4, .mmc_caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, }; @@ -126,21 +126,21 @@ static void __init omap3_beagle_init_rev(void) printk(KERN_INFO "OMAP3 Beagle Rev: Ax/Bx\n"); omap3_beagle_version = OMAP3BEAGLE_BOARD_AXBX; beagle_config.mmc1_gpio_wp = 29; - beagle_config.reset_gpio = 170; + beagle_config.dvi_pd_gpio = 170; beagle_config.usr_button_gpio = 7; break; case 6: printk(KERN_INFO "OMAP3 Beagle Rev: C1/C2/C3\n"); omap3_beagle_version = OMAP3BEAGLE_BOARD_C1_3; beagle_config.mmc1_gpio_wp = 23; - beagle_config.reset_gpio = 170; + beagle_config.dvi_pd_gpio = 170; beagle_config.usr_button_gpio = 7; break; case 5: printk(KERN_INFO "OMAP3 Beagle Rev: C4\n"); omap3_beagle_version = OMAP3BEAGLE_BOARD_C4; beagle_config.mmc1_gpio_wp = 23; - beagle_config.reset_gpio = 170; + beagle_config.dvi_pd_gpio = 170; beagle_config.usr_button_gpio = 7; break; case 0: @@ -274,11 +274,9 @@ static int beagle_twl_gpio_setup(struct device *dev, if (r) pr_err("%s: unable to configure nDVI_PWR_EN\n", __func__); - r = gpio_request_one(gpio + 2, GPIOF_OUT_INIT_HIGH, - "DVI_LDO_EN"); - if (r) - pr_err("%s: unable to configure DVI_LDO_EN\n", - __func__); + + beagle_config.dvi_pd_gpio = gpio + 2; + } else { /* * REVISIT: need ehci-omap hooks for external VBUS @@ -287,7 +285,7 @@ static int beagle_twl_gpio_setup(struct device *dev, if (gpio_request_one(gpio + 1, GPIOF_IN, "EHCI_nOC")) pr_err("%s: unable to configure EHCI_nOC\n", __func__); } - dvi_panel.power_down_gpio = beagle_config.reset_gpio; + dvi_panel.power_down_gpio = beagle_config.dvi_pd_gpio; gpio_request_one(gpio + TWL4030_GPIO_MAX, beagle_config.usb_pwr_level, "nEN_USB_PWR"); @@ -499,7 +497,7 @@ static void __init omap3_beagle_init(void) omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); omap3_beagle_init_rev(); - if (beagle_config.mmc1_gpio_wp != -EINVAL) + if (gpio_is_valid(beagle_config.mmc1_gpio_wp)) omap_mux_init_gpio(beagle_config.mmc1_gpio_wp, OMAP_PIN_INPUT); mmc[0].caps = beagle_config.mmc_caps; omap_hsmmc_init(mmc); @@ -510,15 +508,13 @@ static void __init omap3_beagle_init(void) platform_add_devices(omap3_beagle_devices, ARRAY_SIZE(omap3_beagle_devices)); + if (gpio_is_valid(beagle_config.dvi_pd_gpio)) + omap_mux_init_gpio(beagle_config.dvi_pd_gpio, OMAP_PIN_OUTPUT); omap_display_init(&beagle_dss_data); omap_serial_init(); omap_sdrc_init(mt46h32m32lf6_sdrc_params, mt46h32m32lf6_sdrc_params); - omap_mux_init_gpio(170, OMAP_PIN_INPUT); - /* REVISIT leave DVI powered down until it's needed ... */ - gpio_request_one(170, GPIOF_OUT_INIT_HIGH, "DVI_nPD"); - usb_musb_init(NULL); usbhs_init(&usbhs_bdata); omap_nand_flash_init(NAND_BUSWIDTH_16, omap3beagle_nand_partitions, ^ permalink raw reply related [flat|nested] 10+ messages in thread
end of thread, other threads:[~2012-06-20 13:48 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-06-13 9:20 [PATCH] OMAP: Beagle: fix TFP410 powerdown GPIO init Tomi Valkeinen 2012-06-14 6:58 ` Russ Dill 2012-06-14 7:18 ` Tomi Valkeinen 2012-06-14 7:59 ` Russ Dill 2012-06-14 8:13 ` Tomi Valkeinen 2012-06-14 8:17 ` Russ Dill 2012-06-14 8:20 ` Tomi Valkeinen 2012-06-14 11:40 ` Russ Dill 2012-06-14 12:20 ` Tomi Valkeinen 2012-06-20 13:48 ` Tony Lindgren
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox