[PATCH RFC v3 00/10] Improve Qualcomm EUD driver and platform support

Elson Serrao posted 10 patches 3 weeks, 3 days ago
Documentation/ABI/testing/sysfs-driver-eud    |  16 +
.../bindings/soc/qcom/qcom,eud.yaml           |  19 +-
arch/arm64/boot/dts/qcom/kodiak.dtsi          |  19 +-
.../boot/dts/qcom/qcm6490-fairphone-fp5.dts   |  11 +-
.../dts/qcom/qcm6490-particle-tachyon.dts     |  11 +-
.../boot/dts/qcom/qcm6490-shift-otter.dts     |  11 +-
arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts  |  11 +-
.../dts/qcom/qcs6490-thundercomm-rubikpi3.dts |  11 +-
.../boot/dts/qcom/sm7325-nothing-spacewar.dts |  11 +-
drivers/usb/dwc3/Kconfig                      |   1 +
drivers/usb/dwc3/dwc3-qcom.c                  |  10 +
drivers/usb/misc/Kconfig                      |   1 +
drivers/usb/misc/qcom_eud.c                   | 322 +++++++++++++++++-
include/linux/usb/qcom_eud.h                  |  21 ++
14 files changed, 414 insertions(+), 61 deletions(-)
create mode 100644 include/linux/usb/qcom_eud.h
[PATCH RFC v3 00/10] Improve Qualcomm EUD driver and platform support
Posted by Elson Serrao 3 weeks, 3 days ago
Note: Marking v3 as RFC for the following reasons:
 1)The driver design has changed since v2. The earlier multi-path
   child-node approach has been replaced with a flattened representation.
 2)Patch 10 depends on below patch that is currently under review.
https://lore.kernel.org/all/20260223191042.825136-1-elson.serrao@oss.qualcomm.com/

Requesting feedback on the updated design.

Although below three patches in v2 had Reviewed-by tags and remain
unchanged here, the tags have been intentionally dropped in v3 due
to the RFC nature of this revision:
  - [PATCH 02/10] usb: misc: qcom_eud: add sysfs attribute for port selection
  - [PATCH 05/10] usb: misc: qcom_eud: improve enable_store API
  - [PATCH 06/10] usb: misc: qcom_eud: fix virtual attach/detach event handling

---

The Embedded USB Debugger (EUD) is a High-Speed USB on-chip hub that
provides debug and trace capabilities on Qualcomm platforms. The current
EUD driver, however, lacks essential hardware resources such as PHY
references and support for multi-port configurations. This series
addresses those gaps and introduces the necessary device tree updates
to enable testing and validation of the enhanced functionality.

This work builds upon an earlier EUD driver submission:
https://lore.kernel.org/all/20240730222439.3469-1-quic_eserrao@quicinc.com/
and extends it with support for multi-port use cases and proper handling
of EUD operation across different USB roles.

The series has been validated on the Qualcomm Dragonwing Q6 platform
(RB3 Gen2 board), confirming successful OpenOCD connectivity to the EUD
interface. For detailed usage instructions, refer to Qualcomm’s Linux
kernel debugging guide:
https://docs.qualcomm.com/bundle/publicresource/topics/80-70020-12/debugging_linux_kernel.html#debug-using-openocd

---
Changes in RFC v3:
- Replaced the per-path (eud-path@N) model with a flattened ports
  representation based on the feedback.
- Added port@2 and port@3 to support dual-port configurations.
- Removed the EUD-local 'phys' and 'usb-role-switch' properties since PHY
  and role-switch information is obtained from walking the OF graph.
- Updated PHY discovery logic by fetching the PHY from the controller
  node/fwnode, and exported a new API for the controller to report role
  changes. The dwc3-qcom driver now uses this API to notify EUD on role
  transitions.
- Updated the DTS structure by moving the EUD-to-controller port mapping
  into the base SoC DTSI, enabling EUD by default, and adjusting all board
  DTS files accordingly, including adding the usb-role-switch provider
  link on connector nodes.
- Link to v2: https://lore.kernel.org/all/20260126233830.2193816-1-elson.serrao@oss.qualcomm.com/

Changes in v2:
- Improved commit message of patch 0001 and 0003 with historical context
  on why EUD worked without PHY references on single-path systems.
  Expanded the usb-role-switch property description in the bindings file.
- Link to v1: https://lore.kernel.org/all/20260116232106.2234978-1-elson.serrao@oss.qualcomm.com/
---

Elson Serrao (10):
  dt-bindings: soc: qcom: eud: Add support for dual-port configuration
  usb: misc: qcom_eud: add sysfs attribute for port selection
  usb: misc: qcom_eud: add per-port High-Speed PHY control
  usb: misc: qcom_eud: add per-port role switch support
  usb: misc: qcom_eud: improve enable_store API
  usb: misc: qcom_eud: fix virtual attach/detach event handling
  usb: misc: qcom_eud: add host mode coordination
  usb: dwc3: qcom: notify EUD driver of role changes
  arm64: dts: qcom: kodiak: Fix EUD USB controller connection
  arm64: dts: qcom: Map USB connector to EUD for kodiak boards

 Documentation/ABI/testing/sysfs-driver-eud    |  16 +
 .../bindings/soc/qcom/qcom,eud.yaml           |  19 +-
 arch/arm64/boot/dts/qcom/kodiak.dtsi          |  19 +-
 .../boot/dts/qcom/qcm6490-fairphone-fp5.dts   |  11 +-
 .../dts/qcom/qcm6490-particle-tachyon.dts     |  11 +-
 .../boot/dts/qcom/qcm6490-shift-otter.dts     |  11 +-
 arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts  |  11 +-
 .../dts/qcom/qcs6490-thundercomm-rubikpi3.dts |  11 +-
 .../boot/dts/qcom/sm7325-nothing-spacewar.dts |  11 +-
 drivers/usb/dwc3/Kconfig                      |   1 +
 drivers/usb/dwc3/dwc3-qcom.c                  |  10 +
 drivers/usb/misc/Kconfig                      |   1 +
 drivers/usb/misc/qcom_eud.c                   | 322 +++++++++++++++++-
 include/linux/usb/qcom_eud.h                  |  21 ++
 14 files changed, 414 insertions(+), 61 deletions(-)
 create mode 100644 include/linux/usb/qcom_eud.h

-- 
2.34.1