From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=205.220.180.131 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796286073; b=wOJaY5t1XpIwux9vISE0ztf8k+fS+FhIj6kpQiCVM9GvlCP5TLDLWBoPcAkXn/4KnQM9 gy7dlZDoj2ZxCQtrYIGkzu4j02/kXk6grXfo/HUTcvW3JXGIaChS1lvxhcjabfQbZWQq5 QORPr9m87uBWthFOkJRor0f4fAdK/47hiCy7ZEXYQkMGgAlNB5zNTvUFnS7cBN/nBc1xx 1gVfsKhT5FBqlRiGbOTDuovh4Fay9jSS2Zp6pYxuylVqfPIvsR+oA6bkymqRiTDu2qxk9 HvR8+DV2gdrqBy4Xy6MNNkQJnPN1z9re+nh2o5+INzu0OB50CMEQ0yOTz8xIch8MpfA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796286073; h=DMARC-Filter:Received:DKIM-Signature:Received:Received: DKIM-Signature:X-Google-DKIM-Signature:X-Forwarded-Encrypted: X-Gm-Message-State:X-Gm-Gg:X-Received:X-Received:Received:Date:From: To:Cc:Subject:Message-ID:References:MIME-Version:Content-Type: Content-Disposition:In-Reply-To:X-Proofpoint-ORIG-GUID: X-Proofpoint-GUID:X-Authority-Analysis:X-Proofpoint-Spam-Info: X-Proofpoint-Spam-Details-Enc:X-Proofpoint-Virus-Version: X-Proofpoint-Spam-Details; bh=5ZKA2pg+sIz0iwa3NcZ3jB3HKqfsd6edNUZgm5gcEm0=; b=lkESN1X4y288Vpr3aMciZbC7CgRtgSx4EaLS7EGiGjGemTG9Tva5JcrYK8MNfaEggAq6 ULZtrVIdC4WDFMl9zldIKD55WCnxxNeTU91qglmeb5tCTWuo72iILIVjd4dt3aX7YBEJT xaVEjxlzLdKGxaIxuHBU7Ji9OZP+EXqC0YSduxzPxHzj22QqJucvifO0JvLFnLIJ2NipX 2zCpppaY5TAmfIW3IEURybkjMFPCwv5/dkdSArXv/GyHvepAp4zz+GFZ6jzoT2TlAZ625 wRVoWAZzn+f0EKV8ZilvNVLomAjUSFP++6nUoOp6VhHlGlMoK89PgdNSNHQS0/gs/Tw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=pZXkZ7qH; dkim=pass header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=SPe2XEZ+; arc=none smtp.remote-ip=205.220.180.131 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F1EF2606A330 for ; Thu, 3 Dec 2026 08:21:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org F1EF2606A330 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none 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.a=rsa-sha256 header.s=qcppdkim1 header.b=pZXkZ7qH; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=SPe2XEZ+ Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6B36kVIC607836 for ; Thu, 3 Dec 2026 08:21:12 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to; s=qcppdkim1; bh=5ZKA2pg+sIz0iwa3NcZ3jB3H Kqfsd6edNUZgm5gcEm0=; b=pZXkZ7qHaL73jw8p6sc4IYgiHkfCpL8kS2ZI42vI BTrPiglN4J7EF18a0sNMxKPbqFOXIxsiszNrcjp/ByihPS6XNqyxE/RvV1kqkUUa sa3f7l0TfdRjeErVYnJsBaOm/bHungoWeC3P72QK2tCLKv3pa2x0KTkbZkgntpP+ 9uX8lPC4bCCCFH5IdIif1/VJaKNOOurpH7YekdUvnRXpxyGe9dE3IzRDjo3Jbkzv 4t3M93348rmdnRm5KBJxkTkhX+DVTZhVPhqsgxkekYEqJ7JECO633/YIvqzji8pA 9NpkR4vNikuCoG5LZRYlAwY94vHCQ914eV3qMCddP/xi9g== Received: from mail-dl1-f70.google.com (mail-dl1-f70.google.com [74.125.82.70]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4jayjdsf0g-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 03 Dec 2026 08:21:11 +0000 (GMT) Received: by mail-dl1-f70.google.com with SMTP id a92af1059eb24-1b56c696405so10094401c88.1 for ; Thu, 03 Dec 2026 00:21:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1796286071; x=1796890871; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=5ZKA2pg+sIz0iwa3NcZ3jB3HKqfsd6edNUZgm5gcEm0=; b=SPe2XEZ+O8VvRSQ6HRM14TFnsd6S3dYifmaqgO7EJzI8l9g0fl7pGRdbl1JltTWe/g wJrGLzfS0+tdmNjEsMYprGc99KNTVRYkymlCcyyaz7O6xZfk29fzwXbg7QRv3V0clvSC uEHQLzNmK08rjbcTyvOoU30esrgNH6mUnNa9vcx4oP+IXzCR95olI6EXcNdJEA+ieFTO oTO6Znm2ch7FPSJvPHkg2JZ/zjrfqWnIiqDPZz1/Zf/oEcyqjFfypHZLtqg42nk7TpR/ 7EhptlnrCuRu7DS7uaETAxixdC0z/FUUXyPb2omMUVu+lTRfdB5aPTC6nFX93z+SvQnk PYyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796286071; x=1796890871; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=5ZKA2pg+sIz0iwa3NcZ3jB3HKqfsd6edNUZgm5gcEm0=; b=QiFmdLYTzAaYh4OFaAXCnr53yu66cD5JYD31NsDENhheKm7wWGHPC52rFKrtQk9vRa A+RXNsf8tP72MqRPGPcrOP/NfjHVJ72EPg84hPi4YR/DaRPgDjxZddYj6FeYasMN0P1P xiKKvNv1tEIdawsrZMr/7L2VLADAV1hnJgrydqcz1P0vvNs+lfKOGXjxeze9OwFotqFO 6bGcOpXkBwc1Lct62GfpxLi1eoJfLwvmgi9xVMJiL7YhQUdrYXygW4FqGDC67s3BYArs F4NMp85ov1vqXz8UPj2ERMRBdkq2fAcrSxjIS+d5p75z4Bb7X7H/HpGF4sDRJOUiH3wz VAow== X-Forwarded-Encrypted: i=1; AL+hErHk+dKJbSyq3DkXnhbcp2Wlxxvkzhq6mvUkytX/tZ0dwn/mMHvQttHV/FpYmDuIx8e0m05+5J/cXzo=@vger.kernel.org X-Gm-Message-State: APuU4Z/d4oMJnzZUZblxbkiFA5xEEgRhs7U9o/IwQvZOfeVEHbliHc+q L/q6IvQZXALb9yR+fOX/W1nnTma87sSmC9ZQVo9Kd0GDWynPzHyY/4dcX6bsD8ok5GF2bSE2lvL k2WwfIkH9fcsQjAtrxHUUvflE8IxryKpvtLmzK09eeIR6CS1yA9N7a0dQctoBCMk= X-Gm-Gg: AZFdTZd9PSQINHLNmGKNHXz3TGvnN/A8xodU2qAVlzHP5r9EEYn8n+R5hMZDz2o5uMi EciYO6Qscq946b9Rna08qDfy/bGy+mIxdbJKJ2x9TvuWIVi1BKGgJlliYImuaMsdBmgzouhuTwK ZYj2ch34Vg3TNY6tDOdcMVcPTjykfHp3HECwSbaqS1GfqT0toVNMGW1roqJyqaJJf7CyHgIhUJj CiiagCFJgwBT5b9NQnVb7CHxA/EFykx2Sr0NiWl2WKeV0CqcHLim1xGATaw+z+EQPEDhpabnPA6 VWRP70ZtjEiTGfgM+grgzWbC6P3bkmWe6JzJ34/yagKzXErdbT2mNkaMHqwweKWWHJptPCIZNNH mTfVoAwhtY74ayyJv6bIWrMsbSLuKH42I5n9RBDBSf+z448swYpIyjFFASxgF2Keo58Dl8jmBqx vy8szfdtH/U2E3zgfJu/BtGQ== X-Received: by 2002:a05:701b:240b:b0:1b5:c1c7:6a4a with SMTP id a92af1059eb24-1b5c1c76b44mr5889492c88.25.1796286070649; Thu, 03 Dec 2026 00:21:10 -0800 (PST) X-Received: by 2002:a05:701b:240b:b0:1b5:c1c7:6a4a with SMTP id a92af1059eb24-1b5c1c76b44mr5889453c88.25.1796286070070; Thu, 03 Dec 2026 00:21:10 -0800 (PST) Received: from hu-petche-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1b55684c85fsm157759766c88.14.2026.12.03.00.21.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Dec 2026 00:21:09 -0800 (PST) Date: Thu, 3 Dec 2026 00:21:07 -0800 From: Peter Chen To: Joonhoe Kim <26rote@gmail.com> Cc: gregkh@linuxfoundation.org, Thinh.Nguyen@synopsys.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, andersson@kernel.org, konradybcio@kernel.org, heikki.krogerus@linux.intel.com, abel.vesa@oss.qualcomm.com, abelvesa@kernel.org, wesley.cheng@oss.qualcomm.com, krishna.kurapati@oss.qualcomm.com, konrad.dybcio@oss.qualcomm.com, dmitry.baryshkov@oss.qualcomm.com, neil.armstrong@linaro.org, val@packett.cool, balaji.kalkonda@oss.qualcomm.com, tvlad744@gmail.com, effeffe99@gmail.com, prashanth.k@oss.qualcomm.com, yongxing.mou@oss.qualcomm.com, tapas.rana@oss.qualcomm.com, vkoul@kernel.org, linux-phy@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, jack.pham@oss.qualcomm.com Subject: Re: [PATCH v4 0/2] usb: dwc3: qcom: Keep USB 2.0 working in DisplayPort-only modes Message-ID: References: <20261119124558.1548-1-26rote@gmail.com> X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Proofpoint-ORIG-GUID: HUg_TOCkxBVldnuZI4wZMSn4HYNkFisF X-Proofpoint-GUID: HUg_TOCkxBVldnuZI4wZMSn4HYNkFisF X-Authority-Analysis: v=2.4 cv=QpLLTlyd c=1 sm=1 tr=0 ts=6b112677 cx=c_pps a=SvEPeNj+VMjHSW//kvnxuw==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=kj9zAlcOel0A:10 a=pUM-KoujPXoA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=VwQbUJbxAAAA:8 a=QX4gbG5DAAAA:8 a=pGLkceISAAAA:8 a=EUspDBNiAAAA:8 a=jp54ifPz931SL2GrCewA:9 a=CjuIK1q_8ugA:10 a=Kq8ClHjjuc5pcCNDwlU0:22 a=AbAUZ8qAyYyZVLSsDulk:22 X-Proofpoint-Spam-Info: AW1haW4tMjYxMjAzMDAzMyBTYWx0ZWRfX+GEUhB0TL3kk duNbfhx7BBWd1DP8KZBd4XZXsjI63lXQa+rzUw3zWqobl+WVVOgv7LWsLorblu5RXSdxypganJU JPO1/IccZKlTfClPzI9/50zuUj1MD7U= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMjAzMDAzMyBTYWx0ZWRfX93/m7q4XmQJB Lonv6CKFmAtiReR8JSv0QqTUiU7Q5sgrzJbFlItQzXv+0TnjYwjaLrFiXnwGZDs1BjKYK2NR352 oUZJQ8NzuS5/0ePomgrd1+1e9NkUgRcxkOM3ZqmWuaDtpYHLUrUbzjdV5kwov63sCOWXgaDBfKA n/mjiFmmSpJQ1st47zVJTGI0Sbas/4E27cl5P+/z2qgat2McJirLkT36PnTiluLC5ubi5wjU3rR 8SqGl9DkuUIhmqrCU0Gk1DKMfXuuJX8TpB2hYPDUVeK/+tCyLjLGMuSGc7Ze1+RxxSR4+Mckn2x mPGt9sM0hMeIb2SOloDLzIYPnj1TX7W/IKtNaOHnYDxX4tTkqaqSVQC8LycArMbFc55eWB07mXo BnbK595YfTAO9/9vOg8l3ICKu84YDzruGYgu56kCimsqDSd7lRjSZOVF+kkYxcMo7B5mSN+c4fn UIvzoK3ZvEck+3fF/1w== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-12-03_02,2026-12-02_07,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 malwarescore=0 spamscore=0 bulkscore=0 adultscore=0 phishscore=0 impostorscore=0 priorityscore=1501 lowpriorityscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2612030033 On 26-11-23 18:47:07, Peter Chen wrote: > > Thanks for explaining the trade-off in the cover letter, I may > still prefer that the PHY notifies the controller is better, for > the reasons below. > > - The controller may not know well what the PHY really did or is going > to do: > > qmp_combo_typec_mux_set() has its own policy. It does not > reconfigure while DP is powered on, and it skips the switch when > the PHY is not initialized > (drivers/phy/qualcomm/phy-qcom-qmp-combo.c): > > if (qmp->qmpphy_mode != QMPPHY_MODE_USB3_ONLY && qmp->dp_powered_on) { > dev_dbg(qmp->dev, "typec_mux_set: DP PHY is still in use, delaying switch\n"); > return 0; > } > > /* The mux still receives Type-C events, even if all PHYs are uninitialized */ > if (!qmp->init_count) > return 0; > > At above cases, no switch clock from PIPE to UMTI is needed. > If qmp-combo calls the controller right before it tears the PHY down > and again after it brings it up with the new mode, the controller does > not add wrong or useless settings. It uses the UTMI clock while the > PHY is being reconfigured, and goes back to the PIPE clock only if the > new mode has USB3. > > - Once DT ABI is added, it combines the kernel code with DTS. It needs > to maintain both DT property (graph) and kernel code correctly, eg, > it also depends on the layout at pmic-glink node. If using PHY notifies > controller solution, it adapts for all related SoCs, and no dts > dependencies. > Hi Joonhoe, We may want this feature to move on since it is important for USB/DP altmode application. The similar solution at Rockship seems to settle down [1], there is no more comments from both USB and PHY maintainer, would you accept the notify solution from PHY to Controller? If you accept, do you want to implement by yourself or could accept that we (qcom) implement it? Thanks. [1] https://lore.kernel.org/all/20261114-b4-rockchip-dwc3-rockchip-glue-v19-0-b79fb5f4b42a@collabora.com/ Peter > Thinh, What's your opinion? > > Peter > > > > > On Kaanapali the PHY becomes a mode switch with Balaji Kalkonda's > > DisplayPort series [2]. The controller side for that SoC is a DTS patch > > sent separately to the Qualcomm tree [3], and Tapas Rana has sent the > > same for Glymur [4]. Neither should be applied before patch 2: once the > > controller node has "mode-switch", pmic_glink_altmode defers its probe > > until dwc3-qcom registers the mux, which only patch 2 does. > > > > Patch 2 is on top of Filippo Falezza's "usb: dwc3: qcom: Restore UTMI > > PIPE clock on resume" [5] and reads the selected clock back from > > QSCRATCH, which loses its contents in system suspend on SM7250. [5] is > > still under review; patch 2 will be rebased if it changes. > > > > Patch 2 adds "depends on TYPEC || TYPEC=n" to USB_DWC3_QCOM, so with the > > arm64 defconfig (TYPEC=m) dwc3-qcom is built as a module. > > pmic_glink_altmode then probes later, and a monitor attached at boot > > depends on Yongxing Mou's "drm/bridge: aux-hpd-bridge: replay last HPD > > status on hpd_enable" [6] to be detected. > > > > Tested on a Lenovo Y700 Gen 5 (TB323FU, Kaanapali) with the series > > backported to a v7.3-based tree that also has [2], [3] and [5], with a > > USB-C monitor that has an MST hub (two displays, DisplayPort over four > > lanes) and a USB 2.0 hub. On each of 5 plugs the controller switched to > > the UTMI clock 1-2 ms before the PHY switched, back to the PIPE clock on > > the next USB state, and the monitor's hub enumerated. After each of > > three s2idle cycles with the monitor attached, both displays and the hub > > came back. Plugging the monitor in during s2idle woke the tablet. The > > mode arrived after the glue had resumed and was applied right away, > > before the PHY switched (once with each clock selected beforehand); the > > path that applies a recorded state on resume was not hit. A USB-C hub > > with DisplayPort and USB 3 kept the PIPE clock, and a USB 3 stick on it > > ran at SuperSpeed. > > > > Changes in v4: > > - Patch 1: add Reviewed-by from Krzysztof > > - Patch 2: mutex_lock()/mutex_unlock() where nothing returns early > > (Krzysztof) > > - Patch 2: leave the probe code as it was apart from the new argument > > (Krzysztof) > > - Rebase on next-20261118 > > - Link to v3: https://lore.kernel.org/all/20261112113838.506-1-26rote@gmail.com/ > > > > [1] https://lore.kernel.org/all/avZ7-Ax-_VwcJhYG@hu-petche-lv.qualcomm.com/ > > [2] https://lore.kernel.org/all/20261022-kaanapali_dp-v3-0-b5ae8e6083c3@oss.qualcomm.com/ > > [3] https://lore.kernel.org/all/20261112113921.1143-1-26rote@gmail.com/ > > [4] https://lore.kernel.org/all/20261117113834.925310-1-tapas.rana@oss.qualcomm.com/ > > [5] https://lore.kernel.org/all/20261027-dwc3-utmi-resume-v1-1-ca9f0aa65783@gmail.com/ > > [6] https://lore.kernel.org/all/20260803-drm-usbdp-preboot-v1-1-2539b362be00@oss.qualcomm.com/ > > > > Joonhoe Kim (2): > > dt-bindings: usb: qcom,snps-dwc3: Add mode-switch > > usb: dwc3: qcom: Use the UTMI clock as PIPE clock in DisplayPort-only > > modes > > > > .../bindings/usb/qcom,snps-dwc3.yaml | 5 + > > drivers/usb/dwc3/Kconfig | 1 + > > drivers/usb/dwc3/dwc3-qcom.c | 150 ++++++++++++++++-- > > 3 files changed, 143 insertions(+), 13 deletions(-) > > > > > > base-commit: e8017d29067fd1310a65c3494ce1a1b492adbac6 > > prerequisite-patch-id: a793fca7329dac964c21459f8d7a8b003d36d84d > > -- > > 2.53.0 > > > > -- > > Thanks, > Peter Chen -- Thanks, Peter Chen