aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-ux500/include/mach/musb_db8500.h
blob: c4f0ccfd18b76723e3e366f67265881b4cc281b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*
 * Copyright (C) 2009 ST Ericsson.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2, as
 * published by the Free Software Foundation.
 */

/* AB8500 USB macros
 */
#define AB8500_REV_10 0x10
#define AB8500_REV_11 0x11
#define AB8500_USB_HOST 0x68
#define AB8500_ID_WAKEUP_RISING 90
#define AB8500_ID_WAKEUP_FALLING 96
#define AB8500_VBUS_RISING 15
#define AB8500_VBUS_FALLING 14
#define AB8500_IT_MASK20_MASK 0xFB
#define AB8500_IT_MASK21_MASK 0xFE
#define AB8500_IT_MASK2_MASK 0x3F
#define AB8500_SRC_INT_USB_DEVICE 0x80
#define AB8500_SRC_INT_USB_HOST 0x04
#define AB8500_VBUS_ENABLE 0x1
#define AB8500_VBUS_DISABLE 0x0
#define AB8500_USB_HOST_ENABLE 0x1
#define AB8500_USB_HOST_DISABLE 0x0
#define AB8500_USB_DEVICE_ENABLE 0x2
#define AB8500_USB_DEVICE_DISABLE 0x0
#define AB8500_MAIN_WATCHDOG_ENABLE 0x1
#define AB8500_MAIN_WATCHDOG_KICK 0x2
#define AB8500_MAIN_WATCHDOG_DISABLE 0x0

/* USB Macros
 */
#define WATCHDOG_DELAY 10
#define USB_ENABLE 1
#define USB_DISABLE 0

/* Specific functions for USB Phy enable and disable
 */
int musb_phy_en(u8 mode);
int musb_force_detect(u8 mode);
void usb_kick_watchdog(void);
void usb_host_insert_handler(void);
void usb_host_remove_handler(void);
void usb_host_phy_en(int);
void usb_device_insert_handler(void);
void usb_device_remove_handler(void);
void usb_device_phy_en(int);