Skip to content

usb: Migrate drivers to use dev/ofnode APIs

Peng Fan (OSS) u-boot 2 versions – In review

Get series with b4
b4 am [email protected] change-id 20260526-devfdt-usb-8a17a2383cd6

Versions newest first

  1. v2 Latest6 patches 2 repliesIn review
  2. v16 patches 6 repliesSuperseded

Changes in v2 from the cover letter

- Add R-b from Simon
- Per Simon, for patch 2 and 3, updated commit log.
in patch 2, drop DECLARE_GLOBAL_DATA_PTR and the including of asm/global_data.h
- Link to v1: https://lore.kernel.org/r/[email protected]

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6usb: musb-new: Drop unused variablesdrivers/usb/musb-new/ti-musb.c+0 -40 replies
2/6usb: musb-new: Use ofnode and dev APIsdrivers/usb/musb-new/ti-musb.c+14 -201 reply
3/6usb: musb-new: Update phandle handlingdrivers/usb/musb-new/ti-musb.c+8 -21 reply
4/6usb: host: xhci: Use dev_remap_addr_name()drivers/usb/host/xhci-mtk.c+2 -20 replies
5/6usb: mtu3: Use dev_remap_addr_name()drivers/usb/mtu3/mtu3_plat.c+2 -20 replies
6/6usb: xhci: mvebu: Use dev_read_addr_index()drivers/usb/host/xhci-mvebu.c+1 -10 replies

Reviews trailers per patch

All 6 patches have a Reviewed-by or Acked-by.

PatchSimon Glass
1/6R-b
2/6R-b
3/6R-b
4/6R-b
5/6R-b
6/6R-b

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

Read the v2 thread

Cover letter [PATCH v2 0/6] usb: Migrate drivers to use dev/ofnode APIs

Convert several USB drivers to use the dev_* and ofnode_* APIs and removes dependency on fdt/devfdt helpers.

The motivation is to:
- Eliminate direct usage of gd->fdt_blob and fdtdec_* interfaces
- Avoid devfdt_* helpers in favor of backend-agnostic APIs
- Ensure compatibility with both live device tree and flat DT

Summary:
- Clean up unused legacy variables
- Convert MUSB driver to use dev_* and ofnode_* APIs
- Improve phandle parsing with proper validation
- Replace devfdt_remap_addr_* with dev_remap_addr_* in MTK and MTU3
- Replace devfdt_get_addr_* with dev_read_addr_* in MVEBU

Not have the boards to test mainly regarding the musb changes, just best practice for the migration.

---
Changes in v2:
- Add R-b from Simon
- Per Simon, for patch 2 and 3, updated commit log.
in patch 2, drop DECLARE_GLOBAL_DATA_PTR and the including of asm/global_data.h
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Peng Fan (6):
usb: musb-new: Drop unused variables
usb: musb-new: Use ofnode and dev APIs
usb: musb-new: Update phandle handling
usb: host: xhci: Use dev_remap_addr_name()
usb: mtu3: Use dev_remap_addr_name()
usb: xhci: mvebu: Use dev_read_addr_index()

 drivers/usb/host/xhci-mtk.c    |  4 ++--
 drivers/usb/host/xhci-mvebu.c  |  2 +-
 drivers/usb/mtu3/mtu3_plat.c   |  4 ++--
 drivers/usb/musb-new/ti-musb.c | 48 +++++++++++++++++++-----------------------
 4 files changed, 27 insertions(+), 31 deletions(-)

---
base-commit: 0a46055d96ac627c05180cdeaa187a9fdf6b7973
change-id: 20260526-devfdt-usb-8a17a2383cd6

Best regards,

Signature · 1 line
Peng Fan <[email protected]>