This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM5718: USB controller configuration

Part Number: AM5718
Other Parts Discussed in Thread: AM5728

Tool/software: Linux

HI TI,

A custom board(reference to AM5718 and AM5728) having with USB hub.
while in the booting process am able to see hub detection.
but, in ls /sys/class/udc there is no controller respect to usb1(0x48890000).
am able to see usb2 controller(0x488d0000).

I am expecting after ls /sys/class/udc there should two usb controller
48890000.usb  488d0000.usb

Please find the attached booting log.
Please suggest me if am missing anything.

Thanks,

Anil

[    5.063605] PRM: I/O chain clock line assertion timed out
[  OK  ] Started Rebuild Hardware Database.
[    5.774530] PRM: I/O chain clock line assertion timed out
         Starting udev Coldplug all Devices...
[    5.803634] PRM: I/O chain clock line assertion timed out
         Starting Update is Completed...
[    5.843648] PRM: I/O chain clock line assertion timed out
[  OK  ] Started Update is Completed.
[    5.883615] PRM: I/O chain clock line assertion timed out
[    6.499155] omap-rproc 58820000.ipu: assigned reserved memory node ipu1_cma@9d000000
[    6.549565]  remoteproc0: 58820000.ipu is available
[    6.581006]  remoteproc0: Note: remoteproc is still under development and considered experimental.
[  OK  ] Found device /dev/ttyS2.
[    6.620768] PRM: I/O chain clock line assertion timed out
[    6.644187]  remoteproc0: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.
[    6.702053] omap-rproc 55020000.ipu: assigned reserved memory node ipu2_cma@95800000
[  OK  ] Started udev Coldplug all Devices.[    6.746830]  remoteproc1: 55020000.ipu is available

[    6.753443] palmas-rtc 48070000.i2c:tps659038@58:tps659038_rtc: rtc core: registered 48070000.i2c:tps659 as rtc0
[    6.766243] PRM: I/O chain clock line assertion timed out
[    6.800520]  remoteproc1: Note: remoteproc is still under development and considered experimental.
[  OK  ] Reached target System Initialization.
[    6.838801] PRM: I/O chain clock line assertion timed out
[    6.858059]  remoteproc1: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.
[    6.869975] palmas-usb 48070000.i2c:tps659038@58:tps659038_usb: USB-HOST cable is attached
[  OK  ] Listening on RPCbind Server Activation Socket.
[    6.903612] PRM: I/O chain clock line assertion timed out
[    6.925977] omap-des 480a5000.des: OMAP DES hw accel rev: 2.2
[  OK  ] Started Daily Cleanup of Temporary Directories.[    6.951466] alg: skcipher: setkey failed on test 5 for ecb-des-omap: flags=100

[    6.963105] PRM: I/O chain clock line assertion timed out
[  OK  ] Reached target Timers.
[    7.003898] alg: skcipher-ddst: setkey failed on test 5 for ecb-des-omap: flags=100
[    7.013844] PRM: I/O chain clock line assertion timed out
[    7.034611] alg: skcipher-ddst: setkey failed on test 5 for ecb-des-omap: flags=100
[  OK  ] Listening on D-Bus System Message Bus Socket.
[    7.063601] PRM: I/O chain clock line assertion timed out
[    7.070460] omap_rng 48090000.rng: OMAP Random Number Generator ver. 20
[    7.085294] omap-rproc 40800000.dsp: assigned reserved memory node dsp1_cma@99000000
[    7.101403]  remoteproc2: 40800000.dsp is available
[  OK  ] Reached target Sockets.[    7.115964]  remoteproc2: Note: remoteproc is still under development and considered experimental.

[    7.140340]  remoteproc0: registered virtio0 (type 7)
[    7.145766] PRM: I/O chain clock line assertion timed out
[  OK  ] Reached target Basic System.[    7.163868]  remoteproc2: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.

