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.

AM6412: AM6412 unable to get any USB device information using command "lsusb"

Part Number: AM6412

Hi, Sir

We were cold rebooted with the AM6412 and had a 0.5% failure rate where the USB bus disappeared.

And the Software restart problem still exists, only another cold reboot can solve the problem.

kernel version : 5.10.168-cip27

drivers/phy/cadence/phy-cadence-torrent.c

BR,

Taylor

dmesg

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[ 0.000000] Linux version 5.10.0-cip-rt-moxa-am64x (root@runner-setjc8l-project-32919665-concurrent-0) (aarch64-linux-gnu-gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2) #1 SMP Thu May 11 17:41:38 CST 2023
[ 0.000000] Machine model: Moxa UC-1222A
[ 0.000000] efi: UEFI not found.
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a0000000, size 1 MiB
[ 0.000000] OF: reserved mem: initialized node r5f-dma-memory@a0000000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a0100000, size 15 MiB
[ 0.000000] OF: reserved mem: initialized node r5f-memory@a0100000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a1000000, size 1 MiB
[ 0.000000] OF: reserved mem: initialized node r5f-dma-memory@a1000000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a1100000, size 15 MiB
[ 0.000000] OF: reserved mem: initialized node r5f-memory@a1100000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a2000000, size 1 MiB
[ 0.000000] OF: reserved mem: initialized node r5f-dma-memory@a2000000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a2100000, size 15 MiB
[ 0.000000] OF: reserved mem: initialized node r5f-memory@a2100000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a3000000, size 1 MiB
[ 0.000000] OF: reserved mem: initialized node r5f-dma-memory@a3000000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a3100000, size 15 MiB
[ 0.000000] OF: reserved mem: initialized node r5f-memory@a3100000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a4000000, size 1 MiB
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

