Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp397596ybk; Fri, 15 May 2020 03:43:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzHTZnifOqwysk+SO4mu/WTETjlgtKVEQrkWn1Ns8lFLPyQFNQ8gfp6dL8xk3ZaUxXxgRn2 X-Received: by 2002:a17:907:2095:: with SMTP id pv21mr1958167ejb.247.1589539434700; Fri, 15 May 2020 03:43:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589539434; cv=none; d=google.com; s=arc-20160816; b=CRoagwQouo5EhNZCkzTscbfzY+rPVZbjrvCuE+74uXQBI4iPI/pk8vOmN3bOjPq66t oJ3X5x+v5WpZ1VJF1p7EbXwIfFOkezM+/TNYf994hwSorus3W3ADDC3bmSPhsjV4SWos EeWycJyC/8kv1rry69NiAx2thG+lwyBJymZy1hIwJoBVeQJ+zjP0z3cOJiiuVfaP1nOz +a/VeW52WLHr9Wge42jscS0YKLKFc4Zf7z2vRhn8UCscAp+WKSu5CQY1flGhpiPlMd5S BiWUzA4LYDW1oL0kgbjDQfOn3oO4hU6q713AhDQwbOs+ivIi16INeS+yG5YckTdn7Cnc 88EA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=IuV69pJbmeb25IQL0aSFJ0UEC0q8gcPDy0lgWN6OqZE=; b=avUMNHMkwwFjC8oFykshfXFn5Ntnlnf+rhJnEIkjjXmG3I5AwHP3VPyTT1qH7HVaR1 ldouloH4//NnhRZ6P0QzPzQp0ypn/YQWLP6S/52DiFgPMZnxXcChZe+e2z53xQz2WN7b XvD6wY3yGd9Clp+SXTEVOhcspvkYslTkHi4zjl537FLwaEcf86cBopzhCFKrX4MDDrbQ ms81oaYjzHGjOqxTMbWZxJimbUQry763ZPhUI5wF62En00Jz1UNVKiu/ZVqg/fDZ6Oza cK9cVBPWm1I84GAHj0c70E8XqIBUr5YzSmfDpHIxr0ZRvyZbMwkA7x4ROdkz2+egtKbU CMBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=soNtbApq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i33si821745edc.519.2020.05.15.03.43.30; Fri, 15 May 2020 03:43:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=soNtbApq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728300AbgEOKlb (ORCPT + 99 others); Fri, 15 May 2020 06:41:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728013AbgEOKla (ORCPT ); Fri, 15 May 2020 06:41:30 -0400 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37772C061A0C; Fri, 15 May 2020 03:41:30 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id a4so1383536lfh.12; Fri, 15 May 2020 03:41:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=IuV69pJbmeb25IQL0aSFJ0UEC0q8gcPDy0lgWN6OqZE=; b=soNtbApqsD+cgPilkRoeQA4ln881xLdHuq6YTIxSaUN+teZMhygQno0fhmf2Ycxih2 he2CT4nyTLFpQF3HevAvm+IGS8ooZdqWbv4LmKplMWK4pmwKVRtDUD+7N4CTisZkmJox VBEDsQ3Otj+uQBzMqtXkpfodnZ6p7VqNiFnh2rnsfvFHF/rtQitpJIUKOATLu+Dm5K02 BbzFPJXMwdyAS1KIbYCYUZl+wsHUCAbYiMhMb56FN0feEmPSYYE7Ll+KwXxvJQTwiLg5 iONb4CIqT9LwmmcC8wNIji33FdHJ1OSu+LuBMih5ytIAhMx0B+3qBCma9ismvU5sU7fR casg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:in-reply-to:references :date:message-id:mime-version; bh=IuV69pJbmeb25IQL0aSFJ0UEC0q8gcPDy0lgWN6OqZE=; b=PDeD/JhCygDSlJLu0DAsrPuINGry2kX6BOsuTaDkysWwRtAqMG6nLyXsiQh11ciwX4 30IKT0r2tcEotkWipCjzJkiQz2B0FtbGSIm2q93GNUZePJzgiR+uJCYG3KapgEoYU+9+ pgOw1AOXE0S0SRvZ3rfwsu9uBRQAxNdxouDhwVGZmFVEHddMrmJhYaSdjM1PZOdHuQ6b lFEWi8fN2hRbWjmqwHl/VNMSZfXNYIOa8KEyC+IWQKKDt31KoB9b+4tQ+9jPsvCzPLCv vJepGP8xIvtLl3xG7QAVEHlDZpQaSsmHIH8Xun1c/AcTJ+85hwT8KedXBRynap2t4FkD G+vg== X-Gm-Message-State: AOAM5324W/+EVX1VEshGt9Mwbm/z7SNOL6yiusjp17dUw023L6SellHY Sd6GyFo3RT9cTTON0yhh8d8= X-Received: by 2002:a19:b8d:: with SMTP id 135mr1935506lfl.145.1589539288473; Fri, 15 May 2020 03:41:28 -0700 (PDT) Received: from saruman (91-155-214-58.elisa-laajakaista.fi. [91.155.214.58]) by smtp.gmail.com with ESMTPSA id r19sm992094ljp.68.2020.05.15.03.41.26 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 May 2020 03:41:27 -0700 (PDT) From: Felipe Balbi To: Jun Li , Jun Li Cc: John Stultz , lkml , Yu Chen , Greg Kroah-Hartman , Rob Herring , Mark Rutland , ShuFan Lee , Heikki Krogerus , Suzuki K Poulose , Chunfeng Yun , Hans de Goede , Andy Shevchenko , Valentin Schneider , Jack Pham , Linux USB List , "open list\:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Peter Chen , Thinh Nguyen Subject: RE: [PATCH v4 3/9] usb: dwc3: Increase timeout for CmdAct cleared by device controller In-Reply-To: References: <20191028215919.83697-1-john.stultz@linaro.org> <20191028215919.83697-4-john.stultz@linaro.org> <87mudjj4rc.fsf@gmail.com> <87h7wqmwrv.fsf@kernel.org> <87imgx35pg.fsf@kernel.org> Date: Fri, 15 May 2020 13:41:23 +0300 Message-ID: <87d07532gc.fsf@kernel.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, Jun Li writes: >> Jun Li writes: >> >> @@ -397,12 +407,18 @@ int dwc3_send_gadget_ep_cmd(struct dwc3_ep *dep= , unsigned >> cmd, >> >> dwc3_gadget_ep_get_transfer_index(dep); >> >> } >> >> >> >> - if (saved_config) { >> >> + if (saved_hs_config) { >> >> reg =3D dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(0)); >> >> - reg |=3D saved_config; >> >> + reg |=3D saved_hs_config; >> >> dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(0), reg); >> >> } >> >> >> >> + if (saved_ss_config) { >> >> + reg =3D dwc3_readl(dwc->regs, DWC3_GUSB3PIPECTL(0)); >> >> + reg |=3D saved_ss_config; >> >> + dwc3_writel(dwc->regs, DWC3_GUSB3PIPECTL(0), reg); >> >> + } >> >> + >> >> return ret; >> >> } >> > >> > Unfortunately this way can't work, once the SS PHY enters P3, disable >> > suspend_en can't force SS PHY exit P3, unless do this at the very >> > beginning to prevent SS PHY entering P3(e.g. add "snps,dis_u3_susphy_q= uirk" for >> test). >>=20 >> It sounds like you have a quirky PHY.=20 > > From what I got from the IC design, the behavior of DWC3_GUSB3PIPECTL_SUS= PHY > bit should be as what I said, not a quirky. > > Hi Thinh, could you comment this? > >> If that's the case, then you probably need >> to use the flag you mentioned above. Please verify with that. > > With quirk of "snps,dis_u3_susphy_quirk", I had verified it can > resolve the problem, but this will make USB3 Super Speed PHY > never enter P3, this is a huge impact on USB power consumption. > > The timeout increase has no impact on those platforms which have > no this problem, but can give chance for platform with very low > supspend clk(like my case 32k) to work. I was under the impression that issuing a command would wake the PHY up. I don't have access to DWC3 documentation to verify, but that's as I remember. Is that not the case? =2D-=20 balbi --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEElLzh7wn96CXwjh2IzL64meEamQYFAl6+cdMACgkQzL64meEa mQYMMQ//ReGJl+YwiKBw2I8knemHDYhudQuGQSG6s78dfTKTJkH84XJ197AGxIPm s4vOk6VAuXpsWmota81ZU57GGC+NZqPLVQMXsrEE08HgFrHjjIriIv6AwoQ8rHfi pVQHdma8yaZRFRLYtzpGUf0lEHbgIgcy50gnGpjcQKc/FvChJNCbBNVvp8IVJPIA L/Zi5Vsl+lyLYSHYYYIDXU3EhPEbel8GmDYwNqn+N8jgxdDqF+vxwx+t1uXy584S EdVTnJZihL6TcTwck7//mrGfvIZ04sLtrGgbaUcmw/QotlfmrkWcmUN1P4as2A51 A/+z0NcV6FQBIKj8lnDlYUjSL36qYw32mCvb1TTp6JnZ/khMclrYd/5o8C+beRna OUS0dhOy2/ygBfuiUiw2x15pe0GQ24EN0ZiLmTWrjd49whqkqheM7PWKNLxtnnmP 2/10rAdQpD5STJSHiQi6YZSQaMsRPDlQasyVcrlAgOqNBfA3pRXz6rqRYD4NTLL0 1IGl4EtzZlEfQpIqpZlaLtirz6iPkqMrRXROaTiZC55tHoItwaJ+wqZ47n8QQWyG NehsGGD3dk9LyGjiIpXnZ3HIalOTLXKwagEpfD39sgQsTBuzSfexUYER3diNe93k X4exS7gdYwhTfbYPiFbY9HcyQqRDckgC5p0k/qEdpeqw+WsQ3MQ= =ljzj -----END PGP SIGNATURE----- --=-=-=--