diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2012-11-22 15:35:22 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-12-13 22:18:46 +0100 |
commit | a4076ddf6577a5163c4d36aa4dff2e674df37b2d (patch) | |
tree | 1a5e656f29a49f8f77411b77cd52fead9688046f /include/usb/chipidea-imx.h | |
parent | 15fd89d0a49f015e2b6078a28cb61400f4028e39 (diff) | |
download | barebox-a4076ddf6577a5163c4d36aa4dff2e674df37b2d.tar.gz barebox-a4076ddf6577a5163c4d36aa4dff2e674df37b2d.tar.xz |
USB i.MX: Add chipidea driver support
For proper USB function the usbmisc registers have to be initialized.
This patch adds a driver which matches for the usbmisc registers. This
driver is called from a new driver which binds to the USB ports to
configure the misc registers. After that the driver registers the EHCI
driver and an ULPI transceiver if necessary. Currently only host mode
is supported, but device support can be added later.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/usb/chipidea-imx.h')
-rw-r--r-- | include/usb/chipidea-imx.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/include/usb/chipidea-imx.h b/include/usb/chipidea-imx.h new file mode 100644 index 0000000000..e98cc891b7 --- /dev/null +++ b/include/usb/chipidea-imx.h @@ -0,0 +1,46 @@ +#ifndef __USB_CHIPIDEA_IMX_H +#define __USB_CHIPIDEA_IMX_H + +/* + * POTSC flags + */ +#define MXC_EHCI_SERIAL (1 << 29) +#define MXC_EHCI_MODE_UTMI_8BIT (0 << 30) +#define MXC_EHCI_MODE_UTMI_16_BIT ((0 << 30) | (1 << 28)) +#define MXC_EHCI_MODE_PHILIPS (1 << 30) +#define MXC_EHCI_MODE_ULPI (2 << 30) +#define MXC_EHCI_MODE_SERIAL (3 << 30) + +/* + * USB misc flags + */ +#define MXC_EHCI_INTERFACE_DIFF_UNI (0 << 0) +#define MXC_EHCI_INTERFACE_DIFF_BI (1 << 0) +#define MXC_EHCI_INTERFACE_SINGLE_UNI (2 << 0) +#define MXC_EHCI_INTERFACE_SINGLE_BI (3 << 0) +#define MXC_EHCI_INTERFACE_MASK (0xf) + +#define MXC_EHCI_POWER_PINS_ENABLED (1 << 5) +#define MXC_EHCI_PWR_PIN_ACTIVE_HIGH (1 << 6) +#define MXC_EHCI_OC_PIN_ACTIVE_LOW (1 << 7) +#define MXC_EHCI_TLL_ENABLED (1 << 8) + +#define MXC_EHCI_INTERNAL_PHY (1 << 9) +#define MXC_EHCI_IPPUE_DOWN (1 << 10) +#define MXC_EHCI_IPPUE_UP (1 << 11) +#define MXC_EHCI_WAKEUP_ENABLED (1 << 12) +#define MXC_EHCI_ITC_NO_THRESHOLD (1 << 13) + +enum imx_usb_mode { + IMX_USB_MODE_HOST, + IMX_USB_MODE_DEVICE, +}; + +struct imxusb_platformdata { + unsigned long flags; + enum imx_usb_mode mode; +}; + +int imx_usbmisc_port_init(int port, unsigned flags); + +#endif /* __USB_CHIPIDEA_IMX_H */ |