Re: [PATCH v3] usb: dwc3: qcom: Modify interrupt handling for eUSB2 Phy targets

From: Dmitry Baryshkov

Date: Wed May 13 2026 - 16:49:13 EST


On Mon, May 11, 2026 at 03:14:22PM +0530, Krishna Kurapati wrote:
> eUSB2 targets handle wakeup interrupts differently depending on device
> speed when operating in host mode.
>
> According to the eUSB2 specification, remote wakeup signaling in host
> mode is detected via different data-line assertions based on the
> connected device speed.
>
> When a low-speed device is connected, the host repeater drives eD+ to
> logic '1' upon detecting a K-state on the USB lines during remote wakeup
> (eUSB2 specification, Section 5.5.14).
>
> When a full-speed or high-speed device is connected, the host repeater
> drives eD- to logic '1' upon detecting a K-state on the USB line during
> remote wakeup (eUSB2 specification, Sections 5.5.15 and 5.5.18).
>
> Since the eUSB2 PHY's "DP" and "DM" interrupt lines monitor the eD+ and
> eD- line states, configure the wakeup interrupts accordingly
>
> Signed-off-by: Krishna Kurapati <krishna.kurapati@xxxxxxxxxxxxxxxx>
> ---
> Changes in v3:
> - Removed multiple glymur-dwc3-mp pdata entries
> - Replaced use of ternary operators with if-else
>
> Link to v2:
> https://lore.kernel.org/all/20260505194242.1947891-1-krishna.kurapati@xxxxxxxxxxxxxxxx/
>
> Changes in v2:
> - Updated commit message
> - added supported eUSB2 targets
>
> Link to v1:
> https://lore.kernel.org/all/20260502095616.666938-1-krishna.kurapati@xxxxxxxxxxxxxxxx/
>
> This patch was tested on Glymur.
>
> drivers/usb/dwc3/dwc3-qcom.c | 94 +++++++++++++++++++++++++++++++-----
> 1 file changed, 83 insertions(+), 11 deletions(-)

> @@ -838,8 +866,52 @@ static const struct dev_pm_ops dwc3_qcom_dev_pm_ops = {
> .prepare = pm_sleep_ptr(dwc3_qcom_prepare),
> };
>
> +static const struct dwc3_qcom_platform_data dwc3_qcom_glymur_pdata = {
> + .uses_eusb2_phy = true,
> +};

There is nothing _glymur_ in this pdata. Please name it accordingly.

> +
> static const struct of_device_id dwc3_qcom_of_match[] = {
> - { .compatible = "qcom,snps-dwc3" },
> + { .compatible = "qcom,snps-dwc3", },
> + {
> + .compatible = "qcom,eliza-dwc3",
> + .data = &dwc3_qcom_glymur_pdata,
> + },
> + {
> + .compatible = "qcom,glymur-dwc3",
> + .data = &dwc3_qcom_glymur_pdata,
> + },
> + {
> + .compatible = "qcom,glymur-dwc3-mp",
> + .data = &dwc3_qcom_glymur_pdata,
> + },
> + {
> + .compatible = "qcom,kaanapali-dwc3",
> + .data = &dwc3_qcom_glymur_pdata,
> + },
> + {
> + .compatible = "qcom,milos-dwc3",
> + .data = &dwc3_qcom_glymur_pdata,
> + },
> + {
> + .compatible = "qcom,sm8550-dwc3",
> + .data = &dwc3_qcom_glymur_pdata,
> + },
> + {
> + .compatible = "qcom,sm8650-dwc3",
> + .data = &dwc3_qcom_glymur_pdata,
> + },
> + {
> + .compatible = "qcom,sm8750-dwc3",
> + .data = &dwc3_qcom_glymur_pdata,
> + },
> + {
> + .compatible = "qcom,x1e80100-dwc3",
> + .data = &dwc3_qcom_glymur_pdata,
> + },
> + {
> + .compatible = "qcom,x1e80100-dwc3-mp",
> + .data = &dwc3_qcom_glymur_pdata,

This would result in the list of the platforms keeping on growing.
Would you mind instead detecting eUSB2 by checking that HS PHY has its
own phys property?

> + },
> { }
> };
> MODULE_DEVICE_TABLE(of, dwc3_qcom_of_match);
> --
> 2.34.1
>

--
With best wishes
Dmitry