From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759502AbbEEQIs (ORCPT ); Tue, 5 May 2015 12:08:48 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:57882 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2993296AbbEEPDv (ORCPT ); Tue, 5 May 2015 11:03:51 -0400 Date: Tue, 5 May 2015 10:02:08 -0500 From: Felipe Balbi To: Heikki Krogerus CC: Felipe Balbi , David Cohen , Greg Kroah-Hartman , Stephen Boyd , Baolu Lu , Paul Bolle , , Subject: Re: [PATCHv3 10/12] usb: dwc3: add ULPI interface support Message-ID: <20150505150208.GB30688@saruman.tx.rr.com> Reply-To: References: <20150429082113.GC25288@kuha.fi.intel.com> <1430296233-144245-3-git-send-email-heikki.krogerus@linux.intel.com> <20150429150450.GC7262@saruman.tx.rr.com> <20150430103422.GB1372@kuha.fi.intel.com> <20150430145439.GC1515@saruman.tx.rr.com> <20150504120345.GA31055@kuha.fi.intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6sX45UoQRIJXqkqR" Content-Disposition: inline In-Reply-To: <20150504120345.GA31055@kuha.fi.intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --6sX45UoQRIJXqkqR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, May 04, 2015 at 03:03:45PM +0300, Heikki Krogerus wrote: > Hi Felipe, >=20 > > > With 1.94a and newer, DWC3_GUSB3PIPECTL(0) and DWC3_GUSB2PHYCFG(0) > > > keep their ctx over any kind of soft reset. And any configurations > > > done to them here will take affect the latest when > > > dwc3_core_soft_reset() is called. > >=20 > > /me goes read Databook again. > >=20 > > You're right. You're using the soft reset bit from DCTL, that only > > resets the device side, not any global register. There are two details > > which you don't appear to take care of, however. > >=20 > > According to Table 7-82 on Databook 2.93a (page 725), bit 30 CSFTRST, > > it's said that "Once this bit is cleared, the software must wait at > > least 3 PHY clocks before accessing the PHY domain". >=20 > Ok, I'll add a delay for that. >=20 > > Futher down is > > states that "Once a new clock is selected, the PHY domain must be reset > > for proper operation". >=20 > All PHYs will be reset once we call dwc3_core_soft_reset() and we do > not need them to be operational before that, except in case of > ULPI in order to register the interface. To make sure the ULPI > interface and PHY are operational we call dwc3_soft_reset() which does > everything needed for us. When we use DCTL.SoftRst the core will reset > also the ULPI PHY (PHYSoftRst in DWC3_GUSB2PHYCFG(0) has no effect > with ULPI). >=20 > So dwc3_phy_setup() configures the PHY interfaces but it does not > initialize them or the PHYs. dwc3_core_soft_reset() continues to take > care of that in any case, so there is no reason to duplicate it. I > think we need to point this out in the description comment of > dwc3_phy_setup(). sounds good to me :-) --=20 balbi --6sX45UoQRIJXqkqR Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJVSNtwAAoJEIaOsuA1yqREBf4P/iA8VlBezXyK1CraXslUi29T 7IkQypCw0lYGXpXgEwqaqqCjmMC4QE6x2Sd9q9GtI5uOtzsvQhnhQSs4QlJrtUvJ A7ze/ohxzamiZZYs3XN9qh4BbUFqv2Fh+uDRh7YQyiwUdvNtbdJRg7gn1HxWrVnB TM/EuhgSWGMHw9BopdYLsuSYcXxEn7mpdpMXntpRdsDESpdScvk9VJjLyigbh7ae H8oN1uIDwr+28H8xOgYqdjoFw979+m3+jmAswU3QqMjwE0gh6VU/QwYUJtidUZax IVNyvv1smdIU4zzylMnWBLoCS2JPv6E38GKz70G7HZDhuHFnL271Q1aGIrutnxK3 3cI8MIYmn0BXhhAVrPFghIgzV6Qidf0DBYSIZ09B6TbsSxxFkwe8Jvnwi+1RNiIC NlexiHHWG2zNFXZoCuTpEYteHbLXGOKYwc06gsitTkWlWivrIb9UWszjTYjOhOR4 L/akeiY3gdlUBGkJ3g0B2tVUY+WUZ0ZOZPXNHwhH4f+zzEhSCxkBrlOG/ioV2w7y ZwxP6TIPqwVckRfpRnWKpkxsJcSGead/vPGkalhzAMASkg9Yiarrh2Zbv//1umfC UvYOlP6SLwWSLb4hd1dAHY7YKeqa3lsCSM2upW/7Srb/XKtNNskTUvvp+9pXVmH+ nYoNLUaWMJGEFO6MIW63 =Vi4s -----END PGP SIGNATURE----- --6sX45UoQRIJXqkqR--