From: Bin Liu <b-liu@ti.com>
To: Tony Lindgren <tony@atomide.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org, linux-omap@vger.kernel.org
Subject: usb: musb: omap2430: Add support for idling phy when musb is idle
Date: Mon, 1 Apr 2019 13:43:52 -0500 [thread overview]
Message-ID: <20190401184352.GN25852@uda0271908> (raw)
On Sun, Mar 24, 2019 at 04:34:26PM -0700, Tony Lindgren wrote:
> I noticed that musb is blocking core retention for omap4 unlike for
> omap3. This is because for omap3 we have phy-twl4030-usb implement
> it's own PM runtime to handle errata "VUSB3V1 VBUS overvoltage
> debouncer not working when the PHY is powered down". That is done
> in order to keep the USB PHY powered when phy-twl4030-usb is loaded.
>
> For the other USB PHYs, we need to enable and disable the PHY based on
> musb PM runtime. With the session bit based PM runtime for musb core,
> we can now idle the USB PHY always when musb is idle.
>
> Note that adding these calls will not affect the twl4030 driver
> as it's phy functions will just query the PHY state without powering
> the PHY on or off.
>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
> drivers/usb/musb/omap2430.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
> --- a/drivers/usb/musb/omap2430.c
> +++ b/drivers/usb/musb/omap2430.c
> @@ -531,6 +531,9 @@ static int omap2430_runtime_suspend(struct device *dev)
>
> omap2430_low_level_exit(musb);
>
> + phy_power_off(musb->phy);
> + phy_exit(musb->phy);
> +
> return 0;
> }
>
> @@ -542,6 +545,9 @@ static int omap2430_runtime_resume(struct device *dev)
> if (!musb)
> return 0;
>
> + phy_init(musb->phy);
> + phy_power_on(musb->phy);
> +
> omap2430_low_level_init(musb);
> musb_writel(musb->mregs, OTG_INTERFSEL,
> musb->context.otg_interfsel);
Applied.
Thanks,
-Bin.
next reply other threads:[~2019-04-01 18:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-01 18:43 Bin Liu [this message]
-- strict thread matches above, loose matches on Subject: below --
2019-03-24 23:34 usb: musb: omap2430: Add support for idling phy when musb is idle Tony Lindgren
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=20190401184352.GN25852@uda0271908 \
--to=b-liu@ti.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=tony@atomide.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).