Verdin-imx8mp USB Type-C Not detect in U-Boot

Based on your detailed description and logs, you’re experiencing an orientation-dependent USB Type-C detection issue in U-Boot that appears to be related to the USB XHCI controller’s handling of device enumeration when the connector is flipped.

Analysis of the Issue

Your logs show a clear pattern:

  • Orientation A: Works consistently
  • Orientation B: Intermittent failures with XHCI timeout on event type 33 and USB device not accepting new address (error=80000000)

This behavior suggests that while the USB Type-C connector’s physical orientation switching is working (since Linux handles both orientations correctly), U-Boot’s USB stack may have timing or initialization issues when handling the alternate orientation.

Known Issue Confirmation

Based on the community thread you referenced(1), similar USB enumeration issues have been reported with U-Boot on Toradex modules. The thread discusses USB devices not being accepted with the same error code (error=80000000) you’re experiencing(1).

However, I don’t have definitive confirmation that this is a documented open issue specifically in BSP 7.4.0 for orientation-dependent failures. The referenced thread suggests this may be related to USB device compatibility or timing issues in the U-Boot USB stack(1).

Device Tree Review

Your U-Boot device tree configuration looks generally correct:

&usb_dwc3_0 {
    status = "okay";
    dr_mode = "host";
    maximum-speed = "high-speed";
    vbus-supply = <&reg_usb1_vbus>;
    /delete-property/ usb-role-switch;
    /delete-property/ role-switch-default-mode;
    /delete-node/ connector;
};

&reg_usb1_vbus {
    bootph-pre-ram;
    regulator-boot-on;
    regulator-always-on;
    startup-delay-us = <250000>;
    status = "okay";
};

The startup-delay-us = <250000> (250ms) is a good addition for stabilization.

Recommended Troubleshooting Steps

1. Increase Startup Delay

Try increasing the startup delay further to allow more time for the USB subsystem to stabilize after orientation detection:

&reg_usb1_vbus {
    bootph-pre-ram;
    regulator-boot-on;
    regulator-always-on;
    startup-delay-us = <500000>;  /* Increase to 500ms */
    status = "okay";
};

2. Add USB Controller Quirks

Add additional quirks to the USB DWC3 controller that may help with enumeration timing:

&usb_dwc3_0 {
    status = "okay";
    dr_mode = "host";
    maximum-speed = "high-speed";
    vbus-supply = <&reg_usb1_vbus>;
    
    snps,dis_u2_susphy_quirk;
    snps,dis_enblslpm_quirk;
    snps,dis-u2-freeclk-exists-quirk;
    
    /delete-property/ usb-role-switch;
    /delete-property/ role-switch-default-mode;
    /delete-node/ connector;
};

3. Test with Multiple USB Devices

As suggested in the community thread(1), test with different USB Type-C storage devices from various manufacturers to determine if this is device-specific or a broader controller issue.

4. Enable U-Boot USB Debugging

Enable verbose USB debugging in U-Boot to get more detailed information about the enumeration process:

setenv usbverbose 1
usb reset

5. Check USB PHY Configuration

Ensure the USB3 PHY is properly configured in your U-Boot device tree:

&usb3_phy0 {
    status = "okay";
    vbus-supply = <&reg_usb1_vbus>;
};

6. Workaround: Multiple Reset Attempts

As a temporary workaround until a permanent fix is available, you could implement a script in U-Boot that attempts multiple USB resets:

setenv usb_retry 'usb reset || usb reset || usb reset'

Hardware Considerations

Since the issue is orientation-dependent, verify:

  1. USB Type-C orientation detection circuitry on your carrier board is functioning correctly
  2. Signal integrity for both CC lines (CC1 and CC2) that handle orientation detection
  3. Power delivery is stable in both orientations

Next Steps

  1. Apply the suggested device tree modifications (increased delays and quirks)
  2. Rebuild and deploy U-Boot with the updated device tree
  3. Test with multiple USB devices in both orientations
  4. Collect verbose USB logs for further analysis
  5. If the issue persists, consider reaching out to Toradex support with:
    • Complete U-Boot logs with usbverbose=1
    • Your custom carrier board schematic (USB section)
    • List of tested USB devices and their behavior

Regarding BSP 7.4.0 Status

I cannot definitively confirm if this is a known open issue in BSP 7.4.0 based on the available documentation. However, the community thread you referenced(1) suggests that USB enumeration issues in U-Boot have been reported by other users. I recommend checking the official Toradex release notes and known issues for BSP 7.4.0, or contacting Toradex support directly for confirmation.

Best regards,
Toradex AI Assistant


Did you like my answer? :+1: :-1:

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.