2010-04-22 04:32:15 ISP1760
Filip Vanalme (BELGIUM)
Message: 88758
Hi,
I encounter some problems with the USB ISP1760 controller on our board (BF561). Sometimes, after powering on the board, port 1 is not workig correctly. Only port 1. The other two ports are always working fine.
These are some lines from the Kernel startup sequence :
isp1760-hcd isp1760-hcd.0: NXP ISP1760 USB Host Controller
isp1760-hcd isp1760-hcd.0: new USB bus registered, assigned bus number 1
isp1760-hcd isp1760-hcd.0: bus width: 16, oc: digital
isp1760-hcd isp1760-hcd.0: irq 83, io mem 0x24000000
isp1760-hcd isp1760-hcd.0: USB ISP 1761 HW rev. 1 started
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: NXP ISP1760 USB Host Controller
usb usb1: Manufacturer: Linux 2.6.28.10-ADI-2009R1XT100G2-svn13 isp1760-hcd
usb usb1: SerialNumber: isp1760-hcd.0
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
i2c /dev entries driver
i2c-gpio i2c-gpio.0: using pins 4 (SDA) and 5 (SCL)
TCP cubic registered
NET: Registered protocol family 17
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
ieee80211: 802.11 data/management/control stack, git-1.1.13
ieee80211: Copyright (C) 2004-2005 Intel Corporation <jketreno@linux.intel.com>
VFS: Mounted root (ext2 filesystem).
Freeing unused kernel memory: 88k freed
dma_alloc_init: dma_page @ 0x002fd000 - 256 pages at 0x07f00000
port 1 high speed
usb 1-1: new high speed USB device using isp1760-hcd and address 2
port 1 high speed
usb 1-1: configuration #1 chosen from 1 choice
hub 1-1:1.0: USB hub found
hub 1-1:1.0: 3 ports detected
usb 1-1: New USB device found, idVendor=0471, idProduct=3526
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-1: Product: ISP1520
usb 1-1: Manufacturer: Philips Semiconductors
When plugging in my USB device I get :
root:/> hub 1-1:1.0: Cannot enable port 1. Maybe the USB cable is bad?
hub 1-1:1.0: Cannot enable port 1. Maybe the USB cable is bad?
hub 1-1:1.0: Cannot enable port 1. Maybe the USB cable is bad?
hub 1-1:1.0: Cannot enable port 1. Maybe the USB cable is bad?
hub 1-1:1.0: unable to enumerate USB device on port 1
This information comes from dmesg :
0x00000000-0x00f00000 : "ROMfs"
isp1760-hcd isp1760-hcd.0: NXP ISP1760 USB Host Controller
drivers/usb/core/inode.c: creating file 'devices'
drivers/usb/core/inode.c: creating file '001'
isp1760-hcd isp1760-hcd.0: new USB bus registered, assigned bus number 1
isp1760-hcd isp1760-hcd.0: bus width: 16, oc: digital
isp1760-hcd isp1760-hcd.0: irq 83, io mem 0x24000000
isp1760-hcd isp1760-hcd.0: USB ISP 1761 HW rev. 1 started
usb usb1: default language 0x0409
usb usb1: uevent
usb usb1: usb_probe_device
usb usb1: configuration #1 chosen from 1 choice
usb usb1: adding 1-0:1.0 (config #1, interface 0)
usb 1-0:1.0: uevent
hub 1-0:1.0: usb_probe_interface
hub 1-0:1.0: usb_probe_interface - got id
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
hub 1-0:1.0: standalone hub
hub 1-0:1.0: individual port power switching
hub 1-0:1.0: individual port over-current protection
hub 1-0:1.0: power on to power good time: 20ms
hub 1-0:1.0: local power source is good
hub 1-0:1.0: enabling power on all ports
drivers/usb/core/inode.c: creating file '001'
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: NXP ISP1760 USB Host Controller
usb usb1: Manufacturer: Linux 2.6.28.10-ADI-2009R1XT100G2-svn13 isp1760-hcd
usb usb1: SerialNumber: isp1760-hcd.0
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
i2c /dev entries driver
i2c-core: driver [dev_driver] registered
i2c-adapter i2c-0: adapter [i2c-gpio0] registered
i2c-dev: adapter [i2c-gpio0] registered as minor 0
i2c-gpio i2c-gpio.0: using pins 4 (SDA) and 5 (SCL)
TCP cubic registered
NET: Registered protocol family 17
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
ieee80211: 802.11 data/management/control stack, git-1.1.13
ieee80211: Copyright (C) 2004-2005 Intel Corporation <jketreno@linux.intel.com>
ieee80211_crypt: registered algorithm 'NULL'
ieee80211_crypt: registered algorithm 'WEP'
VFS: Mounted root (ext2 filesystem).
Freeing unused kernel memory: 88k freed
dma_alloc_init: dma_page @ 0x002fd000 - 256 pages at 0x07f00000
hub 1-0:1.0: port 1: status 0501 change 0001
hub 1-0:1.0: state 7 ports 1 chg 0002 evt 0000
hub 1-0:1.0: port 1, status 0501, change 0000, 480 Mb/s
port 1 high speed
usb 1-1: new high speed USB device using isp1760-hcd and address 2
port 1 high speed
usb 1-1: default language 0x0409
usb 1-1: uevent
usb 1-1: usb_probe_device
usb 1-1: configuration #1 chosen from 1 choice
usb 1-1: adding 1-1:1.0 (config #1, interface 0)
usb 1-1:1.0: uevent
hub 1-1:1.0: usb_probe_interface
hub 1-1:1.0: usb_probe_interface - got id
hub 1-1:1.0: USB hub found
hub 1-1:1.0: 3 ports detected
hub 1-1:1.0: standalone hub
hub 1-1:1.0: individual port power switching
hub 1-1:1.0: individual port over-current protection
hub 1-1:1.0: Single TT
hub 1-1:1.0: TT requires at most 16 FS bit times (1332 ns)
hub 1-1:1.0: Port indicators are supported
hub 1-1:1.0: power on to power good time: 100ms
hub 1-1:1.0: local power source is good
hub 1-1:1.0: enabling power on all ports
drivers/usb/core/inode.c: creating file '002'
usb 1-1: New USB device found, idVendor=0471, idProduct=3526
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-1: Product: ISP1520
usb 1-1: Manufacturer: Philips Semiconductors
hub 1-1:1.0: state 7 ports 3 chg 0000 evt 0000
hub 1-1:1.0: state 7 ports 3 chg 0000 evt 0002
hub 1-1:1.0: port 1, status 0101, change 0001, 12 Mb/s
hub 1-1:1.0: debounce: port 1: total 100ms stable 100ms status 0x101
hub 1-1:1.0: port 1 not reset yet, waiting 10ms
hub 1-1:1.0: port 1 not reset yet, waiting 10ms
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port_wait_reset: err = -16
hub 1-1:1.0: port 1 not enabled, trying reset again...
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port_wait_reset: err = -16
hub 1-1:1.0: port 1 not enabled, trying reset again...
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port_wait_reset: err = -16
hub 1-1:1.0: port 1 not enabled, trying reset again...
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port_wait_reset: err = -16
hub 1-1:1.0: port 1 not enabled, trying reset again...
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port_wait_reset: err = -16
hub 1-1:1.0: port 1 not enabled, trying reset again...
hub 1-1:1.0: Cannot enable port 1. Maybe the USB cable is bad?
hub 1-1:1.0: port 1 not reset yet, waiting 10ms
hub 1-1:1.0: port 1 not reset yet, waiting 10ms
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port_wait_reset: err = -16
hub 1-1:1.0: port 1 not enabled, trying reset again...
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port_wait_reset: err = -16
hub 1-1:1.0: port 1 not enabled, trying reset again...
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port_wait_reset: err = -16
hub 1-1:1.0: port 1 not enabled, trying reset again...
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port_wait_reset: err = -16
hub 1-1:1.0: port 1 not enabled, trying reset again...
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port_wait_reset: err = -16
hub 1-1:1.0: port 1 not enabled, trying reset again...
hub 1-1:1.0: Cannot enable port 1. Maybe the USB cable is bad?
hub 1-1:1.0: port 1 not reset yet, waiting 10ms
hub 1-1:1.0: port 1 not reset yet, waiting 10ms
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port_wait_reset: err = -16
hub 1-1:1.0: port 1 not enabled, trying reset again...
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port_wait_reset: err = -16
hub 1-1:1.0: port 1 not enabled, trying reset again...
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port_wait_reset: err = -16
hub 1-1:1.0: port 1 not enabled, trying reset again...
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port_wait_reset: err = -16
hub 1-1:1.0: port 1 not enabled, trying reset again...
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port_wait_reset: err = -16
hub 1-1:1.0: port 1 not enabled, trying reset again...
hub 1-1:1.0: Cannot enable port 1. Maybe the USB cable is bad?
hub 1-1:1.0: port 1 not reset yet, waiting 10ms
hub 1-1:1.0: port 1 not reset yet, waiting 10ms
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port_wait_reset: err = -16
hub 1-1:1.0: port 1 not enabled, trying reset again...
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port_wait_reset: err = -16
hub 1-1:1.0: port 1 not enabled, trying reset again...
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port_wait_reset: err = -16
hub 1-1:1.0: port 1 not enabled, trying reset again...
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port_wait_reset: err = -16
hub 1-1:1.0: port 1 not enabled, trying reset again...
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port 1 not reset yet, waiting 200ms
hub 1-1:1.0: port_wait_reset: err = -16
hub 1-1:1.0: port 1 not enabled, trying reset again...
hub 1-1:1.0: Cannot enable port 1. Maybe the USB cable is bad?
hub 1-1:1.0: unable to enumerate USB device on port 1
This is the ISP1760's configuration from the board configuration file :
#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE)
#include <linux/usb/isp1760.h>
static struct resource bfin_isp1760_resources[] = {
[0] = {
.start = 0x24000000,
.end = 0x24000000 + 0xFFFFF,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_PF10,
.end = IRQ_PF10,
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
},
};
static struct isp1760_platform_data isp1760_priv = {
.is_isp1761 = 0,
.port1_disable = 0,
.bus_width_16 = 1,
.port1_otg = 0,
.analog_oc = 0,
.dack_polarity_high = 0,
.dreq_polarity_high = 0,
};
static struct platform_device bfin_isp1760_device = {
.name = "isp1760-hcd",
.id = 0,
.dev = {
.platform_data = &isp1760_priv,
},
.num_resources = ARRAY_SIZE(bfin_isp1760_resources),
.resource = bfin_isp1760_resources,
};
#endif /* USB_ISP1760 */
It looks like port 1 is not initialized correctly at power up. When resetting the board with its reset switch (power remains on and a reset is generated), the port is working fine again. So, I think, the interface towards the port is OK (no bad USB cable).
I looks like there's still a hardware (timing) problem when powering on the board, but why does it only affect port 1 ?
It's not a problem related to one board. Other boards have the same kind of behaviour.
Can anyone, based on the driver information in the dmesg dump, point me in the good direction ?
Anyone who knows if special precautions have to be taken at power on for port 1 ?
Thanks,
Filip
TranslateQuoteReplyEditDelete
2010-04-22 04:53:59 Re: ISP1760
Filip Vanalme (BELGIUM)
Message: 88760
Could this be related to the fact port 1 is the only port that can be configured in OTG mode ? Although .port1_otg is set to 0, maybe it still gets in OTG mode.
TranslateQuoteReplyEditDelete
2010-04-22 09:13:23 Re: ISP1760
Filip Vanalme (BELGIUM)
Message: 88765
Doing further tests, I noticed that a 'reboot' also solves the problem. Apparently, there's a 'wrong' initialisation of the USB controller within the Kernel. Or a wrong order of register initialisations. With a 'reboot' de chip does not get a hard reset and maintains its register contents. Kernel initialisation while registers have previous initialisation values soves the problem, so I guess there must be something wrong with the order of initialisation.
TranslateQuoteReplyEditDelete
2010-04-22 10:19:24 Re: ISP1760
Mike Frysinger (UNITED STATES)
Message: 88769
i hate to point out that we dont really maintain this part since we dont make it ...
QuoteReplyEditDelete
2010-04-22 11:09:34 Re: ISP1760
Filip Vanalme (BELGIUM)
Message: 88774
Sorry....
TranslateQuoteReplyEditDelete
2010-04-22 13:28:38 Re: ISP1760
Mike Frysinger (UNITED STATES)
Message: 88779
if Michael doesnt have any idea, you can try these places:
vger.kernel.org/vger-lists.html#linux-usb
www.pengutronix.de/mailinglists/index_en.html (i think the pengutronix guys wrote this driver)
QuoteReplyEditDelete
2010-04-26 11:03:02 Re: ISP1760
Filip Vanalme (BELGIUM)
Message: 88905
Not one step further with my problem yet (did not find anything similar to my problem in the forums you indicated). Well, yes, a little step... : I think it has something to do with a reset : when plugging in a usb device, a reset is done but the port remains in reset.
Although this driver is not your thing, maybe you still can help me with this question : As I enabled ISP 1760 in the Kernel configuration, I would expect that 'isp1760_hub_control' (from isp1760-hub.c) would be called regularly. And indeed, within the startup of the Kernel, I notice some calls to this function (e.g. for resetting the hub controller). But, when plugging in a usb device, there's no call to this function anymore (although I'm sure that the driver is performing i.e. a reset on the port). At a certain point in code it's executing a 'usb_control_msg', but never comes in 'isp1760_hub_control'. Is this normal behaviour ? What function is it calling instead ? (I was searchig for the USB_PORT_FEAT_RESET feature and I think isp1760-hub.c is the only active source that handles this feature ; but, as mentioned, it never comes there)
TranslateQuoteReplyEditDelete
2010-04-26 11:16:54 Re: ISP1760
Filip Vanalme (BELGIUM)
Message: 88906
Should I have ehci-hub.c ompiled in my project ? I notice that it isn't compiled in. Or does isp1760-hcd.c handles all ?