twl4030_usb porting advice
Subsystems (3)
Hi!
I'm trying to port the support patches for an OMAP3530 based development kit by Technexion.
Technexion provides patches for PSP kernel trees, I need to use a kernel with modern IR stack, so I'm developing against linux-omap-2.6.git
I'm mostly done with the initial port, however, I'm stuck with the following issue:
[ 2.991973] ehci-omap ehci-omap.0: port 2 full speed --> companion [ 2.992034] ehci-omap ehci-omap.0: GetStatus port:2 status 003801 0 ACK POWER OWNER sig=j CONNECT [ 2.992095] hub 1-0:1.0: port 2 not reset yet, waiting 50ms [ 3.055511] asoc: twl4030-hifi <-> omap-mcbsp-dai.1 mapping ok [ 3.061920] ehci-omap ehci-omap.0: GetStatus port:2 status 003002 0 ACK POWER OWNER sig=se0 CSC [ 3.061981] hub 1-0:1.0: unable to enumerate USB device on port 2 [ 3.068389] hub 1-0:1.0: state 7 ports 3 chg 0000 evt 0004
I would gladly welcome any pointers that could help me solve this issue.
Cheers,
Tomasz
Quoted 17 lines · Tomasz Mloduchowski
Hi!
I'm trying to port the support patches for an OMAP3530 based development kit by Technexion.
Technexion provides patches for PSP kernel trees, I need to use a kernel with modern IR stack, so I'm developing against linux-omap-2.6.gitI'm mostly done with the initial port, however, I'm stuck with the following issue:
[ 2.991973] ehci-omap ehci-omap.0: port 2 full speed --> companion [ 2.992034] ehci-omap ehci-omap.0: GetStatus port:2 status 003801 0 ACK POWER OWNER sig=j CONNECT [ 2.992095] hub 1-0:1.0: port 2 not reset yet, waiting 50ms [ 3.055511] asoc: twl4030-hifi <-> omap-mcbsp-dai.1 mapping ok [ 3.061920] ehci-omap ehci-omap.0: GetStatus port:2 status 003002 0 ACK POWER OWNER sig=se0 CSC [ 3.061981] hub 1-0:1.0: unable to enumerate USB device on port 2 [ 3.068389] hub 1-0:1.0: state 7 ports 3 chg 0000 evt 0004
Quoted 1 line
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.
You should be using ohci-omap3.c driver.
Signature · 1 line
balbi
Quoted 6 lines
Quoted 1 line
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
Cheers,
Tomasz
Quoted 21 lines · Tomasz Mloduchowski
Quoted 6 lines
Quoted 1 line
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
Quoted 5 lines
I've pasted the boot log for my kernel:
http://pastie.org/1379102And 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.
Signature · 1 line
balbi
Quoted 37 lines · Felipe Balbi
Quoted 24 lines · Tomasz Mloduchowski
Quoted 7 lines
Quoted 2 lines
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 detectedQuoted 5 lines
I've pasted the boot log for my kernel:
http://pastie.org/1379102And the boot log for the original kernel:
http://pastie.org/1379100It 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_DEBUGon your kernel config and grab a bit more information.
Quoted 7 lines
Also, boot the machine without the device attached and after booting run:
# dmesg -cthen 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'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
Cheers,
Tomasz
Quoted 41 lines · Tomasz Mloduchowski
Quoted 40 lines · Felipe Balbi
Quoted 24 lines · Tomasz Mloduchowski
Quoted 7 lines
Quoted 2 lines
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 detectedQuoted 5 lines
I've pasted the boot log for my kernel:
http://pastie.org/1379102And the boot log for the original kernel:
http://pastie.org/1379100It 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_DEBUGon your kernel config and grab a bit more information.Also, boot the machine without the device attached and after booting run:
Quoted 6 lines
Quoted 4 lines
# dmesg -cthen 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.
Quoted 5 lines
I've also made a mistake describing the pastebins - the working, PSP kernel boot log is here:
http://pastie.org/1379102while the non-working git kernel messages are here (with
CONFIG_USB_DEBUG):
http://pastie.org/1379100
I'm quoting a snippet below for commenting.
Quoted 3 lines
[ 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:
drivers/usb/host/ehci-omap.c +2 -1
@@ -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]); }
Quoted 6 lines
[ 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:
drivers/usb/host/ehci-omap.c +1 -1
@@ -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.
Signature · 1 line
balbi
Quoted 24 lines · Felipe Balbi
Quoted 13 lines · Tomasz Mloduchowski
Quoted 4 lines · Felipe Balbi
Quoted 3 lines · Tomasz Mloduchowski
Quoted 3 lines
Quoted 2 lines
I would gladly welcome any pointers that could help me solve this issue.
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
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:
Quoted 7 lines
I've also made a mistake describing the pastebins - the working, PSP kernel boot log is here:
http://pastie.org/1379102while the non-working git kernel messages are here (with
CONFIG_USB_DEBUG):
http://pastie.org/1379100I'm quoting a snippet below for commenting.
Quoted 8 lines
Quoted 3 lines
[ 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 regulatorThis is alarming. Please add this patch to get the error code:
This is also alarming... Let's increase the timeout just for a debugging purpose:
I've applied both patches. The new kernel log in its entirety resides here:
http://pastie.org/1384896
And the line of interest is
[ 2.085449] ehci-omap ehci-omap.0: failed to get ehci port1 regulator --> 0
Unfortunately, I don't understand what an error code of '0' might mean here, but it surely does something.
Cheers,
Tomasz
Hi,
Quoted 6 lines · Tomasz Mloduchowski
Quoted 6 lines
I'm quoting a snippet below for commenting.
Quoted 3 lines
[ 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
Quoted 6 lines
Quoted 4 lines
This is alarming. Please add this patch to get the error code:
This is also alarming... Let's increase the timeout just for a debugging purpose:
I've applied both patches. The new kernel log in its entirety resides here:
http://pastie.org/1384896
Unfortunately seems like pastie.org is down:
503 Service Unavailable
No server is available to handle this request.
Quoted 4 lines
And the line of interest is
[ 2.085449] ehci-omap ehci-omap.0: failed to get ehci port1 regulator --> 0Unfortunately, I don't understand what an error code of '0' might mean here, but it surely does something.
That's funny, 0 means "success", not sure why that branch is being called.
I'll wait a bit until pastie is back, but if you could append to your reply the output of dmesg | grep -i ehci I'd be glad.
Signature · 1 line
balbi
Quoted 26 lines · Felipe Balbi
Hi,
Quoted 6 lines · Tomasz Mloduchowski
Quoted 6 lines
I'm quoting a snippet below for commenting.
Quoted 3 lines
[ 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 regulatorQuoted 7 lines
Quoted 4 lines
This is alarming. Please add this patch to get the error code:
This is also alarming... Let's increase the timeout just for a debugging purpose:
I've applied both patches. The new kernel log in its entirety resides here:
http://pastie.org/1384896Unfortunately seems like pastie.org is down:
503 Service Unavailable
No server is available to handle this request.Quoted 4 lines
And the line of interest is
[ 2.085449] ehci-omap ehci-omap.0: failed to get ehci port1 regulator--> 0
Quoted 9 lines
Quoted 2 lines
Unfortunately, I don't understand what an error code of '0' might mean here, but it surely does something.
That's funny, 0 means "success", not sure why that branch is being called.
I'll wait a bit until pastie is back, but if you could append to your reply the output of dmesg | grep -i ehci I'd be glad.
I really appreciate your help, this sort of a bug that really stunned me.
I've noticed that the variable storing the error code is set to NULL right before printing it out :(, so I corrected this mistake.
[ 2.065216] ehci-omap ehci-omap.0: failed to get ehci port1 regulator --> -19
I also switched to pastebin, with the new, more meaningful dmesg:
http://pastebin.com/86kfLT2G
Cheers,
Tomasz
Quoted 5 lines · Tomasz Mloduchowski
I really appreciate your help, this sort of a bug that really stunned me.
I've noticed that the variable storing the error code is set to NULL right before printing it out :(, so I corrected this mistake.
[ 2.065216] ehci-omap ehci-omap.0: failed to get ehci port1 regulator --> -19
Thanks for that :-)
Error -19 is -ENODEV, so it means there really isn't a regulator.
Maybe you can more debug to ehci_reset() function ?!?
Quoted 2 lines
I also switched to pastebin, with the new, more meaningful dmesg:
http://pastebin.com/86kfLT2G
I'll look at it and get back to you. But try to figure out exactly where ehci decides to bounce the port to companion ohci and start adding printks or dev_info to that. A good start is ehci_reset(), something like below might help:
drivers/usb/host/ehci-dbg.c +1 -1
@@ -330,7 +330,7 @@ dbg_port_buf (char *buf, unsigned len, const char *label, int port, u32 status)#define dbg_cmd (ehci, label, command) { \ char _buf [80]; \ dbg_command_buf (_buf, sizeof _buf, label, command); \ - ehci_dbg (ehci, "%s\n", _buf); \ + ehci_info (ehci, "%s\n", _buf); \ }#define dbg_port (ehci, label, port, status) { \
a lot already.
Signature · 1 line
balbi