From: Joonhoe Kim <26rote@gmail.com>
To: Val Packett <val@packett.cool>, vkoul@kernel.org
Cc: neil.armstrong@linaro.org, mani@kernel.org,
konrad.dybcio@oss.qualcomm.com,
dmitry.baryshkov@oss.qualcomm.com, wesley.cheng@oss.qualcomm.com,
linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] phy: qcom: qmp-combo: Leave the USB PCS alone in DP-only mode
Date: Fri, 23 Oct 2026 21:36:08 +0900 [thread overview]
Message-ID: <20261023123609.390-1-26rote@gmail.com> (raw)
In-Reply-To: <f8a9d12b-c859-4d3f-82f6-d22b9eaee472@packett.cool>
On 10/22/26 9:14 PM, Val Packett wrote:
> Good catch. I don't think I've seen system hangs from this on Hamoa, but
> I've had USB stop working on the ports where 4xDP+USB2 was left
> connected during suspend..
That may be the same path: on resume the USB PHY init programs the USB
tables over the DisplayPort configuration and times out. On the Y700
the xHCI resume that followed hung; a USB port that stays dead
afterwards would fit as well. A "phy initialization timed-out" from the
QMP PHY on resume would confirm it.
> The USB4 chunk above (juuuust before the start of this diff's context)
> does a similar thing in a different style: it increments both init_count
> and usb_init_count and early-returns, skipping over qmp_combo_com_init
> as well.
>
> I think both USB4 and DP should be written similarly but should
> qmp_combo_com_init be skipped here? No in both cases or does USB4 skip
> it for a good reason?
>
> (I'm especially wondering about the impact of that on the USB HS PHY
> clock, since it's actually sourced from here without a properly modeled
> dependency right now…)
DP-only needs it, and USB4 does not really skip it: the bare
init_count++ is exactly what qmp_combo_com_init(qmp, false) does when
the count is already non-zero, and qmp_combo_usb4_init() holds that
first reference. In DP-only mode nothing guarantees another holder: on
resume the USB controller can init its PHY before DisplayPort does, and
then qmp_combo_com_init() is what turns the clocks, resets and
regulators on.
So I kept the two branches different: the USB4 one is a separate early
return because it must not reprogram the PHY at all, while DP-only only
leaves the USB PCS alone. The mux path already keeps the USB PCS
powered down in DP-only mode; v2 makes usb_init/usb_exit match it, and
the common block stays on while USB holds a reference, which looks like
the safer side for the HS PHY clock.
v2 also skips the USB PCS in qmp_combo_typec_switch_set() and
qmp_combo_reconfigure_phy() in DP-only mode, as Sashiko pointed out on
v1:
https://lore.kernel.org/all/20261023123512.1912-1-26rote@gmail.com/
Thanks,
Joonhoe Kim
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
prev parent reply other threads:[~2026-10-23 12:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-22 16:52 [PATCH] phy: qcom: qmp-combo: Leave the USB PCS alone in DP-only mode Joonhoe Kim
2026-10-22 17:07 ` sashiko-bot
2026-10-23 12:36 ` Joonhoe Kim
2026-10-23 0:14 ` Val Packett
2026-10-23 12:36 ` Joonhoe Kim [this message]
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=20261023123609.390-1-26rote@gmail.com \
--to=26rote@gmail.com \
--cc=dmitry.baryshkov@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=val@packett.cool \
--cc=vkoul@kernel.org \
--cc=wesley.cheng@oss.qualcomm.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.