blob: f4cb0ec373c3d743237c18bb49969b1c88df05b6 [file] [log] [blame]
Neil Zhangdde34cc2011-10-12 16:49:24 +08001/*
2 * Copyright (C) 2011 Marvell International Ltd. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 */
9
10#ifndef __MV_PLATFORM_USB_H
11#define __MV_PLATFORM_USB_H
12
13enum pxa_ehci_type {
14 EHCI_UNDEFINED = 0,
15 PXA_U2OEHCI, /* pxa 168, 9xx */
16 PXA_SPH, /* pxa 168, 9xx SPH */
17 MMP3_HSIC, /* mmp3 hsic */
18 MMP3_FSIC, /* mmp3 fsic */
19};
20
21enum {
22 MV_USB_MODE_OTG,
23 MV_USB_MODE_HOST,
24};
25
26enum {
27 VBUS_LOW = 0,
28 VBUS_HIGH = 1 << 0,
29};
30
31struct mv_usb_addon_irq {
32 unsigned int irq;
33 int (*poll)(void);
34};
35
36struct mv_usb_platform_data {
37 unsigned int clknum;
38 char **clkname;
39 struct mv_usb_addon_irq *id; /* Only valid for OTG. ID pin change*/
40 struct mv_usb_addon_irq *vbus; /* valid for OTG/UDC. VBUS change*/
41
42 /* only valid for HCD. OTG or Host only*/
43 unsigned int mode;
44
Neil Zhang277164f2011-12-20 13:20:22 +080045 /* This flag is used for that needs id pin checked by otg */
46 unsigned int disable_otg_clock_gating:1;
47 /* Force a_bus_req to be asserted */
48 unsigned int otg_force_a_bus_req:1;
49
Neil Zhang5e6c86b2011-12-20 13:20:21 +080050 int (*phy_init)(void __iomem *regbase);
51 void (*phy_deinit)(void __iomem *regbase);
Neil Zhangdde34cc2011-10-12 16:49:24 +080052 int (*set_vbus)(unsigned int vbus);
53};
54
Neil Zhang5e6c86b2011-12-20 13:20:21 +080055#ifndef CONFIG_HAVE_CLK
56/* Dummy stub for clk framework */
57#define clk_get(dev, id) NULL
58#define clk_put(clock) do {} while (0)
59#define clk_enable(clock) do {} while (0)
60#define clk_disable(clock) do {} while (0)
61#endif
62
Neil Zhangdde34cc2011-10-12 16:49:24 +080063#endif