Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1305634pxu; Thu, 17 Dec 2020 07:05:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJwax1OBPB3gZPO4G5Mbax1vk7Vbz+/FzGh/UKbAK3JR0cx1jrJLhpiYkPpXaY1c2hY5wWOl X-Received: by 2002:a05:6402:139a:: with SMTP id b26mr39118923edv.47.1608217542598; Thu, 17 Dec 2020 07:05:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608217542; cv=none; d=google.com; s=arc-20160816; b=oHUIeYcw+t6R7YdlNWbGkdWJiyj5UrJ2SywnrWgNmgzG68r+Kq75BAX7wGkfZGHRxl v6/KuvEp8NxcfjJu2LoW6nHXJ+1zw3NoPg+f+LQL4MGoM0GY3u3yyTtHEr6WmFesQ0UC 1LvJvAaUKM5eSxx2mZ0s5cOQpGcnxhc4WA3WgZtFbcBEUxRb25ykjrdmBZejrUscBV4Y xcLPvvlgh4JDdAQJA9V2UAU+o1d9y65Mx0XAmIpHVLtqVyBdL0n/RMfJ7Ko0OR2As3Yj qcQPqOTyqmLXNrvqthJgd7Hn/FYYNWI7nN4yzqOLzzo92TP6jKOpEhXcT6dT8GoU9yml +cEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=vL6UODLD0sWqJcZPYNQCNPrMnCLRar1aQteLA5mURjA=; b=FBKtmZJcJIdH0N75OIS1EskCgEqV7A3/Dyr2BGffj5MPNo0iljhZmm7CB0gAWPx0yu Ts6elw5B8ceSHr2xtTl6opLksbAzCBX1//vAiHht4GZKsEdr0PzlbE8zojcPqsn/Uu5b DH/Dn1RbcAC8aJOB0KkynApkpI/gD1KdPBJedGNy1sY9Ni5Muy8EZgG55+QgwW9y9JQN 1aOOeoj1l/F/2fmw/1JO5LqFa9ihDDNEaOrKxfKeoFJECfle1QqCNOu3YjOHA1witWSL zOUoVdMRAUe3CYW5OAuDS5rmPt/Ee/+KMNJ+1DbK/heqcPxTODBUalOo+MMd0q5BAQSb IWOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fp8IktJ8; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hd40si2772230ejc.265.2020.12.17.07.05.18; Thu, 17 Dec 2020 07:05:42 -0800 (PST) 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=pass header.i=@gmail.com header.s=20161025 header.b=fp8IktJ8; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728628AbgLQPDN (ORCPT + 99 others); Thu, 17 Dec 2020 10:03:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41514 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727394AbgLQPDM (ORCPT ); Thu, 17 Dec 2020 10:03:12 -0500 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0753C061794; Thu, 17 Dec 2020 07:02:31 -0800 (PST) Received: by mail-wr1-x42d.google.com with SMTP id i9so26926733wrc.4; Thu, 17 Dec 2020 07:02:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=vL6UODLD0sWqJcZPYNQCNPrMnCLRar1aQteLA5mURjA=; b=fp8IktJ8To5v2kEgpGOM/nXnVnp3WgdnTiAXa1yv14ytq3mYv6jFVLrFOHXTi5i/D6 uazegOhqfItoeigWtNcSh8EEI3VafuzqQ+1kuwDTGEz9WJI6r8rukJDrVpm4Ua0kYxFo N9c+Tk+ME0AvBMDM9wV/TfR5FUg+2sURxaEAbrN0o9DIJznLK2K55iPQSMKbGqiMwmyk jMU9tmtVJ5SQs8AqO/VYnlh00ZZ5dd5WmhGcOwyrvxc9414QUL7MVWGbq2ssdY2hd7le 0pguALwDBk9xRQBXsvrk9kB53BDNz5zFCQGGFas/McPf5dEstRxYx/wi2AVANDhcY1Q3 R/0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=vL6UODLD0sWqJcZPYNQCNPrMnCLRar1aQteLA5mURjA=; b=lbCYHxZDkJg8pY5ePd4cwi7aheaoUD251JZf9cYaweX+12I1+h7M8RNdkNXxg71jMG RfUTzT2SPfNUDXIeMkr8T9/724cdhZJDPBg8igwVjjPlNG4HFVsp/I4sXW0fiGIxXd1q Dle2aejbqor4iqLur2b/SINnAWmQlMHqAfXjJMl+2DDpyBMPMuoxVena5GSEncJpwZHS Gg/ajUZrX+ATql0XzcyPI7zpYmn1J6uFbYYb30bZrpaEZsvjBD2a0OedIPU+AVoOJ3Gi vZ84pDUQ/hHushxP4rpLlN94TamxB3y/Z7bctNw/eYr3z+PAwbHz4yZN+faBRMTiwMyg g0CA== X-Gm-Message-State: AOAM533T2xtnFwh1PG8NSOF+NUidcIv80N/FhWMOxdSLn+Qn6X4pd5Df ZE68kDXG9VqNRmO3/QUmPPQ= X-Received: by 2002:a5d:4349:: with SMTP id u9mr43137225wrr.319.1608217350410; Thu, 17 Dec 2020 07:02:30 -0800 (PST) Received: from localhost ([62.96.65.119]) by smtp.gmail.com with ESMTPSA id q17sm9063519wrr.53.2020.12.17.07.02.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Dec 2020 07:02:29 -0800 (PST) Date: Thu, 17 Dec 2020 16:02:27 +0100 From: Thierry Reding To: Dmitry Osipenko Cc: Jonathan Hunter , Peter Chen , Greg Kroah-Hartman , Alan Stern , Felipe Balbi , Matt Merhar , Nicolas Chauvet , Peter Geis , Ion Agorria , linux-tegra@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 6/8] usb: chipidea: tegra: Support runtime PM Message-ID: References: <20201217094007.19336-1-digetx@gmail.com> <20201217094007.19336-7-digetx@gmail.com> <28468e30-a832-9774-bed3-ac986aef8831@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="OW10L9f0L2MzRxHp" Content-Disposition: inline In-Reply-To: <28468e30-a832-9774-bed3-ac986aef8831@gmail.com> User-Agent: Mutt/2.0.3 (a51f058f) (2020-12-04) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --OW10L9f0L2MzRxHp Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 17, 2020 at 04:45:03PM +0300, Dmitry Osipenko wrote: > 17.12.2020 16:41, Thierry Reding =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > > On Thu, Dec 17, 2020 at 12:40:05PM +0300, Dmitry Osipenko wrote: > >> Tegra PHY driver now supports waking up controller from a low power mo= de. > >> Enable runtime PM in order to put controller into the LPM during idle. > >> > >> Tested-by: Matt Merhar > >> Tested-by: Nicolas Chauvet > >> Tested-by: Peter Geis > >> Tested-by: Ion Agorria > >> Signed-off-by: Dmitry Osipenko > >> --- > >> drivers/usb/chipidea/ci_hdrc_tegra.c | 13 ++++++++++--- > >> 1 file changed, 10 insertions(+), 3 deletions(-) > >> > >> diff --git a/drivers/usb/chipidea/ci_hdrc_tegra.c b/drivers/usb/chipid= ea/ci_hdrc_tegra.c > >> index 5fccdeeefc64..655671159511 100644 > >> --- a/drivers/usb/chipidea/ci_hdrc_tegra.c > >> +++ b/drivers/usb/chipidea/ci_hdrc_tegra.c > >> @@ -38,21 +38,24 @@ struct tegra_usb_soc_info { > >> =20 > >> static const struct tegra_usb_soc_info tegra20_ehci_soc_info =3D { > >> .flags =3D CI_HDRC_REQUIRES_ALIGNED_DMA | > >> - CI_HDRC_OVERRIDE_PHY_CONTROL, > >> + CI_HDRC_OVERRIDE_PHY_CONTROL | > >> + CI_HDRC_SUPPORTS_RUNTIME_PM, > >> .dr_mode =3D USB_DR_MODE_HOST, > >> .txfifothresh =3D 10, > >> }; > >> =20 > >> static const struct tegra_usb_soc_info tegra30_ehci_soc_info =3D { > >> .flags =3D CI_HDRC_REQUIRES_ALIGNED_DMA | > >> - CI_HDRC_OVERRIDE_PHY_CONTROL, > >> + CI_HDRC_OVERRIDE_PHY_CONTROL | > >> + CI_HDRC_SUPPORTS_RUNTIME_PM, > >> .dr_mode =3D USB_DR_MODE_HOST, > >> .txfifothresh =3D 16, > >> }; > >> =20 > >> static const struct tegra_usb_soc_info tegra_udc_soc_info =3D { > >> .flags =3D CI_HDRC_REQUIRES_ALIGNED_DMA | > >> - CI_HDRC_OVERRIDE_PHY_CONTROL, > >> + CI_HDRC_OVERRIDE_PHY_CONTROL | > >> + CI_HDRC_SUPPORTS_RUNTIME_PM, > >> .dr_mode =3D USB_DR_MODE_UNKNOWN, > >> }; > >> =20 > >> @@ -323,6 +326,10 @@ static int tegra_usb_probe(struct platform_device= *pdev) > >> usb->data.hub_control =3D tegra_ehci_hub_control; > >> usb->data.notify_event =3D tegra_usb_notify_event; > >> =20 > >> + /* Tegra PHY driver currently doesn't support LPM for ULPI */ > >> + if (of_usb_get_phy_mode(pdev->dev.of_node) =3D=3D USBPHY_INTERFACE_M= ODE_ULPI) > >> + usb->data.flags &=3D ~CI_HDRC_SUPPORTS_RUNTIME_PM; > >> + > >=20 > > Does this prevent the wakeup_enabled from being set for ULPI PHYs? >=20 > Yes Okay, it should be fine then to keep that WARN_ONCE in that prior patch since we should really only get there if there's something seriously wrong. Thierry --OW10L9f0L2MzRxHp Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAl/bcwMACgkQ3SOs138+ s6GiVRAApwu7yA+zMkklRAeRtXQxIO8UzUaDfB7k3WhRCO64o7ryP6SCQo92O65J dRKf5ahUn+eGlKrWTvpzM+WLpXo1RU3Lta63xM3zDmuyO2NH9ut9+G5NRJv4aHtL VoydZvONdKJZ4VnDL27ARNwqO8fh/rAm06eVQKzSl7pKMzHgjCTMOyMl6knUiCij 8gVsOEiBEs2G8+UW3M5J/k6Q2tAhcoemJ27ZcRzdpOEko6nZLBgmW4d937TimfYz 15IWWWk7Zix1F/qcuYj4lYPGfnkVijyP73nLgW7t9FbVQYIq0ni16hQWOMMo3ClP 35Yxr2S0Ova1BBTriG++BqfN4cBvIpghlseb0BjIxPbWkFznErIiySGGC4zixUVM wErInEvZIAPS5M4Gj4Le3hHTCjdUwFktIIAoExwFp+ttUsI1G4VmW/dEcOH0ZqM7 nns4jWreNtZwtk450CtdtQMcAPan12JhvanuPm97h+dDZpDqFQVhZAA0Lk5/8Bo/ Trx8BTsyMRV4jOtKCVcNarsdN/5NefWZ0zwizgMDX5EmkmKm5Hbh4UZO5DzJfKGf sHg2k7l4lsw+V7UeK/SL5RzjchaCEoIkFHBHyeoUwhKGl8VyTkxGoh4nsBvCSu2A SGI5Gmok+hfna8WEXgl/qhv6NPACdW9EnC5YxuUyjuC45Mf0XTk= =m/92 -----END PGP SIGNATURE----- --OW10L9f0L2MzRxHp--