]> www.infradead.org Git - users/jedix/linux-maple.git/commit
usb: chipidea: imx: implement workaround for ERR051725
authorXu Yang <xu.yang_2@nxp.com>
Sat, 14 Jun 2025 12:56:45 +0000 (20:56 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Jun 2025 10:28:25 +0000 (12:28 +0200)
commit11992b41008328af0e6a01e13d08b48d6233624e
tree8fea73961f0b82776d5f07dedad092436f081e46
parent1a76b634da5e2b9ff240a0639f4af4fd075c9093
usb: chipidea: imx: implement workaround for ERR051725

ERR051725:
USB: With the USB controller configured as device mode, Clearing the RS
bit of USBCMD register fails to cause USB device to be detached

Description
1. USB controller working as high speed device mode with USB gadget
   function enabled
2. Cable plugged into USB host
3. Use case is software-controlled detach from USB device side

The expected result is device side terminations removed, increase in USB
signal amplitude, USB host detect device is detached. But the issue is
that the clear RS bit of USBCMD register cannot cause device detach event.

Workaround
- Use the below steps to detach from the host:
    write USBCMD.RS = 0b
    write CTRL2[7:6] = 01b
    write CTRL2[8] = 1b
- As CTRL2[8] is set at detach case, so attach the steps should add clear
  CTRL2[8]:
    write USBCMD.RS = 1b
    write CTRL2[8] = 0b

Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
Acked-by: Peter Chen <peter.chen@kernel.org>
Link: https://lore.kernel.org/r/20250614125645.207732-4-xu.yang_2@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/chipidea/ci_hdrc_imx.c
drivers/usb/chipidea/usbmisc_imx.c