From: Felipe Balbi <balbi@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] usb: phy: omap_usb_phy: implement usb_phy_power() for AM437x
Date: Wed, 9 Jul 2014 23:06:06 -0500 [thread overview]
Message-ID: <20140710040606.GA6492@saruman.home> (raw)
In-Reply-To: <1404964963-6614-2-git-send-email-balbi@ti.com>
On Wed, Jul 09, 2014 at 11:02:43PM -0500, Felipe Balbi wrote:
> Newer AM437x silicon requires us to explicitly power up
> the USB2 PHY. By implementing usb_phy_power() we can
> achieve that.
>
> Signed-off-by: Felipe Balbi <balbi@ti.com>
> ---
the only change here is the use of {set,clr}bits_le32()
> arch/arm/include/asm/arch-am33xx/hardware_am43xx.h | 5 +++++
> drivers/usb/phy/omap_usb_phy.c | 11 ++++++++++-
> 2 files changed, 15 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/include/asm/arch-am33xx/hardware_am43xx.h b/arch/arm/include/asm/arch-am33xx/hardware_am43xx.h
> index b470319..efdecf4 100644
> --- a/arch/arm/include/asm/arch-am33xx/hardware_am43xx.h
> +++ b/arch/arm/include/asm/arch-am33xx/hardware_am43xx.h
> @@ -43,6 +43,11 @@
> #define VTP0_CTRL_ADDR 0x44E10E0C
> #define VTP1_CTRL_ADDR 0x48140E10
>
> +/* USB CTRL Base Address */
> +#define USB1_CTRL 0x44e10628
> +#define USB1_CTRL_CM_PWRDN BIT(0)
> +#define USB1_CTRL_OTG_PWRDN BIT(1)
> +
> /* DDR Base address */
> #define DDR_PHY_CMD_ADDR 0x44E12000
> #define DDR_PHY_DATA_ADDR 0x44E120C8
> diff --git a/drivers/usb/phy/omap_usb_phy.c b/drivers/usb/phy/omap_usb_phy.c
> index af46db2..53778b3 100644
> --- a/drivers/usb/phy/omap_usb_phy.c
> +++ b/drivers/usb/phy/omap_usb_phy.c
> @@ -222,7 +222,16 @@ static void am437x_enable_usb2_phy2(struct omap_xhci *omap)
>
> void usb_phy_power(int on)
> {
> - return;
> + /*
> + * In order to get USB working on newer AM43xx silicon, we must
> + * explicitly power the USB PHYs.
> + */
> + if (on)
> + clrbits_le32(USB1_CTRL, USB1_CTRL_CM_PWRDN |
> + USB1_CTRL_OTG_PWRDN);
> + else
> + setbits_le32(USB1_CTRL, USB1_CTRL_CM_PWRDN |
> + USB1_CTRL_OTG_PWRDN);
> }
> #endif /* CONFIG_AM437X_USB2PHY2_HOST */
>
> --
> 2.0.0.390.gcb682f8
>
--
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140709/972a12aa/attachment.pgp>
next prev parent reply other threads:[~2014-07-10 4:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-10 4:02 [U-Boot] [PATCH 1/2] usb: host: xhci: make sure to power up PHY Felipe Balbi
2014-07-10 4:02 ` [U-Boot] [PATCH 2/2] usb: phy: omap_usb_phy: implement usb_phy_power() for AM437x Felipe Balbi
2014-07-10 4:06 ` Felipe Balbi [this message]
2014-07-10 7:44 ` Marek Vasut
-- strict thread matches above, loose matches on Subject: below --
2014-06-23 21:25 [U-Boot] [PATCH 1/2] usb: host: xhci: make sure to power up PHY Felipe Balbi
2014-06-23 21:25 ` [U-Boot] [PATCH 2/2] usb: phy: omap_usb_phy: implement usb_phy_power() for AM437x Felipe Balbi
2014-06-23 21:28 ` Michael Trimarchi
2014-06-23 21:58 ` Felipe Balbi
2014-06-23 22:02 ` Michael Trimarchi
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=20140710040606.GA6492@saruman.home \
--to=balbi@ti.com \
--cc=u-boot@lists.denx.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.