I am experiencing an issue bringing up USB peripheral functions (ums and fastboot) on a custom hardware platform based on the i.MX 8M Plus running U-Boot v2024.04 (built via Yocto).
When trying to export the eMMC as mass storage or invoke fastboot, the controller fails to initialize and throws an invalid argument error (-22):
u-boot=> ums 0 mmc 2
UMS: LUN 0, dev mmc 2, hwpart 0, sector 0x0, count 0x3a3e000
Couldn't init USB controller.
u-boot=> fastboot 0
USB init failed: -22
Environment & Setup Context:
- U-Boot Version: 2024.04 (PV="2024.04" confirmed via BitBake environment check).
- Hardware: Custom board. Unlike the reference i.MX 8M Plus EVK, this design does not feature a standard Type-C Port Controller (TCPC) chip on the I2C bus.
- Current Software Adjustments: We currently include a patch to bypass errors inside board/freescale/imx8mp_evk/imx8mp_evk.c so the bootloader does not completely abort initialization when the TCPC functions fail to locate the I2C device.
The Problem:
Even with the boot abort bypassed, the USB stack rejects the initialization commands with error code -22 (EINVAL).
We want to verify whether this failure is directly related to how the missing TCPC state handles dynamic role assignment, or if there is a fundamental driver model / device tree framework configuration mismatch required for USB peripheral operation on custom i.MX 8M Plus layouts when deviating from the reference EVK design.
Questions:
- What are the common structural or configuration causes for the -22 (EINVAL) error when invoking fastboot or ums on an i.MX 8M Plus platform under U-Boot 2024.04?
- How should a custom board without the reference EVK's Type-C setup correctly configure its board file or device tree properties to safely enable standalone USB device/peripheral functionality?
Any insights or debugging pointers would be appreciated