gitlog

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
0b544f04aded phy: cadence-torrent: Add USXGMII(156.25MHz) + SGMII/QSGMII(100MHz) multilink config for TI J7200
c3457e974ab6 phy: cadence-torrent: Add USXGMII(156.25MHz) + SGMII/QSGMII(100MHz) multilink configuration
640149b54c1c phy: cadence-torrent: Add PCIe(100MHz) + USXGMII(156.25MHz) multilink configuration
10686c8094cd phy: cadence-torrent: use key:value pair table for all settings
a651aba70e80 phy: cadence-torrent: Add single link USXGMII configuration for 156.25MHz refclk
980bf0a77de4 phy: cadence-torrent: Add USB + DP multilink configuration
b00b3c878254 phy: cadence-torrent: Add PCIe + DP multilink configuration for 100MHz refclk
97ccd196a592 phy: cadence-torrent: Prepare driver for multilink DP support
498e1493eb13 phy: cadence-torrent: Add function to get PLL to be configured for DP
ba8ed83d8969 phy: cadence-torrent: Check PIPE mode PHY status to be ready for operation
b6ed4fc86d0d phy: cadence-torrent: Add debug information for PHY configuration
9fd51cbedf08 phy: cadence-torrent: Add separate functions for reusable code
4e33b989051e phy: cadence-torrent: Add PHY configuration for DP with 100MHz ref clock
fc88e3c73e76 phy: cadence-torrent: Add PHY registers for DP in array format
1dcce77ebf16 phy: cadence-torrent: Configure PHY registers as a function of input reference clock rate
10ed0412be9c phy: cadence-torrent: Add enum for supported input reference clock frequencies
12aacbea895c phy: cadence-torrent: Reorder few functions to remove function declarations
db074ab33408 phy: cadence-torrent: Remove use of CamelCase to fix checkpatch CHECK message
58425b93fc0f phy: cadence-torrent: Add delay for PIPE clock to be stable
3a75edddd85f phy: cadence-torrent: Explicitly request exclusive reset control
f1a1377d5e35 phy: cadence-torrent: Do not configure SERDES if it's already configured
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Hi Sir,

    We can also find the same error on the TI webpage 

    codes-torrent-phy f000000.serdes: Timeout waiting for CMN ready

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    [ 1.037916] Console: switching to mono frame buffer device 12x2
    [ 1.067849] ssd1307fb 1-003c: fb0: Solomon SSD1307 framebuffer device registered, using 192 bytes of video memory
    [ 1.068096] omap_i2c 20010000.i2c: bus 1 rev0.12 at 400 kHz
    [ 1.069616] omap_i2c 20020000.i2c: bus 2 rev0.12 at 100 kHz
    [ 1.071115] omap_i2c 20030000.i2c: bus 3 rev0.12 at 100 kHz
    [ 1.071656] ti-sci-intr bus@f4000:bus@4000000:interrupt-controller1: Interrupt Router 5 domain created
    [ 1.071899] ti-sci-intr bus@f4000:interrupt-controller0: Interrupt Router 3 domain created
    [ 1.072337] ti-sci-inta 48000000.interrupt-controller: Interrupt Aggregator domain 28 created
    [ 1.086128] j721e-pcie f102000.pcie: host bridge /bus@f4000/pcie@f102000 ranges:
    [ 1.086188] j721e-pcie f102000.pcie: IO 0x0068001000..0x0068010fff -> 0x0068001000
    [ 1.086217] j721e-pcie f102000.pcie: MEM 0x0068011000..0x006fffffff -> 0x0068011000
    [ 1.086242] j721e-pcie f102000.pcie: IB MEM 0x0000000000..0x0fffffffff -> 0x0000000000
    [ 1.187034] cdns-torrent-phy f000000.serdes: Timeout waiting for CMN ready
    [ 1.187057] phy phy-f000000.serdes.2: phy poweron failed --> -110
    [ 1.187079] j721e-pcie f102000.pcie: Failed to init phy
    [ H1.187308] j721e-pcie: probe of f102000.pcie failed with error -110
    [ 1.188235] ti-udma 485c0100.dma-controller: Number of rings: 68
    [ 1.216711] printk: console [ttyS2]: printing thread started
    [ 1.189798] ti-udma 485c0100.dma-controller: Channels: 24 (bchan: 12, tchan: 6, rchan: 6)
    [ 1.216734] printk: console [ttyS2] enabled
    [ 1.216739] printk: bootconsole [ns16550a0] disabled
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Thanks,

    Sean

  • Hi Bin:

    May you help for this issue?

    Thanks.

    BR Rio

  • Hi Bin:

    Sean is using the Debian, not sure the USB phy is chosen with the Cadence Phy.

    Can you confirm if TI AM64 is okay to go with Cadence phy?

    I know the default config using the xHCI USB phy.

    BR Rio

  • Hi Bin:

    From the Native log for the AM64, I saw the AM64 used the xHCI USB IP.

    see the log as the below:

    [ 10.845461] usbcore: registered new interface driver usbfs
    [ 10.855860] cfg80211: Loading compiled-in X.509 certificates for regulatory database
    [ 10.887821] usbcore: registered new interface driver hub
    [ 10.950171] usbcore: registered new device driver usb
    [ 11.008825] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
    [ 11.134962] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
    [ 11.140741] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 1
    [ 11.156517] xhci-hcd xhci-hcd.1.auto: hcc params 0x200073c9 hci version 0x100 quirks 0x0000002000010010
    [ 11.168820] xhci-hcd xhci-hcd.1.auto: irq 533, io mem 0x0f410000
    [ 11.181099] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
    [ 11.190206] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 2
    [ 11.202326] xhci-hcd xhci-hcd.1.auto: Host supports USB 3.0 SuperSpeed
    [ 11.213702] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.10
    [ 11.231260] wl18xx_driver wl18xx.0.auto: Direct firmware load for ti-connectivity/wl1271-nvs.bin failed with error -2
    [ 11.244189] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [ 11.278442] usb usb1: Product: xHCI Host Controller
    [ 11.286698] usb usb1: Manufacturer: Linux 5.10.168-g2c23e6c538 xhci-hcd
    [ OK ] Found device /dev/mmcblk1p1.[ 11.295867] usb usb1: SerialNumber: xhci-hcd.1.auto

    [ 11.307697] hub 1-0:1.0: USB hub found
    [ 11.311715] hub 1-0:1.0: 1 port detected
    Starting File System Check on /dev/mmcblk1p1...
    [ 11.330461] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
    [ 11.338828] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.10
    [ 11.356215] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [ 11.365452] usb usb2: Product: xHCI Host Controller
    [ 11.374297] usb usb2: Manufacturer: Linux 5.10.168-g2c23e6c538 xhci-hcd
    [ 11.381981] usb usb2: SerialNumber: xhci-hcd.1.auto
    [ 11.387921] hub 2-0:1.0: USB hub found
    [ 11.395110] hub 2-0:1.0: 1 port detected

    But, according your E2E posted here.

    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1164994/sk-am62-usb-ip-on-am62-am64-am65?tisearch=e2e-sitesearch&keymatch=AM64%2525252520USB#

    You told:

    Yes, AM62x USB IP implements xHCI,

    but AM62x and AM65x use Designware IP,

    while AM64x uses Cadence IP.

    Can you clarify the AM64 USB IP?

    BR Rio

  • Hi Rio,

    Sean is using the Debian, not sure the USB phy is chosen with the Cadence Phy.

    Can you please provide the details about how Cadence Phy is "chosen" in this customer project?

    The context of "Cadence Phy" is about USB super-speed. Is  the customer USB design using USB super-speed or not?

  • Rio,

    You told:

    Yes, AM62x USB IP implements xHCI,

    but AM62x and AM65x use Designware IP,

    while AM64x uses Cadence IP.

    Can you clarify the AM64 USB IP?

    Either Designware IP or Cadence IP implements both USB host controller (xHCI) and USB device controller. AM64x uses Cadence IP. Please let me know what else information you want to know.

  • Hi Bin:

    Some questions:

    #1. If AM64 used the Cadence IP, why the native SDK didn't popup the cadence IP driver?

    #2. Okay, Customer PCB found if they saw this log: codes-torrent-phy f000000.serdes: Timeout waiting for CMN ready

          The USB hub will not work at all.

          This log comes from the Cadence-torrent.c.

          Any idea for fix this?

          Here is the git for cadence-torrent.c

    https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/log/drivers/phy/cadence/phy-cadence-torrent.c?h=master

    BR Rio

  • Confirmed customer Debian Kernel log has this section.

    But I cannot find this flag on the AM64 native config.

    Please tell us how to fix this? (I mean: USB won't function while this log shows: codes-torrent-phy f000000.serdes: Timeout waiting for CMN ready

    # PHY Subsystem
    #
    CONFIG_GENERIC_PHY=y
    CONFIG_GENERIC_PHY_MIPI_DPHY=y
    CONFIG_PHY_XGENE=y
    # CONFIG_BCM_KONA_USB2_PHY is not set
    CONFIG_PHY_CADENCE_TORRENT=y
    CONFIG_PHY_CADENCE_DPHY=m
    CONFIG_PHY_CADENCE_SIERRA=y
    # CONFIG_PHY_CADENCE_SALVO is not set
    # CONFIG_PHY_FSL_IMX8MQ_USB is not set
    CONFIG_PHY_MIXEL_MIPI_DPHY=m
    # CONFIG_PHY_PXA_28NM_HSIC is not set
    # CONFIG_PHY_PXA_28NM_USB2 is not set
    # CONFIG_PHY_CPCAP_USB is not set
    # CONFIG_PHY_MAPPHONE_MDM6600 is not set
    # CONFIG_PHY_OCELOT_SERDES is not set
    CONFIG_PHY_AM654_SERDES=y
    CONFIG_PHY_J721E_WIZ=y
    CONFIG_OMAP_USB2=m
    CONFIG_PHY_TI_GMII_SEL=y
    # end of PHY Subsystem

  • Hi Bin:

    May you help to check if internal Jira has this kind of issue?

    How to fix this?

    BR Rio

  • Hi Bin:

    Any feedback?

    BR Rio

  • Hi Rio,

    Please attach the file /sys/firmware/fdt from the customer's running board.

    [ 1.187057] phy phy-f000000.serdes.2: phy poweron failed --> -110
    [ 1.187079] j721e-pcie f102000.pcie: Failed to init phy
    [ H1.187308] j721e-pcie: probe of f102000.pcie failed with error -110

    Does this error message happen in USB working case? What is the output of "lspci" in the USB working case?

  • Hi Bin:

    Sorry for replying late due to busy, I have sent the part of the fail log thru email.

    BR Rio

  • Rio,

    There is nothing proprietary in the kernel log, why you cannot attach it here? It is difficult to track both emails and the thread here.

    Please attach the board dtb file here for review.

  • Hi Bin:

    Bcz customer never gives me the full log.

    I will ask them to provide there , thanks.

    BR Rio

  • Hi Bin:

    plz scroll up to find this post from Sean:

    Offline 123.51.145.107 
    Intellectual 260 points

    Hi Sir,

    We can also find the same error on the TI webpage 

    codes-torrent-phy f000000.serdes: Timeout waiting for CMN ready

    The log has these lines you asked:

    [ 1.187034] cdns-torrent-phy f000000.serdes: Timeout waiting for CMN ready
    [ 1.187057] phy phy-f000000.serdes.2: phy poweron failed --> -110
    [ 1.187079] j721e-pcie f102000.pcie: Failed to init phy
    [ H1.187308] j721e-pcie: probe of f102000.pcie failed with error -110

    BR Rio

  • Rio,

    We can also find the same error on the TI webpage 

    This link opens the CI/CD homepage, what am I supposed to look at there?

    Please attach the board dtb file here for review.

  • Hi Bin,

    There is the board dtb file:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    /dts-v1/;
    / {
    model = "Moxa UC-1200A UC-2200A";
    compatible = "ti,am642";
    interrupt-parent = <0x01>;
    #address-cells = <0x02>;
    #size-cells = <0x02>;
    aliases {
    serial0 = "/bus@f4000/bus@4000000/serial@4a00000";
    serial1 = "/bus@f4000/bus@4000000/serial@4a10000";
    serial2 = "/bus@f4000/serial@2800000";
    serial3 = "/bus@f4000/serial@2810000";
    serial4 = "/bus@f4000/serial@2820000";
    serial5 = "/bus@f4000/serial@2830000";
    serial6 = "/bus@f4000/serial@2840000";
    serial7 = "/bus@f4000/serial@2850000";
    serial8 = "/bus@f4000/serial@2860000";
    ethernet0 = "/bus@f4000/ethernet@8000000/ethernet-ports/port@1";
    ethernet1 = "/bus@f4000/ethernet@8000000/ethernet-ports/port@2";
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Thanks,

    Sean

  • Hi Sean,

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    ti,usb2-only;
    usb@f400000 {
    compatible = "cdns,usb3";
    reg = <0x00 0xf400000 0x00 0x10000 0x00 0xf410000 0x00 0x10000 0x00 0xf420000 0x00 0x10000>;
    reg-names = "otg\0xhci\0dev";
    interrupts = <0x00 0xbc 0x04 0x00 0xc2 0x04 0x00 0xc4 0x04>;
    interrupt-names = "host\0peripheral\0otg";
    maximum-speed = "super-speed";
    dr_mode = "host";
    pinctrl-names = "default";
    pinctrl-0 = <0x35>;
    phys = <0x36>;
    phy-names = "cdns3,usb3-phy";
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    I doubt this is related to the original USB issue, but I am not sure this USB device tree is correct, since I never experimented it. the Serdes (usb3-phy) is configured to USB, but "ti,usb2-only" is also specified. Both seems to be a conflict.

    If your USB port is designed to be a USB3.0 port, you probably want to remove "ti,usb2-only" from the device tree. Or if you USB port is a USB2.0 port, you should remove the usb3-phy from the USB node, and disable the serdes0 and serdes_wiz0 nodes in device tree.

  • Hi Bin,

    I'm going to modify DTS and do a cold restart stress test to see if it works.

    Thanks,

    Sean

  • Hi Sean,

    Bin's currently out right now so it may be a little while before you hear from him but please let me know how it goes.

    Regards,

    Randolph