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.

DRA829J: Enable USB host in u-boot (and kernel)

Part Number: DRA829J
Other Parts Discussed in Thread: DRA821, TUSB8041, TDA4VM

Hello experts,

We have a custom board that has mimicked the BeagleBoneAI64 in its layout with usb-hub and two host ports connected to that hub.

I am trying to get those two ports functioning in U-boot (Linux will follow) to verify that the hardware is correct.

I have copied the usb-related blocks in the dts:

    main_usbss1_pins_default: main-usbss1-pins-default {
        pinctrl-single,pins = <
            J721E_IOPAD(0x290, INPUT_DISABLE, 1) /* (U6) USB0_DRVVBUS.USB1_DRVVBUS */
        >;
    };
<snip>

    mcu_usbss1_pins_default: mcu-usbss1-pins-default {
        pinctrl-single,pins = <
            J721E_WKUP_IOPAD(0x3c, PIN_OUTPUT_PULLUP, 5) /* (A23) MCU_OSPI1_LBCLKO.WKUP_GPIO0_30 */
        >;
    };
<snip>
&usb_serdes_mux {
    idle-states = <1>, <1>; /* USB0 to SERDES3, USB1 to SERDES2 */
};

&serdes_ln_ctrl {
    idle-states = <J721E_SERDES0_LANE0_IP4_UNUSED>, <J721E_SERDES0_LANE1_IP4_UNUSED>,
                <J721E_SERDES1_LANE0_PCIE1_LANE0>, <J721E_SERDES1_LANE1_PCIE1_LANE1>,
                <J721E_SERDES2_LANE0_IP1_UNUSED>, <J721E_SERDES2_LANE1_USB3_1>,
                <J721E_SERDES3_LANE0_USB3_0_SWAP>, <J721E_SERDES3_LANE1_USB3_0>,
                <J721E_SERDES4_LANE0_EDP_LANE0>, <J721E_SERDES4_LANE1_EDP_LANE1>,
                <J721E_SERDES4_LANE2_EDP_LANE2>, <J721E_SERDES4_LANE3_EDP_LANE3>;
};
&serdes2 {
    serdes2_usb_link: phy@1 {
        reg = <1>;
        cdns,num-lanes = <1>;
        #phy-cells = <0>;
        cdns,phy-type = <PHY_TYPE_USB3>;
        resets = <&serdes_wiz2 2>;
    };
};

&usbss1 {
    pinctrl-names = "default";
    pinctrl-0 = <&main_usbss1_pins_default>, <&mcu_usbss1_pins_default>;
    ti,vbus-divider;
};

