Re: [PATCH] phy: qualcomm: qmp-combo: Differentiate clocks related to the USB block

From: Konrad Dybcio

Date: Fri Oct 16 2026 - 08:13:37 EST


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@xxxxxxxxxxxxxxxx>
> ---

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

[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.

Konrad