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 AF3AC1A304A for ; Fri, 1 May 2026 17:06:39 +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=1777655201; cv=none; b=npLfmtCBAQfpzd0p3EhstaRZmDUGapjHZUxmcC1dmnqpKGuAJixu2oKySVm6JdqZI/+DeGCIKS10tSUzhdT32RARa2G1oEGK4sgGO8+3mANKgk4hLzEpKP8uR9L7OqvzJecoKlrkjdSsLa6zh3IRP+Ozj2TqG7F5Uy+9bZJK33o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777655201; c=relaxed/simple; bh=um2Fwsw6rvf7kRd8oo8QyYOwgm+AurrV4ZG+qMUluyc=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Type; b=fPzbZEZms0T31+AWeyG7DRixYTP2DBueuwfSYkgmNrfKisILKdIowy8eIQviNVifc0qC7dfV7ZjvBEKJseHwRVOVUfdB9muTJbjGMlhMxDoV0Dih779mbKPHfXI6ruc2iZfGZhtOP3WCzZOmZIGHpQ1rJHKaTVxGtfZpPdcwj7E= 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=oJ5WCHOM; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=G7jPqP0U; 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="oJ5WCHOM"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="G7jPqP0U" Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 641GLXWA497925 for ; Fri, 1 May 2026 17:06:38 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=X6aSb18fufpWwdWm48PtfA AcEMvP6VgTU96OpcmHLrQ=; b=oJ5WCHOM29Rmtf+aB74L+wEu99OdEW+HicbFOH 9/7waJ029DZW93x7C8X0AMcYMYoPZkc+/nhjZhPdcxIF8eTZdQtzs3+ulK20NHI6 6SMhs5+OfG0bH7WzijtKDNnXX0zZ/uVXISuZGqgYCBq0saiQAMqHMgx8Ta0xBhBP uYA+n2ijugisdvQPH1pFh9vrDEJadhs+WwojyhK4pmy5ZV2Z/s29O/XwIGk+Sq4N sf8NeH50AMl9edGPSFRNd50gLql1rY/3yeMjnxaDK+2Fcj78IEo6WQBpdJnFZt+A IaSJrohr7dZ6dN4/7ABClZPnQxCWi8o2fZYl7uWcZ/JYCggQ== Received: from mail-dy1-f197.google.com (mail-dy1-f197.google.com [74.125.82.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dvchkbc29-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 01 May 2026 17:06:38 +0000 (GMT) Received: by mail-dy1-f197.google.com with SMTP id 5a478bee46e88-2ee5b73c5f2so1420963eec.0 for ; Fri, 01 May 2026 10:06:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1777655198; x=1778259998; 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=X6aSb18fufpWwdWm48PtfAAcEMvP6VgTU96OpcmHLrQ=; b=G7jPqP0U23V7NUGruZmKW1JBr0jMGSABgSCK9c62lCqZVrwK/0FccFO1sW7RDWu/c2 rQO90m2X/oXfCZVFNTFmplS+/sGs6RY5DYeI+E/pDFMlgm4QoRoHg+3hDh5gwkraxUwr e79rq4C+LnF5fRyubkJgNssei4AP+WprAc+MQXr36ZqXe/ofCOlY/3SpbfeN1pLZ9vxX HGCLNx6/axHfFs64SNPWzg15VhsVXONfKx08L9SK18D9wvYvPiz4NpDiCx45DZSwYa3u rlmizKYKp3PtrDdt5GX8ig+4Xekz9jNlBBmhgCRXfVIzNdHHS7b406fy8wrb2TKBYOCL su9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777655198; x=1778259998; 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=X6aSb18fufpWwdWm48PtfAAcEMvP6VgTU96OpcmHLrQ=; b=XFH2mb0J2/mQ+PoOj5zcN1tqZkZDSc8UaOHb5ChpVD7i+rWjg3BI2f31VZJP79bJ8J +T7vuLdibh6couojBl51zQ3BhSKkF7okbuNsgie1ps2oe9OrN4+BZtELOZ5GM5/WMT8V I6HgI5nN8wgbgpnAy6c8vYLdgAMMSjtkuae2kQm4wp+FdjTYC5QxAC67BwdRXy+YEyQx cORIdWZLgwfmVqTEQBu0jMKAP/n2uissI0L8m7ssFanRADt9xTnJYWuIHoNbNHx14LbW H39CmrXnc6gPE7HvtsKgb0A8Ch6AvebzxQ2PQLbfQKB/9ePo47Bp21Lkzvp51Z46R/zI MrKA== X-Forwarded-Encrypted: i=1; AFNElJ8nGz0ZC3OKG718rxf/vPfXBcklXRccxaYyzIxOuukBizHvF1aBWXCh7DE4Ru69zGK6l3T5Uh9hBwlSAHU=@vger.kernel.org X-Gm-Message-State: AOJu0YwgeLboamx8GJXv3XKZzHlJChJVKq7cZPiMncN1r8Ln83KVOuDy 5QCxH2UTDKGSOhPHIan9BRUNiHyivAuvpztedYi2AwFHsZ/m8trIUgP2PiDU3ZoG6txoGRCVn7v m+QlSBjYt4c8AYFk3RfbMCI/+eN9BHP8+HNJHIzlT6rugPtv8TLgfpsAeXIXVb2qz9XQ= X-Gm-Gg: AeBDiesScJNcdZVa3BfPIsSu/vmnF8y0HfeihtRsKrczgv1NstyneOT6c7awr9ClZd3 xpOP52dR0TLm68P7pasO4wPvVMuLmeStV6fL4DCddbhGEzE1Yvi1uwXstpbV4JZ/YKdaPKknwuy 1HTtAxhJ6OZsBmv43esdGWE6kUJR8q4O9qSyd6FU3kloMtz76rFN8WXnNXNC3Polfj1DS9WiMOt 2rL77Ht7/awxBFoRMufazzV8HoU89MUCPlR6tyCqw5ySOyRciFnMeYhcFhuK9xbbvg6OiaBf2LI r1C34w2136yAfb7vqpDpg7HXCNiMx4IUsT2PXC/2LA8gdAmmb2jZqkSbazqI96MPg+UmF9j6/bB J/pnjbdbEJdY7/gFRy4AN7LoD4/DAC0Oqo3cz35SlTHrsxA0wuRw+dTCN7KOS6xSeWp0ufZYBAw 8bIV2gHn70+g== X-Received: by 2002:a05:7301:d8f:b0:2ed:e15:c926 with SMTP id 5a478bee46e88-2efbb96db14mr84759eec.34.1777655197468; Fri, 01 May 2026 10:06:37 -0700 (PDT) X-Received: by 2002:a05:7301:d8f:b0:2ed:e15:c926 with SMTP id 5a478bee46e88-2efbb96db14mr84721eec.34.1777655196683; Fri, 01 May 2026 10:06:36 -0700 (PDT) Received: from hu-eserrao-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2ee3537d300sm6655978eec.0.2026.05.01.10.06.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 May 2026 10:06:36 -0700 (PDT) From: Elson Serrao To: Bjorn Andersson , Dmitry Baryshkov , Greg Kroah-Hartman , Konrad Dybcio , Krzysztof Kozlowski , Rob Herring , 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 v4 0/9] Improve Qualcomm EUD driver and platform support Date: Fri, 1 May 2026 10:06:26 -0700 Message-Id: <20260501170635.2641748-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: AW1haW4tMjYwNTAxMDE2OCBTYWx0ZWRfX4aQ8U3//XLn5 OxwFxDQxL8XxmuMeXtgk6VhOMriJFVDkMNgbvAQq3otolkFo/yzW0YN0JekYtwuj9DNMiB+pgZs 1bL3j9jgw9Kt21XsGorAy3J8b2Y0A/54p4APGYe0/vSEwVTlglIZ02u5OfGJBSN9kSmzAQV1fYM uvjcVm4HSPU0P7eXK7gTDdwHVssbH7fWeL2Z3PZ8yyrNRDSeNKbkBQTEvDbaYe4KA8Kd22iW9EZ wcS+ULzL04cHtMLxuq1BxJ2V3eIzblBqnsBnilu1srHsOpZTZmQXNiw2n3MTpm01lCD6hTHg7ex 1o8q6ee68+8/lmA8Yih7F+3UnQHoHsNoCxMt4b3bOKYZFeTHj/hEpy++3ney/fjJKRJwtDjGR87 pjDK8gNv/4yfg84lu/0BPNSCvJEZJXL6JnCkpLT7foa/oWJuBUAoEmosCWoOHgzdHbRHMYs4FjJ JdGijTzzV9TLzNptiIg== X-Authority-Analysis: v=2.4 cv=Zdkt8MVA c=1 sm=1 tr=0 ts=69f4dd9e cx=c_pps a=Uww141gWH0fZj/3QKPojxA==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yx91gb_oNiZeI1HMLzn7:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=COk6AnOGAAAA:8 a=Yfec-YhPFyhUVWsMdDIA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=PxkB5W3o20Ba91AHUih5:22 a=TjNXssC_j7lpFel5tvFf:22 X-Proofpoint-ORIG-GUID: kNw6EpOVBT5b1TVTAYrHtUpNdncszYN1 X-Proofpoint-GUID: kNw6EpOVBT5b1TVTAYrHtUpNdncszYN1 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-05-01_04,2026-04-30_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 bulkscore=0 suspectscore=0 malwarescore=0 priorityscore=1501 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2605010168 Note: This v4 revision introduces a design change compared to v3. Based on discussion and feedback, the binding adopts a child-node-based model while preserving the legacy top-level 'ports' property. The child-node approach is required because EUD needs a separate OF graph per UTMI path to accurately describe per-path role switching. Link to the discussion leading to this decision: https://lore.kernel.org/all/20260324172916.804229-1-elson.serrao@oss.qualcomm.com/ --- 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 | | | +------------------+ | +------------------------------+ 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 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 (9): 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 host mode coordination usb: misc: qcom_eud: fix virtual attach/detach event handling arm64: dts: qcom: kodiak: Describe EUD UTMI path using child node arm64: dts: qcom: Map USB connector to EUD on Kodiak boards Documentation/ABI/testing/sysfs-driver-eud | 16 + .../bindings/soc/qcom/qcom,eud.yaml | 55 ++- arch/arm64/boot/dts/qcom/kodiak.dtsi | 35 +- .../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 +- .../dts/qcom/qcs6490-thundercomm-rubikpi3.dts | 10 +- .../boot/dts/qcom/sm7325-nothing-spacewar.dts | 10 +- drivers/usb/misc/qcom_eud.c | 346 ++++++++++++++++-- 10 files changed, 446 insertions(+), 66 deletions(-) -- 2.34.1