Devicetree
 help / color / mirror / Atom feed
From: Elson Serrao <elson.serrao@oss.qualcomm.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Rob Herring <robh@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v9 0/8] Improve Qualcomm EUD driver and platform support
Date: Mon, 16 Nov 2026 16:06:52 -0800	[thread overview]
Message-ID: <57c5aa78-a116-45d4-ab32-772cd970e6f6@oss.qualcomm.com> (raw)
In-Reply-To: <20260929213513.2401005-1-elson.serrao@oss.qualcomm.com>

Hi Greg,

When you get a chance, could you please pick up patches 1-7 for the USB tree if everything looks good on your end? 

If these patches are already in your pipeline, please disregard this message.

Thanks,
Elson

On 9/29/2026 2:35 PM, Elson Serrao wrote:
> 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.
> 
> Below is a high-level block diagram showing the EUD and its connections.
> 
> 
> 			              EUD Block
>  	                   +------------------------------+  
> 			   |                              |
> [Conn-0]-->[USB2PHY-0]---->|-------- Path 0 --------------|-->[USBCtrl-0]
> 			   |                              |  
> [Conn-1]-->[USB2PHY-1]---->|-------- Path 1 --------------|-->[USBCtrl-1]
> 			   |                              |
> 			   |      +------------------+    |
> 			   |      |  EUD Debug Hub   |    |
> 			   |      +------------------+    |
> 			   +------------------------------+
> 
> 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
> 
> Testing feedback:
>  - Konrad Dybcio reported running a slightly modified version of this
>    series on Agatti with no obvious issues:
>    https://lore.kernel.org/all/8d4f10ef-602c-4e1e-9711-443a5f3fa7f3@oss.qualcomm.com/
> 
> Regards,
> Elson
> 
> ---
> Changes in v9:
>  - [Patch 0002] Initialize port_idx from the hardware EUD_REG_PORT_SEL
>    register in probe(sashiko bot).
>  - [Patch 0003] Fall back to primary if the hardware-selected port has no
>    matching devicetree path.
>  - [Patch 0004] Add missing of_node_get()/of_node_put() to keep the fwnode
>    valid for the lifetime of the registered role switch (sashiko bot).
>  - [Patch 0006] Avoid mixing goto with guard(mutex) per convention (sashiko bot)
>  - [Patch 0008] Reorder eud_con label references alphabetically(Konrad)
>    and extend this routing to newly added sm7325-xiaomi-lisa board file.
>  - Link to v8: https://lore.kernel.org/all/20260912225301.3396556-1-elson.serrao@oss.qualcomm.com/
> 
> Changes in v8:
>  - [Patch 0001] Require '#address-cells' and '#size-cells' for eud-path
>    nodes to address Sashiko bot feedback. 
>  - [Patch 0004] Set path->curr_role before forwarding the role request to
>    the controller, as it reflects EUD's view of the role rather than the
>    controller's outcome. This also addresses Sashiko feedback regarding
>    EUD hardware potentially remaining enabled when the controller fails
>    to complete the role switch. 
>  - [Patch 0006] Acquire the lock in different execution paths to avoid
>    potential races.
>  - Link to v7: https://lore.kernel.org/all/20260831030147.1500616-1-elson.serrao@oss.qualcomm.com/
> 
> Changes in v7:
>  - [Patch 0001] Explicitly disallow the legacy ports representation for
>    SM8350, as pointed out by sashiko bot.
>  - [Patch 0004] Simplify fixed-role handling by relying on dr_mode directly
>    instead of an indirect USB_ROLE_NONE check (Konrad).
>  - [Patch 0008] Squash the Kodiak EUD board endpoint remap into this patch,
>    as applying it separately leaves the OF graph bidirectionality broken.
>  - Link to v6: https://lore.kernel.org/all/20260811213610.2956147-1-elson.serrao@oss.qualcomm.com/
> 
> Changes in v6:
>  - [Patch 0001] Fix oneOf schema to properly enforce mutual exclusivity
>    between 'ports' and 'eud-path@N' (sashiko-bot).
>  - [Patch 0009] Extend the eud_con remote-endpoint fix to
>    sm7325-motorola-dubai-common.dtsi and sm7325-xiaomi-taoyao.dts to fix
>    "not bidirectional" DT graph warning.
>  - Link to v5: https://lore.kernel.org/all/20260803031534.2942628-1-elson.serrao@oss.qualcomm.com/
> 
> Changes in v5:
>  - [Patch 0001] Add a compatible for a SoC that supports EUD over two
>    ports, restrict paths based on SoC hardware, and improve the commit
>    message [Krzysztof/Dmitry]
>  - [Patch 0002/0003] Document error codes in ABI doc.
>  - [Patch 0004] Zero-initialize the USB role switch descriptor [Peter].
>    Add a dr_mode check to handle cases where the USB controller
>    operates in a fixed role without role-switch support (based on
>    internal testing).
>  - [Patch 0006] Drop eud_disabled_for_host flag and control EUD based on
>    device role entry/exit [Peter]. Allow EUD to be powered on only in
>    device role and defer enablement in other roles until the port
>    switches to device role.
>  - Link to v4: https://lore.kernel.org/all/20260501170635.2641748-1-elson.serrao@oss.qualcomm.com/
> 
> Changes in v4:
> - [Patch 0001] Restructure the flattened ports representation to a child-node
>   based model.
>   - Preserve the top-level 'ports' property and add per-path child nodes,
>     so that each role-switch path is described using its own OF graph.
>     (Dmitry).
>   - Link to the discussion leading to this design decision:
>     https://lore.kernel.org/all/20260324172916.804229-1-elson.serrao@oss.qualcomm.com/
> - [Patch 0002] Use explicit port names when selecting the active EUD
>   port (Greg)
> - [Patch 0003] Use a scoped iterator when looping over child nodes and
>   drop redundant EUD path validation checks (Konrad). Preserve support
>   for the legacy top-level ports description.
> - [Patch 0004] Register role switch per path and forward the role switch
>   notifications to the USB controller.
> - [Patch 0006]  Add host mode co-ordination based on the role changes as
>   per the new design and drop the custom API that was used to get role
>   notifications.
> - [Patch 0008] Described the UTMI path as a child node with role switch
>   capability.
> - Link to v3: https://lore.kernel.org/all/20260309203337.803986-1-elson.serrao@oss.qualcomm.com/
> 
> 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 (8):
>   dt-bindings: soc: qcom: eud: Add per-path child nodes for UTMI routing
>   usb: misc: qcom_eud: add sysfs attribute for port selection
>   usb: misc: qcom_eud: add per-path High-Speed PHY control
>   usb: misc: qcom_eud: add per-path role switch support
>   usb: misc: qcom_eud: improve enable_store API
>   usb: misc: qcom_eud: add role-based EUD control
>   usb: misc: qcom_eud: fix virtual attach/detach event handling
>   arm64: dts: qcom: kodiak: Desribe EUD UTMI routing and connector
>     mapping
> 
>  Documentation/ABI/testing/sysfs-driver-eud    |  19 +
>  .../bindings/soc/qcom/qcom,eud.yaml           | 138 ++++++-
>  arch/arm64/boot/dts/qcom/kodiak.dtsi          |  37 +-
>  .../boot/dts/qcom/qcm6490-fairphone-fp5.dts   |  10 +-
>  .../dts/qcom/qcm6490-particle-tachyon.dts     |  10 +-
>  .../boot/dts/qcom/qcm6490-shift-otter.dts     |  10 +-
>  arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts  |  10 +-
>  .../qcom/qcs6490-thundercomm-minipc-g1iot.dts |  10 +-
>  .../dts/qcom/qcs6490-thundercomm-rubikpi3.dts |  10 +-
>  .../qcom/sm7325-motorola-dubai-common.dtsi    |  10 +-
>  .../boot/dts/qcom/sm7325-motorola-dubai.dts   |  10 +-
>  .../boot/dts/qcom/sm7325-nothing-spacewar.dts |  10 +-
>  .../boot/dts/qcom/sm7325-xiaomi-lisa.dts      |  10 +-
>  .../boot/dts/qcom/sm7325-xiaomi-taoyao.dts    |  10 +-
>  drivers/usb/misc/qcom_eud.c                   | 369 ++++++++++++++++--
>  15 files changed, 577 insertions(+), 96 deletions(-)
> 

  parent reply	other threads:[~2026-11-17  0:06 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-29 21:35 [PATCH v9 0/8] Improve Qualcomm EUD driver and platform support Elson Serrao
2026-09-29 21:35 ` [PATCH v9 1/8] dt-bindings: soc: qcom: eud: Add per-path child nodes for UTMI routing Elson Serrao
2026-09-29 21:35 ` [PATCH v9 2/8] usb: misc: qcom_eud: add sysfs attribute for port selection Elson Serrao
2026-09-29 21:35 ` [PATCH v9 3/8] usb: misc: qcom_eud: add per-path High-Speed PHY control Elson Serrao
2026-09-29 21:35 ` [PATCH v9 4/8] usb: misc: qcom_eud: add per-path role switch support Elson Serrao
2026-10-15 14:42   ` Konrad Dybcio
2026-10-15 14:43   ` Konrad Dybcio
2026-10-17  1:16     ` Elson Serrao
2026-10-26 14:23       ` Konrad Dybcio
2026-10-15 14:44   ` Konrad Dybcio
2026-10-17  1:14     ` Elson Serrao
2026-10-26 14:27       ` Konrad Dybcio
2026-09-29 21:35 ` [PATCH v9 5/8] usb: misc: qcom_eud: improve enable_store API Elson Serrao
2026-09-29 21:43   ` sashiko-bot
2026-09-29 22:45     ` Elson Serrao
2026-10-15 14:33       ` Konrad Dybcio
2026-09-29 21:35 ` [PATCH v9 6/8] usb: misc: qcom_eud: add role-based EUD control Elson Serrao
2026-09-29 21:47   ` sashiko-bot
2026-09-29 22:48     ` Elson Serrao
2026-09-29 21:35 ` [PATCH v9 7/8] usb: misc: qcom_eud: fix virtual attach/detach event handling Elson Serrao
2026-09-29 21:35 ` [PATCH v9 8/8] arm64: dts: qcom: kodiak: Desribe EUD UTMI routing and connector mapping Elson Serrao
2026-10-13 11:01   ` Konrad Dybcio
2026-10-07 10:44 ` [PATCH v9 0/8] Improve Qualcomm EUD driver and platform support Gopikrishna Garmidi
2026-11-17  0:06 ` Elson Serrao [this message]
2026-11-17  5:21   ` Greg Kroah-Hartman

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=57c5aa78-a116-45d4-ab32-772cd970e6f6@oss.qualcomm.com \
    --to=elson.serrao@oss.qualcomm.com \
    --cc=andersson@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=robh@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox