Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3158302pxb; Tue, 19 Jan 2021 15:42:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJxeUTKJRpRq44GIaZsFNomlP4ufj/kugsKv23pmC+4fFhjXeGD2dhox8o5cbD3fWLDWvlc8 X-Received: by 2002:a17:906:a2c5:: with SMTP id by5mr4573073ejb.356.1611099723632; Tue, 19 Jan 2021 15:42:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611099723; cv=none; d=google.com; s=arc-20160816; b=Q9ETwYDtAAqd1p5cVnDhK/2WZOyH6YtwZBATwxZO1URitk7V5EbfIiD6u2jVkH9twq KYqgfqUFhE8UxWIdX8ec9Xn4hyMaKlsc6itmdJs7Y+G1mgRpi85oBc4frfV7/GA8cPdG VK253j/Z+b9miXKGtgO5EHafE61uglYmXcOpdkXjYJoIfqvmS3GnmBC7ZCVW8f/JhkNo p59nNEdSoRhPkGQjhSuQ6esg941Cv/Mbi0I+jqrDFlAinoUZWxWsxXMZiNp4G92Qvrgq 1yfMuhg37Hfy+JiiY32Vna0kpQd9EICJIqiuUAxJMTQr0I7VObmc389SnAugVYeg0Zhh rH3g== 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=TH6tIa7KmmTBxKCeREOLdZWW+HlzUZd6P/Dq1uJJcvo=; b=vgU8t6tzvN5IVE4WVbcni5QZfV61CtzSzJKTp9AkzHp6Ekb56WV4lAWs0ufKogRo9z td09azaOQYVyR/dmtjl7IFnwvzDure6H/VJIk2rTIC5syrO39XMyNcKbtKWX5vnoGBww nv30O+abqoLP59+EMutD6rqTiEA7AUuurGdki8NtmHGgJHh2Zi45CdHk/fHHl2KBxBYv sjFizWeOrcRZuVgqk4CxXIiIm3jtiWXq9v9S+mSuVeRK14+ZnDvSY/YojvIuwPdgm5wx OLh6cQ3mqEwQ83yCbPUIPSokv0EUGjCMC10RiT6v/l/lQeNKlL20BsGxR9VMOt80j0ue ma1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VGhLZsyv; 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 e6si147016edv.445.2021.01.19.15.41.35; Tue, 19 Jan 2021 15:42:03 -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=VGhLZsyv; 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 S1730058AbhASXiu (ORCPT + 99 others); Tue, 19 Jan 2021 18:38:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2395056AbhASOFD (ORCPT ); Tue, 19 Jan 2021 09:05:03 -0500 Received: from mail-qt1-x833.google.com (mail-qt1-x833.google.com [IPv6:2607:f8b0:4864:20::833]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DC21C061574; Tue, 19 Jan 2021 06:04:20 -0800 (PST) Received: by mail-qt1-x833.google.com with SMTP id e15so13678885qte.9; Tue, 19 Jan 2021 06:04:20 -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=TH6tIa7KmmTBxKCeREOLdZWW+HlzUZd6P/Dq1uJJcvo=; b=VGhLZsyv+gpGddxVKxIkOaWu3PVVMK8hpdjXJLLlA4F81h1k0YkPSiEnQAd4bVv6pA JgRtf+bhPCzcUdd4sqblBP/PyDjQApDKodflTiZblp036j001pZm9Alho8iS2tbT1Q8/ QNfPnykbPuA0b6XZ576Qnd9SMZqKKnKAWAaRnkJbbPsWv7651gHbAh28Ux0GhBiF0TgW Su5atvXpCaAczl3eSAFErJsOJo07stP2icTwHW/KLsF5mq0XiZu0Z/SFLrfLLdTccYhW lPG/+rmgZs4h3P1Aqj7PuIRE0aRIOnAV5CzIF/sY/D9I07KZ38x47Xbgey18jILnNadU FLdw== 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=TH6tIa7KmmTBxKCeREOLdZWW+HlzUZd6P/Dq1uJJcvo=; b=KBoHpUvhWb1pK4+BwCKiEkTE9Yn47FisVdu8Ys00jokLUu3GcbZ7Wz8D2O4tyU/Bx9 Pq+uoI2U/k8MWqokGawPqoW0eS3SMezJPuHKNXG02oHvaz4iVfy8Jrir/Ck7p3fc5A62 M6rJAY3lPAtKdQ1ksIyGPi6skB5/yZRG1v7/ICdbWhEFhKmR+TZNZq57dCjklx6VaL4K Dl9WKPPt37XuroEsqSoQR26Vn3KKvFYK++OxZ8iGsGW8Or9XErJyDoCU+df0gnyNELGU u83OyYZC+n11Lz8+Iqpxbtig8dSWHT0oB0hx8yP2hHPeCqozCMi25cHPGdsvwwUIf5lW wGKg== X-Gm-Message-State: AOAM530fQWjoPEtmBKvPcWZRmqAsmMYQL0gBFNKUWJa114YBUIQbhAPX YFQFFtH4qZqmpI307G05QJE= X-Received: by 2002:ac8:742:: with SMTP id k2mr4228578qth.46.1611065059735; Tue, 19 Jan 2021 06:04:19 -0800 (PST) Received: from localhost ([62.96.65.119]) by smtp.gmail.com with ESMTPSA id b16sm5234059qtx.85.2021.01.19.06.04.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Jan 2021 06:04:17 -0800 (PST) Date: Tue, 19 Jan 2021 15:04:15 +0100 From: Thierry Reding To: JC Kuo Cc: gregkh@linuxfoundation.org, robh@kernel.org, jonathanh@nvidia.com, kishon@ti.com, linux-tegra@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, nkristam@nvidia.com Subject: Re: [PATCH v6 15/15] xhci: tegra: Enable ELPG for runtime/system PM Message-ID: References: <20210119085546.725005-1-jckuo@nvidia.com> <20210119085546.725005-16-jckuo@nvidia.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="m4cIgoQOaH3JJzUk" Content-Disposition: inline In-Reply-To: <20210119085546.725005-16-jckuo@nvidia.com> User-Agent: Mutt/2.0.4 (26f41dd1) (2020-12-30) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --m4cIgoQOaH3JJzUk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jan 19, 2021 at 04:55:46PM +0800, JC Kuo wrote: > This commit implements the complete programming sequence for ELPG > entry and exit. >=20 > 1. At ELPG entry, invokes tegra_xusb_padctl_enable_phy_sleepwalk() > and tegra_xusb_padctl_enable_phy_wake() to configure XUSB PADCTL > sleepwalk and wake detection circuits to maintain USB lines level > and respond to wake events (wake-on-connect, wake-on-disconnect, > device-initiated-wake). >=20 > 2. At ELPG exit, invokes tegra_xusb_padctl_disable_phy_sleepwalk() > and tegra_xusb_padctl_disable_phy_wake() to disarm sleepwalk and > wake detection circuits. >=20 > At runtime suspend, XUSB host controller can enter ELPG to reduce > power consumption. When XUSB PADCTL wake detection circuit detects > a wake event, an interrupt will be raised. xhci-tegra driver then > will invoke pm_runtime_resume() for xhci-tegra. >=20 > Runtime resume could also be triggered by protocol drivers, this is > the host-initiated-wake event. At runtime resume, xhci-tegra driver > brings XUSB host controller out of ELPG to handle the wake events. >=20 > The same ELPG enter/exit procedure will be performed for system > suspend/resume path so USB devices can remain connected across SC7. >=20 > Signed-off-by: JC Kuo > --- > v6: > fix compiling warning: extra tokens at end of #ifdef directive > v5: > avoid using xhci_get_rhub() > protect ELPG routines with (CONFIG_PM || CONFIG_PM_SLEEP) > v4: > reshuffle the code to avoid these pre-declarations > v3: > use 'unsigned int' for PHY index > remove unnecessary 'else' > drop IRQF_TRIGGER_HIGH when invokes devm_request_threaded_irq() >=20 > drivers/usb/host/xhci-tegra.c | 407 ++++++++++++++++++++++++++++++---- > 1 file changed, 370 insertions(+), 37 deletions(-) Acked-by: Thierry Reding --m4cIgoQOaH3JJzUk Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAmAG5t8ACgkQ3SOs138+ s6FiRA/+JzS85x8wlzd3wVtXLr/NrOGVX+ABlM+gzXd5MCguuF81Ih/SXmYHBc3Z 99OFwL708T0qXOS0/DM7Wq/VUmFM8mlbyjSujsrG3Daa69CrEbH9pboUMBihc6ki I1TNQe+SWlnrMxaS9YjuMtM8bSIWIiVmSDUlpOuzFFjm37CESKGCTx3u3T4+jO9D IsVDgcwkX63kIb25yeIyVkfS9mYwD4NlMkBdIo4NIULSscGQB2fKX9gZX2HCBA7u qQvxc2+1jdnp5mV4wZGmQ2iXZ55ErmCh315kLI5jIE3KYGsilwvcvJAYAsZDN1rL wyp9Bq0pkT41f/xQqe7OYKYUxKBHdD5LgbSpXf7CvqyMG930rCgHDDooERfnQNAN 8cly6toEj/ugUhknxB7TU7mt1FO3c2BNjSYc7xPHlLXGaKEqa5reYYGoufP+SEuL uAY/4tqxWroI+8afW4BVYCrDevQNjDH7FniUePgX5xd6ejhvjfFPU0YnyszM7dE9 egmqzDp9bpkM4ddIwHXZYYITL8AdM0n9FsgYvFu6/evzy2oUDC4caQTZwoiU2s6r 4Imn6H/rxR5zShSi6zZKTrDdnFQIUwfPHPLbNHuiqzcucaaLIXFSMVHZYiBPhX6M yh1hWi2U4b1gPfPb8Rpy3ZWvWKfkYOrwg5l4GTIPphIWJ9MKnBg= =B9a4 -----END PGP SIGNATURE----- --m4cIgoQOaH3JJzUk--