diff options
Diffstat (limited to 'arch/arm/plat-omap/include/plat/usb.h')
-rw-r--r-- | arch/arm/plat-omap/include/plat/usb.h | 54 |
1 files changed, 35 insertions, 19 deletions
diff --git a/arch/arm/plat-omap/include/plat/usb.h b/arch/arm/plat-omap/include/plat/usb.h index f888e0e57dc8..32dfe08023a4 100644 --- a/arch/arm/plat-omap/include/plat/usb.h +++ b/arch/arm/plat-omap/include/plat/usb.h | |||
@@ -7,15 +7,12 @@ | |||
7 | #include <plat/board.h> | 7 | #include <plat/board.h> |
8 | 8 | ||
9 | #define OMAP3_HS_USB_PORTS 3 | 9 | #define OMAP3_HS_USB_PORTS 3 |
10 | enum ehci_hcd_omap_mode { | ||
11 | EHCI_HCD_OMAP_MODE_UNKNOWN, | ||
12 | EHCI_HCD_OMAP_MODE_PHY, | ||
13 | EHCI_HCD_OMAP_MODE_TLL, | ||
14 | EHCI_HCD_OMAP_MODE_HSIC, | ||
15 | }; | ||
16 | 10 | ||
17 | enum ohci_omap3_port_mode { | 11 | enum usbhs_omap_port_mode { |
18 | OMAP_OHCI_PORT_MODE_UNUSED, | 12 | OMAP_USBHS_PORT_MODE_UNUSED, |
13 | OMAP_EHCI_PORT_MODE_PHY, | ||
14 | OMAP_EHCI_PORT_MODE_TLL, | ||
15 | OMAP_EHCI_PORT_MODE_HSIC, | ||
19 | OMAP_OHCI_PORT_MODE_PHY_6PIN_DATSE0, | 16 | OMAP_OHCI_PORT_MODE_PHY_6PIN_DATSE0, |
20 | OMAP_OHCI_PORT_MODE_PHY_6PIN_DPDM, | 17 | OMAP_OHCI_PORT_MODE_PHY_6PIN_DPDM, |
21 | OMAP_OHCI_PORT_MODE_PHY_3PIN_DATSE0, | 18 | OMAP_OHCI_PORT_MODE_PHY_3PIN_DATSE0, |
@@ -25,24 +22,45 @@ enum ohci_omap3_port_mode { | |||
25 | OMAP_OHCI_PORT_MODE_TLL_3PIN_DATSE0, | 22 | OMAP_OHCI_PORT_MODE_TLL_3PIN_DATSE0, |
26 | OMAP_OHCI_PORT_MODE_TLL_4PIN_DPDM, | 23 | OMAP_OHCI_PORT_MODE_TLL_4PIN_DPDM, |
27 | OMAP_OHCI_PORT_MODE_TLL_2PIN_DATSE0, | 24 | OMAP_OHCI_PORT_MODE_TLL_2PIN_DATSE0, |
28 | OMAP_OHCI_PORT_MODE_TLL_2PIN_DPDM, | 25 | OMAP_OHCI_PORT_MODE_TLL_2PIN_DPDM |
29 | }; | 26 | }; |
30 | 27 | ||
31 | struct ehci_hcd_omap_platform_data { | 28 | struct usbhs_omap_board_data { |
32 | enum ehci_hcd_omap_mode port_mode[OMAP3_HS_USB_PORTS]; | 29 | enum usbhs_omap_port_mode port_mode[OMAP3_HS_USB_PORTS]; |
33 | unsigned phy_reset:1; | ||
34 | 30 | ||
35 | /* have to be valid if phy_reset is true and portx is in phy mode */ | 31 | /* have to be valid if phy_reset is true and portx is in phy mode */ |
36 | int reset_gpio_port[OMAP3_HS_USB_PORTS]; | 32 | int reset_gpio_port[OMAP3_HS_USB_PORTS]; |
33 | |||
34 | /* Set this to true for ES2.x silicon */ | ||
35 | unsigned es2_compatibility:1; | ||
36 | |||
37 | unsigned phy_reset:1; | ||
38 | |||
39 | /* | ||
40 | * Regulators for USB PHYs. | ||
41 | * Each PHY can have a separate regulator. | ||
42 | */ | ||
43 | struct regulator *regulator[OMAP3_HS_USB_PORTS]; | ||
37 | }; | 44 | }; |
38 | 45 | ||
39 | struct ohci_hcd_omap_platform_data { | 46 | struct ehci_hcd_omap_platform_data { |
40 | enum ohci_omap3_port_mode port_mode[OMAP3_HS_USB_PORTS]; | 47 | enum usbhs_omap_port_mode port_mode[OMAP3_HS_USB_PORTS]; |
48 | int reset_gpio_port[OMAP3_HS_USB_PORTS]; | ||
49 | struct regulator *regulator[OMAP3_HS_USB_PORTS]; | ||
50 | unsigned phy_reset:1; | ||
51 | }; | ||
41 | 52 | ||
42 | /* Set this to true for ES2.x silicon */ | 53 | struct ohci_hcd_omap_platform_data { |
54 | enum usbhs_omap_port_mode port_mode[OMAP3_HS_USB_PORTS]; | ||
43 | unsigned es2_compatibility:1; | 55 | unsigned es2_compatibility:1; |
44 | }; | 56 | }; |
45 | 57 | ||
58 | struct usbhs_omap_platform_data { | ||
59 | enum usbhs_omap_port_mode port_mode[OMAP3_HS_USB_PORTS]; | ||
60 | |||
61 | struct ehci_hcd_omap_platform_data *ehci_data; | ||
62 | struct ohci_hcd_omap_platform_data *ohci_data; | ||
63 | }; | ||
46 | /*-------------------------------------------------------------------------*/ | 64 | /*-------------------------------------------------------------------------*/ |
47 | 65 | ||
48 | #define OMAP1_OTG_BASE 0xfffb0400 | 66 | #define OMAP1_OTG_BASE 0xfffb0400 |
@@ -80,19 +98,17 @@ enum musb_interface {MUSB_INTERFACE_ULPI, MUSB_INTERFACE_UTMI}; | |||
80 | 98 | ||
81 | extern void usb_musb_init(struct omap_musb_board_data *board_data); | 99 | extern void usb_musb_init(struct omap_musb_board_data *board_data); |
82 | 100 | ||
83 | extern void usb_ehci_init(const struct ehci_hcd_omap_platform_data *pdata); | 101 | extern void usb_ehci_init(const struct usbhs_omap_board_data *pdata); |
84 | 102 | ||
85 | extern void usb_ohci_init(const struct ohci_hcd_omap_platform_data *pdata); | 103 | extern void usb_ohci_init(const struct usbhs_omap_board_data *pdata); |
86 | 104 | ||
87 | extern int omap4430_phy_power(struct device *dev, int ID, int on); | 105 | extern int omap4430_phy_power(struct device *dev, int ID, int on); |
88 | extern int omap4430_phy_set_clk(struct device *dev, int on); | 106 | extern int omap4430_phy_set_clk(struct device *dev, int on); |
89 | extern int omap4430_phy_init(struct device *dev); | 107 | extern int omap4430_phy_init(struct device *dev); |
90 | extern int omap4430_phy_exit(struct device *dev); | 108 | extern int omap4430_phy_exit(struct device *dev); |
91 | extern int omap4430_phy_suspend(struct device *dev, int suspend); | 109 | extern int omap4430_phy_suspend(struct device *dev, int suspend); |
92 | |||
93 | #endif | 110 | #endif |
94 | 111 | ||
95 | |||
96 | /* | 112 | /* |
97 | * FIXME correct answer depends on hmc_mode, | 113 | * FIXME correct answer depends on hmc_mode, |
98 | * as does (on omap1) any nonzero value for config->otg port number | 114 | * as does (on omap1) any nonzero value for config->otg port number |