[    7.193614] PRM: I/O chain clock line assertion timed out
[  OK  ] Started Serial Getty on ttyS2.
[    7.243626] PRM: I/O chain clock line assertion timed out
[  OK  ] Started D-Bus System Message Bus.
[    7.303628] PRM: I/O chain clock line assertion timed out
[    7.399533] vip 48970000.vip: loading firmware vpdma-1b8.bin
[    7.443434] vip 48970000.vip: VPDMA firmware loaded
[    7.501175] omap-sham 4b101000.sham: hw accel on OMAP rev 4.3
[    7.555198] SCSI subsystem initialized
[    7.615704]  remoteproc1: registered virtio1 (type 7)
[    8.035669] vpe 489d0000.vpe: loading firmware vpdma-1b8.bin
[    8.053650] vpe 489d0000.vpe: Device registered as /dev/video0
[    8.060488] ti-pruss 4b200000.pruss: creating PRU cores and other child platform devices
[    8.133374] davinci_mdio 4b232400.mdio: davinci mdio revision 1.6
[    8.139504] libphy: 4b232400.mdio: probed
[    8.161263] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
[    8.169819] omap-aes 4b500000.aes: OMAP AES hw accel rev: 3.3
[    8.251144] omap-aes 4b700000.aes: OMAP AES hw accel rev: 3.3
[    8.264673] ahci 4a140000.sata: SSS flag set, parallel bus scan disabled
[    8.271432] ahci 4a140000.sata: AHCI 0001.0300 32 slots 1 ports 3 Gbps 0x1 impl platform mode
[    8.311655] ahci 4a140000.sata: flags: 64bit ncq sntf stag pm led clo only pmp pio slum part ccc apst 
[    8.350137] scsi host0: ahci
[    8.358762] ata1: SATA max UDMA/133 mmio [mem 0x4a140000-0x4a1410ff] port 0x100 irq 349
         Starting Network Service...
[    8.400066] ti-pruss 4b280000.pruss: creating PRU cores and other child platform devices
[    8.408547] PRM: I/O chain clock line assertion timed out
[  OK  ] Reached target Containers.
[    8.453620] PRM: I/O chain clock line assertion timed out
[    8.483634] davinci_mdio 4b2b2400.mdio: davinci mdio revision 1.6
[    8.489764] libphy: 4b2b2400.mdio: probed
[    8.555935]  remoteproc3: 4b234000.pru0 is available
[    8.560931]  remoteproc3: Note: remoteproc is still under development and considered experimental.
[    8.614454]  remoteproc3: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.
[  OK  ] Started Network Service.
[    8.630111] PRM: I/O chain clock line assertion timed out
[    8.663835] pru-rproc 4b234000.pru0: PRU rproc node /ocp/pruss@4b200000/pru0@4b234000 probed successfully
[    8.692374]  remoteproc4: 4b238000.pru1 is available
[    8.711833]  remoteproc4: Note: remoteproc is still under development and considered experimental.
[  OK  ] Reached target Network.
[    8.726059] PRM: I/O chain clock line assertion timed out
[    8.749957]  remoteproc4: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.
         Starting Network Name Resolution...
[    8.783649] PRM: I/O chain clock line assertion timed out
[    8.792406] pru-rproc 4b238000.pru1: PRU rproc node /ocp/pruss@4b200000/pru1@4b238000 probed successfully
         Starting Dropbear SSH daemon...
[    8.833980] PRM: I/O chain clock line assertion timed out
[    8.853749]  remoteproc5: 4b2b4000.pru0 is available
[    8.870793]  remoteproc5: Note: remoteproc is still under development and considered experimental.
[    8.912124]  remoteproc5: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.
[    8.943820] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[    8.958085] pru-rproc 4b2b4000.pru0: PRU rproc node /ocp/pruss@4b280000/pru0@4b2b4000 probed successfully
[    8.976181] ata1.00: HPA detected: current 61857727, native 61865984
[    9.004430] ata1.00: ATA-9: ATP SATA III mSATA, N0516B, max UDMA/133
[    9.023496]  remoteproc6: 4b2b8000.pru1 is available
[  OK  ] Started Network Name Resolution.
[    9.055125] ata1.00: 61857727 sectors, multi 1: LBA48 NCQ (depth 31/32)
[    9.062444]  remoteproc2: registered virtio2 (type 7)
[    9.072182]  remoteproc6: Note: remoteproc is still under development and considered experimental.
[    9.081721] PRM: I/O chain clock line assertion timed out
[    9.126969] ata1.00: configured for UDMA/133
[  OK  ] Started Dropbear SSH daemon.[    9.141986]  remoteproc6: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.