&usb1 {
    dr_mode = "host";
    maximum-speed = "super-speed";
    phys = <&serdes2_usb_link>;
    phy-names = "cdns3,usb3-phy";
};
In U-boot I see the following (logging is turned on):
=> usb start
starting USB...
Bus usb@6400000: drivers/usb/cdns3/core.c:337- cdns3_probe() cdns-usb3-host usb@6400000: Unable to get USB2 phy (ret -61)
drivers/clk/clk-uclass.c:112-clk_get_by_index_tail() prop: returning err=-2
drivers/clk/clk-uclass.c:112-clk_get_by_index_tail() prop: returning err=-2
drivers/clk/clk-uclass.c:112-clk_get_by_index_tail() prop: returning err=-2
drivers/clk/clk-uclass.c:112-clk_get_by_index_tail() prop: returning err=-2
drivers/phy/cadence/phy-cadence-sierra.c:1122-cdns_sierra_phy_probe() cdns,sierra serdes@5020000: PHY not found 0x7364 vs 0x0
drivers/usb/cdns3/core.c:345- cdns3_probe() cdns-usb3-host usb@6400000: Unable to get USB3 phy (ret -19)
drivers/usb/cdns3/drd.c:273- cdns3_drd_init() cdns-usb3-host usb@6400000: DRD version v1 (ID: 0004024e, rev: 00000200)
drivers/usb/cdns3/core.c:309-cdns3_hw_role_switch() cdns-usb3-host usb@6400000: set 1 has failed, back to 0
scanning bus usb@6400000 for devices... 1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
As always, I'm thankful for any help.
/Bo
  • Hi Bo 

    Do you want you usb host to work in usb3.0 in UBOOT or its ok if it works in USB2.0 ?

    can you share the dtb as well i want see what is the mode used for both of the USB subsystem.

    Regards
    Diwakar

  • USB2.0 would be fine in u-boot as well as in Linux.

    I couldn't upload the file here. Here is a link: https://easyupload.io/rviijo

    Thanks!

    /Bo

  • HI Bo 

    I would suggest you to remove the seredes configuration and configure the dtsi according to the USB 2.0 also you need to change the dr_mode from OTG to host.

    I couldn't upload the file here. Here is a link: https://easyupload.io/rviijo

    You can just do drag and drop here.

    Regards
    Diwakar

  • I'm sorry, I should have mentioned that we have an USBC port on usb0, so I can't remove the serdes blocks.

    usb0 is USBC for dfu

    usb0 is connected to a hub serving two usb-host type A ports according to the above.

    Best regards,

    /Bo 

  • HI Bo 

    I'm sorry, I should have mentioned that we have an USBC port on usb0, so I can't remove the serdes blocks.

    Serdes configuration is need if you want to support USB3.0 if you are ok with the USB  2.0

    you can remove the serdes configuration and can use usb2phy.

    Regards
    Diwakar

  • Serdes configuration is need if you want to support USB3.0 if you are ok with the USB  2.0

    you can remove the serdes configuration and can use usb2phy.

    That is new information for me. Thank you.

    Do you have an example of such a configuration?

    Regards,

    /Bo

  • Hi Bo 

    By default in DRA821(j7200) we not configuring the USB subsystem for USB3.0 you can take a reference from the j7200 dtsi 

    ref:k3-j7200-common-proc-board.dts

    do let me know if you still face any issue.

    Regards
    Diwakar

  • Diwakar,

    It turns out our host ports are indeed USB3 capable, so I guess serdes is needed. Here is a fragment of our schematic:

    The serdes3 connection is working fine. We can dfu properly through that usb port. The trouble I am having is with the top USB1 connection. It connects to the hub just as on BeagleBoneAI64.

    Can you confirm that our serdes2 settings look ok?

    Regards,

    /Bo

  • Hi Bo 

    As i said earlier if you are ok with USB2.0 on type c port you can remove the seredes configuration and can use usb2.0.

    The serdes3 connection is working fine. We can dfu properly through that usb port.

    even if you are not doing a serdes configuration still dfu can work as it uses high speed mode.

    The trouble I am having is with the top USB1 connection. It connects to the hub just as on BeagleBoneAI64.

    so you mean for you USB 1 is not coming up in the UBOOT what is the dr_mode set there also please share the dtb by just doing a drag and drop  i will take a look at it.

    Regards
    Diwakar

  • what is the dr_mode set there also please share the dtb by just doing a drag and drop  i will take a look at it.

    See first post. mode is set to "host".

    I'm sorry, either insert file or drag and drop works for me. Please use this link for the u-boot.dtb: https://easyupload.io/rviijo

    Best regards,

    /Bo

  • HI Bo

    I am not able to download the dtb from the link as the site is blocked for us.

    Regards
    Diwakar

  • 1830.u-boot.zip

    I was able to upload if I changed the file type to .zip. Please just change it back to .dtb after download.

    Best regards,

    /Bo

  • Hi Bo 

    not able to extract 

    can you try these changes 

    &usbss1 {
        pinctrl-names = "default";
        pinctrl-0 = <&main_usbss1_pins_default>, <&mcu_usbss1_pins_default>;
        ti,vbus-divider;
        ti,usb2-only
    };
    
    &usb1 {
        dr_mode = "host";
        maximum-speed = "high-speed";
    };

    Regards
    Diwakar

  • I have already tried those settings. They didn't help.

    Regarding the file, it is NOT a zip-file. Just rename the file from u-boot.zip to u-boot.dtb.

    Another hint might be this message when booting to Linux:

    [ 2.253543] cdns-sierra-phy 5020000.serdes: failed to get reset phy@0
    [ 2.260125] cdns-sierra-phy: probe of 5020000.serdes failed with error -16

    Best regards,

    /Bo

  • Hi Bo 

    I have already tried those settings. They didn't help.

    What is the error you were getting with these changes ?

    why the mode is peripheral ?

    Regards
    Diwakar

  • You are looking at the USBC port on usb0, which is working fine.

    Below, on address 0x6400000 you see usb1, which has dr_mode="host"

    Regards,

    /Bo

  • HI Bo 

    Below, on address 0x6400000 you see usb1, which has dr_mode="host"

    if you see the logs its already working 

    see the address usb@6400000  the controller is up and running 

    i dont know what exactly you want to achieve here , my understanding  was you want both the usb subsystem USB0,USB1 to be  accessible in uboot.

    Regards
    Diwakar

  • Right now I just want to confirm that the HW is ok, and that we can use the USB host ports, but no devices can be detected either in U-boot or in Linux.

    For example, on the BeagleBoneAI64, i can see this:

    debian@BeagleBone-AI64:~$ lsusb
    Bus 002 Device 002: ID 0451:8140 Texas Instruments, Inc. TUSB8041 4-Port Hub
    Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 001 Device 002: ID 0451:8142 Texas Instruments, Inc. TUSB8041 4-Port Hub
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

    On my board, nothing is being reported:

    root@asp3:~# lsusb
    root@asp3:~#

    As I wrote above, the probing seems to fail:

    [ 2.253543] cdns-sierra-phy 5020000.serdes: failed to get reset phy@0
    [ 2.260125] cdns-sierra-phy: probe of 5020000.serdes failed with error -16

    Regards,

    /Bo

  • Hi Bo 

    in uboot controller is up so you should see a usb device is there is no issue 

    in linux its failing because of some missing serdes configuration can you send me the full boot logs.

    Regards
    Diwakar

  • Diwakar,

    I'm not convinced that it is working in U-boot. Look at this log:

    Hit any key to stop autoboot: 0
    => usb start
    starting USB...
    Bus usb@6400000: drivers/usb/cdns3/core.c:337- cdns3_probe() cdns-usb3-host usb@6400000: Unable to get USB2 phy (ret -61)
    drivers/clk/clk-uclass.c:112-clk_get_by_index_tail() prop: returning err=-2
    drivers/clk/clk-uclass.c:112-clk_get_by_index_tail() prop: returning err=-2
    drivers/clk/clk-uclass.c:112-clk_get_by_index_tail() prop: returning err=-2
    drivers/clk/clk-uclass.c:112-clk_get_by_index_tail() prop: returning err=-2
    drivers/phy/cadence/phy-cadence-sierra.c:1122-cdns_sierra_phy_probe() cdns,sierra serdes@5020000: PHY not found 0x7364 vs 0x0
    drivers/usb/cdns3/core.c:345- cdns3_probe() cdns-usb3-host usb@6400000: Unable to get USB3 phy (ret -19)
    drivers/usb/cdns3/drd.c:273- cdns3_drd_init() cdns-usb3-host usb@6400000: DRD version v1 (ID: 0004024e, rev: 00000200)
    drivers/usb/cdns3/core.c:309-cdns3_hw_role_switch() cdns-usb3-host usb@6400000: set 1 has failed, back to 0
    scanning bus usb@6400000 for devices... 1 USB Device(s) found
    scanning usb for storage devices... 0 Storage Device(s) found
    => usb tree
    USB device tree:
    1 Hub (5 Gb/s, 0mA)
    U-Boot XHCI Host Controller

    =>

    You see that it is unable to probe serdes2 (5020000). The same is happening in Linux.

    This is the dmesg of Linux boot:

    root@asp3:~# dmesg
    [    0.000000] Booting Linux on physical CPU 0x0000000000 [0x411fd080]
    [    0.000000] Linux version 6.1.33-g999 (oe-user@oe-host) (aarch64-se3linux-linux-gcc (GCC) 11.3.0, GNU ld (GNU Binutils) 2.38.20220708) #1 SMP PREEMPT Fri Oct  6 12:04:07 UTC 2023
    [    0.000000] Machine model: Schneider Electric Automation Server Premium 3
    [    0.000000] efi: UEFI not found.
    [    0.000000] Reserved memory: created CMA memory pool at 0x00000000e0000000, size 512 MiB
    [    0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
    [    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
    [    0.000000] OF: reserved mem: initialized node r5f-dma-memory@a4000000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created DMA memory pool at 0x00000000a4100000, size 15 MiB
    [    0.000000] OF: reserved mem: initialized node r5f-memory@a4100000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created DMA memory pool at 0x00000000a5000000, size 1 MiB
    [    0.000000] OF: reserved mem: initialized node r5f-dma-memory@a5000000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created DMA memory pool at 0x00000000a5100000, size 15 MiB
    [    0.000000] OF: reserved mem: initialized node r5f-memory@a5100000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created DMA memory pool at 0x00000000a6000000, size 1 MiB
    [    0.000000] OF: reserved mem: initialized node c66-dma-memory@a6000000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created DMA memory pool at 0x00000000a6100000, size 15 MiB
    [    0.000000] OF: reserved mem: initialized node c66-memory@a6100000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created DMA memory pool at 0x00000000a7000000, size 1 MiB
    [    0.000000] OF: reserved mem: initialized node c66-dma-memory@a7000000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created DMA memory pool at 0x00000000a7100000, size 15 MiB
    [    0.000000] OF: reserved mem: initialized node c66-memory@a7100000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created DMA memory pool at 0x00000000a8000000, size 1 MiB
    [    0.000000] OF: reserved mem: initialized node c71-dma-memory@a8000000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created DMA memory pool at 0x00000000a8100000, size 15 MiB
    [    0.000000] OF: reserved mem: initialized node c71-memory@a8100000, compatible id shared-dma-pool
    [    0.000000] Zone ranges:
    [    0.000000]   DMA      [mem 0x0000000080000000-0x00000000ffffffff]
    [    0.000000]   DMA32    empty
    [    0.000000]   Normal   empty
    [    0.000000] Movable zone start for each node
    [    0.000000] Early memory node ranges
    [    0.000000]   node   0: [mem 0x0000000080000000-0x000000009e7fffff]
    [    0.000000]   node   0: [mem 0x000000009e800000-0x00000000a8ffffff]
    [    0.000000]   node   0: [mem 0x00000000a9000000-0x00000000a9ffffff]
    [    0.000000]   node   0: [mem 0x00000000aa000000-0x00000000abbfffff]
    [    0.000000]   node   0: [mem 0x00000000abc00000-0x00000000ffffffff]
    [    0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x00000000ffffffff]
    [    0.000000] psci: probing for conduit method from DT.
    [    0.000000] psci: PSCIv1.1 detected in firmware.
    [    0.000000] psci: Using standard PSCI v0.2 function IDs
    [    0.000000] psci: Trusted OS migration not required
    [    0.000000] psci: SMC Calling Convention v1.2
    [    0.000000] percpu: Embedded 19 pages/cpu s38312 r8192 d31320 u77824
    [    0.000000] pcpu-alloc: s38312 r8192 d31320 u77824 alloc=19*4096
    [    0.000000] pcpu-alloc: [0] 0 [0] 1
    [    0.000000] Detected PIPT I-cache on CPU0
    [    0.000000] CPU features: detected: GIC system register CPU interface
    [    0.000000] CPU features: detected: Spectre-v3a
    [    0.000000] CPU features: detected: Spectre-BHB
    [    0.000000] CPU features: detected: ARM erratum 1742098
    [    0.000000] CPU features: detected: ARM errata 1165522, 1319367, or 1530923
    [    0.000000] alternatives: applying boot alternatives
    [    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 516096
    [    0.000000] Kernel command line: console=ttyS2,115200n8 root=/dev/mmcblk0p1 rw rootfstype=ext4
    [    0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
    [    0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
    [    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
    [    0.000000] Memory: 1311740K/2097152K available (12224K kernel code, 1200K rwdata, 3984K rodata, 2112K init, 433K bss, 261124K reserved, 524288K cma-reserved)
    [    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
    [    0.000000] rcu: Preemptible hierarchical RCU implementation.
    [    0.000000] rcu:     RCU event tracing is enabled.
    [    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=2.
    [    0.000000]  Trampoline variant of Tasks RCU enabled.
    [    0.000000]  Tracing variant of Tasks RCU enabled.
    [    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
    [    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
    [    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
    [    0.000000] GICv3: GIC: Using split EOI/Deactivate mode
    [    0.000000] GICv3: 960 SPIs implemented
    [    0.000000] GICv3: 0 Extended SPIs implemented
    [    0.000000] Root IRQ handler: gic_handle_irq
    [    0.000000] GICv3: GICv3 features: 16 PPIs
    [    0.000000] GICv3: CPU0: found redistributor 0 region 0:0x0000000001900000
    [    0.000000] ITS [mem 0x01820000-0x0182ffff]
    [    0.000000] GIC: enabling workaround for ITS: Socionext Synquacer pre-ITS
    [    0.000000] ITS@0x0000000001820000: Devices Table too large, reduce ids 20->19
    [    0.000000] ITS@0x0000000001820000: allocated 524288 Devices @80800000 (flat, esz 8, psz 64K, shr 0)
    [    0.000000] ITS: using cache flushing for cmd queue
    [    0.000000] GICv3: using LPI property table @0x0000000080030000
    [    0.000000] GIC: using cache flushing for LPI property table
    [    0.000000] GICv3: CPU0: using allocated LPI pending table @0x0000000080040000
    [    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
    [    0.000000] arch_timer: cp15 timer(s) running at 200.00MHz (phys).
    [    0.000000] clocksource: arch_sys_counter: mask: 0x3ffffffffffffff max_cycles: 0x2e2049d3e8, max_idle_ns: 440795210634 ns
    [    0.000000] sched_clock: 58 bits at 200MHz, resolution 5ns, wraps every 4398046511102ns
    [    0.000216] Console: colour dummy device 80x25
    [    0.000246] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=800000)
    [    0.000252] pid_max: default: 32768 minimum: 301
    [    0.000274] LSM: Security Framework initializing
    [    0.000333] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
    [    0.000341] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
    [    0.001153] cblist_init_generic: Setting adjustable number of callback queues.
    [    0.001159] cblist_init_generic: Setting shift to 1 and lim to 1.
    [    0.001197] cblist_init_generic: Setting shift to 1 and lim to 1.
    [    0.001281] rcu: Hierarchical SRCU implementation.
    [    0.001283] rcu:     Max phase no-delay instances is 1000.
    [    0.001453] Platform MSI: msi-controller@1820000 domain created
    [    0.001628] PCI/MSI: /bus@100000/interrupt-controller@1800000/msi-controller@1820000 domain created
    [    0.001679] EFI services will not be available.
    [    0.001785] smp: Bringing up secondary CPUs ...
    [    0.010385] Detected PIPT I-cache on CPU1
    [    0.010452] GICv3: CPU1: found redistributor 1 region 0:0x0000000001920000
    [    0.010464] GICv3: CPU1: using allocated LPI pending table @0x0000000080050000
    [    0.010495] CPU1: Booted secondary processor 0x0000000001 [0x411fd080]
    [    0.010546] smp: Brought up 1 node, 2 CPUs
    [    0.010550] SMP: Total of 2 processors activated.
    [    0.010553] CPU features: detected: 32-bit EL0 Support
    [    0.010556] CPU features: detected: CRC32 instructions
    [    0.010592] CPU: All CPU(s) started at EL2
    [    0.010593] alternatives: applying system-wide alternatives
    [    0.011359] devtmpfs: initialized
    [    0.017321] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
    [    0.017336] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
    [    0.026311] pinctrl core: initialized pinctrl subsystem
    [    0.026655] DMI not present or invalid.
    [    0.026993] NET: Registered PF_NETLINK/PF_ROUTE protocol family
    [    0.027598] DMA: preallocated 256 KiB GFP_KERNEL pool for atomic allocations
    [    0.027673] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
    [    0.027751] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
    [    0.027973] thermal_sys: Registered thermal governor 'step_wise'
    [    0.027975] thermal_sys: Registered thermal governor 'power_allocator'
    [    0.027994] cpuidle: using governor menu
    [    0.028083] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
    [    0.028110] ASID allocator initialised with 65536 entries
    [    0.038271] KASLR disabled due to lack of seed
    [    0.041262] HugeTLB: registered 1.00 GiB page size, pre-allocated 0 pages
    [    0.041266] HugeTLB: 0 KiB vmemmap can be freed for a 1.00 GiB page
    [    0.041269] HugeTLB: registered 32.0 MiB page size, pre-allocated 0 pages
    [    0.041271] HugeTLB: 0 KiB vmemmap can be freed for a 32.0 MiB page
    [    0.041273] HugeTLB: registered 2.00 MiB page size, pre-allocated 0 pages
    [    0.041275] HugeTLB: 0 KiB vmemmap can be freed for a 2.00 MiB page
    [    0.041278] HugeTLB: registered 64.0 KiB page size, pre-allocated 0 pages
    [    0.041280] HugeTLB: 0 KiB vmemmap can be freed for a 64.0 KiB page
    [    0.042098] k3-chipinfo 43000014.chipid: Family:J721E rev:SR2.0 JTAGID[0x1bb6402f] Detected
    [    0.042907] iommu: Default domain type: Translated
    [    0.042912] iommu: DMA domain TLB invalidation policy: strict mode
    [    0.043033] SCSI subsystem initialized
    [    0.043112] usbcore: registered new interface driver usbfs
    [    0.043126] usbcore: registered new interface driver hub
    [    0.043140] usbcore: registered new device driver usb
    [    0.043284] mc: Linux media interface: v0.10
    [    0.043292] videodev: Linux video capture interface: v2.00
    [    0.043317] pps_core: LinuxPPS API ver. 1 registered
    [    0.043319] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [    0.043324] PTP clock support registered
    [    0.043342] EDAC MC: Ver: 3.0.0
    [    0.043702] FPGA manager framework
    [    0.043732] Advanced Linux Sound Architecture Driver Initialized.
    [    0.044163] clocksource: Switched to clocksource arch_sys_counter
    [    0.044266] VFS: Disk quotas dquot_6.6.0
    [    0.044285] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
    [    0.047101] NET: Registered PF_INET protocol family
    [    0.047264] IP idents hash table entries: 32768 (order: 6, 262144 bytes, linear)
    [    0.048062] tcp_listen_portaddr_hash hash table entries: 1024 (order: 2, 16384 bytes, linear)
    [    0.048077] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
    [    0.048084] TCP established hash table entries: 16384 (order: 5, 131072 bytes, linear)
    [    0.048294] TCP bind hash table entries: 16384 (order: 7, 524288 bytes, linear)
    [    0.048791] TCP: Hash tables configured (established 16384 bind 16384)
    [    0.048867] UDP hash table entries: 1024 (order: 3, 32768 bytes, linear)
    [    0.048891] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes, linear)
    [    0.048994] NET: Registered PF_UNIX/PF_LOCAL protocol family
    [    0.049250] RPC: Registered named UNIX socket transport module.
    [    0.049254] RPC: Registered udp transport module.
    [    0.049256] RPC: Registered tcp transport module.
    [    0.049258] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [    0.049262] NET: Registered PF_XDP protocol family
    [    0.049273] PCI: CLS 0 bytes, default 64
    [    0.049625] hw perfevents: enabled with armv8_cortex_a72 PMU driver, 7 counters available
    [    0.050330] Initialise system trusted keyrings
    [    0.050442] workingset: timestamp_bits=46 max_order=19 bucket_order=0
    [    0.052422] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [    0.052681] NFS: Registering the id_resolver key type
    [    0.052695] Key type id_resolver registered
    [    0.052697] Key type id_legacy registered
    [    0.052721] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
    [    0.052724] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
    [    0.052816] 9p: Installing v9fs 9p2000 file system support
    [    0.072213] Key type asymmetric registered
    [    0.072216] Asymmetric key parser 'x509' registered
    [    0.072245] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 243)
    [    0.072248] io scheduler mq-deadline registered
    [    0.072251] io scheduler kyber registered
    [    0.074105] pinctrl-single 4301c000.pinctrl: 94 pins, size 376
    [    0.074333] pinctrl-single 11c000.pinctrl: 173 pins, size 692
    [    0.074764] pinctrl-single a40000.pinctrl: 512 pins, size 2048
    [    0.078529] Serial: 8250/16550 driver, 10 ports, IRQ sharing enabled
    [    0.080205] arm-smmu-v3 36600000.iommu: ias 48-bit, oas 48-bit (features 0x00001faf)
    [    0.080462] arm-smmu-v3 36600000.iommu: allocated 65536 entries for cmdq
    [    0.080709] arm-smmu-v3 36600000.iommu: allocated 32768 entries for evtq
    [    0.081720] arm-smmu-v3 36600000.iommu: msi_domain absent - falling back to wired irqs
    [    0.085441] brd: module loaded
    [    0.087393] loop: module loaded
    [    0.087841] megasas: 07.719.03.00-rc1
    [    0.089446] tun: Universal TUN/TAP device driver, 1.6
    [    0.089732] igbvf: Intel(R) Gigabit Virtual Function Network Driver
    [    0.089735] igbvf: Copyright (c) 2009 - 2012 Intel Corporation.
    [    0.089764] sky2: driver version 1.30
    [    0.090128] VFIO - User Level meta-driver version: 0.3
    [    0.090615] usbcore: registered new interface driver usb-storage
    [    0.090758] i2c_dev: i2c /dev entries driver
    [    0.091438] sdhci: Secure Digital Host Controller Interface driver
    [    0.091441] sdhci: Copyright(c) Pierre Ossman
    [    0.091583] sdhci-pltfm: SDHCI platform and OF driver helper
    [    0.092178] ledtrig-cpu: registered to indicate activity on CPUs
    [    0.092248] SMCCC: SOC_ID: ARCH_SOC_ID not implemented, skipping ....
    [    0.092398] usbcore: registered new interface driver usbhid
    [    0.092400] usbhid: USB HID core driver
    [    0.093052] optee: probing for conduit method.
    [    0.093068] optee: revision 3.20 (8e74d476)
    [    0.109482] optee: dynamic shared memory is enabled
    [    0.109696] optee: initialized driver
    [    0.111099] NET: Registered PF_PACKET protocol family
    [    0.111167] 9pnet: Installing 9P2000 support
    [    0.111199] Key type dns_resolver registered
    [    0.111460] Loading compiled-in X.509 certificates
    [    0.117447] ti-sci 44083000.system-controller: ABI: 3.1 (firmware rev 0x0009 '9.0.6--v09.00.06 (Kool Koala)')
    [    0.176804] hwmon hwmon0: temp1_input not attached to any thermal zone
    [    0.176813] lm75 0-0048: hwmon0: sensor 'lm75'
    [    0.176847] omap_i2c 40b00000.i2c: bus 0 rev0.12 at 100 kHz
    [    0.177662] omap_i2c 42120000.i2c: bus 1 rev0.12 at 400 kHz
    [    0.201221] rtc-rx8010 2-0032: registered as rtc0
    [    0.201620] rtc-rx8010 2-0032: setting system clock to 2023-10-06T12:20:30 UTC (1696594830)
    [    0.201651] omap_i2c 2010000.i2c: bus 2 rev0.12 at 400 kHz
    [    0.201852] ti-sci-intr 42200000.interrupt-controller: Interrupt Router 137 domain created
    [    0.201954] ti-sci-intr bus@100000:interrupt-controller@a00000: Interrupt Router 131 domain created
    [    0.202051] ti-sci-intr 310e0000.interrupt-controller: Interrupt Router 213 domain created
    [    0.202222] ti-sci-inta 33d00000.interrupt-controller: Interrupt Aggregator domain 209 created
    [    0.210947] k3-ringacc 2b800000.ringacc: Ring Accelerator probed rings:286, gp-rings[96,20] sci-dev-id:235
    [    0.210955] k3-ringacc 2b800000.ringacc: dma-ring-reset-quirk: disabled
    [    0.210958] k3-ringacc 2b800000.ringacc: RA Proxy rev. 66346100, num_proxies:64
    [    0.212571] k3-ringacc 3c000000.ringacc: Ring Accelerator probed rings:1024, gp-rings[440,150] sci-dev-id:211
    [    0.212578] k3-ringacc 3c000000.ringacc: dma-ring-reset-quirk: disabled
    [    0.212580] k3-ringacc 3c000000.ringacc: RA Proxy rev. 66346100, num_proxies:64
    [    0.213121] printk: console [ttyS2] disabled
    [    0.213155] 2800000.serial: ttyS2 at MMIO 0x2800000 (irq = 191, base_baud = 3000000) is a 8250
    [    1.792972] printk: console [ttyS2] enabled
    [    1.797683] 2810000.serial: ttyS3 at MMIO 0x2810000 (irq = 192, base_baud = 3000000) is a 8250
    [    1.806737] 2820000.serial: ttyS4 at MMIO 0x2820000 (irq = 193, base_baud = 3000000) is a 8250
    [    1.815824] 2850000.serial: ttyS7 at MMIO 0x2850000 (irq = 194, base_baud = 3000000) is a 8250
    [    1.827846] am65-cpsw-nuss c000000.ethernet: initializing am65 cpsw nuss version 0x6BA01901, cpsw version 0x6BA80101 Ports: 9 quirks:00000000
    [    1.829647] tpm_tis_spi spi1.0: 2.0 TPM (device-id 0x0, rev-id 78)
    [    1.840632] am65-cpsw-nuss c000000.ethernet: Use random MAC address
    [    1.853000] am65-cpsw-nuss c000000.ethernet: Use random MAC address
    [    1.859309] am65-cpsw-nuss c000000.ethernet: Use random MAC address
    [    1.865573] am65-cpsw-nuss c000000.ethernet: initialized cpsw ale version 1.4
    [    1.872691] am65-cpsw-nuss c000000.ethernet: ALE Table size 512
    [    1.878999] am65-cpsw-nuss c000000.ethernet: CPTS ver 0x4e8a010a, freq:200000000, add_val:4 pps:0
    [    1.890301] am65-cpts 310d0000.cpts: CPTS ver 0x4e8a010a, freq:200000000, add_val:4 pps:0
    [    2.000535] mmc0: CQHCI version 5.10
    [    2.005534] omap-mailbox 31f80000.mailbox: omap mailbox rev 0x66fc7100
    [    2.012373] omap-mailbox 31f81000.mailbox: omap mailbox rev 0x66fc7100
    [    2.019196] omap-mailbox 31f82000.mailbox: omap mailbox rev 0x66fc7100
    [    2.025998] omap-mailbox 31f83000.mailbox: omap mailbox rev 0x66fc7100
    [    2.032827] omap-mailbox 31f84000.mailbox: omap mailbox rev 0x66fc7100
    [    2.043963] ti-udma 285c0000.dma-controller: Channels: 26 (tchan: 13, rchan: 13, gp-rflow: 8)
    [    2.052504] mmc0: SDHCI controller on 4f80000.mmc [4f80000.mmc] using ADMA 64-bit
    [    2.062314] ti-udma 31150000.dma-controller: Channels: 122 (tchan: 61, rchan: 61, gp-rflow: 16)
    [    2.074328] 40a00000.serial: ttyS1 at MMIO 0x40a00000 (irq = 620, base_baud = 6000000) is a 8250
    [    2.083689] 2840000.serial: ttyS6 at MMIO 0x2840000 (irq = 621, base_baud = 3000000) is a 8250
    [    2.092767] 2860000.serial: ttyS8 at MMIO 0x2860000 (irq = 622, base_baud = 3000000) is a 8250
    [    2.101860] 2870000.serial: ttyS9 at MMIO 0x2870000 (irq = 623, base_baud = 3000000) is a 8250
    [    2.112954] spi-nor spi2.0: unrecognized JEDEC id bytes: ff ff ff ff ff ff
    [    2.122303] spi-nor spi3.0: s25fl128l (16384 Kbytes)
    [    2.127321] 9 fixed-partitions partitions found on MTD device 47050000.spi.0
    [    2.134359] Creating 9 MTD partitions on "47050000.spi.0":
    [    2.139830] 0x000000000000-0x000000080000 : "qspi.tiboot3"
    [    2.145851] 0x000000080000-0x000000280000 : "qspi.tispl"
    [    2.151607] 0x000000280000-0x000000680000 : "qspi.u-boot"
    [    2.157448] 0x000000680000-0x0000006a0000 : "qspi.env"
    [    2.163070] 0x0000006a0000-0x0000006c0000 : "qspi.env.backup"
    [    2.169291] 0x0000006c0000-0x0000007c0000 : "qspi.sysfw"
    [    2.175042] 0x0000007c0000-0x0000007d0000 : "qspi.manufacture"
    [    2.181325] 0x0000007d0000-0x0000007e0000 : "qspi.knut-settings"
    [    2.187853] 0x0000007e0000-0x000000800000 : "qspi.oops"
    [    2.194419] davinci_mdio c000f00.mdio: Configuring MDIO in manual mode
    [    2.205652] mmc0: Command Queue Engine enabled
    [    2.210097] mmc0: new HS200 MMC card at address 0001
    [    2.215378] mmcblk0: mmc0:0001 G1M15L 29.6 GiB
    [    2.221831]  mmcblk0: p1
    [    2.224678] mmcblk0boot0: mmc0:0001 G1M15L 31.5 MiB
    [    2.230276] mmcblk0boot1: mmc0:0001 G1M15L 31.5 MiB
    [    2.235798] mmcblk0rpmb: mmc0:0001 G1M15L 4.00 MiB, chardev (237:0)
    [    2.242072] davinci_mdio c000f00.mdio: davinci mdio revision 9.7, bus freq 1000000
    [    2.252770] davinci_mdio c000f00.mdio: phy[0]: device c000f00.mdio:00, driver TI DP83867
    [    2.260850] davinci_mdio c000f00.mdio: phy[4]: device c000f00.mdio:04, driver TI DP83822
    [    2.268921] davinci_mdio c000f00.mdio: phy[5]: device c000f00.mdio:05, driver TI DP83822
    [    2.277019] am65-cpsw-nuss c000000.ethernet: initializing am65 cpsw nuss version 0x6BA01901, cpsw version 0x6BA80101 Ports: 9 quirks:00000000
    [    2.289809] am65-cpsw-nuss c000000.ethernet: Use random MAC address
    [    2.296123] am65-cpsw-nuss c000000.ethernet: Use random MAC address
    [    2.302427] am65-cpsw-nuss c000000.ethernet: Use random MAC address
    [    2.308688] am65-cpsw-nuss c000000.ethernet: initialized cpsw ale version 1.4
    [    2.315807] am65-cpsw-nuss c000000.ethernet: ALE Table size 512
    [    2.322121] am65-cpsw-nuss c000000.ethernet: CPTS ver 0x4e8a010a, freq:200000000, add_val:4 pps:0
    [    2.333270] am65-cpsw-nuss c000000.ethernet: set new flow-id-base 140
    [    2.343976] debugfs: Directory 'pd:242' with parent 'pm_genpd' already present!
    [    2.351348] debugfs: Directory 'pd:241' with parent 'pm_genpd' already present!
    [    2.358676] debugfs: Directory 'pd:240' with parent 'pm_genpd' already present!
    [    2.365983] debugfs: Directory 'pd:239' with parent 'pm_genpd' already present!
    [    2.384537] ALSA device list:
    [    2.387497]   No soundcards found.
    [    2.404583] EXT4-fs (mmcblk0p1): recovery complete
    [    2.409755] EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. Quota mode: none.
    [    2.418297] VFS: Mounted root (ext4 filesystem) on device 179:1.
    [    2.424993] devtmpfs: mounted
    [    2.428976] Freeing unused kernel memory: 2112K
    [    2.433594] Run /sbin/init as init process
    [    2.437684]   with arguments:
    [    2.437686]     /sbin/init
    [    2.437688]   with environment:
    [    2.437690]     HOME=/
    [    2.437692]     TERM=linux
    [    2.523324] NET: Registered PF_INET6 protocol family
    [    2.528883] Segment Routing with IPv6
    [    2.532564] In-situ OAM (IOAM) with IPv6
    [    2.547671] systemd[1]: systemd 250.5+ running in system mode (-PAM -AUDIT -SELINUX -APPARMOR +IMA -SMACK +SECCOMP -GCRYPT -GNUTLS -OPENSSL +ACL +BLKID -CURL -ELFUTILS -FIDO2 -IDN2 -IDN -IPTC +KMOD -LIBCRYPTSETUP +LIBFDISK -PCRE2 -PWQUALITY -P11KIT -QRENCODE -BZIP2 -LZ4 -XZ -ZLIB +ZSTD -BPF_FRAMEWORK +XKBCOMMON +UTMP +SYSVINIT default-hierarchy=hybrid)
    [    2.579049] systemd[1]: Detected architecture arm64.
    [    2.660458] systemd[1]: Hostname set to <asp3>.
    [    2.843657] systemd[1]: Queued start job for default target Multi-User System.
    [    2.878801] systemd[1]: Created slice Slice /system/getty.
    [    2.901273] systemd[1]: Created slice Slice /system/modprobe.
    [    2.925115] systemd[1]: Created slice Slice /system/serial-getty.
    [    2.948938] systemd[1]: Created slice User and Session Slice.
    [    2.972383] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
    [    2.996311] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
    [    3.020320] systemd[1]: Reached target Path Units.
    [    3.036228] systemd[1]: Reached target Remote File Systems.
    [    3.056215] systemd[1]: Reached target Slice Units.
    [    3.072227] systemd[1]: Reached target Swaps.
    [    3.126305] systemd[1]: Listening on RPCbind Server Activation Socket.
    [    3.148297] systemd[1]: Reached target RPC Port Mapper.
    [    3.168572] systemd[1]: Listening on Syslog Socket.
    [    3.184369] systemd[1]: Listening on initctl Compatibility Named Pipe.
    [    3.210343] systemd[1]: Journal Audit Socket was skipped because of a failed condition check (ConditionSecurity=audit).
    [    3.221514] systemd[1]: Listening on Journal Socket (/dev/log).
    [    3.244532] systemd[1]: Listening on Journal Socket.
    [    3.260587] systemd[1]: Listening on Network Service Netlink Socket.
    [    3.284568] systemd[1]: Listening on udev Control Socket.
    [    3.304403] systemd[1]: Listening on udev Kernel Socket.
    [    3.324441] systemd[1]: Listening on User Database Manager Socket.
    [    3.364470] systemd[1]: Mounting Huge Pages File System...
    [    3.382333] systemd[1]: Mounting POSIX Message Queue File System...
    [    3.406348] systemd[1]: Mounting Kernel Debug File System...
    [    3.424425] systemd[1]: Kernel Trace File System was skipped because of a failed condition check (ConditionPathExists=/sys/kernel/tracing).
    [    3.439381] systemd[1]: Mounting Temporary Directory /tmp...
    [    3.456412] systemd[1]: Create List of Static Device Nodes was skipped because of a failed condition check (ConditionFileNotEmpty=/lib/modules/6.1.33-g999/modules.devname).
    [    3.496613] systemd[1]: Starting Load Kernel Module configfs...
    [    3.514479] systemd[1]: Starting Load Kernel Module drm...
    [    3.530539] systemd[1]: Starting Load Kernel Module fuse...
    [    3.552144] systemd[1]: Starting Start psplash boot splash screen...
    [    3.579139] systemd[1]: Starting RPC Bind...
    [    3.592391] systemd[1]: File System Check on Root Device was skipped because of a failed condition check (ConditionPathIsReadWrite=!/).
    [    3.628650] systemd[1]: Starting Journal Service...
    [    3.645726] systemd[1]: Load Kernel Modules was skipped because all trigger condition checks failed.
    [    3.657272] systemd[1]: Mounting NFSD configuration filesystem...
    [    3.682673] systemd[1]: Starting Generate network units from Kernel command line...
    [    3.710568] systemd[1]: Starting Remount Root and Kernel File Systems...
    [    3.726542] EXT4-fs (mmcblk0p1): re-mounted. Quota mode: none.
    [    3.748894] systemd[1]: Starting Apply Kernel Variables...
    [    3.770665] systemd[1]: Starting Coldplug All udev Devices...
    [    3.796134] systemd[1]: Started RPC Bind.
    [    3.820742] systemd[1]: Started Journal Service.
    [    4.173685] systemd-journald[154]: Received client request to flush runtime journal.
    [    4.188475] systemd-journald[154]: File /var/log/journal/e6bb18b00c694f1083a6dc4591984366/system.journal corrupted or uncleanly shut down, renaming and replacing.
    [    5.316187] random: crng init done
    [    5.658765] am65-cpsw-nuss c000000.ethernet eth2: PHY [c000f00.mdio:04] driver [TI DP83822] (irq=POLL)
    [    5.658784] am65-cpsw-nuss c000000.ethernet eth2: configuring for phy/rgmii-rxid link mode
    [    5.676845] am65-cpsw-nuss c000000.ethernet eth1: PHY [c000f00.mdio:00] driver [TI DP83867] (irq=POLL)
    [    5.676863] am65-cpsw-nuss c000000.ethernet eth1: configuring for phy/rgmii-id link mode
    [    5.691815] am65-cpsw-nuss c000000.ethernet eth0: PHY [c000f00.mdio:05] driver [TI DP83822] (irq=POLL)
    [    5.691833] am65-cpsw-nuss c000000.ethernet eth0: configuring for phy/rgmii-rxid link mode
    [    8.764698] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
    [    8.767875] am65-cpsw-nuss c000000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
    

    lsusb shows nothing.

    Regards,

    /Bo

  • Any ideas? Still struggling here.

    /Bo

  • Hi Bo 

    Currently occupied with the other high priority task give me a week i wiil try to respond on this.

    Regards
    Diwakar

  • Hi Diwakar,

    Ouch, that hurts. The HW teams sets the layout for the next engineering prototype this Wednesday and I have yet to give them an OK on the USB host solution.

    Are there any other USB/Serdes experts that can assist?

    Best regards,

    /Bo

  • Hi Bo 

    Understood  your concern i will try to analyze the logs and will respond to you as earliest .

    Regards
    Diwakar

  • Hi Bo 

    i am not seeing any serdes related logs in the logs which you shared above can you cross verify that.

    Regards
    Diwakar

  • i am not seeing any serdes related logs in the logs which you shared above can you cross verify that.

    Correct. When booting into Linux, I don't see anything serdes-related. Should I see anything?

    Comparing with the BeagleBone, there are no serdes stuff in dmesg either, but there I can see the hub and devices connected with "lsusb".

    Regards,

    /Bo

  • HI Bo 

    can you do lsmod and see if any driver is getting loaded or not .

    can you send me the BegleBone logs as well .

    Regards
    Diwakar

  • Diwakar,

    There are drivers being loaded at boot. I build them not as modules but into the kernel:

    root@asp3:~# dmesg | grep usb
    [ 0.041223] usbcore: registered new interface driver usbfs
    [ 0.041240] usbcore: registered new interface driver hub
    [ 0.041251] usbcore: registered new device driver usb
    [ 0.089255] usbcore: registered new interface driver usb-storage
    [ 0.091214] usbcore: registered new interface driver usbhid
    [ 0.091217] usbhid: USB HID core driver

    On Beaglebone:

    debian@BeagleBone-AI64:~$ lsmod
    Module                  Size  Used by
    xt_conntrack           16384  1
    nft_chain_nat          16384  3
    xt_MASQUERADE          20480  1
    nf_nat                 40960  2 nft_chain_nat,xt_MASQUERADE
    nf_conntrack_netlink    49152  0
    nf_conntrack          143360  4 xt_conntrack,nf_nat,nf_conntrack_netlink,xt_MASQUERADE
    nf_defrag_ipv6         24576  1 nf_conntrack
    nf_defrag_ipv4         16384  1 nf_conntrack
    xfrm_user              40960  1
    xfrm_algo              16384  1 xfrm_user
    nft_counter            16384  15
    xt_addrtype            16384  2
    nft_compat             20480  4
    nf_tables             184320  43 nft_compat,nft_counter,nft_chain_nat
    nfnetlink              20480  4 nft_compat,nf_conntrack_netlink,nf_tables
    br_netfilter           32768  0
    bridge                217088  1 br_netfilter
    stp                    20480  1 bridge
    llc                    20480  2 bridge,stp
    rpmsg_char             24576  0
    virtio_rpmsg_bus       24576  0
    cdns_csi2rx            24576  0
    v4l2_fwnode            24576  1 cdns_csi2rx
    aufs                  241664  0
    at24                   24576  0
    ti_am335x_adc          24576  0
    ti_k3_r5_remoteproc    32768  0
    irq_pruss_intc         20480  0
    vxd_dec               282624  0
    pvrsrvkm             1236992  0
    vxe_enc               274432  0
    sa2ul                  40960  0
    authenc                16384  1 sa2ul
    ti_k3_dsp_remoteproc    24576  0
    j721e_csi2rx           28672  0
    videobuf2_dma_sg       24576  2 vxe_enc,vxd_dec
    pci_endpoint_test      24576  0
    v4l2_mem2mem           28672  2 vxe_enc,vxd_dec
    videobuf2_dma_contig    24576  2 j721e_csi2rx,vxd_dec
    extcon_usbc_tusb322    20480  0
    gb_uart                24576  0
    gb_spi                 20480  0
    gb_raw                 16384  0
    gb_netlink             16384  0
    gb_loopback            28672  0
    gb_log                 20480  0
    gb_i2c                 20480  0
    gb_hid                 20480  0
    gb_gpio                24576  0
    gb_gbphy               20480  4 gb_spi,gb_uart,gb_i2c,gb_gpio
    gb_firmware            36864  0
    gb_spilib              16384  2 gb_spi,gb_firmware
    gb_bootrom             20480  0
    rti_wdt                20480  0
    greybus               118784  13 gb_bootrom,gb_spi,gb_raw,gb_log,gb_hid,gb_netlink,gb_uart,gb_i2c,gb_firmware,gb_gbphy,gb_gpio,gb_loopback,gb_spilib
    wpanusb                24576  0
    ieee802154_socket      28672  0
    mac802154              77824  1 wpanusb
    uio_pdrv_genirq        20480  0
    uio                    24576  1 uio_pdrv_genirq
    sg                     49152  0
    ieee802154             81920  2 ieee802154_socket,mac802154
    pru_rproc              28672  0
    icss_iep               24576  0
    ti_j721e_cpsw_virt_mac    36864  0
    crct10dif_ce           20480  1
    rpmsg_kdrv             24576  1 ti_j721e_cpsw_virt_mac
    uas                    28672  0
    usb_storage            73728  1 uas
    ti_am335x_tscadc       20480  1 ti_am335x_adc
    pruss                  20480  1 pru_rproc
    cdns_dphy              16384  0
    debian@BeagleBone-AI64:~$ lsusb
    Bus 002 Device 002: ID 0451:8140 Texas Instruments, Inc. TUSB8041 4-Port Hub
    Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 001 Device 002: ID 0451:8142 Texas Instruments, Inc. TUSB8041 4-Port Hub
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    

    and the boot log:

    debian@BeagleBone-AI64:~$ dmesg | grep usb
    [    0.071677] usbcore: registered new interface driver usbfs
    [    0.071690] usbcore: registered new interface driver hub
    [    0.071702] usbcore: registered new device driver usb
    [    0.873447] usbcore: registered new interface driver usbhid
    [    0.873449] usbhid: USB HID core driver
    [    1.243932] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.10
    [    1.243935] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [    1.243938] usb usb1: Product: xHCI Host Controller
    [    1.243940] usb usb1: Manufacturer: Linux 5.10.168-ti-arm64-r111 xhci-hcd
    [    1.243942] usb usb1: SerialNumber: xhci-hcd.0.auto
    [    1.244358] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
    [    1.244417] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.10
    [    1.244420] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [    1.244423] usb usb2: Product: xHCI Host Controller
    [    1.244425] usb usb2: Manufacturer: Linux 5.10.168-ti-arm64-r111 xhci-hcd
    [    1.244427] usb usb2: SerialNumber: xhci-hcd.0.auto
    [    1.981349] usb 1-1: new high-speed USB device number 2 using xhci-hcd
    [    2.129717] usb 1-1: New USB device found, idVendor=0451, idProduct=8142, bcdDevice= 1.00
    [    2.129720] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=1
    [    2.129723] usb 1-1: SerialNumber: F70C006943F5
    [    2.257364] usb 2-1: new SuperSpeed Gen 1 USB device number 2 using xhci-hcd
    [    2.277571] usb 2-1: New USB device found, idVendor=0451, idProduct=8140, bcdDevice= 1.00
    [    2.277575] usb 2-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
    [    2.417375] usb 1-1.2: new high-speed USB device number 3 using xhci-hcd
    [    2.531615] usb 1-1.2: New USB device found, idVendor=13fe, idProduct=4123, bcdDevice= 1.00
    [    2.531621] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [    2.531624] usb 1-1.2: Product: USB DISK Pro
    [    2.531626] usb 1-1.2: Manufacturer:
    [    2.531628] usb 1-1.2: SerialNumber: 07103C7537156A52
    [    5.260976] usb-storage 1-1.2:1.0: USB Mass Storage device detected
    [    5.276068] scsi host0: usb-storage 1-1.2:1.0
    [    5.276330] usbcore: registered new interface driver usb-storage
    [    5.289671] usbcore: registered new interface driver uas
    [    9.306771] usbcore: registered new interface driver wpanusb
    [   15.629443] usb0: HOST MAC 24:76:25:a0:d8:d9
    [   15.629450] usb0: MAC 24:76:25:a0:d8:da
    [   15.629730] usb1: HOST MAC 24:76:25:a0:d8:db
    [   15.629734] usb1: MAC 24:76:25:a0:d8:dc
    [ 1033.540969] usb 1-1.2: USB disconnect, device number 3
    

    Best regards,

    /Bo

  • Update: when I measure the USB1_DRVVBUS it is always 0. What might cause this?

    Regards,

    /Bo

  • Another update:

    I can now get the host ports to work i u-boot by forcing them to USB2.0:

    &usbss1 {
        pinctrl-names = "default";
        pinctrl-0 = <&main_usbss1_pins_default>;
        ti,vbus-divider;
        ti,usb2-only;
    };
     
    This results in the following, in U-Boot:
    => usb start
    starting USB...
    Bus usb@6400000: drivers/usb/cdns3/core.c:337- cdns3_probe() cdns-usb3-host usb@6400000: Unable to get USB2 phy (ret -61)
    drivers/clk/clk-uclass.c:112-clk_get_by_index_tail() prop: returning err=-2
    drivers/clk/clk-uclass.c:112-clk_get_by_index_tail() prop: returning err=-2
    drivers/clk/clk-uclass.c:112-clk_get_by_index_tail() prop: returning err=-2
    drivers/clk/clk-uclass.c:112-clk_get_by_index_tail() prop: returning err=-2
    drivers/phy/cadence/phy-cadence-sierra.c:1122-cdns_sierra_phy_probe() cdns,sierra serdes@5020000: PHY not found 0x7364 vs 0x0
    drivers/usb/cdns3/core.c:345- cdns3_probe() cdns-usb3-host usb@6400000: Unable to get USB3 phy (ret -19)
    drivers/usb/cdns3/drd.c:273- cdns3_drd_init() cdns-usb3-host usb@6400000: DRD version v1 (ID: 0004024e, rev: 00000200)
    Register 2000840 NbrPorts 2
    Starting the controller
    USB XHCI 1.00
    scanning bus usb@6400000 for devices... 3 USB Device(s) found

    scanning usb for storage devices... 1 Storage Device(s) found
    => usb tree
    USB device tree:
      1 Hub (5 Gb/s, 0mA)
      | U-Boot XHCI Host Controller
      |
      +-2 Hub (480 Mb/s, 0mA)
        |   3001008138CE
        |
        +-3 Mass Storage (480 Mb/s, 200mA)
                     USB DISK Pro 07103C7537156A52
    If I remove the usb2-only, U-Boot hangs on usb start:
    => usb start
    starting USB...
    Bus usb@6400000: drivers/usb/cdns3/core.c:337- cdns3_probe() cdns-usb3-host usb@6400000: Unable to get USB2 phy (ret -61)
    drivers/clk/clk-uclass.c:112-clk_get_by_index_tail() prop: returning err=-2
    drivers/clk/clk-uclass.c:112-clk_get_by_index_tail() prop: returning err=-2
    drivers/clk/clk-uclass.c:112-clk_get_by_index_tail() prop: returning err=-2
    drivers/clk/clk-uclass.c:112-clk_get_by_index_tail() prop: returning err=-2
    drivers/phy/cadence/phy-cadence-sierra.c:1122-cdns_sierra_phy_probe() cdns,sierra serdes@5020000: PHY not found 0x7364 vs 0x0
    drivers/usb/cdns3/core.c:345- cdns3_probe() cdns-usb3-host usb@6400000: Unable to get USB3 phy (ret -19)
    drivers/usb/cdns3/drd.c:273- cdns3_drd_init() cdns-usb3-host usb@6400000: DRD version v1 (ID: 0004024e, rev: 00000200)
    drivers/usb/cdns3/core.c:309-cdns3_hw_role_switch() cdns-usb3-host usb@6400000: set 1 has failed, back to 0
    scanning bus usb@6400000 for devices... xhci_ctrl_txBUG at drivers/usb/host/xhci-mem.c:54/xhci_inval_cache()!
    BUG!
    resetting ...

    Best regards,
    /Bo
  • Hi Bo 

    what was the mode you kept  ?

    it is trying to do the role switch cdns3_hw_role_switch() did you kept OTG mode ?

    Update: when I measure the USB1_DRVVBUS it is always 0. What might cause this?

    need to see if pad configuration is ok also is it high in uboot and linux it is low am i right?

    Regards
    Diwakar

  • Hi Diwakar,

    On the working USB2 USB1_DRVVBUS is working ok, and shows 3.3V.

    The current dts-tree looks like this now, usb0 is our USBC-port, used for dfu. usb1 is connected to the hub, just as on BeagleBone.

    &usb_serdes_mux {
    	idle-states = <1>, <1>; /* USB0 to SERDES3, USB1 to SERDES2 */
    };
    
    &serdes_ln_ctrl {
    	idle-states = <J721E_SERDES0_LANE0_IP4_UNUSED>, <J721E_SERDES0_LANE1_IP4_UNUSED>,
    		      <J721E_SERDES1_LANE0_PCIE1_LANE0>, <J721E_SERDES1_LANE1_PCIE1_LANE1>,
    		      <J721E_SERDES2_LANE0_IP1_UNUSED>, <J721E_SERDES2_LANE1_USB3_1>,
    		      <J721E_SERDES3_LANE0_USB3_0_SWAP>, <J721E_SERDES3_LANE1_USB3_0>,
    		      <J721E_SERDES4_LANE0_IP2_UNUSED>, <J721E_SERDES4_LANE1_IP2_UNUSED>,
    		      <J721E_SERDES4_LANE2_IP2_UNUSED>, <J721E_SERDES4_LANE3_IP2_UNUSED>;
    };
    
    &serdes_wiz3 {
    	typec-dir-gpios = <&main_gpio1 3 GPIO_ACTIVE_HIGH>;
    	typec-dir-debounce-ms = <700>;	/* TUSB321, tCCB_DEFAULT 133 ms */
    };
    
    &serdes3 {
    	serdes3_usb_link: phy@0 {
    		reg = <0>;
    		cdns,num-lanes = <2>;
    		#phy-cells = <0>;
    		cdns,phy-type = <PHY_TYPE_USB3>;
    		resets = <&serdes_wiz3 1>, <&serdes_wiz3 2>;
    	};
    };
    
    &usbss0 {
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_usbss0_pins_default>;
    	ti,vbus-divider;
    };
    
    &usb0 {
    	dr_mode = "peripheral";
    	maximum-speed = "super-speed";
    	phys = <&serdes3_usb_link>;
    	phy-names = "cdns3,usb3-phy";
    };
    
    &serdes2 {
    	serdes2_usb_link: phy@1 {
    		reg = <1>;
    		cdns,num-lanes = <1>;
    		#phy-cells = <0>;
    		cdns,phy-type = <PHY_TYPE_USB3>;
    		resets = <&serdes_wiz2 2>;
    	};
    };
    
    &usbss1 {
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_usbss1_pins_default>;
    	ti,vbus-divider;
    	ti,usb2-only;
    };
    
    &usb1 {
    	dr_mode = "host";
    	maximum-speed = "super-speed";
    	phys = <&serdes2_usb_link>;
    	phy-names = "cdns3,usb3-phy";
    };
    

    it is trying to do the role switch cdns3_hw_role_switch() did you kept OTG mode ?

    Why is trying to switch role? Isn't that set by the usb_serdes_mux?

    Best regards,

    /Bo

  • Hi Bo 

    This doest seems to correct to me you are using usb2 only and then speed mentioned is super speed which is not correct it should be high speed 

    why we are using serdes link as mentioned earlier if you are using usb3.0 in that case only we need serdes.

    please refer <Linux sdk>/Documentation/devicetree/bindings/usb/ti,j721e-usb.yaml
                        <Linux sdk>/Documentation/devicetree/bindings/usb/cdns,usb3.yaml

    for details about the properties.

    Regards
    Diwakar

  • why we are using serdes link as mentioned earlier if you are using usb3.0 in that case only we need serdes.

    The goal is to have usb3.0 on both usb0 and usb1. But the serdes configuration seems to be wrong.

    Can you halp me get it working?

    Best regards,

    /Bo

  • Hi Bo 

    can you add a print in the usb driver in linux so that at least will come to know why its is failing right now its bit difficult as we are not  getting any print in the linux.

    share final dtb which you are corrently using  config file also can you dump these register 

    0x104080
    0x104084
    0x104088
    0010408C
    
    0506 0408h
    0506 040Ch
    0506 0480h
    0506 0484h
    0506 0488h
    0506 048Ch
    0506 04C0h
    0506 04C4h
    0506 04C8h
    0506 04CCh
    0506 0500h
    0506 0504h
    0506 0508h
    0506 050Ch
    0506 0540h
    0506 0544h
    0506 0548h
    0506 054Ch
    
    0506 E000h

    Regards
    Diwakar 

  • Diwakar,

    There has been some progress. I think we can be content with usb2.0 in U-Boot, so I went on to Linux.

    I removed the "ti,usb2-only" from the Linux dts, and now I see that it tries to probe through serdes:

    root@asp3:~# dmesg
    [ 0.576953] cdns-sierra-phy 5020000.serdes: Timeout waiting for PHY status ready
    [ 0.584349] phy phy-5020000.serdes.9: phy poweron failed --> -110
    [ 0.590431] cdns-usb3: probe of 6400000.usb failed with error -110

    &usb_serdes_mux {
    	idle-states = <1>, <1>; /* USB0 to SERDES3, USB1 to SERDES2 */
    };
    
    &serdes_ln_ctrl {
    	idle-states = <J721E_SERDES0_LANE0_IP4_UNUSED>, <J721E_SERDES0_LANE1_IP4_UNUSED>,
    		      <J721E_SERDES1_LANE0_PCIE1_LANE0>, <J721E_SERDES1_LANE1_PCIE1_LANE1>,
    		      <J721E_SERDES2_LANE0_IP1_UNUSED>, <J721E_SERDES2_LANE1_USB3_1>,
    		      <J721E_SERDES3_LANE0_USB3_0_SWAP>, <J721E_SERDES3_LANE1_USB3_0>,
    		      <J721E_SERDES4_LANE0_IP2_UNUSED>, <J721E_SERDES4_LANE1_IP2_UNUSED>,
    		      <J721E_SERDES4_LANE2_IP2_UNUSED>, <J721E_SERDES4_LANE3_IP2_UNUSED>;
    };
    
    &serdes_wiz3 {
    	typec-dir-gpios = <&main_gpio1 3 GPIO_ACTIVE_HIGH>;
    	typec-dir-debounce-ms = <700>;	/* TUSB321, tCCB_DEFAULT 133 ms */
    };
    
    &serdes3 {
    	serdes3_usb_link: phy@0 {
    		reg = <0>;
    		cdns,num-lanes = <2>;
    		#phy-cells = <0>;
    		cdns,phy-type = <PHY_TYPE_USB3>;
    		resets = <&serdes_wiz3 1>, <&serdes_wiz3 2>;
    	};
    };
    
    &usbss0 {
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_usbss0_pins_default>;
    	ti,vbus-divider;
    };
    
    &usb0 {
    	dr_mode = "otg";
    	maximum-speed = "super-speed";
    	phys = <&serdes3_usb_link>;
    	phy-names = "cdns3,usb3-phy";
    };
    
    &serdes2 {
    	serdes2_usb_link: phy@1 {
    		reg = <1>;
    		cdns,num-lanes = <1>;
    		#phy-cells = <0>;
    		cdns,phy-type = <PHY_TYPE_USB3>;
    		resets = <&serdes_wiz2 2>;
    	};
    };
    
    &usbss1 {
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_usbss1_pins_default>;
    	ti,vbus-divider;
    };
    
    &usb1 {
    	dr_mode = "host";
    	maximum-speed = "super-speed";
    	phys = <&serdes2_usb_link>;
    	phy-names = "cdns3,usb3-phy";
    };

    The question now is why serdes reports poweron fail.

    Best regards,

    /Bo

  • HI Bo 

    Can you share the above asked register dumps to make sure your serdes configuration is correct.

    e2e.ti.com/.../4850081

    Regards
    Diwakar

  • Hi Diwakar,

    I tried to devmem2 those registers but only managed to read the two first ones:

    root@asp3:~# devmem2 0x104080 w
    /dev/mem opened.
    Memory mapped at address 0xffffba070000.
    Read at address  0x00104080 (0xffffba070080): 0x00000003
    root@asp3:~# devmem2 0x104084 w
    /dev/mem opened.
    Memory mapped at address 0xffffaf693000.
    Read at address  0x00104084 (0xffffaf693084): 0x00000003
    root@asp3:~# devmem2 0x104088 w
    /dev/mem opened.
    [  230.512119] SError Interrupt on CPU1, code 0x00000000bf000000 -- SError
    [  230.512131] CPU: 1 PID: 280 Comm: devmem2 Not tainted 6.1.33-g999 #1
    [  230.512136] Hardware name: Schneider Electric Automation Server Premium 3 (DT)
    [  230.512138] pstate: 20000000 (nzCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
    [  230.512142] pc : 0000ffffb9405844
    [  230.512144] lr : 0000aaaae50e0ea0
    [  230.512145] sp : 0000ffffe1ebf820
    [  230.512146] x29: 0000ffffe1ebf820 x28: 0000aaaae50f1000 x27: 0000ffffb94ab628
    [  230.512152] x26: 0000ffffb94f7088 x25: 0000ffffe1ebfb88 x24: 0000ffffe1ebf988
    [  230.512156] x23: 0000000000000003 x22: 0000000000000003 x21: 0000000000104088
    [  230.512161] x20: 0000000000001000 x19: 0000ffffb94f7000 x18: 0000000000000000
    [  230.512165] x17: 0000ffffb9405820 x16: 0000aaaae50f1f20 x15: 0000000000000001
    [  230.512169] x14: 0000000000000001 x13: 2073736572646461 x12: 0000ffffb94f7000
    [  230.512173] x11: 000000000000000e x10: 000000000000000a x9 : 0000ffffe1ebf804
    [  230.512177] x8 : 0000000000000040 x7 : 3030303766343962 x6 : 000000000000002e
    [  230.512181] x5 : 0000000000000000 x4 : 0000000000000008 x3 : 0000aaaae50e13f0
    [  230.512185] x2 : 0000000000000080 x1 : 0000000000000080 x0 : 0000ffffe1ebf988
    [  230.512190] Kernel panic - not syncing: Asynchronous SError Interrupt
    [  230.512192] CPU: 1 PID: 280 Comm: devmem2 Not tainted 6.1.33-g999 #1
    [  230.512196] Hardware name: Schneider Electric Automation Server Premium 3 (DT)
    [  230.512198] Call trace:
    [  230.512199]  dump_backtrace.part.0+0xdc/0xf0
    [  230.512216]  show_stack+0x18/0x30
    [  230.512220]  dump_stack_lvl+0x68/0x84
    [  230.512228]  dump_stack+0x18/0x34
    [  230.512232]  panic+0x184/0x344
    [  230.512237]  nmi_panic+0xac/0xb0
    [  230.512243]  arm64_serror_panic+0x6c/0x7c
    [  230.512246]  do_serror+0x58/0x5c
    [  230.512248]  __el0_error_handler_common+0x40/0xa4
    [  230.512251]  el0t_64_error_handler+0x10/0x20
    [  230.512254]  el0t_64_error+0x18c/0x190
    [  230.512258] SMP: stopping secondary CPUs
    [  230.512265] Kernel Offset: disabled
    [  230.512266] CPU features: 0x20000,20028084,0000420b
    [  230.512269] Memory Limit: none
    [  230.699987] ---[ end Kernel panic - not syncing: Asynchronous SError Interrupt ]---
    [  230.707644] ------------[ cut here ]------------
    [  230.707646] WARNING: CPU: 1 PID: 280 at kernel/sched/core.c:3145 set_task_cpu+0x160/0x1b0
    [  230.707658] Modules linked in: sch_fq_codel ipv6
    [  230.707663] CPU: 1 PID: 280 Comm: devmem2 Not tainted 6.1.33-g999 #1
    [  230.707666] Hardware name: Schneider Electric Automation Server Premium 3 (DT)
    [  230.707668] pstate: 400000c5 (nZcv daIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
    [  230.707671] pc : set_task_cpu+0x160/0x1b0
    [  230.707676] lr : try_to_wake_up+0x1a8/0x4d0
    [  230.707680] sp : ffff80000800bc20
    [  230.707682] x29: ffff80000800bc20 x28: 0000000000000006 x27: 0000000000000000
    [  230.707686] x26: 0000000000000000 x25: ffff800009219d10 x24: 0000000000000000
    [  230.707690] x23: ffff000000f7b54c x22: 00000000000000c0 x21: 0000000000000000
    [  230.707694] x20: 0000000000000000 x19: ffff000000f7ad00 x18: ffffffffffffffff
    [  230.707697] x17: 75727265746e4920 x16: 726f727245532073 x15: 756f6e6f7268636e
    [  230.707701] x14: 797341203a676e69 x13: ffff8000092318a0 x12: 00000000000004ec
    [  230.707705] x11: 00000000000001a4 x10: ffff8000092898a0 x9 : ffff8000092318a0
    [  230.707709] x8 : 00000000ffffefff x7 : ffff8000092898a0 x6 : 00000000ffffbc53
    [  230.707713] x5 : 0000000000000000 x4 : ffff800056b04000 x3 : 0000000000000003
    [  230.707717] x2 : ffff000000f7ad00 x1 : 0000000000000000 x0 : 0000000000000002
    [  230.707720] Call trace:
    [  230.707721]  set_task_cpu+0x160/0x1b0
    [  230.707726]  try_to_wake_up+0x1a8/0x4d0
    [  230.707730]  default_wake_function+0x1c/0x40
    [  230.707733]  pollwake+0x6c/0x94
    [  230.707737]  __wake_up_common+0x88/0x180
    [  230.707741]  __wake_up_common_lock+0x80/0xd0
    [  230.707744]  __wake_up+0x18/0x2c
    [  230.707747]  wake_up_klogd_work_func+0xac/0xc0
    [  230.707751]  irq_work_single+0x30/0xa0
    [  230.707757]  irq_work_run_list+0x4c/0x70
    [  230.707761]  irq_work_tick+0x28/0x6c
    [  230.707764]  update_process_times+0x94/0xac
    [  230.707769]  tick_sched_timer+0x58/0xd0
    [  230.707773]  __hrtimer_run_queues+0x138/0x1d0
    [  230.707777]  hrtimer_interrupt+0xe8/0x244
    [  230.707781]  arch_timer_handler_phys+0x34/0x44
    [  230.707788]  handle_percpu_devid_irq+0x84/0x130
    [  230.707793]  generic_handle_domain_irq+0x2c/0x44
    [  230.707796]  gic_handle_irq+0x50/0x124
    [  230.707801]  call_on_irq_stack+0x24/0x4c
    [  230.707804]  do_interrupt_handler+0x80/0x84
    [  230.707807]  el1_interrupt+0x34/0x70
    [  230.707810]  el1h_64_irq_handler+0x18/0x2c
    [  230.707812]  el1h_64_irq+0x64/0x68
    [  230.707815]  panic+0x2f0/0x344
    [  230.707818]  nmi_panic+0xac/0xb0
    [  230.707822]  arm64_serror_panic+0x6c/0x7c
    [  230.707825]  do_serror+0x58/0x5c
    [  230.707827]  __el0_error_handler_common+0x40/0xa4
    [  230.707830]  el0t_64_error_handler+0x10/0x20
    [  230.707832]  el0t_64_error+0x18c/0x190
    [  230.707835] ---[ end trace 0000000000000000 ]---
    

    Best regards,

    /Bo

  • Hi Diwakar,

    I read the datasheet and the presumed addresses for the serdes ctrl lines are

    Serdes 0: 00104080 and 00104084
    Serdes 1: 00104090 and 00104094
    Serdes 2: 001040a0 and 001040a4
    Serdes 3: 001040b0 and 001040b4
    Serdes 4: 001040c0, 001040c4, 001040c8 and 001040cc

    In U-Boot:

    => md 104080 2
    00104080: 00000003 00000003 ........
    => md 104090 2
    00104090: 00000001 00000001 ........
    => md 1040a0 2
    001040a0: 00000000 00000002 ........
    => md 1040b0 2
    001040b0: 00000002 00000002 ........
    => md 1040c0 4
    001040c0: 00000001 00000001 00000001 00000001 ................

    In Linux:

    root@asp3:~# devmem2 0x104080 l
    /dev/mem opened.
    Memory mapped at address 0xffff868ab000.
    Read at address 0x00104080 (0xffff868ab080): 0x0000000300000003
    root@asp3:~# devmem2 0x104090 l
    /dev/mem opened.
    Memory mapped at address 0xffffbf207000.
    Read at address 0x00104090 (0xffffbf207090): 0x0000000100000001
    root@asp3:~# devmem2 0x1040a0 l
    /dev/mem opened.
    Memory mapped at address 0xffff944e1000.
    Read at address 0x001040A0 (0xffff944e10a0): 0x0000000200000000
    root@asp3:~# devmem2 0x1040b0 l
    /dev/mem opened.
    Memory mapped at address 0xffff8e23a000.
    Read at address 0x001040B0 (0xffff8e23a0b0): 0x0000000200000002
    root@asp3:~# devmem2 0x1040c0 l
    /dev/mem opened.
    Memory mapped at address 0xffffb2c44000.
    Read at address 0x001040C0 (0xffffb2c440c0): 0x0000000100000001
    root@asp3:~# devmem2 0x1040c8 l
    /dev/mem opened.
    Memory mapped at address 0xffffae758000.
    Read at address 0x001040C8 (0xffffae7580c8): 0x0000000100000001

    Best regards,

    /Bo

  • HI Bo

     BeagleBoneAI64 uses TDA4VM soc 

    i checked the data sheet 

    0010 40A0h --> CTRLMMR_SERDES2_LN0_CTRL

    0010 40A4h --> CTRLMMR_SERDES2_LN1_CTRL

    0010 40B0h--> CTRLMMR_SERDES3_LN0_CTRL

    0010 40B4h --> CTRLMMR_SERDES3_LN1_CTRL

    can you dump the value of these register dont use 'l' option by default devmem2 will print 32 bit data.

    also if everything goes ok with this we need to see serdes specific configuration 

    we need to get the value for (SERDES 2/3 base address + reg offset)

    Serdes Top Level Control
    Serdes reset
    Lane Control 0
    Lane Divider 0
    Lane Align 0
    Lane Status 0
    Lane Control 1
    Lane Divider 1
    Lane Align 1
    Lane Status 1
    Lane Control 2
    Lane Divider 2
    Lane Align 2
    Lane Status 2
    Lane Control 3
    Lane Divider 3
    Lane Align 3
    Lane Status 3
    PMA common control1 register

    Regards
    Diwakar

  • The question now is why serdes reports poweron fail.

    Hello Bo,

    Is serdes2 being configured at U-Boot? Also, can you please share the complete device-tree nodes for:
    serdes_wiz2, serdes2, usbss1 and usb1
    with contents of the nodes from main.dtsi as well and not just the changes made in the board file.
    That will be helpful to debug the issue.

    Regards,
    Siddharth.

  • Hi Siddharth,

    Yes, Serdes is configured in U-Boot. At least I think so as I have it present in my top dts. Could it be that it needs to be configured in the u-boot-portion of the U-Boot dts?

    In U-Boot, I have the following dts-files:

    k3-j721e-asp3.dts
    k3-j721e-asp3-u-boot.dts
    k3-j721e-r5-asp3.dts
    k3-j721e-r5-asp3-u-boot.dts

    Which of these control the serdes setup? Currently I have only made changes in the top k3-j721e-asp3.dts

    The complete node for Serdes and usb (in U-Boot, but looks the same in Linux), with all my changes comes here:

    In main.dtsi:
    
    	scm_conf: scm-conf@100000 {
    		compatible = "ti,j721e-system-controller", "syscon", "simple-mfd";
    		reg = <0 0x00100000 0 0x1c000>; /* excludes pinctrl region */
    		#address-cells = <1>;
    		#size-cells = <1>;
    		ranges = <0x0 0x0 0x00100000 0x1c000>;
    
    		serdes_ln_ctrl: mux@4080 {
    			compatible = "mmio-mux";
    			reg = <0x00004080 0x50>;
    			#mux-control-cells = <1>;
    			mux-reg-masks = <0x4080 0x3>, <0x4084 0x3>, /* SERDES0 lane0/1 select */
    					<0x4090 0x3>, <0x4094 0x3>, /* SERDES1 lane0/1 select */
    					<0x40a0 0x3>, <0x40a4 0x3>, /* SERDES2 lane0/1 select */
    					<0x40b0 0x3>, <0x40b4 0x3>, /* SERDES3 lane0/1 select */
    					<0x40c0 0x3>, <0x40c4 0x3>, <0x40c8 0x3>, <0x40cc 0x3>;
    					/* SERDES4 lane0/1/2/3 select */
    			idle-states = <J721E_SERDES0_LANE0_PCIE0_LANE0>, <J721E_SERDES0_LANE1_PCIE0_LANE1>,
    				      <J721E_SERDES1_LANE0_PCIE1_LANE0>, <J721E_SERDES1_LANE1_PCIE1_LANE1>,
    				      <J721E_SERDES2_LANE0_PCIE2_LANE0>, <J721E_SERDES2_LANE1_PCIE2_LANE1>,
    				      <MUX_IDLE_AS_IS>, <J721E_SERDES3_LANE1_USB3_0>,
    				      <J721E_SERDES4_LANE0_EDP_LANE0>, <J721E_SERDES4_LANE1_EDP_LANE1>,
    				      <J721E_SERDES4_LANE2_EDP_LANE2>, <J721E_SERDES4_LANE3_EDP_LANE3>;
    		};
    
    		usb_serdes_mux: mux-controller@4000 {
    			compatible = "mmio-mux";
    			#mux-control-cells = <1>;
    			mux-reg-masks = <0x4000 0x8000000>, /* USB0 to SERDES0/3 mux */
    					<0x4010 0x8000000>; /* USB1 to SERDES1/2 mux */
    		};
    
    		main_phy_gmii_sel: phy@4044 {
    			compatible = "ti,am654-phy-gmii-sel";
    			reg = <0x4044 0x20>;
    			#phy-cells = <1>;
    		};
    	};
    
    ...
    
    	serdes_wiz0: wiz@5000000 {
    		compatible = "ti,j721e-wiz-16g";
    		#address-cells = <1>;
    		#size-cells = <1>;
    		power-domains = <&k3_pds 292 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 292 5>, <&k3_clks 292 11>, <&cmn_refclk>;
    		clock-names = "fck", "core_ref_clk", "ext_ref_clk";
    		assigned-clocks = <&k3_clks 292 11>, <&k3_clks 292 0>;
    		assigned-clock-parents = <&k3_clks 292 15>, <&k3_clks 292 4>;
    		num-lanes = <2>;
    		#reset-cells = <1>;
    		ranges = <0x5000000 0x0 0x5000000 0x10000>;
    
    		wiz0_pll0_refclk: pll0-refclk {
    			clocks = <&k3_clks 292 11>, <&cmn_refclk>;
    			#clock-cells = <0>;
    			assigned-clocks = <&wiz0_pll0_refclk>;
    			assigned-clock-parents = <&k3_clks 292 11>;
    		};
    
    		wiz0_pll1_refclk: pll1-refclk {
    			clocks = <&k3_clks 292 0>, <&cmn_refclk1>;
    			#clock-cells = <0>;
    			assigned-clocks = <&wiz0_pll1_refclk>;
    			assigned-clock-parents = <&k3_clks 292 0>;
    		};
    
    		wiz0_refclk_dig: refclk-dig {
    			clocks = <&k3_clks 292 11>, <&k3_clks 292 0>, <&cmn_refclk>, <&cmn_refclk1>;
    			#clock-cells = <0>;
    			assigned-clocks = <&wiz0_refclk_dig>;
    			assigned-clock-parents = <&k3_clks 292 11>;
    		};
    
    		wiz0_cmn_refclk_dig_div: cmn-refclk-dig-div {
    			clocks = <&wiz0_refclk_dig>;
    			#clock-cells = <0>;
    		};
    
    		wiz0_cmn_refclk1_dig_div: cmn-refclk1-dig-div {
    			clocks = <&wiz0_pll1_refclk>;
    			#clock-cells = <0>;
    		};
    
    		serdes0: serdes@5000000 {
    			compatible = "ti,sierra-phy-t0";
    			reg-names = "serdes";
    			reg = <0x5000000 0x10000>;
    			#address-cells = <1>;
    			#size-cells = <0>;
    			#clock-cells = <1>;
    			resets = <&serdes_wiz0 0>;
    			reset-names = "sierra_reset";
    			clocks = <&wiz0_cmn_refclk_dig_div>, <&wiz0_cmn_refclk1_dig_div>,
    				 <&wiz0_pll0_refclk>, <&wiz0_pll1_refclk>;
    			clock-names = "cmn_refclk_dig_div", "cmn_refclk1_dig_div",
    				      "pll0_refclk", "pll1_refclk";
    		};
    	};
    
    	serdes_wiz1: wiz@5010000 {
    		compatible = "ti,j721e-wiz-16g";
    		#address-cells = <1>;
    		#size-cells = <1>;
    		power-domains = <&k3_pds 293 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 293 5>, <&k3_clks 293 13>, <&cmn_refclk>;
    		clock-names = "fck", "core_ref_clk", "ext_ref_clk";
    		assigned-clocks = <&k3_clks 293 13>, <&k3_clks 293 0>;
    		assigned-clock-parents = <&k3_clks 293 17>, <&k3_clks 293 4>;
    		num-lanes = <2>;
    		#reset-cells = <1>;
    		ranges = <0x5010000 0x0 0x5010000 0x10000>;
    
    		wiz1_pll0_refclk: pll0-refclk {
    			clocks = <&k3_clks 293 13>, <&cmn_refclk>;
    			#clock-cells = <0>;
    			assigned-clocks = <&wiz1_pll0_refclk>;
    			assigned-clock-parents = <&k3_clks 293 13>;
    		};
    
    		wiz1_pll1_refclk: pll1-refclk {
    			clocks = <&k3_clks 293 0>, <&cmn_refclk1>;
    			#clock-cells = <0>;
    			assigned-clocks = <&wiz1_pll1_refclk>;
    			assigned-clock-parents = <&k3_clks 293 0>;
    		};
    
    		wiz1_refclk_dig: refclk-dig {
    			clocks = <&k3_clks 293 13>, <&k3_clks 293 0>, <&cmn_refclk>, <&cmn_refclk1>;
    			#clock-cells = <0>;
    			assigned-clocks = <&wiz1_refclk_dig>;
    			assigned-clock-parents = <&k3_clks 293 13>;
    		};
    
    		wiz1_cmn_refclk_dig_div: cmn-refclk-dig-div{
    			clocks = <&wiz1_refclk_dig>;
    			#clock-cells = <0>;
    		};
    
    		wiz1_cmn_refclk1_dig_div: cmn-refclk1-dig-div {
    			clocks = <&wiz1_pll1_refclk>;
    			#clock-cells = <0>;
    		};
    
    		serdes1: serdes@5010000 {
    			compatible = "ti,sierra-phy-t0";
    			reg-names = "serdes";
    			reg = <0x5010000 0x10000>;
    			#address-cells = <1>;
    			#size-cells = <0>;
    			#clock-cells = <1>;
    			resets = <&serdes_wiz1 0>;
    			reset-names = "sierra_reset";
    			clocks = <&wiz1_cmn_refclk_dig_div>, <&wiz1_cmn_refclk1_dig_div>,
    				 <&wiz1_pll0_refclk>, <&wiz1_pll1_refclk>;
    			clock-names = "cmn_refclk_dig_div", "cmn_refclk1_dig_div",
    				      "pll0_refclk", "pll1_refclk";
    		};
    	};
    
    	serdes_wiz2: wiz@5020000 {
    		compatible = "ti,j721e-wiz-16g";
    		#address-cells = <1>;
    		#size-cells = <1>;
    		power-domains = <&k3_pds 294 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 294 5>, <&k3_clks 294 11>, <&cmn_refclk>;
    		clock-names = "fck", "core_ref_clk", "ext_ref_clk";
    		assigned-clocks = <&k3_clks 294 11>, <&k3_clks 294 0>;
    		assigned-clock-parents = <&k3_clks 294 15>, <&k3_clks 294 4>;
    		num-lanes = <2>;
    		#reset-cells = <1>;
    		ranges = <0x5020000 0x0 0x5020000 0x10000>;
    
    		wiz2_pll0_refclk: pll0-refclk {
    			clocks = <&k3_clks 294 11>, <&cmn_refclk>;
    			#clock-cells = <0>;
    			assigned-clocks = <&wiz2_pll0_refclk>;
    			assigned-clock-parents = <&k3_clks 294 11>;
    		};
    
    		wiz2_pll1_refclk: pll1-refclk {
    			clocks = <&k3_clks 294 0>, <&cmn_refclk1>;
    			#clock-cells = <0>;
    			assigned-clocks = <&wiz2_pll1_refclk>;
    			assigned-clock-parents = <&k3_clks 294 0>;
    		};
    
    		wiz2_refclk_dig: refclk-dig {
    			clocks = <&k3_clks 294 11>, <&k3_clks 294 0>, <&cmn_refclk>, <&cmn_refclk1>;
    			#clock-cells = <0>;
    			assigned-clocks = <&wiz2_refclk_dig>;
    			assigned-clock-parents = <&k3_clks 294 11>;
    		};
    
    		wiz2_cmn_refclk_dig_div: cmn-refclk-dig-div {
    			clocks = <&wiz2_refclk_dig>;
    			#clock-cells = <0>;
    		};
    
    		wiz2_cmn_refclk1_dig_div: cmn-refclk1-dig-div {
    			clocks = <&wiz2_pll1_refclk>;
    			#clock-cells = <0>;
    		};
    
    		serdes2: serdes@5020000 {
    			compatible = "ti,sierra-phy-t0";
    			reg-names = "serdes";
    			reg = <0x5020000 0x10000>;
    			#address-cells = <1>;
    			#size-cells = <0>;
    			#clock-cells = <1>;
    			resets = <&serdes_wiz2 0>;
    			reset-names = "sierra_reset";
    			clocks = <&wiz2_cmn_refclk_dig_div>, <&wiz2_cmn_refclk1_dig_div>,
    				 <&wiz2_pll0_refclk>, <&wiz2_pll1_refclk>;
    			clock-names = "cmn_refclk_dig_div", "cmn_refclk1_dig_div",
    				      "pll0_refclk", "pll1_refclk";
    		};
    	};
    
    	serdes_wiz3: wiz@5030000 {
    		compatible = "ti,j721e-wiz-16g";
    		#address-cells = <1>;
    		#size-cells = <1>;
    		power-domains = <&k3_pds 295 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 295 5>, <&k3_clks 295 9>, <&cmn_refclk>;
    		clock-names = "fck", "core_ref_clk", "ext_ref_clk";
    		assigned-clocks = <&k3_clks 295 9>, <&k3_clks 295 0>;
    		assigned-clock-parents = <&k3_clks 295 13>, <&k3_clks 295 4>;
    		num-lanes = <2>;
    		#reset-cells = <1>;
    		ranges = <0x5030000 0x0 0x5030000 0x10000>;
    
    		wiz3_pll0_refclk: pll0-refclk {
    			clocks = <&k3_clks 295 9>, <&cmn_refclk>;
    			#clock-cells = <0>;
    			assigned-clocks = <&wiz3_pll0_refclk>;
    			assigned-clock-parents = <&k3_clks 295 9>;
    		};
    
    		wiz3_pll1_refclk: pll1-refclk {
    			clocks = <&k3_clks 295 0>, <&cmn_refclk1>;
    			#clock-cells = <0>;
    			assigned-clocks = <&wiz3_pll1_refclk>;
    			assigned-clock-parents = <&k3_clks 295 0>;
    		};
    
    		wiz3_refclk_dig: refclk-dig {
    			clocks = <&k3_clks 295 9>, <&k3_clks 295 0>, <&cmn_refclk>, <&cmn_refclk1>;
    			#clock-cells = <0>;
    			assigned-clocks = <&wiz3_refclk_dig>;
    			assigned-clock-parents = <&k3_clks 295 9>;
    		};
    
    		wiz3_cmn_refclk_dig_div: cmn-refclk-dig-div {
    			clocks = <&wiz3_refclk_dig>;
    			#clock-cells = <0>;
    		};
    
    		wiz3_cmn_refclk1_dig_div: cmn-refclk1-dig-div {
    			clocks = <&wiz3_pll1_refclk>;
    			#clock-cells = <0>;
    		};
    
    		serdes3: serdes@5030000 {
    			compatible = "ti,sierra-phy-t0";
    			reg-names = "serdes";
    			reg = <0x5030000 0x10000>;
    			#address-cells = <1>;
    			#size-cells = <0>;
    			#clock-cells = <1>;
    			resets = <&serdes_wiz3 0>;
    			reset-names = "sierra_reset";
    			clocks = <&wiz3_cmn_refclk_dig_div>, <&wiz3_cmn_refclk1_dig_div>,
    				 <&wiz3_pll0_refclk>, <&wiz3_pll1_refclk>;
    			clock-names = "cmn_refclk_dig_div", "cmn_refclk1_dig_div",
    				      "pll0_refclk", "pll1_refclk";
    		};
    	};
    
    ...
    
    	serdes_wiz4: wiz@5050000 {
    		compatible = "ti,j721e-wiz-10g";
    		#address-cells = <1>;
    		#size-cells = <1>;
    		power-domains = <&k3_pds 297 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 297 1>, <&k3_clks 297 9>, <&cmn_refclk>;
    		clock-names = "fck", "core_ref_clk", "ext_ref_clk";
    		assigned-clocks = <&k3_clks 297 9>;
    		assigned-clock-parents = <&k3_clks 297 10>;
    		assigned-clock-rates = <19200000>;
    		num-lanes = <4>;
    		#reset-cells = <1>;
    		ranges = <0x5050000 0x0 0x5050000 0x10000>,
    			<0xa030a00 0x0 0xa030a00 0x40>;
    
    		wiz4_pll0_refclk: pll0-refclk {
    			clocks = <&k3_clks 297 9>, <&cmn_refclk>;
    			clock-output-names = "wiz4_pll0_refclk";
    			#clock-cells = <0>;
    			assigned-clocks = <&wiz4_pll0_refclk>;
    			assigned-clock-parents = <&k3_clks 297 9>;
    		};
    
    		wiz4_pll1_refclk: pll1-refclk {
    			clocks = <&k3_clks 297 9>, <&cmn_refclk>;
    			clock-output-names = "wiz4_pll1_refclk";
    			#clock-cells = <0>;
    			assigned-clocks = <&wiz4_pll1_refclk>;
    			assigned-clock-parents = <&k3_clks 297 9>;
    		};
    
    		wiz4_refclk_dig: refclk-dig {
    			clocks = <&k3_clks 297 9>, <&cmn_refclk>;
    			clock-output-names = "wiz4_refclk_dig";
    			#clock-cells = <0>;
    			assigned-clocks = <&wiz4_refclk_dig>;
    			assigned-clock-parents = <&k3_clks 297 9>;
    		};
    
    		wiz4_cmn_refclk_dig_div: cmn-refclk-dig-div {
    			clocks = <&wiz4_refclk_dig>;
    			#clock-cells = <0>;
    		};
    
    		wiz4_cmn_refclk1_dig_div: cmn-refclk1-dig-div {
    			clocks = <&wiz4_pll1_refclk>;
    			#clock-cells = <0>;
    		};
    
    		serdes4: serdes@5050000 {
    			/*
    			 * Note: we also map DPTX PHY registers as the Torrent
    			 * needs to manage those.
    			 */
    			compatible = "ti,j721e-serdes-10g";
    			reg = <0x5050000 0x10000>,
    			      <0xa030a00 0x40>; /* DPTX PHY */
    			reg-names = "torrent_phy", "dptx_phy";
    
    			resets = <&serdes_wiz4 0>;
    			reset-names = "torrent_reset";
    			clocks = <&wiz4_pll0_refclk>;
    			clock-names = "refclk";
    			#address-cells = <1>;
    			#size-cells = <0>;
    			torrent_phy_dp: phy@0 {
    				reg = <0>;
    				resets = <&serdes_wiz4 1>;
    				cdns,phy-type = <PHY_TYPE_DP>;
    				cdns,num-lanes = <4>;
    				cdns,max-bit-rate = <5400>;
    				#phy-cells = <0>;
    			};
    		};
    	};
    
    ...
    
    	usbss0: cdns-usb@4104000 {
    		compatible = "ti,j721e-usb";
    		reg = <0x00 0x4104000 0x00 0x100>;
    		dma-coherent;
    		power-domains = <&k3_pds 288 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 288 15>, <&k3_clks 288 3>;
    		clock-names = "ref", "lpm";
    		assigned-clocks = <&k3_clks 288 15>;	/* USB2_REFCLK */
    		assigned-clock-parents = <&k3_clks 288 16>; /* HFOSC0 */
    		#address-cells = <2>;
    		#size-cells = <2>;
    		ranges;
    
    		usb0: usb@6000000 {
    			compatible = "cdns,usb3";
    			reg = <0x00 0x6000000 0x00 0x10000>,
    			      <0x00 0x6010000 0x00 0x10000>,
    			      <0x00 0x6020000 0x00 0x10000>;
    			reg-names = "otg", "xhci", "dev";
    			interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>,	/* irq.0 */
    				     <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,	/* irq.6 */
    				     <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;	/* otgirq.0 */
    			interrupt-names = "host",
    					  "peripheral",
    					  "otg";
    			maximum-speed = "super-speed";
    			dr_mode = "otg";
    		};
    	};
    
    	usbss1: cdns-usb@4114000 {
    		compatible = "ti,j721e-usb";
    		reg = <0x00 0x4114000 0x00 0x100>;
    		dma-coherent;
    		power-domains = <&k3_pds 289 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 289 15>, <&k3_clks 289 3>;
    		clock-names = "ref", "lpm";
    		assigned-clocks = <&k3_clks 289 15>;	/* USB2_REFCLK */
    		assigned-clock-parents = <&k3_clks 289 16>; /* HFOSC0 */
    		#address-cells = <2>;
    		#size-cells = <2>;
    		ranges;
    
    		usb1: usb@6400000 {
    			compatible = "cdns,usb3";
    			reg = <0x00 0x6400000 0x00 0x10000>,
    			      <0x00 0x6410000 0x00 0x10000>,
    			      <0x00 0x6420000 0x00 0x10000>;
    			reg-names = "otg", "xhci", "dev";
    			interrupts = <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,	/* irq.0 */
    				     <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>,	/* irq.6 */
    				     <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>;	/* otgirq.0 */
    			interrupt-names = "host",
    					  "peripheral",
    					  "otg";
    			maximum-speed = "super-speed";
    			dr_mode = "otg";
    		};
    	};
    
    ...
    
    In my own dts:
    
    &usb_serdes_mux {
    	idle-states = <1>, <1>; /* USB0 to SERDES3, USB1 to SERDES2 */
    };
    
    &serdes_ln_ctrl {
    	idle-states = <J721E_SERDES0_LANE0_IP4_UNUSED>, <J721E_SERDES0_LANE1_IP4_UNUSED>,
    		      <J721E_SERDES1_LANE0_PCIE1_LANE0>, <J721E_SERDES1_LANE1_PCIE1_LANE1>,
    		      <J721E_SERDES2_LANE0_IP1_UNUSED>, <J721E_SERDES2_LANE1_USB3_1>,
    		      <J721E_SERDES3_LANE0_USB3_0_SWAP>, <J721E_SERDES3_LANE1_USB3_0>,
    		      <J721E_SERDES4_LANE0_IP2_UNUSED>, <J721E_SERDES4_LANE1_IP2_UNUSED>,
    		      <J721E_SERDES4_LANE2_IP2_UNUSED>, <J721E_SERDES4_LANE3_IP2_UNUSED>;
    };
    
    &serdes_wiz3 {
    	typec-dir-gpios = <&main_gpio1 3 GPIO_ACTIVE_HIGH>;
    	typec-dir-debounce-ms = <700>;	/* TUSB321, tCCB_DEFAULT 133 ms */
    };
    
    &serdes3 {
    	serdes3_usb_link: phy@0 {
    		reg = <0>;
    		cdns,num-lanes = <2>;
    		#phy-cells = <0>;
    		cdns,phy-type = <PHY_TYPE_USB3>;
    		resets = <&serdes_wiz3 1>, <&serdes_wiz3 2>;
    	};
    };
    
    &usbss0 {
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_usbss0_pins_default>;
    	ti,vbus-divider;
    };
    
    &usb0 {
    	dr_mode = "otg";
    	maximum-speed = "super-speed";
    	phys = <&serdes3_usb_link>;
    	phy-names = "cdns3,usb3-phy";
    };
    
    &serdes2 {
    	serdes2_usb_link: phy@1 {
    		reg = <1>;
    		cdns,num-lanes = <1>;
    		#phy-cells = <0>;
    		cdns,phy-type = <PHY_TYPE_USB3>;
    		resets = <&serdes_wiz2 2>;
    	};
    };
    
    &usbss1 {
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_usbss1_pins_default>;
    	ti,vbus-divider;
    };

    Best regards,

    /Bo

  • Diwakar,

    The register values comes here:

    0010 40A0h --> CTRLMMR_SERDES2_LN0_CTRL - 0x0

    0010 40A4h --> CTRLMMR_SERDES2_LN1_CTRL - 0x2

    0010 40B0h --> CTRLMMR_SERDES3_LN0_CTRL - 0x2

    0010 40B4h --> CTRLMMR_SERDES3_LN1_CTRL - 0x2

    The below values are for serdes 2, @0502 0400 + offsets:

    ASP3 Custom board BeagleBone-AI64
    MOD_VER 0x69856002
    SERDES_CTRL 0x00000000
    Serdes Top Level Control 0x9A000000
    Serdes reset 0x92000000 0xB1000000
    Lane Control 0 0x30000000
    Lane Divider 0 0x00000000
    Lane Align 0 0x00000000
    Lane Status 0 0x00000002
    Lane Control 1 0x70000000
    Lane Divider 1 0x00000000
    Lane Align 1 0x00000000
    Lane Status 1 0x00000002
    Lane Control 2 Not in serdes 2
    Lane Divider 2 "
    Lane Align 2 "
    Lane Status 2 "
    Lane Control 3 "
    Lane Divider 3 "
    Lane Align 3 "
    Lane Status 3 "
    PMA common control1 register 0x00003010 0x00002435

    Thank you for helping out!

    Best regards,

    /Bo

    EDIT: Updated with the BeagleBone values where the values differ.

  • Yes, Serdes is configured in U-Boot.

    If Serdes2 is configured in U-Boot, I assume it is being configured for USB3 protocol at U-Boot. If that's not the case, then it will be an issue.
    You could try preventing Serdes2 configuration at U-Boot and let Linux configure it instead and check if that works.

    Regards,
    Siddharth.

  • Hi Siddharth

    If Serdes2 is configured in U-Boot, I assume it is being configured for USB3 protocol at U-Boot. If that's not the case, then it will be an issue.
    You could try preventing Serdes2 configuration at U-Boot and let Linux configure it instead and check if that works.

    I turned all serdes2 stuff off in U-Boot. I can still not probe anything when it boots to Linux.

    [ 0.573361] cdns-sierra-phy 5020000.serdes: Timeout waiting for PHY status ready
    [ 0.580753] phy phy-5020000.serdes.9: phy poweron failed --> -110
    [ 0.586836] cdns-usb3: probe of 6400000.usb failed with error -110

    Best regards,

    /Bo

  • Hi Bo 

    can you help us understand how you turned off the serdes in uboot , can you share those steps to make sure its the correct way.

    Regards
    Diwakar

  • Sure,

    I commented out all serdes2 stuff in the k3-j721e-asp3.dts:

    // &serdes2 {
    //  serdes2_usb_link: phy@1 {
    //      reg = <1>;
    //      cdns,num-lanes = <1>;
    //      #phy-cells = <0>;
    //      cdns,phy-type = <PHY_TYPE_USB3>;
    //      resets = <&serdes_wiz2 2>;
    //  };
    // };

    // &usbss1 {
    //  pinctrl-names = "default";
    //  pinctrl-0 = <&main_usbss1_pins_default>;
    //  ti,vbus-divider;
    // };

    // &usb1 {
    //  dr_mode = "host";
    //  maximum-speed = "super-speed";
    //  phys = <&serdes2_usb_link>;
    //  phy-names = "cdns3,usb3-phy";
    // };
     
    plus, I also removed the autoprobing in k3-j721e-asp3-u-boot.dts:
    // &serdes_ln_ctrl {
    //  u-boot,mux-autoprobe;
    // };

    // &usb_serdes_mux {
    //  u-boot,mux-autoprobe;
    // };
    Best regards,
     
    /Bo
  • Bo,

    Can you comment out the following lines within the file board/ti/j721e/evm.c in U-Boot source?

    if (board_is_j721e_som())
    	configure_serdes_sierra();

    They are present in the function board_late_init().

    Regards,
    Siddharth.

  • Can you comment out the following lines within the file board/ti/j721e/evm.c in U-Boot source?

    Fullscreen
    1
    2
    if (board_is_j721e_som())
    configure_serdes_sierra();
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    They are present in the function board_late_init().

    I'm afraid that didn't help either.

    But going back, isn't it strange that the reset register differs from BeagleBone?

    Register 0x0502040c read 0x92000000 on my board, but 0xb1000000 on BeagleBone. Those differing bits are the refclock selection and the dig_refclock selection.

    Best regards,

    /Bo

  • Bo,

    Can you boot to Linux prompt and share the output of the following command?
    k3conf dump clock

    Regards,
    Siddharth.