aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/usb')
-rw-r--r--include/linux/usb/musb.h70
1 files changed, 70 insertions, 0 deletions
diff --git a/include/linux/usb/musb.h b/include/linux/usb/musb.h
new file mode 100644
index 000000000000..d325a0d5bf4f
--- /dev/null
+++ b/include/linux/usb/musb.h
@@ -0,0 +1,70 @@
1/*
2 * This is used to for host and peripheral modes of the driver for
3 * Inventra (Multidrop) Highspeed Dual-Role Controllers: (M)HDRC.
4 *
5 * Board initialization should put one of these into dev->platform_data,
6 * probably on some platform_device named "musb_hdrc". It encapsulates
7 * key configuration differences between boards.
8 */
9
10/* The USB role is defined by the connector used on the board, so long as
11 * standards are being followed. (Developer boards sometimes won't.)
12 */
13enum musb_mode {
14 MUSB_UNDEFINED = 0,
15 MUSB_HOST, /* A or Mini-A connector */
16 MUSB_PERIPHERAL, /* B or Mini-B connector */
17 MUSB_OTG /* Mini-AB connector */
18};
19
20struct clk;
21
22struct musb_hdrc_platform_data {
23 /* MUSB_HOST, MUSB_PERIPHERAL, or MUSB_OTG */
24 u8 mode;
25
26 /* for clk_get() */
27 const char *clock;
28
29 /* (HOST or OTG) switch VBUS on/off */
30 int (*set_vbus)(struct device *dev, int is_on);
31
32 /* (HOST or OTG) mA/2 power supplied on (default = 8mA) */
33 u8 power;
34
35 /* (PERIPHERAL) mA/2 max power consumed (default = 100mA) */
36 u8 min_power;
37
38 /* (HOST or OTG) msec/2 after VBUS on till power good */
39 u8 potpgt;
40
41 /* TBD: chip defaults should probably go someplace else,
42 * e.g. number of tx/rx endpoints, etc
43 */
44 unsigned multipoint:1;
45
46 /* Power the device on or off */
47 int (*set_power)(int state);
48
49 /* Turn device clock on or off */
50 int (*set_clock)(struct clk *clock, int is_on);
51};
52
53
54/* TUSB 6010 support */
55
56#define TUSB6010_OSCCLK_60 16667 /* psec/clk @ 60.0 MHz */
57#define TUSB6010_REFCLK_24 41667 /* psec/clk @ 24.0 MHz XI */
58#define TUSB6010_REFCLK_19 52083 /* psec/clk @ 19.2 MHz CLKIN */
59
60#ifdef CONFIG_ARCH_OMAP2
61
62extern int __init tusb6010_setup_interface(
63 struct musb_hdrc_platform_data *data,
64 unsigned ps_refclk, unsigned waitpin,
65 unsigned async_cs, unsigned sync_cs,
66 unsigned irq, unsigned dmachan);
67
68extern int tusb6010_platform_retime(unsigned is_refclk);
69
70#endif /* OMAP2 */