summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEduardo Valentin <eduardo.valentin@ti.com>2012-07-30 12:37:06 +0800
committerAndy Green <andy.green@linaro.org>2012-07-30 12:37:06 +0800
commit0fc092200e6cad113f784f51bd2210f9fb62e786 (patch)
treee44cd207fd3fa12d1e9769c09505732d27483142 /include
parentea6395da63fd747e3c3c12e55d0497d66a0c971a (diff)
mfd: omap: control: usb-phy: introduce the ctrl-module usb driver
Created a new platform driver for the platform device created by the control module mfd core, wrt usb. This driver has API's to power on/off the phy and the API's to write to musb mailbox. (p.s. the mailbox for musb in omap4 is present in system control module) Change-Id: I3260e7e9b2091b75620b85ede5b2a09d097a9b37 [kishon@ti.com: wrote the original API's related to USB functions] Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Radhesh Fadnis <radhesh.fadnis@ti.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mfd/omap_control.h3
-rw-r--r--include/linux/usb/omap4_usb_phy.h51
2 files changed, 54 insertions, 0 deletions
diff --git a/include/linux/mfd/omap_control.h b/include/linux/mfd/omap_control.h
index b9198828fee0..0ad5dd36c0e6 100644
--- a/include/linux/mfd/omap_control.h
+++ b/include/linux/mfd/omap_control.h
@@ -22,6 +22,9 @@
#ifndef __DRIVERS_OMAP_CONTROL_H
#define __DRIVERS_OMAP_CONTROL_H
+#define CONTROL_DEV_CONF 0x00000300
+#define CONTROL_USBOTGHS_CONTROL 0x0000033C
+
/**
* struct system control module - scm device structure
* @dev: device pointer
diff --git a/include/linux/usb/omap4_usb_phy.h b/include/linux/usb/omap4_usb_phy.h
new file mode 100644
index 000000000000..218ce93b39ea
--- /dev/null
+++ b/include/linux/usb/omap4_usb_phy.h
@@ -0,0 +1,51 @@
+/*
+ * OMAP4 USB-phy
+ *
+ * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * Contact:
+ * Kishon Vijay Abraham I <kishon@ti.com>
+ * Eduardo Valentin <eduardo.valentin@ti.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#ifndef __OMAP4_USB_PHY_H
+#define __OMAP4_USB_PHY_H
+
+#define PHY_PD 0x1
+#define AVALID BIT(0)
+#define BVALID BIT(1)
+#define VBUSVALID BIT(2)
+#define SESSEND BIT(3)
+#define IDDIG BIT(4)
+
+/* USB-PHY helpers */
+#if (defined(CONFIG_OMAP4_USB_PHY)) || (defined(CONFIG_OMAP4_USB_PHY_MODULE))
+extern int omap4_usb_phy_mailbox(struct device *dev, u32 val);
+extern int omap4_usb_phy_power(struct device *dev, int on);
+#else
+static int omap4_usb_phy_mailbox(struct device *dev, u32 val)
+{
+ return 0;
+}
+static int omap4_usb_phy_power(struct device *dev, int on)
+{
+ return 0;
+}
+#endif
+
+#endif