18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0+ */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Copyright 2012 Freescale Semiconductor, Inc. 48c2ecf20Sopenharmony_ci */ 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_ci#ifndef __DRIVER_USB_CHIPIDEA_CI_HDRC_IMX_H 78c2ecf20Sopenharmony_ci#define __DRIVER_USB_CHIPIDEA_CI_HDRC_IMX_H 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_cistruct imx_usbmisc_data { 108c2ecf20Sopenharmony_ci struct device *dev; 118c2ecf20Sopenharmony_ci int index; 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ci unsigned int disable_oc:1; /* over current detect disabled */ 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ci /* true if over-current polarity is active low */ 168c2ecf20Sopenharmony_ci unsigned int oc_pol_active_low:1; 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ci /* true if dt specifies polarity */ 198c2ecf20Sopenharmony_ci unsigned int oc_pol_configured:1; 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_ci unsigned int pwr_pol:1; /* power polarity */ 228c2ecf20Sopenharmony_ci unsigned int evdo:1; /* set external vbus divider option */ 238c2ecf20Sopenharmony_ci unsigned int ulpi:1; /* connected to an ULPI phy */ 248c2ecf20Sopenharmony_ci unsigned int hsic:1; /* HSIC controlller */ 258c2ecf20Sopenharmony_ci unsigned int ext_id:1; /* ID from exteranl event */ 268c2ecf20Sopenharmony_ci unsigned int ext_vbus:1; /* Vbus from exteranl event */ 278c2ecf20Sopenharmony_ci struct usb_phy *usb_phy; 288c2ecf20Sopenharmony_ci enum usb_dr_mode available_role; /* runtime usb dr mode */ 298c2ecf20Sopenharmony_ci int emp_curr_control; 308c2ecf20Sopenharmony_ci int dc_vol_level_adjust; 318c2ecf20Sopenharmony_ci}; 328c2ecf20Sopenharmony_ci 338c2ecf20Sopenharmony_ciint imx_usbmisc_init(struct imx_usbmisc_data *data); 348c2ecf20Sopenharmony_ciint imx_usbmisc_init_post(struct imx_usbmisc_data *data); 358c2ecf20Sopenharmony_ciint imx_usbmisc_set_wakeup(struct imx_usbmisc_data *data, bool enabled); 368c2ecf20Sopenharmony_ciint imx_usbmisc_hsic_set_connect(struct imx_usbmisc_data *data); 378c2ecf20Sopenharmony_ciint imx_usbmisc_hsic_set_clk(struct imx_usbmisc_data *data, bool on); 388c2ecf20Sopenharmony_ciint imx_usbmisc_charger_detection(struct imx_usbmisc_data *data, bool connect); 398c2ecf20Sopenharmony_ci 408c2ecf20Sopenharmony_ci#endif /* __DRIVER_USB_CHIPIDEA_CI_HDRC_IMX_H */ 41