1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Copyright 2012 Freescale Semiconductor, Inc.
4  */
5 
6 #ifndef __DRIVER_USB_CHIPIDEA_CI_HDRC_IMX_H
7 #define __DRIVER_USB_CHIPIDEA_CI_HDRC_IMX_H
8 
9 struct imx_usbmisc_data {
10 	struct device *dev;
11 	int index;
12 
13 	unsigned int disable_oc:1; /* over current detect disabled */
14 
15 	/* true if over-current polarity is active low */
16 	unsigned int oc_pol_active_low:1;
17 
18 	/* true if dt specifies polarity */
19 	unsigned int oc_pol_configured:1;
20 
21 	unsigned int pwr_pol:1; /* power polarity */
22 	unsigned int evdo:1; /* set external vbus divider option */
23 	unsigned int ulpi:1; /* connected to an ULPI phy */
24 	unsigned int hsic:1; /* HSIC controller */
25 	unsigned int ext_id:1; /* ID from exteranl event */
26 	unsigned int ext_vbus:1; /* Vbus from exteranl event */
27 	struct usb_phy *usb_phy;
28 	enum usb_dr_mode available_role; /* runtime usb dr mode */
29 	int emp_curr_control;
30 	int dc_vol_level_adjust;
31 	int rise_fall_time_adjust;
32 };
33 
34 int imx_usbmisc_init(struct imx_usbmisc_data *data);
35 int imx_usbmisc_init_post(struct imx_usbmisc_data *data);
36 int imx_usbmisc_hsic_set_connect(struct imx_usbmisc_data *data);
37 int imx_usbmisc_charger_detection(struct imx_usbmisc_data *data, bool connect);
38 int imx_usbmisc_suspend(struct imx_usbmisc_data *data, bool wakeup);
39 int imx_usbmisc_resume(struct imx_usbmisc_data *data, bool wakeup);
40 
41 #endif /* __DRIVER_USB_CHIPIDEA_CI_HDRC_IMX_H */
42