From: Wesley Cheng <wesley.cheng@oss.qualcomm.com>
To: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
Vinod Koul <vkoul@kernel.org>,
Neil Armstrong <neil.armstrong@linaro.org>,
Manivannan Sadhasivam <mani@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org,
linux-kernel@vger.kernel.org, jason.pettit@oss.qualcomm.com
Subject: Re: [PATCH] phy: qualcomm: qmp-combo: Differentiate clocks related to the USB block
Date: Tue, 17 Nov 2026 12:40:10 -0800 [thread overview]
Message-ID: <c3a45db8-43a5-4aaa-9251-5f6231e83d59@oss.qualcomm.com> (raw)
In-Reply-To: <c1abd9d4-98ef-4469-b4f3-94a8dcad9d0b@oss.qualcomm.com>
On 10/16/2026 5:13 AM, Konrad Dybcio wrote:
> On 10/1/26 3:16 AM, Wesley Cheng wrote:
>> The Qualcomm QMP combo PHY has a USB and Displayport block that is
>> sourced with different clocks. In situations where the USB path is not
>> utilized, and only Displayport is active, unnecessary clocks are enabled
>> and not used. Split the current clock list into USB specific clocks,
>> which will be enabled whenever the USB initialization routine is
>> executed.
>>
>> In addition, move autonomous mode control specifically when USB is
>> active, as its primary purpose is to detect RX detection and LFPS
>> signals, which occurs only when USB is active.
>>
>> Signed-off-by: Wesley Cheng <wesley.cheng@oss.qualcomm.com>
>> ---
>
> GPT has the following concerns:
>
> [P1] Don't disable USB clocks that USB init didn't acquire
> drivers/phy/qualcomm/phy-qcom-qmp-combo.c: USB init/runtime suspend
>
> When USB4 is active, `qmp_combo_usb_init()` takes its early return and
> increments `usb_init_count` before the new clock-enable call. Runtime
> suspend then uses that count to disable `usb_clks`, although that path
> didn't acquire them. This can unbalance clock references; the count
> needs to reflect actual clock ownership, or the USB4 case needs
> separate handling.
>
> => the USB4 state machinery is a bit fragile.. but perhaps an if or
> two will solve things
Sorry, didn't get back to you in a long time. I think this should be fine
once I add the proper enable path in the USB4 init routine as well, since
it is required for USB4 to work. So now, when usb4 init runs, the usb_clks
are enabled.
>
> [P2] Unwind clocks if USB-clock resume fails
> drivers/phy/qualcomm/phy-qcom-qmp-combo.c: runtime resume
>
> The patch enables the common clocks and `pipe_clk` before enabling
> `usb_clks`. If the latter enable fails, it returns without disabling
> the earlier clocks, leaving them enabled after a failed resume.
ACK.
Thanks
Wesley Cheng
next prev parent reply other threads:[~2026-11-17 20:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-01 1:16 Wesley Cheng
2026-10-16 12:13 ` Konrad Dybcio
2026-11-17 20:40 ` Wesley Cheng [this message]
2026-10-28 11:26 ` Manivannan Sadhasivam
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c3a45db8-43a5-4aaa-9251-5f6231e83d59@oss.qualcomm.com \
--to=wesley.cheng@oss.qualcomm.com \
--cc=jason.pettit@oss.qualcomm.com \
--cc=konrad.dybcio@oss.qualcomm.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=mani@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®