aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/phy
diff options
context:
space:
mode:
authorGeorge Cherian <george.cherian@ti.com>2013-10-15 06:02:14 -0400
committerFelipe Balbi <balbi@ti.com>2013-12-19 10:27:42 -0500
commitc4b34a3b7a505dd63268cf6dcf57d10068b47cb6 (patch)
tree8f37f59c1d410caaaec46f424f8e981d1a1a8e28 /drivers/usb/phy
parentdb67bc04bdc8cac2307af09c92cd73751905ec0e (diff)
usb: phy: omap: Add omap-control Support for AM437x
This adds omap control module support for USBSS in AM437x SoC. Update DT binding information to reflect these changes. Acked-by: Roger Quadros <rogerq@ti.com> Signed-off-by: George Cherian <george.cherian@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/phy')
-rw-r--r--drivers/usb/phy/phy-omap-control.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/usb/phy/phy-omap-control.c b/drivers/usb/phy/phy-omap-control.c
index 09c5ace1edd8..e7253182e47d 100644
--- a/drivers/usb/phy/phy-omap-control.c
+++ b/drivers/usb/phy/phy-omap-control.c
@@ -84,6 +84,20 @@ void omap_control_usb_phy_power(struct device *dev, int on)
84 else 84 else
85 val |= OMAP_CTRL_USB2_PHY_PD; 85 val |= OMAP_CTRL_USB2_PHY_PD;
86 break; 86 break;
87
88 case OMAP_CTRL_TYPE_AM437USB2:
89 if (on) {
90 val &= ~(AM437X_CTRL_USB2_PHY_PD |
91 AM437X_CTRL_USB2_OTG_PD);
92 val |= (AM437X_CTRL_USB2_OTGVDET_EN |
93 AM437X_CTRL_USB2_OTGSESSEND_EN);
94 } else {
95 val &= ~(AM437X_CTRL_USB2_OTGVDET_EN |
96 AM437X_CTRL_USB2_OTGSESSEND_EN);
97 val |= (AM437X_CTRL_USB2_PHY_PD |
98 AM437X_CTRL_USB2_OTG_PD);
99 }
100 break;
87 default: 101 default:
88 dev_err(dev, "%s: type %d not recognized\n", 102 dev_err(dev, "%s: type %d not recognized\n",
89 __func__, control_usb->type); 103 __func__, control_usb->type);
@@ -197,6 +211,7 @@ static const enum omap_control_usb_type otghs_data = OMAP_CTRL_TYPE_OTGHS;
197static const enum omap_control_usb_type usb2_data = OMAP_CTRL_TYPE_USB2; 211static const enum omap_control_usb_type usb2_data = OMAP_CTRL_TYPE_USB2;
198static const enum omap_control_usb_type pipe3_data = OMAP_CTRL_TYPE_PIPE3; 212static const enum omap_control_usb_type pipe3_data = OMAP_CTRL_TYPE_PIPE3;
199static const enum omap_control_usb_type dra7usb2_data = OMAP_CTRL_TYPE_DRA7USB2; 213static const enum omap_control_usb_type dra7usb2_data = OMAP_CTRL_TYPE_DRA7USB2;
214static const enum omap_control_usb_type am437usb2_data = OMAP_CTRL_TYPE_AM437USB2;
200 215
201static const struct of_device_id omap_control_usb_id_table[] = { 216static const struct of_device_id omap_control_usb_id_table[] = {
202 { 217 {
@@ -215,6 +230,10 @@ static const struct of_device_id omap_control_usb_id_table[] = {
215 .compatible = "ti,control-phy-dra7usb2", 230 .compatible = "ti,control-phy-dra7usb2",
216 .data = &dra7usb2_data, 231 .data = &dra7usb2_data,
217 }, 232 },
233 {
234 .compatible = "ti,control-phy-am437usb2",
235 .data = &am437usb2_data,
236 },
218 {}, 237 {},
219}; 238};
220MODULE_DEVICE_TABLE(of, omap_control_usb_id_table); 239MODULE_DEVICE_TABLE(of, omap_control_usb_id_table);