From: Vignesh Raghavendra <vigneshr@ti.com>
To: u-boot@lists.denx.de
Subject: [PATCH v2 3/8] phy: omap-usb2-phy: Add support for AM654 USB2 PHY
Date: Mon, 9 Dec 2019 10:37:31 +0530 [thread overview]
Message-ID: <20191209050736.12018-4-vigneshr@ti.com> (raw)
In-Reply-To: <20191209050736.12018-1-vigneshr@ti.com>
AM654 SoC has USB2 PHY which is similar to existing USB2 PHYs on OMAP
SoCs. Add support for the same.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Marek Vasut <marex@denx.de>
---
drivers/phy/omap-usb2-phy.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/drivers/phy/omap-usb2-phy.c b/drivers/phy/omap-usb2-phy.c
index 6e5958d1dcec..923f2c105d67 100644
--- a/drivers/phy/omap-usb2-phy.c
+++ b/drivers/phy/omap-usb2-phy.c
@@ -27,6 +27,10 @@
#define USB2PHY_DISCON_BYP_LATCH BIT(31)
#define USB2PHY_ANA_CONFIG1 (0x4c)
+#define AM654_USB2_OTG_PD BIT(8)
+#define AM654_USB2_VBUS_DET_EN BIT(5)
+#define AM654_USB2_VBUSVALID_DET_EN BIT(4)
+
DECLARE_GLOBAL_DATA_PTR;
struct omap_usb2_phy {
@@ -74,6 +78,15 @@ static const struct usb_phy_data am437x_usb2_data = {
.power_off = AM437X_USB2_PHY_PD | AM437X_USB2_OTG_PD,
};
+static const struct usb_phy_data am654_usb2_data = {
+ .label = "am654_usb2",
+ .flags = OMAP_USB2_CALIBRATE_FALSE_DISCONNECT,
+ .mask = AM654_USB2_OTG_PD | AM654_USB2_VBUS_DET_EN |
+ AM654_USB2_VBUSVALID_DET_EN,
+ .power_on = AM654_USB2_VBUS_DET_EN | AM654_USB2_VBUSVALID_DET_EN,
+ .power_off = AM654_USB2_OTG_PD,
+};
+
static const struct udevice_id omap_usb2_id_table[] = {
{
.compatible = "ti,omap5-usb2",
@@ -91,6 +104,10 @@ static const struct udevice_id omap_usb2_id_table[] = {
.compatible = "ti,am437x-usb2",
.data = (ulong)&am437x_usb2_data,
},
+ {
+ .compatible = "ti,am654-usb2",
+ .data = (ulong)&am654_usb2_data,
+ },
{},
};
--
2.24.0
next prev parent reply other threads:[~2019-12-09 5:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-09 5:07 [PATCH v2 0/8] AM654: Add USB support Vignesh Raghavendra
2019-12-09 5:07 ` [PATCH v2 1/8] dwc3-generic: Add support for AM654 USB controller Vignesh Raghavendra
2019-12-09 5:07 ` [PATCH v2 2/8] phy: omap-usb2-phy: Fix warnings when built for ARM64 Vignesh Raghavendra
2019-12-09 5:07 ` Vignesh Raghavendra [this message]
2019-12-09 5:07 ` [PATCH v2 4/8] arm: dts: k3-am65-main: add USB support Vignesh Raghavendra
2019-12-09 5:07 ` [PATCH v2 5/8] arm: dts: k3-am654-base-board: enable USB1 Vignesh Raghavendra
2019-12-09 5:07 ` [PATCH v2 6/8] configs: am65x_evm: Add DFU related env variables Vignesh Raghavendra
2019-12-09 5:07 ` [PATCH v2 7/8] am65x_evm_a53_defconfig: Enable configs to support USB and DFU Vignesh Raghavendra
2019-12-09 5:07 ` [PATCH v2 8/8] configs: am65x_evm: Enable USB keyboard as second stdin Vignesh Raghavendra
2020-01-20 6:03 ` [PATCH v2 0/8] AM654: Add USB support Lokesh Vutla
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=20191209050736.12018-4-vigneshr@ti.com \
--to=vigneshr@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox