From: Peter Chen <peter.chen@cixtech.com>
To: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
arnd@arndb.de, gregkh@linuxfoundation.org, pawell@cadence.com,
rogerq@kernel.org
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-usb@vger.kernel.org, cix-kernel-upstream@cixtech.com,
Peter Chen <peter.chen@cixtech.com>
Subject: [PATCH v3 0/2] usb: cdns3: USBSSP platform driver support
Date: Tue, 21 Apr 2026 10:34:57 +0800 [thread overview]
Message-ID: <20260421023459.506145-1-peter.chen@cixtech.com> (raw)
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
next reply other threads:[~2026-04-21 2:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-21 2:34 Peter Chen [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260421023459.506145-1-peter.chen@cixtech.com \
--to=peter.chen@cixtech.com \
--cc=arnd@arndb.de \
--cc=cix-kernel-upstream@cixtech.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=pawell@cadence.com \
--cc=robh@kernel.org \
--cc=rogerq@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.