Updating EUD series to v3#828
Merged
wcheng-eng merged 18 commits intoqualcomm-linux:tech/bus/usb/phyfrom Mar 26, 2026
Merged
Conversation
…t handling" This reverts commit 7104631. Signed-off-by: Elson Serrao <elson.serrao@oss.qualcomm.com>
This reverts commit 583d6fc. Signed-off-by: Elson Serrao <elson.serrao@oss.qualcomm.com>
This reverts commit eb5da51. Signed-off-by: Elson Serrao <elson.serrao@oss.qualcomm.com>
This reverts commit e7e656c. Signed-off-by: Elson Serrao <elson.serrao@oss.qualcomm.com>
…ntrol" This reverts commit e2541a8. Signed-off-by: Elson Serrao <elson.serrao@oss.qualcomm.com>
…election" This reverts commit c042ed7. Signed-off-by: Elson Serrao <elson.serrao@oss.qualcomm.com>
…ulti-path hardware" This reverts commit cfe135b. Signed-off-by: Elson Serrao <elson.serrao@oss.qualcomm.com>
Add an optional consumer→provider phandle on USB connectors to reference the USB role-switch provider when no direct graph link exists. The DRD controller remains the provider via its 'usb-role-switch' property. Link: https://lore.kernel.org/all/20260223191042.825136-2-elson.serrao@oss.qualcomm.com/ Signed-off-by: Elson Serrao <elson.serrao@oss.qualcomm.com>
…iguration EUD hardware supports debugging on up to two USB ports depending on the SoC configuration. Debugging can be selected on either the primary or secondary USB port as controlled by the EUD_PORT_SELECT register. Extend the binding to support dual-port configurations by adding port@2 and port@3 for secondary USB controller and Type-C connector connections. Link: https://lore.kernel.org/all/20260309203337.803986-2-elson.serrao@oss.qualcomm.com/ Signed-off-by: Elson Serrao <elson.serrao@oss.qualcomm.com>
c88fe64 to
b25ff84
Compare
|
can you just fix these checkpatch warnings? Commit 6ca46c5 ("FROMLIST: usb: misc: qcom_eud: add sysfs attribute for port selection")CHECK: Alignment should match open parenthesis
CHECK: Alignment should match open parenthesis
6ca46c5 total: 0 errors, 0 warnings, 2 checks, 84 lines checked NOTE: For some of the reported defects, checkpatch may be able to Commit 6ca46c5 ("FROMLIST: usb: misc: qcom_eud: add sysfs attribute for port selection") has style problems, please review. |
EUD can be mapped to either the primary USB port or the secondary USB port depending on the value of the EUD_PORT_SEL register. Add a 'port' sysfs attribute to allow userspace to select which port EUD should operate on and update the ABI documentation. This is needed for systems with dual USB ports where EUD needs to be accessible on either port depending on the system configuration and use case. Link: https://lore.kernel.org/all/20260309203337.803986-3-elson.serrao@oss.qualcomm.com/ Signed-off-by: Elson Serrao <elson.serrao@oss.qualcomm.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
EUD hardware can support multiple High-Speed USB ports, each routed through its own PHY. The active port is selected in hardware via the EUD_PORT_SEL register. As a High-Speed hub, EUD requires access to the High-Speed PHY associated with the active port. To support this multi-port capability, the driver must manage PHY resources on a per-port basis, ensuring that the PHY for the currently selected port is properly initialized and powered. This patch adds per-port PHY management to the driver. The driver now powers the appropriate PHY based on the selected and enabled port, ensuring correct operation when EUD is enabled. Historically, EUD appeared to work on single-port systems because the USB controller kept the PHY initialized. However, EUD is designed to operate independently of the USB controller and therefore requires explicit PHY control for proper operation. Link: https://lore.kernel.org/all/20260309203337.803986-4-elson.serrao@oss.qualcomm.com/ Signed-off-by: Elson Serrao <elson.serrao@oss.qualcomm.com>
The EUD hardware can support multiple High-Speed USB ports, each connected to different USB controllers. The current implementation uses a single chip-level role switch, which cannot properly handle multi-port configurations where each USB port can operate in different role. Restructure the driver to support per-port role switches. Additionally, remove the unnecessary role switch call from enable_eud() as EUD need not modify the USB role upon enabling. Link: https://lore.kernel.org/all/20260309203337.803986-5-elson.serrao@oss.qualcomm.com/ Signed-off-by: Elson Serrao <elson.serrao@oss.qualcomm.com>
Currently enable_store() allows operations irrespective of the EUD state, which can result in redundant operations. Avoid this by adding duplicate state checks to skip requests when EUD is already in the desired state. Additionally, improve error handling with explicit logging to provide better feedback. Link: https://lore.kernel.org/all/20260309203337.803986-6-elson.serrao@oss.qualcomm.com/ Signed-off-by: Elson Serrao <elson.serrao@oss.qualcomm.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
EUD provides virtual USB attach/detach events to simulate cable plug/unplug while maintaining the physical debug connection. However, the current implementation incorrectly sets the USB role to HOST on virtual detach, which doesn't represent the disconnected state. Fix the virtual detach handling by setting the USB role to NONE instead of HOST, correctly representing the disconnected state. Link: https://lore.kernel.org/all/20260309203337.803986-7-elson.serrao@oss.qualcomm.com/ Signed-off-by: Elson Serrao <elson.serrao@oss.qualcomm.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
EUD functions by presenting itself as a USB device to the host PC for debugging, making it incompatible with USB host mode configurations. Handle below two scenarios to prevent these conflicts: 1. Prevent user from enabling EUD via sysfs when the USB port is in host mode. 2. Automatically disable EUD when USB port switches to host mode and re-enable it when exiting host mode. This is achieved via the exported qcom_eud_usb_role_notify() API that allows the USB controller driver to notify EUD of role changes. This ensures consistent state management without creating conflicts between the EUD debug hub and the USB controller. Link: https://lore.kernel.org/all/20260309203337.803986-8-elson.serrao@oss.qualcomm.com/ Signed-off-by: Elson Serrao <elson.serrao@oss.qualcomm.com>
The EUD driver needs USB role information to control its operation as it is incompatible with host mode. Notify the EUD driver when role changes occur so it can manage its state accordingly. Link: https://lore.kernel.org/all/20260309203337.803986-9-elson.serrao@oss.qualcomm.com/ Signed-off-by: Elson Serrao <elson.serrao@oss.qualcomm.com>
The EUD node is currently mapped to the secondary USB controller. This SoC only supports EUD on the primary High-Speed USB path. Fix the graph connections to properly map EUD to the primary USB controller. Add an empty connector endpoint for board DTS files to complete the connection. Also enable EUD so debug is available by default on this SoC. Link: https://lore.kernel.org/all/20260309203337.803986-10-elson.serrao@oss.qualcomm.com/ Signed-off-by: Elson Serrao <elson.serrao@oss.qualcomm.com>
Map the USB connector HS endpoint to EUD for debug functionality on all boards using kodiak.dtsi. Since the controller is no longer a direct neighbor of the connector, add usb-role-switch phandle to map the USB role switch provider for this connector. Link: https://lore.kernel.org/all/20260309203337.803986-11-elson.serrao@oss.qualcomm.com/ Signed-off-by: Elson Serrao <elson.serrao@oss.qualcomm.com>
b25ff84 to
afce8ed
Compare
wcheng-eng
approved these changes
Mar 26, 2026
8c7f91d
into
qualcomm-linux:tech/bus/usb/phy
5 of 6 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updating EUD series to v3