[PATCH] phy: qualcomm: qmp-combo: Differentiate clocks related to the USB block
Wesley Cheng
wesley.cheng at oss.qualcomm.com
Tue Nov 17 12:40:10 PST 2026
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 at 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
More information about the linux-phy
mailing list