Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754773AbcCNG44 (ORCPT ); Mon, 14 Mar 2016 02:56:56 -0400 Received: from mga14.intel.com ([192.55.52.115]:54275 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754564AbcCNG4t (ORCPT ); Mon, 14 Mar 2016 02:56:49 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,334,1455004800"; d="asc'?scan'208";a="669084283" From: Felipe Balbi To: Rajesh Bhagat Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, sriram.dash@nxp.com, Rajesh Bhagat Subject: Re: [PATCH] usb: dwc3: add disable receiver detection in P3 quirk In-Reply-To: <1457929793-18910-1-git-send-email-rajesh.bhagat@nxp.com> References: <1457929793-18910-1-git-send-email-rajesh.bhagat@nxp.com> User-Agent: Notmuch/0.21 (http://notmuchmail.org) Emacs/25.0.90.3 (x86_64-pc-linux-gnu) Date: Mon, 14 Mar 2016 08:55:49 +0200 Message-ID: <87io0pblai.fsf@intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3863 Lines: 110 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, Rajesh Bhagat writes: > [ text/plain ] > Some freescale QorIQ platforms require to disable receiver detection > in P3 for correct detection of USB devices. If GUSB3PIPECTL(DISRXDETINP3) > is set, Core will change PHY power state to P2 and then perform receiver= =20 > detection. After receiver detection, Core will change PHY power state to= =20 > P3. Same quirk would be added in dts file in future patches.=20 > > Signed-off-by: Sriram Dash > Signed-off-by: Rajesh Bhagat > --- > drivers/usb/dwc3/core.c | 6 ++++++ > drivers/usb/dwc3/core.h | 2 ++ > drivers/usb/dwc3/platform_data.h | 1 + > 3 files changed, 9 insertions(+), 0 deletions(-) > > diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c > index de5e01f..b2f2b08 100644 > --- a/drivers/usb/dwc3/core.c > +++ b/drivers/usb/dwc3/core.c > @@ -446,6 +446,9 @@ static int dwc3_phy_setup(struct dwc3 *dwc) > if (dwc->u2ss_inp3_quirk) > reg |=3D DWC3_GUSB3PIPECTL_U2SSINP3OK; >=20=20 > + if (dwc->dis_rxdet_inp3_quirk) > + reg |=3D DWC3_GUSB3PIPECTL_DISRXDETINP3; > + > if (dwc->req_p1p2p3_quirk) > reg |=3D DWC3_GUSB3PIPECTL_REQP1P2P3; >=20=20 > @@ -903,6 +906,8 @@ static int dwc3_probe(struct platform_device *pdev) > "snps,u2exit_lfps_quirk"); > dwc->u2ss_inp3_quirk =3D device_property_read_bool(dev, > "snps,u2ss_inp3_quirk"); > + dwc->dis_rxdet_inp3_quirk =3D device_property_read_bool(dev, > + "snps,dis_rxdet_inp3_quirk"); not documented under Documentation/devicetree/bindings/usb/dwc3.txt. > diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h > index e4f8b90..41cc22c 100644 > --- a/drivers/usb/dwc3/core.h > +++ b/drivers/usb/dwc3/core.h > @@ -193,6 +193,7 @@ > /* Global USB3 PIPE Control Register */ > #define DWC3_GUSB3PIPECTL_PHYSOFTRST (1 << 31) > #define DWC3_GUSB3PIPECTL_U2SSINP3OK (1 << 29) > +#define DWC3_GUSB3PIPECTL_DISRXDETINP3 (1 << 28) > #define DWC3_GUSB3PIPECTL_REQP1P2P3 (1 << 24) > #define DWC3_GUSB3PIPECTL_DEP1P2P3(n) ((n) << 19) > #define DWC3_GUSB3PIPECTL_DEP1P2P3_MASK DWC3_GUSB3PIPECTL_DEP1P2P3(7) > @@ -873,6 +874,7 @@ struct dwc3 { >=20=20 > unsigned tx_de_emphasis_quirk:1; > unsigned tx_de_emphasis:2; > + unsigned dis_rxdet_inp3_quirk:1; _must_ be sorted alphabetically and you _must_ update the kernel doc above this structure. > }; >=20=20 > /* ---------------------------------------------------------------------= ----- */ > diff --git a/drivers/usb/dwc3/platform_data.h b/drivers/usb/dwc3/platform= _data.h > index 2bb4d3a..9df1dfb 100644 > --- a/drivers/usb/dwc3/platform_data.h > +++ b/drivers/usb/dwc3/platform_data.h > @@ -46,6 +46,7 @@ struct dwc3_platform_data { >=20=20 > unsigned tx_de_emphasis_quirk:1; > unsigned tx_de_emphasis:2; > + unsigned dis_rxdet_inp3_quirk:1; likewise. =2D-=20 balbi --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJW5mB2AAoJEIaOsuA1yqRENnYQAJf+YqC0UOWFBxMkK1+JqkHS wHo5sTYX1uw/xqy2czzUzJ0AItnBFa8jFPlao9iPf2V7WC7i5lGMrbtzjt3jQ6Uu pobMcOw2ePLb8wvb6T27qO1tz/QIvNtYoGmsI7ayXaq94z4tessoIsainybV7KJ1 T2NdC9M6As3vG+yeRRUM17LkmbqCHM6rAvp92b2zP1fxUzMquDBSn7S+8EdC+jtw v/0LsJsEJrE5trqatRF3Ib4npv58QOisPo7trNw2BFsEfYfxiJVDf5d8XV+bMfJJ EC1p5eWYODUIrA5OFARXV1HwAA80y0DvzguRjWsBVQaUDhYi7ZKKl4sLahWJOmO7 vHYTxG+DlayKNmR8vjn0XA69+RBcgwa1UMzmNcG1dj4eylosK3WqZEjW0y/x0QZp Z7oknm5w3LOQTe+BbVDBe5ohGK8pb+vHXjFS/6iSVcK07NDbu9F5wPu9TZmRtJwH 6sbFDvqfGdws0b4UbGJA52Um/dncABtzw3XAXioxbvPMoD5cDoE1FOjvatXlmC+Y tPxZHzrA1+sxJkw9hF5l9YAqGPbq3IoPuiJNqXsc8X0CXl+8Om9S1fNmZRwf7hjb caj7JAl5xKfe0EsfWQUeoDFvk7UVpIC4nXTpzpck64YqJtPn8oP7s/oBif0ZOMG0 ofotCYp9znjMsL79RGFM =zh/W -----END PGP SIGNATURE----- --=-=-=--