Skip to content

Enable USB in device mode on i.MX8ULP EVK

[email protected] u-boot 1 version In review

Get series with b4
b4 am [email protected] change-id 20251216-imx8ulp-129e9fdc1128

Versions newest first

  1. v1 Latest7 patches 13 repliesIn review

Changes in v1 from the cover letter

- Refactor USB PHY register definitions to a common header file to enable code sharing between ehci-mx6.c and ci_udc.c.
- Fix the usb_oc_config() function to correctly handle overcurrent configuration on i.MX7/8M/9/7ULP/8/8ULP platforms, where the register layout differs from i.MX6.
- Extract PHY initialization code into a reusable function that can be shared between ehci-mx6.c and ci_udc.c.
- Convert the ci_udc driver to use driver model.
- Updating Kconfig to automatically select DM_USB_GADGET when CI_UDC is enabled.
- Add i.MX8ULP platform support.

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7usb: ehci-mx6: Move USB PHY register definitions to common headerarch/arm/include/asm/mach-imx/regs-usbphy.h drivers/usb/host/ehci-mx6.c+4 -140 replies
2/7usb: ehci-mx6: Fix usb_oc_config() for i.MX7/8M/9/7ULP/8 and 8ULP platformsdrivers/usb/host/ehci-mx6.c+5 -03 replies
3/7usb: ehci-mx6: Extract PHY initialization into reusable functiondrivers/usb/host/ehci-mx6.c include/usb/ci_udc.h+81 -13 replies
4/7usb: ci_udc: Convert driver to DM_USB_GADGETdrivers/usb/gadget/ci_udc.c+348 -43 replies
5/7usb: Kconfig: imply DM_USB_GADGETdrivers/usb/gadget/Kconfig+1 -14 replies
6/7usb: gadget: ci_udc: Add i.MX8ULP supportdrivers/usb/gadget/ci_udc.c+8 -60 replies
7/7imx8ulp_evk: Enable USB controller at 0x29920000 in device modearch/arm/dts/imx8ulp-evk-u-boot.dtsi configs/imx8ulp_evk_defconfig+24 -00 replies

Reviews trailers per patch

2 of 7 patches have a Reviewed-by or Acked-by.

PatchYe Li
1/7
2/7
3/7
4/7R-b
5/7R-b
6/7
7/7

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/7] Enable USB in device mode on i.MX8ULP EVK

Changes for v1:
- Refactor USB PHY register definitions to a common header file to enable code sharing between ehci-mx6.c and ci_udc.c.
- Fix the usb_oc_config() function to correctly handle overcurrent configuration on i.MX7/8M/9/7ULP/8/8ULP platforms, where the register layout differs from i.MX6.
- Extract PHY initialization code into a reusable function that can be shared between ehci-mx6.c and ci_udc.c.
- Convert the ci_udc driver to use driver model.
- Updating Kconfig to automatically select DM_USB_GADGET when CI_UDC is enabled.
- Add i.MX8ULP platform support.

Tested on i.MX8ULP EVK board with USB mass storage functionality.

---
Alice Guo (5):
usb: ehci-mx6: Move USB PHY register definitions to common header
usb: ehci-mx6: Fix usb_oc_config() for i.MX7/8M/9/7ULP/8 and 8ULP platforms
usb: ehci-mx6: Extract PHY initialization into reusable function
usb: gadget: ci_udc: Add i.MX8ULP support
imx8ulp_evk: Enable USB controller at 0x29920000 in device mode

Sherry Sun (2):
usb: ci_udc: Convert driver to DM_USB_GADGET
usb: Kconfig: imply DM_USB_GADGET

 arch/arm/dts/imx8ulp-evk-u-boot.dtsi        |  17 ++
 arch/arm/include/asm/mach-imx/regs-usbphy.h |   3 +
 configs/imx8ulp_evk_defconfig               |   7 +
 drivers/usb/gadget/Kconfig                  |   2 +-
 drivers/usb/gadget/ci_udc.c                 | 354 +++++++++++++++++++++++++++-
 drivers/usb/host/ehci-mx6.c                 |  93 ++++++--
 include/usb/ci_udc.h                        |   9 +
 7 files changed, 465 insertions(+), 20 deletions(-)

---
base-commit: d21fcfb29ec2871976de8d21ea0e60fb13ce032f
change-id: 20251216-imx8ulp-129e9fdc1128

Best regards,

Signature · 1 line
Alice Guo <[email protected]>