Dear Aven,
We tried build in usb host module, And test failed on usb host 3.
Our procedure:
1, unmount usb host module.
2, External HUB reset over HW reset pin.
3, mount usb host module.
=====================================================================================
We changed USB host driver from built-in to module, then stop controller by unloading USB host driver and restart controller by loading USB host driver. This way works for HOST1, but does not work for HOST3. While checking with usb_h1.c and usb_h3.c, found that usb_h3.c seems not to support phy disconnected detection.
static struct fsl_usb2_platform_data usbh1_config = {
.name = "Host 1",
.init = fsl_usb_host_init_ext ,
.exit = fsl_usb_host_uninit_ext ,
. operating_mode = FSL_USB2_MPH_HOST,
. phy_mode = FSL_USB2_PHY_UTMI_WIDE,
. power_budget = 500, /* 500 mA max power */
. wake_up_enable = _ wake_up_enable ,
. usb_clock_for_pm = usbh1_clock_gate,
. platform_set_disconnect_det = fsl_platform_h1_set_usb_phy_dis,
. phy_lowpower_suspend = _ phy_lowpower_suspend ,
. is_wakeup_event = _is_usbh1_wakeup,
. wakeup_handler = h1_wakeup_handler,
. platform_phy_power_on = usbh1_platform_phy_power_on,
.transceiver = " utmi ",
. phy_regs = USB_PHY1_BASE_ADDR,
};
static struct fsl_usb2_platform_data usbh3_config = {
.name = "Host 3",
.init = fsl_usb_host_init_ext ,
.exit = fsl_usb_host_uninit_ext ,
. operating_mode = FSL_USB2_MPH_HOST,
. phy_mode = FSL_USB2_PHY_HSIC,
. power_budget = 500, /* 500 mA max power */
. wake_up_enable = _ wake_up_enable ,
. usb_clock_for_pm = usbh3_clock_gate,
. phy_lowpower_suspend = _ phy_lowpower_suspend ,
. is_wakeup_event = _is_usbh3_wakeup,
. wakeup_handler = usbh3_wakeup_handler,
.transceiver = " hsic_xcvr ",
. hsic_post_ops = hsic_start ,
. hsic_device_connected = hsic_device_connected ,
};
Therefore, this way seems does not work for HSIC. Could you give us any suggestion?