From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 182A6175A9D for ; Mon, 9 Mar 2026 20:33:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773088422; cv=none; b=oHqnQiWIdq1C96bGmN4MUnutbXGAoloZQlyrLc1+t4bTJyS1CkxvSW4kgywhbKLJ0O5SSBLGlCtVy26O0B7Nb7bbkOylZKrYFg2haECiuH8StySwwirMCaZ0HiE9/8wn8uFgbx9y2pZVaiTHQNnkKanM8K2gmVt7M/4DheVEOxY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773088422; c=relaxed/simple; bh=q38mhscR1gdYqYqY+ByN3SYm2nFCiNwlEwn7u+IVIA0=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Type; b=NPozMePYmOeCjTMDY1svReCXoR20aoaffLfNOcG8+QTLlE1R+iUi0bTr3Of4JOZ0Z/XzSv3C5RpKfd7I2SuE+Z0427hZ/Uq4Kqt6b0/M5HIlV2Oo/UjIRXCwiwg7mqN4QuizqtE+gtJJyawzrUh9ChO7WZqMIAuHoK0gS+sEJIM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=nqrGIy0A; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=AkqSKu1O; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="nqrGIy0A"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="AkqSKu1O" Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 629JFoI82872743 for ; Mon, 9 Mar 2026 20:33:40 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=qcppdkim1; bh=8kOJDOzT3HdgAsjCgYZgbv kEYJ0AkosRngtcd+/OvsY=; b=nqrGIy0AonSx2ZtYZ3vBRNkYngBE4mMTDqhkQS 1fosfKnIr7+LgrqMfwsp5B9oPjiqNTIqoNXwXoHvzfTlS11rNHo8ox9dXGGSnFea 34ZsYOLFECOhKoX4xs2ZQxp3z/q7dWxHGkgeS9+yZWyQJVzXNTvWyoG3JfVg3k9R DaNKVztQoNTxe0e8Q+5H4WSohYv2BXZe+LgQ4Sbn/1h3lrkHiduAoxZeEuXJ6yXi 1MpClV/2H/Xf2TIsr7eDd19DqO7j+V4IWKREmARQ2b/UAfgRXxSMfDgu31mUrRjP Wk832C2K5jjv20FYfUfrpd9iJ5NwtzIcz/w2imZdp4ygoGtQ== Received: from mail-ot1-f72.google.com (mail-ot1-f72.google.com [209.85.210.72]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4ct477g7kn-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 09 Mar 2026 20:33:39 +0000 (GMT) Received: by mail-ot1-f72.google.com with SMTP id 46e09a7af769-7d753cb3174so5470385a34.0 for ; Mon, 09 Mar 2026 13:33:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1773088419; x=1773693219; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=8kOJDOzT3HdgAsjCgYZgbvkEYJ0AkosRngtcd+/OvsY=; b=AkqSKu1OOo+h9d37WC7YcbrNX7ZZRNjDWUJBo7dFbRO+BAPQ7RWHOOZrK3/79HZ2v5 M+redUeewCverfHfX9SmKAWMi86DyM41MvdavA7CJAXKPCuZSXJnQ/eAX9kZ/n9ZdcRO Znp7IuWg6X2ccTSQFNLjJnF281PgLOEymFj3sYOTqBAxpKYxS00dHp2cCqTD7oROdejJ wO6djhZOu7fH1xzxWNpR3SemlXjOSnVieZxOdO3Txv1JNAY8SNBYevrKwYaTXW9sJKY0 lyGe5beKeA13gwf+VyB3JGtWkfmvWh32HH95i0kt/41M0MPkArpVn0rgMH9JSBP6lf4G Ks6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1773088419; x=1773693219; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=8kOJDOzT3HdgAsjCgYZgbvkEYJ0AkosRngtcd+/OvsY=; b=iqDdTTTevy+Bj4vg7Ipzxos52VVBvblqN7fVGj4reibu5KRkBmBbJEixFnP3jC04Mw Rf+H9PFMWPi8luWEqsNKPsnqpk60ROptcng+a5Hfchxvt5KACTozyy/hk7uMqOSFnQUA DzNZ6AAIDThBxziz/19OxzqYjUf2rtyF1nvkIixkSo58mv5FMbtojUcZRKrBUtNg8wRh g9fB+CFF34I0/GvBqOo/LnDo9FcWQLsr2cWrtSyE3+jJ0ppHC5yrt8vTIEPAfQoht2cY a6OjR0E1daCDPjmXMWNljsSDOXzj2JSXcmLCqIERFFbRUu5+MOgZJoCE810pYrxmqNMH SfUQ== X-Forwarded-Encrypted: i=1; AJvYcCUkhdC9fJpI8RSK20sKr40lddTZcLQAixsw9wP90fh0izVDLJjGl1Wai9V8wg9ud13RoojNZxltTI7L8Tg=@vger.kernel.org X-Gm-Message-State: AOJu0YypdofJXYDN9zDCy4UGyh5hqOe23Y6BkgvxskzvYvki4MYTFiLF V2PcJaWBCOeil4bN++u1EM1ynhw8LhCHgNbLWcB4piTqPIiHp8eN6IcE9kjZiS/IRfWNrYXga1y EMvMMzsvEuaN/B2XcCeK/RpxbBFXu6p9ZvekVfJB4XrqwrA/mOWgLQNM8dXSpntoCthg= X-Gm-Gg: ATEYQzwbtRcmGMses9s02+1AEraIApbBvuu3QgbTc+2trxJi1Xsvc12Qsg5IMMX3wc7 Q8jIGWl4+gNRB5EWXzaO+L0YrLPBiiF1HZ4GCzBqx0tso3B1qjzJvNcjAH2siFwFW2pyr3mCGoG qsyKH9SMZeCtU8Vci6pBPUddL0rGCnRGxUZ4rLMyY/2dM0CJU/oPDxS7SLD153X6d7f3zMn4h0B UVPaSswulIgdde73y5h/AFyBtg6HVpfrx+MnxidoVT2pngdVt/P8lzyKf/0a3I3bz4fz6l9aC6/ /HXIKRJew7r/hU1CNADs9GGuRT/c8358WZp99dYWtcQuGq/uCHcdT2C0CDNYmSsJ7vRT9/GF0ma 7NLd5r1nu4x+QYEKll7DetGtDDe0O+YOtpb86vAqEGxniCd8dKZMRz4yQPGdwtQh+sN9xik46IZ c= X-Received: by 2002:a05:6830:6615:b0:7d1:93e7:cd6f with SMTP id 46e09a7af769-7d726f57b83mr8422544a34.13.1773088419207; Mon, 09 Mar 2026 13:33:39 -0700 (PDT) X-Received: by 2002:a05:6830:6615:b0:7d1:93e7:cd6f with SMTP id 46e09a7af769-7d726f57b83mr8422528a34.13.1773088418774; Mon, 09 Mar 2026 13:33:38 -0700 (PDT) Received: from hu-eserrao-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-7d74885b5a4sm3036494a34.23.2026.03.09.13.33.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Mar 2026 13:33:38 -0700 (PDT) From: Elson Serrao To: Greg Kroah-Hartman , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Souradeep Chowdhury Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH RFC v3 00/10] Improve Qualcomm EUD driver and platform support Date: Mon, 9 Mar 2026 13:33:27 -0700 Message-Id: <20260309203337.803986-1-elson.serrao@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMzA5MDE4MiBTYWx0ZWRfX55FRzKC3p0pI 9wGoGwKB/vTx3YT4rqZh5nNh1BTdKi7l6pyx9tYmKb4Z4M/CDzhziv/bLj455IVrEYVediIMOfq ZNTaXorhi6f4i0CzdH8yfvCUYl19vdAwrThr995BFInMufNlI+BCQWIOR1KjIiI+cFFkXGNuXeE ijrkE8589JtdEIVgwVzsfSz2eTxpLHUipKhbWVaTcJwZXg3cJNtiHwusyfNrqoXIXOyGZ5Mpb/+ o81ed+B1uVjVf/VTgl8y5uiyM/8Ei+VdLVkZu0ipCezzuKUKwqF6mGI2O2NdCLHbZM4AVQLUFNT MKZjslZdDbso3FS4Z8yw6goUJDXYPzc3AN91z1CMa1Bt7ZComOVMIpIKZK8G93Ed0WRWVlLd44T eAzYPX/DinAoeJzMbFCIrejSX3VYtBQ9wr5PEKtGNuGKExU1e1R3yjfNoY7dPUbNdVVbyFc75gg I1Q2ZCmIP6unTHVeohA== X-Proofpoint-GUID: adpOhuco-a6VAGgK5cRtZ0tWIjIgnZm7 X-Authority-Analysis: v=2.4 cv=KLxXzVFo c=1 sm=1 tr=0 ts=69af2ea3 cx=c_pps a=+3WqYijBVYhDct2f5Fivkw==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=IkcTkHD0fZMA:10 a=Yq5XynenixoA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=gowsoOTTUOVcmtlkKump:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=COk6AnOGAAAA:8 a=QGAZVZHJaQu8Muxe3_oA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=eYe2g0i6gJ5uXG_o6N4q:22 a=TjNXssC_j7lpFel5tvFf:22 X-Proofpoint-ORIG-GUID: adpOhuco-a6VAGgK5cRtZ0tWIjIgnZm7 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-03-09_05,2026-03-09_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 malwarescore=0 bulkscore=0 impostorscore=0 spamscore=0 phishscore=0 priorityscore=1501 lowpriorityscore=0 adultscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2602130000 definitions=main-2603090182 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