From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v5 3/9] phy: Add a new driver for OMAP's USB2 PHYs
Date: Fri, 4 May 2018 16:38:07 +0200 [thread overview]
Message-ID: <514b85d8-63ad-d04a-cb4b-cea2341080a3@denx.de> (raw)
In-Reply-To: <1525444491-24324-4-git-send-email-jjhiblot@ti.com>
On 05/04/2018 04:34 PM, Jean-Jacques Hiblot wrote:
> This drivers supports the USB2 PHY found on omap5 and dra7 SOCs.
>
> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
>
> ---
>
> Changes in v5: None
> Changes in v4: None
> Changes in v3: None
> Changes in v2:
> - omap-usb2-phy: Implement power_on and power_off callbacks
>
> drivers/phy/Kconfig | 8 ++
> drivers/phy/Makefile | 1 +
> drivers/phy/omap-usb2-phy.c | 196 ++++++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 205 insertions(+)
> create mode 100644 drivers/phy/omap-usb2-phy.c
>
> diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig
> index 119edec..ed2b0a8 100644
> --- a/drivers/phy/Kconfig
> +++ b/drivers/phy/Kconfig
> @@ -118,4 +118,12 @@ config MESON_GXL_USB_PHY
> This is the generic phy driver for the Amlogic Meson GXL
> USB2 and USB3 PHYS.
>
> +config OMAP_USB2_PHY
> + bool "Support OMAP's USB2 PHY"
s/OMAP's/TI OMAP/ ?
[...]
> +
> +#define OMAP_USB2_CALIBRATE_FALSE_DISCONNECT BIT(0)
> +
> +#define OMAP_DEV_PHY_PD BIT(0)
> +#define OMAP_USB2_PHY_PD BIT(28)
> +
> +#define USB2PHY_DISCON_BYP_LATCH BIT(31)
> +#define USB2PHY_ANA_CONFIG1 (0x4c)
Parenthesis not needed
> +DECLARE_GLOBAL_DATA_PTR;
Is GD really needed for DM driver ?
[...]
> +static int omap_usb2_phy_init(struct phy *usb_phy)
> +{
> + struct udevice *dev = usb_phy->dev;
> + struct omap_usb2_phy *priv = dev_get_priv(dev);
> + u32 val;
> +
> + if (priv->flags & OMAP_USB2_CALIBRATE_FALSE_DISCONNECT) {
Invert the condition to reduce level of indent .
> + /*
> + *
> + * Reduce the sensitivity of internal PHY by enabling the
> + * DISCON_BYP_LATCH of the USB2PHY_ANA_CONFIG1 register. This
> + * resolves issues with certain devices which can otherwise
> + * be prone to false disconnects.
> + *
> + */
> + val = readl(priv->phy_base + USB2PHY_ANA_CONFIG1);
> + val |= USB2PHY_DISCON_BYP_LATCH;
> + writel(val, priv->phy_base + USB2PHY_ANA_CONFIG1);
> + }
> +
> + return 0;
> +}
[...]
--
Best regards,
Marek Vasut
next prev parent reply other threads:[~2018-05-04 14:38 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-04 14:34 [U-Boot] [PATCH v5 0/9] Add support for DM_USB for TI's DRA7 EVMs and AM57 EVMs platforms Jean-Jacques Hiblot
2018-05-04 14:34 ` [U-Boot] [PATCH v5 1/9] syscon: dm: Add a new method to get a regmap from DTS Jean-Jacques Hiblot
2018-05-04 21:38 ` Simon Glass
2018-05-04 14:34 ` [U-Boot] [PATCH v5 2/9] phy: ti-pip3-phy: Add support for USB3 PHY Jean-Jacques Hiblot
2018-05-04 14:34 ` [U-Boot] [PATCH v5 3/9] phy: Add a new driver for OMAP's USB2 PHYs Jean-Jacques Hiblot
2018-05-04 14:38 ` Marek Vasut [this message]
2018-05-04 14:34 ` [U-Boot] [PATCH v5 4/9] board: ti: dra7xx-evm: turn on USB clocks in late init stage Jean-Jacques Hiblot
2018-05-04 14:38 ` Marek Vasut
2018-05-04 14:42 ` Jean-Jacques Hiblot
2018-05-04 15:43 ` Marek Vasut
2018-05-04 17:58 ` Jean-Jacques Hiblot
2018-05-04 19:06 ` Marek Vasut
2018-05-15 16:10 ` Jean-Jacques Hiblot
2018-05-15 18:05 ` Jean-Jacques Hiblot
2018-05-15 22:13 ` Marek Vasut
2018-05-16 9:00 ` Jean-Jacques Hiblot
2018-05-16 9:04 ` Marek Vasut
2018-05-16 13:53 ` Jean-Jacques Hiblot
2018-05-16 15:21 ` Tom Rini
2018-05-17 9:27 ` Jean-Jacques Hiblot
2018-05-16 12:46 ` Tom Rini
2018-05-04 14:34 ` [U-Boot] [PATCH v5 5/9] board; ti: am57xx: turn on USB clocks Jean-Jacques Hiblot
2018-05-04 14:34 ` [U-Boot] [PATCH v5 6/9] dts: dra7x: make ocp2scp@4a080000 compatible with simple-bus Jean-Jacques Hiblot
2018-05-04 14:34 ` [U-Boot] [PATCH v5 7/9] dts: dra7x: Disable USB1 on all evms Jean-Jacques Hiblot
2018-05-04 14:34 ` [U-Boot] [PATCH v5 8/9] configs: enable OMAP_USB2_PHY for all DRA7 platforms Jean-Jacques Hiblot
2018-05-04 14:34 ` [U-Boot] [PATCH v5 9/9] configs: am57xx_evm: Enable DM_USB and dependencies Jean-Jacques Hiblot
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=514b85d8-63ad-d04a-cb4b-cea2341080a3@denx.de \
--to=marex@denx.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox