Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755304AbcCNIfj (ORCPT ); Mon, 14 Mar 2016 04:35:39 -0400 Received: from mail-am1on0079.outbound.protection.outlook.com ([157.56.112.79]:45440 "EHLO emea01-am1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755289AbcCNIf1 convert rfc822-to-8bit (ORCPT ); Mon, 14 Mar 2016 04:35:27 -0400 X-Greylist: delayed 3639 seconds by postgrey-1.27 at vger.kernel.org; Mon, 14 Mar 2016 04:35:26 EDT From: Rajesh Bhagat To: Felipe Balbi CC: "gregkh@linuxfoundation.org" , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-omap@vger.kernel.org" , Sriram Dash Subject: RE: [PATCH] usb: dwc3: add disable receiver detection in P3 quirk Thread-Topic: [PATCH] usb: dwc3: add disable receiver detection in P3 quirk Thread-Index: AQHRfaosBDEAyFEKwUGgP0tmWL6vy59YgcCAgAAAr0A= Date: Mon, 14 Mar 2016 07:00:36 +0000 Message-ID: References: <1457929793-18910-1-git-send-email-rajesh.bhagat@nxp.com> <87io0pblai.fsf@intel.com> In-Reply-To: <87io0pblai.fsf@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: linux.intel.com; dkim=none (message not signed) header.d=none;linux.intel.com; dmarc=none action=none header.from=nxp.com; x-originating-ip: [192.88.169.1] x-ms-office365-filtering-correlation-id: 1e27e946-416b-4183-3d0e-08d34bd65894 x-microsoft-exchange-diagnostics: 1;AM2PR04MB0547;5:XSIu+h0x9ZQflaXnyxXfi7P9P2weP46oJ4XFTuKEqj8txtVZqnS6n4WPOtgoLYfXTF8QmCCzyTo8qiN36kEXz2vtS62dYrzOZRPhAYFq00beyFFn8cB5gIW99UBx2rI8Lbx5QIgO9l8JCoiTnoiVvg==;24:INoQNowepVfqiejV1LSUFyuzFhbwyMYg4vaFHHoW7R8vyFEe8NhMNO/g/RNXbTshSP+79BDeN2MYqnYTfMC+JAhlhCq7Xyg7/KEUtIJ0bVY= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:AM2PR04MB0547; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046);SRVR:AM2PR04MB0547;BCL:0;PCL:0;RULEID:;SRVR:AM2PR04MB0547; x-forefront-prvs: 0881A7A935 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(51914003)(43544003)(13464003)(377454003)(586003)(5003600100002)(10400500002)(81166005)(122556002)(102836003)(66066001)(6116002)(5008740100001)(1096002)(4326007)(76576001)(5002640100001)(77096005)(106116001)(2900100001)(3660700001)(19580395003)(2906002)(92566002)(76176999)(54356999)(50986999)(74316001)(3280700002)(2950100001)(19580405001)(87936001)(189998001)(3846002)(33656002)(1220700001)(86362001)(110136002)(11100500001);DIR:OUT;SFP:1101;SCL:1;SRVR:AM2PR04MB0547;H:HE1PR0401MB2028.eurprd04.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Mar 2016 07:00:36.8535 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM2PR04MB0547 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3563 Lines: 109 > -----Original Message----- > From: Felipe Balbi [mailto:felipe.balbi@linux.intel.com] > Sent: Monday, March 14, 2016 12:26 PM > To: Rajesh Bhagat > Cc: gregkh@linuxfoundation.org; linux-usb@vger.kernel.org; linux- > kernel@vger.kernel.org; linux-omap@vger.kernel.org; Sriram Dash > ; Rajesh Bhagat > Subject: Re: [PATCH] usb: dwc3: add disable receiver detection in P3 quirk > > > Hi, > Hello Felipe, Thanks for the comments. > 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 detection. After receiver detection, Core > > will change PHY power state to P3. Same quirk would be added in dts file in future > patches. > > > > 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 |= DWC3_GUSB3PIPECTL_U2SSINP3OK; > > > > + if (dwc->dis_rxdet_inp3_quirk) > > + reg |= DWC3_GUSB3PIPECTL_DISRXDETINP3; > > + > > if (dwc->req_p1p2p3_quirk) > > reg |= DWC3_GUSB3PIPECTL_REQP1P2P3; > > > > @@ -903,6 +906,8 @@ static int dwc3_probe(struct platform_device *pdev) > > "snps,u2exit_lfps_quirk"); > > dwc->u2ss_inp3_quirk = device_property_read_bool(dev, > > "snps,u2ss_inp3_quirk"); > > + dwc->dis_rxdet_inp3_quirk = device_property_read_bool(dev, > > + "snps,dis_rxdet_inp3_quirk"); > > not documented under Documentation/devicetree/bindings/usb/dwc3.txt. > Will take care in v2. > > 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 { > > > > 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. > Will take care in v2. > > }; > > > > /* > > ---------------------------------------------------------------------- > > ---- */ 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 { > > > > unsigned tx_de_emphasis_quirk:1; > > unsigned tx_de_emphasis:2; > > + unsigned dis_rxdet_inp3_quirk:1; > > likewise. > Will take care in v2. > -- > balbi