[PATCH v2 0/2] usb: cdns3: USBSSP platform driver support

Peter Chen posted 2 patches 3 weeks ago
.../devicetree/bindings/usb/cdns,usb3.yaml    |  10 +-
drivers/usb/cdns3/Kconfig                     |  50 ++--
drivers/usb/cdns3/Makefile                    |  30 +--
drivers/usb/cdns3/cdns3-gadget.c              |   4 +
drivers/usb/cdns3/cdns3-plat.c                |  17 +-
drivers/usb/cdns3/cdnsp-gadget.c              |   4 +
drivers/usb/cdns3/cdnsp-pci.c                 | 217 ++++++++----------
drivers/usb/cdns3/core.c                      |  11 +-
drivers/usb/cdns3/core.h                      |   5 +-
drivers/usb/cdns3/gadget-export.h             |   4 +-
10 files changed, 172 insertions(+), 180 deletions(-)
[PATCH v2 0/2] usb: cdns3: USBSSP platform driver support
Posted by Peter Chen 3 weeks ago
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, so no additional DT compatible string is needed — both
USBSS and USBSSP use "cdns,usb3".

Changes since v1:
- Update DT binding: keep compatible as "const: cdns,usb3", add
  description and super-speed-plus to maximum-speed, drop separate
  USBSSP example.
- Drop "cdns,usbssp" compatible string; Auto-detect the controller version
  (USBSS vs USBSSP) at runtime by reading the DRD/OTG Device ID register
  in cdns_drd_init(), and select the appropriate gadget init function
  (cdns3_gadget_init or cdnsp_gadget_init) based on cdns->version.
  This follows the same pattern already used for host initialization.
  (Comments from: Pawel Laszczak, Krzysztof Kozlowski)
- Export cdns_core_init_role and re-orginize the function cdns_init, and
  controller version could be gotten before the gadget init function is
  decided per controller.
- Fix PLAT_DRIVER_NAME in cdnsp-pci.c from "cdns-usbssp" to "cdns-usb3"
  to match the platform driver name. (Comments from Pawel Laszczak)
- Remove unnecessary MODULE_ALIAS("platform:cdnsp"). (Comments from Krzysztof Kozlowski)
- Build cdns3-plat.o as a standalone module instead of bundling it into
  cdns-usb-common, so that 'make modules_install' works correctly.
  (Comments from Pawel Laszczak)
- Regroup USBSSP and CDNS3 Kconfig options under the USB_CDNS_SUPPORT
  menu so they appear properly grouped in menuconfig. (Comments from Pawel Laszczak)
- Add Assisted-by tag per Documentation/process/coding-assistants.rst.
  Since the checkpatch.pl can't support this, it is added at context.

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/cdns3/Kconfig                     |  50 ++--
 drivers/usb/cdns3/Makefile                    |  30 +--
 drivers/usb/cdns3/cdns3-gadget.c              |   4 +
 drivers/usb/cdns3/cdns3-plat.c                |  17 +-
 drivers/usb/cdns3/cdnsp-gadget.c              |   4 +
 drivers/usb/cdns3/cdnsp-pci.c                 | 217 ++++++++----------
 drivers/usb/cdns3/core.c                      |  11 +-
 drivers/usb/cdns3/core.h                      |   5 +-
 drivers/usb/cdns3/gadget-export.h             |   4 +-
 10 files changed, 172 insertions(+), 180 deletions(-)

-- 
2.50.1