public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] usb: cdns3: USBSSP platform driver support
@ 2026-04-21  2:34 Peter Chen
  2026-04-21  2:34 ` [PATCH v3 1/2] dt-bindings: usb: cdns,usb3: document USBSSP controller support Peter Chen
  2026-04-21  2:34 ` [PATCH v3 2/2] usb: cdns3: Add USBSSP platform driver support Peter Chen
  0 siblings, 2 replies; 5+ messages in thread
From: Peter Chen @ 2026-04-21  2:34 UTC (permalink / raw)
  To: robh, krzk+dt, conor+dt, arnd, gregkh, pawell, rogerq
  Cc: devicetree, linux-kernel, linux-usb, cix-kernel-upstream,
	Peter Chen

This series adds platform driver support for the Cadence USBSSP (CDNSP)
controller, which was previously only accessible through PCI.  The USBSSP
controller is auto-detected at runtime by reading the DRD/OTG Device ID
register; both USBSS and USBSSP use the "cdns,usb3" compatible string
(binding update in patch 1).

Changes since v2 (vs the v2 series on list)

v2 split CONFIG_USB_CDNSP into its own cdnsp.ko-style path and built
cdns3-plat as a standalone module next to cdns-usb-common.  v3 folds the
integration back into one driver module:

 - Single cdns.ko (CONFIG_USB_CDNS3) bundles core, DRD, the generic
   cdns3-plat binding, optional host.o (CONFIG_USB_CDNS3_HOST) and optional
   gadget objects (CONFIG_USB_CDNS3_GADGET).  SoC and PCI glue stay
   separate small .ko files.

 - CONFIG_USB_CDNS_SUPPORT depends on USB and USB_GADGET using the usual
   pattern (depends on USB || USB_GADGET; depends on USB if !USB_GADGET;
   depends on USB_GADGET if !USB) so the umbrella tracks host or gadget
   when either is built as a module (Suggested-by: Arnd Bergmann).

 - USB_CDNS3_HOST / USB_CDNS3_GADGET are matched to the cdns.ko tristate
   with USB=USB_CDNS3 and USB_GADGET=USB_CDNS3 instead of tying gadget
   only to CONFIG_USB_CDNS_SUPPORT, which mis-handled =y / =m splits when
   CONFIG_USB_CDNS_SUPPORT=y but CONFIG_USB_CDNS3=m.

 - Drop CONFIG_USB_CDNS_HOST; Makefile and host-export.h use
   CONFIG_USB_CDNS3_HOST only.

 - gadget-export.h uses IS_ENABLED(CONFIG_USB_CDNS3_GADGET) for stubs now
   that gadget is a bool compiled into the unified module (v2 used
   IS_REACHABLE on separate CONFIG_USB_CDNS3 / CONFIG_USB_CDNSP tristates).

 - Patch 2 still refactors cdnsp-pci.c into a PCI-to-platform wrapper,
   keeps host_init / gadget_init callbacks, exports cdns_core_init_role,
   and limits drivers/usb/cdns3/ to CONFIG_USB_CDNS_SUPPORT.

 - Add Rob Herring's ACK for Patch 1.

Build verification

Exhaustive Kconfig sweep: 79 unique resolved configurations (deduped on
CONFIG_USB, CONFIG_USB_GADGET, CONFIG_USB_CDNS_SUPPORT,
CONFIG_USB_CDNS3_HOST, CONFIG_USB_CDNS3, CONFIG_USB_CDNSP_PCI,
CONFIG_USB_CDNS3_GADGET), arm64 cross-build, each run through
make O=out/cix olddefconfig, then Image + modules, then modules_install
into a clean INSTALL_MOD_PATH:

	PASS 79 / 79; build failures 0; depmod / module graph failures 0.

Peter Chen (2):
  dt-bindings: usb: cdns,usb3: document USBSSP controller support
  usb: cdns3: Add USBSSP platform driver support

 .../devicetree/bindings/usb/cdns,usb3.yaml    |  10 +-
 drivers/usb/Makefile                          |   2 -
 drivers/usb/cdns3/Kconfig                     | 112 ++++-----
 drivers/usb/cdns3/Makefile                    |  44 ++--
 drivers/usb/cdns3/cdns3-gadget.c              |   1 +
 drivers/usb/cdns3/cdns3-plat.c                |  27 ++-
 drivers/usb/cdns3/cdnsp-gadget.c              |   1 +
 drivers/usb/cdns3/cdnsp-pci.c                 | 217 ++++++++----------
 drivers/usb/cdns3/core.c                      |  45 ++--
 drivers/usb/cdns3/core.h                      |   5 +-
 drivers/usb/cdns3/gadget-export.h             |  10 +-
 drivers/usb/cdns3/host-export.h               |   4 +-
 12 files changed, 209 insertions(+), 269 deletions(-)

-- 
2.50.1

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-04-21  6:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-21  2:34 [PATCH v3 0/2] usb: cdns3: USBSSP platform driver support Peter Chen
2026-04-21  2:34 ` [PATCH v3 1/2] dt-bindings: usb: cdns,usb3: document USBSSP controller support Peter Chen
2026-04-21  2:34 ` [PATCH v3 2/2] usb: cdns3: Add USBSSP platform driver support Peter Chen
2026-04-21  5:57   ` Arnd Bergmann
2026-04-21  6:24     ` Peter Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox