Skip to contentSkip to conversation

Using Cypress EZ-Host on ML403/5

DISCUSSION Peter Mendham 5 participants 12 messages Apr 16, 2007 – Jun 4, 2007 6 messages not in the archive

lore
Share & tools
lore
#0 lore raw

Dear all,

Has anyone had the Cypress EZ-Host chip working as a USB host under Linux? It's the one that comes fitted as standard to ML403 and ML405 boards (probably other Xilinx boards too). If not, can anyone tell me where I should start? Any advice at all? Our own embedded device needs to have USB host support and we are using an ML40x for development so the EZ-Host is the preferred solution as we can prototype it.

Thanks in advance,
--Peter

Signature · 4 lines
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.
#1 lore raw
Quoted 11 lines · Peter Mendham

Dear all,

Has anyone had the Cypress EZ-Host chip working as a USB host under Linux? It's the one that comes fitted as standard to ML403 and ML405 boards (probably other Xilinx boards too). If not, can anyone tell me where I should start? Any advice at all? Our own embedded device needs to have USB host support and we are using an ML40x for development so the EZ-Host is the preferred solution as we can prototype it.

Thanks in advance,
--Peter

It's on my task list to get working. I could certainly use some help.

Xilinx did distrubute some driver code for that host controller a while back. I've got a copy of it somewhere. I'll try to dig it up today and let you know where you can get it.

Cheers,
g.

Signature · 4 lines
Grant Likely, B.Sc. P.Eng.
Secret Lab Technologies Ltd.
[email protected]
(403) 399-0195
#2 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Grant" == Grant Likely <[email protected]> writes:

Hi,

Quoted 7 lines
Quoted 7 lines

Has anyone had the Cypress EZ-Host chip working as a USB host under Linux? It's the one that comes fitted as standard to ML403 and ML405 boards (probably other Xilinx boards too). If not, can anyone tell me where I should start? Any advice at all? Our own embedded device needs to have USB host support and we are using an ML40x for development so the EZ-Host is the preferred solution as we can prototype it.

Grant> It's on my task list to get working. I could certainly use Grant> some help.

I have written a 2.6 USB host driver for the Cypress EZ-Host/EZ-Otg. It's basically working, but needs a bit more cleanup. I hope to be able to submit it next week.

Signature · 1 line
Bye, Peter Korsgaard
#3 lore raw
Quoted 7 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Grant" == Grant Likely <[email protected]> writes:

Grant> It's on my task list to get working. I could certainly use Grant> some help.

I have written a 2.6 USB host driver for the Cypress EZ-Host/EZ-Otg. It's basically working, but needs a bit more cleanup. I hope to be able to submit it next week.

Very cool; any chance I could get a pre-release copy. :-)

g.

Signature · 4 lines
Grant Likely, B.Sc. P.Eng.
Secret Lab Technologies Ltd.
[email protected]
(403) 399-0195
#4 lore raw

Maxim USB chips support.

Does anybody know whether Linux drivers exist for Maxim's MAX3421E USB chips or even have such drivers? Same question regarding u-boot.

Thanks,

Leonid.

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#11 lore raw
Quoted 11 lines · Grant Likely
Quoted 10 lines · Peter Korsgaard
Quoted 6 lines · Grant Likely
Quoted 4 lines

Anyway, here it is. It is structured as a base driver with configurable host/peripheral support on top. The host part works pretty ok, but the scheduling code can still be improved. Please ignore the peripheral part for now.

Awesome, thank you! I'll try it out ASAP.

Did you have a chance to try it out yet?

Hey Peter,

I've got it running on my board now after figuring out how to wire up external interrupts in EDK. :-)

Good success with keyboards and mice. Events come through no problem.

Some block devices seem to be giving me grief. I have no problem with my SanDisk ImageMate CF reader. However, I've got a SanDisk Curzer Micro that gets reset during transfers. Is this something you've seen before? Log output is below.

I've also got a QuickCam Messinger that I'm going to test isochronos transfers with as well.

Cheers,
g.

/mnt #
/mnt # [ 2358.173508] usb 1-1.1: new full speed USB device using c67x00 and address 15

[ 2358.309263] usb 1-1.1: configuration #1 chosen from 1 choice
[ 2358.318978] scsi4 : SCSI emulation for USB Mass Storage devices
[ 2358.328546] usb-storage: device found at 15
[ 2358.332860] usb-storage: waiting for device to settle before scanning
[ 2363.348145] scsi 4:0:0:0: Direct-Access     SanDisk  U3 Cruzer
Micro  2.18 PQ: 0 ANSI: 2
[ 2363.367956] SCSI device sda: 990865 512-byte hdwr sectors (507 MB)
[ 2363.379943] sda: Write Protect is off
[ 2363.383721] sda: Mode Sense: 03 00 00 00
[ 2363.387701] sda: assuming drive cache: write through
[ 2363.416940] SCSI device sda: 990865 512-byte hdwr sectors (507 MB)
[ 2363.428944] sda: Write Protect is off
[ 2363.432709] sda: Mode Sense: 03 00 00 00
[ 2363.436691] sda: assuming drive cache: write through
[ 2363.441730]  sda: sda1
[ 2363.465064] sd 4:0:0:0: Attached scsi removable disk sda
[ 2363.475029] usb-storage: device scan complete

