2012-05-11 21:25:46 +07:00
|
|
|
/*
|
|
|
|
* Platform data for the chipidea USB dual role controller
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __LINUX_USB_CHIPIDEA_H
|
|
|
|
#define __LINUX_USB_CHIPIDEA_H
|
|
|
|
|
2012-07-07 21:56:46 +07:00
|
|
|
#include <linux/usb/otg.h>
|
|
|
|
|
2013-06-24 18:46:36 +07:00
|
|
|
struct ci_hdrc;
|
|
|
|
struct ci_hdrc_platform_data {
|
2012-05-11 21:25:46 +07:00
|
|
|
const char *name;
|
|
|
|
/* offset of the capability registers */
|
|
|
|
uintptr_t capoffset;
|
2012-05-11 21:25:55 +07:00
|
|
|
unsigned power_budget;
|
2012-07-07 21:56:46 +07:00
|
|
|
struct usb_phy *phy;
|
2013-06-13 21:59:56 +07:00
|
|
|
enum usb_phy_interface phy_mode;
|
2012-05-11 21:25:46 +07:00
|
|
|
unsigned long flags;
|
2013-06-24 18:46:36 +07:00
|
|
|
#define CI_HDRC_REGS_SHARED BIT(0)
|
|
|
|
#define CI_HDRC_REQUIRE_TRANSCEIVER BIT(1)
|
|
|
|
#define CI_HDRC_DISABLE_STREAMING BIT(3)
|
2013-08-14 16:44:08 +07:00
|
|
|
/*
|
|
|
|
* Only set it when DCCPARAMS.DC==1 and DCCPARAMS.HC==1,
|
|
|
|
* but otg is not supported (no register otgsc).
|
|
|
|
*/
|
|
|
|
#define CI_HDRC_DUAL_ROLE_NOT_OTG BIT(4)
|
2014-01-10 12:51:27 +07:00
|
|
|
#define CI_HDRC_IMX28_WRITE_FIX BIT(5)
|
2014-02-19 12:41:43 +07:00
|
|
|
#define CI_HDRC_FORCE_FULLSPEED BIT(6)
|
2013-06-13 21:59:57 +07:00
|
|
|
enum usb_dr_mode dr_mode;
|
2013-06-24 18:46:36 +07:00
|
|
|
#define CI_HDRC_CONTROLLER_RESET_EVENT 0
|
|
|
|
#define CI_HDRC_CONTROLLER_STOPPED_EVENT 1
|
|
|
|
void (*notify_event) (struct ci_hdrc *ci, unsigned event);
|
2013-08-14 16:44:03 +07:00
|
|
|
struct regulator *reg_vbus;
|
2012-05-11 21:25:46 +07:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Default offset of capability registers */
|
|
|
|
#define DEF_CAPOFFSET 0x100
|
|
|
|
|
2013-06-24 18:46:36 +07:00
|
|
|
/* Add ci hdrc device */
|
|
|
|
struct platform_device *ci_hdrc_add_device(struct device *dev,
|
2012-07-07 21:56:41 +07:00
|
|
|
struct resource *res, int nres,
|
2013-06-24 18:46:36 +07:00
|
|
|
struct ci_hdrc_platform_data *platdata);
|
|
|
|
/* Remove ci hdrc device */
|
|
|
|
void ci_hdrc_remove_device(struct platform_device *pdev);
|
2012-07-07 21:56:41 +07:00
|
|
|
|
2012-05-11 21:25:46 +07:00
|
|
|
#endif
|