static void usbotg_uninit_ext(struct platform_device *pdev);
static void usbotg_clock_gate(bool on);
static void _dr_discharge_line(bool enable);
+extern bool usb_icbug_swfix_need(void);
/* The usb_phy1_clk do not have enable/disable function at clock.c
* and PLL output for usb1's phy should be always enabled.
, phy_reg + HW_USBPHY_CTRL_SET);
}
+ if (!usb_icbug_swfix_need())
+ __raw_writel(((1 << 17) | (1 << 18)),
+ phy_reg + HW_USBPHY_IP_SET);
return 0;
}
/* Notes: configure USB clock*/
{
struct platform_device *pdev, *pdev_wakeup;
static void __iomem *anatop_base_addr = MX6_IO_ADDRESS(ANATOP_BASE_ADDR);
+
#ifdef CONFIG_USB_OTG
/* wake_up_enable is useless, just for usb_register_remote_wakeup execution*/
dr_utmi_config.wake_up_enable = _device_wakeup_enable;
#ifdef CONFIG_USB_EHCI_ARC_OTG
dr_utmi_config.operating_mode = DR_HOST_MODE;
dr_utmi_config.wake_up_enable = _host_wakeup_enable;
- dr_utmi_config.platform_rh_suspend = _host_platform_rh_suspend;
- dr_utmi_config.platform_rh_resume = _host_platform_rh_resume;
+ if (usb_icbug_swfix_need()) {
+ dr_utmi_config.platform_rh_suspend = _host_platform_rh_suspend;
+ dr_utmi_config.platform_rh_resume = _host_platform_rh_resume;
+ } else {
+ dr_utmi_config.platform_rh_suspend = NULL;
+ dr_utmi_config.platform_rh_resume = NULL;
+ }
dr_utmi_config.platform_set_disconnect_det = fsl_platform_otg_set_usb_phy_dis;
dr_utmi_config.phy_lowpower_suspend = _host_phy_lowpower_suspend;
dr_utmi_config.is_wakeup_event = _is_host_wakeup;
static struct clk *usb_oh3_clk;
extern int clk_get_usecount(struct clk *clk);
static struct fsl_usb2_platform_data usbh1_config;
+extern bool usb_icbug_swfix_need(void);
static void fsl_platform_h1_set_usb_phy_dis(
struct fsl_usb2_platform_data *pdata, bool enable)
tmp |= (BM_USBPHY_CTRL_ENUTMILEVEL2 | BM_USBPHY_CTRL_ENUTMILEVEL3);
__raw_writel(tmp, phy_reg + HW_USBPHY_CTRL);
+ if (!usb_icbug_swfix_need())
+ __raw_writel(((1 << 17) | (1 << 18)),
+ phy_reg + HW_USBPHY_IP_SET);
return 0;
}
static int fsl_usb_host_init_ext(struct platform_device *pdev)
.power_budget = 500, /* 500 mA max power */
.wake_up_enable = _wake_up_enable,
.usb_clock_for_pm = usbh1_clock_gate,
- .platform_rh_suspend = usbh1_platform_rh_suspend,
- .platform_rh_resume = usbh1_platform_rh_resume,
.platform_set_disconnect_det = fsl_platform_h1_set_usb_phy_dis,
.phy_lowpower_suspend = _phy_lowpower_suspend,
.is_wakeup_event = _is_usbh1_wakeup,
{
struct platform_device *pdev, *pdev_wakeup;
static void __iomem *anatop_base_addr = MX6_IO_ADDRESS(ANATOP_BASE_ADDR);
+
usbh1_config.wakeup_pdata = &usbh1_wakeup_config;
+ if (usb_icbug_swfix_need()) {
+ usbh1_config.platform_rh_suspend = usbh1_platform_rh_suspend;
+ usbh1_config.platform_rh_resume = usbh1_platform_rh_resume;
+ } else {
+ usbh1_config.platform_rh_suspend = NULL;
+ usbh1_config.platform_rh_resume = NULL;
+ }
if (cpu_is_mx6sl())
pdev = imx6sl_add_fsl_ehci_hs(1, &usbh1_config);
else
pdev_wakeup = imx6q_add_fsl_usb2_hs_wakeup(1, &usbh1_wakeup_config);
((struct fsl_usb2_platform_data *)(pdev->dev.platform_data))->wakeup_pdata =
(struct fsl_usb2_wakeup_platform_data *)(pdev_wakeup->dev.platform_data);
+
/* Some phy and power's special controls for host1
* 1. The external charger detector needs to be disabled
* or the signal at DP will be poor