0001
0002
0003
0004
0005
0006
0007
0008 #ifndef __LINUX_USB_ULPI_H
0009 #define __LINUX_USB_ULPI_H
0010
0011 #include <linux/usb/otg.h>
0012 #include <linux/ulpi/regs.h>
0013
0014
0015
0016
0017
0018
0019 #define ULPI_OTG_ID_PULLUP (1 << 0)
0020 #define ULPI_OTG_DP_PULLDOWN_DIS (1 << 1)
0021 #define ULPI_OTG_DM_PULLDOWN_DIS (1 << 2)
0022 #define ULPI_OTG_DISCHRGVBUS (1 << 3)
0023 #define ULPI_OTG_CHRGVBUS (1 << 4)
0024 #define ULPI_OTG_DRVVBUS (1 << 5)
0025 #define ULPI_OTG_DRVVBUS_EXT (1 << 6)
0026 #define ULPI_OTG_EXTVBUSIND (1 << 7)
0027
0028 #define ULPI_IC_6PIN_SERIAL (1 << 8)
0029 #define ULPI_IC_3PIN_SERIAL (1 << 9)
0030 #define ULPI_IC_CARKIT (1 << 10)
0031 #define ULPI_IC_CLKSUSPM (1 << 11)
0032 #define ULPI_IC_AUTORESUME (1 << 12)
0033 #define ULPI_IC_EXTVBUS_INDINV (1 << 13)
0034 #define ULPI_IC_IND_PASSTHRU (1 << 14)
0035 #define ULPI_IC_PROTECT_DIS (1 << 15)
0036
0037 #define ULPI_FC_HS (1 << 16)
0038 #define ULPI_FC_FS (1 << 17)
0039 #define ULPI_FC_LS (1 << 18)
0040 #define ULPI_FC_FS4LS (1 << 19)
0041 #define ULPI_FC_TERMSEL (1 << 20)
0042 #define ULPI_FC_OP_NORM (1 << 21)
0043 #define ULPI_FC_OP_NODRV (1 << 22)
0044 #define ULPI_FC_OP_DIS_NRZI (1 << 23)
0045 #define ULPI_FC_OP_NSYNC_NEOP (1 << 24)
0046 #define ULPI_FC_RST (1 << 25)
0047 #define ULPI_FC_SUSPM (1 << 26)
0048
0049
0050
0051 #if IS_ENABLED(CONFIG_USB_ULPI)
0052 struct usb_phy *otg_ulpi_create(struct usb_phy_io_ops *ops,
0053 unsigned int flags);
0054
0055 struct usb_phy *devm_otg_ulpi_create(struct device *dev,
0056 struct usb_phy_io_ops *ops,
0057 unsigned int flags);
0058 #else
0059 static inline struct usb_phy *otg_ulpi_create(struct usb_phy_io_ops *ops,
0060 unsigned int flags)
0061 {
0062 return NULL;
0063 }
0064
0065 static inline struct usb_phy *devm_otg_ulpi_create(struct device *dev,
0066 struct usb_phy_io_ops *ops,
0067 unsigned int flags)
0068 {
0069 return NULL;
0070 }
0071 #endif
0072
0073 #ifdef CONFIG_USB_ULPI_VIEWPORT
0074
0075 extern struct usb_phy_io_ops ulpi_viewport_access_ops;
0076 #endif
0077
0078 #endif