Re: ULPI phy issue with

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I have splitted the patch to submit only imx53 configuration. I will follow Stephen submission to test it with my board and add needed code to solve my clock issue.

Thanks

Fabien


On 14/09/16 12:14, Peter Chen wrote:
On Tue, Sep 13, 2016 at 08:05:32PM +0200, Fabien Lahoudere wrote:
Hi Peter,


This is our device tree imx-ppd.dts:

I may know the reason why you meet hang at current flow, you are using
generic phy driver, and the PHY clock is enabled at phy_init which is
called later than setting portsc.pts. The current flow to enable ULPI
phy is like below:

This explains why the patch works if USBPHY_INTERFACE_MODE_ULPI works as
USBPHY_INTERFACE_MODE_UTMI. because _ci_usb_phy_init(ci) initialise clock
and generator.

Yes.



1. Enable ULPI and choose its clock select at usbmisc, which you have
already done.
2. Enable the input clock for ULPI

This is done by _ci_usb_phy_init(ci); and this function only do this so I
think we should have in ci_usb_phy_init(ci);:
case USBPHY_INTERFACE_MODE_ULPI:
		ret = _ci_usb_phy_init(ci);
		if (!ret)
			hw_wait_phy_stable();
		else
			return ret;
3. set portsc.pts

		hw_phymode_configure(ci);
		ci_ulpi_phy_init(ci); // to init ULPI specific config once portsc.pts is
enabled
		break;

You may need to have a ULPI PHY driver which do some power sequence
(clock, regulator, etc) before setting portsc.pts and visit ULPI
register.
This is already done by _ci_usb_phy_init(ci);

In conclusion, I think USBPHY_INTERFACE_MODE_ULPI should work as
USBPHY_INTERFACE_MODE_UTMI but with an extra function to visit ULPI register
(ci_ulpi_phy_init(ci);).
Am I wrong?

Currently, you are using generic PHY driver which does not intends for
ULPI PHY uses, looks at usb/phy/phy-upi.c and usb/common/ulpi.c, both
need to read id at its initialization.



I am also a little confused how Stephen Boyd's ULPI driver for qualcomm
platform, I will cc on discussion.

As you ask me earlier maybe he init clock from bootloader.

Yes, his PHY input clock is always on.

Stephen boyd's ulpi support at chipidea is the correct way. For your
case, you can create a generic ULPI PHY driver, and registered it on
ulpi bus, but you still need power sequence for your case.

I am afraid you may use your hack temporarily at local, once Stephen's patch
and power sequence patch set are queued, you can submit your changes.

--
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



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux