blob: b7ad6175f5bf7d553787a3ff4a9be9e7363f78e6 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Shawn Guo641dfe82014-05-19 20:41:52 +08002#ifndef __MACH_IMX_EHCI_H
3#define __MACH_IMX_EHCI_H
4
5/* values for portsc field */
6#define MXC_EHCI_PHY_LOW_POWER_SUSPEND (1 << 23)
7#define MXC_EHCI_FORCE_FS (1 << 24)
8#define MXC_EHCI_UTMI_8BIT (0 << 28)
9#define MXC_EHCI_UTMI_16BIT (1 << 28)
10#define MXC_EHCI_SERIAL (1 << 29)
11#define MXC_EHCI_MODE_UTMI (0 << 30)
12#define MXC_EHCI_MODE_PHILIPS (1 << 30)
13#define MXC_EHCI_MODE_ULPI (2 << 30)
14#define MXC_EHCI_MODE_SERIAL (3 << 30)
15
16/* values for flags field */
17#define MXC_EHCI_INTERFACE_DIFF_UNI (0 << 0)
18#define MXC_EHCI_INTERFACE_DIFF_BI (1 << 0)
19#define MXC_EHCI_INTERFACE_SINGLE_UNI (2 << 0)
20#define MXC_EHCI_INTERFACE_SINGLE_BI (3 << 0)
21#define MXC_EHCI_INTERFACE_MASK (0xf)
22
23#define MXC_EHCI_POWER_PINS_ENABLED (1 << 5)
24#define MXC_EHCI_PWR_PIN_ACTIVE_HIGH (1 << 6)
25#define MXC_EHCI_OC_PIN_ACTIVE_LOW (1 << 7)
26#define MXC_EHCI_TTL_ENABLED (1 << 8)
27
28#define MXC_EHCI_INTERNAL_PHY (1 << 9)
29#define MXC_EHCI_IPPUE_DOWN (1 << 10)
30#define MXC_EHCI_IPPUE_UP (1 << 11)
31#define MXC_EHCI_WAKEUP_ENABLED (1 << 12)
32#define MXC_EHCI_ITC_NO_THRESHOLD (1 << 13)
33
34#define MXC_USBCTRL_OFFSET 0
35#define MXC_USB_PHY_CTR_FUNC_OFFSET 0x8
36#define MXC_USB_PHY_CTR_FUNC2_OFFSET 0xc
37#define MXC_USBH2CTRL_OFFSET 0x14
38
Shawn Guo641dfe82014-05-19 20:41:52 +080039int mx25_initialize_usb_hw(int port, unsigned int flags);
40int mx31_initialize_usb_hw(int port, unsigned int flags);
41int mx35_initialize_usb_hw(int port, unsigned int flags);
42int mx27_initialize_usb_hw(int port, unsigned int flags);
43
44#endif /* __MACH_IMX_EHCI_H */