From: Roger Quadros <rogerq@ti.com>
To: <kishon@ti.com>
Cc: <robh+dt@kernel.org>, <nsekhar@ti.com>,
<linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-omap@vger.kernel.org>, Roger Quadros <rogerq@ti.com>
Subject: [PATCH 4/4] phy: ti: usb2: Add support for AM654 USB2 PHY
Date: Wed, 5 Dec 2018 17:03:26 +0200 [thread overview]
Message-ID: <1544022206-2300-5-git-send-email-rogerq@ti.com> (raw)
In-Reply-To: <1544022206-2300-1-git-send-email-rogerq@ti.com>
Add support for the USB2 PHY on the AM654 SoC.
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
---
drivers/phy/ti/Kconfig | 4 ++--
drivers/phy/ti/phy-omap-usb2.c | 17 +++++++++++++++++
2 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/drivers/phy/ti/Kconfig b/drivers/phy/ti/Kconfig
index 4fdbe06..a55959b 100644
--- a/drivers/phy/ti/Kconfig
+++ b/drivers/phy/ti/Kconfig
@@ -33,11 +33,11 @@ config OMAP_CONTROL_PHY
config OMAP_USB2
tristate "OMAP USB2 PHY Driver"
- depends on ARCH_OMAP2PLUS
+ depends on ARCH_OMAP2PLUS || ARCH_K3
depends on USB_SUPPORT
select GENERIC_PHY
select USB_PHY
- select OMAP_CONTROL_PHY
+ select OMAP_CONTROL_PHY if ARCH_OMAP2PLUS
help
Enable this to support the transceiver that is part of SOC. This
driver takes care of all the PHY functionality apart from comparator.
diff --git a/drivers/phy/ti/phy-omap-usb2.c b/drivers/phy/ti/phy-omap-usb2.c
index 418e7f1..e871f29 100644
--- a/drivers/phy/ti/phy-omap-usb2.c
+++ b/drivers/phy/ti/phy-omap-usb2.c
@@ -36,6 +36,10 @@
#define USB2PHY_DISCON_BYP_LATCH (1 << 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)
+
/**
* omap_usb2_set_comparator - links the comparator present in the sytem with
* this phy
@@ -245,6 +249,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 of_device_id omap_usb2_id_table[] = {
{
.compatible = "ti,omap-usb2",
@@ -266,6 +279,10 @@ static const struct of_device_id omap_usb2_id_table[] = {
.compatible = "ti,am437x-usb2",
.data = &am437x_usb2_data,
},
+ {
+ .compatible = "ti,am654-usb2",
+ .data = &am654_usb2_data,
+ },
{},
};
MODULE_DEVICE_TABLE(of, omap_usb2_id_table);
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
next prev parent reply other threads:[~2018-12-05 15:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-05 15:03 [PATCH 0/4] phy: ti: Add AM654 USB2 support Roger Quadros
2018-12-05 15:03 ` [PATCH 1/4] phy: ti: usb2: Fix logic on -EPROBE_DEFER Roger Quadros
2018-12-14 9:41 ` Roger Quadros
2018-12-14 17:23 ` Tony Lindgren
2018-12-05 15:03 ` [PATCH 2/4] phy: ti: Don't depend on OMAP_OCP2SCP Roger Quadros
2018-12-05 15:03 ` [PATCH 3/4] dt-bindings: phy: ti: Add support for AM654x USB2 PHY Roger Quadros
2018-12-19 20:37 ` Rob Herring
2018-12-05 15:03 ` Roger Quadros [this message]
2019-01-09 9:14 ` [PATCH 0/4] phy: ti: Add AM654 USB2 support Roger Quadros
2019-01-16 8:32 ` Kishon Vijay Abraham I
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=1544022206-2300-5-git-send-email-rogerq@ti.com \
--to=rogerq@ti.com \
--cc=devicetree@vger.kernel.org \
--cc=kishon@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=nsekhar@ti.com \
--cc=robh+dt@kernel.org \
/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
all inboxes | Powered by JetHome®