[    9.174337] PRM: I/O chain clock line assertion timed out
[    9.201279] scsi 0:0:0:0: Direct-Access     ATA      ATP SATA III mSA 6B   PQ: 0 ANSI: 5
[    9.233629] pru-rproc 4b2b8000.pru1: PRU rproc node /ocp/pruss@4b280000/pru1@4b2b8000 probed successfully
[    9.302681] prueth pruss2_eth: port 1: using random MAC addr: 2a:aa:ed:d4:6d:50
[    9.331687] prueth pruss2_eth: couldn't connect to phy /ocp/pruss@4b280000/mdio@4b2b2400/ethernet-phy@0
[    9.385556] prueth pruss2_eth: netdev init ethernet-mii0 failed: -19
[    9.392134] prueth pruss2_eth: port 2: using random MAC addr: aa:f3:49:d2:c6:1b
[    9.465768] prueth pruss2_eth: couldn't connect to phy /ocp/pruss@4b280000/mdio@4b2b2400/ethernet-phy@1
[    9.520133] prueth pruss2_eth: netdev init ethernet-mii1 failed: -19
[    9.558257] prueth pruss2_eth: TI PRU ethernet driver initialized
[    9.591922] prueth pruss1_eth: port 1: using random MAC addr: f6:b9:dc:2a:1a:62
[    9.637006] prueth pruss1_eth: couldn't connect to phy /ocp/pruss@4b200000/mdio@4b232400/ethernet-phy@0
[    9.689203] prueth pruss1_eth: netdev init ethernet-mii0 failed: -19
[    9.726947] prueth pruss1_eth: port 2: using random MAC addr: 0a:63:af:9d:c0:e3
[    9.768912] prueth pruss1_eth: couldn't connect to phy /ocp/pruss@4b200000/mdio@4b232400/ethernet-phy@1
[    9.820716] prueth pruss1_eth: netdev init ethernet-mii1 failed: -19
[    9.852329]  remoteproc0: powering up 58820000.ipu
[    9.861537] prueth pruss1_eth: TI PRU ethernet driver initialized
[    9.916192]  remoteproc0: Booting fw image dra7-ipu1-fw.xem4, size 4890352
[    9.923197] omap-iommu 58882000.mmu: 58882000.mmu: version 2.1
[    9.974286] sd 0:0:0:0: [sda] 61857727 512-byte logical blocks: (31.7 GB/29.5 GiB)
[   10.003994] sd 0:0:0:0: [sda] Write Protect is off
[   10.023436] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[   10.044976]  remoteproc0: remote processor 58820000.ipu is now up
[   10.065105] virtio_rpmsg_bus virtio0: rpmsg host is online
[   10.070749] virtio_rpmsg_bus virtio0: creating channel rpmsg-client-sample addr 0x32
[   10.080235]  sda: sda1 sda2
[   10.095215] sd 0:0:0:0: [sda] Attached SCSI disk
[   10.104173] virtio_rpmsg_bus virtio0: creating channel rpmsg-client-sample addr 0x33
[   10.132902] virtio_rpmsg_bus virtio0: creating channel rpmsg-omx addr 0x3c
[   10.174159] virtio_rpmsg_bus virtio0: creating channel rpmsg-rpc addr 0x65
[   10.224666]  remoteproc1: powering up 55020000.ipu
[   10.236087]  remoteproc1: Booting fw image dra7-ipu2-fw.xem4, size 3743116
[   10.243084] omap-iommu 55082000.mmu: 55082000.mmu: version 2.1
[   10.474586]  remoteproc1: remote processor 55020000.ipu is now up
[   10.484529] virtio_rpmsg_bus virtio1: rpmsg host is online
[   10.490076] virtio_rpmsg_bus virtio1: creating channel rpmsg-rpc addr 0x65
[   10.514011] virtio_rpmsg_bus virtio1: creating channel rpmsg-rpc addr 0x66
[   10.544256]  remoteproc2: powering up 40800000.dsp
[   10.636037]  remoteproc2: Booting fw image dra7-dsp1-fw.xe66, size 21914156
[   10.650239] omap_hwmod: mmu0_dsp1: _wait_target_disable failed
[   10.656131] omap-iommu 40d01000.mmu: 40d01000.mmu: version 3.0
[   10.662105] omap-iommu 40d02000.mmu: 40d02000.mmu: version 3.0
[   10.765618]  remoteproc2: remote processor 40800000.dsp is now up
[   10.813671] virtio_rpmsg_bus virtio2: rpmsg host is online
[   10.819220] virtio_rpmsg_bus virtio2: creating channel rpmsg-proto addr 0x3d
[   10.835402] rpmsg_rpc rpmsg3: probing service rpc_example_2 with src 1024 dst 101
[   10.865145] rpmsg_rpc rpmsg4: probing service dce-callback with src 1024 dst 101
[   10.872622] rpmsg_rpc rpmsg3: published functions = 8
[   10.881910] NET: Registered protocol family 41
[   10.905168] rpmsg_rpc rpmsg5: probing service rpmsg-dce with src 1025 dst 102
[   10.912375] rpmsg_rpc rpmsg4: published functions = 4
[   10.927018] rpmsg_rpc rpmsg5: published functions = 9
[   11.077011] usbcore: registered new interface driver usbfs
[   11.083138] usbcore: registered new interface driver hub
[   11.089787] usbcore: registered new device driver usb
[   11.108301] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[   11.114076] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
[   11.122144] xhci-hcd xhci-hcd.0.auto: hcc params 0x0220f04c hci version 0x100 quirks 0x00210010
[   11.132694] xhci-hcd xhci-hcd.0.auto: irq 432, io mem 0x48890000
[   11.141034] hub 1-0:1.0: USB hub found
[   11.145680] hub 1-0:1.0: 1 port detected
[   11.150006] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[   11.156715] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
[   11.165123] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[   11.175009] hub 2-0:1.0: USB hub found
[   11.178809] hub 2-0:1.0: 1 port detected
[   11.183224] dwc3 488d0000.usb: otg: primary host xhci-hcd.1.auto registered
[   11.192087] dwc3 488d0000.usb: otg: shared host xhci-hcd.1.auto registered
[   11.199609] dwc3 488d0000.usb: otg: can't start till gadget registers
[   11.463319] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[   11.493375] usb 2-1: new SuperSpeed USB device number 2 using xhci-hcd
[   11.517337] hub 2-1:1.0: USB hub found
[   11.521539] hub 2-1:1.0: 4 ports detected
[   11.613376] hub 1-1:1.0: USB hub found
[   11.617556] hub 1-1:1.0: 4 ports detected
[   12.224585] PRM: I/O chain clock line assertion timed out
[   12.230996] PRM: I/O chain clock line assertion timed out

