Hello,
the USB communication hangs when we communicate to different UART interfaces of the Quad USB-to-UART Bridge CP2108. The Problem does not appear when we connect the cp2108 directly to the am335x musb host.
This is our hardware setup:
We assume there is a Problem of the MUSB Host with the Transaction Translator handling.
To produce the failure we run:
# echo text > /dev/ttyUSB0 /* this works */
# echo text > /dev/ttyUSB1 /* data is sent but uart disable control transfer returns timeout */
# echo text > /dev/ttyUSB1 /* no communication to cp2108 is possible */
Output of usb monitor of the Linux Kernel (tested versions 4.1.3 mainline and 3.14.26 from ti have the same behavior):
cc8e9e80 3739443171 S Co:2:003:0 s 41 00 0001 0002 0000 0
cc8e9e80 3739443410 C Co:2:003:0 0 0
cc8e9e80 3739444542 S Ci:2:003:0 s c1 1d 0000 0002 0004 4 <
cc8e9e80 3739444743 C Ci:2:003:0 0 4 = 00c20100
cc8e9e80 3739444971 S Ci:2:003:0 s c1 04 0000 0002 0002 2 <
cc8e9e80 3739445118 C Ci:2:003:0 0 2 = 0800
cc8e9e80 3739445328 S Co:2:003:0 s 41 03 0808 0002 0000 0
cc8e9e80 3739445443 C Co:2:003:0 -32 0
cc8e9e80 3739445653 S Co:2:003:0 s 41 03 0800 0002 0000 0
cc8e9e80 3739445768 C Co:2:003:0 0 0
cc8e9e80 3739445971 S Ci:2:003:0 s c1 14 0000 0002 0010 16 <
cc8e9e80 3739446211 C Ci:2:003:0 0 16 = 00000000 00000000 00000000 00000000
cc8e9e80 3739447071 S Co:2:003:0 s 41 1e 0000 0002 0004 4 = 00c20100
cc8e9e80 3739447289 C Co:2:003:0 0 4 >
ce541e80 3739447954 S Bi:2:003:3 -115 256 <
ce541e00 3739448009 S Bi:2:003:3 -115 256 <
ce06cb80 3739448052 S Co:2:003:0 s 41 07 0303 0002 0000 0
ce06cb80 3739448267 C Co:2:003:0 0 0
ce410280 3739449384 S Bo:2:003:3 -115 4 = 74657374
ce410280 3739449558 C Bo:2:003:3 0 4 >
ce410280 3739449584 S Bo:2:003:3 -115 2 = 0d0a
ce410280 3739449654 C Bo:2:003:3 0 2 >
ce06cb80 3739449803 S Co:2:003:0 s 41 07 0300 0002 0000 0
ce06cb80 3739449988 C Co:2:003:0 0 0
ce541e80 3739451587 C Bi:2:003:3 -2 0
ce541e00 3739452809 C Bi:2:003:3 -2 0
cc8e9e80 3739452884 S Co:2:003:0 s 41 00 0000 0002 0000 0
cc8e9e80 3739453034 C Co:2:003:0 0 0
cc8e9080 3750701430 S Co:2:003:0 s 41 00 0001 0001 0000 0
cc8e9080 3750701717 C Co:2:003:0 0 0
cc8e9080 3750702145 S Ci:2:003:0 s c1 1d 0000 0001 0004 4 <
cc8e9080 3750702328 C Ci:2:003:0 0 4 = 00c20100
cc8e9080 3750702548 S Ci:2:003:0 s c1 04 0000 0001 0002 2 <
cc8e9080 3750702714 C Ci:2:003:0 0 2 = 0800
cc8e9080 3750702905 S Co:2:003:0 s 41 03 0808 0001 0000 0
cc8e9080 3750703014 C Co:2:003:0 -32 0
cc8e9080 3750703236 S Co:2:003:0 s 41 03 0800 0001 0000 0
cc8e9080 3750703355 C Co:2:003:0 0 0
cc8e9080 3750703555 S Ci:2:003:0 s c1 14 0000 0001 0010 16 <
cc8e9080 3750703720 C Ci:2:003:0 0 16 = 00000000 00000000 00000000 00000000
cc8e9080 3750703924 S Co:2:003:0 s 41 1e 0000 0001 0004 4 = 00c20100
cc8e9080 3750704078 C Co:2:003:0 0 4 >
ce410780 3750704265 S Bi:2:003:2 -115 256 <
ce541c80 3750704316 S Bi:2:003:2 -115 256 <
cc8e9700 3750704352 S Co:2:003:0 s 41 07 0303 0001 0000 0
cc8e9700 3750704537 C Co:2:003:0 0 0
ce410b00 3750706417 S Bo:2:003:2 -115 4 = 74657374
ce410b00 3750707633 C Bo:2:003:2 0 4 >
ce410b00 3750707700 S Bo:2:003:2 -115 2 = 0d0a
ce410b00 3750707784 C Bo:2:003:2 0 2 >
cc8e9700 3750709321 S Co:2:003:0 s 41 07 0300 0001 0000 0
cc8e9700 3750710469 C Co:2:003:0 0 0
ce410780 3750712694 C Bi:2:003:2 -2 0
ce541c80 3750712791 C Bi:2:003:2 -2 0
cc8e9080 3750714296 S Co:2:003:0 s 41 00 0000 0001 0000 0
cc8e9080 3755712258 C Co:2:003:0 -2 0
When we replace the AM335x MUSB with a AM3505 USB Host (EHCI) everything works as expected. USB Monitor looks like this:
cf3453c0 2211057373 S Co:1:004:0 s 41 00 0001 0002 0000 0
cf3453c0 2211057647 C Co:1:004:0 0 0
cf3453c0 2211057769 S Ci:1:004:0 s c1 1d 0000 0002 0004 4 <
cf3453c0 2211058013 C Ci:1:004:0 0 4 = 00c20100
cf3453c0 2211058654 S Ci:1:004:0 s c1 04 0000 0002 0002 2 <
cf3453c0 2211059020 C Ci:1:004:0 0 2 = 0800
cf3453c0 2211059387 S Ci:1:004:0 s c1 14 0000 0002 0010 16 <
cf3453c0 2211059661 C Ci:1:004:0 0 16 = 00000000 00000000 00000000 00000000
cf3453c0 2211059722 S Co:1:004:0 s 41 1e 0000 0002 0004 4 = 00c20100
cf3453c0 2211059875 C Co:1:004:0 0 4 >
cf039e40 2211060211 S Bi:1:004:3 -115 256 <
cf3453c0 2211060272 S Co:1:004:0 s 41 07 0303 0002 0000 0
cf3453c0 2211060394 C Co:1:004:0 0 0
cf0252c0 2211060791 S Bo:1:004:3 -115 4 = 74657374
cf025340 2211060852 S Bo:1:004:3 -115 2 = 0d0a
cf0252c0 2211061035 C Bo:1:004:3 0 4 >
cf025340 2211061065 C Bo:1:004:3 0 2 >
cf3453c0 2211061187 S Co:1:004:0 s 41 07 0300 0002 0000 0
cf3453c0 2211061401 C Co:1:004:0 0 0
cf039e40 2211062042 C Bi:1:004:3 -2 0
cf3453c0 2211062072 S Co:1:004:0 s 41 00 0000 0002 0000 0
cf345440 2211062133 S Co:1:003:0 s 23 08 9043 0001 0000 0
cf3453c0 2211062255 C Co:1:004:0 0 0
cf345440 2211062500 C Co:1:003:0 0 0
cf345a40 2222885437 S Co:1:004:0 s 41 00 0001 0001 0000 0
cf345a40 2222885711 C Co:1:004:0 0 0
cf345a40 2222885803 S Ci:1:004:0 s c1 1d 0000 0001 0004 4 <
cf345a40 2222886047 C Ci:1:004:0 0 4 = 00c20100
cf345a40 2222886108 S Ci:1:004:0 s c1 04 0000 0001 0002 2 <
cf345a40 2222886322 C Ci:1:004:0 0 2 = 0800
cf345a40 2222886352 S Ci:1:004:0 s c1 14 0000 0001 0010 16 <
cf345a40 2222886566 C Ci:1:004:0 0 16 = 00000000 00000000 00000000 00000000
cf345a40 2222886596 S Co:1:004:0 s 41 1e 0000 0001 0004 4 = 00c20100
cf345a40 2222886810 C Co:1:004:0 0 4 >
cf0251c0 2222886840 S Bi:1:004:2 -115 256 <
cf345a40 2222886901 S Co:1:004:0 s 41 07 0303 0001 0000 0
cf345a40 2222887054 C Co:1:004:0 0 0
cf025dc0 2222887268 S Bo:1:004:2 -115 4 = 74657374
cf0253c0 2222887298 S Bo:1:004:2 -115 2 = 0d0a
cf025dc0 2222887420 C Bo:1:004:2 0 4 >
cf0253c0 2222887451 C Bo:1:004:2 0 2 >
cf345a40 2222888641 S Co:1:004:0 s 41 07 0300 0001 0000 0
cf345a40 2222888824 C Co:1:004:0 0 0
cf0251c0 2222888977 C Bi:1:004:2 -2 0
cf345a40 2222889190 S Co:1:004:0 s 41 00 0000 0001 0000 0
cf345a40 2222889434 C Co:1:004:0 0 0
cf345a40 2222890502 S Co:1:003:0 s 23 08 9042 0001 0000 0
cf345a40 2222890960 C Co:1:003:0 0 0
The additional request we see belong to the transcation translator. The AM335x seems to have a problem with the transaction translator handling. This problem is not listed in the AM335x errata document.
It does not make any difference if i choose DMA or PIO in the kernel config.
The problem seems to be very similar to this:
Any help is appreciated!!
Thanks!
Ludwig