/mnt #
/mnt # dd if=/dev/sda of=/dev/null bs=512 count=2048

[ 2390.851453] usb 1-1.1: reset full speed USB device using c67x00 and
address 15
[ 2391.091406] usb 1-1.1: reset full speed USB device using c67x00 and
address 15
[ 2391.331377] usb 1-1.1: reset full speed USB device using c67x00 and
address 15
[ 2391.571349] usb 1-1.1: reset full speed USB device using c67x00 and
address 15
[ 2391.811317] usb 1-1.1: reset full speed USB device using c67x00 and
address 15
[ 2392.051286] usb 1-1.1: reset full speed USB device using c67x00 and
address 15
[ 2392.173340] sd 4:0:0:0: SCSI error: return code = 0x00070000
[ 2392.179076] end_request: I/O error, dev sda, sector 0
[ 2392.184169] Buffer I/O error on device sda, logical block 0
[ 2392.189797] Buffer I/O error on device sda, logical block 1
[ 2392.195419] Buffer I/O error on device sda, logical block 2
[ 2392.201046] Buffer I/O error on device sda, logical block 3
[ 2392.206667] Buffer I/O error on device sda, logical block 4
[ 2392.212290] Buffer I/O error on device sda, logical block 5
[ 2392.217917] Buffer I/O error on device sda, logical block 6
[ 2392.223537] Buffer I/O error on device sda, logical block 7
[ 2392.229179] Buffer I/O error on device sda, logical block 8
[ 2392.234804] Buffer I/O error on device sda, logical block 9
[ 2392.331253] usb 1-1.1: reset full speed USB device using c67x00 and
address 15
[ 2392.543226] usb 1-1.1: reset full speed USB device using c67x00 and
address 15
[ 2392.755200] usb 1-1.1: reset full speed USB device using c67x00 and
address 15
[ 2392.967174] usb 1-1.1: reset full speed USB device using c67x00 and
address 15
[ 2393.179147] usb 1-1.1: reset full speed USB device using c67x00 and
address 15
[ 2393.391121] usb 1-1.1: reset full speed USB device using c67x00 and
address 15
[ 2393.513110] sd 4:0:0:0: SCSI error: return code = 0x00070000
[ 2393.518840] end_request: I/O error, dev sda, sector 0
dd: /dev/sda: Input/output error
/mnt # time dd if=/dev/sda of=/dev/null bs=512 count=2048
[ 2442.613020] usb 1-1.1: reset full speed USB device using c67x00 and
address 15
[ 2442.852988] usb 1-1.1: reset full speed USB device using c67x00 and
address 15
[ 2443.092959] usb 1-1.1: reset full speed USB device using c67x00 and
address 15
[ 2443.332929] usb 1-1.1: reset full speed USB device using c67x00 and
address 15
[ 2443.572902] usb 1-1.1: reset full speed USB device using c67x00 and
address 15
[ 2443.812869] usb 1-1.1: reset full speed USB device using c67x00 and
address 15
[ 2443.934899] sd 4:0:0:0: SCSI error: return code = 0x00070000
[ 2443.940624] end_request: I/O error, dev sda, sector 0
[ 2443.945717] printk: 30 messages suppressed.
[ 2443.949940] Buffer I/O error on device sda, logical block 0
[ 2443.955565] Buffer I/O error on device sda, logical block 1
[ 2443.961190] Buffer I/O error on device sda, logical block 2
[ 2443.966817] Buffer I/O error on device sda, logical block 3
[ 2443.972437] Buffer I/O error on device sda, logical block 4
[ 2443.978061] Buffer I/O error on device sda, logical block 5
[ 2443.983688] Buffer I/O error on device sda, logical block 6
[ 2443.989309] Buffer I/O error on device sda, logical block 7
[ 2443.994952] Buffer I/O error on device sda, logical block 8
[ 2444.000576] Buffer I/O error on device sda, logical block 9
[ 2444.096835] usb 1-1.1: reset full speed USB device using c67x00 and
address 15
[ 2444.308808] usb 1-1.1: reset full speed USB device using c67x00 and
address 15
[ 2444.520781] usb 1-1.1: reset full speed USB device using c67x00 and
address 15
[ 2444.732771] usb 1-1.1: reset full speed USB device using c67x00 and
address 15
[ 2444.944730] usb 1-1.1: reset full speed USB device using c67x00 and
address 15
[ 2445.156704] usb 1-1.1: reset full speed USB device using c67x00 and
address 15
[ 2445.278663] sd 4:0:0:0: SCSI error: return code = 0x00070000
[ 2445.284390] end_request: I/O error, dev sda, sector 0
dd: /dev/sda: Input/output error
Command exited with non-zero status 1
real    0m 2.81s
user    0m 0.00s
sys     0m 0.02s