Welcome to Tester-Master
r-master login: root
Password: 
# ls
mk-eMMC-boot.sh
# lsusb
Bus 001 Device 002: ID 0451:8142
Bus 002 Device 002: ID 0451:8140
Bus 001 Device 001: ID 1d6b:0002
Bus 002 Device 001: ID 1d6b:0003
# ls /sys/class/udc
488d0000.usb
# �


  • Anil,

    Anil goud said:
    I am expecting after ls /sys/class/udc there should two usb controller
    48890000.usb  488d0000.usb

    This is not always true. It depends on the dr_mode setting in device tree. If dr_mode is set to 'host', there is no udc entry for it, because udc means usb device controller but dr_mode=host sets the controller to host.

  • Hi Bin Liu,
    Thank you very much for your valuable information, I have one more doubt.

    A custom board with two cpu's(AM5728), configured as below:
    1) cpu1 with usb1 hub(reference from AM5728) interface,
    2) cpu2 usb1 controller for usb device.
    cpu2 usb1 is connected to usb hub on down stream (inter connected on board ).

    so, cpu1 is able to detect the hub and down stream ports, so can i assume usb path is fine.
    and in cpu2 usb1 is configured as gadget device bind to UDC 48890000.usb

    but I cannot see the drive name(partition disk) on cpu1 side.
    please suggest, What might be the mistake i might be doing.

    Thanks,
    Anil
  • Anil,

    I assume you have loaded the g_mass_storage gadget driver on cpu2 usb1?
    'cat /sys/class/udc/48890000.usb/uevent' on cpu2 will tell you that.

    Then check if the hub downstream port which cpu2 usb1 is connected to has vbus power.
  • Hi Bin Liu,

    1) I am using CONFIGFS gadget driver on cpu2 usb1,  below showed information of it.

    cat /sys/class/udc/48890000.usb/uevent
    DRIVER=configfs-gadget
    USB_UDC_NAME=dwc3-gadget
    USB_UDC_DRIVER=g1

    2) Then check if the hub downstream port which cpu2 usb1 is connected to has vbus power.

    Yes, cpu2 usb1 has vbus power(3.3v)

    Still i am not able to see drive partition on cpu1 side.

    Please suggest me still am missing any thing.

    Thanks,

    Anil

  • Anil,

    Anil goud said:

    1) I am using CONFIGFS gadget driver on cpu2 usb1,  below showed information of it.

    cat /sys/class/udc/48890000.usb/uevent
    DRIVER=configfs-gadget
    USB_UDC_NAME=dwc3-gadget
    USB_UDC_DRIVER=g1

    The info show the gadget look fine. But for debugging purpose, it is a good idea to start with 'modprobe g_zero'.

    Anil goud said:
    Yes, cpu2 usb1 has vbus power(3.3v)

    VBUS has to be 5.0V. Please check your hardware design.

  • By the way, here are the links to the AM57x schematics checklist and high-speed interface layout guidelines for your reference.

    processors.wiki.ti.com/.../AM57xx_Schematic_Checklist

    www.ti.com/.../spraar7
  • Hi Bin Liu,
    Thanks for you inputs, I Will go through it and come back with updates.
    Thanks,
    Anil
  • Hi Bin Liu,

    As per AM57xx_Schematic Checklist

    Typical connections of the AM57xx for a USB Device:

    1.    USBx_DP and USBx_DM are connected directly to the USB connector

    2.    Connector ID pin can be left unconnected

    3.    USBx_DRVVBUS is not used and can be left unconnected

    But in Am5718 idk board schematic shows

    ID and drvvbus are not unconnected, Can you please explain the concept.

  • Anil,

    Anil goud said:

    Typical connections of the AM57xx for a USB Device:
    2.    Connector ID pin can be left unconnected
    3.    USBx_DRVVBUS is not used and can be left unconnected

    As stated above, these requirements are for "a USB Device", aka peripheral mode,

    Anil goud said:

    But in Am5718 idk board schematic shows

    ID and drvvbus are not unconnected, Can you please explain the concept.

    But in AM5718 IDK evm, USB1 is in host-only mode and USB2 is in Dual-Role mode, none of them is in Peripheral mode. 

  • Hi Bin Liu,

    From above discussion, it is clear that cpu2 usb1 gadget looks fine and cpu1 hub is fine but the device detection is not happening in cpu1.

    How can cross check the that hub detects the device(cpu2 usb1).

    and what needs to do in dts file for cpu2,usb1.

    The following i made is:

    usb1: dr_mode ="peripheral";

    gpio7_25 to PIN_INPUT_PULLUP in mux_data.h

    USB1_DRVVBUS: PIN_INPUT_SLEW in mux_data.h

    Please correct me if i am doing any wrong.

    But,  in cpu2 usb1 doesn't have connector, the cpu2 usb1 is inter connected in the board to cpu1 usb1(down stream side) of hub(which is same schematics as AM5728 evm).

    The below shows the cpu2 usb1.(with removed R831, R833).

  • Anil,

    Did you solve the VBUS voltage problem yet on the hub downstream port? You mentioned it is 3.3V. It has to be 5V.
  • Hi Bin Liu,

    While debugging i observed that,

    FOR HOST side(cpu1: usb1 with hub):

    cd /sys/kernel/debug/48890000.usb
    # ls
    link_state  mode        regdump     testmode
    # cat link_state
    SS.Disabled
    # cat mode
    host

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

    For DEVICE SIDE(cpu2,: usb1):

    cd /sys/kernel/debug/48890000.usb
    # cd 48890000.usb/
    # ls
    link_state  regdump     testmode
    # cat link_state
    SS.Disabled

    Please suggest me, What might me the mistake

    Thanks,

    Anil

  • Anil goud said:

    FOR HOST side(cpu1: usb1 with hub):

    ...
    # cat link_state
    SS.Disabled

    This 'SS.Disabled' is normal. Because this link_state entry is for the usb controller in device mode, it is irrelevant to host mode.

    Anil goud said:

    For DEVICE SIDE(cpu2,: usb1):

    ...
    # cat link_state
    SS.Disabled

    This message tells the device is not enumerated. Assuming you have load a gadget driver on the device side, this problem is that the hub downstream port doesn't enumerate the device.

    As I mentioned in another e2e thread you created related to this problem, you have to check your board design related the hub. For example, you said the hub downstream port VBUS power is 3.3v, it is wrong, it has to be 5V.

  • Hi,

    Now, Its working fine for me,
    First I ran the self-powered USB device and then I started host usb hub, with this scenario all the event triggering is happening good.
    Able to detect the disk at host.

    Thanks,
    Anil
  • Anil,

    Glad it is working now.
    But what caused it not work before? Is it you have to start cpu2 - the usb device - first before start cpu1?