On Fri, Sep 09, 2016 at 12:50:45PM +0200, Fabien Lahoudere wrote: > Hi, > > Thanks for your reply. > > On 09/09/16 09:42, Peter Chen wrote: > >On Thu, Sep 08, 2016 at 10:00:22AM +0200, Fabien Lahoudere wrote: > >>Hi, > >> > >>I have an imx53 based boards with an ULPI phy (smsc 3315) connected to usbh2 > >>and usbh3 and encounter problem with patch > >>"usb: chipidea: coordinate usb phy initialization for different phy type". > >> > >>In drivers/usb/chipidea/core.c:ci_usb_phy_init, if I call > >>hw_phymode_configure() before usb_phy_init(), the system freeze. If I call > >>usb_phy_init() before hw_phymode_configure(), everything works fine. > >> > >>So I wonder if someone test ULPI phy? and if the following piece of patch > >>(that works in my case) could be acceptable : > > > >Do you use upstream kernel? I wonder if current drivers/usb/phy/phy-ulpi.c > >code can work well with DT? > > I use next-20160905 and my patch works fine if I call usb_phy_init() before > hw_phymode_configure(). So my issue with the current kernel appear before > calling phy-ulpi functions. > > > > >Stephen Boyd posted ULPI support for chipidea recently, would you please > >try if it works for you: > > > >usb: chipidea: Add support for ULPI PHY bus > > > > I try the patch and it did not works in my case. > > When I call _ci_usb_phy_init() before hw_phymode_configure(). I have a > timeout returned by ulpi_write() in function ulpi_register(). So the result > is worst. > > If I call _ci_usb_phy_init() after hw_phymode_configure(). The result is > still the same. > The system freeze in hw_phymode_configure() when doing : > hw_write(ci, OP_PORTSC, PORTSC_PTS(7) | PORTSC_PTW, portsc); > > So I think that the register can be written if the phy is not powered but > don 't understand why. > > If you want I can submit my patch to discuss about it. > Yes, please send the patch and tell me which dts and ULPI code you are using. We need to understand why the system is hang when configure the PHY mode at portsc for your case, afaik, the PHY mode needs to be configured as ULPI mode before using ULPI view port to access ULPI PHY. Besides, do you enable this ULPI PHY at u-boot? -- Best Regards, Peter Chen -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html