/mnt #

Signature · 4 lines
Grant Likely, B.Sc. P.Eng.
Secret Lab Technologies Ltd.
[email protected]
(403) 399-0195
#12 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Grant" == Grant Likely <[email protected]> writes:

Hi,

Quoted 1 line
Quoted 1 line
Quoted 1 line

Did you have a chance to try it out yet?

Grant> Hey Peter,

Grant> I've got it running on my board now after figuring out how to wire up Grant> external interrupts in EDK. :-)

Grant> Good success with keyboards and mice. Events come through no problem.

Great!

Grant> Some block devices seem to be giving me grief. I have no problem with Grant> my SanDisk ImageMate CF reader. However, I've got a SanDisk Curzer Grant> Micro that gets reset during transfers. Is this something you've seen Grant> before? Log output is below.

Yeah, I've also had quite varied success with USB sticks - Some work just fine, others not at all. I'm still trying to figure out what goes wrong..

Grant> I've also got a QuickCam Messinger that I'm going to test isochronos Grant> transfers with as well.

Ok. I've had a webcam and USB audio devices working OK. Isochronos transfers are the most tricky ones to implement though, so don't expect wonders (E.G. I get audio stutter if I do a lot of bulk tranfers at the same time).

Thanks for the feedback!

Signature · 1 line
Bye, Peter Korsgaard
#13 lore raw
Quoted 1 line · Peter Korsgaard

Thanks for the feedback!

No problem. I'll keep hacking on it here and keep you up-to-date on my progress.

Cheers,
g.

Signature · 4 lines
Grant Likely, B.Sc. P.Eng.
Secret Lab Technologies Ltd.
[email protected]
(403) 399-0195
#14 lore raw
In reply to Peter Korsgaard
Quoted 10 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Grant" == Grant Likely <[email protected]> writes:

Grant> Some block devices seem to be giving me grief. I have no problem with Grant> my SanDisk ImageMate CF reader. However, I've got a SanDisk Curzer Grant> Micro that gets reset during transfers. Is this something you've seen Grant> before? Log output is below.

Yeah, I've also had quite varied success with USB sticks - Some work just fine, others not at all. I'm still trying to figure out what goes wrong..

I think I've solved this problem. The driver wasn't checking the active flag on TDs in check_td_list(). If the c67x00 ran out of time in a frame, not all the TDs would get processed. Without this check the HCD would interpret unprocessed TDs as successfully completed.

I've also got a fair number of comments/changes on the driver in patch form. I'll send it to the list shortly.

Cheers,
g.

Signature · 4 lines
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
[email protected]
(403) 399-0195
#15 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Grant" == Grant Likely <[email protected]> writes:

Hi,

Quoted 3 lines
Quoted 3 lines

Yeah, I've also had quite varied success with USB sticks - Some work just fine, others not at all. I'm still trying to figure out what goes wrong..

Grant> I think I've solved this problem. The driver wasn't checking the Grant> active flag on TDs in check_td_list(). If the c67x00 ran out of time Grant> in a frame, not all the TDs would get processed. Without this check Grant> the HCD would interpret unprocessed TDs as successfully completed.

Ahh - Good catch!

Grant> I've also got a fair number of comments/changes on the driver in patch Grant> form. I'll send it to the list shortly.

Great, I'm looking forward to seeing it!

Signature · 1 line
Bye, Peter Korsgaard
#16 lore raw
In reply to Peter Korsgaard
Quoted 8 lines · Peter Korsgaard
Quoted 8 lines
Quoted 8 lines

Has anyone had the Cypress EZ-Host chip working as a USB host under Linux? It's the one that comes fitted as standard to ML403 and ML405 boards (probably other Xilinx boards too). If not, can anyone tell me where I should start? Any advice at all? Our own embedded device needs to have USB host support and we are using an ML40x for development so the EZ-Host is the preferred solution as we can prototype it.

Quoted 7 lines

Grant> It's on my task list to get working. I could certainly use Grant> some help.

I have written a 2.6 USB host driver for the Cypress EZ-Host/EZ-Otg. It's basically working, but needs a bit more cleanup. I hope to be able to submit it next week.

Peter,

Are you any further forward with this? Is there anything I could see (however pre-release)? Is there anything I can do to help?

Many thanks,
-- Peter

Signature · 4 lines
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.
#17 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"PM" == Peter Mendham <[email protected]> writes:

Hi,

Quoted 3 lines
Quoted 3 lines

I have written a 2.6 USB host driver for the Cypress EZ-Host/EZ-Otg. It's basically working, but needs a bit more cleanup. I hope to be able to submit it next week.

PM> Are you any further forward with this? Is there anything I could PM> see (however pre-release)? Is there anything I can do to help?

I posted the driver to the usb list last week:

http://thread.gmane.org/gmane.linux.usb.devel/53285

It would be nice if you could give it a try and tell me if it works for you.

Signature · 1 line
Bye, Peter Korsgaard