Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/4] Add CIX Sky1 USBSSP controller support
@ 2026-09-06  3:24 Hongliang Yang
  2026-09-06  3:24 ` [PATCH v4 1/4] dt-bindings: usb: Add CIX Sky1 USBSSP RCSU system controller Hongliang Yang
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Hongliang Yang @ 2026-09-06  3:24 UTC (permalink / raw)
  To: peter.chen, gregkh, robh, krzk+dt, conor+dt, krzk,
	linux-arm-kernel, linux-usb, devicetree, linux-kernel
  Cc: p.zabel, vkoul, neil.armstrong, pawell, rogerq

This series adds support for the USB4 and USB5 controllers (based on
Cadence USBSSP DRD) found on the CIX Sky1 SoC: the RCSU system
controller binding, the devicetree binding, the glue driver, and the
device tree nodes for the two controllers.

The per-controller RCSU glue registers (AXI cache attribute
configuration and controller clock status) live inside a shared RCSU
register region, not inside the controller's own address space.  The
region is therefore described as a separate syscon node and each glue
node references its registers through the cix,usb-rcsu phandle with
the register offsets.  The OTG mode straps live in the S5 system
control block and are referenced through the cix,usb-syscon phandle.

This series depends on the Sky1 USB3 PHY series ("Add CIX Sky1 USB3
PHY support"), which provides the usb3_phy4 node referenced by the
device tree patch, and should be applied on top of it.

Changes in v4:
- Split the combined USB series into two: this controller series and
  the Sky1 USB3 PHY series it depends on.
- Restructure the RCSU glue register description as suggested during
  review [1]: instead of describing two individual 4-byte registers
  in the glue node's reg, describe the address range and hierarchy -
  the shared RCSU region becomes a syscon node (new cix,sky1-usbss-rcsu
  binding) and the glue node references its per-controller registers
  through the cix,usb-rcsu phandle with offsets.  The glue driver
  accesses them through a regmap instead of ioremap.

Changes in v3:

Device tree:
- Fix the interrupt specifiers of the usb4/usb5 child nodes: the Sky1
  GICv3 interrupt controller uses 4 cells, so add the missing fourth
  (empty) cell to every entry.  Without it the controller IRQs cannot
  be resolved (platform_get_irq_byname() returns -ENXIO).

USBSSP glue driver:
- Add error cleanup to the probe paths: unmap the xhci/dev registers,
  assert the resets and disable the clocks.
- Replace the static of_dev_auxdata array with a probe-local one and
  allocate the platform data with devm_kzalloc(), so repeated probes
  cannot corrupt shared state or leak the allocation.
- Quiesce the hardware on remove: assert (not deassert) the resets
  before disabling the clocks, and balance the runtime PM usage count
  with pm_runtime_disable()/pm_runtime_set_suspended()/
  pm_runtime_put_noidle().
- Check cdns->host_dev for NULL before dereferencing it in the
  platform suspend callback.
- Drop the reference of the OF node returned by of_get_next_child().
- Stop clearing the clock pointers in the enable error paths, which
  left NULL pointers in the driver state on later resume attempts.
- Take device references in the shutdown child-iteration callbacks and
  drop them after use to avoid a use-after-free.
- Use BIT(31) instead of a signed 1 << 31 shift.
- Assign the system sleep callbacks with SYSTEM_SLEEP_PM_OPS() and
  pm_sleep_ptr() instead of a plain dev_pm_ops behind #ifdef.

[1] https://lore.kernel.org/linux-phy/503e87d9-3311-413a-98c0-e02a02c4a354@kernel.org/

Hongliang Yang (4):
  dt-bindings: usb: Add CIX Sky1 USBSSP RCSU system controller
  dt-bindings: usb: Add CIX Sky1 USBSSP controller
  usb: cdns3: Add CIX Sky1 glue driver
  arm64: dts: cix: Add USB4/USB5 nodes for Sky1

 .../bindings/usb/cix,sky1-usbss-rcsu.yaml     |  46 ++
 .../bindings/usb/cix,sky1-usbssp.yaml         | 144 ++++
 MAINTAINERS                                   |   4 +
 arch/arm64/boot/dts/cix/sky1-orion-o6.dts     |  42 +
 arch/arm64/boot/dts/cix/sky1.dtsi             |  88 +++
 drivers/usb/cdns3/Kconfig                     |  13 +
 drivers/usb/cdns3/Makefile                    |   1 +
 drivers/usb/cdns3/cdnsp-sky1.c                | 726 ++++++++++++++++++
 drivers/usb/cdns3/cdnsp-sky1.h                | 129 ++++
 9 files changed, 1193 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/usb/cix,sky1-usbss-rcsu.yaml
 create mode 100644 Documentation/devicetree/bindings/usb/cix,sky1-usbssp.yaml
 create mode 100644 drivers/usb/cdns3/cdnsp-sky1.c
 create mode 100644 drivers/usb/cdns3/cdnsp-sky1.h

-- 
2.54.0



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

end of thread, other threads:[~2026-09-10  2:53 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-06  3:24 [PATCH v4 0/4] Add CIX Sky1 USBSSP controller support Hongliang Yang
2026-09-06  3:24 ` [PATCH v4 1/4] dt-bindings: usb: Add CIX Sky1 USBSSP RCSU system controller Hongliang Yang
2026-09-06  6:45   ` Krzysztof Kozlowski
2026-09-07  8:15     ` Hongliang Yang
2026-09-06  3:24 ` [PATCH v4 2/4] dt-bindings: usb: Add CIX Sky1 USBSSP controller Hongliang Yang
2026-09-06  6:55   ` Krzysztof Kozlowski
2026-09-10  2:52     ` Hongliang Yang
2026-09-09  7:51   ` Krzysztof Kozlowski
2026-09-06  3:24 ` [PATCH v4 3/4] usb: cdns3: Add CIX Sky1 glue driver Hongliang Yang
2026-09-06  3:24 ` [PATCH v4 4/4] arm64: dts: cix: Add USB4/USB5 nodes for Sky1 Hongliang Yang
2026-09-06  6:41   ` Krzysztof Kozlowski
2026-09-09  7:52   ` Krzysztof Kozlowski

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