My associates and I are using the MCF5329 USB host to communicate with an NXP ISP1520 Hub Controller IC. Our software engineers are having difficulty getting the communications to work. Has anyone else used this combination?
Does anyone have a recommended list of register settings for the USB host controller?
I have some input on this matter, as I am one of the software guys that SD_EE talks about. I'll try go get down to the heart of the problem here.
We are building a device with the 5329 CPU. It will have up to 3 USB devices connected at any given time, so we need a hub. The hardware guys have built a board with the NXP ISP1520 hub chip on it to provide that. From the software side, we're using the linux-2.6.22-uc1.20070808 kernel along with the patches supplied with the BSP for the M5329EVB. The devices will show up as generic raw hid devices.
Instead of going into detail on what we've tried already, does anyone have a primer of what we *should* be doing to get the host functionality of the 5329 working all the way through the hub? In short, tell me which kernel options to enable, which modules to load that maybe I've missed? We're using the CPU at 180MHz, so do I keep the clock divide at 3 or change it? What's the correct way to force the driver into a low speed mode (we've heard that high and full speed don't work)? Just some pointers.
To the poster who said they were using a different hub chip, maybe grace me with your linux/.config file.
I'm guessing the attached file is what you want if you're looking for my kernel configuration...if not, let me know...the .config file I found was for the upper level LTIB configuration, so there wasn't anything there concerning USB configuration.
I'm back at 22.214.171.124, based on the 20060705 version of the LTIB with some USB and other patches applied as supplied by Freescale.
The files included updating the kernel to 126.96.36.199 and the following: kernel-188.8.131.52.spec.in linux-2.6.17-uc0.patch.gz m5329-flash.patch.gz m532x-can.patch.gz m532x-core.patch.gz m532x-fb.patch.gz m532x-i2c.patch.gz m532x-spi.patch.gz m532x-usb.patch.gz
and did not come with the BSP, as far as I know.
I'm checking now to see if there's a problem with uploading them to the forum, they're only about 200k other than the kernel source which you must supply, and the instructions, which look like they were handwritten on a tablet pc.
Any Freescale folks...feel free to jump in with either a "nix to that!" or a link of your own...
Here are the patches that I applied to the 20060705 LTIB and instructions for how to apply them as I received them.
The patches should not be considered official Freescale code, nor do I offer any warranty or support. They may cause your system to explode and your flowers to wilt, for all I know. Use at your own risk. The newer LTIB may have fixed all these problems and more.
Hi, I'm developing on a custom board based on the 5329EVB and also using the ISP1520 USB Hub. I wrote a driver to initialize the ISP1520 using the I2C port. My project currrently is based on the LTIB 20061117 and works. I'm trying to upgrade from the 184.108.40.206 kernel to the LTIB 20071102 with the 2.6.22 kernel.
# modprobe isp1520 **DW** drivers/i2c/chips/isp1520.c 644 isp1520_init **DW** drivers/i2c/chips/isp1520.c 665 isp1520_init Setting QSPI low **DW** drivers/i2c/chips/isp1520.c 675 isp1520_init Setting QSPI low **DW** drivers/i2c/chips/isp1520.c 583 isp1520_detect i2c_master_send result = 256 **DW** drivers/i2c/chips/isp1520.c 599 isp1520_detect major: 253 dev_id 265289728 usb 1-1: USB disconnect, address 3 # usb 1-1: new full speed USB device using ehci and address 4 usb 1-1: not running at top speed; connect to a high speed hub usb 1-1: configuration #1 chosen from 1 choice hub 1-1:1.0: USB hub found hub 1-1:1.0: 2 ports detected
# # hub 1-1:1.0: hub_port_status failed (err = -71) usb 1-1.2: new full speed USB device using ehci and address 5 usb 1-1.2: not running at top speed; connect to a high speed hub usb 1-1.2: configuration #1 chosen from 1 choice scsi0 : SCSI emulation for USB Mass Storage devices hub 1-1:1.0: cannot reset port 2 (err = -110) hub 1-1:1.0: cannot reset port 2 (err = -110) hub 1-1:1.0: cannot reset port 2 (err = -110) hub 1-1:1.0: cannot reset port 2 (err = -110) hub 1-1:1.0: cannot reset port 2 (err = -110) hub 1-1:1.0: Cannot enable port 2. Maybe the USB cable is bad? hub 1-1:1.0: cannot disable port 2 (err = -71) usb 1-1.2: reset full speed USB device using ehci and address 5 hub 1-1:1.0: cannot reset port 2 (err = -110) hub 1-1:1.0: cannot reset port 2 (err = -110) hub 1-1:1.0: cannot reset port 2 (err = -110) hub 1-1:1.0: cannot reset port 2 (err = -110) hub 1-1:1.0: cannot reset port 2 (err = -110) hub 1-1:1.0: Cannot enable port 2. Maybe the USB cable is bad? hub 1-1:1.0: cannot disable port 2 (err = -71) scsi 0:0:0:0: scsi: Device offlined - not ready after error recovery usb 1-1.2: USB disconnect, address 5
The ISP1520 Hub LED lights up when the I2C commands are sent and ucLinux then detects the hub so everything looks good. When a device is plugged in (I have tried flash drives and a keyboard) the device seems initially to be detected properly. The hub port LED lights and ucLinux will report "Mass storage" or "Keyboard" appropriately, but after a couple of seconds both LEDs go out, and ucLinux reports "cannot reset port".
I may start doing some file compares between the USB drivers on the 20061117 and 20071102 to see if I can find anything. Any other suggestions will be appreciated.
My suggestion would be to take all of the stuff that jpa posted and use it. The 2.6.22 kernel will fool you and make you think that you're making headway. All you'll need is a fresh copy of the kernel from kernel.org and those patches and you'll be on your way. I've heard from Freescale that there's an update to the LTIB (possibly with the 2.6.25 or 26 kernel), but it's a few months out. It seems that even though the USB driver layer for the 5329 works properly, the underlying kernel changes (EHCI) make the 5329 flaky with USB.
Oh, and by the way, thanks a million to jpa for getting us up and running. I owe you a <$beverage> if you're ever in Atlanta.
Please take what I'm saying with a grain of salt...I'm something of a newbie to USB myself...
The Cypress hub I'm using, the CY7C65630, is certainly capable of running at high speed. It's USB 2.0 with a single transaction translator. If you've got the EVB, you can try someone else's hub, right? When we were first bringing up the Cypress hub on our target, we had lots of fun until we got the hub chip configured correctly. But with the EVB, you can use something off-the-shelf to get it running. Cypress has an eval board for their hub.
1) Check out the 5329 device errata (MCF5329DE.PDF). There's a note (that may now be outdated) that the USB on-chip transceivers do not operate correctly in full-speed mode. It also says this was corrected on datecodes XXX0618 and higher. However, I wonder if the uCLinux code wasn't written to work around these early chips, because...
2) With a USB memory stick plugged in, I get the following on the console: new full speed USB device using ehci and address 3 not running at top speed; connect to a high speed hub
This same message occurs when the stick is plugged directly into the 5329EVB host port, so I'm guessing this is a reflection of the 5329EVB host port's operation speed.
I'm using the 20060705 version of LTIB with Freescale's USB patches. If you're using the most recent LTIB, then your results may be completely different.
No offense taken. I am a newbie to the host controller end of things and to uCLinux.
As part of our hardware testing efforts, we built a hub test board around the ISP1520. The hub board works fine with a PC running windows and a PC running Linux. We can't get the hub to work with either the Logic PD MCF5329 eval board or with our prototype board.
1.) The date codes indicate that we have the latest silicon on our boards, but that doesn't mean that the latest LTIB was used...
2.) From the messages you see "not running at top speed; connect to a high speed hub", does this imply that your hub is operating at full speed, not high speed? Did you limit the speed to full speed in the MCF5329 configuration, or was this limited through configuration options of your hub?
Remember, we get this message whether there is a hub connected to the 5329EVB or not, so it has nothing to do with our hub configuration. I take this message as an indication that the 5329 port is running at full or low speed, but I haven't tried to measure this in any way. Our application doesn't require much speed on the USB anyway, so it has always been a curiosity, but not something we needed to fix. I take it you are not getting this message?
As far as I know, I did nothing in the kernel config to explicitly limit USB speed. The EHCI HCD (USB 2.0) support is enabled, "Full speed ISO transactions (experimental)" is NOT enabled, but my reading of the description tells me this enables a specific way of handling certain transactions, not wholesale full speed support.
I'm just throwing things out now to see if they stick, but some of the fun we had when bringing up the hub on the target had to do with the power configuration on the hub. Devices requesting more power than the upstream devices could provide were flat out ignored. Tell the hub (in its configuration) that it needs lots of power (whether it does or not), and it will request that power from the 5329, the 5329 will say "no thank you" and refuse to talk to the hub anymore. Could your hub be asking for power that the PCs can provide, but the 5329 cannot? Have you tried an off-the-shelf hub? In self-powered mode?
I've not used that specific combination...I do have the 5329 host talking to a Cypress hub under the LTIB / uCLinux, so if the question is 'can it be done?' I'd say the answer is a pretty strong 'yes'. However I'm not going to be much help with register settings as uCLinux takes care of that for me.
You don't mention an operating system or USB stack...are you rolling your own?