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 6AB6C30FF37 for ; Mon, 18 May 2026 14:15:24 +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=1779113725; cv=none; b=C0ugNrzNG3eaSaLcq8lfd0k6UEMLBw4V5b2WBgt2qavJUW7gXpzoFBPLs3nBL0vvhHWRrO4WTmEZGlQTXnWsUi76Ti06+ULue5bb77FAlyy0PE4ZYXVq72WeeW67n9/l3pa6ZbJtsPnxgtk+ObZ+oa9M4OTFAJPnr7o63Pa0nRw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779113725; c=relaxed/simple; bh=TN+RB4MvwPNVjTQyrOZFsnKn9SeIOzNa7rKStzEAP60=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=jeEFZHZEPLDG9/+r7yPH2wTlt3whA/gh7eiCOpiWwtWKNAhaAm0qd+ipbKC96Bo3vIwHwX5ekHdY9ClKz3nywev0Dm5w/hUbZDE4s5+zhYGEve1VbxASlL1scvZcUCOHZA5IoHaqC/i47rTwKpGclMFKmuaxWMVPAqmjA6vZ0SI= 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=IJ9b7bFA; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=EX3N++8D; 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="IJ9b7bFA"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="EX3N++8D" Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 64I7chmO353827 for ; Mon, 18 May 2026 14:15:23 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= tl5cNuX7Q/EbJEBDKEJHU8Nft3cHRScimLTBtlsFjco=; b=IJ9b7bFAeMpd+FjF HnelMReAhJzkanlPDuAR+teQUGers9J7Zm+ABfthhX07bh1Vc9NxWJ6LodphBJlC kalNdJjr4FWUtP8gxZVN7XZdimWtPEQFDFylsCWPljAECp+cK504vDcpbzHSwg27 ciL1j398fRSEi/OjY1q0cHY1LOryCmqztZLsYSjMUWunnWr+CJOG0gmGE1zq2UQN YIXnXeR+yjSWx/Hqn9DuyAeX8yj+Zlw6cxXS5E9HYLv1iJdZW7qhYpP4mcl1GfzC CmI2BrqrSnry+0cUDS+09kki8WVyQFg/tqW8mg6wm76oTtbYsQ+RF5fAvloNPAGq FlO5dQ== Received: from mail-vs1-f72.google.com (mail-vs1-f72.google.com [209.85.217.72]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4e7xjahjd1-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 18 May 2026 14:15:23 +0000 (GMT) Received: by mail-vs1-f72.google.com with SMTP id ada2fe7eead31-6313443ffa2so119937137.2 for ; Mon, 18 May 2026 07:15:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1779113723; x=1779718523; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=tl5cNuX7Q/EbJEBDKEJHU8Nft3cHRScimLTBtlsFjco=; b=EX3N++8DZoxuC8rXsGGKKn0hPKV4VDPBA66SGMy85J0yJo3paCCwsOJMt5WhuLdDAa JZ+h0W1a5a2ZDe91QxKYoJceHZ/gzOlUAb9amaWU3R1f5IPwvrZ1u9BlHo2U/jKryEIO S7ailnoXLRlM0ecRv6H5i46EmvJ5asgFvKDC4cIpUwuvEONs4M0jcTcsUOA4MBhxVVh3 urOCjCucNSrsqKYIwJaKweO6BSDHxiWqx0vt8mPmzmi/kDeYzM8ZRhLJbSIZhJxlfGAC GYm+UvfVR4ace1OodU0EnL/iRV3srZHWA7qUYqq5MkgobQKjufvUVpXq2A39Nusrf0oT 7TUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779113723; x=1779718523; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=tl5cNuX7Q/EbJEBDKEJHU8Nft3cHRScimLTBtlsFjco=; b=pChCBlwgblIs+Q7lDIzLL0xF5kJwFZWFYcDTgbDr38ghFinCphdMNOVKl1kOXJR6qs M0qtNGX360CdGKZWIQtGcywpSd7LXHJAJdlmnBxhd9jVuZOtGTDuUIqb9p2HPgIQhcPS tt0soMyH5UoOyVn5zwkEGePkMzD6bKX0dYspEmYMvJuL2rdK9cS6Ow3f3E5RtS3/lmmx Uv4t+vMf/Ak/K8da7HmLqLG+kD6AHilcuvTqy+gr/1/GNMe6mb6LRHkd9wS9iTtAd8EC tEJanDJSSG0uXxISUKnQh/7uYPVvaUUxeVsFrFYu9Ve4pM/w4TETicR0Iysd5ap0VfiR EIBA== X-Forwarded-Encrypted: i=1; AFNElJ/C4tQM8npX0p9f/Vr8RfF4F/lxsqPSHSrUCaowVXDfNnXFtuIKZDQ4i05DPoJ0dHIZdThdkrNX8CIfhzk=@vger.kernel.org X-Gm-Message-State: AOJu0YxY4yXm8+cwNmv9UGAgTGflRNpGtCVOTpzMpb9ml4zpC73Do0Wf xo6zq2/Yl6nlht7BFX1VC/WbDHa1vMA3u9pQbtt05uWhVhMJKE/adDBSSp7Q7NofClv119vNu7N GO/6dpXNxB1LXj+t/aGaZM4nK2P2xEpemwIeRaJMbDkgqV0xhTfxXfuwiiQfUm1yeLOM= X-Gm-Gg: Acq92OEIkhsy1zyALisOCCNnIBfspFkiiB4tBPJE7d+PcXrCugheMmRAmzBSRk+A9tq W0ADbiFjc3ENNbRKrHRqW3QM9iI2679DQZTR8Vt1i5ekCpMAi0KShHJEVTYdC+LWgkeMMjM+zKe 96BfY+BkzHqFcH6rldOkIrdxJwBHr1+nD8ul6K97Tzwuc5fKG8c4g7fxMDwWCX+S9wOFvPc20UQ FqIyxSGYoH4adGWLGVyt1/vz3Q4nJ6KlZuHtLXfGtVNefcGcBNuxa+34E1YRJ06c0q5XBjmnNcb wlVG2SHd+uQnL7A4DeYwXbGokJMtLi8p3/LTmNSAsVWKylEFH04JR4d1PYxoznOIj7ZpaP4ec+3 XvbUMdh5cvnpbdz/x+T2Tez8J3rUovbFRsrDxxYXlpEADhb/blc5Dl6RcPRlGHBhhBDoqFCjs/i Wrpd4= X-Received: by 2002:a05:6102:1242:b0:62f:46c:40bb with SMTP id ada2fe7eead31-63a402a0379mr2115110137.5.1779113721950; Mon, 18 May 2026 07:15:21 -0700 (PDT) X-Received: by 2002:a05:6102:1242:b0:62f:46c:40bb with SMTP id ada2fe7eead31-63a402a0379mr2115097137.5.1779113721214; Mon, 18 May 2026 07:15:21 -0700 (PDT) Received: from [192.168.119.254] (078088045245.garwolin.vectranet.pl. [78.88.45.245]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-bd7bbae7a93sm132624466b.22.2026.05.18.07.15.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 18 May 2026 07:15:20 -0700 (PDT) Message-ID: <9aad8e45-b0a5-4c59-8793-8c0747d8fafa@oss.qualcomm.com> Date: Mon, 18 May 2026 16:15:16 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 3/5] phy: qualcomm: qmp-combo: Add preliminary USB4 support To: Dmitry Baryshkov , Konrad Dybcio Cc: Vinod Koul , Neil Armstrong , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, usb4-upstream@oss.qualcomm.com, Raghavendra Thoorpu , Mika Westerberg , Sven Peter References: <20260518-topic-usb4phy-v1-0-71d827c49dca@oss.qualcomm.com> <20260518-topic-usb4phy-v1-3-71d827c49dca@oss.qualcomm.com> <4nqlpu7qfptekyn77sd7sdn446stgn3v3lw2356bvizrnvjgnr@czqgivemigt5> Content-Language: en-US From: Konrad Dybcio In-Reply-To: <4nqlpu7qfptekyn77sd7sdn446stgn3v3lw2356bvizrnvjgnr@czqgivemigt5> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTE4MDEzOSBTYWx0ZWRfX+SmJfoDxs7CJ FuJzScW1c5e6SqxCrsKWmkte8RErKYV/rJw+duQgbQ2jyaO0vcPymUbIBxezR4B9K77J9R139oz LeJYGH5VXFpZz8FXG/c7kwsXwlcV2KK9Xfil51bNmOvjQ5foRF32m6Fz5h6tlwHJQiHnKvAF3KG d3XSFT4kxciTbNAroiHlgLULQAsq6cWg9nA4wMOP10IRHAe+TYVchE4xr94kGZGrzHWLy+rvZCn VKV2tkXoIxbokT0XoRj9GBALAhZ4swEk9UU2NrZQ6EoCcHrXrx/mXfHRoAi64ffWrRIKB97ff7m E/52/5HFBIKMx3LrMG//kBHZA2+rEXyZnUny6m7DDhqD4ghd8IzGjsoXBs7LW348KuBTSRAjgZC s7JCzO0zjdY3HEJiyipoRbz/gyQdXjbrsxVkwUaRv+E6o8q6ppwtS7szY5XSWZNJs4vT0Pfg48F t+We/56Xk0PT/KrhgQg== X-Authority-Analysis: v=2.4 cv=BYHoFLt2 c=1 sm=1 tr=0 ts=6a0b1efb cx=c_pps a=DUEm7b3gzWu7BqY5nP7+9g==:117 a=FpWmc02/iXfjRdCD7H54yg==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_glEPmIy2e8OvE2BGh3C:22 a=EUspDBNiAAAA:8 a=KUSMMZrqeANCeUtcB44A:9 a=QEXdDO2ut3YA:10 a=-aSRE8QhW-JAV6biHavz:22 X-Proofpoint-ORIG-GUID: 54zdoIEDGtRPf80ll4dV3Rx6CXyku17- X-Proofpoint-GUID: 54zdoIEDGtRPf80ll4dV3Rx6CXyku17- 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-18_03,2026-05-15_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 suspectscore=0 priorityscore=1501 bulkscore=0 spamscore=0 phishscore=0 clxscore=1015 impostorscore=0 malwarescore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2605130000 definitions=main-2605180139 On 5/18/26 3:57 PM, Dmitry Baryshkov wrote: > On Mon, May 18, 2026 at 12:29:50PM +0200, Konrad Dybcio wrote: >> From: Konrad Dybcio >> >> Some Combo PHYs (so far only on SC8280XP, X1E80100 and Glymur), come in >> a flavor called USB43DP, which as the name implies, features USB4, USB3 >> and DP signal processing capabilities. In that architecture, USB3 and >> USB4 PHYs share the same USB_PLL while featuring separate logic spaces. >> The DP part is roughly the same as on the instances without USB4. >> >> The USB4 and USB3/DP operation modes of the PHY are mutually exclusive. >> Only one USB protocol (and flavor of pipe clock) can be active at a >> given moment (not to be confused with USB3 not being able to be >> tunneled as USB4 packets - that of course remains possible). >> The DP PLL is still used for clocking tunneled DP links. It may be >> turned off to save power when no tunnels are active, but that's left as >> a TODO item for now. >> >> Due to the nature of USB4, the Type-C handling happens entirely inside >> the Host Router, and as such the QMPPHY's mux_set() function is >> nullified for the period when USB4 PHY remains active. This is strictly >> necessary, as the Host Router driver is going to excercise manual >> control over the USB4 PHY's power state, which is needed by the suspend >> and resume flows. Failure to control that synchronously with other >> parts of the code results in a SoC crash by unlocked access. >> >> Because of that, a new struct phy is spawned to expose the USB4 mode, >> along with a .set_mode callback to allow toggling between USB4 and TBT3 >> submodes. >> >> Thunderbolt 3, having a number of differences vs USB4, requires a >> couple specific overrides, pertaining to electrical characteristics, >> which are easily accommodated for. >> >> Signed-off-by: Konrad Dybcio >> --- >> drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 392 ++++++++++++++++++++++++------ >> 1 file changed, 322 insertions(+), 70 deletions(-) >> > > Overall it looks good. The major question (after looking at TODOs), do > we need a separate submode for USB+DP / TBT+DP? The problem space is as follows: After a TBT (collectively TBT3+ and USB4) link has been established and we have a link partner, we may (based on the HW capabilities and user config, such as kernel params but not only) start or stop a DP tunnel at runtime. On Qualcomm hardware, the PHY is kept in USB4 mode and its DP AUX lines are not used (instead, the encapsulated DP AUX packets are r/w entirely within the USB4 subsystem via a pair of FIFOs that Linux sees as a separate DP AUX host) Then, on hamoa/glymur specifically, any of the 3 USB4-capable DP hosts can be muxed to either of the 2 DPIN ports on any of the 3 USB4 routers (and each of these routers is hardwired to one of the PHYs). To underline, we have 3 DP producers and 6 consumers. If there's e.g. a super high-res display at one of the physical ports, or a long daisy-chain, we may need to use 2 DPTXes to service 1 receptacle. Then, we would only need one of the PHYs (associated with the router that's wired to that port) to provide a DP clock. This, along with the normal (logical or physical) present/absent status can change at runtime. My plan is to use phy_set_opts(dp_tunelling=true) or something along those lines to toggle that bit as necessary Konrad