AM67: AM67x USB 2.0 test mode

Part Number: AM67
Other Parts Discussed in Thread: DRA821, AM62P,

Tool/software:

Champ, 

Please advise the register comments set to enter USB2.0 test mode for USB0 and USB1 respectively.

Is below commend for USB2.0 USB0 or USB1 port?  

What's the register address for another USBx port?

devmem2 0x31000420 w 0xA0
devmem2 0x31000020 w 0x4
devmem2 0x31000424 w 0x40000000

BR, Rich

  • Hi Rich,

    Is below commend for USB2.0 USB0 or USB1 port? 

    The command which you have given is for USB0 port.(ie: below command)

    devmem2 0x31000420 w 0xA0
    devmem2 0x31000020 w 0x4
    devmem2 0x31000424 w 0x40000000

    For USB1 port , the commands will be :

    devmem2 0x31210480 w 0xA

    devmem2 0x31210080 w 0x4

    devmem2 0x31210484 w 0x40000000

    Regards

    Gokul

  • Unlock the thread to continue the conversation.

  • Thanks Bin, 

    Gokul, 

    Customer reported these registers may not be corrected and they will found bus error when execute to devmem2 0x31210484 w 0x40000000.

    I tried on AM67x EVM but there is a USB Hub on USB1 so it will re-emurate after set  devmem2 0x31210480 w 0xA0

    Besides, setting devmem2 0x31210484 w 0x40000000 will get this register become 0xF0000000 which cannot make USB1 enter test mode. 

    I check the register name and setting in register excel file and found the register bits are same as USB0 but still cannot make sure the registers are for USB1 or not.  

    Could you double confirm this?

    BR, Rich

  • Hi Rich,

    Besides, setting devmem2 0x31210484 w 0x40000000 will get this register become 0xF0000000 which cannot make USB1 enter test mode. 

    I think it is because the port is not in the powered-off state that the register is getting set as 0xF0000000 when trying to set a non-zero value like 0x40000000 indicating port test control error.

    I tried on AM67x EVM but there is a USB Hub on USB1 so it will re-emurate after set  devmem2 0x31210480 w 0xA0

    Hence I think we might have to go to PLS=Disabled state before setting the port test control bits.

    Hence can you try the following sequence once;

    devmem2 0x31210480 w 0x80  (Sets it to PLS=Disabled state)

    devmem2 0x31210080 w 0x4

    devmem2 0x31210484 w 0x40000000 

    devmem2 0x31210480 w 0xA 

    Regards

    Gokul

  • Gokul, 

    For USB0, it works. Customer connect a USB 2.0 flash disk then input all the commends then remove USB flash disk, connect the test fixture after remove USB flash disk. 

    For USB1, customer is connecting USB1 (USB2.0) + SERDES0 (USB3.0) as a USB 3.0 type A connector. Customer tried the comment you provided for USB1 but it still see bus error. 

    Test procedure is same as USB0. 

    I original think the commend for USB1 should be same as USB0 but just change the base address. 

    Is this correct?  For USB1, we tried devmem2 0x31210480 w 0xA (and 0xA0, I thought it should be 0xA0) but both fail. 

    Then we tried the new commend sets with PLS disable and result is as the capture console screen. 

    Please help to confirm the commend we should use for USB1. 

    ---------------------------------------------------------------------------------------------------------------------------------------------

     The command which you have given is for USB0 port.(ie: below command)

    devmem2 0x31000420 w 0xA0
    devmem2 0x31000020 w 0x4
    devmem2 0x31000424 w 0x40000000

    For USB1 port , the commands will be :

    devmem2 0x31210480 w 0xA

    devmem2 0x31210080 w 0x4

    devmem2 0x31210484 w 0x40000000

    ------------------------------------------------------------------------------------------------------------------------------------------

    BR, Rich

  • Hi Rich,

    The same commands are working on my end,actually.

    Can you try using the below dtb and test once:

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/k3_2D00_j722s_2D00_evm.dtb

    Regards

    Gokul

  • Gokul, 

    You result on EVM is same as mine. 

    You are just reproduced what I reported on EVM since there is Hub on EVM. 

    The last commend "devmem2 0x31210484 w 0x40000000" actually will get 0xF0000000 if you read out after write.

     

    root@am67-sk:~#
    root@am67-sk:~# devmem2 0x31210480
    /dev/mem opened.
    Memory mapped at address 0xffff848d4000.
    Read at address 0x31210480 (0xffff848d4480): 0x00000E03
    root@am67-sk:~# devmem2 0x31210480 w 0xA0
    /dev/mem opened.
    Memory mapped at address 0xffffa4eac000.
    Read at address 0x31210480 (0xffffa4eac480): 0x00000E03
    Write at address 0x31210480 (0xffffa4eac480): 0x000000A0, readback 0x000000A0
    root@am67-sk:~# [ 113.027530] usb 1-1: USB disconnect, device number 2
    [ 113.391425] usb 1-1: new high-speed USB device number 3 using xhci-hcd
    [ 113.544698] hub 1-1:1.0: USB hub found
    [ 113.548571] hub 1-1:1.0: 4 ports detected
    [ 113.555276] hub 1-1:1.0: USB hub found
    [ 113.559176] hub 1-1:1.0: 4 ports detected
    devmem2 0x31210480
    /dev/mem opened.
    Memory mapped at address 0xffffad604000.
    Read at address 0x31210480 (0xffffad604480): 0x00000E03
    root@am67-sk:~# devmem2 0x31210080
    /dev/mem opened.
    Memory mapped at address 0xffff807c9000.
    Read at address 0x31210080 (0xffff807c9080): 0x00000805
    root@am67-sk:~# devmem2 0x31210080 w 0x4
    /dev/mem opened.
    Memory mapped at address 0xffffb6d02000.
    Read at address 0x31210080 (0xffffb6d02080): 0x00000805
    Write at address 0x31210080 (0xffffb6d02080): 0x00000004, readback 0x00000004
    root@am67-sk:~# devmem2 0x31210080
    /dev/mem opened.
    Memory mapped at address 0xffff82d01000.
    Read at address 0x31210080 (0xffff82d01080): 0x00000004
    root@am67-sk:~# devmem2 0x31210484
    /dev/mem opened.
    Memory mapped at address 0xffffb1029000.
    Read at address 0x31210484 (0xffffb1029484): 0x00000000
    root@am67-sk:~# devmem2 0x31210484 w 0x40000000
    /dev/mem opened.
    Memory mapped at address 0xffff88aec000.
    Read at address 0x31210484 (0xffff88aec484): 0x00000000
    Write at address 0x31210484 (0xffff88aec484): 0x40000000, readback 0x40000000
    root@am67-sk:~# devmem2 0x31210484
    /dev/mem opened.
    Memory mapped at address 0xffff9e0f5000.
    Read at address 0x31210484 (0xffff9e0f5484): 0xF0000000
    root@am67-sk:~#

    BR, Rich

  • root@ecu1270-6800d0:~# devmem2 0x31210480
    /dev/mem opened.
    Memory mapped at address 0xffff88cfc000.
    Value at address 0x31210480 (0xffff88cfc480): 0xA0002A0
    root@ecu1270-6800d0:~# devmem2 0x31210480 w 0xA0
    /dev/mem opened.
    Memory mapped at address 0xffffb8037000.
    Value at address 0x31210480 (0xffffb8037480): 0xA0002A0
    Written 0xA0; readback 0x80
    root@ecu1270-6800d0:~# devmem2 0x31210480
    /dev/mem opened.
    Memory mapped at address 0xffff90d46000.
    Value at address 0x31210480 (0xffff90d46480): 0x80
    root@ecu1270-6800d0:~# devmem2 0x31210080
    /dev/mem opened.
    Memory mapped at address 0xffff8d530000.
    Value at address 0x31210080 (0xffff8d530080): 0x805
    root@ecu1270-6800d0:~# devmem2 0x31210080 w 0x4
    /dev/mem opened.
    Memory mapped at address 0xffff83c3e000.
    Value at address 0x31210080 (0xffff83c3e080): 0x805
    Written 0x4; readback 0x4
    root@ecu1270-6800d0:~# devmem2 0x31210080
    /dev/mem opened.
    Memory mapped at address 0xffff83112000.
    Value at address 0x31210080 (0xffff83112080): 0x4
    root@ecu1270-6800d0:~# devmem2 0x31210484
    /dev/mem opened.
    Memory mapped at address 0xffffa104f000.
    Bus error
    root@ecu1270-6800d0:~# devmem2 0x31210484 w 0x40000000
    /dev/mem opened.
    Memory mapped at address 0xffff94bb6000.
    Bus error
    root@ecu1270-6800d0:~# devmem2 0x31210484
    /dev/mem opened.
    Memory mapped at address 0xffffb97b3000.
    Bus error

  • Gokul, 

    The log from my input is on DRA821 EVM and I believe the result is same as yours on DRA821 EVM. 

    The log from customer is on their own board which USB1 with SERDES0 as a USB 3.0 connector.

    They originally (previous hardware version) have USB0 with SERDES0 as a USB 3.0 connector and they can use the commends we provide for USB0 to enter USB 2.0 test mode. 

    Now on their current version board (USB1 + SERDES0), they will see bus error when access 0x31210484.

    Need to complete USB2.0 test mode on USB1. 

    Is there a internal test or validation way to prove this? 

    BR, Rich 

  • Hi Rich chen,

    On DRA821EVM, it doesnt fail as it readbacks the same value which is written. hence showing that it is working.

    Now on their current version board (USB1 + SERDES0), they will see bus error when access 0x31210484.

    However it could be failing on their custom boarrd because of their change from (USB0 with SERDES0) to (USB1 with SERDES1).

    Is there a internal test or validation way to prove this? 

    I will loop in shreyas as well to look into this query. 

    Regards

    Gokul

  • For USB1 port , the commands will be :

    devmem2 0x31210480 w 0xA

    devmem2 0x31210080 w 0x4

    devmem2 0x31210484 w 0x40000000

    Rich,

    No, the first command would be devmem2 0x31210480 w 0xA0. Since the bits 0:3 are read-only.

    We had not tested the USB1 since there was a hub and hence cannot test the USB2.0 test mode. 

  • Shreyas, 

    Yes, we tried in the first place and you should be able to tell from the commends in console which we used.  

    devmem2 0x31210480 w 0xA0

    devmem2 0x31210080 w 0x4

    devmem2 0x31210484 w 0x40000000

    I understand the USB hub case on EVM and customer now is having problem on their own board which need a guideline or solution to enter test mode. 

    It is about MP stage in customer side and this is a gating item for production. 

    We had spent too much time on USB3 and PCIe compliance test, could team look into this and get solution by this week?  

    BR, Rich

  • Hi Rich,

    Sorry for the delayed response.

    Can you share the schematics of USB and serdes for the custom board. I have requested Shreyas to have a look into it.

    Regards

    Gokul

  • Gokul, 

    Here you go. 

    BR, Rich

  • Hi Rich,

    As I had discussed internally, a couple of things to note:

    In the device tree, you need to have the usb1 dr_mode set to host and not in otg or device mode. Please check and confirm.

    Also, we need to not have a USB hub on USB1, since this will block the compliance. I will check the USB schematics along with my schematic expert. 

    I can check on the AM62P EVM to see if it can be reproduced on that. If it has the USB hub, it might be a problem but I will let you know nevertheless.

  • Rich,

    For the USB1, is it host mode or device mode compliance that is desired? All the commands were for the host mode and not device mode. 

    Device mode would require the use of xHSETT electrical test suite to send the test packet. 

  • Shreyas, 

    USB1 is host mode combine with SERDES0 as a USB type C connector.

    Software configuration is host mode too.

    Customer use USB 2.0 flash disk to test and work.

    BR, Rich 

  • Rich,

    When I see the latest TRM register excel sheet, it has a different register offset: 

    Please try out these commands below and let me know: 

    devmem2 0x31200480 w 0xA0

    devmem2 0x31200080 w 0x4

    devmem2 0x31200484 w 0x40000000

    Apparently, this was from the previous version of the TRM (revA), the revB version has it the base address as 0x3121xxxx. My apologies.

    I can try it on my end and will let you know once I set up the board.

  • Rich,

    The update from my end is that the devmem commands are working and I am not seeing any bus error or the readback of 0xF0000000.

    I see the compliance patterns on the scope on USB1, however, I think that they are from USB3.0 as USB1 is rated for both USB2.0 and USB3.0 support.

    I will try a little more and will feedback to you. 

  • Shreyas, 

    May you confirm which version AM67x SOC chip you are using? 

    Customer tried on their own board and I tried on AM67x EVM, all the registers access will be bus error. 

    The EVM sample remark on top is XJ722S5AAMW.

    devmem2 0x31200480

    devmem2 0x31200080

    devmem2 0x31200484

    How come you don't see bus error? 

    Is there different version sample? 

    root@am67-sk:~# devmem2 0x31200480
    /dev/mem opened.
    [ 54.431291] kauditd_printk_skb: 12 callbacks suppressed
    Memory mapped at address 0xffffb22da000.
    [ 54.431305] audit: type=1701 audit(1709118415.354:32): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=1195 comm="devmem2" exe="/usr/bin/devmem2" sig=7 res=1
    [ 54.459198] audit: type=1334 audit(1709118415.382:33): prog-id=23 op=LOAD
    [ 54.466078] audit: type=1334 audit(1709118415.386:34): prog-id=24 op=LOAD
    [ 54.472927] audit: type=1334 audit(1709118415.394:35): prog-id=25 op=LOAD
    Bus error (core dumped)
    root@am67-sk:~# [ 54.831141] audit: type=1334 audit(1709118415.754:36): prog-id=25 op=UNLOAD
    [ 54.838149] audit: type=1334 audit(1709118415.754:37): prog-id=24 op=UNLOAD
    [ 54.845127] audit: type=1334 audit(1709118415.754:38): prog-id=23 op=UNLOAD
    devmem2 0x31200480
    /dev/mem opened.[ 64.618705] audit: type=1701 audit(1709118425.538:39): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=1203 comm="devmem2" exe="/usr/bin/devmem2" sig=7 res=1

    Memory mapped at address 0xffffbe997000.
    [ 64.646237] audit: type=1334 audit(1709118425.566:40): prog-id=26 op=LOAD
    [ 64.653128] audit: type=1334 audit(1709118425.574:41): prog-id=27 op=LOAD
    [ 64.660002] audit: type=1334 audit(1709118425.582:42): prog-id=28 op=LOAD
    Bus error (core dumped)
    root@am67-sk:~# [ 64.999146] audit: type=1334 audit(1709118425.922:43): prog-id=28 op=UNLOAD
    [ 65.006147] audit: type=1334 audit(1709118425.922:44): prog-id=27 op=UNLOAD
    [ 65.013128] audit: type=1334 audit(1709118425.922:45): prog-id=26 op=UNLOAD
    root@am67-sk:~#
    root@am67-sk:~#
    root@am67-sk:~#
    root@am67-sk:~# devmem2 0x31200480 w 0xA0
    /dev/mem opened.
    [ 73.894667] audit: type=1701 audit(1709118434.814:46): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=1211 comm="devmem2" exe="/usr/bin/devmem2" sig=7 res=1
    Memory mapped at address 0xffff8de9c000.
    [ 73.922074] audit: type=1334 audit(1709118434.842:47): prog-id=29 op=LOAD
    [ 73.928962] audit: type=1334 audit(1709118434.850:48): prog-id=30 op=LOAD
    [ 73.935811] audit: type=1334 audit(1709118434.858:49): prog-id=31 op=LOAD
    Bus error (core dumped)
    root@am67-sk:~# [ 74.267131] audit: type=1334 audit(1709118435.190:50): prog-id=31 op=UNLOAD
    [ 74.274137] audit: type=1334 audit(1709118435.190:51): prog-id=30 op=UNLOAD
    [ 74.281121] audit: type=1334 audit(1709118435.190:52): prog-id=29 op=UNLOAD

    root@am67-sk:~# devmem2 0x31200480
    /dev/mem opened.
    [ 84.094684] audit: type=1701 audit(1709118445.014:53): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=1219 comm="devmem2" exe="/usr/bin/devmem2" sig=7 res=1
    Memory mapped at address 0xffff87762000.
    [ 84.122676] audit: type=1334 audit(1709118445.042:54): prog-id=32 op=LOAD
    [ 84.129577] audit: type=1334 audit(1709118445.050:55): prog-id=33 op=LOAD
    [ 84.136431] audit: type=1334 audit(1709118445.058:56): prog-id=34 op=LOAD
    Bus error (core dumped)
    root@am67-sk:~# [ 84.451210] audit: type=1334 audit(1709118445.374:57): prog-id=34 op=UNLOAD
    [ 84.458222] audit: type=1334 audit(1709118445.374:58): prog-id=33 op=UNLOAD
    [ 84.465201] audit: type=1334 audit(1709118445.374:59): prog-id=32 op=UNLOAD

    root@am67-sk:~# devmem2 0x31200080
    /dev/mem opened.
    [ 192.178734] audit: type=1701 audit(1709118553.098:60): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=1227 comm="devmem2" exe="/usr/bin/devmem2" sig=7 res=1
    Memory mapped at address 0xffff8a693000.
    [ 192.206161] audit: type=1334 audit(1709118553.126:61): prog-id=35 op=LOAD
    [ 192.213043] audit: type=1334 audit(1709118553.134:62): prog-id=36 op=LOAD
    [ 192.219895] audit: type=1334 audit(1709118553.142:63): prog-id=37 op=LOAD
    Bus error (core dumped)
    root@am67-sk:~# [ 192.543224] audit: type=1334 audit(1709118553.466:64): prog-id=37 op=UNLOAD
    [ 192.550233] audit: type=1334 audit(1709118553.466:65): prog-id=36 op=UNLOAD
    [ 192.557206] audit: type=1334 audit(1709118553.466:66): prog-id=35 op=UNLOAD

    root@am67-sk:~# devmem2 0x31200080
    /dev/mem opened.
    [ 269.622656] audit: type=1701 audit(1709118630.542:67): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=1235 comm="devmem2" exe="/usr/bin/devmem2" sig=7 res=1
    Memory mapped at address 0xffffa8aa0000.
    [ 269.650299] audit: type=1334 audit(1709118630.570:68): prog-id=38 op=LOAD
    [ 269.657189] audit: type=1334 audit(1709118630.578:69): prog-id=39 op=LOAD
    [ 269.664039] audit: type=1334 audit(1709118630.586:70): prog-id=40 op=LOAD
    Bus error (core dumped)
    root@am67-sk:~# [ 269.979249] audit: type=1334 audit(1709118630.902:71): prog-id=40 op=UNLOAD
    [ 269.986249] audit: type=1334 audit(1709118630.902:72): prog-id=39 op=UNLOAD
    [ 269.993230] audit: type=1334 audit(1709118630.902:73): prog-id=38 op=UNLOAD
    devmem2 0x31200484
    /dev/mem opened.
    [ 294.542676] audit: type=1701 audit(1709118655.462:74): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=1243 comm="devmem2" exe="/usr/bin/devmem2" sig=7 res=1
    Memory mapped at address 0xffff963ff000.
    [ 294.570722] audit: type=1334 audit(1709118655.490:75): prog-id=41 op=LOAD
    [ 294.577620] audit: type=1334 audit(1709118655.498:76): prog-id=42 op=LOAD
    [ 294.584484] audit: type=1334 audit(1709118655.506:77): prog-id=43 op=LOAD
    Bus error (core dumped)
    root@am67-sk:~# [ 294.911149] audit: type=1334 audit(1709118655.834:78): prog-id=43 op=UNLOAD
    [ 294.918162] audit: type=1334 audit(1709118655.834:79): prog-id=42 op=UNLOAD
    [ 294.925138] audit: type=1334 audit(1709118655.834:80): prog-id=41 op=UNLOAD

    BR, Rich

  • root@j722s-evm:~# devmem2 0x31210480 w 0xA0
    /dev/mem opened.
    Memory mapped at address 0xffffbb6fd000.
    Read at address 0x31210480 (0xffffbb6fd480): 0x00000D60
    Write at address 0x31210480 (0xffffbb6fd480): 0x000000A0, readback 0x000000A0
    devmem2 0x31210484 w 0x40000000
    root@j722s-evm:~# devmem2 0x31210080 w 0x4
    /dev/mem opened.
    Memory mapped at address 0xffffa4d57000.
    Read at address 0x31210080 (0xffffa4d57080): 0x00000004
    Write at address 0x31210080 (0xffffa4d57080): 0x00000004, readback 0x00000004
    root@j722s-evm:~# devmem2 0x31210484 w 0x40000000
    /dev/mem opened.
    Memory mapped at address 0xffffb2787000.
    Read at address 0x31210484 (0xffffb2787484): 0x40000000
    Write at address 0x31210484 (0xffffb2787484): 0x40000000, readback 0x40000000
    root@j722s-evm:~#
    root@j722s-evm:~# devmem2 0x31210484
    /dev/mem opened.
    Memory mapped at address 0xffff86f40000.
    Read at address 0x31210484 (0xffff86f40484): 0x40000000

    I dont see the bus error on my end on the AM67 EVM.

    This is currently what I see on the scope. I am still looking into this. 

  • Shreyas, 

    May I confirm which AM67x EVM you use? 

    I believe we are using same EVM as below. 

    https://www.ti.com/tool/J722SXH01EVM

    If this is the board you use, there is a USB Hub behind USB1 and it will disconnect USB hub and connect again when issue 0xA0 to 0x31210480. 

    How come you don't get same message in log? Do you disconnect USB Hub from USB1? 

    root@am67-sk:~# devmem2 0x31210480 w 0xA0
    /dev/mem opened.
    Memory mapped at address 0xffffa4eac000.
    Read at address 0x31210480 (0xffffa4eac480): 0x00000E03
    Write at address 0x31210480 (0xffffa4eac480): 0x000000A0, readback 0x000000A0
    root@am67-sk:~# [ 113.027530] usb 1-1: USB disconnect, device number 2
    [ 113.391425] usb 1-1: new high-speed USB device number 3 using xhci-hcd
    [ 113.544698] hub 1-1:1.0: USB hub found
    [ 113.548571] hub 1-1:1.0: 4 ports detected
    [ 113.555276] hub 1-1:1.0: USB hub found
    [ 113.559176] hub 1-1:1.0: 4 ports detected

    On customer board, they will not see USB Hub disconnect then connect message when issue 0xA0 to 0x31210480. 

    However, after write 0x4 to 0x312100080 (no bus error), writing 0x40000000 to 0x31210484 will get bus error. 

    What is causing the difference on our board? Could you check what the SOC remarking on the EVM you use?

    Where there be possibility the SOC PG version are different? 

     

    root@ecu1270-6800d0:~# devmem2 0x31210484
    /dev/mem opened.
    Memory mapped at address 0xffffa104f000.
    Bus error
    root@ecu1270-6800d0:~# devmem2 0x31210484 w 0x40000000
    /dev/mem opened.
    Memory mapped at address 0xffff94bb6000.
    Bus error
    root@ecu1270-6800d0:~# devmem2 0x31210484
    /dev/mem opened.
    Memory mapped at address 0xffffb97b3000.

    BR, Rich

  • Hi Rich,

    I am in discussion with my peers (s/w apps) and other USB experts on this as we speak also. 

    I am using the same generic EVM as you have shown ( PROC170E1(003)). The device that I have is the HS device; I can only see TI XJ722S5A(A?) but I cannot clearly read the marking on it as its obscured by the HS marked by sharpie. 

    uname -a on the prompt shows this:

    Linux j722s-evm 6.6.44-ti-gd3da65f1381e-dirty #7 SMP PREEMPT Thu Aug 28 15:25:39 CDT 2025 aarch64 GNU/Linux --> Indicating that its SDK10.1.

  • Hello Rich,

    Please apply the following diff in order to enable USB1 in USB 2.0 Mode and enter the test mode:

    diff --git a/arch/arm64/boot/dts/ti/k3-j722s-evm.dts b/arch/arm64/boot/dts/ti/k3-j722s-evm.dts
    index 90226f06ba61..dffe3fcc84af 100644
    --- a/arch/arm64/boot/dts/ti/k3-j722s-evm.dts
    +++ b/arch/arm64/boot/dts/ti/k3-j722s-evm.dts
    @@ -1183,14 +1183,13 @@ &usbss1 {
            pinctrl-names = "default";
            pinctrl-0 = <&main_usb1_pins_default>;
            ti,vbus-divider;
    +       ti,usb2-only;
            status = "okay";
     };
    
     &usb1 {
            dr_mode = "host";
    -       maximum-speed = "super-speed";
    -       phys = <&serdes0_usb_link>;
    -       phy-names = "cdns3,usb3-phy";
    +       maximum-speed = "high-speed";
     };
    
     &mcasp1 {

    After applying the above diff, the following is the output on the J722S-EVM:

    root@j722s-evm:~# lsusb -t
    /:  Bus 001.Port 001: Dev 001, Class=root_hub, Driver=xhci-hcd/1p, 480M
        |__ Port 001: Dev 002, If 0, Class=Hub, Driver=hub/4p, 480M
            |__ Port 002: Dev 003, If 0, Class=Mass Storage, Driver=usb-storage, 480M
    /:  Bus 002.Port 001: Dev 001, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    root@j722s-evm:~#
    root@j722s-evm:~# devmem2 0x31210480 w 0xA0
    /dev/mem opened.
    Memory mapped at address 0xffffb995d000.
    Read at address  0x31210480 (0xffffb995d480): 0x00000E03
    Write at address 0x31210480 (0xffffb995d480): 0x000000A0, readback 0x000000A0
    root@j722s-evm:~# [   68.887098] usb 1-1-port2: cannot reset (err = -71)
    [   68.892120] usb 1-1-port2: cannot reset (err = -71)
    [   68.897081] usb 1-1-port2: cannot reset (err = -71)
    [   68.902058] usb 1-1-port2: cannot reset (err = -71)
    [   68.907067] usb 1-1-port2: cannot reset (err = -71)
    [   68.911947] usb 1-1-port2: Cannot enable. Maybe the USB cable is bad?
    [   68.918489] usb 1-1-port2: cannot disable (err = -71)
    [   68.923626] usb 1-1-port2: cannot reset (err = -71)
    [   68.928579] usb 1-1-port2: cannot reset (err = -71)
    [   68.933576] usb 1-1-port2: cannot reset (err = -71)
    [   68.938536] usb 1-1-port2: cannot reset (err = -71)
    [   68.943489] usb 1-1-port2: cannot reset (err = -71)
    [   68.948372] usb 1-1-port2: Cannot enable. Maybe the USB cable is bad?
    [   68.954890] usb 1-1-port2: cannot disable (err = -71)
    [   68.960062] usb 1-1-port2: cannot reset (err = -71)
    [   68.965021] usb 1-1-port2: cannot reset (err = -71)
    [   68.969976] usb 1-1-port2: cannot reset (err = -71)
    [   68.974935] usb 1-1-port2: cannot reset (err = -71)
    [   68.979892] usb 1-1-port2: cannot reset (err = -71)
    [   68.984774] usb 1-1-port2: Cannot enable. Maybe the USB cable is bad?
    [   68.991328] usb 1-1-port2: cannot disable (err = -71)
    [   68.996459] usb 1-1-port2: cannot reset (err = -71)
    [   69.001454] usb 1-1-port2: cannot reset (err = -71)
    [   69.006407] usb 1-1-port2: cannot reset (err = -71)
    [   69.011402] usb 1-1-port2: cannot reset (err = -71)
    [   69.016391] usb 1-1-port2: cannot reset (err = -71)
    [   69.021273] usb 1-1-port2: Cannot enable. Maybe the USB cable is bad?
    [   69.027788] usb 1-1-port2: cannot disable (err = -71)
    [   69.032917] usb 1-1-port2: cannot disable (err = -71)
    [   69.038152] hub 1-1:1.0: hub_ext_port_status failed (err = -71)
    [   69.150496] sda: detected capacity change from 60995328 to 0
    
    root@j722s-evm:~# devmem2 0x31210080 w 0x4
    /dev/mem opened.
    Memory mapped at address 0xffff926f4000.
    Read at address  0x31210080 (0xffff926f4080): 0x00000805
    Write at address 0x31210080 (0xffff926f4080): 0x00000004, readback 0x00000004
    root@j722s-evm:~#
    root@j722s-evm:~# devmem2 0x31210484 w 0x40000000
    /dev/mem opened.
    Memory mapped at address 0xffffaf90e000.
    Read at address  0x31210484 (0xffffaf90e484): 0x00000000
    Write at address 0x31210484 (0xffffaf90e484): 0x40000000, readback 0x40000000
    root@j722s-evm:~#
    root@j722s-evm:~# devmem2 0x31210484
    /dev/mem opened.
    Memory mapped at address 0xffffac316000.
    Read at address  0x31210484 (0xffffac316484): 0x40000000
    root@j722s-evm:~#

    Regards,
    Siddharth.

  • Siddharth, 

    Is this for SDK 11? Is this patch just for enabling test mode or it should be applied for product mass production? 

    Will USB3.0 still function after applying this patch? 

    I did try SDK9/10/11 .wic image and got same resume as I described. 

    I wonder how Shreyas can generate test pattern on AM67x EVM. 

    Did he apply this patch already before testing? 

    BR, Rich

  • Hi Gokul,

    Could you provide the dtso for us to diff k3-j722s-evm.dtb.

    Thx

    Will

  • Siddharth, 

    This is the log after applying patch. 

    We still observe USB hub disconnect then connect again. 

    The log is different from yours. Is this expected since we are using AM67x SK. 

    root@am67-sk:~# lsusb -t
    /: Bus 001.Port 001: Dev 001, Class=root_hub, Driver=xhci-hcd/1p, 480M
    |__ Port 001: Dev 002, If 0, Class=Hub, Driver=hub/4p, 480M
    /: Bus 002.Port 001: Dev 001, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    |__ Port 001: Dev 002, If 0, Class=Hub, Driver=hub/4p, 5000M
    root@am67-sk:~# devmem2 0x31210480 w 0xA0
    /dev/mem opened.
    Memory mapped at address 0xffff8789c000.
    Read at address 0x31210480 (0xffff8789c480): 0x00000E03
    Write at address 0x31210480 (0xffff8789c480): 0x000000A0, readback 0x000000A0
    root@am67-sk:~# [ 110.434084] usb 1-1: USB disconnect, device number 2
    [ 110.781960] usb 1-1: new high-speed USB device number 3 using xhci-hcd
    [ 110.923295] hub 1-1:1.0: USB hub found
    [ 110.927183] hub 1-1:1.0: 4 ports detected

    root@am67-sk:~#
    root@am67-sk:~# devmem2 0x31210080 w 0x4
    /dev/mem opened.
    Memory mapped at address 0xffff9139b000.
    Read at address 0x31210080 (0xffff9139b080): 0x00000805
    Write at address 0x31210080 (0xffff9139b080): 0x00000004, readback 0x00000004
    root@am67-sk:~# devmem2 0x31210484 w 0x40000000
    /dev/mem opened.
    Memory mapped at address 0xffffbc370000.
    Read at address 0x31210484 (0xffffbc370484): 0x00000000
    Write at address 0x31210484 (0xffffbc370484): 0x40000000, readback 0x40000000
    root@am67-sk:~# 

    Shreyas, 


    I found you were using J722S EVM so not sure why you don't encounter usb 1-1 port 2 cannot reset (err = -71)? 

    How do you get the USB eye diagram on J722S EVM? 

    Is there not a USB Hub behind? 

    root@j722s-evm:~# devmem2 0x31210480 w 0xA0
    /dev/mem opened.
    Memory mapped at address 0xffffb995d000.
    Read at address 0x31210480 (0xffffb995d480): 0x00000E03
    Write at address 0x31210480 (0xffffb995d480): 0x000000A0, readback 0x000000A0
    root@j722s-evm:~# [ 68.887098] usb 1-1-port2: cannot reset (err = -71)
    [ 68.892120] usb 1-1-port2: cannot reset (err = -71)
    [ 68.897081] usb 1-1-port2: cannot reset (err = -71)
    [ 68.902058] usb 1-1-port2: cannot reset (err = -71)
    [ 68.907067] usb 1-1-port2: cannot reset (err = -71)
    [ 68.911947] usb 1-1-port2: Cannot enable. Maybe the USB cable is bad?
    [ 68.918489] usb 1-1-port2: cannot disable (err = -71)
    [ 68.923626] usb 1-1-port2: cannot reset (err = -71)
    [ 68.928579] usb 1-1-port2: cannot reset (err = -71)
    [ 68.933576] usb 1-1-port2: cannot reset (err = -71)
    [ 68.938536] usb 1-1-port2: cannot reset (err = -71)
    [ 68.943489] usb 1-1-port2: cannot reset (err = -71)
    [ 68.948372] usb 1-1-port2: Cannot enable. Maybe the USB cable is bad?
    [ 68.954890] usb 1-1-port2: cannot disable (err = -71)
    [ 68.960062] usb 1-1-port2: cannot reset (err = -71)
    [ 68.965021] usb 1-1-port2: cannot reset (err = -71)
    [ 68.969976] usb 1-1-port2: cannot reset (err = -71)
    [ 68.974935] usb 1-1-port2: cannot reset (err = -71)
    [ 68.979892] usb 1-1-port2: cannot reset (err = -71)
    [ 68.984774] usb 1-1-port2: Cannot enable. Maybe the USB cable is bad?
    [ 68.991328] usb 1-1-port2: cannot disable (err = -71)
    [ 68.996459] usb 1-1-port2: cannot reset (err = -71)
    [ 69.001454] usb 1-1-port2: cannot reset (err = -71)
    [ 69.006407] usb 1-1-port2: cannot reset (err = -71)
    [ 69.011402] usb 1-1-port2: cannot reset (err = -71)
    [ 69.016391] usb 1-1-port2: cannot reset (err = -71)
    [ 69.021273] usb 1-1-port2: Cannot enable. Maybe the USB cable is bad?
    [ 69.027788] usb 1-1-port2: cannot disable (err = -71)
    [ 69.032917] usb 1-1-port2: cannot disable (err = -71)
    [ 69.038152] hub 1-1:1.0: hub_ext_port_status failed (err = -71)
    [ 69.150496] sda: detected capacity change from 60995328 to 0

    BR, Rich

  • Yes, there is a Hub on the J722S EVM.

    Yesterday, we totally disabled USB0 and enabled USB1, also selected the USB_MUX_SEL as active high and with output_high to ensure that the USB1 mux is being selected and then measured at the input of the HUB and I see the test packet come out.

    I will request the patch that I used for you to try.

  • Hi all,

    Attaching patch:

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/0001_2D00_Enable_2D00_only_2D00_USB1_2D00_in_2D00_2.0_2D00_mode_2D00_disable_2D00_USB0.patch

    Regardsm

    Takuma