2020-06-11 14:31:41

by Sandeep Maheswaram

[permalink] [raw]
Subject: [PATCH 0/2] usb: dwc3: Host wake up support from system suspend

Avoiding phy powerdown in host mode so that it can be wake up by devices.
Set usb controller wakeup capable when wakeup capable devices are
connected to the host.

Added GENPD_FLAG_ACTIVE_WAKEUP flag to keep usb30_prim gdsc active
when wakeup capable devices are connected to the host.

Sandeep Maheswaram (1):
usb: dwc3: Host wake up support from system suspend

Taniya Das (1):
clk: qcom: gcc: Add genpd active wakeup flag for sc7180

drivers/clk/qcom/gcc-sc7180.c | 1 +
drivers/usb/dwc3/core.c | 47 +++++++++++++++++++++++++-----
drivers/usb/dwc3/core.h | 1 +
drivers/usb/dwc3/dwc3-qcom.c | 66 ++++++++++++++++++++++++++++++++-----------
4 files changed, 92 insertions(+), 23 deletions(-)

--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation


2020-06-11 14:33:57

by Sandeep Maheswaram

[permalink] [raw]
Subject: [PATCH 1/2] clk: qcom: gcc: Add genpd active wakeup flag for sc7180

From: Taniya Das <[email protected]>

The USB client requires the usb30_prim gdsc to be kept active for
certain use cases, thus add the GENPD_FLAG_ACTIVE_WAKEUP flag.

Signed-off-by: Taniya Das <[email protected]>
---
drivers/clk/qcom/gcc-sc7180.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/clk/qcom/gcc-sc7180.c b/drivers/clk/qcom/gcc-sc7180.c
index ca4383e..2b3dd4e 100644
--- a/drivers/clk/qcom/gcc-sc7180.c
+++ b/drivers/clk/qcom/gcc-sc7180.c
@@ -2263,6 +2263,7 @@ static struct gdsc usb30_prim_gdsc = {
.gdscr = 0x0f004,
.pd = {
.name = "usb30_prim_gdsc",
+ .flags = GENPD_FLAG_ACTIVE_WAKEUP,
},
.pwrsts = PWRSTS_OFF_ON,
};
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation

2020-06-11 22:49:06

by Stephen Boyd

[permalink] [raw]
Subject: Re: [PATCH 1/2] clk: qcom: gcc: Add genpd active wakeup flag for sc7180

Quoting Sandeep Maheswaram (2020-06-11 07:28:02)
> From: Taniya Das <[email protected]>
>
> The USB client requires the usb30_prim gdsc to be kept active for
> certain use cases, thus add the GENPD_FLAG_ACTIVE_WAKEUP flag.

Can you please describe more of what this is for? Once sentence doesn't
tell me much at all. I guess that sometimes we want to wakeup from USB
and so the usb gdsc should be marked as "maybe keep on for wakeups" with
the GENPD_FLAG_ACTIVE_WAKEUP flag if the USB controller is wakeup
enabled?

>
> Signed-off-by: Taniya Das <[email protected]>
> ---

Add a Fixes: tag too? And I assume we need to do this for all USB gdscs
on various SoCs and maybe other GDSCs like PCIe. Any plans to fix those
GDSCs?

> drivers/clk/qcom/gcc-sc7180.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/clk/qcom/gcc-sc7180.c b/drivers/clk/qcom/gcc-sc7180.c
> index ca4383e..2b3dd4e 100644
> --- a/drivers/clk/qcom/gcc-sc7180.c
> +++ b/drivers/clk/qcom/gcc-sc7180.c
> @@ -2263,6 +2263,7 @@ static struct gdsc usb30_prim_gdsc = {
> .gdscr = 0x0f004,
> .pd = {
> .name = "usb30_prim_gdsc",
> + .flags = GENPD_FLAG_ACTIVE_WAKEUP,
> },
> .pwrsts = PWRSTS_OFF_ON,
> };

2020-08-07 21:46:04

by Stephen Boyd

[permalink] [raw]
Subject: Re: [PATCH 1/2] clk: qcom: gcc: Add genpd active wakeup flag for sc7180

Quoting Stephen Boyd (2020-06-11 15:46:58)
> Quoting Sandeep Maheswaram (2020-06-11 07:28:02)
> > From: Taniya Das <[email protected]>
> >
> > The USB client requires the usb30_prim gdsc to be kept active for
> > certain use cases, thus add the GENPD_FLAG_ACTIVE_WAKEUP flag.
>
> Can you please describe more of what this is for? Once sentence doesn't
> tell me much at all. I guess that sometimes we want to wakeup from USB
> and so the usb gdsc should be marked as "maybe keep on for wakeups" with
> the GENPD_FLAG_ACTIVE_WAKEUP flag if the USB controller is wakeup
> enabled?
>
> >
> > Signed-off-by: Taniya Das <[email protected]>
> > ---
>
> Add a Fixes: tag too? And I assume we need to do this for all USB gdscs
> on various SoCs and maybe other GDSCs like PCIe. Any plans to fix those
> GDSCs?
>

Any update here?

2020-08-11 20:09:33

by Sandeep Maheswaram

[permalink] [raw]
Subject: Re: [PATCH 1/2] clk: qcom: gcc: Add genpd active wakeup flag for sc7180

Hi,

On 8/8/2020 3:14 AM, Stephen Boyd wrote:
> Quoting Stephen Boyd (2020-06-11 15:46:58)
>> Quoting Sandeep Maheswaram (2020-06-11 07:28:02)
>>> From: Taniya Das <[email protected]>
>>>
>>> The USB client requires the usb30_prim gdsc to be kept active for
>>> certain use cases, thus add the GENPD_FLAG_ACTIVE_WAKEUP flag.
>> Can you please describe more of what this is for? Once sentence doesn't
>> tell me much at all. I guess that sometimes we want to wakeup from USB
>> and so the usb gdsc should be marked as "maybe keep on for wakeups" with
>> the GENPD_FLAG_ACTIVE_WAKEUP flag if the USB controller is wakeup
>> enabled?
>>
>>> Signed-off-by: Taniya Das <[email protected]>
>>> ---
>> Add a Fixes: tag too? And I assume we need to do this for all USB gdscs
>> on various SoCs and maybe other GDSCs like PCIe. Any plans to fix those
>> GDSCs?
>>
> Any update here?

I moved this change to usb driver code dwc3-qcom.c in v2 of this series https://patchwork.kernel.org/cover/11652281/
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation