]>
Commit | Line | Data |
---|---|---|
5fd54ace | 1 | // SPDX-License-Identifier: GPL-2.0 |
3a229eb1 HK |
2 | /* |
3 | * ulpi.h -- ULPI defines and function prorotypes | |
4 | * | |
5 | * Copyright (C) 2010 Nokia Corporation | |
6 | * | |
7 | * This software is distributed under the terms of the GNU General | |
8 | * Public License ("GPL") as published by the Free Software Foundation, | |
9 | * version 2 of that License. | |
10 | */ | |
11 | ||
2d57a95f DM |
12 | #ifndef __LINUX_USB_ULPI_H |
13 | #define __LINUX_USB_ULPI_H | |
14 | ||
5128993b | 15 | #include <linux/usb/otg.h> |
289fcff4 HK |
16 | #include <linux/ulpi/regs.h> |
17 | ||
3a229eb1 HK |
18 | /*-------------------------------------------------------------------------*/ |
19 | ||
13dd0c97 IG |
20 | /* |
21 | * ULPI Flags | |
22 | */ | |
23 | #define ULPI_OTG_ID_PULLUP (1 << 0) | |
24 | #define ULPI_OTG_DP_PULLDOWN_DIS (1 << 1) | |
25 | #define ULPI_OTG_DM_PULLDOWN_DIS (1 << 2) | |
26 | #define ULPI_OTG_DISCHRGVBUS (1 << 3) | |
27 | #define ULPI_OTG_CHRGVBUS (1 << 4) | |
28 | #define ULPI_OTG_DRVVBUS (1 << 5) | |
29 | #define ULPI_OTG_DRVVBUS_EXT (1 << 6) | |
30 | #define ULPI_OTG_EXTVBUSIND (1 << 7) | |
31 | ||
32 | #define ULPI_IC_6PIN_SERIAL (1 << 8) | |
33 | #define ULPI_IC_3PIN_SERIAL (1 << 9) | |
34 | #define ULPI_IC_CARKIT (1 << 10) | |
35 | #define ULPI_IC_CLKSUSPM (1 << 11) | |
36 | #define ULPI_IC_AUTORESUME (1 << 12) | |
37 | #define ULPI_IC_EXTVBUS_INDINV (1 << 13) | |
38 | #define ULPI_IC_IND_PASSTHRU (1 << 14) | |
39 | #define ULPI_IC_PROTECT_DIS (1 << 15) | |
40 | ||
41 | #define ULPI_FC_HS (1 << 16) | |
42 | #define ULPI_FC_FS (1 << 17) | |
43 | #define ULPI_FC_LS (1 << 18) | |
44 | #define ULPI_FC_FS4LS (1 << 19) | |
45 | #define ULPI_FC_TERMSEL (1 << 20) | |
46 | #define ULPI_FC_OP_NORM (1 << 21) | |
47 | #define ULPI_FC_OP_NODRV (1 << 22) | |
48 | #define ULPI_FC_OP_DIS_NRZI (1 << 23) | |
49 | #define ULPI_FC_OP_NSYNC_NEOP (1 << 24) | |
50 | #define ULPI_FC_RST (1 << 25) | |
51 | #define ULPI_FC_SUSPM (1 << 26) | |
52 | ||
53 | /*-------------------------------------------------------------------------*/ | |
54 | ||
7fa4cd1a | 55 | #if IS_ENABLED(CONFIG_USB_ULPI) |
298b083c | 56 | struct usb_phy *otg_ulpi_create(struct usb_phy_io_ops *ops, |
2d57a95f | 57 | unsigned int flags); |
7fa4cd1a FE |
58 | #else |
59 | static inline struct usb_phy *otg_ulpi_create(struct usb_phy_io_ops *ops, | |
60 | unsigned int flags) | |
61 | { | |
62 | return NULL; | |
63 | } | |
64 | #endif | |
2d57a95f | 65 | |
ee398ba9 BG |
66 | #ifdef CONFIG_USB_ULPI_VIEWPORT |
67 | /* access ops for controllers with a viewport register */ | |
298b083c | 68 | extern struct usb_phy_io_ops ulpi_viewport_access_ops; |
ee398ba9 BG |
69 | #endif |
70 | ||
2d57a95f | 71 | #endif /* __LINUX_USB_ULPI_H */ |