From: Felipe Balbi <balbi@ti.com>
To: Tomasz Mloduchowski <tomasz.mloduchowski@xlogic.pl>
Cc: balbi@ti.com, linux-omap@vger.kernel.org
Subject: Re: twl4030_usb porting advice
Date: Thu, 16 Dec 2010 11:09:56 +0200 [thread overview]
Message-ID: <20101216090956.GG2601@legolas.emea.dhcp.ti.com> (raw)
In-Reply-To: <4D08BE16.4020704@xlogic.pl>
On Wed, Dec 15, 2010 at 01:09:42PM +0000, Tomasz Mloduchowski wrote:
>On 12/15/10 12:39, Felipe Balbi wrote:
>>On Wed, Dec 15, 2010 at 12:27:10PM +0000, Tomasz Mloduchowski wrote:
>>>>>I would gladly welcome any pointers that could help me solve this
>>>>>issue.
>>>>
>>>>you're connecting a FS/LS device to EHCI port, that doesn't work. OMAP
>>>>can't handle port handoff to companion OHCI controller, then it fails
>>>>not being able to enumerate the device. Try remuxing your port to OHCI
>>>>controller and disabling EHCI from Kconfig.
>>>
>>>It actually is a HS device (it's a 4-port hub) - when booting the
>>>vendor supplied kernel (based off 2.6.32, i.e. pre -IR redesign), the
>>>device identifies as follows:
>>>
>>>Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
>>>
>>>with the following boot messages:
>>>
>>>usb 1-2: new high speed USB device using ehci-omap and address 2
>>>usb 1-2: New USB device found, idVendor=05e3, idProduct=0608
>>>usb 1-2: New USB device strings: Mfr=0, Product=1, SerialNumber=0
>>>usb 1-2: Product: USB2.0 Hub
>>>hub 1-2:1.0: USB hub found
>>>hub 1-2:1.0: 4 ports detected
>>>
>>>
>>>I've pasted the boot log for my kernel:
>>>http://pastie.org/1379102
>>>
>>>And the boot log for the original kernel:
>>>http://pastie.org/1379100
>>
>>It could be a bug on the reset sequence on ehci-omap.c, do you have
>>anything connected to any of the hub ports ?
>>
>>Please enable CONFIG_USB_DEBUG on your kernel config and grab a bit more
>>information.
>>
>>Also, boot the machine without the device attached and after booting
>>run:
>>
>># dmesg -c
>>
>>then attach the device, then grab the output of dmesg.
>>
>
>I don't have the ability to disconnect the hub - it's integrated on
>the board :(
I see.
>I've also made a mistake describing the pastebins - the working, PSP
>kernel boot log is here:
>http://pastie.org/1379102
>
>while the non-working git kernel messages are here (with CONFIG_USB_DEBUG):
>http://pastie.org/1379100
I'm quoting a snippet below for commenting.
> [ 1.639892] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
> [ 1.646759] ehci_hcd: block sizes: qh 60 qtd 96 itd 160 sitd 96
> [ 1.646881] ehci-omap ehci-omap.0: failed to get ehci port1 regulator
This is alarming. Please add this patch to get the error code:
diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
index 116ae28..5da3fa3 100644
--- a/drivers/usb/host/ehci-omap.c
+++ b/drivers/usb/host/ehci-omap.c
@@ -682,7 +682,8 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev)
if (IS_ERR(omap->regulator[i])) {
omap->regulator[i] = NULL;
dev_dbg(&pdev->dev,
- "failed to get ehci port%d regulator\n", i);
+ "failed to get ehci port%d regulator --> %d\n", i,
+ PTR_ERR(omap->regulator[i]));
} else {
regulator_enable(omap->regulator[i]);
}
> [ 1.646911] ehci-omap ehci-omap.0: starting TI EHCI USB Controller
> [ 1.647064] ehci-omap ehci-omap.0: OMAP UHH_REVISION 0x10
> [ 1.647094] ehci-omap ehci-omap.0: TLL RESET DONE
> [ 1.647094] ehci-omap ehci-omap.0: OMAP3 ES version > ES2.1
> [ 1.647125] ehci-omap ehci-omap.0: UHH setup done, uhh_hostconfig=21c
> [ 2.649841] ehci-omap ehci-omap.0: phy reset operation timed out
This is also alarming... Let's increase the timeout just for a debugging
purpose:
diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
index 116ae28..fa8bff0 100644
--- a/drivers/usb/host/ehci-omap.c
+++ b/drivers/usb/host/ehci-omap.c
@@ -239,7 +239,7 @@ static void omap_usb_utmi_init(struct ehci_hcd_omap *omap, u8 tll_channel_mask)
static void omap_ehci_soft_phy_reset(struct ehci_hcd_omap *omap, u8 port)
{
- unsigned long timeout = jiffies + msecs_to_jiffies(1000);
+ unsigned long timeout = jiffies + msecs_to_jiffies(10000);
unsigned reg = 0;
reg = ULPI_FUNC_CTRL_RESET
beware, this might slow your boot time quite a lot :-p
The rest is just continuing the enumeration and there's not much
interesting there besides the "unable to enumerate" message, which could
be caused by the two problems above.
--
balbi
next prev parent reply other threads:[~2010-12-16 9:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-15 11:55 twl4030_usb porting advice Tomasz Mloduchowski
2010-12-15 12:10 ` Felipe Balbi
2010-12-15 12:27 ` Tomasz Mloduchowski
2010-12-15 12:39 ` Felipe Balbi
2010-12-15 13:09 ` Tomasz Mloduchowski
2010-12-16 9:09 ` Felipe Balbi [this message]
2010-12-17 7:23 ` Tomasz Mloduchowski
2010-12-17 10:11 ` Felipe Balbi
2010-12-17 11:14 ` Tomasz Mloduchowski
2010-12-17 12:43 ` Felipe Balbi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101216090956.GG2601@legolas.emea.dhcp.ti.com \
--to=balbi@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=tomasz.mloduchowski@xlogic.pl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox