lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 6 Sep 2010 00:00:12 +0800
From:	Ming Lei <tom.leiming@...il.com>
To:	Felipe Balbi <me@...ipebalbi.com>
Cc:	greg@...ah.com, linux-usb@...r.kernel.org,
	linux-omap@...r.kernel.org, linux-kernel@...r.kernel.org,
	David Brownell <dbrownell@...rs.sourceforge.net>,
	Felipe Balbi <felipe.balbi@...ia.com>,
	Anand Gadiyar <gadiyar@...com>,
	Mike Frysinger <vapier@...too.org>,
	Sergei Shtylyov <sshtylyov@...mvista.com>
Subject: Re: [PATCH] USB: otg: twl4030: fix phy initialization

2010/9/5 Felipe Balbi <me@...ipebalbi.com>:
> Hi,
>
> On Sun, 5 Sep 2010 14:42:51 +0800, Ming Lei <tom.leiming@...il.com> wrote:
>> issue #1:(musb device not work with cable connected with PC)
>>         -twl->asleep is set as zero in .probe since bootloader has not
>> powerdown phy
>>         -EVENT_VBUS returned from twl4030_usb_linkstat since usb cable
>> is connected with PC
>>         -twl4030_phy_resume is called but does nothing since
>> twl->asleep is zero
>>         -the following are not called to initialize otg phy:
>>                  twl4030_phy_power / twl4030_i2c_access /
>>                  twl4030_usb_set_mode
>>         -so musb device mode does not work
>
> ok, I see. So what you could do is enable regulators on probe
> based on PHYPWR bit.

This patch will enable regulators on probe based on current link state
returned from twl4030_usb_linkstat instead of PHYPWR bit. If vbus or
ID event detected, call __twl4030_phy_resume to enable regulators/
phy power/set mode to make phy into work state, or else call
__twl4030_phy_power(0) to power down otg phy.

See twl4030_usb_phy_init introduced in the patch.

>> No, .asleep flag is set according to the current link state,
>> instead of the initial state of transceiver. I don't think the patch
>> will cause break anything. If you think it will, please describe the
>> break in detail.
>
> if we revert that patch, you'll see that usb3v1 ldos are left on

You commit before does fix one problem, which may keep phy in
power on even no cable connected, so I do not request a simple
revert, :-).

> if we never plug/unplug usb cable. AFAIR, the reset state of those
> LDOs is ON, so that's why we need that patch.

>From Table 5-373 of TPS65950 manual[1], usb3v1 ldo is in sleep state
after reset. But it is put into active state in twl4030_usb_ldo_init now,
seems activating it too early.  I have verified it OK on beagle board to
remove the early activating of usb3v1 in twl4030_usb_ldo_init. I'll merge
it into the v2 of the patch and post it for your review.

>
> I'll try to work on it monday judging I'll have laptop and HW
> available by then.

Very good, thanks your work!

[1], TPS65950 Technical Reference Manual, http://www.ti.com/litv/pdf/swcu050e


thanks,
-- 
Lei Ming
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